@everymatrix/pam-statement-history 0.0.28 → 0.0.30
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.
- package/dist/cjs/{index-fb94c0e0.js → index-464df915.js} +4 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{pam-statement-history-b224d6b2.js → pam-statement-history-7a7b04ee.js} +25 -17
- package/dist/cjs/pam-statement-history.cjs.entry.js +2 -2
- package/dist/cjs/pam-statement-history.cjs.js +2 -2
- package/dist/collection/components/pam-statement-history/pam-statement-history.css +39 -2
- package/dist/collection/components/pam-statement-history/pam-statement-history.js +29 -20
- package/dist/esm/{index-02b4ec70.js → index-50c7699a.js} +4 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{pam-statement-history-dc238928.js → pam-statement-history-bbad60d1.js} +25 -17
- package/dist/esm/pam-statement-history.entry.js +2 -2
- package/dist/esm/pam-statement-history.js +3 -3
- package/dist/pam-statement-history/{index-02b4ec70.js → index-50c7699a.js} +2 -2
- package/dist/pam-statement-history/index.esm.js +1 -1
- package/dist/pam-statement-history/{pam-statement-history-dc238928.js → pam-statement-history-bbad60d1.js} +132 -132
- package/dist/pam-statement-history/pam-statement-history.entry.js +1 -1
- package/dist/pam-statement-history/pam-statement-history.esm.js +1 -1
- package/dist/types/components/pam-statement-history/pam-statement-history.d.ts +5 -2
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,h as e,F as i}from"./index-
|
|
1
|
+
import{r as t,h as e,F as i}from"./index-50c7699a.js";const o="__WIDGET_GLOBAL_STYLE_CACHE__";function r(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function s(t,e){if(!t||!e)return;const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function n(t,e,i,r=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!r)return i=function(t,e){const i=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(i.innerHTML=e,t.appendChild(i))}))}(t,e),i;window[o]||(window[o]={}),i=function(t,e){return window.emMessageBus.subscribe(e,(i=>{if(!t)return;const r=t.getRootNode(),s=window[o];let n=s[e]&&s[e].sheet;n?s[e].refCount=s[e].refCount+1:(n=new CSSStyleSheet,n.replaceSync(i),s[e]={sheet:n,refCount:1});const a=r.adoptedStyleSheets||[];a.includes(n)||(r.adoptedStyleSheets=[...a,n])}))}(t,e);const s=i.unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[o][e]){const t=window[o][e];t.refCount>1?t.refCount=t.refCount-1:delete window[o][e]}s()},i}const a=["All","Payments","Sports","Casino","Bonus"],l=["1D","1W","1M","3M","Custom"],h=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],c={en:{transactionHistory:"Transaction History",all:"All",payments:"Payments",sports:"Sports",casino:"Casino",bonus:"Bonus","1d":"1D","1w":"1W","1m":"1M","3m":"3M",custom:"Custom",from:"From",to:"To",apply:"Apply",maxRange:"Max range allowed is 180 days.",loading:"Loading...",noData:"No data was found for the selected period.",errorLoading:"Failed to load transactions.",balance:"Balance:",copied:"Copied!",prev:"Prev",next:"Next",page:"Page",sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat",deposit:"Deposit",withdrawal:"Withdrawal",success:"Success",failed:"Failed",won:"Won",placed:"Placed",pendingnotification:"Pending Notification",pending:"Pending",approved:"Approved",declined:"Declined",cancelled:"Cancelled",incomplete:"Incomplete",rollback:"Rollback",failedToCopyText:"Failed to copy text: ",na:"#N/A"},fr:{transactionHistory:"Historique des transactions",all:"Tout",payments:"Paiements",sports:"Sports",casino:"Casino",bonus:"Bonus","1d":"1J","1w":"1S","1m":"1M","3m":"3M",custom:"Personnalisé",from:"De",to:"À",apply:"Appliquer",maxRange:"La plage maximale autorisée est de 180 jours.",loading:"Chargement...",noData:"Aucune donnée trouvée pour la période sélectionnée.",errorLoading:"Échec du chargement des transactions.",balance:"Solde :",copied:"Copié !",prev:"Précédent",next:"Suivant",page:"Page",sun:"Dim",mon:"Lun",tue:"Mar",wed:"Mer",thu:"Jeu",fri:"Ven",sat:"Sam",deposit:"Dépôt",withdrawal:"Retrait",success:"Succès",failed:"Échoué",won:"Gagné",placed:"Placé",pendingnotification:"Notification en attente",pending:"En attente",approved:"Approuvé",declined:"Refusé",cancelled:"Annulé",incomplete:"Incomplet",rollback:"Annulation",failedToCopyText:"Échec de la copie du texte : ",na:"#N/A"},"zh-hk":{},hu:{},tr:{},el:{},es:{},pt:{},hr:{}};var d=Object.defineProperty,u=Object.defineProperties,p=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,b=(t,e,i)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,g=(t,e)=>{for(var i in e||(e={}))v.call(e,i)&&b(t,i,e[i]);if(m)for(var i of m(e))f.call(e,i)&&b(t,i,e[i]);return t},y=(t,e)=>u(t,p(e)),w=(t,e,i)=>(b(t,"symbol"!=typeof e?e+"":e,i),i),x=(t,e,i)=>new Promise(((o,r)=>{var s=t=>{try{a(i.next(t))}catch(t){r(t)}},n=t=>{try{a(i.throw(t))}catch(t){r(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(s,n);a((i=i.apply(t,e)).next())}))
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -14,12 +14,12 @@ import{r as t,h as e,F as i}from"./index-02b4ec70.js";const o="__WIDGET_GLOBAL_S
|
|
|
14
14
|
* Copyright 2019 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const C=globalThis,A=C.ShadowRoot&&(void 0===C.ShadyCSS||C.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,S=Symbol(),z=new WeakMap;let T=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==S)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(A&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=z.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&z.set(e,t))}return t}toString(){return this.cssText}};const
|
|
17
|
+
const C=globalThis,A=C.ShadowRoot&&(void 0===C.ShadyCSS||C.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,S=Symbol(),z=new WeakMap;let T=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==S)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(A&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=z.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&z.set(e,t))}return t}toString(){return this.cssText}};const D=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new T(i,t,S)},I=(t,e)=>{if(A)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),o=C.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}},M=A?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new T("string"==typeof t?t:t+"",void 0,S))(e)})(t):t
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/,{is:E,defineProperty:P,getOwnPropertyDescriptor:O,getOwnPropertyNames:N,getOwnPropertySymbols:B,getPrototypeOf:j}=Object,F=globalThis,L=F.trustedTypes,R=L?L.emptyScript:"",q=F.reactiveElementPolyfillSupport,$={toAttribute(t,e){switch(e){case Boolean:t=t?R: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}},
|
|
22
|
+
*/,{is:E,defineProperty:P,getOwnPropertyDescriptor:O,getOwnPropertyNames:N,getOwnPropertySymbols:B,getPrototypeOf:j}=Object,F=globalThis,L=F.trustedTypes,R=L?L.emptyScript:"",q=F.reactiveElementPolyfillSupport,$={toAttribute(t,e){switch(e){case Boolean:t=t?R: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}},V=(t,e)=>!E(t,e),W={attribute:!0,type:String,converter:$,reflect:!1,useDefault:!1,hasChanged:V};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=F.litPropertyMetadata||(F.litPropertyMetadata=new WeakMap);let U=class 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=W){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(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&P(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){var o;const{get:r,set:s}=null!=(o=O(this.prototype,t))?o:{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const o=null==r?void 0:r.call(this);null==s||s.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:W}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=j(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=[...N(t),...B(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(M(t))}else void 0!==t&&e.push(M(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 I(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 o=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,o);if(void 0!==r&&!0===o.reflect){const s=(void 0!==(null==(i=o.converter)?void 0:i.toAttribute)?o.converter:$).toAttribute(e,o.type);this._$Em=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(t,e){var i,o,r;const s=this.constructor,n=s._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=s.getPropertyOptions(n),a="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:$;this._$Em=n;const l=a.fromAttribute(e,t.type);this[n]=null!=(r=null!=l?l:null==(o=this._$Ej)?void 0:o.get(n))?r:l,this._$Em=null}}requestUpdate(t,e,i,o=!1,r){var s,n;if(void 0!==t){const a=this.constructor;if(!1===o&&(r=this[t]),null!=i||(i=a.getPropertyOptions(t)),!((null!=(s=i.hasChanged)?s:V)(r,e)||i.useDefault&&i.reflect&&r===(null==(n=this._$Ej)?void 0:n.get(t))&&!this.hasAttribute(a._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:o,wrapped:r},s){var n,a,l;i&&!(null!=(n=this._$Ej)?n:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,null!=(a=null!=s?s:e)?a:this[t]),!0!==r||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(null!=(l=this._$Eq)?l:this._$Eq=new Set).add(t))}_$EP(){return x(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,o=this[e];!0!==t||this._$AL.has(e)||void 0===o||this.C(e,void 0,i,o)}}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 Y;U.elementStyles=[],U.shadowRootOptions={mode:"open"},U.elementProperties=new Map,U.finalized=new Map,null==q||q({ReactiveElement:U}),(null!=(Y=F.reactiveElementVersions)?Y:F.reactiveElementVersions=[]).push("2.1.2");
|
|
23
23
|
/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
@@ -30,7 +30,7 @@ const H=globalThis,G=H.trustedTypes,K=G?G.createPolicy("lit-html",{createHTML:t=
|
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
-
*/},
|
|
33
|
+
*/},Dt=globalThis;class It extends U{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=Tt(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 ut}}var Mt;It._$litElement$=!0,It.finalized=!0,null==(Mt=Dt.litElementHydrateSupport)||Mt.call(Dt,{LitElement:It});const Et=Dt.litElementPolyfillSupport;var Pt;null==Et||Et({LitElement:It}),(null!=(Pt=Dt.litElementVersions)?Pt:Dt.litElementVersions=[]).push("4.2.2");
|
|
34
34
|
/**
|
|
35
35
|
* @license
|
|
36
36
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -41,12 +41,12 @@ const Ot=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
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
|
-
*/,Nt=[],Bt=new Set,jt=new Set;function Ft(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Lt(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function Rt(t){return t.map((t=>t.cssText)).join("\n")}const qt="vaadin-themable-mixin-style";function $t(t){t.prototype instanceof
|
|
44
|
+
*/,Nt=[],Bt=new Set,jt=new Set;function Ft(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Lt(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function Rt(t){return t.map((t=>t.cssText)).join("\n")}const qt="vaadin-themable-mixin-style";function $t(t){t.prototype instanceof It?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(qt).textContent=Rt(t.getStylesForThis()),jt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&$t(i)}))}function Vt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof T||(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):Nt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&jt.forEach((i=>{if(Lt(t,i)&&function(t){return Ft(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}`),$t(t),function(t){Bt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof It?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),I(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(qt).textContent=e.prototype._template.content.getElementById(qt).textContent}(i):i||Bt.delete(e)}))}(t)}}))}function Wt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():Nt}function Ut(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Yt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=Wt().find((e=>e.moduleId===t));i?e.push(...Yt(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function Ht(t){const e=`${t}-default-theme`,i=Wt().filter((i=>i.moduleId!==e&&Lt(i.themeFor,t))).map((t=>y(g({},t),{styles:[...Yt(t),...t.styles],includePriority:Ut(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Wt().filter((t=>t.moduleId===e))}const Gt=t=>class extends(Ot(t)){constructor(){super(),Bt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&jt.add(this.is),this.elementStyles)return;const t=this.prototype._template;!t||Ft(this)||function(t,e){const i=document.createElement("style");i.id=qt,i.textContent=Rt(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:[])||[],...Ht(this.is)];const o=this.__themes.flatMap((t=>t.styles));return o.filter(((t,e)=>e===o.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
|
-
*/,Kt=(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)};Kt("color-props",
|
|
49
|
+
*/,Kt=(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)};Kt("color-props",D`
|
|
50
50
|
:host {
|
|
51
51
|
/* Base (background) */
|
|
52
52
|
--lumo-base-color: #fff;
|
|
@@ -131,7 +131,7 @@ const Ot=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
131
131
|
--lumo-disabled-text-color: GrayText;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
`),
|
|
134
|
+
`),Vt("",D`
|
|
135
135
|
[theme~='dark'] {
|
|
136
136
|
/* Base (background) */
|
|
137
137
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -249,7 +249,7 @@ const Ot=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"}),Kt("font-icons",
|
|
252
|
+
`,{moduleId:"lumo-color"}),Kt("font-icons",D`
|
|
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 Ot=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
|
-
`),Kt("sizing-props",
|
|
305
|
+
`),Kt("sizing-props",D`
|
|
306
306
|
:host {
|
|
307
307
|
--lumo-size-xs: 1.625rem;
|
|
308
308
|
--lumo-size-s: 1.875rem;
|
|
@@ -317,7 +317,7 @@ const Ot=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
|
-
`),Kt("spacing-props",
|
|
320
|
+
`),Kt("spacing-props",D`
|
|
321
321
|
:host {
|
|
322
322
|
/* Square */
|
|
323
323
|
--lumo-space-xs: 0.25rem;
|
|
@@ -340,7 +340,7 @@ const Ot=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
340
340
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
341
341
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
342
342
|
}
|
|
343
|
-
`),
|
|
343
|
+
`),D`
|
|
344
344
|
html {
|
|
345
345
|
/* Button */
|
|
346
346
|
--vaadin-button-background: var(--lumo-contrast-5pct);
|
|
@@ -423,7 +423,7 @@ const Ot=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
|
-
`,Kt("style-props",
|
|
426
|
+
`,Kt("style-props",D`
|
|
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 Ot=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 Qt=
|
|
449
|
+
const Qt=D`
|
|
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 Qt=I`
|
|
|
466
466
|
--lumo-line-height-s: 1.375;
|
|
467
467
|
--lumo-line-height-m: 1.625;
|
|
468
468
|
}
|
|
469
|
-
`;
|
|
469
|
+
`;Vt("",D`
|
|
470
470
|
body,
|
|
471
471
|
:host {
|
|
472
472
|
font-family: var(--lumo-font-family);
|
|
@@ -558,7 +558,7 @@ const Qt=I`
|
|
|
558
558
|
border-left: none;
|
|
559
559
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
560
560
|
}
|
|
561
|
-
`,{moduleId:"lumo-typography"}),Kt("typography-props",Qt),
|
|
561
|
+
`,{moduleId:"lumo-typography"}),Kt("typography-props",Qt),Vt("vaadin-checkbox",D`
|
|
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));
|
|
@@ -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 Se="link[rel=import][type~=css]",ze="include",Te="shady-unscoped";function
|
|
913
|
+
const Se="link[rel=import][type~=css]",ze="include",Te="shady-unscoped";function De(t){return Ae.import(t)}function Ie(t){const e=ie((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function Me(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...Ee(e[t]));return i}function Ee(t){const e=De(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...Oe(e));const i=e.querySelector("template");i&&t.push(...Pe(i,e.assetpath)),e._styles=t}return e._styles}function Pe(t,e){if(!t._styles){const i=[],o=t.content.querySelectorAll("style");for(let t=0;t<o.length;t++){let r=o[t],s=r.getAttribute(ze);s&&i.push(...Me(s).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(r.textContent=ie(r.textContent,e)),i.push(r)}t._styles=i}return t._styles}function Oe(t){const e=[],i=t.querySelectorAll(Se);for(let t=0;t<i.length;t++){let o=i[t];if(o.import){const t=o.import,i=o.hasAttribute(Te);if(i&&!t._unscopedStyle){const e=Ie(t);e.setAttribute(Te,""),t._unscopedStyle=e}else t._style||(t._style=Ie(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.
|
|
@@ -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 Be(t){return t.indexOf(".")>=0}function je(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Fe(t,e){return 0===t.indexOf(e+".")}function Le(t,e){return 0===e.indexOf(t+".")}function Re(t,e,i){return e+i.slice(t.length)}function qe(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let o=t[i].toString().split(".");for(let t=0;t<o.length;t++)e.push(o[t])}return e.join(".")}return t}function $e(t){return Array.isArray(t)?qe(t).split("."):t.toString().split(".")}function
|
|
931
|
+
*/;function Be(t){return t.indexOf(".")>=0}function je(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Fe(t,e){return 0===t.indexOf(e+".")}function Le(t,e){return 0===e.indexOf(t+".")}function Re(t,e,i){return e+i.slice(t.length)}function qe(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let o=t[i].toString().split(".");for(let t=0;t<o.length;t++)e.push(o[t])}return e.join(".")}return t}function $e(t){return Array.isArray(t)?qe(t).split("."):t.toString().split(".")}function Ve(t,e,i){let o=t,r=$e(e);for(let t=0;t<r.length;t++){if(!o)return;o=o[r[t]]}return i&&(i.path=r.join(".")),o}function We(t,e,i){let o=t,r=$e(e),s=r[r.length-1];if(r.length>1){for(let t=0;t<r.length-1;t++)if(o=o[r[t]],!o)return;o[s]=i}else o[e]=i;return r.join(".")}
|
|
932
932
|
/**
|
|
933
933
|
@license
|
|
934
934
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -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 wi=0;const xi=[],_i={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ki="__computeInfo",Ci=/[A-Z]/;function Ai(t,e,i){let o=t[e];if(o){if(!t.hasOwnProperty(e)&&(o=t[e]=Object.create(t[e]),i))for(let t in o){let e=o[t],i=o[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else o=t[e]={};return o}function Si(t,e,i,o,r,s){if(e){let n=!1;const a=wi++;for(let l in i){let h=e[r?je(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==a)&&(!r||Ti(l,e.trigger))&&(e.info&&(e.info.lastRun=a),e.fn(t,l,i,o,e.info,r,s),n=!0)}return n}return!1}function zi(t,e,i,o,r,s,n,a){let l=!1,h=e[n?je(o):o];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==i)&&(!n||Ti(o,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,o,r,s,e.info,n,a),l=!0);return l}function Ti(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Fe(i,t))||!(!e.wildcard||!Le(i,t))}return!0}function Ii(t,e,i,o,r){let s="string"==typeof r.method?t[r.method]:r.method,n=r.property;s?s.call(t,t.__data[n],o[n]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function Di(t,e,i){let o=je(e);return o!==e&&(Mi(t,Ke(o)+"-changed",i[e],e),!0)}function Mi(t,e,i,o){let r={value:i,queueProperty:!0};o&&(r.path=o),Ne(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function Ei(t,e,i,o,r,s){let n=(s?je(e):e)!=e?e:null,a=n?We(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),Mi(t,r.eventName,a,n)}function Pi(t,e,i,o,r){let s=t.__data[e];ae&&(s=ae(s,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,s)}const Oi=(t,e,i)=>{let o=0,r=e.length-1,s=-1;for(;o<=r;){const n=o+r>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)o=n+1;else{if(!(a>0)){s=n;break}r=n-1}}s<0&&(s=r+1),e.splice(s,0,t)},Ni=(t,e,i,o,r)=>{const s=e[r?je(t):t];if(s)for(let e=0;e<s.length;e++){const n=s[e];n.info.lastRun!==wi&&(!r||Ti(t,n.trigger))&&(n.info.lastRun=wi,Oi(n.info,i,o))}};function Bi(t,e,i,o,r){let s=Wi(t,e,i,0,r);if(s===xi)return!1;let n=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,s,!0):(t[n]=s,!1)}function ji(t,e,i,o,r,s,n){i.bindings=i.bindings||[];let a={kind:o,target:r,parts:s,literal:n,isCompound:1!==s.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||Ke(r)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let o=a.parts[i];o.compoundIndex=i,Fi(t,e,a,o,l)}}function Fi(t,e,i,o,r){if(!o.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 s=o.dependencies,n={index:r,binding:i,part:o,evaluator:t};for(let i=0;i<s.length;i++){let o=s[i];"string"==typeof o&&(o=Qi(o),o.wildcard=!0),t._addTemplatePropertyEffect(e,o.rootProperty,{fn:Li,info:n,trigger:o})}}}function Li(t,e,i,o,r,s,n){let a=n[r.index],l=r.binding,h=r.part;if(s&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let o=i[e];e=Re(h.source,l.target,e),a._setPendingPropertyOrPath(e,o,!1,!0)&&t._enqueueClient(a)}else{let n=r.evaluator._evaluateBinding(t,h,e,i,o,s);n!==xi&&function(t,e,i,o,r){if(r=function(t,e,i,o){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[o.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,r,i,o),ae&&(r=ae(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,i.target);else{let o=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[o]?(!e[_i.READ_ONLY]||!e[_i.READ_ONLY][o])&&e._setPendingProperty(o,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,o,r)}}(t,a,l,h,n)}}function Ri(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),o=e.parts,r=new Array(o.length);for(let t=0;t<o.length;t++)r[t]=o[t].literal;let s=e.target;i[s]=r,e.literal&&"property"==e.kind&&("className"===s&&(t=Ne(t)),t[s]=e.literal)}}function qi(t,e,i){if(i.listenerEvent){let o=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,o,r){let s,n=t.detail,a=n&&n.path;a?(o=Re(i,o,a),s=n&&n.value):s=t.currentTarget[i],s=r?!s:s,(!e[_i.READ_ONLY]||!e[_i.READ_ONLY][o])&&e._setPendingPropertyOrPath(o,s,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}(t,e,i.target,o.source,o.negate)}))}}function $i(t,e,i,o,r,s){let n={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:s=e.static||s&&("object"!=typeof s||s[e.methodName])};for(let r,s=0;s<e.args.length&&(r=e.args[s]);s++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:o,info:n,trigger:r});return s&&t._addPropertyEffect(e.methodName,i,{fn:o,info:n}),n}function Wi(t,e,i,o,r){let s=t._methodHost||t,n=s[r.methodName];if(n){let o=t._marshalArgs(r.args,e,i);return o===xi?xi:n.apply(s,o)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const Vi=[],Ui="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Yi="(?:("+Ui+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Hi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Ui+"\\s*(?:\\(\\s*(?:(?:"+Yi+"(?:,\\s*"+Yi+")*)?)\\)\\s*)?)(?:]]|}})","g");function Gi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Ki(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Vi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Qi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Qi(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},o=e[0];switch("-"===o&&(o=e[1]),o>="0"&&o<="9"&&(o="#"),o){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=je(e),i.structured=Be(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Ji(t,e,i){let o=We(t,i);return void 0===o&&(o=e[i]),o}function Xi(t,e,i,o){const r={indexSplices:o};pe&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),pe&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function Zi(t,e,i,o,r,s){Xi(t,e,i,[{index:o,addedCount:r,removed:s,object:e,type:"splice"}])}const to=we((t=>{const e=yi(hi(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return _i}_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(eo.length){let t=eo[eo.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[_i.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==_i.READ_ONLY);let o=Ai(this,e,!0)[t];o||(o=this[e][t]=[]),o.push(i)}_removePropertyEffect(t,e,i){let o=Ai(this,e,!0)[t],r=o.indexOf(i);r>=0&&o.splice(r,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,_i.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,_i.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,_i.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,_i.COMPUTE)}_setPendingPropertyOrPath(t,e,i,o){if(o||je(Array.isArray(t)?t[0]:t)!==t){if(!o){let i=We(this,t);if(!(t=Ve(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 o=t.__dataLinkedPaths;if(o){let r;for(let s in o){let n=o[s];Le(s,e)?(r=Re(s,n,e),t._setPendingPropertyOrPath(r,i,!0,!0)):Le(n,e)&&(r=Re(n,s,e),t._setPendingPropertyOrPath(r,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=Ne(t)),t[e]=i)}_setPendingProperty(t,e,i){let o=this.__dataHasPaths&&Be(t);return!!this._shouldPropertyChange(t,e,(o?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),o?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(o||this[_i.NOTIFY]&&this[_i.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[_i.READ_ONLY]||!this[_i.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 o,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,o){let r=t[_i.COMPUTE];if(r)if(me){wi++;const s=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[_i.COMPUTE];let o,{counts:r,ready:s,total:n}=function(t){const e=t[ki],i={},o=t[_i.COMPUTE],r=[];let s=0;for(let t in e){const o=e[t];s+=i[t]=o.args.filter((t=>!t.literal)).length+(o.dynamicFn?1:0)}for(let t in o)e[t]||r.push(t);return{counts:i,ready:r,total:s}}(t);for(;o=s.shift();){e.set(o,e.size);const t=i[o];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--r[e]&&s.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)Ni(t,r,n,s,o);let a;for(;a=n.shift();)Bi(t,"",e,0,a)&&Ni(a.methodInfo,r,n,s,o);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let s=e;for(;Si(t,r,s,i,o);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),s=t.__dataPending,t.__dataPending=null}}(this,e,i,r),o=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),Si(this,this[_i.REFLECT],e,i,r),Si(this,this[_i.OBSERVE],e,i,r),o&&function(t,e,i,o,r){let s,n,a=t[_i.NOTIFY],l=wi++;for(let n in e)e[n]&&(a&&zi(t,a,l,n,i,o,r)||r&&Di(t,n,i))&&(s=!0);s&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,o,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[_i.PROPAGATE]&&Si(this,this[_i.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,o){const r=(e,o)=>{Si(this,t.propertyEffects,e,i,o,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,o)};t.runEffects?t.runEffects(r,e,o):r(e,o)}linkPaths(t,e){t=qe(t),e=qe(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=qe(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Xi(this,We(this,t,i),i.path,e)}get(t,e){return We(e||this,t)}set(t,e,i){i?Ve(i,t,e):(!this[_i.READ_ONLY]||!this[_i.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},o=We(this,t,i),r=o.length,s=o.push(...e);return e.length&&Zi(this,o,i.path,r,e.length,[]),s}pop(t){let e={path:""},i=We(this,t,e),o=!!i.length,r=i.pop();return o&&Zi(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...o){let r,s={path:""},n=We(this,t,s);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?n.splice(e):n.splice(e,i,...o),(o.length||r.length)&&Zi(this,n,s.path,e,o.length,r),r}shift(t){let e={path:""},i=We(this,t,e),o=!!i.length,r=i.shift();return o&&Zi(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},o=We(this,t,i),r=o.unshift(...e);return e.length&&Zi(this,o,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let o={path:""};e=We(this,t,o),i=o.path}else i=Array.isArray(t)?qe(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,_i.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 o={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,_i.OBSERVE,{fn:Ii,info:o,trigger:{name:t}}),i&&this._addPropertyEffect(e,_i.OBSERVE,{fn:Ii,info:o,trigger:{name:e}})}_createMethodObserver(t,e){let i=Ki(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");$i(this,i,_i.OBSERVE,Wi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,_i.NOTIFY,{fn:Ei,info:{eventName:Ke(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,_i.REFLECT,{fn:Pi,info:{attrName:e}})}_createComputedProperty(t,e,i){let o=Ki(e);if(!o)throw new Error("Malformed computed expression '"+e+"'");const r=$i(this,o,_i.COMPUTE,Bi,t,i);Ai(this,ki)[t]=r}_marshalArgs(t,e,i){const o=this.__data,r=[];for(let s=0,n=t.length;s<n;s++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[s];if(!c)if(l){const t=Le(n,e),r=Ji(o,i,t?e:n);h={path:t?e:n,value:r,base:t?We(o,n):r}}else h=a?Ji(o,i,n):o[n];if(pe&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return xi;r[s]=h}return r}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),o=this.__preBoundTemplateInfo==i;if(!o)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=o,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,o=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=o,o?o.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 o=t.propertyEffects=t.propertyEffects||{};(o[e]=o[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),eo.push(this);let i=super._stampTemplate(t,e);if(eo.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:o}=e;if(o.length)for(let e=0;e<o.length;e++){let r=i[e],s=o[e].bindings;if(s)for(let e=0;e<s.length;e++){let i=s[e];Ri(r,i),qi(r,t,i)}r.__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:o,parent:r}=e;i?i.nextSibling=o:r&&(r.firstChild=o),o?o.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let s=e.childNodes;for(let t=0;t<s.length;t++){let e=s[t];Ne(Ne(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,o){let r=e._parseTemplateNode.call(this,t,i,o);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Gi(e)||" ",ji(this,i,o,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,o,r,s){let n=this._parseBindings(s,i);if(n){let e=r,s="property";Ci.test(r)?s="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),s="attribute");let a=Gi(n);return a&&"attribute"==s&&("class"==r&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(r)),t.setAttribute(r,a)),"attribute"==s&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===s&&(r=Ge(r)),ji(this,i,o,s,r,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,o,r,s)}static _parseTemplateNestedTemplate(t,i,o){let r=e._parseTemplateNestedTemplate.call(this,t,i,o);const s=t.parentNode,n=o.templateInfo,a="dom-if"===s.localName;ve&&(a||"dom-repeat"===s.localName)&&(s.removeChild(t),(o=o.parentInfo).templateInfo=n,o.noted=!0,r=!1);let l=n.hostProps;if(fe&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ve||(o.parentInfo.noted=!0));else{let t="{";for(let e in l)ji(this,i,o,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,o=[],r=0;for(;null!==(i=Hi.exec(t));){i.index>r&&o.push({literal:t.slice(r,i.index)});let s=i[1][0],n=!!i[2],a=i[3].trim(),l=!1,h="",c=-1;"{"==s&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=Ki(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let o=e.dynamicFns;(o&&o[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);o.push({source:a,mode:s,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),r=Hi.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&o.push({literal:e})}return o.length?o:null}static _evaluateBinding(t,e,i,o,r,s){let n;return n=e.signature?Wi(t,i,o,0,e.signature):i!=e.source?We(t,e.source):s&&Be(i)?We(t,i):t.__data[i],e.negate&&(n=!n),n}}})),eo=[],io=we((t=>{const e=si(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?e:null}function o(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 wi=0;const xi=[],_i={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ki="__computeInfo",Ci=/[A-Z]/;function Ai(t,e,i){let o=t[e];if(o){if(!t.hasOwnProperty(e)&&(o=t[e]=Object.create(t[e]),i))for(let t in o){let e=o[t],i=o[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else o=t[e]={};return o}function Si(t,e,i,o,r,s){if(e){let n=!1;const a=wi++;for(let l in i){let h=e[r?je(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==a)&&(!r||Ti(l,e.trigger))&&(e.info&&(e.info.lastRun=a),e.fn(t,l,i,o,e.info,r,s),n=!0)}return n}return!1}function zi(t,e,i,o,r,s,n,a){let l=!1,h=e[n?je(o):o];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==i)&&(!n||Ti(o,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,o,r,s,e.info,n,a),l=!0);return l}function Ti(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Fe(i,t))||!(!e.wildcard||!Le(i,t))}return!0}function Di(t,e,i,o,r){let s="string"==typeof r.method?t[r.method]:r.method,n=r.property;s?s.call(t,t.__data[n],o[n]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function Ii(t,e,i){let o=je(e);return o!==e&&(Mi(t,Ke(o)+"-changed",i[e],e),!0)}function Mi(t,e,i,o){let r={value:i,queueProperty:!0};o&&(r.path=o),Ne(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function Ei(t,e,i,o,r,s){let n=(s?je(e):e)!=e?e:null,a=n?Ve(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),Mi(t,r.eventName,a,n)}function Pi(t,e,i,o,r){let s=t.__data[e];ae&&(s=ae(s,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,s)}const Oi=(t,e,i)=>{let o=0,r=e.length-1,s=-1;for(;o<=r;){const n=o+r>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)o=n+1;else{if(!(a>0)){s=n;break}r=n-1}}s<0&&(s=r+1),e.splice(s,0,t)},Ni=(t,e,i,o,r)=>{const s=e[r?je(t):t];if(s)for(let e=0;e<s.length;e++){const n=s[e];n.info.lastRun!==wi&&(!r||Ti(t,n.trigger))&&(n.info.lastRun=wi,Oi(n.info,i,o))}};function Bi(t,e,i,o,r){let s=Vi(t,e,i,0,r);if(s===xi)return!1;let n=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,s,!0):(t[n]=s,!1)}function ji(t,e,i,o,r,s,n){i.bindings=i.bindings||[];let a={kind:o,target:r,parts:s,literal:n,isCompound:1!==s.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||Ke(r)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let o=a.parts[i];o.compoundIndex=i,Fi(t,e,a,o,l)}}function Fi(t,e,i,o,r){if(!o.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 s=o.dependencies,n={index:r,binding:i,part:o,evaluator:t};for(let i=0;i<s.length;i++){let o=s[i];"string"==typeof o&&(o=Qi(o),o.wildcard=!0),t._addTemplatePropertyEffect(e,o.rootProperty,{fn:Li,info:n,trigger:o})}}}function Li(t,e,i,o,r,s,n){let a=n[r.index],l=r.binding,h=r.part;if(s&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let o=i[e];e=Re(h.source,l.target,e),a._setPendingPropertyOrPath(e,o,!1,!0)&&t._enqueueClient(a)}else{let n=r.evaluator._evaluateBinding(t,h,e,i,o,s);n!==xi&&function(t,e,i,o,r){if(r=function(t,e,i,o){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[o.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,r,i,o),ae&&(r=ae(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,i.target);else{let o=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[o]?(!e[_i.READ_ONLY]||!e[_i.READ_ONLY][o])&&e._setPendingProperty(o,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,o,r)}}(t,a,l,h,n)}}function Ri(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),o=e.parts,r=new Array(o.length);for(let t=0;t<o.length;t++)r[t]=o[t].literal;let s=e.target;i[s]=r,e.literal&&"property"==e.kind&&("className"===s&&(t=Ne(t)),t[s]=e.literal)}}function qi(t,e,i){if(i.listenerEvent){let o=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,o,r){let s,n=t.detail,a=n&&n.path;a?(o=Re(i,o,a),s=n&&n.value):s=t.currentTarget[i],s=r?!s:s,(!e[_i.READ_ONLY]||!e[_i.READ_ONLY][o])&&e._setPendingPropertyOrPath(o,s,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}(t,e,i.target,o.source,o.negate)}))}}function $i(t,e,i,o,r,s){let n={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:s=e.static||s&&("object"!=typeof s||s[e.methodName])};for(let r,s=0;s<e.args.length&&(r=e.args[s]);s++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:o,info:n,trigger:r});return s&&t._addPropertyEffect(e.methodName,i,{fn:o,info:n}),n}function Vi(t,e,i,o,r){let s=t._methodHost||t,n=s[r.methodName];if(n){let o=t._marshalArgs(r.args,e,i);return o===xi?xi:n.apply(s,o)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const Wi=[],Ui="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Yi="(?:("+Ui+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Hi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Ui+"\\s*(?:\\(\\s*(?:(?:"+Yi+"(?:,\\s*"+Yi+")*)?)\\)\\s*)?)(?:]]|}})","g");function Gi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Ki(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Wi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Qi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Qi(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},o=e[0];switch("-"===o&&(o=e[1]),o>="0"&&o<="9"&&(o="#"),o){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=je(e),i.structured=Be(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Ji(t,e,i){let o=Ve(t,i);return void 0===o&&(o=e[i]),o}function Xi(t,e,i,o){const r={indexSplices:o};pe&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),pe&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function Zi(t,e,i,o,r,s){Xi(t,e,i,[{index:o,addedCount:r,removed:s,object:e,type:"splice"}])}const to=we((t=>{const e=yi(hi(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return _i}_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(eo.length){let t=eo[eo.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[_i.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==_i.READ_ONLY);let o=Ai(this,e,!0)[t];o||(o=this[e][t]=[]),o.push(i)}_removePropertyEffect(t,e,i){let o=Ai(this,e,!0)[t],r=o.indexOf(i);r>=0&&o.splice(r,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,_i.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,_i.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,_i.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,_i.COMPUTE)}_setPendingPropertyOrPath(t,e,i,o){if(o||je(Array.isArray(t)?t[0]:t)!==t){if(!o){let i=Ve(this,t);if(!(t=We(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 o=t.__dataLinkedPaths;if(o){let r;for(let s in o){let n=o[s];Le(s,e)?(r=Re(s,n,e),t._setPendingPropertyOrPath(r,i,!0,!0)):Le(n,e)&&(r=Re(n,s,e),t._setPendingPropertyOrPath(r,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=Ne(t)),t[e]=i)}_setPendingProperty(t,e,i){let o=this.__dataHasPaths&&Be(t);return!!this._shouldPropertyChange(t,e,(o?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),o?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(o||this[_i.NOTIFY]&&this[_i.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[_i.READ_ONLY]||!this[_i.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 o,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,o){let r=t[_i.COMPUTE];if(r)if(me){wi++;const s=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[_i.COMPUTE];let o,{counts:r,ready:s,total:n}=function(t){const e=t[ki],i={},o=t[_i.COMPUTE],r=[];let s=0;for(let t in e){const o=e[t];s+=i[t]=o.args.filter((t=>!t.literal)).length+(o.dynamicFn?1:0)}for(let t in o)e[t]||r.push(t);return{counts:i,ready:r,total:s}}(t);for(;o=s.shift();){e.set(o,e.size);const t=i[o];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--r[e]&&s.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)Ni(t,r,n,s,o);let a;for(;a=n.shift();)Bi(t,"",e,0,a)&&Ni(a.methodInfo,r,n,s,o);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let s=e;for(;Si(t,r,s,i,o);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),s=t.__dataPending,t.__dataPending=null}}(this,e,i,r),o=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),Si(this,this[_i.REFLECT],e,i,r),Si(this,this[_i.OBSERVE],e,i,r),o&&function(t,e,i,o,r){let s,n,a=t[_i.NOTIFY],l=wi++;for(let n in e)e[n]&&(a&&zi(t,a,l,n,i,o,r)||r&&Ii(t,n,i))&&(s=!0);s&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,o,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[_i.PROPAGATE]&&Si(this,this[_i.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,o){const r=(e,o)=>{Si(this,t.propertyEffects,e,i,o,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,o)};t.runEffects?t.runEffects(r,e,o):r(e,o)}linkPaths(t,e){t=qe(t),e=qe(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=qe(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Xi(this,Ve(this,t,i),i.path,e)}get(t,e){return Ve(e||this,t)}set(t,e,i){i?We(i,t,e):(!this[_i.READ_ONLY]||!this[_i.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},o=Ve(this,t,i),r=o.length,s=o.push(...e);return e.length&&Zi(this,o,i.path,r,e.length,[]),s}pop(t){let e={path:""},i=Ve(this,t,e),o=!!i.length,r=i.pop();return o&&Zi(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...o){let r,s={path:""},n=Ve(this,t,s);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?n.splice(e):n.splice(e,i,...o),(o.length||r.length)&&Zi(this,n,s.path,e,o.length,r),r}shift(t){let e={path:""},i=Ve(this,t,e),o=!!i.length,r=i.shift();return o&&Zi(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},o=Ve(this,t,i),r=o.unshift(...e);return e.length&&Zi(this,o,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let o={path:""};e=Ve(this,t,o),i=o.path}else i=Array.isArray(t)?qe(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,_i.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 o={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,_i.OBSERVE,{fn:Di,info:o,trigger:{name:t}}),i&&this._addPropertyEffect(e,_i.OBSERVE,{fn:Di,info:o,trigger:{name:e}})}_createMethodObserver(t,e){let i=Ki(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");$i(this,i,_i.OBSERVE,Vi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,_i.NOTIFY,{fn:Ei,info:{eventName:Ke(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,_i.REFLECT,{fn:Pi,info:{attrName:e}})}_createComputedProperty(t,e,i){let o=Ki(e);if(!o)throw new Error("Malformed computed expression '"+e+"'");const r=$i(this,o,_i.COMPUTE,Bi,t,i);Ai(this,ki)[t]=r}_marshalArgs(t,e,i){const o=this.__data,r=[];for(let s=0,n=t.length;s<n;s++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[s];if(!c)if(l){const t=Le(n,e),r=Ji(o,i,t?e:n);h={path:t?e:n,value:r,base:t?Ve(o,n):r}}else h=a?Ji(o,i,n):o[n];if(pe&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return xi;r[s]=h}return r}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),o=this.__preBoundTemplateInfo==i;if(!o)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=o,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,o=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=o,o?o.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 o=t.propertyEffects=t.propertyEffects||{};(o[e]=o[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),eo.push(this);let i=super._stampTemplate(t,e);if(eo.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:o}=e;if(o.length)for(let e=0;e<o.length;e++){let r=i[e],s=o[e].bindings;if(s)for(let e=0;e<s.length;e++){let i=s[e];Ri(r,i),qi(r,t,i)}r.__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:o,parent:r}=e;i?i.nextSibling=o:r&&(r.firstChild=o),o?o.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let s=e.childNodes;for(let t=0;t<s.length;t++){let e=s[t];Ne(Ne(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,o){let r=e._parseTemplateNode.call(this,t,i,o);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Gi(e)||" ",ji(this,i,o,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,o,r,s){let n=this._parseBindings(s,i);if(n){let e=r,s="property";Ci.test(r)?s="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),s="attribute");let a=Gi(n);return a&&"attribute"==s&&("class"==r&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(r)),t.setAttribute(r,a)),"attribute"==s&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===s&&(r=Ge(r)),ji(this,i,o,s,r,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,o,r,s)}static _parseTemplateNestedTemplate(t,i,o){let r=e._parseTemplateNestedTemplate.call(this,t,i,o);const s=t.parentNode,n=o.templateInfo,a="dom-if"===s.localName;ve&&(a||"dom-repeat"===s.localName)&&(s.removeChild(t),(o=o.parentInfo).templateInfo=n,o.noted=!0,r=!1);let l=n.hostProps;if(fe&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ve||(o.parentInfo.noted=!0));else{let t="{";for(let e in l)ji(this,i,o,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,o=[],r=0;for(;null!==(i=Hi.exec(t));){i.index>r&&o.push({literal:t.slice(r,i.index)});let s=i[1][0],n=!!i[2],a=i[3].trim(),l=!1,h="",c=-1;"{"==s&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=Ki(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let o=e.dynamicFns;(o&&o[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);o.push({source:a,mode:s,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),r=Hi.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&o.push({literal:e})}return o.length?o:null}static _evaluateBinding(t,e,i,o,r,s){let n;return n=e.signature?Vi(t,i,o,0,e.signature):i!=e.source?Ve(t,e.source):s&&Be(i)?Ve(t,i):t.__data[i],e.negate&&(n=!n),n}}})),eo=[],io=we((t=>{const e=si(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?e:null}function o(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 o=t[i];e[i]="function"==typeof o?{type:o}:o}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class r 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=o(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,o(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 r})),oo=window.ShadyCSS&&window.ShadyCSS.cssBuild,ro=we((t=>{const e=io(to(t));function i(t,e,i,o){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,o)),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,o[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):ce||(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 o=0;o<t.length;o++)i._createMethodObserver(t[o],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&&(!le||he)&&(e=Ae.import(t,"template"),le&&!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=oe(t.url);else{const t=Ae.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=ne,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 o=e[i];"value"in o&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=o)}}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 ie(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,o){if(!oo){const r=e.content.querySelectorAll("style"),s=Pe(e),n=function(t){let e=
|
|
988
|
+
function(t){const e={};for(let i in t){const o=t[i];e[i]="function"==typeof o?{type:o}:o}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class r 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=o(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,o(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 r})),oo=window.ShadyCSS&&window.ShadyCSS.cssBuild,ro=we((t=>{const e=io(to(t));function i(t,e,i,o){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,o)),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,o[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):ce||(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 o=0;o<t.length;o++)i._createMethodObserver(t[o],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&&(!le||he)&&(e=Ae.import(t,"template"),le&&!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=oe(t.url);else{const t=Ae.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=ne,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 o=e[i];"value"in o&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=o)}}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 ie(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,o){if(!oo){const r=e.content.querySelectorAll("style"),s=Pe(e),n=function(t){let e=De(t);return e?Oe(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let r=n[i];r.textContent=t._processStyleText(r.textContent,o),e.content.insertBefore(r,a)}let l=0;for(let e=0;e<s.length;e++){let i=s[e],n=r[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,o)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),ge&&oo&&se){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?ee(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=Ne(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])),ue&&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=ee(this.importPath)),ee(t,e)}static _parseTemplateContent(t,i,o){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,o)}static _addTemplatePropertyEffect(t,i,o){return de&&!(i in this._properties)&&!(o.info.part.signature&&o.info.part.signature.static)&&!o.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,o)}}})),so=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class no{constructor(t,e){ho(t,e);const i=e.reduce(((e,i,o)=>e+ao(i)+t[o+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function ao(t){if(t instanceof no)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const lo=function(t,...e){ho(t,e);const i=document.createElement("template");let o=e.reduce(((e,i,o)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof no)return ao(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[o+1]),t[0]);return so&&(o=so.createHTML(o)),i.innerHTML=o,i},ho=(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")},co=ro(HTMLElement),uo=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,po=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.
|
|
@@ -1492,12 +1492,12 @@ 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 Ao=class t{static debounce(e,i,o){return e instanceof t?e._cancelAsync():e=new t,e.setConfig(i,o),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,Co.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Co.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 So(t){Co.add(t)}function zo(){const t=!!Co.size;return Co.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const To=()=>{let t;do{t=zo()}while(t)},
|
|
1495
|
+
*/let Ao=class t{static debounce(e,i,o){return e instanceof t?e._cancelAsync():e=new t,e.setConfig(i,o),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,Co.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Co.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 So(t){Co.add(t)}function zo(){const t=!!Co.size;return Co.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const To=()=>{let t;do{t=zo()}while(t)},Do=[];
|
|
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
|
|
1500
|
+
*/function Io(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function Mo(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Mo();Do.forEach((e=>{Io(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Eo=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(),Io(this,Mo(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const o=Mo(),r=i===o&&-1===Do.indexOf(this),s=!i&&e&&-1===Do.indexOf(this);r||s?(this.__subscribe(),Io(this,o,i)):i!==o&&e===o&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Do.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(){Do.includes(this)||Do.push(this)}__unsubscribe(){Do.includes(this)&&Do.splice(Do.indexOf(this),1)}}
|
|
1501
1501
|
/**
|
|
1502
1502
|
* @license
|
|
1503
1503
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1523,12 +1523,12 @@ class Ro{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this.
|
|
|
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
|
|
1526
|
+
*/class Vo extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${$o()}`}constructor(t,e,i,o={}){super();const{initializer:r,multiple:s,observe:n,useUniqueId:a,uniqueIdPrefix:l}=o;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof s&&s,this.slotInitializer=r,s&&(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 o=this.defaultNode;return!o&&i&&(o=document.createElement(i),o instanceof Element&&(""!==e&&o.setAttribute("slot",e),this.defaultNode=o)),o&&(this.node=o,t.appendChild(o)),o}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 Ro(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],o=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)}))),o&&o.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...o].filter((t=>t!==this.defaultNode)),o.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=o[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
|
|
1531
|
+
*/class Wo extends Vo{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.
|
|
@@ -1552,7 +1552,7 @@ 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 kr=!1;function Cr(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function Ar(){return kr}function Sr(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 zr(t,e){const i=Math.max(t.tabIndex,0),o=Math.max(e.tabIndex,0);return 0===i||0===o?o>i:i>o}function Tr(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;)zr(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(Tr(t.slice(0,i)),Tr(t.slice(i)))}function
|
|
1555
|
+
*/let kr=!1;function Cr(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function Ar(){return kr}function Sr(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 zr(t,e){const i=Math.max(t.tabIndex,0),o=Math.max(e.tabIndex,0);return 0===i||0===o?o>i:i>o}function Tr(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;)zr(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(Tr(t.slice(0,i)),Tr(t.slice(i)))}function Dr(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||Sr(t)}function Ir(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 Mr(t){return t.getRootNode().activeElement===t}function Er(t,e){if(t.nodeType!==Node.ELEMENT_NODE||Sr(t))return!1;const i=t,o=function(t){if(!Ir(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let r=o>0;o>=0&&e.push(i);let s=[];return s="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...s].forEach((t=>{r=Er(t,e)||r})),r}window.addEventListener("keydown",(()=>{kr=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{kr=!1}),{capture:!0});
|
|
1556
1556
|
/**
|
|
1557
1557
|
* @license
|
|
1558
1558
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1568,13 +1568,13 @@ const Pr=we((t=>class extends t{get _keyboardActive(){return Ar()}ready(){this.a
|
|
|
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 Rr(t){return Lr.has(t)||Lr.set(t,new WeakMap),Lr.get(t)}function qr(t,e){t&&t.removeAttribute(e)}function $r(t,e){if(!t||!e)return;const i=Rr(e);if(i.has(t))return;const o=jo(t.getAttribute(e));i.set(t,new Set(o))}function
|
|
1571
|
+
*/function Rr(t){return Lr.has(t)||Lr.set(t,new WeakMap),Lr.get(t)}function qr(t,e){t&&t.removeAttribute(e)}function $r(t,e){if(!t||!e)return;const i=Rr(e);if(i.has(t))return;const o=jo(t.getAttribute(e));i.set(t,new Set(o))}function Vr(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:o,oldId:r,fromUser:s}=i,n=Rr(e),a=n.get(t);if(!s&&a)return r&&a.delete(r),void(o&&a.add(o));s&&(a?o||n.delete(t):$r(t,e),qr(t,e)),function(t,e,i){const o=jo(t.getAttribute(e));o.delete(i),0!==o.size?t.setAttribute(e,Fo(o)):t.removeAttribute(e)}(t,e,r);const l=o||Fo(a);l&&Lo(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
|
|
1577
|
+
class Wr{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){$r(t,e),qr(t,e)}(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=Rr(e),o=i.get(t);o&&0!==o.size?Lo(t,e,Fo(o)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){Vr(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){Vr(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){Vr(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.
|
|
@@ -1589,7 +1589,7 @@ class Vr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
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
|
-
*/Yr.style.position="fixed",Yr.style.clip="rect(0px, 0px, 0px, 0px)",Yr.setAttribute("aria-live","polite"),document.body.appendChild(Yr);class Kr extends
|
|
1592
|
+
*/Yr.style.position="fixed",Yr.style.clip="rect(0px, 0px, 0px, 0px)",Yr.setAttribute("aria-live","polite"),document.body.appendChild(Yr);class Kr extends Vo{constructor(t,e,i,o={}){super(t,e,i,y(g({},o),{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.
|
|
@@ -1609,7 +1609,7 @@ class Vr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
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 Zr=we((t=>class extends(Ur(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Xr(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)}})),ts=we((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}})),es=t=>class extends(ts(Zr(Ur(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
|
|
1612
|
+
*/const Zr=we((t=>class extends(Ur(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Xr(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)}})),ts=we((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}})),es=t=>class extends(ts(Zr(Ur(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 Wr(this),this._helperController=new Jr(this),this._errorController=new Qr(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,7 +1619,7 @@ class Vr{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 is extends
|
|
1622
|
+
*/class is extends Vo{constructor(t,e,i={}){const{uniqueIdPrefix:o}=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:o})}}
|
|
1623
1623
|
/**
|
|
1624
1624
|
* @license
|
|
1625
1625
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1640,7 +1640,7 @@ class Vr{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
|
-
|
|
1643
|
+
Vt("vaadin-checkbox",D`
|
|
1644
1644
|
:host {
|
|
1645
1645
|
display: inline-block;
|
|
1646
1646
|
}
|
|
@@ -1744,13 +1744,13 @@ Wt("vaadin-checkbox",I`
|
|
|
1744
1744
|
</div>
|
|
1745
1745
|
</div>
|
|
1746
1746
|
<slot name="tooltip"></slot>
|
|
1747
|
-
`}ready(){super.ready(),this._tooltipController=new
|
|
1747
|
+
`}ready(){super.ready(),this._tooltipController=new Wo(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}_(ss);
|
|
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 ns=
|
|
1753
|
+
const ns=D`
|
|
1754
1754
|
:host {
|
|
1755
1755
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
1756
1756
|
}
|
|
@@ -1811,7 +1811,7 @@ const ns=I`
|
|
|
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
|
-
*/,as=
|
|
1814
|
+
*/,as=D`
|
|
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 ns=I`
|
|
|
1923
1923
|
margin-left: 0;
|
|
1924
1924
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1925
1925
|
}
|
|
1926
|
-
`;
|
|
1926
|
+
`;Vt("",as,{moduleId:"lumo-required-field"}),Vt("vaadin-checkbox-group",[as,ns,D`
|
|
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 ns=I`
|
|
|
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 ls=t=>class extends(es(Pr(wr(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
|
|
1975
|
+
const ls=t=>class extends(es(Pr(wr(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 Wo(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 Ro(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),o=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),o.forEach(this.__unregisterCheckbox);const r=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(r),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 ls=t=>class extends(es(Pr(wr(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
|
-
|
|
1986
|
+
Vt("vaadin-checkbox-group",D`
|
|
1987
1987
|
:host {
|
|
1988
1988
|
display: inline-flex;
|
|
1989
1989
|
}
|
|
@@ -2039,7 +2039,7 @@ Wt("vaadin-checkbox-group",I`
|
|
|
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 cs=
|
|
2042
|
+
const cs=D`
|
|
2043
2043
|
:host {
|
|
2044
2044
|
top: var(--lumo-space-m);
|
|
2045
2045
|
right: var(--lumo-space-m);
|
|
@@ -2104,13 +2104,13 @@ const cs=I`
|
|
|
2104
2104
|
opacity: 1;
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
|
-
`;
|
|
2107
|
+
`;Vt("",cs,{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 ds=
|
|
2113
|
+
const ds=D`
|
|
2114
2114
|
:host([opening]),
|
|
2115
2115
|
:host([closing]) {
|
|
2116
2116
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -2140,7 +2140,7 @@ const ds=I`
|
|
|
2140
2140
|
opacity: 0;
|
|
2141
2141
|
}
|
|
2142
2142
|
}
|
|
2143
|
-
`;
|
|
2143
|
+
`;Vt("",ds,{moduleId:"lumo-menu-overlay-core"});const us=[cs,ds,D`
|
|
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 ds=I`
|
|
|
2202
2202
|
transform: translateY(150%);
|
|
2203
2203
|
}
|
|
2204
2204
|
}
|
|
2205
|
-
`];
|
|
2205
|
+
`];Vt("",us,{moduleId:"lumo-menu-overlay"}),Vt("vaadin-date-picker-overlay",[us,D`
|
|
2206
2206
|
[part='overlay'] {
|
|
2207
2207
|
/*
|
|
2208
2208
|
Width:
|
|
@@ -2247,7 +2247,7 @@ const ds=I`
|
|
|
2247
2247
|
max-height: 70vh;
|
|
2248
2248
|
}
|
|
2249
2249
|
}
|
|
2250
|
-
`],{moduleId:"lumo-date-picker-overlay"});const ps=
|
|
2250
|
+
`],{moduleId:"lumo-date-picker-overlay"});const ps=D`
|
|
2251
2251
|
:host {
|
|
2252
2252
|
/* Sizing */
|
|
2253
2253
|
--lumo-button-size: var(--lumo-size-m);
|
|
@@ -2523,7 +2523,7 @@ const ds=I`
|
|
|
2523
2523
|
margin-left: 0;
|
|
2524
2524
|
margin-right: 0;
|
|
2525
2525
|
}
|
|
2526
|
-
`;
|
|
2526
|
+
`;Vt("vaadin-button",ps,{moduleId:"lumo-button"}),Vt("vaadin-date-picker-year",D`
|
|
2527
2527
|
:host([current]) [part='year-number'] {
|
|
2528
2528
|
color: var(--lumo-primary-text-color);
|
|
2529
2529
|
}
|
|
@@ -2547,7 +2547,7 @@ const ds=I`
|
|
|
2547
2547
|
color: var(--lumo-disabled-text-color);
|
|
2548
2548
|
content: '\\2022';
|
|
2549
2549
|
}
|
|
2550
|
-
`,{moduleId:"lumo-date-picker-year"}),
|
|
2550
|
+
`,{moduleId:"lumo-date-picker-year"}),Vt("vaadin-date-picker-overlay-content",D`
|
|
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 ds=I`
|
|
|
2697
2697
|
padding-left: 50px;
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
2700
|
-
`,{moduleId:"lumo-date-picker-overlay-content"}),
|
|
2700
|
+
`,{moduleId:"lumo-date-picker-overlay-content"}),Vt("vaadin-month-calendar",D`
|
|
2701
2701
|
:host {
|
|
2702
2702
|
-moz-user-select: none;
|
|
2703
2703
|
-webkit-user-select: none;
|
|
@@ -2844,7 +2844,7 @@ const ds=I`
|
|
|
2844
2844
|
:host([disabled]) * {
|
|
2845
2845
|
color: var(--lumo-disabled-text-color) !important;
|
|
2846
2846
|
}
|
|
2847
|
-
`,{moduleId:"lumo-month-calendar"}),
|
|
2847
|
+
`,{moduleId:"lumo-month-calendar"}),Vt("vaadin-input-container",D`
|
|
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 ds=I`
|
|
|
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 ms=
|
|
3031
|
+
const ms=D`
|
|
3032
3032
|
[part$='button'] {
|
|
3033
3033
|
flex: none;
|
|
3034
3034
|
width: 1em;
|
|
@@ -3055,13 +3055,13 @@ const ms=I`
|
|
|
3055
3055
|
font-family: 'lumo-icons';
|
|
3056
3056
|
display: block;
|
|
3057
3057
|
}
|
|
3058
|
-
`;
|
|
3058
|
+
`;Vt("",ms,{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 vs=[as,ms,ns,
|
|
3064
|
+
const vs=[as,ms,ns,D`
|
|
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 vs=[as,ms,ns,I`
|
|
|
3192
3192
|
[part='clear-button']::before {
|
|
3193
3193
|
content: var(--lumo-icons-cross);
|
|
3194
3194
|
}
|
|
3195
|
-
`];
|
|
3195
|
+
`];Vt("",vs,{moduleId:"lumo-input-field-shared-styles"}),Vt("vaadin-date-picker",[vs,D`
|
|
3196
3196
|
[part='toggle-button']::before {
|
|
3197
3197
|
content: var(--lumo-icons-calendar);
|
|
3198
3198
|
}
|
|
@@ -3231,7 +3231,7 @@ const fs=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
|
-
|
|
3234
|
+
Vt("vaadin-input-container",D`
|
|
3235
3235
|
:host {
|
|
3236
3236
|
display: flex;
|
|
3237
3237
|
align-items: center;
|
|
@@ -3306,7 +3306,7 @@ Wt("vaadin-input-container",I`
|
|
|
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 gs=
|
|
3309
|
+
const gs=D`
|
|
3310
3310
|
:host {
|
|
3311
3311
|
z-index: 200;
|
|
3312
3312
|
position: fixed;
|
|
@@ -3379,12 +3379,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
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 Cs=t=>t.test(navigator.userAgent),As=t=>t.test(navigator.platform);Cs(/Android/u),Cs(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),Cs(/Firefox/u);const Ss=As(/^iPad/u)||As(/^Mac/u)&&navigator.maxTouchPoints>1,zs=As(/^iPhone/u)||Ss,Ts=Cs(/^((?!chrome|android).)*safari/iu),
|
|
3382
|
+
*/}const Cs=t=>t.test(navigator.userAgent),As=t=>t.test(navigator.platform);Cs(/Android/u),Cs(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),Cs(/Firefox/u);const Ss=As(/^iPad/u)||As(/^Mac/u)&&navigator.maxTouchPoints>1,zs=As(/^iPhone/u)||Ss,Ts=Cs(/^((?!chrome|android).)*safari/iu),Ds=(()=>{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
|
|
3387
|
+
*/let Is=new WeakMap,Ms=new WeakMap,Es={},Ps=0;const Os=t=>t&&t.nodeType===Node.ELEMENT_NODE,Ns=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},Bs=(t,e=document.body,i="data-aria-hidden")=>{const o=Array.from(Array.isArray(t)?t:[t]);return e&&o.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,o)=>{const r=((t,e)=>Os(t)?e.map((e=>{if(!Os(e))return Ns(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 Ns(e,"is not contained inside",t),null})).filter((t=>!!t)):(Ns(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);Es[i]||(Es[i]=new WeakMap);const s=Es[i],n=[],a=new Set,l=new Set(r),h=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};r.forEach(h);const c=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))c(t);else{const e=t.getAttribute(o),r=null!==e&&"false"!==e,a=(Is.get(t)||0)+1,l=(s.get(t)||0)+1;Is.set(t,a),s.set(t,l),n.push(t),1===a&&r&&Ms.set(t,!0),1===l&&t.setAttribute(i,"true"),r||t.setAttribute(o,"true")}}))};return c(e),a.clear(),Ps+=1,()=>{n.forEach((t=>{const e=Is.get(t)-1,r=s.get(t)-1;Is.set(t,e),s.set(t,r),e||(Ms.has(t)?Ms.delete(t):t.removeAttribute(o)),r||t.removeAttribute(i)})),Ps-=1,Ps||(Is=new WeakMap,Is=new WeakMap,Ms=new WeakMap,Es={})}})(o,e,i,"aria-hidden")
|
|
3388
3388
|
/**
|
|
3389
3389
|
* @license
|
|
3390
3390
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -3409,12 +3409,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
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
|
-
*/,$s=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),
|
|
3412
|
+
*/,$s=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Vs=()=>$s().filter((t=>t.$.overlay)),Ws=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Vs().pop())()}bringToFront(){let t="";const e=$s().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"),Vs().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=Vs();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
|
-
*/,Us=t=>class extends(qs(
|
|
3417
|
+
*/,Us=t=>class extends(qs(Ws(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),zs&&(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,o){const r=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const s=this._oldRenderer!==t,n=void 0!==this._oldRenderer;this._oldRenderer=t;const a=this._oldOpened!==o;this._oldOpened=o,s&&n&&(this.innerHTML="",delete this._$litPart$),o&&t&&(s||a||r)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),ks(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`,o=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",o),delete this[i])};this[i]=o,this.addEventListener("animationend",o)}_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.
|
|
@@ -3429,7 +3429,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
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
|
-
*/,Qs=t=>class extends(Ks(Us(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!
|
|
3432
|
+
*/,Qs=t=>class extends(Ks(Us(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!Ir(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
|
-
|
|
3443
|
+
Vt("vaadin-date-picker-overlay",[gs,D`
|
|
3444
3444
|
[part='overlay'] {
|
|
3445
3445
|
display: flex;
|
|
3446
3446
|
flex: auto;
|
|
@@ -3468,7 +3468,7 @@ Wt("vaadin-date-picker-overlay",[gs,I`
|
|
|
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 Xs=
|
|
3471
|
+
const Xs=D`
|
|
3472
3472
|
:host {
|
|
3473
3473
|
display: inline-block;
|
|
3474
3474
|
position: relative;
|
|
@@ -3538,7 +3538,7 @@ const Xs=I`
|
|
|
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
|
-
*/
|
|
3541
|
+
*/Vt("vaadin-button",Xs,{moduleId:"vaadin-button-styles"});class tn extends(Zs(No(Gt(Ur(co))))){static get is(){return"vaadin-button"}static get template(){return lo`
|
|
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 Xs=I`
|
|
|
3551
3551
|
</span>
|
|
3552
3552
|
</div>
|
|
3553
3553
|
<slot name="tooltip"></slot>
|
|
3554
|
-
`}ready(){super.ready(),this._tooltipController=new
|
|
3554
|
+
`}ready(){super.ready(),this._tooltipController=new Wo(this),this.addController(this._tooltipController)}}function en(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function on(t,e,i=en){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function rn(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function sn(t,e,i,o){let r=!1;return"function"==typeof o&&t&&(r=o(rn(t))),(!e||t>=e)&&(!i||t<=i)&&!r}function nn(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 an(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function ln(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}_(tn);
|
|
3555
3555
|
/**
|
|
3556
3556
|
@license
|
|
3557
3557
|
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 _n=null;function kn(){return _n}kn.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:kn,writable:!0}});const Cn=to(kn),An=wn(Cn),Sn=to(class{});class zn extends Sn{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 o=this.__dataHost.__dataHost;o&&o._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let o=e[i];if(!!t!=!!o.__hideTemplateChildren__)if(o.nodeType===Node.TEXT_NODE)t?(o.__polymerTextContent__=o.textContent,o.textContent=""):o.textContent=o.__polymerTextContent__;else if("slot"===o.localName)if(t)o.__polymerReplaced__=document.createComment("hidden-slot"),Ne(Ne(o).parentNode).replaceChild(o.__polymerReplaced__,o);else{const t=o.__polymerReplaced__;t&&Ne(Ne(t).parentNode).replaceChild(o,t)}else o.style&&(t?(o.__polymerDisplay__=o.style.display,o.style.display="none"):o.style.display=o.__polymerDisplay__);o.__hideTemplateChildren__=t,o._showHideChildren&&o._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 Tn=wn(zn);function
|
|
3624
|
+
let _n=null;function kn(){return _n}kn.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:kn,writable:!0}});const Cn=to(kn),An=wn(Cn),Sn=to(class{});class zn extends Sn{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 o=this.__dataHost.__dataHost;o&&o._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let o=e[i];if(!!t!=!!o.__hideTemplateChildren__)if(o.nodeType===Node.TEXT_NODE)t?(o.__polymerTextContent__=o.textContent,o.textContent=""):o.textContent=o.__polymerTextContent__;else if("slot"===o.localName)if(t)o.__polymerReplaced__=document.createComment("hidden-slot"),Ne(Ne(o).parentNode).replaceChild(o.__polymerReplaced__,o);else{const t=o.__polymerReplaced__;t&&Ne(Ne(t).parentNode).replaceChild(o,t)}else o.style&&(t?(o.__polymerDisplay__=o.style.display,o.style.display="none"):o.style.display=o.__polymerDisplay__);o.__hideTemplateChildren__=t,o._showHideChildren&&o._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 Tn=wn(zn);function Dn(t){let e=t.__dataHost;return e&&e._methodHost||e}function In(t,e){return function(t,i,o){e.call(t.__templatizeOwner,i.substring(6),o[i])}}function Mn(t,e){return function(t,i,o){e.call(t.__templatizeOwner,t,i,o[i])}}function En(t,e,i){if(le&&!Dn(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 o=(e?e.constructor:zn)._parseTemplate(t),r=o.templatizeInstanceClass;r||(r=function(t,e,i){let o=i.mutableData?Tn:zn;En.mixin&&(o=En.mixin(o));let r=class extends o{};return r.prototype.__templatizeOptions=i,r.prototype._bindTemplate(t),function(t,e,i,o){let r=i.hostProps||{};for(let e in o.instanceProps){delete r[e];let i=o.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Mn(0,i)})}if(o.forwardHostProp&&e.__dataHost)for(let e in r)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)}})}(r,t,e,i),r}(t,o,i),o.templatizeInstanceClass=r);const s=Dn(t);!function(t,e,i,o){let r=i.forwardHostProp;if(r&&e.hasHostProps){const s="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(s){let t=i.mutableData?An:Cn;class o extends t{}n=e.templatizeTemplateClass=o}else{const i=t.constructor;class o extends i{}n=e.templatizeTemplateClass=o}let a=e.hostProps;for(let t in a)n.prototype._addPropertyEffect("_host_"+t,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:In(0,r)}),n.prototype._createNotifyingProperty("_host_"+t);de&&o&&function(t,e,i){const o=i.constructor._properties,{propertyEffects:r}=t,{instanceProps:s}=e;for(let t in r)if(!(o[t]||s&&s[t])){const e=r[t];for(let i=0;i<e.length;i++){const{part:o}=e[i].info;if(!o.signature||!o.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,o)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),s)(function(t,e){_n=t,Object.setPrototypeOf(t,e.prototype),new e,_n=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,o,i,s);let n=class extends r{};return n.prototype._methodHost=s,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=o.hostProps,n}
|
|
3625
3625
|
/**
|
|
3626
3626
|
@license
|
|
3627
3627
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3663,7 +3663,7 @@ const Bn=t=>class extends(Pr(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
|
-
|
|
3666
|
+
Vt("vaadin-month-calendar",D`
|
|
3667
3667
|
:host {
|
|
3668
3668
|
display: block;
|
|
3669
3669
|
}
|
|
@@ -3772,7 +3772,7 @@ class Fn{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
|
|
|
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 Ln=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(){pr(this.$.scrollers,"pan-y"),dr(this.$.scrollers,"track",this._track.bind(this)),dr(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),dr(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),dr(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Fn(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new Wo(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),dr(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new Wo(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),dr(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 Wo(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 Wo(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),dr(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,o,r){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,o,r))}__updateCalendars(t,e,i,o,r,s,n,a,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=o,t.isDateDisabled=h,t.focusedDate=s,t.selectedDate=r,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 o=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+o,e)}const o=this._monthScroller.position>i,r=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,s=this._monthScroller.position+r-1<i;o?this._scrollToPosition(i,e):s&&this._scrollToPosition(i-r+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=Ao.debounce(this._debouncer,wo.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(rn(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 o=0;const r=this._monthScroller.position,s=t=>{o||(o=t);const e=t-o;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,r,this._targetPosition-r);this._monthScroller.position=t,window.requestAnimationFrame(s)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:r}})),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(s)}_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 an(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){on(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&&on(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return x(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 x(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{ks(this,(()=>{un(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(nn(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,o=this.isDateDisabled){return sn(t,e,i,o)}_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 Ln=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(){pr(this.$.scrollers,"pan-y"),dr(this.$.scrollers,"track",this._track.bind(this)),dr(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),dr(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),dr(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Fn(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new Vo(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),dr(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new Vo(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),dr(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 Vo(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 Vo(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),dr(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,o,r){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,o,r))}__updateCalendars(t,e,i,o,r,s,n,a,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=o,t.isDateDisabled=h,t.focusedDate=s,t.selectedDate=r,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 o=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+o,e)}const o=this._monthScroller.position>i,r=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,s=this._monthScroller.position+r-1<i;o?this._scrollToPosition(i,e):s&&this._scrollToPosition(i-r+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=Ao.debounce(this._debouncer,wo.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(rn(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 o=0;const r=this._monthScroller.position,s=t=>{o||(o=t);const e=t-o;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,r,this._targetPosition-r);this._monthScroller.position=t,window.requestAnimationFrame(s)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:r}})),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(s)}_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 an(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){on(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&&on(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return x(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 x(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{ks(this,(()=>{un(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(nn(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,o=this.isDateDisabled){return sn(t,e,i,o)}_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 Fn{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
|
-
|
|
3786
|
+
Vt("vaadin-date-picker-overlay-content",D`
|
|
3787
3787
|
:host {
|
|
3788
3788
|
display: flex;
|
|
3789
3789
|
flex-direction: column;
|
|
@@ -3869,17 +3869,17 @@ Wt("vaadin-date-picker-overlay-content",I`
|
|
|
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 qn=new WeakMap,$n=we((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return qn.has(t)||qn.set(t,new Set),qn.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))}))}})),
|
|
3872
|
+
const qn=new WeakMap,$n=we((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return qn.has(t)||qn.set(t,new Set),qn.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))}))}})),Vn=t=>class extends(jr(xr(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(),Ds||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
|
-
*/,
|
|
3877
|
+
*/,Wn=we((t=>class extends(Br(ts(jr(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),o=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():o&&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}})),Un=t=>class extends($n(Nr(Wn(es(Vn(xr(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=Ao.debounce(this._preventInputDebouncer,wo.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
|
-
*/,Yn=
|
|
3882
|
+
*/,Yn=D`
|
|
3883
3883
|
:host {
|
|
3884
3884
|
display: inline-flex;
|
|
3885
3885
|
outline: none;
|
|
@@ -3918,7 +3918,7 @@ const qn=new WeakMap,$n=we((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
|
-
*/,Hn=
|
|
3921
|
+
*/,Hn=D`
|
|
3922
3922
|
[class$='container'] {
|
|
3923
3923
|
display: flex;
|
|
3924
3924
|
flex-direction: column;
|
|
@@ -3931,7 +3931,7 @@ const qn=new WeakMap,$n=we((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
|
-
*/,Gn=[Yn,Hn,
|
|
3934
|
+
*/,Gn=[Yn,Hn,D`
|
|
3935
3935
|
[part='clear-button'] {
|
|
3936
3936
|
display: none;
|
|
3937
3937
|
cursor: default;
|
|
@@ -3959,7 +3959,7 @@ const qn=new WeakMap,$n=we((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
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 Jn=t=>class extends(Kn(Ur(Nr(Vn(xr(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 o,r=i.getMonth(),s=i.getFullYear();if(3===e.length?(r=parseInt(e[0])-1,o=parseInt(e[1]),s=parseInt(e[2]),e[2].length<3&&s>=0&&(s=function(t,e,i=0,o=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 r=e+100*Math.floor(t.getFullYear()/100);return t<new Date(r-50,i,o)?r-=100:t>new Date(r+50,i,o)&&(r+=100),r}(this.referenceDate?ln(this.referenceDate):new Date,s,r,o))):2===e.length?(r=parseInt(e[0])-1,o=parseInt(e[1])):1===e.length&&(o=parseInt(e[0])),void 0!==o)return{day:o,month:r,year:s}},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:zs},_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&&!Ar()&&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 Fn(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Qn(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=ln(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(rn(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||sn(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let o=!0;return this.inputElement&&(this.inputElement.checkValidity?o=this.inputElement.checkValidity():this.inputElement.validate&&(o=this.inputElement.validate())),e&&i&&o}_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,o,r,s){return!t||e&&(!s||r)||i&&r||!o.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="",o="0000",r=t.year;return r<0?(r=-r,i="-",o="000000"):t.year>=1e4&&(i="+",o="000000"),[i+e(r,o),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=ln(t);!t||i?(t?on(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,o,r,s,n,a,l){t&&(t.i18n=e,t.label=i,t.minDate=o,t.maxDate=r,t.focusedDate=s,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 o=this._nativeInput;this._noInput&&o&&(o.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Bs(this._noInput?t:[o,t])}_getInitialPosition(){const t=ln(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||sn(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?nn(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,on(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return ln(t)}}
|
|
3962
|
+
*/const Jn=t=>class extends(Kn(Ur(Nr(Wn(xr(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 o,r=i.getMonth(),s=i.getFullYear();if(3===e.length?(r=parseInt(e[0])-1,o=parseInt(e[1]),s=parseInt(e[2]),e[2].length<3&&s>=0&&(s=function(t,e,i=0,o=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 r=e+100*Math.floor(t.getFullYear()/100);return t<new Date(r-50,i,o)?r-=100:t>new Date(r+50,i,o)&&(r+=100),r}(this.referenceDate?ln(this.referenceDate):new Date,s,r,o))):2===e.length?(r=parseInt(e[0])-1,o=parseInt(e[1])):1===e.length&&(o=parseInt(e[0])),void 0!==o)return{day:o,month:r,year:s}},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:zs},_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&&!Ar()&&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 Fn(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Qn(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=ln(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(rn(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||sn(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let o=!0;return this.inputElement&&(this.inputElement.checkValidity?o=this.inputElement.checkValidity():this.inputElement.validate&&(o=this.inputElement.validate())),e&&i&&o}_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,o,r,s){return!t||e&&(!s||r)||i&&r||!o.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="",o="0000",r=t.year;return r<0?(r=-r,i="-",o="000000"):t.year>=1e4&&(i="+",o="000000"),[i+e(r,o),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=ln(t);!t||i?(t?on(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,o,r,s,n,a,l){t&&(t.i18n=e,t.label=i,t.minDate=o,t.maxDate=r,t.focusedDate=s,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 o=this._nativeInput;this._noInput&&o&&(o.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Bs(this._noInput?t:[o,t])}_getInitialPosition(){const t=ln(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||sn(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?nn(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,on(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return ln(t)}}
|
|
3963
3963
|
/**
|
|
3964
3964
|
* @license
|
|
3965
3965
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3970,7 +3970,7 @@ const qn=new WeakMap,$n=we((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
|
-
|
|
3973
|
+
Vt("vaadin-date-picker",[Gn,D`
|
|
3974
3974
|
:host([opened]) {
|
|
3975
3975
|
pointer-events: auto;
|
|
3976
3976
|
}
|
|
@@ -4025,13 +4025,13 @@ Wt("vaadin-date-picker",[Gn,I`
|
|
|
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 is(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new os(this.inputElement,this._labelController)),this._tooltipController=new
|
|
4028
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new is(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new os(this.inputElement,this._labelController)),this._tooltipController=new Wo(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}}_(Xn),
|
|
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
|
-
|
|
4034
|
+
Vt("vaadin-text-field",vs,{moduleId:"lumo-text-field-styles"});
|
|
4035
4035
|
/**
|
|
4036
4036
|
* @license
|
|
4037
4037
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -4047,7 +4047,7 @@ const Zn=t=>class extends(Un(t)){static get properties(){return{autocomplete:{ty
|
|
|
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
|
-
*/;
|
|
4050
|
+
*/;Vt("vaadin-text-field",Gn,{moduleId:"vaadin-text-field-styles"});class ea extends(ta(Gt(No(co)))){static get is(){return"vaadin-text-field"}static get template(){return lo`
|
|
4051
4051
|
<div class="vaadin-field-container">
|
|
4052
4052
|
<div part="label">
|
|
4053
4053
|
<slot name="label"></slot>
|
|
@@ -4076,7 +4076,7 @@ const Zn=t=>class extends(Un(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
|
|
4079
|
+
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new Wo(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}_(ea),Vt("vaadin-password-field-button",[ps,D`
|
|
4080
4080
|
:host {
|
|
4081
4081
|
position: absolute;
|
|
4082
4082
|
right: 0;
|
|
@@ -4089,7 +4089,7 @@ const Zn=t=>class extends(Un(t)){static get properties(){return{autocomplete:{ty
|
|
|
4089
4089
|
background: transparent;
|
|
4090
4090
|
outline: none;
|
|
4091
4091
|
}
|
|
4092
|
-
`],{moduleId:"lumo-password-field-button"}),
|
|
4092
|
+
`],{moduleId:"lumo-password-field-button"}),Vt("vaadin-password-field",[vs,D`
|
|
4093
4093
|
[part='reveal-button']::before {
|
|
4094
4094
|
content: var(--lumo-icons-eye);
|
|
4095
4095
|
}
|
|
@@ -4113,13 +4113,13 @@ const Zn=t=>class extends(Un(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
|
-
|
|
4116
|
+
Vt("vaadin-password-field-button",Xs,{moduleId:"vaadin-password-field-button-styles"});class ia extends(Zs(Eo(Gt(co)))){static get is(){return"vaadin-password-field-button"}static get template(){return lo``}}_(ia);
|
|
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 oa=t=>class extends($n(wr(Pr(jr(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
|
|
4122
|
+
const oa=t=>class extends($n(wr(Pr(jr(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 Vo(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.
|
|
@@ -4128,7 +4128,7 @@ const oa=t=>class extends($n(wr(Pr(jr(t))))){static get properties(){return{reve
|
|
|
4128
4128
|
<div part="reveal-button" slot="suffix">
|
|
4129
4129
|
<slot name="reveal"></slot>
|
|
4130
4130
|
</div>
|
|
4131
|
-
`;let sa;class na extends(oa(ea)){static get is(){return"vaadin-password-field"}static get template(){if(!sa){sa=super.template.cloneNode(!0);const t=ra.content.querySelector('[part="reveal-button"]');sa.content.querySelector('[part="input-field"]').appendChild(t)}return sa}}_(na);const aa=
|
|
4131
|
+
`;let sa;class na extends(oa(ea)){static get is(){return"vaadin-password-field"}static get template(){if(!sa){sa=super.template.cloneNode(!0);const t=ra.content.querySelector('[part="reveal-button"]');sa.content.querySelector('[part="input-field"]').appendChild(t)}return sa}}_(na);const aa=D`
|
|
4132
4132
|
:host {
|
|
4133
4133
|
display: flex;
|
|
4134
4134
|
align-items: center;
|
|
@@ -4212,7 +4212,7 @@ const oa=t=>class extends($n(wr(Pr(jr(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
|
-
`;
|
|
4215
|
+
`;Vt("vaadin-item",aa,{moduleId:"lumo-item"});const la=D`
|
|
4216
4216
|
:host {
|
|
4217
4217
|
transition: background-color 100ms;
|
|
4218
4218
|
overflow: hidden;
|
|
@@ -4224,13 +4224,13 @@ const oa=t=>class extends($n(wr(Pr(jr(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
|
-
`;
|
|
4227
|
+
`;Vt("vaadin-combo-box-item",[aa,la],{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 ha=
|
|
4233
|
+
const ha=D`
|
|
4234
4234
|
[part~='loader'] {
|
|
4235
4235
|
box-sizing: border-box;
|
|
4236
4236
|
width: var(--lumo-icon-size-s);
|
|
@@ -4272,7 +4272,7 @@ const ha=I`
|
|
|
4272
4272
|
transform: rotate(360deg);
|
|
4273
4273
|
}
|
|
4274
4274
|
}
|
|
4275
|
-
`,ca=
|
|
4275
|
+
`,ca=D`
|
|
4276
4276
|
[part='content'] {
|
|
4277
4277
|
padding: 0;
|
|
4278
4278
|
}
|
|
@@ -4293,7 +4293,7 @@ const ha=I`
|
|
|
4293
4293
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
4294
4294
|
margin-bottom: var(--lumo-space-xs);
|
|
4295
4295
|
}
|
|
4296
|
-
`,da=
|
|
4296
|
+
`,da=D`
|
|
4297
4297
|
[part~='loader'] {
|
|
4298
4298
|
position: absolute;
|
|
4299
4299
|
z-index: 1;
|
|
@@ -4301,12 +4301,12 @@ const ha=I`
|
|
|
4301
4301
|
top: var(--lumo-space-s);
|
|
4302
4302
|
margin-inline: auto 0;
|
|
4303
4303
|
}
|
|
4304
|
-
`;
|
|
4304
|
+
`;Vt("vaadin-combo-box-overlay",[cs,ds,ca,ha,da,D`
|
|
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"}),
|
|
4309
|
+
`],{moduleId:"lumo-combo-box-overlay"}),Vt("vaadin-combo-box",[vs,D`
|
|
4310
4310
|
[part='toggle-button']::before {
|
|
4311
4311
|
content: var(--lumo-icons-dropdown);
|
|
4312
4312
|
}
|
|
@@ -4341,12 +4341,12 @@ const ua=t=>class extends t{static get properties(){return{index:{type:Number},i
|
|
|
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 ma=t=>class extends(Ks(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)&&!
|
|
4344
|
+
const ma=t=>class extends(Ks(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)&&!Ir(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
|
-
*/;
|
|
4349
|
+
*/;Vt("vaadin-combo-box-overlay",[gs,D`
|
|
4350
4350
|
#overlay {
|
|
4351
4351
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
4352
4352
|
}
|
|
@@ -4430,22 +4430,22 @@ function fa(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
|
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 Sa=t=>class extends(
|
|
4433
|
+
const Sa=t=>class extends(Wn(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 za(t,e,i=0){let o=e;for(const e of t.subCaches){const t=e.parentCacheIndex;if(o<=t)break;if(o<=t+e.flatSize)return za(e,o-t-1,i+1);o-=e.flatSize}return{cache:t,item:t.items[o],index:o,page:Math.floor(o/t.pageSize),level:i}}function Ta({getItemId:t},e,i,o=0,r=0){for(let s=0;s<e.items.length;s++){const n=e.items[s];if(n&&t(n)===t(i))return{cache:e,level:o,item:n,index:s,page:Math.floor(s/e.pageSize),subCache:e.getSubCache(s),flatIndex:r+e.getFlatIndex(s)}}for(const s of e.subCaches){const n=Ta({getItemId:t},s,i,o+1,r+e.getFlatIndex(s.parentCacheIndex)+1);if(n)return n}}function
|
|
4438
|
+
*/;function za(t,e,i=0){let o=e;for(const e of t.subCaches){const t=e.parentCacheIndex;if(o<=t)break;if(o<=t+e.flatSize)return za(e,o-t-1,i+1);o-=e.flatSize}return{cache:t,item:t.items[o],index:o,page:Math.floor(o/t.pageSize),level:i}}function Ta({getItemId:t},e,i,o=0,r=0){for(let s=0;s<e.items.length;s++){const n=e.items[s];if(n&&t(n)===t(i))return{cache:e,level:o,item:n,index:s,page:Math.floor(s/e.pageSize),subCache:e.getSubCache(s),flatIndex:r+e.getFlatIndex(s)}}for(const s of e.subCaches){const n=Ta({getItemId:t},s,i,o+1,r+e.getFlatIndex(s.parentCacheIndex)+1);if(n)return n}}function Da(t,[e,...i],o=0){e===1/0&&(e=t.size-1);const r=t.getFlatIndex(e),s=t.getSubCache(e);return s&&s.flatSize>0&&i.length?Da(s,i,o+r+1):o+r}
|
|
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
|
|
4443
|
+
*/class Ia{constructor(t,e,i,o,r){w(this,"context"),w(this,"pageSize"),w(this,"items",[]),w(this,"pendingRequests",{}),w(this,"__subCacheByIndex",{}),w(this,"__size",0),w(this,"__flatSize",0),this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,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 o=i+e;(void 0===this.size||o<this.size)&&(this.items[o]=t)}))}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(t){const e=new Ia(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}=za(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}=za(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 Ma extends EventTarget{constructor(t,{size:e,pageSize:i,isExpanded:o,getItemId:r,isPlaceholder:s,placeholder:n,dataProvider:a,dataProviderParams:l}){super(),w(this,"host"),w(this,"dataProvider"),w(this,"dataProviderParams"),w(this,"pageSize"),w(this,"isExpanded"),w(this,"getItemId"),w(this,"rootCache"),w(this,"placeholder"),w(this,"isPlaceholder"),this.host=t,this.pageSize=i,this.getItemId=r,this.isExpanded=o,this.placeholder=n,this.isPlaceholder=s,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 za(this.rootCache,t)}getItemContext(t){return Ta({getItemId:this.getItemId},this.rootCache,t)}getFlatIndexByPath(t){return
|
|
4448
|
+
*/}}class Ma extends EventTarget{constructor(t,{size:e,pageSize:i,isExpanded:o,getItemId:r,isPlaceholder:s,placeholder:n,dataProvider:a,dataProviderParams:l}){super(),w(this,"host"),w(this,"dataProvider"),w(this,"dataProviderParams"),w(this,"pageSize"),w(this,"isExpanded"),w(this,"getItemId"),w(this,"rootCache"),w(this,"placeholder"),w(this,"isPlaceholder"),this.host=t,this.pageSize=i,this.getItemId=r,this.isExpanded=o,this.placeholder=n,this.isPlaceholder=s,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 za(this.rootCache,t)}getItemContext(t){return Ta({getItemId:this.getItemId},this.rootCache,t)}getFlatIndexByPath(t){return Da(this.rootCache,t)}ensureFlatIndexLoaded(t){const{cache:e,page:i,item:o}=this.getFlatIndexContext(t);this.__isItemLoaded(o)||this.__loadCachePage(e,i)}ensureFlatIndexHierarchy(t){const{cache:e,item:i,index:o}=this.getFlatIndexContext(t);if(this.__isItemLoaded(i)&&this.isExpanded(i)&&!e.getSubCache(o)){const t=e.createSubCache(o);this.__loadCachePage(t,0)}}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(t){return new Ia(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=g(g({},i),this.dataProviderParams()));const o=(r,s)=>{t.pendingRequests[e]===o&&(void 0!==s?t.size=s:i.parentItem&&(t.size=r.length),t.setPage(e,r),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete t.pendingRequests[e],this.dispatchEvent(new CustomEvent("page-loaded")))};t.pendingRequests[e]=o,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(i,o)}__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.
|
|
@@ -4460,12 +4460,12 @@ const Sa=t=>class extends(Vn(t)){static get properties(){return{pattern:{type:St
|
|
|
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 Oa(t){return null!=t}function Na(t,e){return t.findIndex((t=>!(t instanceof ka)&&e(t)))}const Ba=t=>class extends(Kn(Ur(ts(Pr(xr(jr(wr(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),Pa(this),this.addController(new Qn(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,o,r,s,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:o,selectedItem:r,itemIdPath:s,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,o){this._overlayOpened=t&&(o||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&&Mr(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()&&!Is&&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?fa(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?fa(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",(()=>{Is&&!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||(Oa(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,o=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&o>=0&&(this.selectedItem=t[o]);const r=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=r>-1?r: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&&Oa(e)?Na(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Na(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),!(t.detail.item instanceof ka)&&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(Ar())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 Oa(t){return null!=t}function Na(t,e){return t.findIndex((t=>!(t instanceof ka)&&e(t)))}const Ba=t=>class extends(Kn(Ur(ts(Pr(xr(jr(wr(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),Pa(this),this.addController(new Qn(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,o,r,s,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:o,selectedItem:r,itemIdPath:s,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,o){this._overlayOpened=t&&(o||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&&Mr(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()&&!Ds&&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?fa(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?fa(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",(()=>{Ds&&!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||(Oa(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,o=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&o>=0&&(this.selectedItem=t[o]);const r=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=r>-1?r: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&&Oa(e)?Na(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Na(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),!(t.detail.item instanceof ka)&&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(Ar())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
|
-
*/;
|
|
4468
|
+
*/;Vt("vaadin-combo-box",Gn,{moduleId:"vaadin-combo-box-styles"});class ja extends(Ea(Ba(Sa(Un(Gt(No(co))))))){static get is(){return"vaadin-combo-box"}static get template(){return lo`
|
|
4469
4469
|
<style>
|
|
4470
4470
|
:host([opened]) {
|
|
4471
4471
|
pointer-events: auto;
|
|
@@ -4510,7 +4510,7 @@ const Sa=t=>class extends(Vn(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 is(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new os(this.inputElement,this._labelController)),this._tooltipController=new
|
|
4513
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new is(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new os(this.inputElement,this._labelController)),this._tooltipController=new Wo(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)}}_(ja),Vt("vaadin-multi-select-combo-box-chip",[ms,D`
|
|
4514
4514
|
:host {
|
|
4515
4515
|
font-size: var(--lumo-font-size-xxs);
|
|
4516
4516
|
line-height: 1;
|
|
@@ -4599,23 +4599,23 @@ const Sa=t=>class extends(Vn(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"}),
|
|
4602
|
+
`],{moduleId:"lumo-multi-select-combo-box-chip"}),Vt("vaadin-multi-select-combo-box-item",[aa,la,D`
|
|
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"}),
|
|
4609
|
+
`],{moduleId:"lumo-multi-select-combo-box-item"}),Vt("vaadin-multi-select-combo-box-overlay",[cs,ds,ca,ha,da,D`
|
|
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"}),
|
|
4614
|
+
`],{moduleId:"lumo-multi-select-combo-box-overlay"}),Vt("vaadin-multi-select-combo-box-container",D`
|
|
4615
4615
|
:host([auto-expand-vertically]) {
|
|
4616
4616
|
padding-block: var(--lumo-space-xs);
|
|
4617
4617
|
}
|
|
4618
|
-
`,{moduleId:"lumo-multi-select-combo-box-container"}),
|
|
4618
|
+
`,{moduleId:"lumo-multi-select-combo-box-container"}),Vt("vaadin-multi-select-combo-box",[vs,D`
|
|
4619
4619
|
:host([has-value]) {
|
|
4620
4620
|
padding-inline-start: 0;
|
|
4621
4621
|
}
|
|
@@ -4709,7 +4709,7 @@ class Fa extends(Gt(co)){static get is(){return"vaadin-multi-select-combo-box-ch
|
|
|
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
|
-
|
|
4712
|
+
Vt("vaadin-multi-select-combo-box-container",D`
|
|
4713
4713
|
#wrapper {
|
|
4714
4714
|
display: flex;
|
|
4715
4715
|
width: 100%;
|
|
@@ -4739,7 +4739,7 @@ class Ra extends(ua(Gt(Eo(co)))){static get is(){return"vaadin-multi-select-comb
|
|
|
4739
4739
|
<div part="content">
|
|
4740
4740
|
<slot></slot>
|
|
4741
4741
|
</div>
|
|
4742
|
-
`}}_(Ra),
|
|
4742
|
+
`}}_(Ra),Vt("vaadin-multi-select-combo-box-overlay",[gs,D`
|
|
4743
4743
|
#overlay {
|
|
4744
4744
|
width: var(
|
|
4745
4745
|
--vaadin-multi-select-combo-box-overlay-width,
|
|
@@ -4797,7 +4797,7 @@ class $a extends(Ca(co)){static get is(){return"vaadin-multi-select-combo-box-sc
|
|
|
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
|
|
4800
|
+
class Va extends(Ea(Ba(Gt(co)))){static get is(){return"vaadin-multi-select-combo-box-internal"}static get template(){return lo`
|
|
4801
4801
|
<style>
|
|
4802
4802
|
:host([opened]) {
|
|
4803
4803
|
pointer-events: auto;
|
|
@@ -4815,18 +4815,18 @@ class Wa extends(Ea(Ba(Gt(co)))){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 ka||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()}}_(
|
|
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 ka||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()}}_(Va);
|
|
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
|
|
4824
|
+
const Wa=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resizables?t.target.resizables.forEach((e=>{e._onResize(t.contentRect)})):t.target._onResize(t.contentRect)}))}))})),Ua=we((t=>class extends t{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),Wa.observe(this),this._observeParent){const t=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;t.resizables||(t.resizables=new Set,Wa.observe(t)),t.resizables.add(this),this.__parent=t}}disconnectedCallback(){super.disconnectedCallback(),Wa.unobserve(this);const t=this.__parent;if(this._observeParent&&t){const e=t.resizables;e&&(e.delete(this),0===e.size&&Wa.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
|
-
*/
|
|
4829
|
+
*/Vt("vaadin-multi-select-combo-box",[Gn,D`
|
|
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);
|
|
@@ -4935,7 +4935,7 @@ const Va=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 is(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new os(this.inputElement,this._labelController)),this._tooltipController=new Vo(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 Wo(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(),Pa(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),Gr(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 o=0;o<e.length;o++)if(e[o]&&e[o][i]===t[i])return o;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 o=e?"selected":"deselected",r=this.i18n.total.replace("{count}",i||0);Gr(`${t} ${this.i18n[o]} ${r}`)}__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),o=this._getItemLabel(t);let r=!1;if(-1!==i){const t=this._lastFilter;if(t&&t.toLowerCase()===o.toLowerCase())return void this.__clearInternalValue();e.splice(i,1)}else e.push(t),r=!0;this.__updateSelection(e),this.__clearInternalValue(),this.__announceItem(o,r,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),o=t.clientWidth+parseInt(i.marginInlineStart);return t.setAttribute("count",e),t.setAttribute("hidden",""),t.style.visibility="",o}__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 o=e-i;t.length>1&&(o-=this.__getOverflowWidth());const r=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const e=[];for(let i=t.length-1,o=null;i>=0;i--){const r=this.__createChip(t[i]);this.insertBefore(r,o),o=r,e.unshift(r)}const s=[];if(!this.autoExpandVertically&&this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth<i){for(;e.length>1;){e.pop().remove(),s.unshift(t.pop());const o=s.length>0?i+this.__getOverflowWidth():i;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=o)break}1===e.length&&(e[0].style.maxWidth=`${Math.max(r,o)}px`)}this._overflowItems=s}else{for(let e=t.length-1,i=null;e>=0;e--){const s=this.__createChip(t[e]);if(this.insertBefore(s,i),!this.autoExpandVertically&&this.$.chips.clientWidth>o){if(null!==i){s.remove();break}s.style.maxWidth=`${Math.max(r,o)}px`}t.pop(),i=s}this._overflowItems=t}}__updateOverflowChip(t,e,i,o){if(t){const r=e.length;t.label=`${r}`,t.setAttribute("count",`${r}`),t.setAttribute("title",this._mergeItemLabels(e)),t.toggleAttribute("hidden",0===r),t.disabled=i,t.readonly=o}}_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 o;-1!==i&&e.preventDefault(),this.__isRTL?i===t.length-1?o=-1:i>-1&&(o=i+1):-1===i?o=t.length-1:i>0&&(o=i-1),void 0!==o&&(this._focusedChipIndex=o)}_onArrowRight(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let o;-1!==i&&e.preventDefault(),this.__isRTL?-1===i?o=t.length-1:i>0&&(o=i-1):i===t.length-1?o=-1:i>-1&&(o=i+1),void 0!==o&&(this._focusedChipIndex=o)}_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&&Gr(`${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()}}_(Ya),Wt("vaadin-notification-card",I`
|
|
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 is(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new os(this.inputElement,this._labelController)),this._tooltipController=new Wo(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 Vo(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(),Pa(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),Gr(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 o=0;o<e.length;o++)if(e[o]&&e[o][i]===t[i])return o;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 o=e?"selected":"deselected",r=this.i18n.total.replace("{count}",i||0);Gr(`${t} ${this.i18n[o]} ${r}`)}__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),o=this._getItemLabel(t);let r=!1;if(-1!==i){const t=this._lastFilter;if(t&&t.toLowerCase()===o.toLowerCase())return void this.__clearInternalValue();e.splice(i,1)}else e.push(t),r=!0;this.__updateSelection(e),this.__clearInternalValue(),this.__announceItem(o,r,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),o=t.clientWidth+parseInt(i.marginInlineStart);return t.setAttribute("count",e),t.setAttribute("hidden",""),t.style.visibility="",o}__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 o=e-i;t.length>1&&(o-=this.__getOverflowWidth());const r=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const e=[];for(let i=t.length-1,o=null;i>=0;i--){const r=this.__createChip(t[i]);this.insertBefore(r,o),o=r,e.unshift(r)}const s=[];if(!this.autoExpandVertically&&this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth<i){for(;e.length>1;){e.pop().remove(),s.unshift(t.pop());const o=s.length>0?i+this.__getOverflowWidth():i;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=o)break}1===e.length&&(e[0].style.maxWidth=`${Math.max(r,o)}px`)}this._overflowItems=s}else{for(let e=t.length-1,i=null;e>=0;e--){const s=this.__createChip(t[e]);if(this.insertBefore(s,i),!this.autoExpandVertically&&this.$.chips.clientWidth>o){if(null!==i){s.remove();break}s.style.maxWidth=`${Math.max(r,o)}px`}t.pop(),i=s}this._overflowItems=t}}__updateOverflowChip(t,e,i,o){if(t){const r=e.length;t.label=`${r}`,t.setAttribute("count",`${r}`),t.setAttribute("title",this._mergeItemLabels(e)),t.toggleAttribute("hidden",0===r),t.disabled=i,t.readonly=o}}_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 o;-1!==i&&e.preventDefault(),this.__isRTL?i===t.length-1?o=-1:i>-1&&(o=i+1):-1===i?o=t.length-1:i>0&&(o=i-1),void 0!==o&&(this._focusedChipIndex=o)}_onArrowRight(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let o;-1!==i&&e.preventDefault(),this.__isRTL?-1===i?o=t.length-1:i>0&&(o=i-1):i===t.length-1?o=-1:i>-1&&(o=i+1),void 0!==o&&(this._focusedChipIndex=o)}_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&&Gr(`${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()}}_(Ya),Vt("vaadin-notification-card",D`
|
|
4939
4939
|
:host {
|
|
4940
4940
|
position: relative;
|
|
4941
4941
|
margin: var(--lumo-space-s);
|
|
@@ -5155,7 +5155,7 @@ const Va=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 Ha extends(
|
|
5158
|
+
class Ha extends(Ws(Gt(No(co)))){static get template(){return lo`
|
|
5159
5159
|
<style>
|
|
5160
5160
|
:host {
|
|
5161
5161
|
position: fixed;
|
|
@@ -5251,7 +5251,7 @@ class Ha extends(Vs(Gt(No(co)))){static get template(){return lo`
|
|
|
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 Ka._createAndShowNotification(void 0!==(null==(i=t)?void 0:i._$litType$)?e=>{Tt(t,e)}:e=>{e.innerText=t},e);var i}static _createAndShowNotification(t,e){const i=document.createElement(Ka.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 Ka._container||(Ka._container=document.createElement("vaadin-notification-container"),document.body.appendChild(Ka._container)),Ka._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),Pa(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 o=this._oldRenderer!==t;this._oldRenderer=t,o&&(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)))}}_(Ha),_(Ga),_(Ka);const Qa=
|
|
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 Ka._createAndShowNotification(void 0!==(null==(i=t)?void 0:i._$litType$)?e=>{Tt(t,e)}:e=>{e.innerText=t},e);var i}static _createAndShowNotification(t,e){const i=document.createElement(Ka.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 Ka._container||(Ka._container=document.createElement("vaadin-notification-container"),document.body.appendChild(Ka._container)),Ka._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),Pa(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 o=this._oldRenderer!==t;this._oldRenderer=t,o&&(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)))}}_(Ha),_(Ga),_(Ka);const Qa=D`
|
|
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 Ha extends(Vs(Gt(No(co)))){static get template(){return lo`
|
|
|
5265
5265
|
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
5266
5266
|
background-color: var(--lumo-contrast-10pct);
|
|
5267
5267
|
}
|
|
5268
|
-
`;
|
|
5268
|
+
`;Vt("vaadin-list-box",Qa,{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
|
-
|
|
5274
|
+
Vt("vaadin-select-item",aa,{moduleId:"lumo-select-item"}),Vt("vaadin-select-list-box",Qa,{moduleId:"lumo-select-list-box"}),Vt("vaadin-select",[vs,D`
|
|
5275
5275
|
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
5276
5276
|
text-align: start;
|
|
5277
5277
|
}
|
|
@@ -5314,7 +5314,7 @@ Wt("vaadin-select-item",aa,{moduleId:"lumo-select-item"}),Wt("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"}),
|
|
5317
|
+
`],{moduleId:"lumo-select"}),Vt("vaadin-select-value-button",D`
|
|
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 @@ Wt("vaadin-select-item",aa,{moduleId:"lumo-select-item"}),Wt("vaadin-select-list
|
|
|
5333
5333
|
::slotted(*:hover) {
|
|
5334
5334
|
background-color: transparent;
|
|
5335
5335
|
}
|
|
5336
|
-
`,{moduleId:"lumo-select-value-button"}),
|
|
5336
|
+
`,{moduleId:"lumo-select-value-button"}),Vt("vaadin-select-overlay",[us,D`
|
|
5337
5337
|
:host {
|
|
5338
5338
|
--_lumo-item-selected-icon-display: block;
|
|
5339
5339
|
}
|
|
@@ -5406,12 +5406,12 @@ function Za(t,e){const{scrollLeft:i}=t;return"rtl"!==e?i:t.scrollWidth-t.clientW
|
|
|
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 tl=t=>class extends(xr(t)){get focused(){return(this._getItems()||[]).find(Mr)}get _vertical(){return!0}focus(){const t=this._getItems();if(Array.isArray(t)){const e=this._getAvailableIndex(t,0,null,(t=>!
|
|
5409
|
+
const tl=t=>class extends(xr(t)){get focused(){return(this._getItems()||[]).find(Mr)}get _vertical(){return!0}focus(){const t=this._getItems();if(Array.isArray(t)){const e=this._getAvailableIndex(t,0,null,(t=>!Dr(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()||[],o=i.indexOf(this.focused);let r,s;const n=this._vertical||"rtl"!==this.getAttribute("dir")?1:-1;this.__isPrevKey(e)?(s=-n,r=o-n):this.__isNextKey(e)?(s=n,r=o+n):"Home"===e?(s=1,r=0):"End"===e&&(s=-1,r=i.length-1),r=this._getAvailableIndex(i,r,s,(t=>!Dr(t))),r>=0&&(t.preventDefault(),this._focus(r,!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,o){const r=t.length;let s=e;for(let e=0;"number"==typeof s&&e<r;e+=1,s+=i||1){s<0?s=r-1:s>=r&&(s=0);const e=t[s];if(!e.hasAttribute("disabled")&&this.__isMatchingItem(e,o))return s}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
|
-
*/,el=t=>class extends(tl(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&&!
|
|
5414
|
+
*/,el=t=>class extends(tl(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&&!Dr(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 Ro(t,(()=>{this._setItems(this._filterItems(Bo(this)))}))}_getItems(){return this.items}_enhanceItems(t,e,i,o){if(!o&&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 o=t[i];t.forEach((t=>{t.selected=t===o})),o&&!o.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=Ao.debounce(this._searchReset,wo.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"],o=this._scrollerElement.getBoundingClientRect(),r=(this.items[t+1]||e).getBoundingClientRect(),s=(this.items[t-1]||e).getBoundingClientRect();let n=0;!this._isRTL&&r[i[1]]>=o[i[1]]||this._isRTL&&r[i[1]]<=o[i[1]]?n=r[i[1]]-o[i[1]]:(!this._isRTL&&s[i[0]]<=o[i[0]]||this._isRTL&&s[i[0]]>=o[i[0]])&&(n=s[i[0]]-o[i[0]]),this._scroll(n)}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",i=Za(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.
|
|
@@ -5447,7 +5447,7 @@ const ol=t=>class extends(Ks(Us(Eo(t)))){static get observers(){return["_updateO
|
|
|
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
|
-
*/;
|
|
5450
|
+
*/;Vt("vaadin-select-overlay",[gs,D`
|
|
5451
5451
|
:host {
|
|
5452
5452
|
align-items: flex-start;
|
|
5453
5453
|
justify-content: flex-start;
|
|
@@ -5475,7 +5475,7 @@ const ol=t=>class extends(Ks(Us(Eo(t)))){static get observers(){return["_updateO
|
|
|
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
|
-
|
|
5478
|
+
Vt("vaadin-select-value-button",D`
|
|
5479
5479
|
:host {
|
|
5480
5480
|
display: inline-block;
|
|
5481
5481
|
position: relative;
|
|
@@ -5529,7 +5529,7 @@ Wt("vaadin-select-value-button",I`
|
|
|
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 nl=
|
|
5532
|
+
const nl=D`
|
|
5533
5533
|
.sr-only {
|
|
5534
5534
|
border: 0 !important;
|
|
5535
5535
|
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
@@ -5548,17 +5548,17 @@ const nl=I`
|
|
|
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 al extends
|
|
5551
|
+
*/;class al extends Vo{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 ll=t=>class extends(Kn(Nr(Br(xr(es(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}-${$o()}`,this._srLabelController=new Xr(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 al(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Fn(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new
|
|
5556
|
+
*/const ll=t=>class extends(Kn(Nr(Br(xr(es(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}-${$o()}`,this._srLabelController=new Xr(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 al(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Fn(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new Wo(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),Vr(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,o)=>void 0===t&&e.value===i?o: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 x(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
|
-
*/;
|
|
5561
|
+
*/;Vt("vaadin-select",[Yn,Hn,nl],{moduleId:"vaadin-select-styles"});class hl extends(ll(No(Gt(co)))){static get is(){return"vaadin-select"}static get template(){return lo`
|
|
5562
5562
|
<style>
|
|
5563
5563
|
:host {
|
|
5564
5564
|
position: relative;
|
|
@@ -5611,7 +5611,7 @@ const nl=I`
|
|
|
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(),Pa(this)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}_(hl);const cl=
|
|
5614
|
+
`}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),Pa(this)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}_(hl);const cl=D`
|
|
5615
5615
|
/* Optical centering */
|
|
5616
5616
|
:host::before,
|
|
5617
5617
|
:host::after {
|
|
@@ -5711,7 +5711,7 @@ const nl=I`
|
|
|
5711
5711
|
transform: scale(1.02);
|
|
5712
5712
|
}
|
|
5713
5713
|
}
|
|
5714
|
-
`;
|
|
5714
|
+
`;Vt("vaadin-dialog-overlay",[cs,cl],{moduleId:"lumo-dialog"}),Vt("vaadin-confirm-dialog-overlay",[cs,cl,D`
|
|
5715
5715
|
[part='header'] ::slotted(h3) {
|
|
5716
5716
|
margin-top: 0 !important;
|
|
5717
5717
|
margin-bottom: 0 !important;
|
|
@@ -5757,7 +5757,7 @@ const dl=t=>class extends t{static get properties(){return{opened:{type:Boolean,
|
|
|
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
|
-
*/,ul=
|
|
5760
|
+
*/,ul=D`
|
|
5761
5761
|
[part='header'],
|
|
5762
5762
|
[part='header-content'],
|
|
5763
5763
|
[part='footer'] {
|
|
@@ -5835,7 +5835,7 @@ const dl=t=>class extends t{static get properties(){return{opened:{type:Boolean,
|
|
|
5835
5835
|
outline: 3px solid !important;
|
|
5836
5836
|
}
|
|
5837
5837
|
}
|
|
5838
|
-
`;
|
|
5838
|
+
`;D`
|
|
5839
5839
|
[part='overlay'] {
|
|
5840
5840
|
position: relative;
|
|
5841
5841
|
overflow: visible;
|
|
@@ -5944,7 +5944,7 @@ const dl=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
|
-
|
|
5947
|
+
Vt("vaadin-confirm-dialog-overlay",[gs,ul,D`
|
|
5948
5948
|
:host {
|
|
5949
5949
|
--_vaadin-confirm-dialog-content-width: auto;
|
|
5950
5950
|
--_vaadin-confirm-dialog-content-height: auto;
|
|
@@ -6011,7 +6011,7 @@ Wt("vaadin-confirm-dialog-overlay",[gs,ul,I`
|
|
|
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 fl=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
|
|
6014
|
+
const fl=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 Vo(this,"header","h3",{initializer:t=>{this._headerNode=t}}),this.addController(this._headerController),this._messageController=new Vo(this,"","div",{multiple:!0,observe:!1,initializer:t=>{const e=document.createElement("div");e.style.display="contents";const i=`confirm-dialog-message-${$o()}`;e.id=i,this.appendChild(e),e.appendChild(t),this._messageNodes=[...this._messageNodes,e]}}),this.addController(this._messageController),this._cancelController=new Vo(this,"cancel-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("cancel",t)}}),this.addController(this._cancelController),this._rejectController=new Vo(this,"reject-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("reject",t)}}),this.addController(this._rejectController),this._confirmController=new Vo(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?Vr(t,"aria-describedby",{newId:i,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):e.forEach((e=>{Vr(t,"aria-describedby",{newId:e.id})})),this.__oldAccessibleDescriptionRef=i)}__setupSlottedButton(t,e){const i=`_${t}Button`,o=`__${t}`;this[i]&&this[i]!==e&&this[i].remove(),e.addEventListener("click",this[o]),this[i]=e}__updateCancelButton(t,e,i,o){t&&(t===this._cancelController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!o))}__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,o){t&&(t===this._rejectController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!o))}_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.
|
|
@@ -6043,7 +6043,7 @@ const fl=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)}}_(bl),
|
|
6046
|
+
`}static get is(){return"vaadin-confirm-dialog"}ready(){super.ready(),this._overlayElement=this.$.dialog.$.overlay,this._initOverlay(this._overlayElement)}}_(bl),Vt("vaadin-tab",D`
|
|
6047
6047
|
:host {
|
|
6048
6048
|
box-sizing: border-box;
|
|
6049
6049
|
padding: 0.5rem 0.75rem;
|
|
@@ -6293,7 +6293,7 @@ const gl=t=>class extends(Ja(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
|
-
|
|
6296
|
+
Vt("vaadin-tab",D`
|
|
6297
6297
|
:host {
|
|
6298
6298
|
display: block;
|
|
6299
6299
|
}
|
|
@@ -6315,7 +6315,7 @@ Wt("vaadin-tab",I`
|
|
|
6315
6315
|
`,{moduleId:"vaadin-tab-styles"});class yl extends(No(Gt(gl(Ur(co))))){static get template(){return lo`
|
|
6316
6316
|
<slot></slot>
|
|
6317
6317
|
<slot name="tooltip"></slot>
|
|
6318
|
-
`}static get is(){return"vaadin-tab"}ready(){super.ready(),this._tooltipController=new
|
|
6318
|
+
`}static get is(){return"vaadin-tab"}ready(){super.ready(),this._tooltipController=new Wo(this),this.addController(this._tooltipController)}}_(yl),Vt("vaadin-tabs",D`
|
|
6319
6319
|
:host {
|
|
6320
6320
|
-webkit-tap-highlight-color: transparent;
|
|
6321
6321
|
}
|
|
@@ -6570,7 +6570,7 @@ const wl=t=>class extends(Ua(el(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
|
-
|
|
6573
|
+
Vt("vaadin-tabs",D`
|
|
6574
6574
|
:host {
|
|
6575
6575
|
display: flex;
|
|
6576
6576
|
align-items: center;
|
|
@@ -6654,4 +6654,4 @@ Wt("vaadin-tabs",I`
|
|
|
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"}}function _l(t){return _l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(t)}function kl(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Cl(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Al(t){Cl(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===_l(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}_(xl);var Sl={};function zl(){return Sl}function Tl(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function Il(t,e){return Cl(2,arguments),function(t,e){Cl(2,arguments);var i=Al(t).getTime(),o=kl(e);return new Date(i+o)}(t,-kl(e))}function Dl(t){Cl(1,arguments);var e=Al(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function Ml(t){Cl(1,arguments);var e=Al(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var r=Dl(o),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var n=Dl(s);return e.getTime()>=r.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}function El(t){Cl(1,arguments);var e=Al(t),i=Dl(e).getTime()-function(t){Cl(1,arguments);var e=Ml(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Dl(i)}(e).getTime();return Math.round(i/6048e5)+1}function Pl(t,e){var i,o,r,s,n,a,l,h;Cl(1,arguments);var c=zl(),d=kl(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.weekStartsOn)&&void 0!==s?s:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Al(t),p=u.getUTCDay(),m=(p<d?7:0)+p-d;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Ol(t,e){var i,o,r,s,n,a,l,h;Cl(1,arguments);var c=Al(t),d=c.getUTCFullYear(),u=zl(),p=kl(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:u.firstWeekContainsDate)&&void 0!==o?o:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(d+1,0,p),m.setUTCHours(0,0,0,0);var v=Pl(m,e),f=new Date(0);f.setUTCFullYear(d,0,p),f.setUTCHours(0,0,0,0);var b=Pl(f,e);return c.getTime()>=v.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}function Nl(t,e){Cl(1,arguments);var i=Al(t),o=Pl(i,e).getTime()-function(t,e){var i,o,r,s,n,a,l,h;Cl(1,arguments);var c=zl(),d=kl(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Ol(t,e),p=new Date(0);return p.setUTCFullYear(u,0,d),p.setUTCHours(0,0,0,0),Pl(p,e)}(i,e).getTime();return Math.round(o/6048e5)+1}function Bl(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const jl=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return Bl("yy"===e?o%100:o,e.length)},Fl=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Bl(i+1,2)},Ll=function(t,e){return Bl(t.getUTCDate(),e.length)},Rl=function(t,e){return Bl(t.getUTCHours()%12||12,e.length)},ql=function(t,e){return Bl(t.getUTCHours(),e.length)},$l=function(t,e){return Bl(t.getUTCMinutes(),e.length)},Wl=function(t,e){return Bl(t.getUTCSeconds(),e.length)},Vl=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return Bl(Math.floor(o*Math.pow(10,i-3)),e.length)};function Ul(t,e){var i=t>0?"-":"+",o=Math.abs(t),r=Math.floor(o/60),s=o%60;if(0===s)return i+String(r);var n=e||"";return i+String(r)+n+Bl(s,2)}function Yl(t,e){return t%60==0?(t>0?"-":"+")+Bl(Math.abs(t)/60,2):Hl(t,e)}function Hl(t,e){var i=e||"",o=t>0?"-":"+",r=Math.abs(t);return o+Bl(Math.floor(r/60),2)+i+Bl(r%60,2)}const Gl={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return jl(t,e)},Y:function(t,e,i,o){var r=Ol(t,o),s=r>0?r:1-r;return"YY"===e?Bl(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Bl(s,e.length)},R:function(t,e){return Bl(Ml(t),e.length)},u:function(t,e){return Bl(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Bl(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Bl(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return Fl(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return Bl(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var r=Nl(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Bl(r,e.length)},I:function(t,e,i){var o=El(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Bl(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Ll(t,e)},D:function(t,e,i){var o=function(t){Cl(1,arguments);var e=Al(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Bl(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Bl(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Bl(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Bl(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,r=t.getUTCHours();switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,r=t.getUTCHours();switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return Rl(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ql(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Bl(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Bl(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):$l(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Wl(t,e)},S:function(t,e){return Vl(t,e)},X:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return Yl(r);case"XXXX":case"XX":return Hl(r);default:return Hl(r,":")}},x:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return Yl(r);case"xxxx":case"xx":return Hl(r);default:return Hl(r,":")}},O:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ul(r,":");default:return"GMT"+Hl(r,":")}},z:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ul(r,":");default:return"GMT"+Hl(r,":")}},t:function(t,e,i,o){return Bl(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return Bl((o._originalDate||t).getTime(),e.length)}};var Kl=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Ql=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Jl={p:Ql,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],r=o[1],s=o[2];if(!s)return Kl(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Kl(r,e)).replace("{{time}}",Ql(s,e))}};const Xl=Jl;var Zl=["D","DD"],th=["YY","YYYY"];function eh(t){return-1!==Zl.indexOf(t)}function ih(t){return-1!==th.indexOf(t)}function oh(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var rh={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function sh(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var nh,ah={date:sh({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:sh({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:sh({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},lh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function hh(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,s=null!=i&&i.width?String(i.width):r;o=t.formattingValues[s]||t.formattingValues[r]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[n]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function ch(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,r=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var s,n=r[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return s=t.valueCallback?t.valueCallback(l):l,{value:s=i.valueCallback?i.valueCallback(s):s,rest:e.slice(n.length)}}}const dh={code:"en-US",formatDistance:function(t,e,i){var o,r=rh[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:ah,formatRelative:function(t){return lh[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:hh({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:hh({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:hh({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:hh({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:hh({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(nh={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(nh.matchPattern);if(!i)return null;var o=i[0],r=t.match(nh.parsePattern);if(!r)return null;var s=nh.valueCallback?nh.valueCallback(r[0]):r[0];return{value:s=e.valueCallback?e.valueCallback(s):s,rest:t.slice(o.length)}}),era:ch({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ch({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ch({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ch({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ch({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var uh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ph=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mh=/^'([^]*?)'?$/,vh=/''/g,fh=/[a-zA-Z]/;function bh(t,e,i){var o,r,s,n,a,l,h,c,d,u,p,m,v,f,b,g,y,w;Cl(2,arguments);var x=String(e),_=zl(),k=null!==(o=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:_.locale)&&void 0!==o?o:dh,C=kl(null!==(s=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:_.firstWeekContainsDate)&&void 0!==n?n:null===(d=_.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=kl(null!==(p=null!==(m=null!==(v=null!==(f=null==i?void 0:i.weekStartsOn)&&void 0!==f?f:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==v?v:_.weekStartsOn)&&void 0!==m?m:null===(y=_.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var S=Al(t);if(!function(t){if(Cl(1,arguments),!function(t){return Cl(1,arguments),t instanceof Date||"object"===_l(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Al(t);return!isNaN(Number(e))}(S))throw new RangeError("Invalid time value");var z=Il(S,Tl(S)),T={firstWeekContainsDate:C,weekStartsOn:A,locale:k,_originalDate:S};return x.match(ph).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Xl[e])(t,k.formatLong):t})).join("").match(uh).map((function(o){if("''"===o)return"'";var r,s,n=o[0];if("'"===n)return(s=(r=o).match(mh))?s[1].replace(vh,"'"):r;var a=Gl[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||!ih(o)||oh(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!eh(o)||oh(o,e,String(t)),a(z,o,k.localize,T);if(n.match(fh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return o})).join("")}function gh(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function yh(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=Array(e);i<e;i++)o[i]=t[i];return o}function wh(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return yh(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?yh(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,s=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw s}}}}function xh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _h(t,e){return _h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_h(t,e)}function kh(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_h(t,e)}function Ch(t){return Ch=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ch(t)}function Ah(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ah=function(){return!!t})()}function Sh(t){var e=Ah();return function(){var i,o=Ch(t);if(e){var r=Ch(this).constructor;i=Reflect.construct(o,arguments,r)}else i=o.apply(this,arguments);return function(t,e){if(e&&("object"==_l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return xh(t)}(this,i)}}function zh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Th(t){var e=function(t){if("object"!=_l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=_l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_l(e)?e:e+""}function Ih(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Th(o.key),o)}}function Dh(t,e,i){return e&&Ih(t.prototype,e),i&&Ih(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Mh(t,e,i){return(e=Th(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Eh=function(){function t(){zh(this,t),Mh(this,"priority",void 0),Mh(this,"subPriority",0)}return Dh(t,[{key:"validate",value:function(){return!0}}]),t}(),Ph=function(){kh(e,Eh);var t=Sh(e);function e(i,o,r,s,n){var a;return zh(this,e),(a=t.call(this)).value=i,a.validateValue=o,a.setValue=r,a.priority=s,n&&(a.subPriority=n),a}return Dh(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Oh=function(){kh(e,Eh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",10),Mh(xh(i),"subPriority",-1),i}return Dh(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),Nh=function(){function t(){zh(this,t),Mh(this,"incompatibleTokens",void 0),Mh(this,"priority",void 0),Mh(this,"subPriority",void 0)}return Dh(t,[{key:"run",value:function(t,e,i,o){var r=this.parse(t,e,i,o);return r?{setter:new Ph(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Bh=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",140),Mh(xh(i),"incompatibleTokens",["R","u","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),jh=/^(1[0-2]|0?\d)/,Fh=/^(3[0-1]|[0-2]?\d)/,Lh=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Rh=/^(5[0-3]|[0-4]?\d)/,qh=/^(2[0-3]|[0-1]?\d)/,$h=/^(2[0-4]|[0-1]?\d)/,Wh=/^(1[0-1]|0?\d)/,Vh=/^(1[0-2]|0?\d)/,Uh=/^[0-5]?\d/,Yh=/^[0-5]?\d/,Hh=/^\d/,Gh=/^\d{1,2}/,Kh=/^\d{1,3}/,Qh=/^\d{1,4}/,Jh=/^-?\d+/,Xh=/^-?\d/,Zh=/^-?\d{1,2}/,tc=/^-?\d{1,3}/,ec=/^-?\d{1,4}/,ic=/^([+-])(\d{2})(\d{2})?|Z/,oc=/^([+-])(\d{2})(\d{2})|Z/,rc=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,sc=/^([+-])(\d{2}):(\d{2})|Z/,nc=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function ac(t,e){return t?{value:e(t.value),rest:t.rest}:t}function lc(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function hc(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function cc(t){return lc(Jh,t)}function dc(t,e){switch(t){case 1:return lc(Hh,e);case 2:return lc(Gh,e);case 3:return lc(Kh,e);case 4:return lc(Qh,e);default:return lc(new RegExp("^\\d{1,"+t+"}"),e)}}function uc(t,e){switch(t){case 1:return lc(Xh,e);case 2:return lc(Zh,e);case 3:return lc(tc,e);case 4:return lc(ec,e);default:return lc(new RegExp("^-?\\d{1,"+t+"}"),e)}}function pc(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function mc(t,e){var i,o=e>0,r=o?e:1-e;if(r<=50)i=t||100;else{var s=r+50;i=t+100*Math.floor(s/100)-(t>=s%100?100:0)}return o?i:1-i}function vc(t){return t%400==0||t%4==0&&t%100!=0}var fc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",130),Mh(xh(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return ac(dc(4,t),o);case"yo":return ac(i.ordinalNumber(t,{unit:"year"}),o);default:return ac(dc(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var o=t.getUTCFullYear();if(i.isTwoDigitYear){var r=mc(i.year,o);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),bc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",130),Mh(xh(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return ac(dc(4,t),o);case"Yo":return ac(i.ordinalNumber(t,{unit:"year"}),o);default:return ac(dc(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,o){var r=Ol(t,o);if(i.isTwoDigitYear){var s=mc(i.year,r);return t.setUTCFullYear(s,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Pl(t,o)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Pl(t,o)}}]),e}(),gc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",130),Mh(xh(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e){return uc("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var o=new Date(0);return o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0),Dl(o)}}]),e}(),yc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",130),Mh(xh(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e){return uc("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),wc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",120),Mh(xh(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return dc(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),xc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",120),Mh(xh(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return dc(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),_c=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Mh(xh(i),"priority",110),i}return Dh(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"M":return ac(lc(jh,t),o);case"MM":return ac(dc(2,t),o);case"Mo":return ac(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),kc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",110),Mh(xh(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"L":return ac(lc(jh,t),o);case"LL":return ac(dc(2,t),o);case"Lo":return ac(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Cc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",100),Mh(xh(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return lc(Rh,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,o){return Pl(function(t,e,i){Cl(2,arguments);var o=Al(t),r=kl(e),s=Nl(o,i)-r;return o.setUTCDate(o.getUTCDate()-7*s),o}(t,i,o),o)}}]),e}(),Ac=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",100),Mh(xh(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return lc(Rh,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Dl(function(t,e){Cl(2,arguments);var i=Al(t),o=kl(e),r=El(i)-o;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Sc=[31,28,31,30,31,30,31,31,30,31,30,31],zc=[31,29,31,30,31,30,31,31,30,31,30,31],Tc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"subPriority",1),Mh(xh(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return lc(Fh,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){var i=vc(t.getUTCFullYear()),o=t.getUTCMonth();return i?e>=1&&e<=zc[o]:e>=1&&e<=Sc[o]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Ic=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"subpriority",1),Mh(xh(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return lc(Lh,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return vc(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Dc(t,e,i){var o,r,s,n,a,l,h,c;Cl(2,arguments);var d=zl(),u=kl(null!==(o=null!==(r=null!==(s=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==s?s:d.weekStartsOn)&&void 0!==r?r:null===(h=d.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Al(t),m=kl(e),v=((m%7+7)%7<u?7:0)+m-p.getUTCDay();return p.setUTCDate(p.getUTCDate()+v),p}var Mc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Dc(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Ec=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return ac(dc(e.length,t),r);case"eo":return ac(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Dc(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Pc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return ac(dc(e.length,t),r);case"co":return ac(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Dc(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Oc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){var o=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return dc(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return ac(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return ac(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return ac(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return ac(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){Cl(2,arguments);var i=kl(e);i%7==0&&(i-=7);var o=Al(t),r=((i%7+7)%7<1?7:0)+i-o.getUTCDay();return o.setUTCDate(o.getUTCDate()+r),o}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Nc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",80),Mh(xh(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(pc(i),0,0,0),t}}]),e}(),Bc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",80),Mh(xh(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(pc(i),0,0,0),t}}]),e}(),jc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",80),Mh(xh(i),"incompatibleTokens",["a","b","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(pc(i),0,0,0),t}}]),e}(),Fc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",70),Mh(xh(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return lc(Vh,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:o||12!==i?i:0,0,0,0),t}}]),e}(),Lc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",70),Mh(xh(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return lc(qh,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Rc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",70),Mh(xh(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return lc(Wh,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:i,0,0,0),t}}]),e}(),qc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",70),Mh(xh(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return lc($h,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),$c=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",60),Mh(xh(i),"incompatibleTokens",["t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return lc(Uh,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Wc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",50),Mh(xh(i),"incompatibleTokens",["t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return lc(Yh,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),Vc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",30),Mh(xh(i),"incompatibleTokens",["t","T"]),i}return Dh(e,[{key:"parse",value:function(t,e){return ac(dc(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),Uc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",10),Mh(xh(i),"incompatibleTokens",["t","T","x"]),i}return Dh(e,[{key:"parse",value:function(t,e){switch(e){case"X":return hc(ic,t);case"XX":return hc(oc,t);case"XXXX":return hc(rc,t);case"XXXXX":return hc(nc,t);default:return hc(sc,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Yc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",10),Mh(xh(i),"incompatibleTokens",["t","T","X"]),i}return Dh(e,[{key:"parse",value:function(t,e){switch(e){case"x":return hc(ic,t);case"xx":return hc(oc,t);case"xxxx":return hc(rc,t);case"xxxxx":return hc(nc,t);default:return hc(sc,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Hc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",40),Mh(xh(i),"incompatibleTokens","*"),i}return Dh(e,[{key:"parse",value:function(t){return cc(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Gc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",20),Mh(xh(i),"incompatibleTokens","*"),i}return Dh(e,[{key:"parse",value:function(t){return cc(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Kc={G:new Bh,y:new fc,Y:new bc,R:new gc,u:new yc,Q:new wc,q:new xc,M:new _c,L:new kc,w:new Cc,I:new Ac,d:new Tc,D:new Ic,E:new Mc,e:new Ec,c:new Pc,i:new Oc,a:new Nc,b:new Bc,B:new jc,h:new Fc,H:new Lc,K:new Rc,k:new qc,m:new $c,s:new Wc,S:new Vc,X:new Uc,x:new Yc,t:new Hc,T:new Gc},Qc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Xc=/^'([^]*?)'?$/,Zc=/''/g,td=/\S/,ed=/[a-zA-Z]/;const id=class{constructor(e){t(this,e),this.calendarMaxDate="",this.fetchToken=0,this.fetchData=async()=>{if(!this.playerid||!this.session||!this.endpoint)return;this.fetchToken++;const t=this.fetchToken;this.isLoading=!0,this.errorMessage=null;const{startDate:e,endDate:i}=this.getDateRange(),o={"X-SessionId":this.session},r=this.endpoint.replace(/\/$/,""),s=(this.currentPage*this.itemsPerPage).toString(),n=this.itemsPerPage.toString();try{const a=[];let l=!1,h=!1;if(["All","Payments"].includes(this.activeTab)){const t=new URL(`${r}/v1/player/${this.playerid}/transactions/banking`,window.location.origin);t.searchParams.append("limit",n),t.searchParams.append("offset",s),t.searchParams.append("startDate",bh(new Date(e),"yyyy-MM-dd")),t.searchParams.append("endDate",bh(new Date(i),"yyyy-MM-dd")),a.push(fetch(t.href,{method:"GET",headers:o}).then((t=>t.ok?t.json():null)).then((t=>{var e;return l=!!(null===(e=null==t?void 0:t.pagination)||void 0===e?void 0:e.next),this.normalizeBankingData(t)})))}if(["All","Casino","Sports","Bonus"].includes(this.activeTab)){const t=new URL(`${r}/v1/player/${this.playerid}/transactions/wagering`,window.location.origin);t.searchParams.append("type","All"===this.activeTab?"All":this.activeTab),t.searchParams.append("limit",n),t.searchParams.append("offset",s),t.searchParams.append("startDate",e),t.searchParams.append("endDate",i),a.push(fetch(t.href,{method:"GET",headers:o}).then((t=>t.ok?t.json():null)).then((t=>{var e;return h=!!(null===(e=null==t?void 0:t.pagination)||void 0===e?void 0:e.next),this.normalizeWageringData(t)})))}const c=await Promise.all(a);if(this.fetchToken!==t)return;const d=c.flat().filter(Boolean);d.sort(((t,e)=>e.timestamp-t.timestamp)),this.transactions=d,this.hasNextPage=l||h,this.isLoading=!1,window.postMessage({type:"ScrollToTop"},window.location.href)}catch(e){if(this.fetchToken!==t)return;this.errorMessage=this.translate("errorLoading"),this.isLoading=!1}},this.scrollToTop=()=>{this.statementContainer&&setTimeout((()=>{this.statementContainer.scrollIntoView({behavior:"smooth",block:"start"})}),50)},this.goToPrevPage=()=>{this.currentPage>0&&(this.currentPage--,this.fetchData(),this.scrollToTop())},this.goToNextPage=()=>{this.hasNextPage&&(this.currentPage++,this.fetchData(),this.scrollToTop())},this.formatDate=t=>t?bh(new Date(t.year,t.month,t.day),this.dateformat):"",this.parseDate=t=>{const e=t.includes("/")?"/":"-",i=t.split(e);let o=i[0],r=i[1],s=i[2];return 4===i[0].length&&(s=i[0],r=i[1],o=i[2]),{year:parseInt(s),month:parseInt(r)-1,day:parseInt(o)}},this.handleStartDateChange=t=>{const e=t.target;e.value&&(this.customStartDate=e.value)},this.handleEndDateChange=t=>{const e=t.target;e.value&&(this.customEndDate=e.value)},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.session="",this.playerid="",this.endpoint="",this.statementenabled="",this.postMessage=!1,this.language="",this.quickFiltersActive=!1,this.clientStylingUrlContent="",this.dateformat="dd-MM-yyyy",this.translationUrl="",this.activeTab="All",this.activeFilter="1D",this.transactions=[],this.isLoading=!1,this.errorMessage=null,this.customStartDate="",this.customEndDate="",this.currentPage=0,this.hasNextPage=!1,this.itemsPerPage=10,this.copiedId=null,this.isStatementEnabled=!0}translate(t){const e=(t=>{var e,i;return(null===(e=c[this.language||"en"])||void 0===e?void 0:e[t])||(null===(i=c.en)||void 0===i?void 0:i[t])})(t);return!e&&t?t.charAt(0).toUpperCase()+t.slice(1):e||t}formatCurrencyAmount(t){return null==t||isNaN(t)?"0.00":t.toFixed(2)}isDateRangeExceeded(){if(!this.customStartDate||!this.customEndDate)return!1;const t=new Date(this.customStartDate).getTime(),e=new Date(this.customEndDate).getTime(),i=Math.abs(e-t);return Math.ceil(i/864e5)>180}async componentWillLoad(){var t;this.translationUrl&&await(t=this.translationUrl,new Promise(((e,i)=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{const i=e;c[i]||(c[i]={});for(let o in t[e])c[i][o]=t[e][o]})),e(c)})).catch((t=>{i(t)}))}))).catch((t=>{console.error("Failed to load translations",t)}));const e=new Date;this.calendarMaxDate=bh(e,"yyyy-MM-dd"),this.customEndDate=bh(e,"yyyy-MM-dd"),this.customStartDate=bh(function(t,e){return Cl(2,arguments),function(t,e){Cl(2,arguments);var i=Al(t),o=kl(e);if(isNaN(o))return new Date(NaN);if(!o)return i;var r=i.getDate(),s=new Date(i.getTime());return s.setMonth(i.getMonth()+o+1,0),r>=s.getDate()?s:(i.setFullYear(s.getFullYear(),s.getMonth(),r),i)}(t,-kl(e))}(e,1),"yyyy-MM-dd")}handleStatementEnabledChange(t){"false"===t?window.location.replace("/account/profile-info"):"true"===t&&(this.isStatementEnabled=!1)}handleTabChange(){this.resetPaginationAndFetch()}handleFilterChange(t){"Custom"!==t&&this.resetPaginationAndFetch()}handleClientStylingChange(t,e){t!==e&&r(this.statementContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&s(this.statementContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&n(this.statementContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleAuthDataChange(){this.endpoint&&this.playerid&&this.session&&this.fetchData()}componentDidLoad(){"false"===this.statementenabled?window.location.replace("/account/profile-info"):"true"===this.statementenabled&&(this.isStatementEnabled=!1),this.statementContainer&&(this.mbSource&&n(this.statementContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.statementContainer,this.clientStyling),this.clientStylingUrl&&s(this.statementContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}resetPaginationAndFetch(){this.currentPage=0,this.hasNextPage=!1,this.fetchData()}formatDateForUI(t){if(!t)return"";const e=new Date(t);return`${this.translate(h[e.getDay()].toLowerCase())} ${String(e.getDate()).padStart(2,"0")}/${String(e.getMonth()+1).padStart(2,"0")} - ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}formattedToIso(t,e){const i=function(t,e,i,o){var r,s,n,a,l,h,c,d,u,p,m,v,f,b,g,y,w,x;Cl(3,arguments);var _=String(t),k=String(e),C=zl(),A=null!==(r=null!==(s=null==o?void 0:o.locale)&&void 0!==s?s:C.locale)&&void 0!==r?r:dh;if(!A.match)throw new RangeError("locale must contain match property");var S=kl(null!==(n=null!==(a=null!==(l=null!==(h=null==o?void 0:o.firstWeekContainsDate)&&void 0!==h?h:null==o||null===(c=o.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==l?l:C.firstWeekContainsDate)&&void 0!==a?a:null===(u=C.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=kl(null!==(m=null!==(v=null!==(f=null!==(b=null==o?void 0:o.weekStartsOn)&&void 0!==b?b:null==o||null===(g=o.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==f?f:C.weekStartsOn)&&void 0!==v?v:null===(w=C.locale)||void 0===w||null===(x=w.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==m?m:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===_?Al(i):new Date(NaN);var T,I={firstWeekContainsDate:S,weekStartsOn:z,locale:A},D=[new Oh],M=k.match(Jc).map((function(t){var e=t[0];return e in Xl?(0,Xl[e])(t,A.formatLong):t})).join("").match(Qc),E=[],P=wh(M);try{var O=function(){var e=T.value;null!=o&&o.useAdditionalWeekYearTokens||!ih(e)||oh(e,k,t),null!=o&&o.useAdditionalDayOfYearTokens||!eh(e)||oh(e,k,t);var i=e[0],r=Kc[i];if(r){var s=r.incompatibleTokens;if(Array.isArray(s)){var n=E.find((function(t){return s.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&E.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));E.push({token:i,fullToken:e});var a=r.run(_,e,A.match,I);if(!a)return{v:new Date(NaN)};D.push(a.setter),_=a.rest}else{if(i.match(ed))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(Xc)[1].replace(Zc,"'")),0!==_.indexOf(e))return{v:new Date(NaN)};_=_.slice(e.length)}};for(P.s();!(T=P.n()).done;){var N=O();if("object"===_l(N))return N.v}}catch(t){P.e(t)}finally{P.f()}if(_.length>0&&td.test(_))return new Date(NaN);var B=D.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return D.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),j=Al(i);if(isNaN(j.getTime()))return new Date(NaN);var F,L=Il(j,Tl(j)),R={},q=wh(B);try{for(q.s();!(F=q.n()).done;){var $=F.value;if(!$.validate(L,I))return new Date(NaN);var W=$.set(L,R,I);Array.isArray(W)?(L=W[0],gh(R,W[1])):L=W}}catch(t){q.e(t)}finally{q.f()}return L}(t,"yyyy-MM-dd",new Date),o=e?function(t){Cl(1,arguments);var e=Al(t);return e.setHours(23,59,59,999),e}(i):function(t){Cl(1,arguments);var e=Al(t);return e.setHours(0,0,0,0),e}(i);return bh(o,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")}getDateRange(){if("Custom"===this.activeFilter)return{startDate:this.formattedToIso(this.customStartDate,!1),endDate:this.formattedToIso(this.customEndDate,!0)};const t=new Date,e=new Date;switch(this.activeFilter){case"1D":e.setDate(e.getDate()-1);break;case"1W":e.setDate(e.getDate()-7);break;case"1M":e.setMonth(e.getMonth()-1);break;case"3M":e.setMonth(e.getMonth()-3)}return{startDate:e.toISOString(),endDate:t.toISOString()}}parseAmount(t){return null==t?0:"object"==typeof t&&void 0!==t.parsedValue?Number(t.parsedValue)||0:Number(t)||0}normalizeBankingData(t){return t&&t.transactions?t.transactions.map((t=>{var e;const i=1===t.type||14===t.type,o=null!==(e=t.realAmount)&&void 0!==e?e:t.creditAmount;let r=t.transIdStr;!r&&t.transId&&(r="object"==typeof t.transId?t.transId.source||t.transId.parsedValue:t.transId);const s=i?"withdrawal":"deposit",n=t.status?String(t.status).toLowerCase():"";return{id:r?String(r).startsWith("#")?String(r):`#${r}`:this.translate("na"),category:this.translate(s),status:n?this.translate(n):null,statusClass:n,amount:Math.abs(this.parseAmount(o)),currency:t.currencyCode||t.currency||"",balance:null,date:this.formatDateForUI(t.created),isPositive:!i,timestamp:new Date(t.created).getTime()}})):[]}normalizeWageringData(t){return t&&t.transactions?t.transactions.map((t=>{var e,i;const o="Credit"===t.transName||"2"===t.transType;let r=this.translate("casino");(null===(e=t.gameModel)||void 0===e?void 0:e.name)?r=`${this.translate("casino")} / ${t.gameModel.name}`:t.gameId&&(r=`${this.translate("casino")} / ${t.gameId}`);const s=o?"won":"Debit"===t.transName||"1"===t.transType?"placed":String(t.transName).toLowerCase(),n=null!==(i=t.realAmount)&&void 0!==i?i:t.totalAmount;return{id:t.transId,category:r,status:this.translate(s),statusClass:o?"won":"placed",amount:Math.abs(this.parseAmount(n)),currency:t.currencyCode||t.currency||"",balance:this.parseAmount(t.balance),date:this.formatDateForUI(t.ins),isPositive:o,timestamp:new Date(t.ins).getTime()}})):[]}execCommandCopy(t){const e=document.createElement("textarea");e.value=t,Object.assign(e.style,{position:"fixed",opacity:"0"}),document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}async copyToClipboard(t){try{navigator.clipboard&&navigator.clipboard.writeText?await navigator.clipboard.writeText(t):this.execCommandCopy(t),this.copiedId=t,setTimeout((()=>{this.copiedId===t&&(this.copiedId=null)}),2e3)}catch(e){try{this.execCommandCopy(t),this.copiedId=t,setTimeout((()=>{this.copiedId===t&&(this.copiedId=null)}),2e3)}catch(t){console.error(this.translate("failedToCopyText"),t)}}}setDateFormat(t){t&&!t.__i18nConfigured&&(t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),t.__i18nConfigured=!0)}isSubmitEnabled(){if(!this.customStartDate||!this.customEndDate)return!1;const t=new Date(this.customStartDate).getTime(),e=new Date(this.customEndDate).getTime();return!(t>e)&&Math.ceil(Math.abs(e-t)/864e5)<=180}render(){return this.isStatementEnabled?e("div",{class:"verify-access-loading"},e("div",{class:"loading-text"},this.translate("loading"))):e("div",{ref:t=>this.statementContainer=t,class:"statement-wrapper"},e("div",{class:"header"},e("h2",null,this.translate("transactionHistory"))),e("div",{class:"tabs-container desktop-tabs"},a.map((t=>e("button",{class:"tab-btn "+(this.activeTab===t?"active":""),onClick:()=>this.activeTab=t},this.translate(t.toLowerCase()))))),e("div",{class:"mobile-tabs-select"},e("select",Object.assign({onChange:t=>this.activeTab=t.target.value},{value:this.activeTab}),a.map((t=>e("option",{value:t},this.translate(t.toLowerCase())))))),e("div",{class:"card-container"},e("div",{class:"filters-container"},l.map((t=>e("button",{class:"filter-btn "+(this.activeFilter===t?"active":""),onClick:()=>this.activeFilter=t},this.translate(t.toLowerCase()))))),"Custom"===this.activeFilter&&e("div",{class:"custom-date-wrapper"},e("div",{class:"calendar-container"},e("div",{class:"calendar-field"},e("label",null,this.translate("from")),e("vaadin-date-picker",{value:this.customStartDate,max:this.calendarMaxDate,onChange:this.handleStartDateChange,ref:t=>this.setDateFormat(t),class:"VaadinDatePicker"})),e("div",{class:"calendar-field"},e("label",null,this.translate("to")),e("vaadin-date-picker",{value:this.customEndDate,min:this.customStartDate,max:this.calendarMaxDate,onChange:this.handleEndDateChange,ref:t=>this.setDateFormat(t),class:"VaadinDatePicker"}))),e("button",{class:"apply-date-btn",disabled:!this.isSubmitEnabled()||this.isLoading,onClick:()=>this.resetPaginationAndFetch()},this.translate("apply")),this.isDateRangeExceeded()&&e("div",{class:"date-limit-warning"},this.translate("maxRange"))),e("div",{class:"transactions-list"},this.isLoading&&e("div",{class:"empty-state"},this.translate("loading")),!this.isLoading&&this.errorMessage&&e("div",{class:"empty-state error"},this.errorMessage),!this.isLoading&&!this.errorMessage&&0===this.transactions.length&&e("div",{class:"empty-state"},this.translate("noData")),!this.isLoading&&!this.errorMessage&&this.transactions.length>0&&this.transactions.map((t=>e("div",{class:"transaction-item"},e("div",{class:"row top-row"},e("div",{class:"category-group"},e("span",{class:"category"},t.category),t.status&&e("span",{class:`status-badge ${t.statusClass}`},t.status)),e("span",{class:"amount "+(t.isPositive?"positive":"negative")},t.isPositive?"+":"-"," ",t.currency," ",this.formatCurrencyAmount(t.amount))),e("div",{class:"row middle-row"},e("span",{class:"transaction-id"},t.id.startsWith("#")?t.id:`#${t.id}`),e("div",{class:"copy-action-wrapper",onClick:()=>this.copyToClipboard(t.id)},e("svg",{class:"copy-icon",viewBox:"0 0 24 24",width:"25",height:"25"},e("rect",{x:"9",y:"9",width:"10",height:"10",rx:"1",ry:"1"}),e("rect",{x:"5",y:"5",width:"10",height:"10",rx:"1",ry:"1"})),this.copiedId===t.id&&e("span",{class:"copied-tooltip"},this.translate("copied")))),e("div",{class:"row bottom-row"},e("span",{class:"date"},t.date),e("span",{class:"balance"},null!=t.balance&&!isNaN(t.balance)&&e(i,null,this.translate("balance")," ",e("strong",null,t.currency," ",this.formatCurrencyAmount(t.balance))))))))),!this.isLoading&&this.transactions.length>0&&(this.currentPage>0||this.hasNextPage)&&e("div",{class:"pagination-container"},e("button",{class:"pagination-btn prev-btn",disabled:0===this.currentPage,onClick:this.goToPrevPage},this.translate("prev")),e("span",{class:"page-indicator"},this.translate("page")," ",this.currentPage+1),e("button",{class:"pagination-btn next-btn",disabled:!this.hasNextPage,onClick:this.goToNextPage},this.translate("next")))))}static get watchers(){return{statementenabled:["handleStatementEnabledChange"],activeTab:["handleTabChange"],activeFilter:["handleFilterChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],session:["handleAuthDataChange"],playerid:["handleAuthDataChange"],endpoint:["handleAuthDataChange"]}}};id.style=':host{display:block;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;color:var(--emw--color-contrast, #333)}.statement-wrapper{max-width:100%;width:100%;height:100%;box-sizing:border-box;background-color:var(--emw--color-white, #ffffff);border-radius:10px;padding:30px 40px}@media (max-width: 600px){.statement-wrapper{padding:15px;background-color:transparent}}.header{margin-bottom:20px}.header h2{font-size:19px;font-weight:700;margin:0;color:var(--emw--color-contrast, #1a1a1a)}.desktop-tabs{display:flex;gap:10px;margin-bottom:20px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:5px}.desktop-tabs::-webkit-scrollbar{height:4px}.desktop-tabs::-webkit-scrollbar-thumb{background-color:var(--emw--color-gray-200, #ccc);border-radius:4px}.desktop-tabs .tab-btn{padding:8px 16px;border:none;border-radius:20px;font-size:14px;font-weight:500;cursor:pointer;background-color:var(--emw--color-gray-100, #f0f0f0);color:var(--emw--color-gray-300, #666);transition:all 0.2s ease;white-space:nowrap}.desktop-tabs .tab-btn.active{background-color:var(--emw--color-primary, #ff6b00);color:var(--emw--color-white, #fff)}.desktop-tabs .tab-btn:hover:not(.active){background-color:var(--emw--color-gray-200, #e4e4e4)}@media (max-width: 600px){.desktop-tabs{display:none}}.mobile-tabs-select{display:none;margin-bottom:20px}.mobile-tabs-select select{width:100%;padding:12px 16px;border-radius:8px;border:1px solid var(--emw--color-gray-200, #ddd);font-size:16px;font-weight:500;color:var(--emw--color-black, #000);background-color:var(--emw--color-white, #fff);appearance:none;background:var(--emw--color-white, #fff) url(\'data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>\') 97% center no-repeat;box-shadow:0 2px 4px rgba(0, 0, 0, 0.02)}.mobile-tabs-select select:focus{outline:none;border-color:var(--emw--color-primary, #ff6b00)}@media (max-width: 600px){.mobile-tabs-select{display:block}}.card-container{background:transparent;border-radius:0;padding:0;box-shadow:none;margin-top:20px}.filters-container{display:flex;gap:20px;border-bottom:1px solid var(--emw--color-gray-100, #eee);padding-bottom:12px;margin-bottom:16px;overflow-x:auto;white-space:nowrap}.filters-container .filter-btn{background:none;border:none;font-size:14px;font-weight:600;color:var(--emw--color-gray-150, #888);cursor:pointer;padding:0}.filters-container .filter-btn.active{color:var(--emw--color-primary, #ff6b00)}.filters-container .filter-btn:hover{color:var(--emw--color-contrast, #333)}.custom-date-wrapper{display:flex;flex-direction:column;align-items:flex-start;gap:16px;margin-bottom:24px}@media (max-width: 600px){.custom-date-wrapper{align-items:stretch}}.custom-date-wrapper .calendar-container{display:flex;flex-direction:row;align-items:center;gap:20px;width:100%;box-sizing:border-box;background-color:var(--emw--color-background, #f8f9fa);border:1px solid var(--emw--color-gray-100, #eee);border-radius:8px;padding:12px 16px}@media (max-width: 600px){.custom-date-wrapper .calendar-container{flex-direction:column;align-items:stretch;gap:16px;padding:16px}}.custom-date-wrapper .date-limit-warning{color:var(--emw--color-error, #d32f2f);font-size:13px;margin-top:8px;width:100%}.custom-date-wrapper .calendar-field{display:flex;flex-direction:row;align-items:center;gap:12px;flex:1}@media (max-width: 600px){.custom-date-wrapper .calendar-field{flex-direction:column;align-items:flex-start;gap:4px}}.custom-date-wrapper .calendar-field label{font-size:14px;font-weight:500;color:var(--emw--color-gray-300, #555);min-width:40px;margin:0;white-space:nowrap}.custom-date-wrapper .calendar-field .VaadinDatePicker{width:100%;flex:1}.custom-date-wrapper .apply-date-btn{padding:0 24px;height:44px;background-color:var(--emw--color-primary, #ff6b00);color:var(--emw--color-white, #fff);border:none;border-radius:6px;font-weight:600;font-size:15px;cursor:pointer;transition:background-color 0.2s;white-space:nowrap}@media (max-width: 600px){.custom-date-wrapper .apply-date-btn{width:100%}}.custom-date-wrapper .apply-date-btn:hover:not(:disabled){background-color:var(--emw--color-hover, #e66000)}.custom-date-wrapper .apply-date-btn:disabled{background-color:var(--emw--color-primary-disabled, #ffd6b3);color:var(--emw--color-white, #fff);cursor:not-allowed}.transactions-list{display:flex;flex-direction:column}.transactions-list .empty-state{padding:30px;text-align:center;color:var(--emw--color-gray-300, #666);font-size:14px}.transactions-list .empty-state.error{color:var(--emw--color-error, #d32f2f)}.transactions-list .transaction-item{border-bottom:1px solid var(--emw--color-gray-100, #f0f0f0);padding:16px 0;display:flex;flex-direction:column;gap:10px}.transactions-list .transaction-item:last-child{border-bottom:none;padding-bottom:0}.transactions-list .transaction-item .row{display:flex;justify-content:space-between;align-items:center}.transactions-list .transaction-item .category-group{display:flex;align-items:center;gap:8px}.transactions-list .transaction-item .category-group .category{font-size:14px;color:var(--emw--color-secondary, #5bb4ff)}.transactions-list .transaction-item .category-group .status-badge{font-size:12px;padding:3px 8px;border-radius:12px;font-weight:600}.transactions-list .transaction-item .category-group .status-badge.won,.transactions-list .transaction-item .category-group .status-badge.success{background-color:var(--emw--color-valid-bg, #e8f5e9);color:var(--emw--color-valid, #4caf50)}.transactions-list .transaction-item .category-group .status-badge.placed{background-color:var(--emw--color-info-bg, #e3f2fd);color:var(--emw--color-info, #2196f3)}.transactions-list .transaction-item .category-group .status-badge.tax{background-color:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #607d8b)}.transactions-list .transaction-item .category-group .status-badge.pendingnotification,.transactions-list .transaction-item .category-group .status-badge.pending{color:var(--emw--color-pending, #F5A623)}.transactions-list .transaction-item .category-group .status-badge.failed,.transactions-list .transaction-item .category-group .status-badge.declined,.transactions-list .transaction-item .category-group .status-badge.cancelled{color:var(--emw--color-error, #d32f2f)}.transactions-list .transaction-item .amount{font-size:15px;font-weight:600}.transactions-list .transaction-item .amount.positive{color:var(--emw--color-valid, #4caf50)}.transactions-list .transaction-item .amount.negative{color:var(--emw--color-secondary, #5bb4ff)}.transactions-list .transaction-item .middle-row{justify-content:space-between}.transactions-list .transaction-item .middle-row .transaction-id{font-size:14px;font-weight:600;color:var(--emw--color-contrast, #333);word-break:break-all;padding-right:16px}.transactions-list .transaction-item .middle-row .copy-action-wrapper{position:relative;display:flex;align-items:center;min-width:30px;min-height:30px;justify-content:center;cursor:pointer;padding:8px;margin-right:-8px}.transactions-list .transaction-item .middle-row .copy-action-wrapper .copy-icon{fill:var(--emw--color-gray-300, #4a4a4a);stroke:var(--emw--color-white, #ffffff);stroke-width:2px;cursor:pointer;transition:transform 0.1s;pointer-events:none}.transactions-list .transaction-item .middle-row .copy-action-wrapper .copy-icon:hover .copy-icon{transform:scale(1.1)}.transactions-list .transaction-item .middle-row .copy-action-wrapper .copy-icon:active{transform:scale(0.95)}.transactions-list .transaction-item .middle-row .copy-action-wrapper .copied-tooltip{position:absolute;right:100%;margin-right:8px;background:var(--emw--color-contrast, #333);color:var(--emw--color-white, #fff);font-size:12px;font-weight:500;padding:2px 6px;border-radius:4px;white-space:nowrap;pointer-events:none;animation:fadeInOutCopy 2s ease forwards}.transactions-list .transaction-item .bottom-row{font-size:13px;color:var(--emw--color-gray-150, #888)}.transactions-list .transaction-item .bottom-row .balance strong{color:var(--emw--color-contrast, #333)}@keyframes fadeInOutCopy{0%{opacity:0;transform:translateX(5px)}10%{opacity:1;transform:translateX(0)}80%{opacity:1;transform:translateX(0)}100%{opacity:0}}.pagination-container{display:flex;justify-content:space-between;align-items:center;margin-top:24px;padding-top:16px;border-top:1px solid var(--emw--color-gray-100, #eee)}.pagination-container .pagination-btn{background-color:var(--emw--color-white, #fff);border:1px solid var(--emw--color-gray-200, #ddd);color:var(--emw--color-primary, #ff6b00);font-size:14px;font-weight:600;padding:8px 16px;border-radius:4px;cursor:pointer;transition:all 0.2s;display:flex;align-items:center;gap:8px}.pagination-container .pagination-btn:hover:not(:disabled){background-color:var(--emw--color-primary-light, #fff5f0);border-color:var(--emw--color-primary, #ff6b00)}.pagination-container .pagination-btn:disabled{color:var(--emw--color-gray-200, #bbb);border-color:var(--emw--color-gray-100, #eee);cursor:not-allowed}.pagination-container .pagination-btn.next-btn::after{content:">";font-weight:bold}.pagination-container .pagination-btn.prev-btn::before{content:"<";font-weight:bold}.pagination-container .page-indicator{color:var(--emw--color-gray-300, #666);font-size:14px;font-weight:500}.verify-access-loading{height:100dvh;border:2px solid red;background-color:var(--emw--color-white, #ffffff);display:flex;justify-content:center;align-items:center}.verify-access-loading .loading-text{color:var(--emw--color-gray-300, #666666);font-size:16px;font-weight:500}';export{id as P}
|
|
6657
|
+
`}static get is(){return"vaadin-tabs"}}function _l(t){return _l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(t)}function kl(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Cl(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Al(t){Cl(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===_l(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}_(xl);var Sl={};function zl(){return Sl}function Tl(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function Dl(t,e){return Cl(2,arguments),function(t,e){Cl(2,arguments);var i=Al(t).getTime(),o=kl(e);return new Date(i+o)}(t,-kl(e))}function Il(t){Cl(1,arguments);var e=Al(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function Ml(t){Cl(1,arguments);var e=Al(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var r=Il(o),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var n=Il(s);return e.getTime()>=r.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}function El(t){Cl(1,arguments);var e=Al(t),i=Il(e).getTime()-function(t){Cl(1,arguments);var e=Ml(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Il(i)}(e).getTime();return Math.round(i/6048e5)+1}function Pl(t,e){var i,o,r,s,n,a,l,h;Cl(1,arguments);var c=zl(),d=kl(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.weekStartsOn)&&void 0!==s?s:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Al(t),p=u.getUTCDay(),m=(p<d?7:0)+p-d;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Ol(t,e){var i,o,r,s,n,a,l,h;Cl(1,arguments);var c=Al(t),d=c.getUTCFullYear(),u=zl(),p=kl(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:u.firstWeekContainsDate)&&void 0!==o?o:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(d+1,0,p),m.setUTCHours(0,0,0,0);var v=Pl(m,e),f=new Date(0);f.setUTCFullYear(d,0,p),f.setUTCHours(0,0,0,0);var b=Pl(f,e);return c.getTime()>=v.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}function Nl(t,e){Cl(1,arguments);var i=Al(t),o=Pl(i,e).getTime()-function(t,e){var i,o,r,s,n,a,l,h;Cl(1,arguments);var c=zl(),d=kl(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Ol(t,e),p=new Date(0);return p.setUTCFullYear(u,0,d),p.setUTCHours(0,0,0,0),Pl(p,e)}(i,e).getTime();return Math.round(o/6048e5)+1}function Bl(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const jl=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return Bl("yy"===e?o%100:o,e.length)},Fl=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Bl(i+1,2)},Ll=function(t,e){return Bl(t.getUTCDate(),e.length)},Rl=function(t,e){return Bl(t.getUTCHours()%12||12,e.length)},ql=function(t,e){return Bl(t.getUTCHours(),e.length)},$l=function(t,e){return Bl(t.getUTCMinutes(),e.length)},Vl=function(t,e){return Bl(t.getUTCSeconds(),e.length)},Wl=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return Bl(Math.floor(o*Math.pow(10,i-3)),e.length)};function Ul(t,e){var i=t>0?"-":"+",o=Math.abs(t),r=Math.floor(o/60),s=o%60;if(0===s)return i+String(r);var n=e||"";return i+String(r)+n+Bl(s,2)}function Yl(t,e){return t%60==0?(t>0?"-":"+")+Bl(Math.abs(t)/60,2):Hl(t,e)}function Hl(t,e){var i=e||"",o=t>0?"-":"+",r=Math.abs(t);return o+Bl(Math.floor(r/60),2)+i+Bl(r%60,2)}const Gl={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return jl(t,e)},Y:function(t,e,i,o){var r=Ol(t,o),s=r>0?r:1-r;return"YY"===e?Bl(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Bl(s,e.length)},R:function(t,e){return Bl(Ml(t),e.length)},u:function(t,e){return Bl(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Bl(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Bl(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return Fl(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return Bl(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var r=Nl(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Bl(r,e.length)},I:function(t,e,i){var o=El(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Bl(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Ll(t,e)},D:function(t,e,i){var o=function(t){Cl(1,arguments);var e=Al(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Bl(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Bl(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Bl(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Bl(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,r=t.getUTCHours();switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,r=t.getUTCHours();switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return Rl(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ql(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Bl(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Bl(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):$l(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Vl(t,e)},S:function(t,e){return Wl(t,e)},X:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return Yl(r);case"XXXX":case"XX":return Hl(r);default:return Hl(r,":")}},x:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return Yl(r);case"xxxx":case"xx":return Hl(r);default:return Hl(r,":")}},O:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ul(r,":");default:return"GMT"+Hl(r,":")}},z:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ul(r,":");default:return"GMT"+Hl(r,":")}},t:function(t,e,i,o){return Bl(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return Bl((o._originalDate||t).getTime(),e.length)}};var Kl=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Ql=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Jl={p:Ql,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],r=o[1],s=o[2];if(!s)return Kl(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Kl(r,e)).replace("{{time}}",Ql(s,e))}};const Xl=Jl;var Zl=["D","DD"],th=["YY","YYYY"];function eh(t){return-1!==Zl.indexOf(t)}function ih(t){return-1!==th.indexOf(t)}function oh(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var rh={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function sh(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var nh,ah={date:sh({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:sh({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:sh({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},lh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function hh(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,s=null!=i&&i.width?String(i.width):r;o=t.formattingValues[s]||t.formattingValues[r]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[n]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function ch(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,r=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var s,n=r[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return s=t.valueCallback?t.valueCallback(l):l,{value:s=i.valueCallback?i.valueCallback(s):s,rest:e.slice(n.length)}}}const dh={code:"en-US",formatDistance:function(t,e,i){var o,r=rh[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:ah,formatRelative:function(t){return lh[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:hh({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:hh({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:hh({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:hh({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:hh({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(nh={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(nh.matchPattern);if(!i)return null;var o=i[0],r=t.match(nh.parsePattern);if(!r)return null;var s=nh.valueCallback?nh.valueCallback(r[0]):r[0];return{value:s=e.valueCallback?e.valueCallback(s):s,rest:t.slice(o.length)}}),era:ch({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ch({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ch({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ch({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ch({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var uh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ph=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mh=/^'([^]*?)'?$/,vh=/''/g,fh=/[a-zA-Z]/;function bh(t,e,i){var o,r,s,n,a,l,h,c,d,u,p,m,v,f,b,g,y,w;Cl(2,arguments);var x=String(e),_=zl(),k=null!==(o=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:_.locale)&&void 0!==o?o:dh,C=kl(null!==(s=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:_.firstWeekContainsDate)&&void 0!==n?n:null===(d=_.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=kl(null!==(p=null!==(m=null!==(v=null!==(f=null==i?void 0:i.weekStartsOn)&&void 0!==f?f:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==v?v:_.weekStartsOn)&&void 0!==m?m:null===(y=_.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var S=Al(t);if(!function(t){if(Cl(1,arguments),!function(t){return Cl(1,arguments),t instanceof Date||"object"===_l(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Al(t);return!isNaN(Number(e))}(S))throw new RangeError("Invalid time value");var z=Dl(S,Tl(S)),T={firstWeekContainsDate:C,weekStartsOn:A,locale:k,_originalDate:S};return x.match(ph).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Xl[e])(t,k.formatLong):t})).join("").match(uh).map((function(o){if("''"===o)return"'";var r,s,n=o[0];if("'"===n)return(s=(r=o).match(mh))?s[1].replace(vh,"'"):r;var a=Gl[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||!ih(o)||oh(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!eh(o)||oh(o,e,String(t)),a(z,o,k.localize,T);if(n.match(fh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return o})).join("")}function gh(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function yh(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=Array(e);i<e;i++)o[i]=t[i];return o}function wh(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return yh(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?yh(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,s=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw s}}}}function xh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _h(t,e){return _h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_h(t,e)}function kh(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_h(t,e)}function Ch(t){return Ch=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ch(t)}function Ah(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ah=function(){return!!t})()}function Sh(t){var e=Ah();return function(){var i,o=Ch(t);if(e){var r=Ch(this).constructor;i=Reflect.construct(o,arguments,r)}else i=o.apply(this,arguments);return function(t,e){if(e&&("object"==_l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return xh(t)}(this,i)}}function zh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Th(t){var e=function(t){if("object"!=_l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=_l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_l(e)?e:e+""}function Dh(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Th(o.key),o)}}function Ih(t,e,i){return e&&Dh(t.prototype,e),i&&Dh(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Mh(t,e,i){return(e=Th(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Eh=function(){function t(){zh(this,t),Mh(this,"priority",void 0),Mh(this,"subPriority",0)}return Ih(t,[{key:"validate",value:function(){return!0}}]),t}(),Ph=function(){kh(e,Eh);var t=Sh(e);function e(i,o,r,s,n){var a;return zh(this,e),(a=t.call(this)).value=i,a.validateValue=o,a.setValue=r,a.priority=s,n&&(a.subPriority=n),a}return Ih(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Oh=function(){kh(e,Eh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",10),Mh(xh(i),"subPriority",-1),i}return Ih(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),Nh=function(){function t(){zh(this,t),Mh(this,"incompatibleTokens",void 0),Mh(this,"priority",void 0),Mh(this,"subPriority",void 0)}return Ih(t,[{key:"run",value:function(t,e,i,o){var r=this.parse(t,e,i,o);return r?{setter:new Ph(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Bh=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",140),Mh(xh(i),"incompatibleTokens",["R","u","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),jh=/^(1[0-2]|0?\d)/,Fh=/^(3[0-1]|[0-2]?\d)/,Lh=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Rh=/^(5[0-3]|[0-4]?\d)/,qh=/^(2[0-3]|[0-1]?\d)/,$h=/^(2[0-4]|[0-1]?\d)/,Vh=/^(1[0-1]|0?\d)/,Wh=/^(1[0-2]|0?\d)/,Uh=/^[0-5]?\d/,Yh=/^[0-5]?\d/,Hh=/^\d/,Gh=/^\d{1,2}/,Kh=/^\d{1,3}/,Qh=/^\d{1,4}/,Jh=/^-?\d+/,Xh=/^-?\d/,Zh=/^-?\d{1,2}/,tc=/^-?\d{1,3}/,ec=/^-?\d{1,4}/,ic=/^([+-])(\d{2})(\d{2})?|Z/,oc=/^([+-])(\d{2})(\d{2})|Z/,rc=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,sc=/^([+-])(\d{2}):(\d{2})|Z/,nc=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function ac(t,e){return t?{value:e(t.value),rest:t.rest}:t}function lc(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function hc(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function cc(t){return lc(Jh,t)}function dc(t,e){switch(t){case 1:return lc(Hh,e);case 2:return lc(Gh,e);case 3:return lc(Kh,e);case 4:return lc(Qh,e);default:return lc(new RegExp("^\\d{1,"+t+"}"),e)}}function uc(t,e){switch(t){case 1:return lc(Xh,e);case 2:return lc(Zh,e);case 3:return lc(tc,e);case 4:return lc(ec,e);default:return lc(new RegExp("^-?\\d{1,"+t+"}"),e)}}function pc(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function mc(t,e){var i,o=e>0,r=o?e:1-e;if(r<=50)i=t||100;else{var s=r+50;i=t+100*Math.floor(s/100)-(t>=s%100?100:0)}return o?i:1-i}function vc(t){return t%400==0||t%4==0&&t%100!=0}var fc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",130),Mh(xh(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return ac(dc(4,t),o);case"yo":return ac(i.ordinalNumber(t,{unit:"year"}),o);default:return ac(dc(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var o=t.getUTCFullYear();if(i.isTwoDigitYear){var r=mc(i.year,o);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),bc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",130),Mh(xh(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return ac(dc(4,t),o);case"Yo":return ac(i.ordinalNumber(t,{unit:"year"}),o);default:return ac(dc(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,o){var r=Ol(t,o);if(i.isTwoDigitYear){var s=mc(i.year,r);return t.setUTCFullYear(s,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Pl(t,o)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Pl(t,o)}}]),e}(),gc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",130),Mh(xh(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e){return uc("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var o=new Date(0);return o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0),Il(o)}}]),e}(),yc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",130),Mh(xh(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e){return uc("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),wc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",120),Mh(xh(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return dc(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),xc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",120),Mh(xh(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return dc(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),_c=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Mh(xh(i),"priority",110),i}return Ih(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"M":return ac(lc(jh,t),o);case"MM":return ac(dc(2,t),o);case"Mo":return ac(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),kc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",110),Mh(xh(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"L":return ac(lc(jh,t),o);case"LL":return ac(dc(2,t),o);case"Lo":return ac(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Cc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",100),Mh(xh(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return lc(Rh,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,o){return Pl(function(t,e,i){Cl(2,arguments);var o=Al(t),r=kl(e),s=Nl(o,i)-r;return o.setUTCDate(o.getUTCDate()-7*s),o}(t,i,o),o)}}]),e}(),Ac=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",100),Mh(xh(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return lc(Rh,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Il(function(t,e){Cl(2,arguments);var i=Al(t),o=kl(e),r=El(i)-o;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Sc=[31,28,31,30,31,30,31,31,30,31,30,31],zc=[31,29,31,30,31,30,31,31,30,31,30,31],Tc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"subPriority",1),Mh(xh(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return lc(Fh,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){var i=vc(t.getUTCFullYear()),o=t.getUTCMonth();return i?e>=1&&e<=zc[o]:e>=1&&e<=Sc[o]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Dc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"subpriority",1),Mh(xh(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return lc(Lh,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return vc(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Ic(t,e,i){var o,r,s,n,a,l,h,c;Cl(2,arguments);var d=zl(),u=kl(null!==(o=null!==(r=null!==(s=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==s?s:d.weekStartsOn)&&void 0!==r?r:null===(h=d.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Al(t),m=kl(e),v=((m%7+7)%7<u?7:0)+m-p.getUTCDay();return p.setUTCDate(p.getUTCDate()+v),p}var Mc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ic(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Ec=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return ac(dc(e.length,t),r);case"eo":return ac(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ic(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Pc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return ac(dc(e.length,t),r);case"co":return ac(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ic(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Oc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",90),Mh(xh(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){var o=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return dc(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return ac(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return ac(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return ac(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return ac(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){Cl(2,arguments);var i=kl(e);i%7==0&&(i-=7);var o=Al(t),r=((i%7+7)%7<1?7:0)+i-o.getUTCDay();return o.setUTCDate(o.getUTCDate()+r),o}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Nc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",80),Mh(xh(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(pc(i),0,0,0),t}}]),e}(),Bc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",80),Mh(xh(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(pc(i),0,0,0),t}}]),e}(),jc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",80),Mh(xh(i),"incompatibleTokens",["a","b","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(pc(i),0,0,0),t}}]),e}(),Fc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",70),Mh(xh(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return lc(Wh,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:o||12!==i?i:0,0,0,0),t}}]),e}(),Lc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",70),Mh(xh(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return lc(qh,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Rc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",70),Mh(xh(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return lc(Vh,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:i,0,0,0),t}}]),e}(),qc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",70),Mh(xh(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return lc($h,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),$c=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",60),Mh(xh(i),"incompatibleTokens",["t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return lc(Uh,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Vc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",50),Mh(xh(i),"incompatibleTokens",["t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return lc(Yh,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return dc(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),Wc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",30),Mh(xh(i),"incompatibleTokens",["t","T"]),i}return Ih(e,[{key:"parse",value:function(t,e){return ac(dc(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),Uc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",10),Mh(xh(i),"incompatibleTokens",["t","T","x"]),i}return Ih(e,[{key:"parse",value:function(t,e){switch(e){case"X":return hc(ic,t);case"XX":return hc(oc,t);case"XXXX":return hc(rc,t);case"XXXXX":return hc(nc,t);default:return hc(sc,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Yc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",10),Mh(xh(i),"incompatibleTokens",["t","T","X"]),i}return Ih(e,[{key:"parse",value:function(t,e){switch(e){case"x":return hc(ic,t);case"xx":return hc(oc,t);case"xxxx":return hc(rc,t);case"xxxxx":return hc(nc,t);default:return hc(sc,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Hc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",40),Mh(xh(i),"incompatibleTokens","*"),i}return Ih(e,[{key:"parse",value:function(t){return cc(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Gc=function(){kh(e,Nh);var t=Sh(e);function e(){var i;zh(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mh(xh(i=t.call.apply(t,[this].concat(r))),"priority",20),Mh(xh(i),"incompatibleTokens","*"),i}return Ih(e,[{key:"parse",value:function(t){return cc(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Kc={G:new Bh,y:new fc,Y:new bc,R:new gc,u:new yc,Q:new wc,q:new xc,M:new _c,L:new kc,w:new Cc,I:new Ac,d:new Tc,D:new Dc,E:new Mc,e:new Ec,c:new Pc,i:new Oc,a:new Nc,b:new Bc,B:new jc,h:new Fc,H:new Lc,K:new Rc,k:new qc,m:new $c,s:new Vc,S:new Wc,X:new Uc,x:new Yc,t:new Hc,T:new Gc},Qc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Xc=/^'([^]*?)'?$/,Zc=/''/g,td=/\S/,ed=/[a-zA-Z]/;const id=class{constructor(e){t(this,e),this.stylingInitialized=!1,this.calendarMaxDate="",this.fetchToken=0,this.fetchData=async()=>{if(!this.playerid||!this.session||!this.endpoint)return;this.fetchToken++;const t=this.fetchToken;this.isLoading=!0,this.errorMessage=null;const{startDate:e,endDate:i}=this.getDateRange(),o={"X-SessionId":this.session},r=this.endpoint.replace(/\/$/,""),s=(this.currentPage*this.itemsPerPage).toString(),n=this.itemsPerPage.toString();try{const a=[];let l=!1,h=!1;if(["All","Payments"].includes(this.activeTab)){const t=new URL(`${r}/v1/player/${this.playerid}/transactions/banking`,window.location.origin);t.searchParams.append("limit",n),t.searchParams.append("offset",s),t.searchParams.append("startDate",bh(new Date(e),"yyyy-MM-dd")),t.searchParams.append("endDate",bh(new Date(i),"yyyy-MM-dd")),a.push(fetch(t.href,{method:"GET",headers:o}).then((t=>t.ok?t.json():null)).then((t=>{var e;return l=!!(null===(e=null==t?void 0:t.pagination)||void 0===e?void 0:e.next),this.normalizeBankingData(t)})))}if(["All","Casino","Sports","Bonus"].includes(this.activeTab)){const t=new URL(`${r}/v1/player/${this.playerid}/transactions/wagering`,window.location.origin);t.searchParams.append("type","All"===this.activeTab?"All":this.activeTab),t.searchParams.append("limit",n),t.searchParams.append("offset",s),t.searchParams.append("startDate",e),t.searchParams.append("endDate",i),a.push(fetch(t.href,{method:"GET",headers:o}).then((t=>t.ok?t.json():null)).then((t=>{var e;return h=!!(null===(e=null==t?void 0:t.pagination)||void 0===e?void 0:e.next),this.normalizeWageringData(t)})))}const c=await Promise.all(a);if(this.fetchToken!==t)return;const d=c.flat().filter(Boolean);d.sort(((t,e)=>e.timestamp-t.timestamp)),this.transactions=d,this.hasNextPage=l||h,this.isLoading=!1,window.postMessage({type:"ScrollToTop"},window.location.href)}catch(e){if(this.fetchToken!==t)return;this.errorMessage=this.translate("errorLoading"),this.isLoading=!1}},this.scrollToTop=()=>{this.statementContainer&&setTimeout((()=>{this.statementContainer.scrollIntoView({behavior:"smooth",block:"start"})}),50)},this.goToPrevPage=()=>{this.currentPage>0&&(this.currentPage--,this.fetchData(),this.scrollToTop())},this.goToNextPage=()=>{this.hasNextPage&&(this.currentPage++,this.fetchData(),this.scrollToTop())},this.formatDate=t=>t?bh(new Date(t.year,t.month,t.day),this.dateformat):"",this.parseDate=t=>{const e=t.includes("/")?"/":"-",i=t.split(e);let o=i[0],r=i[1],s=i[2];return 4===i[0].length&&(s=i[0],r=i[1],o=i[2]),{year:parseInt(s),month:parseInt(r)-1,day:parseInt(o)}},this.handleStartDateChange=t=>{const e=t.target;e.value&&(this.customStartDate=e.value)},this.handleEndDateChange=t=>{const e=t.target;e.value&&(this.customEndDate=e.value)},this.mbsource="",this.clientStyling=void 0,this.clientStylingUrl=void 0,this.session="",this.playerid="",this.endpoint="",this.statementenabled="",this.postMessage=!1,this.language="",this.quickFiltersActive=!1,this.clientStylingUrlContent="",this.dateformat="dd-MM-yyyy",this.translationUrl="",this.activeTab="All",this.activeFilter="1D",this.transactions=[],this.isLoading=!1,this.errorMessage=null,this.customStartDate="",this.customEndDate="",this.currentPage=0,this.hasNextPage=!1,this.itemsPerPage=10,this.copiedId=null,this.isStatementEnabled=!0}translate(t){const e=(t=>{var e,i;return(null===(e=c[this.language||"en"])||void 0===e?void 0:e[t])||(null===(i=c.en)||void 0===i?void 0:i[t])})(t);return!e&&t?t.charAt(0).toUpperCase()+t.slice(1):e||t}initStyling(){this.statementContainer&&!this.stylingInitialized&&(this.mbsource&&n(this.statementContainer,`${this.mbsource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.statementContainer,this.clientStyling),this.clientStylingUrl&&s(this.statementContainer,this.clientStylingUrl),this.stylingInitialized=!0)}formatCurrencyAmount(t){return null==t||isNaN(t)?"0.00":t.toFixed(2)}isDateRangeExceeded(){if(!this.customStartDate||!this.customEndDate)return!1;const t=new Date(this.customStartDate).getTime(),e=new Date(this.customEndDate).getTime(),i=Math.abs(e-t);return Math.ceil(i/864e5)>180}async componentWillLoad(){var t;this.translationUrl&&await(t=this.translationUrl,new Promise(((e,i)=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{const i=e;c[i]||(c[i]={});for(let o in t[e])c[i][o]=t[e][o]})),e(c)})).catch((t=>{i(t)}))}))).catch((t=>{console.error("Failed to load translations",t)}));const e=new Date;this.calendarMaxDate=bh(e,"yyyy-MM-dd"),this.customEndDate=bh(e,"yyyy-MM-dd"),this.customStartDate=bh(function(t,e){return Cl(2,arguments),function(t,e){Cl(2,arguments);var i=Al(t),o=kl(e);if(isNaN(o))return new Date(NaN);if(!o)return i;var r=i.getDate(),s=new Date(i.getTime());return s.setMonth(i.getMonth()+o+1,0),r>=s.getDate()?s:(i.setFullYear(s.getFullYear(),s.getMonth(),r),i)}(t,-kl(e))}(e,1),"yyyy-MM-dd")}handleStatementEnabledChange(t){"false"===t?window.location.replace("/account/profile-info"):"true"===t&&(this.isStatementEnabled=!1)}handleTabChange(){this.resetPaginationAndFetch()}handleFilterChange(t){"Custom"!==t&&this.resetPaginationAndFetch()}handleClientStylingChange(t,e){t!==e&&r(this.statementContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&s(this.statementContainer,this.clientStylingUrl)}handlembsourceChange(t,e){t!==e&&n(this.statementContainer,`${this.mbsource}.Style`,this.stylingSubscription)}handleAuthDataChange(){this.endpoint&&this.playerid&&this.session&&this.fetchData()}componentDidUpdate(){this.initStyling()}componentDidLoad(){"false"===this.statementenabled?window.location.replace("/account/profile-info"):"true"===this.statementenabled&&(this.isStatementEnabled=!1),this.initStyling()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}resetPaginationAndFetch(){this.currentPage=0,this.hasNextPage=!1,this.fetchData()}formatDateForUI(t){if(!t)return"";const e=new Date(t);return`${this.translate(h[e.getDay()].toLowerCase())} ${String(e.getDate()).padStart(2,"0")}/${String(e.getMonth()+1).padStart(2,"0")} - ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}formattedToIso(t,e){const i=function(t,e,i,o){var r,s,n,a,l,h,c,d,u,p,m,v,f,b,g,y,w,x;Cl(3,arguments);var _=String(t),k=String(e),C=zl(),A=null!==(r=null!==(s=null==o?void 0:o.locale)&&void 0!==s?s:C.locale)&&void 0!==r?r:dh;if(!A.match)throw new RangeError("locale must contain match property");var S=kl(null!==(n=null!==(a=null!==(l=null!==(h=null==o?void 0:o.firstWeekContainsDate)&&void 0!==h?h:null==o||null===(c=o.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==l?l:C.firstWeekContainsDate)&&void 0!==a?a:null===(u=C.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=kl(null!==(m=null!==(v=null!==(f=null!==(b=null==o?void 0:o.weekStartsOn)&&void 0!==b?b:null==o||null===(g=o.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==f?f:C.weekStartsOn)&&void 0!==v?v:null===(w=C.locale)||void 0===w||null===(x=w.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==m?m:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===_?Al(i):new Date(NaN);var T,D={firstWeekContainsDate:S,weekStartsOn:z,locale:A},I=[new Oh],M=k.match(Jc).map((function(t){var e=t[0];return e in Xl?(0,Xl[e])(t,A.formatLong):t})).join("").match(Qc),E=[],P=wh(M);try{var O=function(){var e=T.value;null!=o&&o.useAdditionalWeekYearTokens||!ih(e)||oh(e,k,t),null!=o&&o.useAdditionalDayOfYearTokens||!eh(e)||oh(e,k,t);var i=e[0],r=Kc[i];if(r){var s=r.incompatibleTokens;if(Array.isArray(s)){var n=E.find((function(t){return s.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&E.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));E.push({token:i,fullToken:e});var a=r.run(_,e,A.match,D);if(!a)return{v:new Date(NaN)};I.push(a.setter),_=a.rest}else{if(i.match(ed))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(Xc)[1].replace(Zc,"'")),0!==_.indexOf(e))return{v:new Date(NaN)};_=_.slice(e.length)}};for(P.s();!(T=P.n()).done;){var N=O();if("object"===_l(N))return N.v}}catch(t){P.e(t)}finally{P.f()}if(_.length>0&&td.test(_))return new Date(NaN);var B=I.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return I.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),j=Al(i);if(isNaN(j.getTime()))return new Date(NaN);var F,L=Dl(j,Tl(j)),R={},q=wh(B);try{for(q.s();!(F=q.n()).done;){var $=F.value;if(!$.validate(L,D))return new Date(NaN);var V=$.set(L,R,D);Array.isArray(V)?(L=V[0],gh(R,V[1])):L=V}}catch(t){q.e(t)}finally{q.f()}return L}(t,"yyyy-MM-dd",new Date),o=e?function(t){Cl(1,arguments);var e=Al(t);return e.setHours(23,59,59,999),e}(i):function(t){Cl(1,arguments);var e=Al(t);return e.setHours(0,0,0,0),e}(i);return bh(o,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")}getDateRange(){if("Custom"===this.activeFilter)return{startDate:this.formattedToIso(this.customStartDate,!1),endDate:this.formattedToIso(this.customEndDate,!0)};const t=new Date,e=new Date;switch(this.activeFilter){case"1D":e.setDate(e.getDate()-1);break;case"1W":e.setDate(e.getDate()-7);break;case"1M":e.setMonth(e.getMonth()-1);break;case"3M":e.setMonth(e.getMonth()-3)}return{startDate:e.toISOString(),endDate:t.toISOString()}}parseAmount(t){return null==t?0:"object"==typeof t&&void 0!==t.parsedValue?Number(t.parsedValue)||0:Number(t)||0}normalizeBankingData(t){return t&&t.transactions?t.transactions.map((t=>{var e;const i=1===t.type||14===t.type,o=null!==(e=t.realAmount)&&void 0!==e?e:t.creditAmount;let r=t.transIdStr;!r&&t.transId&&(r="object"==typeof t.transId?t.transId.source||t.transId.parsedValue:t.transId);const s=i?"withdrawal":"deposit",n=t.status?String(t.status).toLowerCase():"";return{id:r?String(r).startsWith("#")?String(r):`#${r}`:this.translate("na"),category:this.translate(s),status:n?this.translate(n):null,statusClass:n,amount:Math.abs(this.parseAmount(o)),currency:t.currencyCode||t.currency||"",balance:null,date:this.formatDateForUI(t.created),isPositive:!i,timestamp:new Date(t.created).getTime()}})):[]}normalizeWageringData(t){return t&&t.transactions?t.transactions.map((t=>{var e,i;const o="Credit"===t.transName||"2"===t.transType;let r=this.translate("casino");(null===(e=t.gameModel)||void 0===e?void 0:e.name)?r=`${this.translate("casino")} / ${t.gameModel.name}`:t.gameId&&(r=`${this.translate("casino")} / ${t.gameId}`);const s=o?"won":"Debit"===t.transName||"1"===t.transType?"placed":String(t.transName).toLowerCase(),n=null!==(i=t.realAmount)&&void 0!==i?i:t.totalAmount;return{id:t.transId,category:r,status:this.translate(s),statusClass:o?"won":"placed",amount:Math.abs(this.parseAmount(n)),currency:t.currencyCode||t.currency||"",balance:this.parseAmount(t.balance),date:this.formatDateForUI(t.ins),isPositive:o,timestamp:new Date(t.ins).getTime()}})):[]}execCommandCopy(t){const e=document.createElement("textarea");e.value=t,Object.assign(e.style,{position:"fixed",opacity:"0"}),document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}async copyToClipboard(t){try{navigator.clipboard&&navigator.clipboard.writeText?await navigator.clipboard.writeText(t):this.execCommandCopy(t),this.copiedId=t,setTimeout((()=>{this.copiedId===t&&(this.copiedId=null)}),2e3)}catch(e){try{this.execCommandCopy(t),this.copiedId=t,setTimeout((()=>{this.copiedId===t&&(this.copiedId=null)}),2e3)}catch(t){console.error(this.translate("failedToCopyText"),t)}}}setDateFormat(t){t&&!t.__i18nConfigured&&(t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),t.__i18nConfigured=!0)}isSubmitEnabled(){if(!this.customStartDate||!this.customEndDate)return!1;const t=new Date(this.customStartDate).getTime(),e=new Date(this.customEndDate).getTime();return!(t>e)&&Math.ceil(Math.abs(e-t)/864e5)<=180}render(){return this.isStatementEnabled?e("div",{class:"verify-access-loading"},e("div",{class:"loading-text"},this.translate("loading"))):e("div",{ref:t=>this.statementContainer=t,class:"statement-wrapper"},e("div",{class:"header"},e("h2",null,this.translate("transactionHistory"))),e("div",{class:"tabs-container desktop-tabs"},a.map((t=>e("button",{class:"tab-btn "+(this.activeTab===t?"active":""),onClick:()=>this.activeTab=t},this.translate(t.toLowerCase()))))),e("div",{class:"mobile-tabs-select"},e("select",Object.assign({onChange:t=>this.activeTab=t.target.value},{value:this.activeTab}),a.map((t=>e("option",{value:t},this.translate(t.toLowerCase())))))),e("div",{class:"card-container"},e("div",{class:"filters-container"},l.map((t=>e("button",{class:"filter-btn "+(this.activeFilter===t?"active":""),onClick:()=>this.activeFilter=t},this.translate(t.toLowerCase()))))),"Custom"===this.activeFilter&&e("div",{class:"custom-date-wrapper"},e("div",{class:"calendar-container"},e("div",{class:"calendar-field"},e("label",null,this.translate("from")),e("vaadin-date-picker",{value:this.customStartDate,max:this.calendarMaxDate,onChange:this.handleStartDateChange,ref:t=>this.setDateFormat(t),class:"VaadinDatePicker"})),e("div",{class:"calendar-field"},e("label",null,this.translate("to")),e("vaadin-date-picker",{value:this.customEndDate,min:this.customStartDate,max:this.calendarMaxDate,onChange:this.handleEndDateChange,ref:t=>this.setDateFormat(t),class:"VaadinDatePicker"}))),e("button",{class:"apply-date-btn",disabled:!this.isSubmitEnabled()||this.isLoading,onClick:()=>this.resetPaginationAndFetch()},this.translate("apply")),this.isDateRangeExceeded()&&e("div",{class:"date-limit-warning"},this.translate("maxRange"))),e("div",{class:"transactions-list"},this.isLoading&&e("div",{class:"empty-state"},this.translate("loading")),!this.isLoading&&this.errorMessage&&e("div",{class:"empty-state error"},this.errorMessage),!this.isLoading&&!this.errorMessage&&0===this.transactions.length&&e("div",{class:"empty-state"},this.translate("noData")),!this.isLoading&&!this.errorMessage&&this.transactions.length>0&&this.transactions.map((t=>e("div",{class:"transaction-item"},e("div",{class:"row top-row"},e("div",{class:"category-group"},e("span",{class:"category"},t.category),t.status&&e("span",{class:`status-badge ${t.statusClass}`},t.status)),e("span",{class:"amount "+(t.isPositive?"positive":"negative")},t.isPositive?"+":"-"," ",t.currency," ",this.formatCurrencyAmount(t.amount))),e("div",{class:"row middle-row"},e("span",{class:"transaction-id"},t.id.startsWith("#")?t.id:`#${t.id}`),e("div",{class:"copy-action-wrapper",onClick:()=>this.copyToClipboard(t.id)},e("svg",{class:"copy-icon",viewBox:"0 0 24 24",width:"25",height:"25"},e("rect",{x:"9",y:"9",width:"10",height:"10",rx:"1",ry:"1"}),e("rect",{x:"5",y:"5",width:"10",height:"10",rx:"1",ry:"1"})),this.copiedId===t.id&&e("span",{class:"copied-tooltip"},this.translate("copied")))),e("div",{class:"row bottom-row"},e("span",{class:"date"},t.date),e("span",{class:"balance"},null!=t.balance&&!isNaN(t.balance)&&e(i,null,this.translate("balance")," ",e("strong",null,t.currency," ",this.formatCurrencyAmount(t.balance))))))))),!this.isLoading&&this.transactions.length>0&&(this.currentPage>0||this.hasNextPage)&&e("div",{class:"pagination-container"},e("button",{class:"pagination-btn prev-btn",disabled:0===this.currentPage,onClick:this.goToPrevPage},this.translate("prev")),e("span",{class:"page-indicator"},this.translate("page")," ",this.currentPage+1),e("button",{class:"pagination-btn next-btn",disabled:!this.hasNextPage,onClick:this.goToNextPage},this.translate("next")))))}static get watchers(){return{statementenabled:["handleStatementEnabledChange"],activeTab:["handleTabChange"],activeFilter:["handleFilterChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbsource:["handlembsourceChange"],session:["handleAuthDataChange"],playerid:["handleAuthDataChange"],endpoint:["handleAuthDataChange"]}}};id.style=':host{display:block;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;color:var(--emw--color-contrast, #333);height:auto;min-height:100%}.statement-wrapper{max-width:100%;width:100%;min-height:100%;height:auto;box-sizing:border-box;background-color:var(--emw--color-white, #ffffff);border-radius:10px;padding:30px 40px;display:flex;flex-direction:column}@media (max-width: 600px){.statement-wrapper{padding:15px;background-color:transparent}}.header{margin-bottom:20px}.header h2{font-size:19px;font-weight:700;margin:0;color:var(--emw--color-contrast, #1a1a1a)}.desktop-tabs{display:flex;gap:10px;margin-bottom:20px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:5px}.desktop-tabs::-webkit-scrollbar{height:4px}.desktop-tabs::-webkit-scrollbar-thumb{background-color:var(--emw--color-gray-200, #ccc);border-radius:4px}.desktop-tabs .tab-btn{padding:8px 16px;border:none;border-radius:20px;font-size:14px;font-weight:500;cursor:pointer;background-color:var(--emw--color-gray-100, #f0f0f0);color:var(--emw--color-gray-300, #666);transition:all 0.2s ease;white-space:nowrap}.desktop-tabs .tab-btn.active{background-color:var(--emw--color-primary, #ff6b00);color:var(--emw--color-white, #fff)}.desktop-tabs .tab-btn:hover:not(.active){background-color:var(--emw--color-gray-200, #e4e4e4)}@media (max-width: 600px){.desktop-tabs{display:none}}.mobile-tabs-select{display:none;margin-bottom:20px}.mobile-tabs-select select{width:100%;padding:12px 16px;border-radius:8px;border:1px solid var(--emw--color-gray-200, #ddd);font-size:16px;font-weight:500;color:var(--emw--color-black, #000);background-color:var(--emw--color-white, #fff);appearance:none;background:var(--emw--color-white, #fff) url(\'data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>\') 97% center no-repeat;box-shadow:0 2px 4px rgba(0, 0, 0, 0.02)}.mobile-tabs-select select:focus{outline:none;border-color:var(--emw--color-primary, #ff6b00)}@media (max-width: 600px){.mobile-tabs-select{display:block}}.card-container{background:transparent;border-radius:0;padding:0;box-shadow:none;margin-top:20px;display:flex;flex-direction:column;flex:1 0 auto}.filters-container{display:flex;gap:20px;border-bottom:1px solid var(--emw--color-gray-100, #eee);padding-bottom:12px;margin-bottom:16px;overflow-x:auto;white-space:nowrap}.filters-container .filter-btn{background:none;border:none;font-size:14px;font-weight:600;color:var(--emw--color-gray-150, #888);cursor:pointer;padding:0}.filters-container .filter-btn.active{color:var(--emw--color-primary, #ff6b00)}.filters-container .filter-btn:hover{color:var(--emw--color-contrast, #333)}.custom-date-wrapper{display:flex;flex-direction:column;align-items:flex-start;gap:16px;margin-bottom:24px}@media (max-width: 600px){.custom-date-wrapper{align-items:stretch}}.custom-date-wrapper .calendar-container{display:flex;flex-direction:row;align-items:center;gap:20px;width:100%;box-sizing:border-box;background-color:var(--emw--color-background, #f8f9fa);border:1px solid var(--emw--color-gray-100, #eee);border-radius:8px;padding:12px 16px}@media (max-width: 600px){.custom-date-wrapper .calendar-container{flex-direction:column;align-items:stretch;gap:16px;padding:16px}}.custom-date-wrapper .date-limit-warning{color:var(--emw--color-error, #d32f2f);font-size:13px;margin-top:8px;width:100%}.custom-date-wrapper .calendar-field{display:flex;flex-direction:row;align-items:center;gap:12px;flex:1}@media (max-width: 600px){.custom-date-wrapper .calendar-field{flex-direction:column;align-items:flex-start;gap:4px}}.custom-date-wrapper .calendar-field label{font-size:14px;font-weight:500;color:var(--emw--color-white, #ffffff);min-width:40px;margin:0;white-space:nowrap}.custom-date-wrapper .calendar-field .VaadinDatePicker{width:100%;flex:1}.custom-date-wrapper .apply-date-btn{padding:0 24px;height:44px;background-color:var(--emw--color-primary, #ff6b00);color:var(--emw--color-white, #fff);border:none;border-radius:6px;font-weight:600;font-size:15px;cursor:pointer;transition:background-color 0.2s;white-space:nowrap}@media (max-width: 600px){.custom-date-wrapper .apply-date-btn{width:100%}}.custom-date-wrapper .apply-date-btn:hover:not(:disabled){background-color:var(--emw--color-hover, #e66000)}.custom-date-wrapper .apply-date-btn:disabled{background-color:var(--emw--color-primary-disabled, #ffd6b3);color:var(--emw--color-white, #fff);cursor:not-allowed}vaadin-date-picker.VaadinDatePicker{box-shadow:none;border:1px solid var(--emw--pam-border, rgba(255, 255, 255, 0.3));border-radius:var(--emw--border-radius, 8px);background-color:transparent}vaadin-date-picker.VaadinDatePicker input[slot=input],vaadin-date-picker.VaadinDatePicker input[id^=search-input-vaadin-date-picker]{color:var(--emw--color-white, #ffffff) !important;background-color:transparent;padding-left:12px;border:none;border-radius:var(--emw--border-radius, 8px);box-shadow:none !important;outline:none;-webkit-appearance:none}vaadin-date-picker.VaadinDatePicker:focus-within{border-color:var(--emw--color-primary, #ffc107)}.transactions-list{display:flex;flex-direction:column;flex:1 0 auto}.transactions-list .empty-state{padding:30px;text-align:center;color:var(--emw--color-gray-300, #666);font-size:14px}.transactions-list .empty-state.error{color:var(--emw--color-error, #d32f2f)}.transactions-list .transaction-item{border-bottom:1px solid var(--emw--color-gray-100, #f0f0f0);padding:16px 0;display:flex;flex-direction:column;gap:10px}.transactions-list .transaction-item:last-child{border-bottom:none;padding-bottom:0}.transactions-list .transaction-item .row{display:flex;justify-content:space-between;align-items:center}.transactions-list .transaction-item .category-group{display:flex;align-items:center;gap:8px}.transactions-list .transaction-item .category-group .category{font-size:14px;color:var(--emw--color-secondary, #5bb4ff)}.transactions-list .transaction-item .category-group .status-badge{font-size:12px;padding:3px 8px;border-radius:12px;font-weight:600}.transactions-list .transaction-item .category-group .status-badge.won,.transactions-list .transaction-item .category-group .status-badge.success{background-color:var(--emw--color-valid-bg, #e8f5e9);color:var(--emw--color-valid, #4caf50)}.transactions-list .transaction-item .category-group .status-badge.placed{background-color:var(--emw--color-info-bg, #e3f2fd);color:var(--emw--color-info, #2196f3)}.transactions-list .transaction-item .category-group .status-badge.tax{background-color:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #607d8b)}.transactions-list .transaction-item .category-group .status-badge.pendingnotification,.transactions-list .transaction-item .category-group .status-badge.pending{color:var(--emw--color-pending, #F5A623)}.transactions-list .transaction-item .category-group .status-badge.failed,.transactions-list .transaction-item .category-group .status-badge.declined,.transactions-list .transaction-item .category-group .status-badge.cancelled{color:var(--emw--color-error, #d32f2f)}.transactions-list .transaction-item .amount{font-size:15px;font-weight:600}.transactions-list .transaction-item .amount.positive{color:var(--emw--color-valid, #4caf50)}.transactions-list .transaction-item .amount.negative{color:var(--emw--color-secondary, #5bb4ff)}.transactions-list .transaction-item .middle-row{justify-content:space-between}.transactions-list .transaction-item .middle-row .transaction-id{font-size:14px;font-weight:600;color:var(--emw--color-contrast, #333);word-break:break-all;padding-right:16px}.transactions-list .transaction-item .middle-row .copy-action-wrapper{position:relative;display:flex;align-items:center;min-width:30px;min-height:30px;justify-content:center;cursor:pointer;padding:8px;margin-right:-8px}.transactions-list .transaction-item .middle-row .copy-action-wrapper .copy-icon{fill:var(--emw--color-gray-300, #4a4a4a);stroke:var(--emw--color-white, #ffffff);stroke-width:2px;cursor:pointer;transition:transform 0.1s;pointer-events:none}.transactions-list .transaction-item .middle-row .copy-action-wrapper .copy-icon:hover .copy-icon{transform:scale(1.1)}.transactions-list .transaction-item .middle-row .copy-action-wrapper .copy-icon:active{transform:scale(0.95)}.transactions-list .transaction-item .middle-row .copy-action-wrapper .copied-tooltip{position:absolute;right:100%;margin-right:8px;background:var(--emw--color-contrast, #333);color:var(--emw--color-white, #fff);font-size:12px;font-weight:500;padding:2px 6px;border-radius:4px;white-space:nowrap;pointer-events:none;animation:fadeInOutCopy 2s ease forwards}.transactions-list .transaction-item .bottom-row{font-size:13px;color:var(--emw--color-gray-150, #888)}.transactions-list .transaction-item .bottom-row .balance strong{color:var(--emw--color-contrast, #333)}@keyframes fadeInOutCopy{0%{opacity:0;transform:translateX(5px)}10%{opacity:1;transform:translateX(0)}80%{opacity:1;transform:translateX(0)}100%{opacity:0}}.pagination-container{display:flex;justify-content:space-between;align-items:center;margin-top:24px;padding-top:16px;border-top:1px solid var(--emw--color-gray-100, #eee);margin-bottom:20px}@media (max-width: 600px){.pagination-container{padding-bottom:calc(90px + env(safe-area-inset-bottom, 0px));margin-bottom:0}}.pagination-container .pagination-btn{background-color:var(--emw--color-white, #fff);border:1px solid var(--emw--color-gray-200, #ddd);color:var(--emw--color-primary, #ff6b00);font-size:14px;font-weight:600;padding:8px 16px;border-radius:4px;cursor:pointer;transition:all 0.2s;display:flex;align-items:center;gap:8px}.pagination-container .pagination-btn:hover:not(:disabled){background-color:var(--emw--color-primary-light, #fff5f0);border-color:var(--emw--color-primary, #ff6b00)}.pagination-container .pagination-btn:disabled{color:var(--emw--color-gray-200, #bbb);border-color:var(--emw--color-gray-100, #eee);cursor:not-allowed}.pagination-container .pagination-btn.next-btn::after{content:">";font-weight:bold}.pagination-container .pagination-btn.prev-btn::before{content:"<";font-weight:bold}.pagination-container .page-indicator{color:var(--emw--color-gray-300, #666);font-size:14px;font-weight:500}.verify-access-loading{height:100dvh;border:2px solid red;background-color:var(--emw--color-white, #ffffff);display:flex;justify-content:center;align-items:center}.verify-access-loading .loading-text{color:var(--emw--color-gray-300, #666666);font-size:16px;font-weight:500}';export{id as P}
|