@everymatrix/lottery-game-page 0.1.26 → 1.13.4
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/helper-accordion.cjs.entry.js +10 -2
- package/dist/cjs/helper-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-filters_2.cjs.entry.js +1716 -1002
- package/dist/cjs/helper-filters_2.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-modal.cjs.entry.js +2 -0
- package/dist/cjs/helper-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-pagination.cjs.entry.js +14 -0
- package/dist/cjs/helper-pagination.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-tab.cjs.entry.js +2 -0
- package/dist/cjs/helper-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-tabs.cjs.entry.js +2 -0
- package/dist/cjs/helper-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/index-cd44e726.js +2 -0
- package/dist/cjs/index-cd44e726.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -1
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +13 -2
- package/dist/cjs/lottery-bullet_2.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +45 -16
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-game-details.cjs.entry.js +2 -0
- package/dist/cjs/lottery-game-details.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-game-page.cjs.entry.js +33 -27
- package/dist/cjs/lottery-game-page.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-game-page.cjs.js +3 -1
- package/dist/cjs/lottery-game-page.cjs.js.map +1 -0
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +15 -2
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-ticket.cjs.entry.js +29 -7
- package/dist/cjs/lottery-ticket.cjs.entry.js.map +1 -0
- package/dist/collection/components/lottery-game-page/lottery-game-page.css +10 -1
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +83 -32
- package/dist/collection/components/lottery-game-page/lottery-game-page.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/locale.utils.js +1 -0
- package/dist/collection/utils/locale.utils.js.map +1 -0
- package/dist/collection/utils/utils.js +1 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/helper-accordion.js +2 -0
- package/dist/components/helper-accordion.js.map +1 -0
- package/dist/components/helper-accordion2.js +10 -2
- package/dist/components/helper-accordion2.js.map +1 -0
- package/dist/components/helper-filters.js +2 -0
- package/dist/components/helper-filters.js.map +1 -0
- package/dist/components/helper-filters2.js +1696 -974
- package/dist/components/helper-filters2.js.map +1 -0
- package/dist/components/helper-modal.js +2 -0
- package/dist/components/helper-modal.js.map +1 -0
- package/dist/components/helper-modal2.js +2 -0
- package/dist/components/helper-modal2.js.map +1 -0
- package/dist/components/helper-pagination.js +14 -0
- package/dist/components/helper-pagination.js.map +1 -0
- package/dist/components/helper-tab.js +2 -0
- package/dist/components/helper-tab.js.map +1 -0
- package/dist/components/helper-tab2.js +2 -0
- package/dist/components/helper-tab2.js.map +1 -0
- package/dist/components/helper-tabs.js +2 -0
- package/dist/components/helper-tabs.js.map +1 -0
- package/dist/components/helper-tabs2.js +2 -0
- package/dist/components/helper-tabs2.js.map +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/lottery-bullet.js +2 -0
- package/dist/components/lottery-bullet.js.map +1 -0
- package/dist/components/lottery-bullet2.js +2 -0
- package/dist/components/lottery-bullet2.js.map +1 -0
- package/dist/components/lottery-draw-results-history.js +2 -0
- package/dist/components/lottery-draw-results-history.js.map +1 -0
- package/dist/components/lottery-draw-results-history2.js +46 -17
- package/dist/components/lottery-draw-results-history2.js.map +1 -0
- package/dist/components/lottery-draw-results.js +2 -0
- package/dist/components/lottery-draw-results.js.map +1 -0
- package/dist/components/lottery-draw-results2.js +95 -101
- package/dist/components/lottery-draw-results2.js.map +1 -0
- package/dist/components/lottery-game-details.js +2 -0
- package/dist/components/lottery-game-details.js.map +1 -0
- package/dist/components/lottery-game-details2.js +2 -0
- package/dist/components/lottery-game-details2.js.map +1 -0
- package/dist/components/lottery-game-page.js +35 -28
- package/dist/components/lottery-game-page.js.map +1 -0
- package/dist/components/lottery-grid.js +2 -0
- package/dist/components/lottery-grid.js.map +1 -0
- package/dist/components/lottery-grid2.js +13 -2
- package/dist/components/lottery-grid2.js.map +1 -0
- package/dist/components/lottery-ticket-controller.js +2 -0
- package/dist/components/lottery-ticket-controller.js.map +1 -0
- package/dist/components/lottery-ticket-controller2.js +30 -16
- package/dist/components/lottery-ticket-controller2.js.map +1 -0
- package/dist/components/lottery-ticket.js +2 -0
- package/dist/components/lottery-ticket.js.map +1 -0
- package/dist/components/lottery-ticket2.js +29 -7
- package/dist/components/lottery-ticket2.js.map +1 -0
- package/dist/esm/helper-accordion.entry.js +10 -2
- package/dist/esm/helper-accordion.entry.js.map +1 -0
- package/dist/esm/helper-filters_2.entry.js +1716 -1002
- package/dist/esm/helper-filters_2.entry.js.map +1 -0
- package/dist/esm/helper-modal.entry.js +2 -0
- package/dist/esm/helper-modal.entry.js.map +1 -0
- package/dist/esm/helper-pagination.entry.js +14 -0
- package/dist/esm/helper-pagination.entry.js.map +1 -0
- package/dist/esm/helper-tab.entry.js +2 -0
- package/dist/esm/helper-tab.entry.js.map +1 -0
- package/dist/esm/helper-tabs.entry.js +2 -0
- package/dist/esm/helper-tabs.entry.js.map +1 -0
- package/dist/esm/index-d1baacd4.js +2 -0
- package/dist/esm/index-d1baacd4.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +3 -1
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/lottery-bullet_2.entry.js +13 -2
- package/dist/esm/lottery-bullet_2.entry.js.map +1 -0
- package/dist/esm/lottery-draw-results-history.entry.js +45 -16
- package/dist/esm/lottery-draw-results-history.entry.js.map +1 -0
- package/dist/esm/lottery-game-details.entry.js +2 -0
- package/dist/esm/lottery-game-details.entry.js.map +1 -0
- package/dist/esm/lottery-game-page.entry.js +34 -28
- package/dist/esm/lottery-game-page.entry.js.map +1 -0
- package/dist/esm/lottery-game-page.js +3 -1
- package/dist/esm/lottery-game-page.js.map +1 -0
- package/dist/esm/lottery-ticket-controller.entry.js +15 -2
- package/dist/esm/lottery-ticket-controller.entry.js.map +1 -0
- package/dist/esm/lottery-ticket.entry.js +29 -7
- package/dist/esm/lottery-ticket.entry.js.map +1 -0
- package/dist/lottery-game-page/index.esm.js +2 -0
- package/dist/lottery-game-page/index.esm.js.map +1 -0
- package/dist/lottery-game-page/lottery-game-page.esm.js +2 -1
- package/dist/lottery-game-page/lottery-game-page.esm.js.map +1 -0
- package/dist/lottery-game-page/p-042065c6.entry.js +2 -0
- package/dist/lottery-game-page/p-042065c6.entry.js.map +1 -0
- package/dist/lottery-game-page/p-15309f9a.entry.js +2 -0
- package/dist/lottery-game-page/p-15309f9a.entry.js.map +1 -0
- package/dist/lottery-game-page/p-167c9dbe.entry.js +2 -0
- package/dist/lottery-game-page/p-167c9dbe.entry.js.map +1 -0
- package/dist/lottery-game-page/p-2e78ed7b.entry.js +2 -0
- package/dist/lottery-game-page/p-2e78ed7b.entry.js.map +1 -0
- package/dist/lottery-game-page/p-5b49ab69.entry.js +2 -0
- package/dist/lottery-game-page/p-5b49ab69.entry.js.map +1 -0
- package/dist/lottery-game-page/p-606c0b0f.entry.js +2 -0
- package/dist/lottery-game-page/p-606c0b0f.entry.js.map +1 -0
- package/dist/lottery-game-page/p-662d9dac.entry.js +2 -0
- package/dist/lottery-game-page/p-662d9dac.entry.js.map +1 -0
- package/dist/lottery-game-page/p-66729e9c.entry.js +2 -0
- package/dist/lottery-game-page/p-66729e9c.entry.js.map +1 -0
- package/dist/lottery-game-page/p-76c280ec.entry.js +2 -0
- package/dist/lottery-game-page/p-76c280ec.entry.js.map +1 -0
- package/dist/lottery-game-page/p-a9ef5b8c.entry.js +2 -0
- package/dist/lottery-game-page/p-a9ef5b8c.entry.js.map +1 -0
- package/dist/lottery-game-page/p-aa68559a.entry.js +2 -0
- package/dist/lottery-game-page/p-aa68559a.entry.js.map +1 -0
- package/dist/lottery-game-page/p-d9e7b5da.entry.js +2899 -0
- package/dist/lottery-game-page/p-d9e7b5da.entry.js.map +1 -0
- package/dist/lottery-game-page/p-e765c7d9.js +2 -1
- package/dist/lottery-game-page/p-e765c7d9.js.map +1 -0
- package/dist/stencil.config.js +10 -1
- package/dist/stencil.config.js.map +1 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +2 -0
- package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +10 -1
- package/dist/types/components.d.ts +12 -2
- package/package.json +1 -1
- package/dist/components/assets/chrono_desktop.png +0 -0
- package/dist/components/assets/chrono_lottery_mobile.png +0 -0
- package/dist/lottery-game-page/p-023325a2.entry.js +0 -1
- package/dist/lottery-game-page/p-04fbc8fd.entry.js +0 -1
- package/dist/lottery-game-page/p-256b151c.entry.js +0 -1
- package/dist/lottery-game-page/p-381b5507.entry.js +0 -1
- package/dist/lottery-game-page/p-3f8b6ad9.entry.js +0 -1
- package/dist/lottery-game-page/p-4274053c.entry.js +0 -1
- package/dist/lottery-game-page/p-4f81cd37.entry.js +0 -1
- package/dist/lottery-game-page/p-5c389034.entry.js +0 -1
- package/dist/lottery-game-page/p-7d06371e.entry.js +0 -1
- package/dist/lottery-game-page/p-ca8430a0.entry.js +0 -2849
- package/dist/lottery-game-page/p-d6f76e8d.entry.js +0 -1
- package/dist/lottery-game-page/p-f6fcc22c.entry.js +0 -1
- package/dist/lottery-game-page/static/chrono_desktop.png +0 -0
- package/dist/lottery-game-page/static/chrono_lottery_mobile.png +0 -0
- package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
- /package/dist/{collection/components/lottery-game-page/static → assets}/chrono_desktop.png +0 -0
- /package/dist/{collection/components/lottery-game-page/static → assets}/chrono_lottery_mobile.png +0 -0
|
@@ -0,0 +1,2899 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-e765c7d9.js";const s="en";const r=["ro","en"];const o={en:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ro:{filterOpen:"Filtrare",filterClear:"Stergere",filterModalTicketTitle:"Rezultatele biletelor",filterModalDrawTitle:"Rezultatele draw-urilor",filterTicketPlaceholder:"Cauta ID bilet",filterDrawPlaceholder:"Cauta ID draw",filterDateRangePlaceholder:"Perioada",filterModalButton:"Cauta",filterOrDate:"sau cauta dupa data"},fr:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ar:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"}};const n=(t,e)=>{const i=e;return o[i!==undefined&&r.includes(i)?i:s][t]};
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
5
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
|
+
*/class a extends HTMLElement{static get version(){return"23.3.14"}}customElements.define("vaadin-lumo-styles",a);
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2019 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/const l=window,h=l.ShadowRoot&&(void 0===l.ShadyCSS||l.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),u=new WeakMap;class d{constructor(t,e,i){if(this._$cssResult$=!0,i!==c)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(h&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=u.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&u.set(e,t))}return t}toString(){return this.cssText}}const f=t=>new d("string"==typeof t?t:t+"",void 0,c),p=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>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[s+1]),t[0]);return new d(i,t,c)},m=(t,e)=>{h?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),s=l.litNonce;void 0!==s&&i.setAttribute("nonce",s),i.textContent=e.cssText,t.appendChild(i)}))},b=h?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return f(e)})(t):t
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2017 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/;var g;const v=window,y=v.trustedTypes,w=y?y.emptyScript:"",x=v.reactiveElementPolyfillSupport,_={toAttribute(t,e){switch(e){case Boolean:t=t?w: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}},k=(t,e)=>e!==t&&(e==e||t==t),A={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:k};class D extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const s=this._$Ep(i,e);void 0!==s&&(this._$Ev.set(s,i),t.push(s))})),t}static createProperty(t,e=A){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const r=this[t];this[e]=s,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||A}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}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(b(t))}else void 0!==t&&e.push(b(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return m(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=A){var s;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==(null===(s=i.converter)||void 0===s?void 0:s.toAttribute)?i.converter:_).toAttribute(e,i.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,r=s._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=s.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:_;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||k)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}D.finalized=!0,D.elementProperties=new Map,D.elementStyles=[],D.shadowRootOptions={mode:"open"},null==x||x({ReactiveElement:D}),(null!==(g=v.reactiveElementVersions)&&void 0!==g?g:v.reactiveElementVersions=[]).push("1.6.1");
|
|
17
|
+
/**
|
|
18
|
+
* @license
|
|
19
|
+
* Copyright 2017 Google LLC
|
|
20
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
+
*/var C;const T=window,S=T.trustedTypes,M=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,z="$lit$",P=`lit$${(Math.random()+"").slice(9)}$`,E="?"+P,F=`<${E}>`,O=document,B=()=>O.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,R=t=>N(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),j="[ \t\n\f\r]",L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,H=/-->/g,W=/>/g,U=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),$=/'/g,G=/"/g,Y=/^(?:script|style|textarea|title)$/i,q=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),J=new WeakMap,K=O.createTreeWalker(O,129,null,!1),Z=(t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"<svg>":"",n=L;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===L?"!--"===l[1]?n=H:void 0!==l[1]?n=W:void 0!==l[2]?(Y.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=U):void 0!==l[3]&&(n=U):n===U?">"===l[0]?(n=null!=r?r:L,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?U:'"'===l[3]?G:$):n===G||n===$?n=U:n===H||n===W?n=L:(n=U,r=void 0);const u=n===U&&t[e+1].startsWith("/>")?" ":"";o+=n===L?i+F:h>=0?(s.push(a),i.slice(0,h)+z+i.slice(h)+P+u):i+P+(-2===h?(s.push(void 0),e):u)}const a=o+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==M?M.createHTML(a):a,s]};class X{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,h]=Z(t,e);if(this.el=X.createElement(l,i),K.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=K.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith(z)||e.startsWith(P)){const i=h[o++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+z).split(P),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?st:"?"===e[1]?ot:"@"===e[1]?nt:it})}else a.push({type:6,index:r})}for(const e of t)s.removeAttribute(e)}if(Y.test(s.tagName)){const t=s.textContent.split(P),e=t.length-1;if(e>0){s.textContent=S?S.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],B()),K.nextNode(),a.push({type:2,index:++r});s.append(t[e],B())}}}else if(8===s.nodeType)if(s.data===E)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(P,t+1));)a.push({type:7,index:r}),t+=P.length-1}r++}}static createElement(t,e){const i=O.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,s){var r,o,n,a;if(e===q)return e;let l=void 0!==s?null===(r=i._$Co)||void 0===r?void 0:r[s]:i._$Cl;const h=I(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,s)),void 0!==s?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[s]=l:i._$Cl=l),void 0!==l&&(e=Q(t,l._$AS(t,e.values),l,s)),e}class tt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:O).importNode(i,!0);K.currentNode=r;let o=K.nextNode(),n=0,a=0,l=s[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new et(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new at(o,this,t)),this._$AV.push(e),l=s[++a]}n!==(null==l?void 0:l.index)&&(o=K.nextNode(),n++)}return K.currentNode=O,r}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class et{constructor(t,e,i,s){var r;this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=null===(r=null==s?void 0:s.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),I(t)?t===V||null==t||""===t?(this._$AH!==V&&this._$AR(),this._$AH=V):t!==this._$AH&&t!==q&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):R(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==V&&I(this._$AH)?this._$AA.nextSibling.data=t:this.$(O.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,r="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=X.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new tt(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=J.get(t.strings);return void 0===e&&J.set(t.strings,e=new X(t)),e}T(t){N(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new et(this.k(B()),this.k(B()),this,this.options)):i=e[s],i._$AI(r),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class it{constructor(t,e,i,s,r){this.type=1,this._$AH=V,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=V}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=Q(this,t,e,0),o=!I(t)||t!==this._$AH&&t!==q,o&&(this._$AH=t);else{const s=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=Q(this,s[i+n],e,n),a===q&&(a=this._$AH[n]),o||(o=!I(a)||a!==this._$AH[n]),a===V?t=V:t!==V&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}o&&!s&&this.j(t)}j(t){t===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class st extends it{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===V?void 0:t}}const rt=S?S.emptyScript:"";class ot extends it{constructor(){super(...arguments),this.type=4}j(t){t&&t!==V?this.element.setAttribute(this.name,rt):this.element.removeAttribute(this.name)}}class nt extends it{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Q(this,t,e,0))&&void 0!==i?i:V)===q)return;const s=this._$AH,r=t===V&&s!==V||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==V&&(s===V||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class at{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const lt=T.litHtmlPolyfillSupport;null==lt||lt(X,et),(null!==(C=T.litHtmlVersions)&&void 0!==C?C:T.litHtmlVersions=[]).push("2.7.4");const ht=(t,e,i)=>{var s,r;const o=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new et(e.insertBefore(B(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n
|
|
22
|
+
/**
|
|
23
|
+
* @license
|
|
24
|
+
* Copyright 2017 Google LLC
|
|
25
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
26
|
+
*/};var ct,ut;class dt extends D{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return q}}dt.finalized=!0,dt._$litElement$=!0,null===(ct=globalThis.litElementHydrateSupport)||void 0===ct||ct.call(globalThis,{LitElement:dt});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:dt});(null!==(ut=globalThis.litElementVersions)&&void 0!==ut?ut:globalThis.litElementVersions=[]).push("3.3.2");
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
30
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
31
|
+
*/const pt=t=>class e extends t{static get properties(){return{theme:{type:String,reflectToAttribute:true,observer:"__deprecatedThemePropertyChanged"},_theme:{type:String,readOnly:true}}}__deprecatedThemePropertyChanged(t){this._set_theme(t)}}
|
|
32
|
+
/**
|
|
33
|
+
* @license
|
|
34
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
35
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
36
|
+
*/;const mt=[];function bt(t,e,i={}){if(t){if(At(t)){console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`)}}e=wt(e);if(window.Vaadin&&window.Vaadin.styleModules){window.Vaadin.styleModules.registerStyles(t,e,i)}else{mt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId})}}function gt(){if(window.Vaadin&&window.Vaadin.styleModules){return window.Vaadin.styleModules.getAllThemes()}return mt}function vt(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`).test(e)))}function yt(t=""){let e=0;if(t.startsWith("lumo-")||t.startsWith("material-")){e=1}else if(t.startsWith("vaadin-")){e=2}return e}function wt(t=[]){return[t].flat(Infinity).filter((t=>{if(t instanceof d){return true}console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`.");return false}))}function xt(t){const e=[];if(t.include){[].concat(t.include).forEach((t=>{const i=gt().find((e=>e.moduleId===t));if(i){e.push(...xt(i),...i.styles)}else{console.warn(`Included moduleId ${t} not found in style registry`)}}),t.styles)}return e}function _t(t,e){const i=document.createElement("style");i.innerHTML=t.map((t=>t.cssText)).join("\n");e.content.appendChild(i)}function kt(t){const e=`${t}-default-theme`;const i=gt().filter((i=>i.moduleId!==e&&vt(i.themeFor,t))).map((t=>({...t,styles:[...xt(t),...t.styles],includePriority:yt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));if(i.length>0){return i}return gt().filter((t=>t.moduleId===e))}function At(t){return Dt(customElements.get(t))}function Dt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}const Ct=t=>class e extends(pt(t)){static finalize(){super.finalize();if(this.elementStyles){return}const t=this.prototype._template;if(!t||Dt(this)){return}_t(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...super.finalizeStyles(t),...e]:e}static getStylesForThis(){const t=Object.getPrototypeOf(this.prototype);const e=(t?t.constructor.__themes:[])||[];this.__themes=[...e,...kt(this.is)];const i=this.__themes.flatMap((t=>t.styles));return i.filter(((t,e)=>e===i.lastIndexOf(t)))}}
|
|
37
|
+
/**
|
|
38
|
+
* @license
|
|
39
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
40
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
41
|
+
*/;const Tt=p`
|
|
42
|
+
:host {
|
|
43
|
+
/* Base (background) */
|
|
44
|
+
--lumo-base-color: #fff;
|
|
45
|
+
|
|
46
|
+
/* Tint */
|
|
47
|
+
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
48
|
+
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
49
|
+
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
50
|
+
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
51
|
+
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
52
|
+
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
53
|
+
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
54
|
+
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
55
|
+
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
56
|
+
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
57
|
+
--lumo-tint: #fff;
|
|
58
|
+
|
|
59
|
+
/* Shade */
|
|
60
|
+
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
61
|
+
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
62
|
+
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
63
|
+
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
64
|
+
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
65
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
66
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
67
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
68
|
+
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
69
|
+
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
70
|
+
--lumo-shade: hsl(214, 35%, 15%);
|
|
71
|
+
|
|
72
|
+
/* Contrast */
|
|
73
|
+
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
74
|
+
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
75
|
+
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
76
|
+
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
77
|
+
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
78
|
+
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
79
|
+
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
80
|
+
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
81
|
+
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
82
|
+
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
83
|
+
--lumo-contrast: var(--lumo-shade);
|
|
84
|
+
|
|
85
|
+
/* Text */
|
|
86
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
87
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
88
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
89
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
90
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
91
|
+
|
|
92
|
+
/* Primary */
|
|
93
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
94
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
95
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
96
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
97
|
+
--lumo-primary-contrast-color: #fff;
|
|
98
|
+
|
|
99
|
+
/* Error */
|
|
100
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
|
101
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
102
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
103
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
104
|
+
--lumo-error-contrast-color: #fff;
|
|
105
|
+
|
|
106
|
+
/* Success */
|
|
107
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
108
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
109
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
110
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
111
|
+
--lumo-success-contrast-color: #fff;
|
|
112
|
+
}
|
|
113
|
+
`;const St=document.createElement("template");St.innerHTML=`<style>${Tt.toString().replace(":host","html")}</style>`;document.head.appendChild(St.content);const Mt=p`
|
|
114
|
+
[theme~='dark'] {
|
|
115
|
+
/* Base (background) */
|
|
116
|
+
--lumo-base-color: hsl(214, 35%, 21%);
|
|
117
|
+
|
|
118
|
+
/* Tint */
|
|
119
|
+
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
120
|
+
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
121
|
+
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
122
|
+
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
123
|
+
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
124
|
+
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
125
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
126
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
127
|
+
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
128
|
+
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
129
|
+
--lumo-tint: hsl(214, 100%, 98%);
|
|
130
|
+
|
|
131
|
+
/* Shade */
|
|
132
|
+
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
133
|
+
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
134
|
+
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
135
|
+
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
136
|
+
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
137
|
+
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
138
|
+
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
139
|
+
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
140
|
+
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
141
|
+
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
142
|
+
--lumo-shade: hsl(214, 33%, 13%);
|
|
143
|
+
|
|
144
|
+
/* Contrast */
|
|
145
|
+
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
146
|
+
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
147
|
+
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
148
|
+
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
149
|
+
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
150
|
+
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
151
|
+
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
152
|
+
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
153
|
+
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
154
|
+
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
155
|
+
--lumo-contrast: var(--lumo-tint);
|
|
156
|
+
|
|
157
|
+
/* Text */
|
|
158
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
159
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
160
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
161
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
162
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
163
|
+
|
|
164
|
+
/* Primary */
|
|
165
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
166
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
167
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
168
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
169
|
+
--lumo-primary-contrast-color: #fff;
|
|
170
|
+
|
|
171
|
+
/* Error */
|
|
172
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
|
173
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
174
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
175
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
176
|
+
|
|
177
|
+
/* Success */
|
|
178
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
179
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
180
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
181
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
html {
|
|
185
|
+
color: var(--lumo-body-text-color);
|
|
186
|
+
background-color: var(--lumo-base-color);
|
|
187
|
+
color-scheme: light;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
[theme~='dark'] {
|
|
191
|
+
color: var(--lumo-body-text-color);
|
|
192
|
+
background-color: var(--lumo-base-color);
|
|
193
|
+
color-scheme: dark;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
h1,
|
|
197
|
+
h2,
|
|
198
|
+
h3,
|
|
199
|
+
h4,
|
|
200
|
+
h5,
|
|
201
|
+
h6 {
|
|
202
|
+
color: var(--lumo-header-text-color);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
a:where(:any-link) {
|
|
206
|
+
color: var(--lumo-primary-text-color);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
a:not(:any-link) {
|
|
210
|
+
color: var(--lumo-disabled-text-color);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
blockquote {
|
|
214
|
+
color: var(--lumo-secondary-text-color);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
code,
|
|
218
|
+
pre {
|
|
219
|
+
background-color: var(--lumo-contrast-10pct);
|
|
220
|
+
border-radius: var(--lumo-border-radius-m);
|
|
221
|
+
}
|
|
222
|
+
`;bt("",Mt,{moduleId:"lumo-color"});const zt=p`
|
|
223
|
+
:host {
|
|
224
|
+
color: var(--lumo-body-text-color) !important;
|
|
225
|
+
background-color: var(--lumo-base-color) !important;
|
|
226
|
+
}
|
|
227
|
+
`;bt("",[Mt,zt],{moduleId:"lumo-color-legacy"});
|
|
228
|
+
/**
|
|
229
|
+
* @license
|
|
230
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
231
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
232
|
+
*/const Pt=p`
|
|
233
|
+
:host {
|
|
234
|
+
--lumo-size-xs: 1.625rem;
|
|
235
|
+
--lumo-size-s: 1.875rem;
|
|
236
|
+
--lumo-size-m: 2.25rem;
|
|
237
|
+
--lumo-size-l: 2.75rem;
|
|
238
|
+
--lumo-size-xl: 3.5rem;
|
|
239
|
+
|
|
240
|
+
/* Icons */
|
|
241
|
+
--lumo-icon-size-s: 1.25em;
|
|
242
|
+
--lumo-icon-size-m: 1.5em;
|
|
243
|
+
--lumo-icon-size-l: 2.25em;
|
|
244
|
+
/* For backwards compatibility */
|
|
245
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
246
|
+
}
|
|
247
|
+
`;const Et=document.createElement("template");Et.innerHTML=`<style>${Pt.toString().replace(":host","html")}</style>`;document.head.appendChild(Et.content);
|
|
248
|
+
/**
|
|
249
|
+
* @license
|
|
250
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
251
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
252
|
+
*/const Ft=p`
|
|
253
|
+
:host {
|
|
254
|
+
/* Border radius */
|
|
255
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
256
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
257
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
258
|
+
--lumo-border-radius: 0.25em; /* Deprecated */
|
|
259
|
+
|
|
260
|
+
/* Shadow */
|
|
261
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
262
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
263
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
264
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
265
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
266
|
+
|
|
267
|
+
/* Clickable element cursor */
|
|
268
|
+
--lumo-clickable-cursor: default;
|
|
269
|
+
}
|
|
270
|
+
`;p`
|
|
271
|
+
html {
|
|
272
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
273
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
274
|
+
}
|
|
275
|
+
`;const Ot=document.createElement("template");Ot.innerHTML=`<style>${Ft.toString().replace(":host","html")}$</style>`;document.head.appendChild(Ot.content);
|
|
276
|
+
/**
|
|
277
|
+
* @license
|
|
278
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
279
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
280
|
+
*/const Bt=p`
|
|
281
|
+
:host {
|
|
282
|
+
/* prettier-ignore */
|
|
283
|
+
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
284
|
+
|
|
285
|
+
/* Font sizes */
|
|
286
|
+
--lumo-font-size-xxs: 0.75rem;
|
|
287
|
+
--lumo-font-size-xs: 0.8125rem;
|
|
288
|
+
--lumo-font-size-s: 0.875rem;
|
|
289
|
+
--lumo-font-size-m: 1rem;
|
|
290
|
+
--lumo-font-size-l: 1.125rem;
|
|
291
|
+
--lumo-font-size-xl: 1.375rem;
|
|
292
|
+
--lumo-font-size-xxl: 1.75rem;
|
|
293
|
+
--lumo-font-size-xxxl: 2.5rem;
|
|
294
|
+
|
|
295
|
+
/* Line heights */
|
|
296
|
+
--lumo-line-height-xs: 1.25;
|
|
297
|
+
--lumo-line-height-s: 1.375;
|
|
298
|
+
--lumo-line-height-m: 1.625;
|
|
299
|
+
}
|
|
300
|
+
`;const It=p`
|
|
301
|
+
html,
|
|
302
|
+
:host {
|
|
303
|
+
font-family: var(--lumo-font-family);
|
|
304
|
+
font-size: var(--lumo-font-size, var(--lumo-font-size-m));
|
|
305
|
+
line-height: var(--lumo-line-height-m);
|
|
306
|
+
-webkit-text-size-adjust: 100%;
|
|
307
|
+
-webkit-font-smoothing: antialiased;
|
|
308
|
+
-moz-osx-font-smoothing: grayscale;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
small,
|
|
312
|
+
[theme~='font-size-s'] {
|
|
313
|
+
font-size: var(--lumo-font-size-s);
|
|
314
|
+
line-height: var(--lumo-line-height-s);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
[theme~='font-size-xs'] {
|
|
318
|
+
font-size: var(--lumo-font-size-xs);
|
|
319
|
+
line-height: var(--lumo-line-height-xs);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
h1,
|
|
323
|
+
h2,
|
|
324
|
+
h3,
|
|
325
|
+
h4,
|
|
326
|
+
h5,
|
|
327
|
+
h6 {
|
|
328
|
+
font-weight: 600;
|
|
329
|
+
line-height: var(--lumo-line-height-xs);
|
|
330
|
+
margin-top: 1.25em;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
h1 {
|
|
334
|
+
font-size: var(--lumo-font-size-xxxl);
|
|
335
|
+
margin-bottom: 0.75em;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
h2 {
|
|
339
|
+
font-size: var(--lumo-font-size-xxl);
|
|
340
|
+
margin-bottom: 0.5em;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
h3 {
|
|
344
|
+
font-size: var(--lumo-font-size-xl);
|
|
345
|
+
margin-bottom: 0.5em;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
h4 {
|
|
349
|
+
font-size: var(--lumo-font-size-l);
|
|
350
|
+
margin-bottom: 0.5em;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
h5 {
|
|
354
|
+
font-size: var(--lumo-font-size-m);
|
|
355
|
+
margin-bottom: 0.25em;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
h6 {
|
|
359
|
+
font-size: var(--lumo-font-size-xs);
|
|
360
|
+
margin-bottom: 0;
|
|
361
|
+
text-transform: uppercase;
|
|
362
|
+
letter-spacing: 0.03em;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
p,
|
|
366
|
+
blockquote {
|
|
367
|
+
margin-top: 0.5em;
|
|
368
|
+
margin-bottom: 0.75em;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
a {
|
|
372
|
+
text-decoration: none;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
a:where(:any-link):hover {
|
|
376
|
+
text-decoration: underline;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
hr {
|
|
380
|
+
display: block;
|
|
381
|
+
align-self: stretch;
|
|
382
|
+
height: 1px;
|
|
383
|
+
border: 0;
|
|
384
|
+
padding: 0;
|
|
385
|
+
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
|
386
|
+
background-color: var(--lumo-contrast-10pct);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
blockquote {
|
|
390
|
+
border-left: 2px solid var(--lumo-contrast-30pct);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
b,
|
|
394
|
+
strong {
|
|
395
|
+
font-weight: 600;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* RTL specific styles */
|
|
399
|
+
blockquote[dir='rtl'] {
|
|
400
|
+
border-left: none;
|
|
401
|
+
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
402
|
+
}
|
|
403
|
+
`;bt("",It,{moduleId:"lumo-typography"});const Nt=document.createElement("template");Nt.innerHTML=`<style>${Bt.toString().replace(":host","html")}</style>`;document.head.appendChild(Nt.content);bt("vaadin-input-container",p`
|
|
404
|
+
:host {
|
|
405
|
+
border-radius: var(--lumo-border-radius-m);
|
|
406
|
+
background-color: var(--lumo-contrast-10pct);
|
|
407
|
+
padding: 0 calc(0.375em + var(--lumo-border-radius-m) / 4 - 1px);
|
|
408
|
+
font-weight: 500;
|
|
409
|
+
line-height: 1;
|
|
410
|
+
position: relative;
|
|
411
|
+
cursor: text;
|
|
412
|
+
box-sizing: border-box;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/* Used for hover and activation effects */
|
|
416
|
+
:host::after {
|
|
417
|
+
content: '';
|
|
418
|
+
position: absolute;
|
|
419
|
+
top: 0;
|
|
420
|
+
right: 0;
|
|
421
|
+
bottom: 0;
|
|
422
|
+
left: 0;
|
|
423
|
+
border-radius: inherit;
|
|
424
|
+
pointer-events: none;
|
|
425
|
+
background-color: var(--lumo-contrast-50pct);
|
|
426
|
+
opacity: 0;
|
|
427
|
+
transition: transform 0.15s, opacity 0.2s;
|
|
428
|
+
transform-origin: 100% 0;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
::slotted(:not([slot$='fix'])) {
|
|
432
|
+
cursor: inherit;
|
|
433
|
+
min-height: var(--lumo-text-field-size, var(--lumo-size-m));
|
|
434
|
+
padding: 0 0.25em;
|
|
435
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
436
|
+
-webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
437
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/* Read-only */
|
|
441
|
+
:host([readonly]) {
|
|
442
|
+
color: var(--lumo-secondary-text-color);
|
|
443
|
+
background-color: transparent;
|
|
444
|
+
cursor: default;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
:host([readonly])::after {
|
|
448
|
+
background-color: transparent;
|
|
449
|
+
opacity: 1;
|
|
450
|
+
border: 1px dashed var(--lumo-contrast-30pct);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/* Disabled */
|
|
454
|
+
:host([disabled]) {
|
|
455
|
+
background-color: var(--lumo-contrast-5pct);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
:host([disabled]) ::slotted(*) {
|
|
459
|
+
color: var(--lumo-disabled-text-color);
|
|
460
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/* Invalid */
|
|
464
|
+
:host([invalid]) {
|
|
465
|
+
background-color: var(--lumo-error-color-10pct);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
:host([invalid])::after {
|
|
469
|
+
background-color: var(--lumo-error-color-50pct);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/* Slotted icons */
|
|
473
|
+
::slotted(iron-icon),
|
|
474
|
+
::slotted(vaadin-icon) {
|
|
475
|
+
color: var(--lumo-contrast-60pct);
|
|
476
|
+
width: var(--lumo-icon-size-m);
|
|
477
|
+
height: var(--lumo-icon-size-m);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
481
|
+
::slotted(iron-icon[icon^='vaadin:']),
|
|
482
|
+
::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
483
|
+
padding: 0.25em;
|
|
484
|
+
box-sizing: border-box !important;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/* Text align */
|
|
488
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
489
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
@-moz-document url-prefix() {
|
|
493
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
494
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
499
|
+
text-align: start;
|
|
500
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
:host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
|
|
504
|
+
text-align: center;
|
|
505
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
509
|
+
text-align: end;
|
|
510
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
@-moz-document url-prefix() {
|
|
514
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
515
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
516
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
@-moz-document url-prefix() {
|
|
521
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
522
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
523
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/* RTL specific styles */
|
|
528
|
+
:host([dir='rtl'])::after {
|
|
529
|
+
transform-origin: 0% 0;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
533
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
:host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
537
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
541
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
@-moz-document url-prefix() {
|
|
545
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
546
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
547
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
@-moz-document url-prefix() {
|
|
552
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
553
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
554
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
`,{moduleId:"lumo-input-container"});
|
|
558
|
+
/**
|
|
559
|
+
@license
|
|
560
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
561
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
562
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
563
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
564
|
+
Code distributed by Google as part of the polymer project is also
|
|
565
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
566
|
+
*/window.JSCompiler_renameProperty=function(t,e){return t};
|
|
567
|
+
/**
|
|
568
|
+
@license
|
|
569
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
570
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
571
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
572
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
573
|
+
Code distributed by Google as part of the polymer project is also
|
|
574
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
575
|
+
*/let Rt=/(url\()([^)]*)(\))/g;let jt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;let Lt;let Ht;function Wt(t,e){if(t&&jt.test(t)){return t}if(t==="//"){return t}if(Lt===undefined){Lt=false;try{const t=new URL("b","http://a");t.pathname="c%20d";Lt=t.href==="http://a/c%20d"}catch(t){}}if(!e){e=document.baseURI||window.location.href}if(Lt){try{return new URL(t,e).href}catch(e){return t}}if(!Ht){Ht=document.implementation.createHTMLDocument("temp");Ht.base=Ht.createElement("base");Ht.head.appendChild(Ht.base);Ht.anchor=Ht.createElement("a");Ht.body.appendChild(Ht.anchor)}Ht.base.href=e;Ht.anchor.href=t;return Ht.anchor.href||t}function Ut(t,e){return t.replace(Rt,(function(t,i,s,r){return i+"'"+Wt(s.replace(/["']/g,""),e)+"'"+r}))}function $t(t){return t.substring(0,t.lastIndexOf("/")+1)}
|
|
576
|
+
/**
|
|
577
|
+
@license
|
|
578
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
579
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
580
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
581
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
582
|
+
Code distributed by Google as part of the polymer project is also
|
|
583
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
584
|
+
*/const Gt=!window.ShadyDOM||!window.ShadyDOM.inUse;const Yt=Gt&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");e.attachShadow({mode:"open"});e.shadowRoot.adoptedStyleSheets=[t];return e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return false}})();let qt=window.Polymer&&window.Polymer.rootPath||$t(document.baseURI||window.location.href);let Vt=window.Polymer&&window.Polymer.sanitizeDOMValue||undefined;let Jt=window.Polymer&&window.Polymer.strictTemplatePolicy||false;let Kt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||false;let Zt=window.Polymer&&window.Polymer.legacyOptimizations||false;let Xt=window.Polymer&&window.Polymer.legacyWarnings||false;let Qt=window.Polymer&&window.Polymer.syncInitialRender||false;let te=window.Polymer&&window.Polymer.legacyUndefined||false;let ee=window.Polymer&&window.Polymer.orderedComputed||false;let ie=window.Polymer&&window.Polymer.removeNestedTemplates||false;let se=window.Polymer&&window.Polymer.fastDomIf||false;let re=window.Polymer&&window.Polymer.suppressTemplateNotifications||false;let oe=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||false;
|
|
585
|
+
/**
|
|
586
|
+
@license
|
|
587
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
588
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
589
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
590
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
591
|
+
Code distributed by Google as part of the polymer project is also
|
|
592
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
593
|
+
*/let ne=0;const ae=function(t){let e=t.__mixinApplications;if(!e){e=new WeakMap;t.__mixinApplications=e}let i=ne++;function s(s){let r=s.__mixinSet;if(r&&r[i]){return s}let o=e;let n=o.get(s);if(!n){n=t(s);o.set(s,n);let e=Object.create(n.__mixinSet||r||null);e[i]=true;n.__mixinSet=e}return n}return s};
|
|
594
|
+
/**
|
|
595
|
+
@license
|
|
596
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
597
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
598
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
599
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
600
|
+
Code distributed by Google as part of the polymer project is also
|
|
601
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
602
|
+
*/let le={};let he={};function ce(t,e){le[t]=he[t.toLowerCase()]=e}function ue(t){return le[t]||he[t.toLowerCase()]}function de(t){if(t.querySelector("style")){console.warn("dom-module %s has style outside template",t.id)}}class fe extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=ue(t);if(i&&e){return i.querySelector(e)}return i}return null}attributeChangedCallback(t,e,i,s){if(e!==i){this.register()}}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument;const e=Wt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=$t(e)}return this.__assetpath}register(t){t=t||this.id;if(t){if(Jt&&ue(t)!==undefined){ce(t,null);throw new Error(`strictTemplatePolicy: dom-module ${t} re-registered`)}this.id=t;ce(t,this);de(this)}}}fe.prototype["modules"]=le;customElements.define("dom-module",fe);
|
|
603
|
+
/**
|
|
604
|
+
@license
|
|
605
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
606
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
607
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
608
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
609
|
+
Code distributed by Google as part of the polymer project is also
|
|
610
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
611
|
+
*/const pe="link[rel=import][type~=css]";const me="include";const be="shady-unscoped";function ge(t){return fe.import(t)}function ve(t){let e=t.body?t.body:t;const i=Ut(e.textContent,t.baseURI);const s=document.createElement("style");s.textContent=i;return s}function ye(t){const e=t.trim().split(/\s+/);const i=[];for(let t=0;t<e.length;t++){i.push(...we(e[t]))}return i}function we(t){const e=ge(t);if(!e){console.warn("Could not find style data in module named",t);return[]}if(e._styles===undefined){const t=[];t.push(...ke(e));const i=e.querySelector("template");if(i){t.push(...xe(i,e.assetpath))}e._styles=t}return e._styles}function xe(t,e){if(!t._styles){const i=[];const s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let r=s[t];let o=r.getAttribute(me);if(o){i.push(...ye(o).filter((function(t,e,i){return i.indexOf(t)===e})))}if(e){r.textContent=Ut(r.textContent,e)}i.push(r)}t._styles=i}return t._styles}function _e(t){let e=ge(t);return e?ke(e):[]}function ke(t){const e=[];const i=t.querySelectorAll(pe);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import;const i=s.hasAttribute(be);if(i&&!t._unscopedStyle){const e=ve(t);e.setAttribute(be,"");t._unscopedStyle=e}else if(!t._style){t._style=ve(t)}e.push(i?t._unscopedStyle:t._style)}}return e}
|
|
612
|
+
/**
|
|
613
|
+
@license
|
|
614
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
615
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
616
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
617
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
618
|
+
Code distributed by Google as part of the polymer project is also
|
|
619
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
620
|
+
*/const Ae=window["ShadyDOM"]&&window["ShadyDOM"]["noPatch"]&&window["ShadyDOM"]["wrap"]?window["ShadyDOM"]["wrap"]:window["ShadyDOM"]?t=>ShadyDOM["patch"](t):t=>t;
|
|
621
|
+
/**
|
|
622
|
+
@license
|
|
623
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
624
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
625
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
626
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
627
|
+
Code distributed by Google as part of the polymer project is also
|
|
628
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
629
|
+
*/function De(t){return t.indexOf(".")>=0}function Ce(t){let e=t.indexOf(".");if(e===-1){return t}return t.slice(0,e)}function Te(t,e){return t.indexOf(e+".")===0}function Se(t,e){return e.indexOf(t+".")===0}function Me(t,e,i){return e+i.slice(t.length)}function ze(t,e){return t===e||Te(t,e)||Se(t,e)}function Pe(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++){e.push(s[t])}}return e.join(".")}else{return t}}function Ee(t){if(Array.isArray(t)){return Pe(t).split(".")}return t.toString().split(".")}function Fe(t,e,i){let s=t;let r=Ee(e);for(let t=0;t<r.length;t++){if(!s){return}let e=r[t];s=s[e]}if(i){i.path=r.join(".")}return s}function Oe(t,e,i){let s=t;let r=Ee(e);let o=r[r.length-1];if(r.length>1){for(let t=0;t<r.length-1;t++){let e=r[t];s=s[e];if(!s){return}}s[o]=i}else{s[e]=i}return r.join(".")}
|
|
630
|
+
/**
|
|
631
|
+
@license
|
|
632
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
633
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
634
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
635
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
636
|
+
Code distributed by Google as part of the polymer project is also
|
|
637
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
638
|
+
*/const Be={};const Ie=/-[a-z]/g;const Ne=/([A-Z])/g;function Re(t){return Be[t]||(Be[t]=t.indexOf("-")<0?t:t.replace(Ie,(t=>t[1].toUpperCase())))}function je(t){return Be[t]||(Be[t]=t.replace(Ne,"-$1").toLowerCase())}
|
|
639
|
+
/**
|
|
640
|
+
@license
|
|
641
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
642
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
643
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
644
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
645
|
+
Code distributed by Google as part of the polymer project is also
|
|
646
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
647
|
+
*/let Le=0;let He=0;let We=[];let Ue=0;let $e=false;let Ge=document.createTextNode("");new window.MutationObserver(Ye).observe(Ge,{characterData:true});function Ye(){$e=false;const t=We.length;for(let e=0;e<t;e++){let t=We[e];if(t){try{t()}catch(t){setTimeout((()=>{throw t}))}}}We.splice(0,t);He+=t}const qe={after(t){return{run(e){return window.setTimeout(e,t)},cancel(t){window.clearTimeout(t)}}},run(t,e){return window.setTimeout(t,e)},cancel(t){window.clearTimeout(t)}};const Ve={run(t){if(!$e){$e=true;Ge.textContent=Ue++}We.push(t);return Le++},cancel(t){const e=t-He;if(e>=0){if(!We[e]){throw new Error("invalid async handle: "+t)}We[e]=null}}};
|
|
648
|
+
/**
|
|
649
|
+
@license
|
|
650
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
651
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
652
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
653
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
654
|
+
Code distributed by Google as part of the polymer project is also
|
|
655
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
656
|
+
*/const Je=Ve;const Ke=ae((t=>{class e extends t{static createProperties(t){const e=this.prototype;for(let i in t){if(!(i in e)){e._createPropertyAccessor(i)}}}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t);if(!this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))){this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)}if(!this.__dataHasAccessor[t]){this.__dataHasAccessor[t]=true;this._definePropertyAccessor(t,e)}}_addPropertyToAttributeMap(t){if(!this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))){this.__dataAttributes=Object.assign({},this.__dataAttributes)}let e=this.__dataAttributes[t];if(!e){e=this.constructor.attributeNameForProperty(t);this.__dataAttributes[e]=t}return e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){if(this._setPendingProperty(t,e,true)){this._invalidateProperties()}}})}constructor(){super();this.__dataEnabled=false;this.__dataReady=false;this.__dataInvalid=false;this.__data={};this.__dataPending=null;this.__dataOld=null;this.__dataInstanceProps=null;this.__dataCounter=0;this.__serializing=false;this._initializeProperties()}ready(){this.__dataReady=true;this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor){if(this.hasOwnProperty(t)){this.__dataInstanceProps=this.__dataInstanceProps||{};this.__dataInstanceProps[t]=this[t];delete this[t]}}}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){if(this._setPendingProperty(t,e)){this._invalidateProperties()}}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t];let r=this._shouldPropertyChange(t,e,s);if(r){if(!this.__dataPending){this.__dataPending={};this.__dataOld={}}if(this.__dataOld&&!(t in this.__dataOld)){this.__dataOld[t]=s}this.__data[t]=e;this.__dataPending[t]=e}return r}_isPropertyPending(t){return!!(this.__dataPending&&this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){if(!this.__dataInvalid&&this.__dataReady){this.__dataInvalid=true;Je.run((()=>{if(this.__dataInvalid){this.__dataInvalid=false;this._flushProperties()}}))}}_enableProperties(){if(!this.__dataEnabled){this.__dataEnabled=true;if(this.__dataInstanceProps){this._initializeInstanceProperties(this.__dataInstanceProps);this.__dataInstanceProps=null}this.ready()}}_flushProperties(){this.__dataCounter++;const t=this.__data;const e=this.__dataPending;const i=this.__dataOld;if(this._shouldPropertiesChange(t,e,i)){this.__dataPending=null;this.__dataOld=null;this._propertiesChanged(t,e,i)}this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i===i||e===e)}attributeChangedCallback(t,e,i,s){if(e!==i){this._attributeToProperty(t,i)}if(super.attributeChangedCallback){super.attributeChangedCallback(t,e,i,s)}}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes;const r=s&&s[t]||t;this[r]=this._deserializeValue(e,i||this.constructor.typeForProperty(r))}}_propertyToAttribute(t,e,i){this.__serializing=true;i=arguments.length<3?this[t]:i;this._valueToNodeAttribute(this,i,e||this.constructor.attributeNameForProperty(t));this.__serializing=false}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);if(i==="class"||i==="name"||i==="slot"){t=Ae(t)}if(s===undefined){t.removeAttribute(i)}else{t.setAttribute(i,s===""&&window.trustedTypes?window.trustedTypes.emptyScript:s)}}_serializeValue(t){switch(typeof t){case"boolean":return t?"":undefined;default:return t!=null?t.toString():undefined}}_deserializeValue(t,e){switch(e){case Boolean:return t!==null;case Number:return Number(t);default:return t}}}return e}));
|
|
657
|
+
/**
|
|
658
|
+
@license
|
|
659
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
660
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
661
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
662
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
663
|
+
Code distributed by Google as part of the polymer project is also
|
|
664
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
665
|
+
*/const Ze={};let Xe=HTMLElement.prototype;while(Xe){let t=Object.getOwnPropertyNames(Xe);for(let e=0;e<t.length;e++){Ze[t[e]]=true}Xe=Object.getPrototypeOf(Xe)}const Qe=(()=>{if(!window.trustedTypes){return()=>false}return t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t)})();function ti(t,e){if(!Ze[e]){let i=t[e];if(i!==undefined){if(t.__data){t._setPendingProperty(e,i)}else{if(!t.__dataProto){t.__dataProto={}}else if(!t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))){t.__dataProto=Object.create(t.__dataProto)}t.__dataProto[e]=i}}}}const ei=ae((t=>{const e=Ke(t);class i extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++){this.prototype._createPropertyAccessor(Re(t[e]))}}static attributeNameForProperty(t){return je(t)}_initializeProperties(){if(this.__dataProto){this._initializeProtoProperties(this.__dataProto);this.__dataProto=null}super._initializeProperties()}_initializeProtoProperties(t){for(let e in t){this._setProperty(e,t[e])}}_ensureAttribute(t,e){const i=this;if(!i.hasAttribute(t)){this._valueToNodeAttribute(i,e,t)}}_serializeValue(t){switch(typeof t){case"object":if(t instanceof Date){return t.toString()}else if(t){if(Qe(t)){return t}try{return JSON.stringify(t)}catch(t){return""}}default:return super._serializeValue(t)}}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null;console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t);i=new Date(i);break;default:i=super._deserializeValue(t,e);break}return i}_definePropertyAccessor(t,e){ti(this,t);super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}return i}));
|
|
666
|
+
/**
|
|
667
|
+
@license
|
|
668
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
669
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
670
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
671
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
672
|
+
Code distributed by Google as part of the polymer project is also
|
|
673
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
674
|
+
*/const ii={"dom-if":true,"dom-repeat":true};let si=false;let ri=false;function oi(){if(!si){si=true;const t=document.createElement("textarea");t.placeholder="a";ri=t.placeholder===t.textContent}return ri}function ni(t){if(oi()&&t.localName==="textarea"&&t.placeholder&&t.placeholder===t.textContent){t.textContent=null}}const ai=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const r=i.getAttribute(s);if(t&&s.startsWith("on-")){e.setAttribute(s,t.createScript(r,s));return}e.setAttribute(s,r)}})();function li(t){let e=t.getAttribute("is");if(e&&ii[e]){let i=t;i.removeAttribute("is");t=i.ownerDocument.createElement(e);i.parentNode.replaceChild(t,i);t.appendChild(i);while(i.attributes.length){const{name:e}=i.attributes[0];ai(t,i,e);i.removeAttribute(e)}}return t}function hi(t,e){let i=e.parentInfo&&hi(t,e.parentInfo);if(i){for(let t=i.firstChild,s=0;t;t=t.nextSibling){if(e.parentIndex===s++){return t}}}else{return t}}function ci(t,e,i,s){if(s.id){e[s.id]=i}}function ui(t,e,i){if(i.events&&i.events.length){for(let s=0,r=i.events,o;s<r.length&&(o=r[s]);s++){t._addMethodEventListenerToNode(e,o.name,o.value,t)}}}function di(t,e,i,s){if(i.templateInfo){e._templateInfo=i.templateInfo;e._parentTemplateInfo=s}}function fi(t,e,i){t=t._methodHost||t;let s=function(e){if(t[i]){t[i](e,e.detail)}else{console.warn("listener method `"+i+"` not defined")}};return s}const pi=ae((t=>{class e extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[];i.nestedTemplate=Boolean(e);i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace");this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=false;let r=t;if(r.localName=="template"&&!r.hasAttribute("preserve-content")){s=this._parseTemplateNestedTemplate(r,e,i)||s}else if(r.localName==="slot"){e.hasInsertionPoint=true}ni(r);if(r.firstChild){this._parseTemplateChildNodes(r,e,i)}if(r.hasAttributes&&r.hasAttributes()){s=this._parseTemplateNodeAttributes(r,e,i)||s}return s||i.noted}static _parseTemplateChildNodes(t,e,i){if(t.localName==="script"||t.localName==="style"){return}for(let s=t.firstChild,r=0,o;s;s=o){if(s.localName=="template"){s=li(s)}o=s.nextSibling;if(s.nodeType===Node.TEXT_NODE){let i=o;while(i&&i.nodeType===Node.TEXT_NODE){s.textContent+=i.textContent;o=i.nextSibling;t.removeChild(i);i=o}if(e.stripWhiteSpace&&!s.textContent.trim()){t.removeChild(s);continue}}let n={parentIndex:r,parentInfo:i};if(this._parseTemplateNode(s,e,n)){n.infoIndex=e.nodeInfoList.push(n)-1}if(s.parentNode){r++}}}static _parseTemplateNestedTemplate(t,e,i){let s=t;let r=this._parseTemplate(s,e);let o=r.content=s.content.ownerDocument.createDocumentFragment();o.appendChild(s.content);i.templateInfo=r;return true}static _parseTemplateNodeAttributes(t,e,i){let s=false;let r=Array.from(t.attributes);for(let o=r.length-1,n;n=r[o];o--){s=this._parseTemplateNodeAttribute(t,e,i,n.name,n.value)||s}return s}static _parseTemplateNodeAttribute(t,e,i,s,r){if(s.slice(0,3)==="on-"){t.removeAttribute(s);i.events=i.events||[];i.events.push({name:s.slice(3),value:r});return true}else if(s==="id"){i.id=r;return true}return false}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){if(t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate){HTMLTemplateElement.decorate(t)}e=e||this.constructor._parseTemplate(t);let i=e.nodeInfoList;let s=e.content||t.content;let r=document.importNode(s,true);r.__noInsertionPoint=!e.hasInsertionPoint;let o=r.nodeList=new Array(i.length);r.$={};for(let t=0,s=i.length,n;t<s&&(n=i[t]);t++){let i=o[t]=hi(r,n);ci(this,r.$,i,n);di(this,i,n,e);ui(this,i,n)}r=r;return r}_addMethodEventListenerToNode(t,e,i,s){s=s||t;let r=fi(s,e,i);this._addEventListenerToNode(t,e,r);return r}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}return e}));
|
|
675
|
+
/**
|
|
676
|
+
* @fileoverview
|
|
677
|
+
* @suppress {checkPrototypalTypes}
|
|
678
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
679
|
+
* This code may only be used under the BSD style license found at
|
|
680
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
681
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
682
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
683
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
684
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
685
|
+
*/let mi=0;const bi=[];const gi={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"};const vi="__computeInfo";const yi=/[A-Z]/;function wi(t,e,i){let s=t[e];if(!s){s=t[e]={}}else if(!t.hasOwnProperty(e)){s=t[e]=Object.create(t[e]);if(i){for(let t in s){let e=s[t];let i=s[t]=Array(e.length);for(let t=0;t<e.length;t++){i[t]=e[t]}}}}return s}function xi(t,e,i,s,r,o){if(e){let n=false;const a=mi++;for(let l in i){let h=r?Ce(l):l;let c=e[h];if(c){for(let e=0,h=c.length,u;e<h&&(u=c[e]);e++){if((!u.info||u.info.lastRun!==a)&&(!r||ki(l,u.trigger))){if(u.info){u.info.lastRun=a}u.fn(t,l,i,s,u.info,r,o);n=true}}}}return n}return false}function _i(t,e,i,s,r,o,n,a){let l=false;let h=n?Ce(s):s;let c=e[h];if(c){for(let e=0,h=c.length,u;e<h&&(u=c[e]);e++){if((!u.info||u.info.lastRun!==i)&&(!n||ki(s,u.trigger))){if(u.info){u.info.lastRun=i}u.fn(t,s,r,o,u.info,n,a);l=true}}}return l}function ki(t,e){if(e){let i=e.name;return i==t||!!(e.structured&&Te(i,t))||!!(e.wildcard&&Se(i,t))}else{return true}}function Ai(t,e,i,s,r){let o=typeof r.method==="string"?t[r.method]:r.method;let n=r.property;if(o){o.call(t,t.__data[n],s[n])}else if(!r.dynamicFn){console.warn("observer method `"+r.method+"` not defined")}}function Di(t,e,i,s,r){let o=t[gi.NOTIFY];let n;let a=mi++;for(let l in e){if(e[l]){if(o&&_i(t,o,a,l,i,s,r)){n=true}else if(r&&Ci(t,l,i)){n=true}}}let l;if(n&&(l=t.__dataHost)&&l._invalidateProperties){l._invalidateProperties()}}function Ci(t,e,i){let s=Ce(e);if(s!==e){let r=je(s)+"-changed";Ti(t,r,i[e],e);return true}return false}function Ti(t,e,i,s){let r={value:i,queueProperty:true};if(s){r.path=s}Ae(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function Si(t,e,i,s,r,o){let n=o?Ce(e):e;let a=n!=e?e:null;let l=a?Fe(t,a):t.__data[e];if(a&&l===undefined){l=i[e]}Ti(t,r.eventName,l,a)}function Mi(t,e,i,s,r){let o;let n=t.detail;let a=n&&n.path;if(a){s=Me(i,s,a);o=n&&n.value}else{o=t.currentTarget[i]}o=r?!o:o;if(!e[gi.READ_ONLY]||!e[gi.READ_ONLY][s]){if(e._setPendingPropertyOrPath(s,o,true,Boolean(a))&&(!n||!n.queueProperty)){e._invalidateProperties()}}}function zi(t,e,i,s,r){let o=t.__data[e];if(Vt){o=Vt(o,r.attrName,"attribute",t)}t._propertyToAttribute(e,r.attrName,o)}function Pi(t,e,i,s){let r=t[gi.COMPUTE];if(r){if(ee){mi++;const o=Oi(t);const n=[];for(let t in e){Fi(t,r,n,o,s)}let a;while(a=n.shift()){if(Ii(t,"",e,i,a)){Fi(a.methodInfo,r,n,o,s)}}Object.assign(i,t.__dataOld);Object.assign(e,t.__dataPending);t.__dataPending=null}else{let o=e;while(xi(t,r,o,i,s)){Object.assign(i,t.__dataOld);Object.assign(e,t.__dataPending);o=t.__dataPending;t.__dataPending=null}}}}const Ei=(t,e,i)=>{let s=0;let r=e.length-1;let o=-1;while(s<=r){const n=s+r>>1;const a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0){s=n+1}else if(a>0){r=n-1}else{o=n;break}}if(o<0){o=r+1}e.splice(o,0,t)};const Fi=(t,e,i,s,r)=>{const o=r?Ce(t):t;const n=e[o];if(n){for(let e=0;e<n.length;e++){const o=n[e];if(o.info.lastRun!==mi&&(!r||ki(t,o.trigger))){o.info.lastRun=mi;Ei(o.info,i,s)}}}};function Oi(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[gi.COMPUTE];let{counts:s,ready:r,total:o}=Bi(t);let n;while(n=r.shift()){e.set(n,e.size);const t=i[n];if(t){t.forEach((t=>{const e=t.info.methodInfo;--o;if(--s[e]===0){r.push(e)}}))}}if(o!==0){const e=t;console.warn(`Computed graph for ${e.localName} incomplete; circular?`)}t.constructor.__orderedComputedDeps=e}return e}function Bi(t){const e=t[vi];const i={};const s=t[gi.COMPUTE];const r=[];let o=0;for(let t in e){const s=e[t];o+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s){if(!e[t]){r.push(t)}}return{counts:i,ready:r,total:o}}function Ii(t,e,i,s,r){let o=Vi(t,e,i,s,r);if(o===bi){return false}let n=r.methodInfo;if(t.__dataHasAccessor&&t.__dataHasAccessor[n]){return t._setPendingProperty(n,o,true)}else{t[n]=o;return false}}function Ni(t,e,i){let s=t.__dataLinkedPaths;if(s){let r;for(let o in s){let n=s[o];if(Se(o,e)){r=Me(o,n,e);t._setPendingPropertyOrPath(r,i,true,true)}else if(Se(n,e)){r=Me(n,o,e);t._setPendingPropertyOrPath(r,i,true,true)}}}}function Ri(t,e,i,s,r,o,n){i.bindings=i.bindings||[];let a={kind:s,target:r,parts:o,literal:n,isCompound:o.length!==1};i.bindings.push(a);if(Ui(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||je(r)+"-changed";a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i;ji(t,e,a,s,l)}}function ji(t,e,i,s,r){if(!s.literal){if(i.kind==="attribute"&&i.target[0]==="-"){console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character')}else{let o=s.dependencies;let n={index:r,binding:i,part:s,evaluator:t};for(let i=0;i<o.length;i++){let s=o[i];if(typeof s=="string"){s=fs(s);s.wildcard=true}t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Li,info:n,trigger:s})}}}}function Li(t,e,i,s,r,o,n){let a=n[r.index];let l=r.binding;let h=r.part;if(o&&h.source&&e.length>h.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=Me(h.source,l.target,e);if(a._setPendingPropertyOrPath(e,s,false,true)){t._enqueueClient(a)}}else{let n=r.evaluator._evaluateBinding(t,h,e,i,s,o);if(n!==bi){Hi(t,a,l,h,n)}}}function Hi(t,e,i,s,r){r=Wi(e,r,i,s);if(Vt){r=Vt(r,i.target,i.kind,e)}if(i.kind=="attribute"){t._valueToNodeAttribute(e,r,i.target)}else{let s=i.target;if(e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]){if(!e[gi.READ_ONLY]||!e[gi.READ_ONLY][s]){if(e._setPendingProperty(s,r)){t._enqueueClient(e)}}}else{t._setUnmanagedPropertyToNode(e,s,r)}}}function Wi(t,e,i,s){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[s.compoundIndex]=e;e=r.join("")}if(i.kind!=="attribute"){if(i.target==="textContent"||i.target==="value"&&(t.localName==="input"||t.localName==="textarea")){e=e==undefined?"":e}}return e}function Ui(t){return Boolean(t.target)&&t.kind!="attribute"&&t.kind!="text"&&!t.isCompound&&t.parts[0].mode==="{"}function $i(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length){for(let e=0;e<s.length;e++){let r=s[e];let o=i[e];let n=r.bindings;if(n){for(let e=0;e<n.length;e++){let i=n[e];Gi(o,i);Yi(o,t,i)}}o.__dataHost=t}}}function Gi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={});let s=e.parts;let r=new Array(s.length);for(let t=0;t<s.length;t++){r[t]=s[t].literal}let o=e.target;i[o]=r;if(e.literal&&e.kind=="property"){if(o==="className"){t=Ae(t)}t[o]=e.literal}}}function Yi(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){Mi(t,e,i.target,s.source,s.negate)}))}}function qi(t,e,i,s,r,o){o=e.static||o&&(typeof o!=="object"||o[e.methodName]);let n={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:o};for(let r=0,o;r<e.args.length&&(o=e.args[r]);r++){if(!o.literal){t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o})}}if(o){t._addPropertyEffect(e.methodName,i,{fn:s,info:n})}return n}function Vi(t,e,i,s,r){let o=t._methodHost||t;let n=o[r.methodName];if(n){let s=t._marshalArgs(r.args,e,i);return s===bi?bi:n.apply(o,s)}else if(!r.dynamicFn){console.warn("method `"+r.methodName+"` not defined")}}const Ji=[];const Ki="(?:"+"[a-zA-Z_$][\\w.:$\\-*]*"+")";const Zi="(?:"+"[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?"+")";const Xi="(?:"+"'(?:[^'\\\\]|\\\\.)*'"+")";const Qi="(?:"+'"(?:[^"\\\\]|\\\\.)*"'+")";const ts="(?:"+Xi+"|"+Qi+")";const es="(?:("+Ki+"|"+Zi+"|"+ts+")\\s*"+")";const is="(?:"+es+"(?:,\\s*"+es+")*"+")";const ss="(?:"+"\\(\\s*"+"(?:"+is+"?"+")"+"\\)\\s*"+")";const rs="("+Ki+"\\s*"+ss+"?"+")";const os="(\\[\\[|{{)"+"\\s*";const ns="(?:]]|}})";const as="(?:(!)\\s*)?";const ls=os+as+rs+ns;const hs=new RegExp(ls,"g");function cs(t){let e="";for(let i=0;i<t.length;i++){let s=t[i].literal;e+=s||""}return e}function us(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t=e[1];let i={methodName:t,static:true,args:Ji};if(e[2].trim()){let t=e[2].replace(/\\,/g,",").split(",");return ds(t,i)}else{return i}}return null}function ds(t,e){e.args=t.map((function(t){let i=fs(t);if(!i.literal){e.static=false}return i}),this);return e}function fs(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1");let i={name:e,value:"",literal:false};let s=e[0];if(s==="-"){s=e[1]}if(s>="0"&&s<="9"){s="#"}switch(s){case"'":case'"':i.value=e.slice(1,-1);i.literal=true;break;case"#":i.value=Number(e);i.literal=true;break}if(!i.literal){i.rootProperty=Ce(e);i.structured=De(e);if(i.structured){i.wildcard=e.slice(-2)==".*";if(i.wildcard){i.name=e.slice(0,-2)}}}return i}function ps(t,e,i){let s=Fe(t,i);if(s===undefined){s=e[i]}return s}function ms(t,e,i,s){const r={indexSplices:s};if(te&&!t._overrideLegacyUndefined){e.splices=r}t.notifyPath(i+".splices",r);t.notifyPath(i+".length",e.length);if(te&&!t._overrideLegacyUndefined){r.indexSplices=[]}}function bs(t,e,i,s,r,o){ms(t,e,i,[{index:s,addedCount:r,removed:o,object:e,type:"splice"}])}function gs(t){return t[0].toUpperCase()+t.substring(1)}const vs=ae((t=>{const e=pi(ei(t));class i extends e{constructor(){super();this.__isPropertyEffectsClient=true}get PROPERTY_EFFECT_TYPES(){return gi}_initializeProperties(){super._initializeProperties();this._registerHost();this.__dataClientsReady=false;this.__dataPendingClients=null;this.__dataToNotify=null;this.__dataLinkedPaths=null;this.__dataHasPaths=false;this.__dataCompoundStorage=this.__dataCompoundStorage||null;this.__dataHost=this.__dataHost||null;this.__dataTemp={};this.__dataClientsInitialized=false}_registerHost(){if(ys.length){let t=ys[ys.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[gi.READ_ONLY];for(let i in t){if(!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==gi.READ_ONLY);let s=wi(this,e,true)[t];if(!s){s=this[e][t]=[]}s.push(i)}_removePropertyEffect(t,e,i){let s=wi(this,e,true)[t];let r=s.indexOf(i);if(r>=0){s.splice(r,1)}}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,gi.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,gi.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,gi.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,gi.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||Ce(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Fe(this,t);t=Oe(this,t,e);if(!t||!super._shouldPropertyChange(t,e,i)){return false}}this.__dataHasPaths=true;if(this._setPendingProperty(t,e,i)){Ni(this,t,e);return true}}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t]){return this._setPendingProperty(t,e,i)}else{this[t]=e}}return false}_setUnmanagedPropertyToNode(t,e,i){if(i!==t[e]||typeof i=="object"){if(e==="className"){t=Ae(t)}t[e]=i}}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&De(t);let r=s?this.__dataTemp:this.__data;if(this._shouldPropertyChange(t,e,r[t])){if(!this.__dataPending){this.__dataPending={};this.__dataOld={}}if(!(t in this.__dataOld)){this.__dataOld[t]=this.__data[t]}if(s){this.__dataTemp[t]=e}else{this.__data[t]=e}this.__dataPending[t]=e;if(s||this[gi.NOTIFY]&&this[gi.NOTIFY][t]){this.__dataToNotify=this.__dataToNotify||{};this.__dataToNotify[t]=i}return true}return false}_setProperty(t,e){if(this._setPendingProperty(t,e,true)){this._invalidateProperties()}}_invalidateProperties(){if(this.__dataReady){this._flushProperties()}}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[];if(t!==this){this.__dataPendingClients.push(t)}}_flushClients(){if(!this.__dataClientsReady){this.__dataClientsReady=true;this._readyClients();this.__dataReady=true}else{this.__enableOrFlushClients()}}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];if(!i.__dataEnabled){i._enableProperties()}else if(i.__dataPending){i._flushProperties()}}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t){if(e||!this[gi.READ_ONLY]||!this[gi.READ_ONLY][i]){this._setPendingPropertyOrPath(i,t[i],true)}}this._invalidateProperties()}ready(){this._flushProperties();if(!this.__dataClientsReady){this._flushClients()}if(this.__dataPending){this._flushProperties()}}_propertiesChanged(t,e,i){let s=this.__dataHasPaths;this.__dataHasPaths=false;let r;Pi(this,e,i,s);r=this.__dataToNotify;this.__dataToNotify=null;this._propagatePropertyChanges(e,i,s);this._flushClients();xi(this,this[gi.REFLECT],e,i,s);xi(this,this[gi.OBSERVE],e,i,s);if(r){Di(this,r,e,i,s)}if(this.__dataCounter==1){this.__dataTemp={}}}_propagatePropertyChanges(t,e,i){if(this[gi.PROPAGATE]){xi(this,this[gi.PROPAGATE],t,e,i)}if(this.__templateInfo){this._runEffectsForTemplate(this.__templateInfo,t,e,i)}}_runEffectsForTemplate(t,e,i,s){const r=(e,s)=>{xi(this,t.propertyEffects,e,i,s,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling){this._runEffectsForTemplate(r,e,i,s)}};if(t.runEffects){t.runEffects(r,e,s)}else{r(e,s)}}linkPaths(t,e){t=Pe(t);e=Pe(e);this.__dataLinkedPaths=this.__dataLinkedPaths||{};this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Pe(t);if(this.__dataLinkedPaths){delete this.__dataLinkedPaths[t]}}notifySplices(t,e){let i={path:""};let s=Fe(this,t,i);ms(this,s,i.path,e)}get(t,e){return Fe(e||this,t)}set(t,e,i){if(i){Oe(i,t,e)}else{if(!this[gi.READ_ONLY]||!this[gi.READ_ONLY][t]){if(this._setPendingPropertyOrPath(t,e,true)){this._invalidateProperties()}}}}push(t,...e){let i={path:""};let s=Fe(this,t,i);let r=s.length;let o=s.push(...e);if(e.length){bs(this,s,i.path,r,e.length,[])}return o}pop(t){let e={path:""};let i=Fe(this,t,e);let s=Boolean(i.length);let r=i.pop();if(s){bs(this,i,e.path,i.length,0,[r])}return r}splice(t,e,i,...s){let r={path:""};let o=Fe(this,t,r);if(e<0){e=o.length-Math.floor(-e)}else if(e){e=Math.floor(e)}let n;if(arguments.length===2){n=o.splice(e)}else{n=o.splice(e,i,...s)}if(s.length||n.length){bs(this,o,r.path,e,s.length,n)}return n}shift(t){let e={path:""};let i=Fe(this,t,e);let s=Boolean(i.length);let r=i.shift();if(s){bs(this,i,e.path,0,0,[r])}return r}unshift(t,...e){let i={path:""};let s=Fe(this,t,i);let r=s.unshift(...e);if(e.length){bs(this,s,i.path,0,e.length,[])}return r}notifyPath(t,e){let i;if(arguments.length==1){let s={path:""};e=Fe(this,t,s);i=s.path}else if(Array.isArray(t)){i=Pe(t)}else{i=t}if(this._setPendingPropertyOrPath(i,e,true,true)){this._invalidateProperties()}}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,gi.READ_ONLY);if(e){this["_set"+gs(t)]=function(e){this._setProperty(t,e)}}}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,gi.OBSERVE,{fn:Ai,info:s,trigger:{name:t}});if(i){this._addPropertyEffect(e,gi.OBSERVE,{fn:Ai,info:s,trigger:{name:e}})}}_createMethodObserver(t,e){let i=us(t);if(!i){throw new Error("Malformed observer expression '"+t+"'")}qi(this,i,gi.OBSERVE,Vi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,gi.NOTIFY,{fn:Si,info:{eventName:je(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);if(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.')}else{this._addPropertyEffect(t,gi.REFLECT,{fn:zi,info:{attrName:e}})}}_createComputedProperty(t,e,i){let s=us(e);if(!s){throw new Error("Malformed computed expression '"+e+"'")}const r=qi(this,s,gi.COMPUTE,Ii,t,i);wi(this,vi)[t]=r}_marshalArgs(t,e,i){const s=this.__data;const r=[];for(let o=0,n=t.length;o<n;o++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[o];if(!c){if(l){const t=Se(n,e);const r=ps(s,i,t?e:n);h={path:t?e:n,value:r,base:t?Fe(s,n):r}}else{h=a?ps(s,i,n):s[n]}}if(te&&!this._overrideLegacyUndefined&&h===undefined&&t.length>1){return bi}r[o]=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);let s=this.__preBoundTemplateInfo==i;if(!s){for(let t in i.propertyEffects){this._createPropertyAccessor(t)}}if(e){i=Object.create(i);i.wasPreBound=s;if(!this.__templateInfo){this.__templateInfo=i}else{const e=t._parentTemplateInfo||this.__templateInfo;const s=e.lastChild;i.parent=e;e.lastChild=i;i.previousSibling=s;if(s){s.nextSibling=i}else{e.firstChild=i}}}else{this.__preBoundTemplateInfo=i}return i}static _addTemplatePropertyEffect(t,e,i){let s=t.hostProps=t.hostProps||{};s[e]=true;let r=t.propertyEffects=t.propertyEffects||{};let o=r[e]=r[e]||[];o.push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,true);ys.push(this);let i=super._stampTemplate(t,e);ys.pop();e.nodeList=i.nodeList;if(!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling){t.push(e)}}i.templateInfo=e;$i(this,e);if(this.__dataClientsReady){this._runEffectsForTemplate(e,this.__data,null,false);this._flushClients()}return i}_removeBoundDom(t){const e=t.templateInfo;const{previousSibling:i,nextSibling:s,parent:r}=e;if(i){i.nextSibling=s}else if(r){r.firstChild=s}if(s){s.previousSibling=i}else if(r){r.lastChild=i}e.nextSibling=e.previousSibling=null;let o=e.childNodes;for(let t=0;t<o.length;t++){let e=o[t];Ae(Ae(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let r=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);if(e){t.textContent=cs(e)||" ";Ri(this,i,s,"text","textContent",e);r=true}}return r}static _parseTemplateNodeAttribute(t,i,s,r,o){let n=this._parseBindings(o,i);if(n){let e=r;let o="property";if(yi.test(r)){o="attribute"}else if(r[r.length-1]=="$"){r=r.slice(0,-1);o="attribute"}let a=cs(n);if(a&&o=="attribute"){if(r=="class"&&t.hasAttribute("class")){a+=" "+t.getAttribute(r)}t.setAttribute(r,a)}if(o=="attribute"&&e=="disable-upgrade$"){t.setAttribute(r,"")}if(t.localName==="input"&&e==="value"){t.setAttribute(e,"")}t.removeAttribute(e);if(o==="property"){r=Re(r)}Ri(this,i,s,o,r,n,a);return true}else{return e._parseTemplateNodeAttribute.call(this,t,i,s,r,o)}}static _parseTemplateNestedTemplate(t,i,s){let r=e._parseTemplateNestedTemplate.call(this,t,i,s);const o=t.parentNode;const n=s.templateInfo;const a=o.localName==="dom-if";const l=o.localName==="dom-repeat";if(ie&&(a||l)){o.removeChild(t);s=s.parentInfo;s.templateInfo=n;s.noted=true;r=false}let h=n.hostProps;if(se&&a){if(h){i.hostProps=Object.assign(i.hostProps||{},h);if(!ie){s.parentInfo.noted=true}}}else{let t="{";for(let e in h){let r=[{mode:t,source:e,dependencies:[e],hostProp:true}];Ri(this,i,s,"property","_host_"+e,r)}}return r}static _parseBindings(t,e){let i=[];let s=0;let r;while((r=hs.exec(t))!==null){if(r.index>s){i.push({literal:t.slice(s,r.index)})}let o=r[1][0];let n=Boolean(r[2]);let a=r[3].trim();let l=false,h="",c=-1;if(o=="{"&&(c=a.indexOf("::"))>0){h=a.substring(c+2);a=a.substring(0,c);l=true}let u=us(a);let d=[];if(u){let{args:t,methodName:i}=u;for(let e=0;e<t.length;e++){let i=t[e];if(!i.literal){d.push(i)}}let s=e.dynamicFns;if(s&&s[i]||u.static){d.push(i);u.dynamicFn=true}}else{d.push(a)}i.push({source:a,mode:o,negate:n,customEvent:l,signature:u,dependencies:d,event:h});s=hs.lastIndex}if(s&&s<t.length){let e=t.substring(s);if(e){i.push({literal:e})}}if(i.length){return i}else{return null}}static _evaluateBinding(t,e,i,s,r,o){let n;if(e.signature){n=Vi(t,i,s,r,e.signature)}else if(i!=e.source){n=Fe(t,e.source)}else{if(o&&De(i)){n=Fe(t,i)}else{n=t.__data[i]}}if(e.negate){n=!n}return n}}return i}));const ys=[];
|
|
686
|
+
/**
|
|
687
|
+
@license
|
|
688
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
689
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
690
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
691
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
692
|
+
Code distributed by Google as part of the polymer project is also
|
|
693
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
694
|
+
*/function ws(t){const e={};for(let i in t){const s=t[i];e[i]=typeof s==="function"?{type:s}:s}return e}const xs=ae((t=>{const e=Ke(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;if(i){e=ws(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);if(t){t.finalize()}this.__finalized=true;this._finalizeClass()}}static _finalizeClass(){const t=s(this);if(t){this.createProperties(t)}}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize();super._initializeProperties()}connectedCallback(){if(super.connectedCallback){super.connectedCallback()}this._enableProperties()}disconnectedCallback(){if(super.disconnectedCallback){super.disconnectedCallback()}}}return r}));
|
|
695
|
+
/**
|
|
696
|
+
* @fileoverview
|
|
697
|
+
* @suppress {checkPrototypalTypes}
|
|
698
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
699
|
+
* This code may only be used under the BSD style license found at
|
|
700
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
701
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
702
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
703
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
704
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
705
|
+
*/const _s="3.5.1";const ks=window.ShadyCSS&&window.ShadyCSS["cssBuild"];const As=ae((t=>{const e=xs(vs(t));function i(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];if("value"in s){t.__propertyDefaults=t.__propertyDefaults||{};t.__propertyDefaults[i]=s}}}return t.__propertyDefaults}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",t))){t.__ownObservers=t.hasOwnProperty(JSCompiler_renameProperty("observers",t))?t.observers:null}return t.__ownObservers}function r(t,e,i,s){if(i.computed){i.readOnly=true}if(i.computed){if(t._hasReadOnlyEffect(e)){console.warn(`Cannot redefine computed property '${e}'.`)}else{t._createComputedProperty(e,i.computed,s)}}if(i.readOnly&&!t._hasReadOnlyEffect(e)){t._createReadOnlyProperty(e,!i.computed)}else if(i.readOnly===false&&t._hasReadOnlyEffect(e)){console.warn(`Cannot make readOnly property '${e}' non-readOnly.`)}if(i.reflectToAttribute&&!t._hasReflectEffect(e)){t._createReflectedProperty(e)}else if(i.reflectToAttribute===false&&t._hasReflectEffect(e)){console.warn(`Cannot make reflected property '${e}' non-reflected.`)}if(i.notify&&!t._hasNotifyEffect(e)){t._createNotifyingProperty(e)}else if(i.notify===false&&t._hasNotifyEffect(e)){console.warn(`Cannot make notify property '${e}' non-notify.`)}if(i.observer){t._createPropertyObserver(e,i.observer,s[i.observer])}t._addPropertyToAttributeMap(e)}function o(t,e,i,s){if(!ks){const r=e.content.querySelectorAll("style");const o=xe(e);const n=_e(i);const a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let r=n[i];r.textContent=t._processStyleText(r.textContent,s);e.content.insertBefore(r,a)}let l=0;for(let e=0;e<o.length;e++){let i=o[e];let n=r[l];if(n!==i){i=i.cloneNode(true);n.parentNode.insertBefore(i,n)}else{l++}i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS){window.ShadyCSS.prepareTemplate(e,i)}if(oe&&ks&&Yt){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)}}}function n(t){let e=null;if(t&&(!Jt||Kt)){e=fe.import(t,"template");if(Jt&&!e){throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`)}}return e}class a extends e{static get polymerElementVersion(){return _s}static _finalizeClass(){e._finalizeClass.call(this);const t=s(this);if(t){this.createObservers(t,this._properties)}this._prepareTemplate()}static _prepareTemplate(){let t=this.template;if(t){if(typeof t==="string"){console.error("template getter must return HTMLTemplateElement");t=null}else if(!Zt){t=t.cloneNode(true)}}this.prototype._template=t}static createProperties(t){for(let e in t){r(this.prototype,e,t[e],t)}}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++){i._createMethodObserver(t[s],e)}}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:undefined;if(typeof t==="function"){t=t()}this._template=t!==undefined?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&n(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=$t(t.url)}else{const t=fe.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=qt;this.importPath=this.constructor.importPath;let t=i(this.constructor);if(!t){return}for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t=typeof i.value=="function"?i.value.call(this):i.value;if(this._hasAccessor(e)){this._setPendingProperty(e,t,true)}else{this[e]=t}}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return Ut(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=true;const i=this.importPath;const s=i?Wt(i):"";o(this,e,t,s);this.prototype._bindTemplate(e)}}connectedCallback(){if(window.ShadyCSS&&this._template){window.ShadyCSS.styleElement(this)}super.connectedCallback()}ready(){if(this._template){this.root=this._stampTemplate(this._template);this.$=this.root.$}super.ready()}_readyClients(){if(this._template){this.root=this._attachDom(this.root)}super._readyClients()}_attachDom(t){const e=Ae(this);if(e.attachShadow){if(t){if(!e.shadowRoot){e.attachShadow({mode:"open",shadyUpgradeFragment:t});e.shadowRoot.appendChild(t);if(this.constructor._styleSheet){e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet]}}if(Qt&&window.ShadyDOM){window.ShadyDOM.flushInitial(e.shadowRoot)}return e.shadowRoot}return null}else{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){if(window.ShadyCSS){window.ShadyCSS.styleSubtree(this,t)}}resolveUrl(t,e){if(!e&&this.importPath){e=Wt(this.importPath)}return Wt(t,e)}static _parseTemplateContent(t,i,s){i.dynamicFns=i.dynamicFns||this._properties;return e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){if(Xt&&!(i in this._properties)&&!(s.info.part.signature&&s.info.part.signature.static)&&!s.info.part.hostProp&&!t.nestedTemplate){console.warn(`Property '${i}' used in template but not declared in 'properties'; `+`attribute will not be observed.`)}return e._addTemplatePropertyEffect.call(this,t,i,s)}}return a}));
|
|
706
|
+
/**
|
|
707
|
+
@license
|
|
708
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
709
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
710
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
711
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
712
|
+
Code distributed by Google as part of the polymer project is also
|
|
713
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
714
|
+
*/const Ds=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Cs{constructor(t,e){zs(t,e);const i=e.reduce(((e,i,s)=>e+Ts(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Ts(t){if(t instanceof Cs){return t.value}else{throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}}function Ss(t){if(t instanceof HTMLTemplateElement){return t.innerHTML}else if(t instanceof Cs){return Ts(t)}else{throw new Error(`non-template value passed to Polymer's html function: ${t}`)}}const Ms=function t(e,...i){zs(e,i);const s=document.createElement("template");let r=i.reduce(((t,i,s)=>t+Ss(i)+e[s+1]),e[0]);if(Ds){r=Ds.createHTML(r)}s.innerHTML=r;return s};const zs=(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")}};
|
|
715
|
+
/**
|
|
716
|
+
@license
|
|
717
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
718
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
719
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
720
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
721
|
+
Code distributed by Google as part of the polymer project is also
|
|
722
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
723
|
+
*/const Ps=As(HTMLElement);
|
|
724
|
+
/**
|
|
725
|
+
* @license
|
|
726
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
727
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
728
|
+
*/class Es{static detectScrollType(){const t=document.createElement("div");t.textContent="ABCD";t.dir="rtl";t.style.fontSize="14px";t.style.width="4px";t.style.height="1px";t.style.position="absolute";t.style.top="-1000px";t.style.overflow="scroll";document.body.appendChild(t);let e="reverse";if(t.scrollLeft>0){e="default"}else{t.scrollLeft=2;if(t.scrollLeft<2){e="negative"}}document.body.removeChild(t);return e}static getNormalizedScrollLeft(t,e,i){const{scrollLeft:s}=i;if(e!=="rtl"||!t){return s}switch(t){case"negative":return i.scrollWidth-i.clientWidth+s;case"reverse":return i.scrollWidth-i.clientWidth-s;default:return s}}static setNormalizedScrollLeft(t,e,i,s){if(e!=="rtl"||!t){i.scrollLeft=s;return}switch(t){case"negative":i.scrollLeft=i.clientWidth-i.scrollWidth+s;break;case"reverse":i.scrollLeft=i.scrollWidth-i.clientWidth-s;break;default:i.scrollLeft=s;break}}}
|
|
729
|
+
/**
|
|
730
|
+
* @license
|
|
731
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
732
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
733
|
+
*/const Fs=[];function Os(){const t=Rs();Fs.forEach((e=>{Ns(e,t)}))}let Bs;const Is=new MutationObserver(Os);Is.observe(document.documentElement,{attributes:true,attributeFilter:["dir"]});function Ns(t,e,i=t.getAttribute("dir")){if(e){t.setAttribute("dir",e)}else if(i!=null){t.removeAttribute("dir")}}function Rs(){return document.documentElement.getAttribute("dir")}const js=t=>class e extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:true,converter:{fromAttribute:t=>!t?"":t,toAttribute:t=>t===""?null:t}}}}static finalize(){super.finalize();if(!Bs){Bs=Es.detectScrollType()}}connectedCallback(){super.connectedCallback();if(!this.hasAttribute("dir")||this.__restoreSubscription){this.__subscribe();Ns(this,Rs(),null)}}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i);if(t!=="dir"){return}const s=Rs();const r=i===s&&Fs.indexOf(this)===-1;const o=!i&&e&&Fs.indexOf(this)===-1;const n=i!==s&&e===s;if(r||o){this.__subscribe();Ns(this,s,i)}else if(n){this.__unsubscribe()}}disconnectedCallback(){super.disconnectedCallback();this.__restoreSubscription=Fs.includes(this);this.__unsubscribe()}_valueToNodeAttribute(t,e,i){if(i==="dir"&&e===""&&!t.hasAttribute("dir")){return}super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){if(t==="dir"&&!e){this.dir=""}else{super._attributeToProperty(t,e,i)}}__subscribe(){if(!Fs.includes(this)){Fs.push(this)}}__unsubscribe(){if(Fs.includes(this)){Fs.splice(Fs.indexOf(this),1)}}__getNormalizedScrollLeft(t){return Es.getNormalizedScrollLeft(Bs,this.getAttribute("dir")||"ltr",t)}__setNormalizedScrollLeft(t,e){return Es.setNormalizedScrollLeft(Bs,this.getAttribute("dir")||"ltr",t,e)}}
|
|
734
|
+
/**
|
|
735
|
+
* @license
|
|
736
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
737
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
738
|
+
*/;class Ls extends(Ct(js(Ps))){static get is(){return"vaadin-input-container"}static get template(){return Ms`
|
|
739
|
+
<style>
|
|
740
|
+
:host {
|
|
741
|
+
display: flex;
|
|
742
|
+
align-items: center;
|
|
743
|
+
flex: 0 1 auto;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
:host([hidden]) {
|
|
747
|
+
display: none !important;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/* Reset the native input styles */
|
|
751
|
+
::slotted(input) {
|
|
752
|
+
-webkit-appearance: none;
|
|
753
|
+
-moz-appearance: none;
|
|
754
|
+
flex: auto;
|
|
755
|
+
white-space: nowrap;
|
|
756
|
+
overflow: hidden;
|
|
757
|
+
width: 100%;
|
|
758
|
+
height: 100%;
|
|
759
|
+
outline: none;
|
|
760
|
+
margin: 0;
|
|
761
|
+
padding: 0;
|
|
762
|
+
border: 0;
|
|
763
|
+
border-radius: 0;
|
|
764
|
+
min-width: 0;
|
|
765
|
+
font: inherit;
|
|
766
|
+
line-height: normal;
|
|
767
|
+
color: inherit;
|
|
768
|
+
background-color: transparent;
|
|
769
|
+
/* Disable default invalid style in Firefox */
|
|
770
|
+
box-shadow: none;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
::slotted(*) {
|
|
774
|
+
flex: none;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
::slotted(:is(input, textarea))::placeholder {
|
|
778
|
+
/* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
|
|
779
|
+
/* because ::slotted(...)::placeholder does not work in Safari. */
|
|
780
|
+
font: inherit;
|
|
781
|
+
color: inherit;
|
|
782
|
+
/* Override default opacity in Firefox */
|
|
783
|
+
opacity: 1;
|
|
784
|
+
}
|
|
785
|
+
</style>
|
|
786
|
+
<slot name="prefix"></slot>
|
|
787
|
+
<slot></slot>
|
|
788
|
+
<slot name="suffix"></slot>
|
|
789
|
+
`}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:true},readonly:{type:Boolean,reflectToAttribute:true},invalid:{type:Boolean,reflectToAttribute:true}}}ready(){super.ready();this.addEventListener("pointerdown",(t=>{if(t.target===this){t.preventDefault()}}));this.addEventListener("click",(t=>{if(t.target===this){this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:true}).forEach((t=>t.focus&&t.focus()))}}))}}customElements.define(Ls.is,Ls);
|
|
790
|
+
/**
|
|
791
|
+
* @license
|
|
792
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
793
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
794
|
+
*/const Hs=p`
|
|
795
|
+
:host {
|
|
796
|
+
/* Square */
|
|
797
|
+
--lumo-space-xs: 0.25rem;
|
|
798
|
+
--lumo-space-s: 0.5rem;
|
|
799
|
+
--lumo-space-m: 1rem;
|
|
800
|
+
--lumo-space-l: 1.5rem;
|
|
801
|
+
--lumo-space-xl: 2.5rem;
|
|
802
|
+
|
|
803
|
+
/* Wide */
|
|
804
|
+
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
|
805
|
+
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
|
806
|
+
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
|
807
|
+
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
|
808
|
+
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
|
809
|
+
|
|
810
|
+
/* Tall */
|
|
811
|
+
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
|
812
|
+
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
|
813
|
+
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
|
814
|
+
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
815
|
+
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
816
|
+
}
|
|
817
|
+
`;const Ws=document.createElement("template");Ws.innerHTML=`<style>${Hs.toString().replace(":host","html")}</style>`;document.head.appendChild(Ws.content);
|
|
818
|
+
/**
|
|
819
|
+
* @license
|
|
820
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
821
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
822
|
+
*/const Us=p`
|
|
823
|
+
:host {
|
|
824
|
+
top: var(--lumo-space-m);
|
|
825
|
+
right: var(--lumo-space-m);
|
|
826
|
+
bottom: var(--lumo-space-m);
|
|
827
|
+
left: var(--lumo-space-m);
|
|
828
|
+
/* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
|
|
829
|
+
/* stylelint-disable-next-line */
|
|
830
|
+
outline: 0px solid transparent;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
[part='overlay'] {
|
|
834
|
+
background-color: var(--lumo-base-color);
|
|
835
|
+
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
836
|
+
border-radius: var(--lumo-border-radius-m);
|
|
837
|
+
box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);
|
|
838
|
+
color: var(--lumo-body-text-color);
|
|
839
|
+
font-family: var(--lumo-font-family);
|
|
840
|
+
font-size: var(--lumo-font-size-m);
|
|
841
|
+
font-weight: 400;
|
|
842
|
+
line-height: var(--lumo-line-height-m);
|
|
843
|
+
letter-spacing: 0;
|
|
844
|
+
text-transform: none;
|
|
845
|
+
-webkit-text-size-adjust: 100%;
|
|
846
|
+
-webkit-font-smoothing: antialiased;
|
|
847
|
+
-moz-osx-font-smoothing: grayscale;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
[part='content'] {
|
|
851
|
+
padding: var(--lumo-space-xs);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
[part='backdrop'] {
|
|
855
|
+
background-color: var(--lumo-shade-20pct);
|
|
856
|
+
animation: 0.2s lumo-overlay-backdrop-enter both;
|
|
857
|
+
will-change: opacity;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
@keyframes lumo-overlay-backdrop-enter {
|
|
861
|
+
0% {
|
|
862
|
+
opacity: 0;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
:host([closing]) [part='backdrop'] {
|
|
867
|
+
animation: 0.2s lumo-overlay-backdrop-exit both;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
@keyframes lumo-overlay-backdrop-exit {
|
|
871
|
+
100% {
|
|
872
|
+
opacity: 0;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
@keyframes lumo-overlay-dummy-animation {
|
|
877
|
+
0% {
|
|
878
|
+
opacity: 1;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
100% {
|
|
882
|
+
opacity: 1;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
`;bt("",Us,{moduleId:"lumo-overlay"});bt("vaadin-overlay",Us,{moduleId:"lumo-vaadin-overlay"});
|
|
886
|
+
/**
|
|
887
|
+
@license
|
|
888
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
889
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
890
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
891
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
892
|
+
Code distributed by Google as part of the polymer project is also
|
|
893
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
894
|
+
*/function $s(t,e,i){return{index:t,removed:e,addedCount:i}}const Gs=0;const Ys=1;const qs=2;const Vs=3;function Js(t,e,i,s,r,o){let n=o-r+1;let a=i-e+1;let l=new Array(n);for(let t=0;t<n;t++){l[t]=new Array(a);l[t][0]=t}for(let t=0;t<a;t++)l[0][t]=t;for(let i=1;i<n;i++){for(let o=1;o<a;o++){if(er(t[e+o-1],s[r+i-1]))l[i][o]=l[i-1][o-1];else{let t=l[i-1][o]+1;let e=l[i][o-1]+1;l[i][o]=t<e?t:e}}}return l}function Ks(t){let e=t.length-1;let i=t[0].length-1;let s=t[e][i];let r=[];while(e>0||i>0){if(e==0){r.push(qs);i--;continue}if(i==0){r.push(Vs);e--;continue}let o=t[e-1][i-1];let n=t[e-1][i];let a=t[e][i-1];let l;if(n<a)l=n<o?n:o;else l=a<o?a:o;if(l==o){if(o==s){r.push(Gs)}else{r.push(Ys);s=o}e--;i--}else if(l==n){r.push(Vs);e--;s=n}else{r.push(qs);i--;s=a}}r.reverse();return r}function Zs(t,e,i,s,r,o){let n=0;let a=0;let l;let h=Math.min(i-e,o-r);if(e==0&&r==0)n=Xs(t,s,h);if(i==t.length&&o==s.length)a=Qs(t,s,h-n);e+=n;r+=n;i-=a;o-=a;if(i-e==0&&o-r==0)return[];if(e==i){l=$s(e,[],0);while(r<o)l.removed.push(s[r++]);return[l]}else if(r==o)return[$s(e,[],i-e)];let c=Ks(Js(t,e,i,s,r,o));l=undefined;let u=[];let d=e;let f=r;for(let t=0;t<c.length;t++){switch(c[t]){case Gs:if(l){u.push(l);l=undefined}d++;f++;break;case Ys:if(!l)l=$s(d,[],0);l.addedCount++;d++;l.removed.push(s[f]);f++;break;case qs:if(!l)l=$s(d,[],0);l.addedCount++;d++;break;case Vs:if(!l)l=$s(d,[],0);l.removed.push(s[f]);f++;break}}if(l){u.push(l)}return u}function Xs(t,e,i){for(let s=0;s<i;s++)if(!er(t[s],e[s]))return s;return i}function Qs(t,e,i){let s=t.length;let r=e.length;let o=0;while(o<i&&er(t[--s],e[--r]))o++;return o}function tr(t,e){return Zs(t,0,t.length,e,0,e.length)}function er(t,e){return t===e}
|
|
895
|
+
/**
|
|
896
|
+
@license
|
|
897
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
898
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
899
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
900
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
901
|
+
Code distributed by Google as part of the polymer project is also
|
|
902
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
903
|
+
*/function ir(t){return t.localName==="slot"}let sr=class{static getFlattenedNodes(t){const e=Ae(t);if(ir(t)){t=t;return e.assignedNodes({flatten:true})}else{return Array.from(e.childNodes).map((t=>{if(ir(t)){t=t;return Ae(t).assignedNodes({flatten:true})}else{return[t]}})).reduce(((t,e)=>t.concat(e)),[])}}constructor(t,e){this._shadyChildrenObserver=null;this._nativeChildrenObserver=null;this._connected=false;this._target=t;this.callback=e;this._effectiveNodes=[];this._observer=null;this._scheduled=false;this._boundSchedule=()=>{this._schedule()};this.connect();this._schedule()}connect(){if(ir(this._target)){this._listenSlots([this._target])}else if(Ae(this._target).children){this._listenSlots(Ae(this._target).children);if(window.ShadyDOM){this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(t=>{this._processMutations(t)}))}else{this._nativeChildrenObserver=new MutationObserver((t=>{this._processMutations(t)}));this._nativeChildrenObserver.observe(this._target,{childList:true})}}this._connected=true}disconnect(){if(ir(this._target)){this._unlistenSlots([this._target])}else if(Ae(this._target).children){this._unlistenSlots(Ae(this._target).children);if(window.ShadyDOM&&this._shadyChildrenObserver){window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver);this._shadyChildrenObserver=null}else if(this._nativeChildrenObserver){this._nativeChildrenObserver.disconnect();this._nativeChildrenObserver=null}}this._connected=false}_schedule(){if(!this._scheduled){this._scheduled=true;Ve.run((()=>this.flush()))}}_processMutations(t){this._processSlotMutations(t);this.flush()}_processSlotMutations(t){if(t){for(let e=0;e<t.length;e++){let i=t[e];if(i.addedNodes){this._listenSlots(i.addedNodes)}if(i.removedNodes){this._unlistenSlots(i.removedNodes)}}}}flush(){if(!this._connected){return false}if(window.ShadyDOM){ShadyDOM.flush()}if(this._nativeChildrenObserver){this._processSlotMutations(this._nativeChildrenObserver.takeRecords())}else if(this._shadyChildrenObserver){this._processSlotMutations(this._shadyChildrenObserver.takeRecords())}this._scheduled=false;let t={target:this._target,addedNodes:[],removedNodes:[]};let e=this.constructor.getFlattenedNodes(this._target);let i=tr(e,this._effectiveNodes);for(let e=0,s;e<i.length&&(s=i[e]);e++){for(let e=0,i;e<s.removed.length&&(i=s.removed[e]);e++){t.removedNodes.push(i)}}for(let s=0,r;s<i.length&&(r=i[s]);s++){for(let i=r.index;i<r.index+r.addedCount;i++){t.addedNodes.push(e[i])}}this._effectiveNodes=e;let s=false;if(t.addedNodes.length||t.removedNodes.length){s=true;this.callback.call(this._target,t)}return s}_listenSlots(t){for(let e=0;e<t.length;e++){let i=t[e];if(ir(i)){i.addEventListener("slotchange",this._boundSchedule)}}}_unlistenSlots(t){for(let e=0;e<t.length;e++){let i=t[e];if(ir(i)){i.removeEventListener("slotchange",this._boundSchedule)}}}};
|
|
904
|
+
/**
|
|
905
|
+
@license
|
|
906
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
907
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
908
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
909
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
910
|
+
Code distributed by Google as part of the polymer project is also
|
|
911
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
912
|
+
*/let rr=false;let or=[];let nr=[];function ar(){rr=true;requestAnimationFrame((function(){rr=false;lr(or);setTimeout((function(){hr(nr)}))}))}function lr(t){while(t.length){cr(t.shift())}}function hr(t){for(let e=0,i=t.length;e<i;e++){cr(t.shift())}}function cr(t){const e=t[0];const i=t[1];const s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function ur(t,e,i){if(!rr){ar()}nr.push([t,e,i])}
|
|
913
|
+
/**
|
|
914
|
+
@license
|
|
915
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
916
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
917
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
918
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
919
|
+
Code distributed by Google as part of the polymer project is also
|
|
920
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
921
|
+
*/function dr(t,e,i,s,r){let o;if(r){o=typeof i==="object"&&i!==null;if(o){s=t.__dataTemp[e]}}let n=s!==i&&(s===s||i===i);if(o&&n){t.__dataTemp[e]=i}return n}const fr=ae((t=>{class e extends t{_shouldPropertyChange(t,e,i){return dr(this,t,e,i,true)}}return e}));const pr=ae((t=>{class e extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return dr(this,t,e,i,this.mutableData)}}return e}));fr._mutablePropertyChange=dr;
|
|
922
|
+
/**
|
|
923
|
+
@license
|
|
924
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
925
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
926
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
927
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
928
|
+
Code distributed by Google as part of the polymer project is also
|
|
929
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
930
|
+
*/let mr=null;function br(){return mr}br.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:br,writable:true}});const gr=vs(br);const vr=fr(gr);function yr(t,e){mr=t;Object.setPrototypeOf(t,e.prototype);new e;mr=null}const wr=vs(class{});function xr(t,e){for(let i=0;i<e.length;i++){let s=e[i];if(Boolean(t)!=Boolean(s.__hideTemplateChildren__)){if(s.nodeType===Node.TEXT_NODE){if(t){s.__polymerTextContent__=s.textContent;s.textContent=""}else{s.textContent=s.__polymerTextContent__}}else if(s.localName==="slot"){if(t){s.__polymerReplaced__=document.createComment("hidden-slot");Ae(Ae(s).parentNode).replaceChild(s.__polymerReplaced__,s)}else{const t=s.__polymerReplaced__;if(t){Ae(Ae(t).parentNode).replaceChild(s,t)}}}else if(s.style){if(t){s.__polymerDisplay__=s.style.display;s.style.display="none"}else{s.style.display=s.__polymerDisplay__}}}s.__hideTemplateChildren__=t;if(s._showHideChildren){s._showHideChildren(t)}}}class _r extends wr{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}if(this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__){this._showHideChildren(true)}let i=this.__templatizeOptions;if(t&&i.instanceProps||!i.instanceProps){this._enableProperties()}}_configureProperties(t){let e=this.__templatizeOptions;if(e.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){if(this._setPendingPropertyOrPath(t,e,false,true)){this.__dataHost._enqueueClient(this)}}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel){this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this;i(t)}))}else{let s=this.__dataHost.__dataHost;if(s){s._addEventListenerToNode(t,e,i)}}}_showHideChildren(t){xr(t,this.children)}_setUnmanagedPropertyToNode(t,e,i){if(t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&e=="textContent"){t.__polymerTextContent__=i}else{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 true}}const kr=fr(_r);function Ar(t){let e=t.__dataHost;return e&&e._methodHost||e}function Dr(t,e,i){let s=i.mutableData?kr:_r;if(Pr.mixin){s=Pr.mixin(s)}let r=class extends s{};r.prototype.__templatizeOptions=i;r.prototype._bindTemplate(t);Sr(r,t,e,i);return r}function Cr(t,e,i,s){let r=i.forwardHostProp;if(r&&e.hasHostProps){const o=t.localName=="template";let n=e.templatizeTemplateClass;if(!n){if(o){let t=i.mutableData?vr:gr;class s extends t{}n=e.templatizeTemplateClass=s}else{const i=t.constructor;class s extends i{}n=e.templatizeTemplateClass=s}let a=e.hostProps;for(let t in a){n.prototype._addPropertyEffect("_host_"+t,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Tr(t,r)});n.prototype._createNotifyingProperty("_host_"+t)}if(Xt&&s){Er(e,i,s)}}if(t.__dataProto){Object.assign(t.__data,t.__dataProto)}if(o){yr(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){e="_host_"+e;if(e in t){const i=t[e];delete t[e];t.__data[e]=i}}}}}function Tr(t,e){return function t(i,s,r){e.call(i.__templatizeOwner,s.substring("_host_".length),r[s])}}function Sr(t,e,i,s){let r=i.hostProps||{};for(let e in s.instanceProps){delete r[e];let i=s.notifyInstanceProp;if(i){t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Mr(e,i)})}}if(s.forwardHostProp&&e.__dataHost){for(let e in r){if(!i.hasHostProps){i.hasHostProps=true}t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:zr()})}}}function Mr(t,e){return function t(i,s,r){e.call(i.__templatizeOwner,i,s,r[s])}}function zr(){return function t(e,i,s){e.__dataHost._setPendingPropertyOrPath("_host_"+i,s[i],true,true)}}function Pr(t,e,i){if(Jt&&!Ar(t)){throw new Error("strictTemplatePolicy: template owner not trusted")}i=i||{};if(t.__templatizeOwner){throw new Error("A <template> can only be templatized once")}t.__templatizeOwner=e;const s=e?e.constructor:_r;let r=s._parseTemplate(t);let o=r.templatizeInstanceClass;if(!o){o=Dr(t,r,i);r.templatizeInstanceClass=o}const n=Ar(t);Cr(t,r,i,n);let a=class t extends o{};a.prototype._methodHost=n;a.prototype.__dataHost=t;a.prototype.__templatizeOwner=e;a.prototype.__hostProps=r.hostProps;a=a;return a}function Er(t,e,i){const s=i.constructor._properties;const{propertyEffects:r}=t;const{instanceProps:o}=e;for(let t in r){if(!s[t]&&!(o&&o[t])){const e=r[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!(s.signature&&s.signature.static)){console.warn(`Property '${t}' used in template but not `+`declared in 'properties'; attribute will not be observed.`);break}}}}}function Fr(t,e){let i;while(e){if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost!=t){e=i.__dataHost}else{return i}}else{e=Ae(e).parentNode}}return null}
|
|
931
|
+
/**
|
|
932
|
+
* @license
|
|
933
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
934
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
935
|
+
*/const Or=t=>t.test(navigator.userAgent);const Br=t=>t.test(navigator.platform);const Ir=t=>t.test(navigator.vendor);Or(/Android/);Or(/Chrome/)&&Ir(/Google Inc/);const Nr=Or(/Firefox/);const Rr=Br(/^iPad/)||Br(/^Mac/)&&navigator.maxTouchPoints>1;const jr=Br(/^iPhone/);const Lr=jr||Rr;Or(/^((?!chrome|android).)*safari/i);(()=>{try{document.createEvent("TouchEvent");return true}catch(t){return false}})();
|
|
936
|
+
/**
|
|
937
|
+
* @license
|
|
938
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
939
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
940
|
+
*/const Hr=ae((t=>class e extends t{constructor(){super();this.__controllers=new Set}connectedCallback(){super.connectedCallback();this.__controllers.forEach((t=>{if(t.hostConnected){t.hostConnected()}}))}disconnectedCallback(){super.disconnectedCallback();this.__controllers.forEach((t=>{if(t.hostDisconnected){t.hostDisconnected()}}))}addController(t){this.__controllers.add(t);if(this.$!==undefined&&this.isConnected&&t.hostConnected){t.hostConnected()}}removeController(t){this.__controllers.delete(t)}}));
|
|
941
|
+
/**
|
|
942
|
+
* @license
|
|
943
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
944
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
945
|
+
*/let Wr=false;window.addEventListener("keydown",(()=>{Wr=true}),{capture:true});window.addEventListener("mousedown",(()=>{Wr=false}),{capture:true});function Ur(){return Wr}function $r(t){const e=t.style;if(e.visibility==="hidden"||e.display==="none"){return true}const i=window.getComputedStyle(t);if(i.visibility==="hidden"||i.display==="none"){return true}return false}function Gr(t){if(!Kr(t)){return-1}const e=t.getAttribute("tabindex")||0;return Number(e)}function Yr(t,e){const i=Math.max(t.tabIndex,0);const s=Math.max(e.tabIndex,0);return i===0||s===0?s>i:i>s}function qr(t,e){const i=[];while(t.length>0&&e.length>0){if(Yr(t[0],e[0])){i.push(e.shift())}else{i.push(t.shift())}}return i.concat(t,e)}function Vr(t){const e=t.length;if(e<2){return t}const i=Math.ceil(e/2);const s=Vr(t.slice(0,i));const r=Vr(t.slice(i));return qr(s,r)}function Jr(t,e){if(t.nodeType!==Node.ELEMENT_NODE||$r(t)){return false}const i=t;const s=Gr(i);let r=s>0;if(s>=0){e.push(i)}let o=[];if(i.localName==="slot"){o=i.assignedNodes({flatten:true})}else{o=(i.shadowRoot||i).children}[...o].forEach((t=>{r=Jr(t,e)||r}));return r}function Kr(t){if(t.matches('[tabindex="-1"]')){return false}if(t.matches("input, select, textarea, button, object")){return t.matches(":not([disabled])")}return t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function Zr(t){return t.getRootNode().activeElement===t}function Xr(t){const e=[];const i=Jr(t,e);if(i){return Vr(e)}return e}
|
|
946
|
+
/**
|
|
947
|
+
* @license
|
|
948
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
949
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
950
|
+
*/const Qr=[];class to{constructor(t){this.host=t;this.__trapNode=null;this.__onKeyDown=this.__onKeyDown.bind(this)}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){this.__trapNode=t;if(this.__focusableElements.length===0){this.__trapNode=null;throw new Error("The trap node should have at least one focusable descendant or be focusable itself.")}Qr.push(this);if(this.__focusedElementIndex===-1){this.__focusableElements[0].focus()}}releaseFocus(){this.__trapNode=null;Qr.pop()}__onKeyDown(t){if(!this.__trapNode){return}if(this!==Array.from(Qr).pop()){return}if(t.key==="Tab"){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e)}}__focusNextElement(t=false){const e=this.__focusableElements;const i=t?-1:1;const s=this.__focusedElementIndex;const r=(e.length+s+i)%e.length;const o=e[r];o.focus();if(o.localName==="input"){o.select()}}get __focusableElements(){return Xr(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Zr).pop())}}
|
|
951
|
+
/**
|
|
952
|
+
* @license
|
|
953
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
954
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
955
|
+
*/class eo extends(Ct(js(Hr(Ps)))){static get template(){return Ms`
|
|
956
|
+
<style>
|
|
957
|
+
:host {
|
|
958
|
+
z-index: 200;
|
|
959
|
+
position: fixed;
|
|
960
|
+
|
|
961
|
+
/* Despite of what the names say, <vaadin-overlay> is just a container
|
|
962
|
+
for position/sizing/alignment. The actual overlay is the overlay part. */
|
|
963
|
+
|
|
964
|
+
/* Default position constraints: the entire viewport. Note: themes can
|
|
965
|
+
override this to introduce gaps between the overlay and the viewport. */
|
|
966
|
+
top: 0;
|
|
967
|
+
right: 0;
|
|
968
|
+
bottom: var(--vaadin-overlay-viewport-bottom);
|
|
969
|
+
left: 0;
|
|
970
|
+
|
|
971
|
+
/* Use flexbox alignment for the overlay part. */
|
|
972
|
+
display: flex;
|
|
973
|
+
flex-direction: column; /* makes dropdowns sizing easier */
|
|
974
|
+
/* Align to center by default. */
|
|
975
|
+
align-items: center;
|
|
976
|
+
justify-content: center;
|
|
977
|
+
|
|
978
|
+
/* Allow centering when max-width/max-height applies. */
|
|
979
|
+
margin: auto;
|
|
980
|
+
|
|
981
|
+
/* The host is not clickable, only the overlay part is. */
|
|
982
|
+
pointer-events: none;
|
|
983
|
+
|
|
984
|
+
/* Remove tap highlight on touch devices. */
|
|
985
|
+
-webkit-tap-highlight-color: transparent;
|
|
986
|
+
|
|
987
|
+
/* CSS API for host */
|
|
988
|
+
--vaadin-overlay-viewport-bottom: 0;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
:host([hidden]),
|
|
992
|
+
:host(:not([opened]):not([closing])) {
|
|
993
|
+
display: none !important;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
[part='overlay'] {
|
|
997
|
+
-webkit-overflow-scrolling: touch;
|
|
998
|
+
overflow: auto;
|
|
999
|
+
pointer-events: auto;
|
|
1000
|
+
|
|
1001
|
+
/* Prevent overflowing the host in MSIE 11 */
|
|
1002
|
+
max-width: 100%;
|
|
1003
|
+
box-sizing: border-box;
|
|
1004
|
+
|
|
1005
|
+
-webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
[part='backdrop'] {
|
|
1009
|
+
z-index: -1;
|
|
1010
|
+
content: '';
|
|
1011
|
+
background: rgba(0, 0, 0, 0.5);
|
|
1012
|
+
position: fixed;
|
|
1013
|
+
top: 0;
|
|
1014
|
+
left: 0;
|
|
1015
|
+
bottom: 0;
|
|
1016
|
+
right: 0;
|
|
1017
|
+
pointer-events: auto;
|
|
1018
|
+
}
|
|
1019
|
+
</style>
|
|
1020
|
+
|
|
1021
|
+
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
1022
|
+
<div part="overlay" id="overlay" tabindex="0">
|
|
1023
|
+
<div part="content" id="content">
|
|
1024
|
+
<slot></slot>
|
|
1025
|
+
</div>
|
|
1026
|
+
</div>
|
|
1027
|
+
`}static get is(){return"vaadin-overlay"}static get properties(){return{opened:{type:Boolean,notify:true,observer:"_openedChanged",reflectToAttribute:true},owner:Element,renderer:Function,template:{type:Object,notify:true},content:{type:Object,notify:true},withBackdrop:{type:Boolean,value:false,reflectToAttribute:true},model:Object,modeless:{type:Boolean,value:false,reflectToAttribute:true,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:true,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:false},restoreFocusOnClose:{type:Boolean,value:false},restoreFocusNode:{type:HTMLElement},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldRenderer:Object,_oldOpened:Boolean}}static get observers(){return["_templateOrRendererChanged(template, 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);this._observer=new sr(this,(t=>{this._setTemplateFromNodes(t.addedNodes)}));this._boundIronOverlayCanceledListener=this._ironOverlayCanceled.bind(this);if(Lr){this._boundIosResizeListener=()=>this._detectIosNavbar()}this.__focusTrapController=new to(this)}ready(){super.ready();this._observer.flush();this.addEventListener("click",(()=>{}));this.$.backdrop.addEventListener("click",(()=>{}));this.addController(this.__focusTrapController)}_detectIosNavbar(){if(!this.opened){return}const t=window.innerHeight;const e=window.innerWidth;const i=e>t;const s=document.documentElement.clientHeight;if(i&&s>t){this.style.setProperty("--vaadin-overlay-viewport-bottom",`${s-t}px`)}else{this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}}_setTemplateFromNodes(t){this.template=t.find((t=>t.localName&&t.localName==="template"))||this.template}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:true,cancelable:true,detail:{sourceEvent:t}});this.dispatchEvent(e);if(!e.defaultPrevented){this.opened=false}}connectedCallback(){super.connectedCallback();if(this._boundIosResizeListener){this._detectIosNavbar();window.addEventListener("resize",this._boundIosResizeListener)}}disconnectedCallback(){super.disconnectedCallback();if(this._boundIosResizeListener){window.removeEventListener("resize",this._boundIosResizeListener)}}requestContentUpdate(){if(this.renderer){this.renderer.call(this.owner,this.content,this.owner,this.model)}}_ironOverlayCanceled(t){t.preventDefault()}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=false;this._mouseUpInside=false;return}if(!this._last){return}const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:true,cancelable:true,detail:{sourceEvent:t}});this.dispatchEvent(e);if(this.opened&&!e.defaultPrevented){this.close(t)}}_keydownListener(t){if(!this._last){return}if(this.modeless&&!t.composedPath().includes(this.$.overlay)){return}if(t.key==="Escape"){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:true,cancelable:true,detail:{sourceEvent:t}});this.dispatchEvent(e);if(this.opened&&!e.defaultPrevented){this.close(t)}}}_ensureTemplatized(){this._setTemplateFromNodes(Array.from(this.children))}_openedChanged(t,e){if(!this._instance){this._ensureTemplatized()}if(t){this.__restoreFocusNode=this._getActiveElement();this._animatedOpening();ur(this,(()=>{if(this.focusTrap){this.__focusTrapController.trapFocus(this.$.overlay)}const t=new CustomEvent("vaadin-overlay-open",{bubbles:true});this.dispatchEvent(t)}));document.addEventListener("keydown",this._boundKeydownListener);if(!this.modeless){this._addGlobalListeners()}}else if(e){if(this.focusTrap){this.__focusTrapController.releaseFocus()}this._animatedClosing();document.removeEventListener("keydown",this._boundKeydownListener);if(!this.modeless){this._removeGlobalListeners()}}}_hiddenChanged(t){if(t&&this.hasAttribute("closing")){this._flushAnimation("closing")}}_shouldAnimate(){const t=getComputedStyle(this).getPropertyValue("animation-name");const e=getComputedStyle(this).getPropertyValue("display")==="none";return!e&&t&&t!=="none"}_enqueueAnimation(t,e){const i=`__${t}Handler`;const s=t=>{if(t&&t.target!==this){return}e();this.removeEventListener("animationend",s);delete this[i]};this[i]=s;this.addEventListener("animationend",s)}_flushAnimation(t){const e=`__${t}Handler`;if(typeof this[e]==="function"){this[e]()}}_animatedOpening(){if(this.parentNode===document.body&&this.hasAttribute("closing")){this._flushAnimation("closing")}this._attachOverlay();if(!this.modeless){this._enterModalState()}this.setAttribute("opening","");if(this._shouldAnimate()){this._enqueueAnimation("opening",(()=>{this._finishOpening()}))}else{this._finishOpening()}}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder");this.parentNode.insertBefore(this._placeholder,this);document.body.appendChild(this);this.bringToFront()}_finishOpening(){document.addEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener);this.removeAttribute("opening")}_finishClosing(){document.removeEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener);this._detachOverlay();this.$.overlay.style.removeProperty("pointer-events");this.removeAttribute("closing")}_animatedClosing(){if(this.hasAttribute("opening")){this._flushAnimation("opening")}if(this._placeholder){this._exitModalState();const t=this.restoreFocusNode||this.__restoreFocusNode;if(this.restoreFocusOnClose&&t){const e=this._getActiveElement();if(e===document.body||this._deepContains(e)){setTimeout((()=>t.focus()))}this.__restoreFocusNode=null}this.setAttribute("closing","");this.dispatchEvent(new CustomEvent("vaadin-overlay-closing"));if(this._shouldAnimate()){this._enqueueAnimation("closing",(()=>{this._finishClosing()}))}else{this._finishClosing()}}}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder);this._placeholder.parentNode.removeChild(this._placeholder)}static get __attachedInstances(){return Array.from(document.body.children).filter((t=>t instanceof eo&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0))}get _last(){return this===eo.__attachedInstances.pop()}_modelessChanged(t){if(!t){if(this.opened){this._addGlobalListeners();this._enterModalState()}}else{this._removeGlobalListeners();this._exitModalState()}}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener);document.addEventListener("mouseup",this._boundMouseUpListener);document.documentElement.addEventListener("click",this._boundOutsideClickListener,true)}_enterModalState(){if(document.body.style.pointerEvents!=="none"){this._previousDocumentPointerEvents=document.body.style.pointerEvents;document.body.style.pointerEvents="none"}eo.__attachedInstances.forEach((t=>{if(t!==this){t.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none"}}))}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener);document.removeEventListener("mouseup",this._boundMouseUpListener);document.documentElement.removeEventListener("click",this._boundOutsideClickListener,true)}_exitModalState(){if(this._previousDocumentPointerEvents!==undefined){document.body.style.pointerEvents=this._previousDocumentPointerEvents;delete this._previousDocumentPointerEvents}const t=eo.__attachedInstances;let e;while(e=t.pop()){if(e===this){continue}e.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events");if(!e.modeless){break}}}_removeOldContent(){if(!this.content||!this._contentNodes){return}this._observer.disconnect();this._contentNodes.forEach((t=>{if(t.parentNode===this.content){this.content.removeChild(t)}}));if(this._originalContentPart){this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content);this.$.content=this._originalContentPart;this._originalContentPart=undefined}this._observer.connect();this._contentNodes=undefined;this.content=undefined}_stampOverlayTemplate(t){this._removeOldContent();if(!t._Templatizer){t._Templatizer=Pr(t,this,{forwardHostProp(t,e){if(this._instance){this._instance.forwardHostProp(t,e)}}})}this._instance=new t._Templatizer({});this._contentNodes=Array.from(this._instance.root.childNodes);const e=t._templateRoot||(t._templateRoot=t.getRootNode());if(e!==document){if(!this.$.content.shadowRoot){this.$.content.attachShadow({mode:"open"})}let t=Array.from(e.querySelectorAll("style")).reduce(((t,e)=>t+e.textContent),"");t=t.replace(/:host/g,":host-nomatch");if(t){const e=document.createElement("style");e.textContent=t;this.$.content.shadowRoot.appendChild(e);this._contentNodes.unshift(e)}this.$.content.shadowRoot.appendChild(this._instance.root);this.content=this.$.content.shadowRoot}else{this.appendChild(this._instance.root);this.content=this}}_removeNewRendererOrTemplate(t,e,i,s){if(t!==e){this.template=undefined}else if(i!==s){this.renderer=undefined}}_templateOrRendererChanged(t,e,i,s,r){if(t&&e){this._removeNewRendererOrTemplate(t,this._oldTemplate,e,this._oldRenderer);throw new Error("You should only use either a renderer or a template for overlay content")}const o=this._oldOwner!==i||this._oldModel!==s;this._oldModel=s;this._oldOwner=i;const n=this._oldTemplate!==t;this._oldTemplate=t;const a=this._oldRenderer!==e;this._oldRenderer=e;const l=this._oldOpened!==r;this._oldOpened=r;if(a){this.content=this;this.content.innerHTML="";delete this.content._$litPart$}if(t&&n){this._stampOverlayTemplate(t)}else if(e&&(a||l||o)){if(r){this.requestContentUpdate()}}}_getActiveElement(){let t=document.activeElement||document.body;while(t.shadowRoot&&t.shadowRoot.activeElement){t=t.shadowRoot.activeElement}return t}_deepContains(t){if(this.contains(t)){return true}let e=t;const i=t.ownerDocument;while(e&&e!==i&&e!==this){e=e.parentNode||e.host}return e===this}bringToFront(){let t="";const e=eo.__attachedInstances.filter((t=>t!==this)).pop();if(e){const i=e.__zIndex;t=i+1}this.style.zIndex=t;this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}}customElements.define(eo.is,eo);
|
|
1028
|
+
/**
|
|
1029
|
+
* @license
|
|
1030
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1031
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1032
|
+
*/const io=p`
|
|
1033
|
+
:host([opening]),
|
|
1034
|
+
:host([closing]) {
|
|
1035
|
+
animation: 0.14s lumo-overlay-dummy-animation;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
[part='overlay'] {
|
|
1039
|
+
will-change: opacity, transform;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
:host([opening]) [part='overlay'] {
|
|
1043
|
+
animation: 0.1s lumo-menu-overlay-enter ease-out both;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
@keyframes lumo-menu-overlay-enter {
|
|
1047
|
+
0% {
|
|
1048
|
+
opacity: 0;
|
|
1049
|
+
transform: translateY(-4px);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
:host([closing]) [part='overlay'] {
|
|
1054
|
+
animation: 0.1s lumo-menu-overlay-exit both;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
@keyframes lumo-menu-overlay-exit {
|
|
1058
|
+
100% {
|
|
1059
|
+
opacity: 0;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
`;bt("",io,{moduleId:"lumo-menu-overlay-core"});const so=p`
|
|
1063
|
+
/* Small viewport (bottom sheet) styles */
|
|
1064
|
+
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
1065
|
+
@media (max-width: 420px), (max-height: 420px) {
|
|
1066
|
+
:host {
|
|
1067
|
+
top: 0 !important;
|
|
1068
|
+
right: 0 !important;
|
|
1069
|
+
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
1070
|
+
left: 0 !important;
|
|
1071
|
+
align-items: stretch !important;
|
|
1072
|
+
justify-content: flex-end !important;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
[part='overlay'] {
|
|
1076
|
+
max-height: 50vh;
|
|
1077
|
+
width: 100vw;
|
|
1078
|
+
border-radius: 0;
|
|
1079
|
+
box-shadow: var(--lumo-box-shadow-xl);
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
/* The content part scrolls instead of the overlay part, because of the gradient fade-out */
|
|
1083
|
+
[part='content'] {
|
|
1084
|
+
padding: 30px var(--lumo-space-m);
|
|
1085
|
+
max-height: inherit;
|
|
1086
|
+
box-sizing: border-box;
|
|
1087
|
+
-webkit-overflow-scrolling: touch;
|
|
1088
|
+
overflow: auto;
|
|
1089
|
+
-webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
1090
|
+
mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
[part='backdrop'] {
|
|
1094
|
+
display: block;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
/* Animations */
|
|
1098
|
+
|
|
1099
|
+
:host([opening]) [part='overlay'] {
|
|
1100
|
+
animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
:host([closing]),
|
|
1104
|
+
:host([closing]) [part='backdrop'] {
|
|
1105
|
+
animation-delay: 0.14s;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
:host([closing]) [part='overlay'] {
|
|
1109
|
+
animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
@keyframes lumo-mobile-menu-overlay-enter {
|
|
1114
|
+
0% {
|
|
1115
|
+
transform: translateY(150%);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
@keyframes lumo-mobile-menu-overlay-exit {
|
|
1120
|
+
100% {
|
|
1121
|
+
transform: translateY(150%);
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
`;const ro=[Us,io,so];bt("",ro,{moduleId:"lumo-menu-overlay"});const oo=p`
|
|
1125
|
+
[part='overlay'] {
|
|
1126
|
+
/*
|
|
1127
|
+
Width:
|
|
1128
|
+
date cell widths
|
|
1129
|
+
+ month calendar side padding
|
|
1130
|
+
+ year scroller width
|
|
1131
|
+
*/
|
|
1132
|
+
/* prettier-ignore */
|
|
1133
|
+
width:
|
|
1134
|
+
calc(
|
|
1135
|
+
var(--lumo-size-m) * 7
|
|
1136
|
+
+ var(--lumo-space-xs) * 2
|
|
1137
|
+
+ 57px
|
|
1138
|
+
);
|
|
1139
|
+
height: 100%;
|
|
1140
|
+
max-height: calc(var(--lumo-size-m) * 14);
|
|
1141
|
+
overflow: hidden;
|
|
1142
|
+
-webkit-tap-highlight-color: transparent;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
[part='overlay'] {
|
|
1146
|
+
flex-direction: column;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
[part='content'] {
|
|
1150
|
+
padding: 0;
|
|
1151
|
+
height: 100%;
|
|
1152
|
+
overflow: hidden;
|
|
1153
|
+
-webkit-mask-image: none;
|
|
1154
|
+
mask-image: none;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
:host([top-aligned]) [part~='overlay'] {
|
|
1158
|
+
margin-top: var(--lumo-space-xs);
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
:host([bottom-aligned]) [part~='overlay'] {
|
|
1162
|
+
margin-bottom: var(--lumo-space-xs);
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
@media (max-width: 420px), (max-height: 420px) {
|
|
1166
|
+
[part='overlay'] {
|
|
1167
|
+
width: 100vw;
|
|
1168
|
+
height: 70vh;
|
|
1169
|
+
max-height: 70vh;
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
`;bt("vaadin-date-picker-overlay",[ro,oo],{moduleId:"lumo-date-picker-overlay"});const no=p`
|
|
1173
|
+
:host {
|
|
1174
|
+
/* Sizing */
|
|
1175
|
+
--lumo-button-size: var(--lumo-size-m);
|
|
1176
|
+
min-width: calc(var(--lumo-button-size) * 2);
|
|
1177
|
+
height: var(--lumo-button-size);
|
|
1178
|
+
padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2);
|
|
1179
|
+
margin: var(--lumo-space-xs) 0;
|
|
1180
|
+
box-sizing: border-box;
|
|
1181
|
+
/* Style */
|
|
1182
|
+
font-family: var(--lumo-font-family);
|
|
1183
|
+
font-size: var(--lumo-font-size-m);
|
|
1184
|
+
font-weight: 500;
|
|
1185
|
+
color: var(--_lumo-button-color, var(--lumo-primary-text-color));
|
|
1186
|
+
background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
|
|
1187
|
+
border-radius: var(--lumo-border-radius-m);
|
|
1188
|
+
cursor: var(--lumo-clickable-cursor);
|
|
1189
|
+
-webkit-tap-highlight-color: transparent;
|
|
1190
|
+
-webkit-font-smoothing: antialiased;
|
|
1191
|
+
-moz-osx-font-smoothing: grayscale;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
/* Set only for the internal parts so we don't affect the host vertical alignment */
|
|
1195
|
+
[part='label'],
|
|
1196
|
+
[part='prefix'],
|
|
1197
|
+
[part='suffix'] {
|
|
1198
|
+
line-height: var(--lumo-line-height-xs);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
[part='label'] {
|
|
1202
|
+
padding: calc(var(--lumo-button-size) / 6) 0;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
:host([theme~='small']) {
|
|
1206
|
+
font-size: var(--lumo-font-size-s);
|
|
1207
|
+
--lumo-button-size: var(--lumo-size-s);
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
:host([theme~='large']) {
|
|
1211
|
+
font-size: var(--lumo-font-size-l);
|
|
1212
|
+
--lumo-button-size: var(--lumo-size-l);
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
/* For interaction states */
|
|
1216
|
+
:host::before,
|
|
1217
|
+
:host::after {
|
|
1218
|
+
content: '';
|
|
1219
|
+
/* We rely on the host always being relative */
|
|
1220
|
+
position: absolute;
|
|
1221
|
+
z-index: 1;
|
|
1222
|
+
top: 0;
|
|
1223
|
+
right: 0;
|
|
1224
|
+
bottom: 0;
|
|
1225
|
+
left: 0;
|
|
1226
|
+
background-color: currentColor;
|
|
1227
|
+
border-radius: inherit;
|
|
1228
|
+
opacity: 0;
|
|
1229
|
+
pointer-events: none;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
/* Hover */
|
|
1233
|
+
|
|
1234
|
+
@media (any-hover: hover) {
|
|
1235
|
+
:host(:hover)::before {
|
|
1236
|
+
opacity: 0.02;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
/* Active */
|
|
1241
|
+
|
|
1242
|
+
:host::after {
|
|
1243
|
+
transition: opacity 1.4s, transform 0.1s;
|
|
1244
|
+
filter: blur(8px);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
:host([active])::before {
|
|
1248
|
+
opacity: 0.05;
|
|
1249
|
+
transition-duration: 0s;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
:host([active])::after {
|
|
1253
|
+
opacity: 0.1;
|
|
1254
|
+
transition-duration: 0s, 0s;
|
|
1255
|
+
transform: scale(0);
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
/* Keyboard focus */
|
|
1259
|
+
|
|
1260
|
+
:host([focus-ring]) {
|
|
1261
|
+
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
:host([theme~='primary'][focus-ring]) {
|
|
1265
|
+
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
/* Types (primary, tertiary, tertiary-inline */
|
|
1269
|
+
|
|
1270
|
+
:host([theme~='tertiary']),
|
|
1271
|
+
:host([theme~='tertiary-inline']) {
|
|
1272
|
+
background-color: transparent !important;
|
|
1273
|
+
min-width: 0;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
:host([theme~='tertiary']) {
|
|
1277
|
+
padding: 0 calc(var(--lumo-button-size) / 6);
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
:host([theme~='tertiary-inline'])::before {
|
|
1281
|
+
display: none;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
:host([theme~='tertiary-inline']) {
|
|
1285
|
+
margin: 0;
|
|
1286
|
+
height: auto;
|
|
1287
|
+
padding: 0;
|
|
1288
|
+
line-height: inherit;
|
|
1289
|
+
font-size: inherit;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
:host([theme~='tertiary-inline']) [part='label'] {
|
|
1293
|
+
padding: 0;
|
|
1294
|
+
overflow: visible;
|
|
1295
|
+
line-height: inherit;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
:host([theme~='primary']) {
|
|
1299
|
+
background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
|
|
1300
|
+
color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
|
|
1301
|
+
font-weight: 600;
|
|
1302
|
+
min-width: calc(var(--lumo-button-size) * 2.5);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
:host([theme~='primary'])::before {
|
|
1306
|
+
background-color: black;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
@media (any-hover: hover) {
|
|
1310
|
+
:host([theme~='primary']:hover)::before {
|
|
1311
|
+
opacity: 0.05;
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
:host([theme~='primary'][active])::before {
|
|
1316
|
+
opacity: 0.1;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
:host([theme~='primary'][active])::after {
|
|
1320
|
+
opacity: 0.2;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/* Colors (success, error, contrast) */
|
|
1324
|
+
|
|
1325
|
+
:host([theme~='success']) {
|
|
1326
|
+
color: var(--lumo-success-text-color);
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
:host([theme~='success'][theme~='primary']) {
|
|
1330
|
+
background-color: var(--lumo-success-color);
|
|
1331
|
+
color: var(--lumo-success-contrast-color);
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
:host([theme~='error']) {
|
|
1335
|
+
color: var(--lumo-error-text-color);
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
:host([theme~='error'][theme~='primary']) {
|
|
1339
|
+
background-color: var(--lumo-error-color);
|
|
1340
|
+
color: var(--lumo-error-contrast-color);
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
:host([theme~='contrast']) {
|
|
1344
|
+
color: var(--lumo-contrast);
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
:host([theme~='contrast'][theme~='primary']) {
|
|
1348
|
+
background-color: var(--lumo-contrast);
|
|
1349
|
+
color: var(--lumo-base-color);
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
/* Disabled state. Keep selectors after other color variants. */
|
|
1353
|
+
|
|
1354
|
+
:host([disabled]) {
|
|
1355
|
+
pointer-events: none;
|
|
1356
|
+
color: var(--lumo-disabled-text-color);
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
:host([theme~='primary'][disabled]) {
|
|
1360
|
+
background-color: var(--lumo-contrast-30pct);
|
|
1361
|
+
color: var(--lumo-base-color);
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
:host([theme~='primary'][disabled]) [part] {
|
|
1365
|
+
opacity: 0.7;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
/* Icons */
|
|
1369
|
+
|
|
1370
|
+
[part] ::slotted(vaadin-icon),
|
|
1371
|
+
[part] ::slotted(iron-icon) {
|
|
1372
|
+
display: inline-block;
|
|
1373
|
+
width: var(--lumo-icon-size-m);
|
|
1374
|
+
height: var(--lumo-icon-size-m);
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
1378
|
+
[part] ::slotted(vaadin-icon[icon^='vaadin:']),
|
|
1379
|
+
[part] ::slotted(iron-icon[icon^='vaadin:']) {
|
|
1380
|
+
padding: 0.25em;
|
|
1381
|
+
box-sizing: border-box !important;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
[part='prefix'] {
|
|
1385
|
+
margin-left: -0.25em;
|
|
1386
|
+
margin-right: 0.25em;
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
[part='suffix'] {
|
|
1390
|
+
margin-left: 0.25em;
|
|
1391
|
+
margin-right: -0.25em;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
/* Icon-only */
|
|
1395
|
+
|
|
1396
|
+
:host([theme~='icon']:not([theme~='tertiary-inline'])) {
|
|
1397
|
+
min-width: var(--lumo-button-size);
|
|
1398
|
+
padding-left: calc(var(--lumo-button-size) / 4);
|
|
1399
|
+
padding-right: calc(var(--lumo-button-size) / 4);
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
:host([theme~='icon']) [part='prefix'],
|
|
1403
|
+
:host([theme~='icon']) [part='suffix'] {
|
|
1404
|
+
margin-left: 0;
|
|
1405
|
+
margin-right: 0;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
/* RTL specific styles */
|
|
1409
|
+
|
|
1410
|
+
:host([dir='rtl']) [part='prefix'] {
|
|
1411
|
+
margin-left: 0.25em;
|
|
1412
|
+
margin-right: -0.25em;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
:host([dir='rtl']) [part='suffix'] {
|
|
1416
|
+
margin-left: -0.25em;
|
|
1417
|
+
margin-right: 0.25em;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
:host([dir='rtl'][theme~='icon']) [part='prefix'],
|
|
1421
|
+
:host([dir='rtl'][theme~='icon']) [part='suffix'] {
|
|
1422
|
+
margin-left: 0;
|
|
1423
|
+
margin-right: 0;
|
|
1424
|
+
}
|
|
1425
|
+
`;bt("vaadin-button",no,{moduleId:"lumo-button"});const ao=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i;const lo=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function ho(){function t(){return true}return mo(t)}function co(){try{if(uo()){return true}if(!fo()){return false}if(lo){return!po()}return!ho()}catch(t){return false}}function uo(){return localStorage.getItem("vaadin.developmentmode.force")}function fo(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function po(){if(lo){const t=Object.keys(lo).map((t=>lo[t])).filter((t=>t.productionMode));if(t.length>0){return true}}return false}function mo(t,e){if(typeof t!=="function"){return}const i=ao.exec(t.toString());if(i){try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}}return t(e)}window["Vaadin"]=window["Vaadin"]||{};const bo=function(t,e){if(window.Vaadin.developmentMode){return mo(t,e)}};if(window.Vaadin.developmentMode===undefined){window.Vaadin.developmentMode=co()}function go(){}const vo=function(){if(typeof bo==="function"){return bo(go)}};
|
|
1426
|
+
/**
|
|
1427
|
+
* @license
|
|
1428
|
+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1429
|
+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1430
|
+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1431
|
+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1432
|
+
* Code distributed by Google as part of the polymer project is also
|
|
1433
|
+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1434
|
+
*/let yo=0;let wo=0;const xo=[];let _o=0;let ko=false;const Ao=document.createTextNode("");new window.MutationObserver(Do).observe(Ao,{characterData:true});function Do(){ko=false;const t=xo.length;for(let e=0;e<t;e++){const t=xo[e];if(t){try{t()}catch(t){setTimeout((()=>{throw t}))}}}xo.splice(0,t);wo+=t}const Co={after(t){return{run(e){return window.setTimeout(e,t)},cancel(t){window.clearTimeout(t)}}},run(t,e){return window.setTimeout(t,e)},cancel(t){window.clearTimeout(t)}};const To={run(t){return window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16)},cancel(t){if(window.cancelIdleCallback){window.cancelIdleCallback(t)}else{window.clearTimeout(t)}}};const So={run(t){if(!ko){ko=true;Ao.textContent=_o;_o+=1}xo.push(t);const e=yo;yo+=1;return e},cancel(t){const e=t-wo;if(e>=0){if(!xo[e]){throw new Error(`invalid async handle: ${t}`)}xo[e]=null}}};
|
|
1435
|
+
/**
|
|
1436
|
+
@license
|
|
1437
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1438
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1439
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1440
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1441
|
+
Code distributed by Google as part of the polymer project is also
|
|
1442
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1443
|
+
*/class Mo{static debounce(t,e,i){if(t instanceof Mo){t._cancelAsync()}else{t=new Mo}t.setConfig(e,i);return t}constructor(){this._asyncModule=null;this._callback=null;this._timer=null}setConfig(t,e){this._asyncModule=t;this._callback=e;this._timer=this._asyncModule.run((()=>{this._timer=null;zo.delete(this);this._callback()}))}cancel(){if(this.isActive()){this._cancelAsync();zo.delete(this)}}_cancelAsync(){if(this.isActive()){this._asyncModule.cancel(this._timer);this._timer=null}}flush(){if(this.isActive()){this.cancel();this._callback()}}isActive(){return this._timer!=null}}let zo=new Set;function Po(t){zo.add(t)}
|
|
1444
|
+
/**
|
|
1445
|
+
* @license
|
|
1446
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1447
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1448
|
+
*/window.Vaadin=window.Vaadin||{};window.Vaadin.registrations=window.Vaadin.registrations||[];window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{};window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){vo()};let Eo;const Fo=new Set;const Oo=t=>class e extends(js(t)){static get version(){return"23.3.14"}static finalize(){super.finalize();const{is:t}=this;if(t&&!Fo.has(t)){window.Vaadin.registrations.push(this);Fo.add(t);if(window.Vaadin.developmentModeCallback){Eo=Mo.debounce(Eo,To,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}));Po(Eo)}}}constructor(){super();if(document.doctype===null){console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}}
|
|
1449
|
+
/**
|
|
1450
|
+
* @license
|
|
1451
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1452
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1453
|
+
*/;let Bo=0;function Io(){return Bo++}
|
|
1454
|
+
/**
|
|
1455
|
+
* @license
|
|
1456
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1457
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1458
|
+
*/class No extends EventTarget{static generateId(t,e){const i=t||"default";return`${i}-${e.localName}-${Io()}`}constructor(t,e,i,s,r){super();this.host=t;this.slotName=e;this.slotFactory=i;this.slotInitializer=s;if(r){this.defaultId=No.generateId(e,t)}}hostConnected(){if(!this.initialized){let t=this.getSlotChild();if(!t){t=this.attachDefaultNode()}else{this.node=t;this.initCustomNode(t)}this.initNode(t);this.observe();this.initialized=true}}attachDefaultNode(){const{host:t,slotName:e,slotFactory:i}=this;let s=this.defaultNode;if(!s&&i){s=i(t);if(s instanceof Element){if(e!==""){s.setAttribute("slot",e)}this.node=s;this.defaultNode=s}}if(s){t.appendChild(s)}return s}getSlotChild(){const{slotName:t}=this;return Array.from(this.host.childNodes).find((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&t===""))}initNode(t){const{slotInitializer:e}=this;if(e){e(this.host,t)}}initCustomNode(t){}teardownNode(t){}observe(){const{slotName:t}=this;const e=t===""?"slot:not([name])":`slot[name=${t}]`;const i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new sr(i,(t=>{const e=this.node;const i=t.addedNodes.find((t=>t!==e));if(t.removedNodes.length){t.removedNodes.forEach((t=>{this.teardownNode(t)}))}if(i){if(e&&e.isConnected){this.host.removeChild(e)}this.node=i;if(i!==this.defaultNode){this.initCustomNode(i);this.initNode(i)}}}))}}
|
|
1459
|
+
/**
|
|
1460
|
+
* @license
|
|
1461
|
+
* Copyright (c) 2022 Vaadin Ltd.
|
|
1462
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1463
|
+
*/class Ro extends No{constructor(t){super(t,"tooltip");this.setTarget(t)}initCustomNode(t){t.target=this.target;if(this.context!==undefined){t.context=this.context}if(this.manual!==undefined){t.manual=this.manual}if(this.opened!==undefined){t.opened=this.opened}if(this.position!==undefined){t._position=this.position}if(this.shouldShow!==undefined){t.shouldShow=this.shouldShow}}setContext(t){this.context=t;const e=this.node;if(e){e.context=t}}setManual(t){this.manual=t;const e=this.node;if(e){e.manual=t}}setOpened(t){this.opened=t;const e=this.node;if(e){e.opened=t}}setPosition(t){this.position=t;const e=this.node;if(e){e._position=t}}setShouldShow(t){this.shouldShow=t;const e=this.node;if(e){e.shouldShow=t}}setTarget(t){this.target=t;const e=this.node;if(e){e.target=t}}}
|
|
1464
|
+
/**
|
|
1465
|
+
* @license
|
|
1466
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1467
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1468
|
+
*/const jo=ae((t=>class e extends t{static get properties(){return{disabled:{type:Boolean,value:false,observer:"_disabledChanged",reflectToAttribute:true}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){if(t){this.setAttribute("aria-disabled","true")}else{this.removeAttribute("aria-disabled")}}click(){if(!this.disabled){super.click()}}}));
|
|
1469
|
+
/**
|
|
1470
|
+
@license
|
|
1471
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1472
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1473
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1474
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1475
|
+
Code distributed by Google as part of the polymer project is also
|
|
1476
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1477
|
+
*/const Lo=false;const Ho=t=>t;const Wo=typeof document.head.style.touchAction==="string";const Uo="__polymerGestures";const $o="__polymerGesturesHandled";const Go="__polymerGesturesTouchAction";const Yo=25;const qo=5;const Vo=2;const Jo=["mousedown","mousemove","mouseup","click"];const Ko=[0,1,4,2];const Zo=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(t){return false}}();function Xo(t){return Jo.indexOf(t)>-1}let Qo=false;(function(){try{const t=Object.defineProperty({},"passive",{get(){Qo=true}});window.addEventListener("test",null,t);window.removeEventListener("test",null,t)}catch(t){}})();function tn(t){if(Xo(t)||t==="touchend"){return}if(Wo&&Qo&&Lo){return{passive:true}}}const en=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const sn={button:true,command:true,fieldset:true,input:true,keygen:true,optgroup:true,option:true,select:true,textarea:true};function rn(t){const e=t.type;if(!Xo(e)){return false}if(e==="mousemove"){let e=t.buttons===undefined?1:t.buttons;if(t instanceof window.MouseEvent&&!Zo){e=Ko[t.which]||0}return Boolean(e&1)}const i=t.button===undefined?0:t.button;return i===0}function on(t){if(t.type==="click"){if(t.detail===0){return true}const e=pn(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE){return true}const i=e.getBoundingClientRect();const s=t.pageX,r=t.pageY;return!(s>=i.left&&s<=i.right&&r>=i.top&&r<=i.bottom)}return false}const nn={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:false}};function an(t){let e="auto";const i=cn(t);for(let t=0,s;t<i.length;t++){s=i[t];if(s[Go]){e=s[Go];break}}return e}function ln(t,e,i){t.movefn=e;t.upfn=i;document.addEventListener("mousemove",e);document.addEventListener("mouseup",i)}function hn(t){document.removeEventListener("mousemove",t.movefn);document.removeEventListener("mouseup",t.upfn);t.movefn=null;t.upfn=null}const cn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[];const un={};const dn=[];function fn(t,e){let i=document.elementFromPoint(t,e);let s=i;while(s&&s.shadowRoot&&!window.ShadyDOM){const r=s;s=s.shadowRoot.elementFromPoint(t,e);if(r===s){break}if(s){i=s}}return i}function pn(t){const e=cn(t);return e.length>0?e[0]:t.target}function mn(t){const e=t.type;const i=t.currentTarget;const s=i[Uo];if(!s){return}const r=s[e];if(!r){return}if(!t[$o]){t[$o]={};if(e.startsWith("touch")){const i=t.changedTouches[0];if(e==="touchstart"){if(t.touches.length===1){nn.touch.id=i.identifier}}if(nn.touch.id!==i.identifier){return}if(!Wo){if(e==="touchstart"||e==="touchmove"){bn(t)}}}}const o=t[$o];if(o.skip){return}for(let e=0,i;e<dn.length;e++){i=dn[e];if(r[i.name]&&!o[i.name]){if(i.flow&&i.flow.start.indexOf(t.type)>-1&&i.reset){i.reset()}}}for(let i=0,s;i<dn.length;i++){s=dn[i];if(r[s.name]&&!o[s.name]){o[s.name]=true;s[e](t)}}}function bn(t){const e=t.changedTouches[0];const i=t.type;if(i==="touchstart"){nn.touch.x=e.clientX;nn.touch.y=e.clientY;nn.touch.scrollDecided=false}else if(i==="touchmove"){if(nn.touch.scrollDecided){return}nn.touch.scrollDecided=true;const i=an(t);let s=false;const r=Math.abs(nn.touch.x-e.clientX);const o=Math.abs(nn.touch.y-e.clientY);if(!t.cancelable);else if(i==="none"){s=true}else if(i==="pan-x"){s=o>r}else if(i==="pan-y"){s=r>o}if(s){t.preventDefault()}else{kn("track")}}}function gn(t,e,i){if(un[e]){vn(t,e,i);return true}return false}function vn(t,e,i){const s=un[e];const r=s.deps;const o=s.name;let n=t[Uo];if(!n){t[Uo]=n={}}for(let e=0,i,s;e<r.length;e++){i=r[e];if(en&&Xo(i)&&i!=="click"){continue}s=n[i];if(!s){n[i]=s={_count:0}}if(s._count===0){t.addEventListener(i,mn,tn(i))}s[o]=(s[o]||0)+1;s._count=(s._count||0)+1}t.addEventListener(e,i);if(s.touchAction){xn(t,s.touchAction)}}function yn(t){dn.push(t);for(let e=0;e<t.emits.length;e++){un[t.emits[e]]=t}}function wn(t){for(let e=0,i;e<dn.length;e++){i=dn[e];for(let e=0,s;e<i.emits.length;e++){s=i.emits[e];if(s===t){return i}}}return null}function xn(t,e){if(Wo&&t instanceof HTMLElement){So.run((()=>{t.style.touchAction=e}))}t[Go]=e}function _n(t,e,i){const s=new Event(e,{bubbles:true,cancelable:true,composed:true});s.detail=i;Ho(t).dispatchEvent(s);if(s.defaultPrevented){const t=i.preventer||i.sourceEvent;if(t&&t.preventDefault){t.preventDefault()}}}function kn(t){const e=wn(t);if(e.info){e.info.prevent=true}}yn({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){hn(this.info)},mousedown(t){if(!rn(t)){return}const e=pn(t);const i=this;const s=t=>{if(!rn(t)){An("up",e,t);hn(i.info)}};const r=t=>{if(rn(t)){An("up",e,t)}hn(i.info)};ln(this.info,s,r);An("down",e,t)},touchstart(t){An("down",pn(t),t.changedTouches[0],t)},touchend(t){An("up",pn(t),t.changedTouches[0],t)}});function An(t,e,i,s){if(!e){return}_n(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent(t){return kn(t)}})}yn({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:false,moves:[],addMove(t){if(this.moves.length>Vo){this.moves.shift()}this.moves.push(t)},movefn:null,upfn:null,prevent:false},reset(){this.info.state="start";this.info.started=false;this.info.moves=[];this.info.x=0;this.info.y=0;this.info.prevent=false;hn(this.info)},mousedown(t){if(!rn(t)){return}const e=pn(t);const i=this;const s=t=>{const s=t.clientX,r=t.clientY;if(Dn(i.info,s,r)){i.info.state=i.info.started?t.type==="mouseup"?"end":"track":"start";if(i.info.state==="start"){kn("tap")}i.info.addMove({x:s,y:r});if(!rn(t)){i.info.state="end";hn(i.info)}if(e){Cn(i.info,e,t)}i.info.started=true}};const r=t=>{if(i.info.started){s(t)}hn(i.info)};ln(this.info,s,r);this.info.x=t.clientX;this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX;this.info.y=e.clientY},touchmove(t){const e=pn(t);const i=t.changedTouches[0];const s=i.clientX,r=i.clientY;if(Dn(this.info,s,r)){if(this.info.state==="start"){kn("tap")}this.info.addMove({x:s,y:r});Cn(this.info,e,i);this.info.state="track";this.info.started=true}},touchend(t){const e=pn(t);const i=t.changedTouches[0];if(this.info.started){this.info.state="end";this.info.addMove({x:i.clientX,y:i.clientY});Cn(this.info,e,i)}}});function Dn(t,e,i){if(t.prevent){return false}if(t.started){return true}const s=Math.abs(t.x-e);const r=Math.abs(t.y-i);return s>=qo||r>=qo}function Cn(t,e,i){if(!e){return}const s=t.moves[t.moves.length-2];const r=t.moves[t.moves.length-1];const o=r.x-t.x;const n=r.y-t.y;let a,l=0;if(s){a=r.x-s.x;l=r.y-s.y}_n(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o,dy:n,ddx:a,ddy:l,sourceEvent:i,hover(){return fn(i.clientX,i.clientY)}})}yn({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:false},reset(){this.info.x=NaN;this.info.y=NaN;this.info.prevent=false},mousedown(t){if(rn(t)){this.info.x=t.clientX;this.info.y=t.clientY}},click(t){if(rn(t)){Tn(this.info,t)}},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX;this.info.y=e.clientY},touchend(t){Tn(this.info,t.changedTouches[0],t)}});function Tn(t,e,i){const s=Math.abs(e.clientX-t.x);const r=Math.abs(e.clientY-t.y);const o=pn(i||e);if(!o||sn[o.localName]&&o.hasAttribute("disabled")){return}if(isNaN(s)||isNaN(r)||s<=Yo&&r<=Yo||on(e)){if(!t.prevent){_n(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i})}}}
|
|
1478
|
+
/**
|
|
1479
|
+
* @license
|
|
1480
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1481
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1482
|
+
*/const Sn=ae((t=>class e extends t{ready(){super.ready();this.addEventListener("keydown",(t=>{this._onKeyDown(t)}));this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t);break}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}}));
|
|
1483
|
+
/**
|
|
1484
|
+
* @license
|
|
1485
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1486
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1487
|
+
*/const Mn=t=>class e extends(jo(Sn(t))){get _activeKeys(){return[" "]}ready(){super.ready();gn(this,"down",(t=>{if(this._shouldSetActive(t)){this._setActive(true)}}));gn(this,"up",(()=>{this._setActive(false)}))}disconnectedCallback(){super.disconnectedCallback();this._setActive(false)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t);if(this._shouldSetActive(t)&&this._activeKeys.includes(t.key)){this._setActive(true);document.addEventListener("keyup",(t=>{if(this._activeKeys.includes(t.key)){this._setActive(false)}}),{once:true})}}_setActive(t){this.toggleAttribute("active",t)}}
|
|
1488
|
+
/**
|
|
1489
|
+
* @license
|
|
1490
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1491
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1492
|
+
*/;const zn=ae((t=>class e extends t{get _keyboardActive(){return Ur()}ready(){this.addEventListener("focusin",(t=>{if(this._shouldSetFocus(t)){this._setFocused(true)}}));this.addEventListener("focusout",(t=>{if(this._shouldRemoveFocus(t)){this._setFocused(false)}}));super.ready()}disconnectedCallback(){super.disconnectedCallback();if(this.hasAttribute("focused")){this._setFocused(false)}}_setFocused(t){this.toggleAttribute("focused",t);this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return true}_shouldRemoveFocus(t){return true}}));
|
|
1493
|
+
/**
|
|
1494
|
+
* @license
|
|
1495
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1496
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1497
|
+
*/const Pn=t=>class e extends(jo(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:true,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e);if(t){if(this.tabindex!==undefined){this._lastTabIndex=this.tabindex}this.tabindex=-1}else if(e){this.tabindex=this._lastTabIndex}}_tabindexChanged(t){if(this.disabled&&t!==-1){this._lastTabIndex=t;this.tabindex=-1}}}
|
|
1498
|
+
/**
|
|
1499
|
+
* @license
|
|
1500
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1501
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1502
|
+
*/;const En=t=>class e extends(Mn(Pn(zn(t)))){static get properties(){return{tabindex:{value:0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready();if(!this.hasAttribute("role")){this.setAttribute("role","button")}}_onKeyDown(t){super._onKeyDown(t);if(this._activeKeys.includes(t.key)){t.preventDefault();this.click()}}}
|
|
1503
|
+
/**
|
|
1504
|
+
* @license
|
|
1505
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1506
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1507
|
+
*/;class Fn extends(En(Oo(Ct(Hr(Ps))))){static get is(){return"vaadin-button"}static get template(){return Ms`
|
|
1508
|
+
<style>
|
|
1509
|
+
:host {
|
|
1510
|
+
display: inline-block;
|
|
1511
|
+
position: relative;
|
|
1512
|
+
outline: none;
|
|
1513
|
+
white-space: nowrap;
|
|
1514
|
+
-webkit-user-select: none;
|
|
1515
|
+
-moz-user-select: none;
|
|
1516
|
+
user-select: none;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
:host([hidden]) {
|
|
1520
|
+
display: none !important;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
/* Aligns the button with form fields when placed on the same line.
|
|
1524
|
+
Note, to make it work, the form fields should have the same "::before" pseudo-element. */
|
|
1525
|
+
.vaadin-button-container::before {
|
|
1526
|
+
content: '\\2003';
|
|
1527
|
+
display: inline-block;
|
|
1528
|
+
width: 0;
|
|
1529
|
+
max-height: 100%;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
.vaadin-button-container {
|
|
1533
|
+
display: inline-flex;
|
|
1534
|
+
align-items: center;
|
|
1535
|
+
justify-content: center;
|
|
1536
|
+
text-align: center;
|
|
1537
|
+
width: 100%;
|
|
1538
|
+
height: 100%;
|
|
1539
|
+
min-height: inherit;
|
|
1540
|
+
text-shadow: inherit;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
[part='prefix'],
|
|
1544
|
+
[part='suffix'] {
|
|
1545
|
+
flex: none;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
[part='label'] {
|
|
1549
|
+
white-space: nowrap;
|
|
1550
|
+
overflow: hidden;
|
|
1551
|
+
text-overflow: ellipsis;
|
|
1552
|
+
}
|
|
1553
|
+
</style>
|
|
1554
|
+
<div class="vaadin-button-container">
|
|
1555
|
+
<span part="prefix" aria-hidden="true">
|
|
1556
|
+
<slot name="prefix"></slot>
|
|
1557
|
+
</span>
|
|
1558
|
+
<span part="label">
|
|
1559
|
+
<slot></slot>
|
|
1560
|
+
</span>
|
|
1561
|
+
<span part="suffix" aria-hidden="true">
|
|
1562
|
+
<slot name="suffix"></slot>
|
|
1563
|
+
</span>
|
|
1564
|
+
</div>
|
|
1565
|
+
<slot name="tooltip"></slot>
|
|
1566
|
+
`}ready(){super.ready();this._tooltipController=new Ro(this);this.addController(this._tooltipController)}}customElements.define(Fn.is,Fn);bt("vaadin-date-picker-overlay-content",p`
|
|
1567
|
+
:host {
|
|
1568
|
+
position: relative;
|
|
1569
|
+
/* Background for the year scroller, placed here as we are using a mask image on the actual years part */
|
|
1570
|
+
background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct));
|
|
1571
|
+
background-size: 57px 100%;
|
|
1572
|
+
background-position: top right;
|
|
1573
|
+
background-repeat: no-repeat;
|
|
1574
|
+
cursor: default;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
/* Month scroller */
|
|
1578
|
+
|
|
1579
|
+
[part='months'] {
|
|
1580
|
+
/* Month calendar height:
|
|
1581
|
+
header height + margin-bottom
|
|
1582
|
+
+ weekdays height + margin-bottom
|
|
1583
|
+
+ date cell heights
|
|
1584
|
+
+ small margin between month calendars
|
|
1585
|
+
*/
|
|
1586
|
+
/* prettier-ignore */
|
|
1587
|
+
--vaadin-infinite-scroller-item-height:
|
|
1588
|
+
calc(
|
|
1589
|
+
var(--lumo-font-size-l) + var(--lumo-space-m)
|
|
1590
|
+
+ var(--lumo-font-size-xs) + var(--lumo-space-s)
|
|
1591
|
+
+ var(--lumo-size-m) * 6
|
|
1592
|
+
+ var(--lumo-space-s)
|
|
1593
|
+
);
|
|
1594
|
+
--vaadin-infinite-scroller-buffer-offset: 10%;
|
|
1595
|
+
-webkit-mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
|
|
1596
|
+
mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
|
|
1597
|
+
position: relative;
|
|
1598
|
+
margin-right: 57px;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
/* Year scroller */
|
|
1602
|
+
[part='years'] {
|
|
1603
|
+
/* TODO get rid of fixed magic number */
|
|
1604
|
+
--vaadin-infinite-scroller-buffer-width: 97px;
|
|
1605
|
+
width: 57px;
|
|
1606
|
+
height: auto;
|
|
1607
|
+
top: 0;
|
|
1608
|
+
bottom: 0;
|
|
1609
|
+
font-size: var(--lumo-font-size-s);
|
|
1610
|
+
box-shadow: inset 2px 0 4px 0 var(--lumo-shade-5pct);
|
|
1611
|
+
-webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
|
|
1612
|
+
mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
|
|
1613
|
+
cursor: var(--lumo-clickable-cursor);
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
[part='year-number']:not([current]),
|
|
1617
|
+
[part='year-separator'] {
|
|
1618
|
+
opacity: 0.7;
|
|
1619
|
+
transition: 0.2s opacity;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
[part='years']:hover [part='year-number'],
|
|
1623
|
+
[part='years']:hover [part='year-separator'] {
|
|
1624
|
+
opacity: 1;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
/* TODO unsupported selector */
|
|
1628
|
+
#scrollers {
|
|
1629
|
+
position: static;
|
|
1630
|
+
display: block;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
/* TODO unsupported selector, should fix this in vaadin-date-picker that it adapts to the
|
|
1634
|
+
* width of the year scroller */
|
|
1635
|
+
#scrollers[desktop] [part='months'] {
|
|
1636
|
+
right: auto;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
/* Year scroller position indicator */
|
|
1640
|
+
[part='years']::before {
|
|
1641
|
+
border: none;
|
|
1642
|
+
width: 1em;
|
|
1643
|
+
height: 1em;
|
|
1644
|
+
background-color: var(--lumo-base-color);
|
|
1645
|
+
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
1646
|
+
transform: translate(-75%, -50%) rotate(45deg);
|
|
1647
|
+
border-top-right-radius: var(--lumo-border-radius-s);
|
|
1648
|
+
box-shadow: 2px -2px 6px 0 var(--lumo-shade-5pct);
|
|
1649
|
+
z-index: 1;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
[part='year-number'],
|
|
1653
|
+
[part='year-separator'] {
|
|
1654
|
+
display: flex;
|
|
1655
|
+
align-items: center;
|
|
1656
|
+
justify-content: center;
|
|
1657
|
+
height: 50%;
|
|
1658
|
+
transform: translateY(-50%);
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
[part='years'] [part='year-separator']::after {
|
|
1662
|
+
color: var(--lumo-disabled-text-color);
|
|
1663
|
+
content: '•';
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
/* Current year */
|
|
1667
|
+
|
|
1668
|
+
[part='years'] [part='year-number'][current] {
|
|
1669
|
+
color: var(--lumo-primary-text-color);
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
/* Toolbar (footer) */
|
|
1673
|
+
|
|
1674
|
+
[part='toolbar'] {
|
|
1675
|
+
padding: var(--lumo-space-s);
|
|
1676
|
+
border-bottom-left-radius: var(--lumo-border-radius-l);
|
|
1677
|
+
margin-right: 57px;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
/* Today and Cancel buttons */
|
|
1681
|
+
|
|
1682
|
+
[part='toolbar'] [part\$='button'] {
|
|
1683
|
+
margin: 0;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
/* Narrow viewport mode (fullscreen) */
|
|
1687
|
+
|
|
1688
|
+
:host([fullscreen]) [part='toolbar'] {
|
|
1689
|
+
order: -1;
|
|
1690
|
+
background-color: var(--lumo-base-color);
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
:host([fullscreen]) [part='overlay-header'] {
|
|
1694
|
+
order: -2;
|
|
1695
|
+
height: var(--lumo-size-m);
|
|
1696
|
+
padding: var(--lumo-space-s);
|
|
1697
|
+
position: absolute;
|
|
1698
|
+
left: 0;
|
|
1699
|
+
right: 0;
|
|
1700
|
+
justify-content: center;
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
:host([fullscreen]) [part='toggle-button'],
|
|
1704
|
+
:host([fullscreen]) [part='clear-button'],
|
|
1705
|
+
[part='overlay-header'] [part='label'] {
|
|
1706
|
+
display: none;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
/* Very narrow screen (year scroller initially hidden) */
|
|
1710
|
+
|
|
1711
|
+
[part='years-toggle-button'] {
|
|
1712
|
+
display: flex;
|
|
1713
|
+
align-items: center;
|
|
1714
|
+
height: var(--lumo-size-s);
|
|
1715
|
+
padding: 0 0.5em;
|
|
1716
|
+
border-radius: var(--lumo-border-radius-m);
|
|
1717
|
+
z-index: 3;
|
|
1718
|
+
color: var(--lumo-primary-text-color);
|
|
1719
|
+
font-weight: 500;
|
|
1720
|
+
-webkit-font-smoothing: antialiased;
|
|
1721
|
+
-moz-osx-font-smoothing: grayscale;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
:host([years-visible]) [part='years-toggle-button'] {
|
|
1725
|
+
background-color: var(--lumo-primary-color);
|
|
1726
|
+
color: var(--lumo-primary-contrast-color);
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
/* TODO magic number (same as used for media-query in vaadin-date-picker-overlay-content) */
|
|
1730
|
+
@media screen and (max-width: 374px) {
|
|
1731
|
+
:host {
|
|
1732
|
+
background-image: none;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
[part='years'] {
|
|
1736
|
+
background-color: var(--lumo-shade-5pct);
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
[part='toolbar'],
|
|
1740
|
+
[part='months'] {
|
|
1741
|
+
margin-right: 0;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
/* TODO make date-picker adapt to the width of the years part */
|
|
1745
|
+
[part='years'] {
|
|
1746
|
+
--vaadin-infinite-scroller-buffer-width: 90px;
|
|
1747
|
+
width: 50px;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
:host([years-visible]) [part='months'] {
|
|
1751
|
+
padding-left: 50px;
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
`,{moduleId:"lumo-date-picker-overlay-content"});bt("vaadin-month-calendar",p`
|
|
1755
|
+
:host {
|
|
1756
|
+
-moz-user-select: none;
|
|
1757
|
+
-webkit-user-select: none;
|
|
1758
|
+
-webkit-tap-highlight-color: transparent;
|
|
1759
|
+
user-select: none;
|
|
1760
|
+
font-size: var(--lumo-font-size-m);
|
|
1761
|
+
color: var(--lumo-body-text-color);
|
|
1762
|
+
text-align: center;
|
|
1763
|
+
padding: 0 var(--lumo-space-xs);
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
/* Month header */
|
|
1767
|
+
|
|
1768
|
+
[part='month-header'] {
|
|
1769
|
+
color: var(--lumo-header-text-color);
|
|
1770
|
+
font-size: var(--lumo-font-size-l);
|
|
1771
|
+
line-height: 1;
|
|
1772
|
+
font-weight: 500;
|
|
1773
|
+
margin-bottom: var(--lumo-space-m);
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
/* Week days and numbers */
|
|
1777
|
+
|
|
1778
|
+
[part='weekdays'],
|
|
1779
|
+
[part='weekday'],
|
|
1780
|
+
[part='week-number'] {
|
|
1781
|
+
font-size: var(--lumo-font-size-xxs);
|
|
1782
|
+
line-height: 1;
|
|
1783
|
+
color: var(--lumo-secondary-text-color);
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
[part='weekdays'] {
|
|
1787
|
+
margin-bottom: var(--lumo-space-s);
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
[part='weekday']:empty,
|
|
1791
|
+
[part='week-number'] {
|
|
1792
|
+
width: var(--lumo-size-xs);
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
/* Date and week number cells */
|
|
1796
|
+
|
|
1797
|
+
[part='date'],
|
|
1798
|
+
[part='week-number'] {
|
|
1799
|
+
box-sizing: border-box;
|
|
1800
|
+
display: inline-flex;
|
|
1801
|
+
align-items: center;
|
|
1802
|
+
justify-content: center;
|
|
1803
|
+
height: var(--lumo-size-m);
|
|
1804
|
+
position: relative;
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
[part='date'] {
|
|
1808
|
+
transition: color 0.1s;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
[part='date']:not(:empty) {
|
|
1812
|
+
cursor: var(--lumo-clickable-cursor);
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
:host([week-numbers]) [part='weekday']:not(:empty),
|
|
1816
|
+
:host([week-numbers]) [part='date'] {
|
|
1817
|
+
width: calc((100% - var(--lumo-size-xs)) / 7);
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
/* Today date */
|
|
1821
|
+
|
|
1822
|
+
[part='date'][today] {
|
|
1823
|
+
color: var(--lumo-primary-text-color);
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
/* Focused date */
|
|
1827
|
+
|
|
1828
|
+
[part='date']::before {
|
|
1829
|
+
content: '';
|
|
1830
|
+
position: absolute;
|
|
1831
|
+
z-index: -1;
|
|
1832
|
+
top: 50%;
|
|
1833
|
+
left: 50%;
|
|
1834
|
+
transform: translate(-50%, -50%);
|
|
1835
|
+
min-width: 2em;
|
|
1836
|
+
min-height: 2em;
|
|
1837
|
+
width: 80%;
|
|
1838
|
+
height: 80%;
|
|
1839
|
+
max-height: 100%;
|
|
1840
|
+
max-width: 100%;
|
|
1841
|
+
border-radius: var(--lumo-border-radius-m);
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
[part='date'][focused]::before {
|
|
1845
|
+
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
:host(:not([focused])) [part='date'][focused]::before {
|
|
1849
|
+
animation: vaadin-date-picker-month-calendar-focus-date 1.4s infinite;
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
@keyframes vaadin-date-picker-month-calendar-focus-date {
|
|
1853
|
+
50% {
|
|
1854
|
+
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px transparent;
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
[part='date']:not(:empty):not([disabled]):not([selected]):hover::before {
|
|
1859
|
+
background-color: var(--lumo-primary-color-10pct);
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
[part='date'][selected] {
|
|
1863
|
+
color: var(--lumo-primary-contrast-color);
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
[part='date'][selected]::before {
|
|
1867
|
+
background-color: var(--lumo-primary-color);
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
[part='date'][disabled] {
|
|
1871
|
+
color: var(--lumo-disabled-text-color);
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
@media (pointer: coarse) {
|
|
1875
|
+
[part='date']:hover:not([selected])::before,
|
|
1876
|
+
[part='date'][focused]:not([selected])::before {
|
|
1877
|
+
display: none;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
[part='date']:not(:empty):not([disabled]):active::before {
|
|
1881
|
+
display: block;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
[part='date'][selected]::before {
|
|
1885
|
+
box-shadow: none;
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
/* Disabled */
|
|
1890
|
+
|
|
1891
|
+
:host([disabled]) * {
|
|
1892
|
+
color: var(--lumo-disabled-text-color) !important;
|
|
1893
|
+
}
|
|
1894
|
+
`,{moduleId:"lumo-month-calendar"});const On=document.createElement("template");On.innerHTML=`\n <style>\n @keyframes vaadin-date-picker-month-calendar-focus-date {\n 50% {\n box-shadow: 0 0 0 2px transparent;\n }\n }\n </style>\n`;document.head.appendChild(On.content);
|
|
1895
|
+
/**
|
|
1896
|
+
* @license
|
|
1897
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1898
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1899
|
+
*/const Bn=document.createElement("template");Bn.innerHTML=`\n <style>\n @font-face {\n font-family: 'lumo-icons';\n 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==) format('woff');\n font-weight: normal;\n font-style: normal;\n }\n\n html {\n --lumo-icons-align-center: "\\ea01";\n --lumo-icons-align-left: "\\ea02";\n --lumo-icons-align-right: "\\ea03";\n --lumo-icons-angle-down: "\\ea04";\n --lumo-icons-angle-left: "\\ea05";\n --lumo-icons-angle-right: "\\ea06";\n --lumo-icons-angle-up: "\\ea07";\n --lumo-icons-arrow-down: "\\ea08";\n --lumo-icons-arrow-left: "\\ea09";\n --lumo-icons-arrow-right: "\\ea0a";\n --lumo-icons-arrow-up: "\\ea0b";\n --lumo-icons-bar-chart: "\\ea0c";\n --lumo-icons-bell: "\\ea0d";\n --lumo-icons-calendar: "\\ea0e";\n --lumo-icons-checkmark: "\\ea0f";\n --lumo-icons-chevron-down: "\\ea10";\n --lumo-icons-chevron-left: "\\ea11";\n --lumo-icons-chevron-right: "\\ea12";\n --lumo-icons-chevron-up: "\\ea13";\n --lumo-icons-clock: "\\ea14";\n --lumo-icons-cog: "\\ea15";\n --lumo-icons-cross: "\\ea16";\n --lumo-icons-download: "\\ea17";\n --lumo-icons-dropdown: "\\ea18";\n --lumo-icons-edit: "\\ea19";\n --lumo-icons-error: "\\ea1a";\n --lumo-icons-eye: "\\ea1b";\n --lumo-icons-eye-disabled: "\\ea1c";\n --lumo-icons-menu: "\\ea1d";\n --lumo-icons-minus: "\\ea1e";\n --lumo-icons-ordered-list: "\\ea1f";\n --lumo-icons-phone: "\\ea20";\n --lumo-icons-photo: "\\ea21";\n --lumo-icons-play: "\\ea22";\n --lumo-icons-plus: "\\ea23";\n --lumo-icons-redo: "\\ea24";\n --lumo-icons-reload: "\\ea25";\n --lumo-icons-search: "\\ea26";\n --lumo-icons-undo: "\\ea27";\n --lumo-icons-unordered-list: "\\ea28";\n --lumo-icons-upload: "\\ea29";\n --lumo-icons-user: "\\ea2a";\n }\n </style>\n`;document.head.appendChild(Bn.content);
|
|
1900
|
+
/**
|
|
1901
|
+
* @license
|
|
1902
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1903
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1904
|
+
*/const In=p`
|
|
1905
|
+
[part$='button'] {
|
|
1906
|
+
flex: none;
|
|
1907
|
+
width: 1em;
|
|
1908
|
+
height: 1em;
|
|
1909
|
+
line-height: 1;
|
|
1910
|
+
font-size: var(--lumo-icon-size-m);
|
|
1911
|
+
text-align: center;
|
|
1912
|
+
color: var(--lumo-contrast-60pct);
|
|
1913
|
+
transition: 0.2s color;
|
|
1914
|
+
cursor: var(--lumo-clickable-cursor);
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
[part$='button']:hover {
|
|
1918
|
+
color: var(--lumo-contrast-90pct);
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
:host([disabled]) [part$='button'],
|
|
1922
|
+
:host([readonly]) [part$='button'] {
|
|
1923
|
+
color: var(--lumo-contrast-20pct);
|
|
1924
|
+
cursor: default;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
[part$='button']::before {
|
|
1928
|
+
font-family: 'lumo-icons';
|
|
1929
|
+
display: block;
|
|
1930
|
+
}
|
|
1931
|
+
`;bt("",In,{moduleId:"lumo-field-button"});
|
|
1932
|
+
/**
|
|
1933
|
+
* @license
|
|
1934
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1935
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1936
|
+
*/const Nn=p`
|
|
1937
|
+
:host([has-helper]) [part='helper-text']::before {
|
|
1938
|
+
content: '';
|
|
1939
|
+
display: block;
|
|
1940
|
+
height: 0.4em;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
[part='helper-text'] {
|
|
1944
|
+
display: block;
|
|
1945
|
+
color: var(--lumo-secondary-text-color);
|
|
1946
|
+
font-size: var(--lumo-font-size-xs);
|
|
1947
|
+
line-height: var(--lumo-line-height-xs);
|
|
1948
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1949
|
+
transition: color 0.2s;
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
:host(:hover:not([readonly])) [part='helper-text'] {
|
|
1953
|
+
color: var(--lumo-body-text-color);
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
:host([disabled]) [part='helper-text'] {
|
|
1957
|
+
color: var(--lumo-disabled-text-color);
|
|
1958
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
|
|
1962
|
+
display: none;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
|
|
1966
|
+
content: '';
|
|
1967
|
+
display: block;
|
|
1968
|
+
height: 0.4em;
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] {
|
|
1972
|
+
order: 0;
|
|
1973
|
+
padding-bottom: 0.4em;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
|
|
1977
|
+
order: 1;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] + * {
|
|
1981
|
+
order: 2;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
:host([has-helper][theme~='helper-above-field']) [part='error-message'] {
|
|
1985
|
+
order: 3;
|
|
1986
|
+
}
|
|
1987
|
+
`
|
|
1988
|
+
/**
|
|
1989
|
+
* @license
|
|
1990
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1991
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1992
|
+
*/;const Rn=p`
|
|
1993
|
+
[part='label'] {
|
|
1994
|
+
align-self: flex-start;
|
|
1995
|
+
color: var(--lumo-secondary-text-color);
|
|
1996
|
+
font-weight: 500;
|
|
1997
|
+
font-size: var(--lumo-font-size-s);
|
|
1998
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1999
|
+
transition: color 0.2s;
|
|
2000
|
+
line-height: 1;
|
|
2001
|
+
padding-right: 1em;
|
|
2002
|
+
padding-bottom: 0.5em;
|
|
2003
|
+
/* As a workaround for diacritics being cut off, add a top padding and a
|
|
2004
|
+
negative margin to compensate */
|
|
2005
|
+
padding-top: 0.25em;
|
|
2006
|
+
margin-top: -0.25em;
|
|
2007
|
+
overflow: hidden;
|
|
2008
|
+
white-space: nowrap;
|
|
2009
|
+
text-overflow: ellipsis;
|
|
2010
|
+
position: relative;
|
|
2011
|
+
max-width: 100%;
|
|
2012
|
+
box-sizing: border-box;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
:host([has-label])::before {
|
|
2016
|
+
margin-top: calc(var(--lumo-font-size-s) * 1.5);
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
:host([has-label][theme~='small'])::before {
|
|
2020
|
+
margin-top: calc(var(--lumo-font-size-xs) * 1.5);
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
:host([has-label]) {
|
|
2024
|
+
padding-top: var(--lumo-space-m);
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
:host([has-label]) ::slotted([slot='tooltip']) {
|
|
2028
|
+
--vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
:host([required]) [part='required-indicator']::after {
|
|
2032
|
+
content: var(--lumo-required-field-indicator, '•');
|
|
2033
|
+
transition: opacity 0.2s;
|
|
2034
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
|
|
2035
|
+
position: absolute;
|
|
2036
|
+
right: 0;
|
|
2037
|
+
width: 1em;
|
|
2038
|
+
text-align: center;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
:host([invalid]) [part='required-indicator']::after {
|
|
2042
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
[part='error-message'] {
|
|
2046
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
2047
|
+
font-size: var(--lumo-font-size-xs);
|
|
2048
|
+
line-height: var(--lumo-line-height-xs);
|
|
2049
|
+
color: var(--lumo-error-text-color);
|
|
2050
|
+
will-change: max-height;
|
|
2051
|
+
transition: 0.4s max-height;
|
|
2052
|
+
max-height: 5em;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
:host([has-error-message]) [part='error-message']::before,
|
|
2056
|
+
:host([has-error-message]) [part='error-message']::after {
|
|
2057
|
+
content: '';
|
|
2058
|
+
display: block;
|
|
2059
|
+
height: 0.4em;
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2062
|
+
:host(:not([invalid])) [part='error-message'] {
|
|
2063
|
+
max-height: 0;
|
|
2064
|
+
overflow: hidden;
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
/* RTL specific styles */
|
|
2068
|
+
|
|
2069
|
+
:host([dir='rtl']) [part='label'] {
|
|
2070
|
+
margin-left: 0;
|
|
2071
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
:host([dir='rtl']) [part='label'] {
|
|
2075
|
+
padding-left: 1em;
|
|
2076
|
+
padding-right: 0;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
:host([dir='rtl']) [part='required-indicator']::after {
|
|
2080
|
+
right: auto;
|
|
2081
|
+
left: 0;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
:host([dir='rtl']) [part='error-message'] {
|
|
2085
|
+
margin-left: 0;
|
|
2086
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
2087
|
+
}
|
|
2088
|
+
`;bt("",Rn,{moduleId:"lumo-required-field"});
|
|
2089
|
+
/**
|
|
2090
|
+
* @license
|
|
2091
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
2092
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2093
|
+
*/const jn=p`
|
|
2094
|
+
:host {
|
|
2095
|
+
--lumo-text-field-size: var(--lumo-size-m);
|
|
2096
|
+
color: var(--lumo-body-text-color);
|
|
2097
|
+
font-size: var(--lumo-font-size-m);
|
|
2098
|
+
font-family: var(--lumo-font-family);
|
|
2099
|
+
-webkit-font-smoothing: antialiased;
|
|
2100
|
+
-moz-osx-font-smoothing: grayscale;
|
|
2101
|
+
-webkit-tap-highlight-color: transparent;
|
|
2102
|
+
padding: var(--lumo-space-xs) 0;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
:host::before {
|
|
2106
|
+
height: var(--lumo-text-field-size);
|
|
2107
|
+
box-sizing: border-box;
|
|
2108
|
+
display: inline-flex;
|
|
2109
|
+
align-items: center;
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
:host([focused]:not([readonly])) [part='label'] {
|
|
2113
|
+
color: var(--lumo-primary-text-color);
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
:host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {
|
|
2117
|
+
-webkit-mask-image: none;
|
|
2118
|
+
mask-image: none;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
::slotted(:is(input, textarea):placeholder-shown) {
|
|
2122
|
+
color: var(--lumo-secondary-text-color);
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
/* Hover */
|
|
2126
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
2127
|
+
color: var(--lumo-body-text-color);
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2131
|
+
opacity: 0.1;
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
/* Touch device adjustment */
|
|
2135
|
+
@media (pointer: coarse) {
|
|
2136
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
2137
|
+
color: var(--lumo-secondary-text-color);
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2141
|
+
opacity: 0;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
:host(:active:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2145
|
+
opacity: 0.2;
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
/* Trigger when not focusing using the keyboard */
|
|
2150
|
+
:host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {
|
|
2151
|
+
transform: scaleX(0);
|
|
2152
|
+
transition-duration: 0.15s, 1s;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
/* Focus-ring */
|
|
2156
|
+
:host([focus-ring]) [part='input-field'] {
|
|
2157
|
+
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
/* Read-only and disabled */
|
|
2161
|
+
:host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {
|
|
2162
|
+
opacity: 0;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
/* Disabled style */
|
|
2166
|
+
:host([disabled]) {
|
|
2167
|
+
pointer-events: none;
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
:host([disabled]) [part='label'],
|
|
2171
|
+
:host([disabled]) [part='input-field'] ::slotted(*) {
|
|
2172
|
+
color: var(--lumo-disabled-text-color);
|
|
2173
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
/* Invalid style */
|
|
2177
|
+
:host([invalid][focus-ring]) [part='input-field'] {
|
|
2178
|
+
box-shadow: 0 0 0 2px var(--lumo-error-color-50pct);
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
:host([input-prevented]) [part='input-field'] {
|
|
2182
|
+
animation: shake 0.15s infinite;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
@keyframes shake {
|
|
2186
|
+
25% {
|
|
2187
|
+
transform: translateX(4px);
|
|
2188
|
+
}
|
|
2189
|
+
75% {
|
|
2190
|
+
transform: translateX(-4px);
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
/* Small theme */
|
|
2195
|
+
:host([theme~='small']) {
|
|
2196
|
+
font-size: var(--lumo-font-size-s);
|
|
2197
|
+
--lumo-text-field-size: var(--lumo-size-s);
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
:host([theme~='small']) [part='label'] {
|
|
2201
|
+
font-size: var(--lumo-font-size-xs);
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
:host([theme~='small']) [part='error-message'] {
|
|
2205
|
+
font-size: var(--lumo-font-size-xxs);
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
/* Slotted content */
|
|
2209
|
+
[part='input-field'] ::slotted(:not(iron-icon):not(vaadin-icon):not(input):not(textarea)) {
|
|
2210
|
+
color: var(--lumo-secondary-text-color);
|
|
2211
|
+
font-weight: 400;
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
[part='clear-button']::before {
|
|
2215
|
+
content: var(--lumo-icons-cross);
|
|
2216
|
+
}
|
|
2217
|
+
`;const Ln=[Rn,In,Nn,jn];bt("",Ln,{moduleId:"lumo-input-field-shared-styles"});const Hn=p`
|
|
2218
|
+
:host {
|
|
2219
|
+
outline: none;
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
[part='toggle-button']::before {
|
|
2223
|
+
content: var(--lumo-icons-calendar);
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
[part='clear-button']::before {
|
|
2227
|
+
content: var(--lumo-icons-cross);
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
@media (max-width: 420px), (max-height: 420px) {
|
|
2231
|
+
[part='overlay-content'] {
|
|
2232
|
+
height: 70vh;
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
:host([dir='rtl']) [part='input-field'] ::slotted(input) {
|
|
2237
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
2241
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
2242
|
+
}
|
|
2243
|
+
`;bt("vaadin-date-picker",[Ln,Hn],{moduleId:"lumo-date-picker"});
|
|
2244
|
+
/**
|
|
2245
|
+
* @fileoverview
|
|
2246
|
+
* @suppress {checkPrototypalTypes}
|
|
2247
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2248
|
+
* This code may only be used under the BSD style license found at
|
|
2249
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
2250
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
2251
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
2252
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
2253
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2254
|
+
*/const Wn="disable-upgrade";const Un=t=>{while(t){const e=Object.getOwnPropertyDescriptor(t,"observedAttributes");if(e){return e.get}t=Object.getPrototypeOf(t.prototype).constructor}return()=>[]};const $n=ae((t=>{const e=As(t);let i=Un(e);class s extends e{constructor(){super()}static get observedAttributes(){return i.call(this).concat(Wn)}_initializeProperties(){if(this.hasAttribute(Wn)){this.__isUpgradeDisabled=true}else{super._initializeProperties()}}_enableProperties(){if(!this.__isUpgradeDisabled){super._enableProperties()}}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}attributeChangedCallback(t,e,i,s){if(t==Wn){if(this.__isUpgradeDisabled&&i==null){super._initializeProperties();this.__isUpgradeDisabled=false;if(Ae(this).isConnected){super.connectedCallback()}}}else{super.attributeChangedCallback(t,e,i,s)}}connectedCallback(){if(!this.__isUpgradeDisabled){super.connectedCallback()}}disconnectedCallback(){if(!this.__isUpgradeDisabled){super.disconnectedCallback()}}}return s}));
|
|
2255
|
+
/**
|
|
2256
|
+
* @license
|
|
2257
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2258
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2259
|
+
*/function Gn(t){const e=[];while(t){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){e.push(t);t=t.host;continue}if(t.assignedSlot){t=t.assignedSlot;continue}t=t.parentNode}return e}function Yn(t){if(!t){return new Set}return new Set(t.split(" "))}function qn(t){return[...t].join(" ")}function Vn(t,e,i){const s=Yn(t.getAttribute(e));s.add(i);t.setAttribute(e,qn(s))}function Jn(t,e,i){const s=Yn(t.getAttribute(e));s.delete(i);if(s.size===0){t.removeAttribute(e);return}t.setAttribute(e,qn(s))}
|
|
2260
|
+
/**
|
|
2261
|
+
* @license
|
|
2262
|
+
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
2263
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2264
|
+
*/const Kn={start:"top",end:"bottom"};const Zn={start:"left",end:"right"};const Xn=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{if(t.target.__overlay){t.target.__overlay._updatePosition()}}))}))}));const Qn=t=>class e extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:false},noVerticalOverlap:{type:Boolean,value:false},requiredVerticalSpace:{type:Number,value:0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super();this.__onScroll=this.__onScroll.bind(this);this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback();if(this.opened){this.__addUpdatePositionEventListeners()}}disconnectedCallback(){super.disconnectedCallback();this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition);this.__positionTargetAncestorRootNodes=Gn(this.positionTarget);this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,true)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition);if(this.__positionTargetAncestorRootNodes){this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,true)}));this.__positionTargetAncestorRootNodes=null}}__overlayOpenedChanged(t,e){this.__removeUpdatePositionEventListeners();if(e){e.__overlay=null;Xn.unobserve(e);if(t){this.__addUpdatePositionEventListeners();e.__overlay=this;Xn.observe(e)}}if(t){const t=getComputedStyle(this);if(!this.__margins){this.__margins={};["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))}this.setAttribute("dir",t.direction);this._updatePosition();requestAnimationFrame((()=>this._updatePosition()))}}get __isRTL(){return this.getAttribute("dir")==="rtl"}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){if(!this.contains(t.target)){this._updatePosition()}}_updatePosition(){if(!this.positionTarget||!this.opened){return}const t=this.positionTarget.getBoundingClientRect();const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__shouldAlignStartHorizontally(t,this.__isRTL);const s=!this.__isRTL&&i||this.__isRTL&&!i;this.style.alignItems=s?"flex-start":"flex-end";const r=this.getBoundingClientRect();const o=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,Kn,this,e);const n=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Zn,this,i);Object.assign(this.style,o,n);this.toggleAttribute("bottom-aligned",!e);this.toggleAttribute("top-aligned",e);this.toggleAttribute("end-aligned",!s);this.toggleAttribute("start-aligned",s)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth);const r=!e&&this.horizontalAlign==="start"||e&&this.horizontalAlign==="end";return this.__shouldAlignStart(t,i,s,this.__margins,r,this.noHorizontalOverlap,Zn)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);const s=this.verticalAlign==="top";return this.__shouldAlignStart(t,e,i,this.__margins,s,this.noVerticalOverlap,Kn)}__shouldAlignStart(t,e,i,s,r,o,n){const a=i-t[o?n.end:n.start]-s[n.end];const l=t[o?n.start:n.end]-s[n.start];const h=r?a:l;const c=r?l:a;const u=h>c||h>e;return r===u}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===Kn.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);if(i>t&&this.__oldViewportHeight){const e=this.__oldViewportHeight-t;s=i-e}this.__oldViewportHeight=t}if(e.end===Zn.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);if(i>t&&this.__oldViewportWidth){const e=this.__oldViewportWidth-t;s=i-e}this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,r,o){const n=o?s.start:s.end;const a=o?s.end:s.start;const l=parseFloat(r.style[n]||getComputedStyle(r)[n]);const h=this.__adjustBottomProperty(n,s,l);const c=e[o?s.start:s.end]-t[i===o?s.end:s.start];const u=h?`${h}px`:`${l+c*(o?-1:1)}px`;return{[n]:u,[a]:""}}}
|
|
2265
|
+
/**
|
|
2266
|
+
* @license
|
|
2267
|
+
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2268
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2269
|
+
*/;const ta=p`
|
|
2270
|
+
:host([dir='rtl']) [part='input-field'] {
|
|
2271
|
+
direction: ltr;
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2274
|
+
:host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
|
|
2275
|
+
direction: rtl;
|
|
2276
|
+
text-align: left;
|
|
2277
|
+
}
|
|
2278
|
+
`;const ea=p`
|
|
2279
|
+
[part='overlay'] {
|
|
2280
|
+
display: flex;
|
|
2281
|
+
flex: auto;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
[part~='content'] {
|
|
2285
|
+
flex: auto;
|
|
2286
|
+
}
|
|
2287
|
+
`
|
|
2288
|
+
/**
|
|
2289
|
+
* @license
|
|
2290
|
+
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2291
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2292
|
+
*/;bt("vaadin-date-picker-overlay",ea,{moduleId:"vaadin-date-picker-overlay-styles"});let ia;class sa extends($n(Qn(eo))){static get is(){return"vaadin-date-picker-overlay"}static get template(){if(!ia){ia=super.template.cloneNode(true);ia.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")}return ia}}customElements.define(sa.is,sa);
|
|
2293
|
+
/**
|
|
2294
|
+
@license
|
|
2295
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2296
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2297
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2298
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2299
|
+
Code distributed by Google as part of the polymer project is also
|
|
2300
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2301
|
+
*/class ra{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;oa.delete(this);this._callback()}))}cancel(){if(this.isActive()){this._cancelAsync();oa.delete(this)}}_cancelAsync(){if(this.isActive()){this._asyncModule.cancel(this._timer);this._timer=null}}flush(){if(this.isActive()){this.cancel();this._callback()}}isActive(){return this._timer!=null}static debounce(t,e,i){if(t instanceof ra){t._cancelAsync()}else{t=new ra}t.setConfig(e,i);return t}}let oa=new Set;const na=function(t){oa.add(t)};const aa=function(){const t=Boolean(oa.size);oa.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}}));return t};
|
|
2302
|
+
/**
|
|
2303
|
+
@license
|
|
2304
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2305
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2306
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2307
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2308
|
+
Code distributed by Google as part of the polymer project is also
|
|
2309
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2310
|
+
*/const la=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush();if(window.ShadyCSS&&window.ShadyCSS.ScopingShim){window.ShadyCSS.ScopingShim.flush()}e=aa()}while(t||e)};
|
|
2311
|
+
/**
|
|
2312
|
+
@license
|
|
2313
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2314
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2315
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2316
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2317
|
+
Code distributed by Google as part of the polymer project is also
|
|
2318
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2319
|
+
*/let ha=false;function ca(){if(Zt&&!Gt){if(!ha){ha=true;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}";document.head.appendChild(t)}return true}return false}
|
|
2320
|
+
/**
|
|
2321
|
+
@license
|
|
2322
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2323
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2324
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2325
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2326
|
+
Code distributed by Google as part of the polymer project is also
|
|
2327
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2328
|
+
*/const ua=pr(Ps);class da extends ua{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!re,readOnly:true},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super();this.__instances=[];this.__renderDebouncer=null;this.__itemsIdxToInstIdx={};this.__chunkCount=null;this.__renderStartTime=null;this.__itemsArrayChanged=false;this.__shouldMeasureChunk=false;this.__shouldContinueChunking=false;this.__chunkingId=0;this.__sortFn=null;this.__filterFn=null;this.__observePaths=null;this.__ctor=null;this.__isDetached=true;this.template=null}disconnectedCallback(){super.disconnectedCallback();this.__isDetached=true;for(let t=0;t<this.__instances.length;t++){this.__detachInstance(t)}if(this.__chunkingId){cancelAnimationFrame(this.__chunkingId)}}connectedCallback(){super.connectedCallback();if(!ca()){this.style.display="none"}if(this.__isDetached){this.__isDetached=false;let t=Ae(Ae(this).parentNode);for(let e=0;e<this.__instances.length;e++){this.__attachInstance(e,t)}if(this.__chunkingId){this.__render()}}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(this.querySelector("template")){t.disconnect();this.__render()}else{throw new Error("dom-repeat requires a <template> child")}}));t.observe(this,{childList:true});return false}let i={};i[this.as]=true;i[this.indexAs]=true;i[this.itemsIndexAs]=true;this.__ctor=Pr(e,this,{mutableData:this.mutableData,parentModel:true,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s=0,r;s<i.length&&(r=i[s]);s++){r.forwardHostProp(t,e)}},notifyInstanceProp:function(t,e,i){if(ze(this.as,e)){let s=t[this.itemsIndexAs];if(e==this.as){this.items[s]=i}let r=Me(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(r,i)}}})}return true}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if(typeof t==="string"){let e=t;let i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t);if(this.items){this.__debounceRender(this.__render)}}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t);if(this.items){this.__debounceRender(this.__render)}}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn){if(!t){this.__debounceRender(this.__render,this.delay)}else if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++){if(t.indexOf(e[i])===0){this.__debounceRender(this.__render,this.delay)}}}}}__itemsChanged(t){if(this.items&&!Array.isArray(this.items)){console.warn("dom-repeat expected array for `items`, found",this.items)}if(!this.__handleItemPath(t.path,t.value)){if(t.path==="items"){this.__itemsArrayChanged=true}this.__debounceRender(this.__render)}}__debounceRender(t,e=0){this.__renderDebouncer=ra.debounce(this.__renderDebouncer,e>0?qe.after(e):Ve,t.bind(this));na(this.__renderDebouncer)}render(){this.__debounceRender(this.__render);la()}__render(){if(!this.__ensureTemplatized()){return}let t=this.items||[];const e=this.__sortAndFilterItems(t);const i=this.__calculateLimit(e.length);this.__updateInstances(t,i,e);if(this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)){cancelAnimationFrame(this.__chunkingId);this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null;this.__continueChunking()}))}this._setRenderedItemCount(this.__instances.length);if(!re||this.notifyDomChange){this.dispatchEvent(new CustomEvent("dom-change",{bubbles:true,composed:true}))}}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++){e[i]=i}if(this.__filterFn){e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))}if(this.__sortFn){e.sort(((e,i)=>this.__sortFn(t[e],t[i])))}return e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;if(!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances){e=Math.min(t,this.initialCount);s=Math.max(e-i,0);this.__chunkCount=s||1}else{s=Math.min(Math.max(t-i,0),this.__chunkCount);e=Math.min(i+s,t)}this.__shouldMeasureChunk=s===this.__chunkCount;this.__shouldContinueChunking=e<t;this.__renderStartTime=performance.now()}this.__itemsArrayChanged=false;return e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;const e=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*e)||1}if(this.__shouldContinueChunking){this.__debounceRender(this.__render)}}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let r;for(r=0;r<e;r++){let e=this.__instances[r];let o=i[r];let n=t[o];s[o]=r;if(e){e._setPendingProperty(this.as,n);e._setPendingProperty(this.indexAs,r);e._setPendingProperty(this.itemsIndexAs,o);e._flushProperties()}else{this.__insertInstance(n,r,o)}}for(let t=this.__instances.length-1;t>=r;t--){this.__detachAndRemoveInstance(t)}}__detachInstance(t){let e=this.__instances[t];const i=Ae(e.root);for(let t=0;t<e.children.length;t++){let s=e.children[t];i.appendChild(s)}return e}__attachInstance(t,e){let i=this.__instances[t];e.insertBefore(i.root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t);this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};s[this.as]=t;s[this.indexAs]=e;s[this.itemsIndexAs]=i;return new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let r=this.__instances[e+1];let o=r?r.children[0]:this;Ae(Ae(this).parentNode).insertBefore(s.root,o);this.__instances[e]=s;return s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++){this.__instances[e]._showHideChildren(t)}}__handleItemPath(t,e){let i=t.slice(6);let s=i.indexOf(".");let r=s<0?i:i.substring(0,s);if(r==parseInt(r,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let o=this.__itemsIdxToInstIdx[r];let n=this.__instances[o];if(n){let i=this.as+(t?"."+t:"");n._setPendingPropertyOrPath(i,e,false,true);n._flushProperties()}return true}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return Fr(this.template,t)}}customElements.define(da.is,da);
|
|
2329
|
+
/**
|
|
2330
|
+
* @license
|
|
2331
|
+
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2332
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2333
|
+
*/function fa(t){let e=t.getDay();if(e===0){e=7}const i=4-e;const s=new Date(t.getTime()+i*24*3600*1e3);const r=new Date(0,0);r.setFullYear(s.getFullYear());const o=s.getTime()-r.getTime();const n=Math.round(o/(24*3600*1e3));return Math.floor(n/7+1)}function pa(t,e){return t instanceof Date&&e instanceof Date&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function ma(t,e,i){return(!e||t>=e)&&(!i||t<=i)}function ba(t,e){return e.filter((t=>t!==undefined)).reduce(((e,i)=>{if(!i){return e}if(!e){return i}const s=Math.abs(t.getTime()-i.getTime());const r=Math.abs(e.getTime()-t.getTime());return s<r?i:e}))}function ga(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function va(t,e,i=0,s=1){if(e>99){throw new Error("The provided year cannot have more than 2 digits.")}if(e<0){throw new Error("The provided year cannot be negative.")}let r=e+Math.floor(t.getFullYear()/100)*100;if(t<new Date(r-50,i,s)){r-=100}else if(t>new Date(r+50,i,s)){r+=100}return r}function ya(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/.exec(t);if(!e){return undefined}const i=new Date(0,0);i.setFullYear(parseInt(e[1],10));i.setMonth(parseInt(e[2],10)-1);i.setDate(parseInt(e[3],10));return i}
|
|
2334
|
+
/**
|
|
2335
|
+
* @license
|
|
2336
|
+
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2337
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2338
|
+
*/class wa extends(zn(Ct(Ps))){static get template(){return Ms`
|
|
2339
|
+
<style>
|
|
2340
|
+
:host {
|
|
2341
|
+
display: block;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
#monthGrid {
|
|
2345
|
+
width: 100%;
|
|
2346
|
+
border-collapse: collapse;
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
#days-container tr,
|
|
2350
|
+
#weekdays-container tr {
|
|
2351
|
+
display: flex;
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
[part='date'] {
|
|
2355
|
+
outline: none;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
[part='week-number'][hidden],
|
|
2359
|
+
[part='weekday'][hidden] {
|
|
2360
|
+
display: none;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
[part='weekday'],
|
|
2364
|
+
[part='date'] {
|
|
2365
|
+
width: calc(100% / 7);
|
|
2366
|
+
padding: 0;
|
|
2367
|
+
font-weight: normal;
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
[part='weekday']:empty,
|
|
2371
|
+
[part='week-number'] {
|
|
2372
|
+
width: 12.5%;
|
|
2373
|
+
flex-shrink: 0;
|
|
2374
|
+
padding: 0;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
:host([week-numbers]) [part='weekday']:not(:empty),
|
|
2378
|
+
:host([week-numbers]) [part='date'] {
|
|
2379
|
+
width: 12.5%;
|
|
2380
|
+
}
|
|
2381
|
+
</style>
|
|
2382
|
+
|
|
2383
|
+
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n.monthNames)]]</div>
|
|
2384
|
+
<table
|
|
2385
|
+
id="monthGrid"
|
|
2386
|
+
role="grid"
|
|
2387
|
+
aria-labelledby="month-header"
|
|
2388
|
+
on-touchend="_preventDefault"
|
|
2389
|
+
on-touchstart="_onMonthGridTouchStart"
|
|
2390
|
+
>
|
|
2391
|
+
<thead id="weekdays-container">
|
|
2392
|
+
<tr role="row" part="weekdays">
|
|
2393
|
+
<th
|
|
2394
|
+
part="weekday"
|
|
2395
|
+
aria-hidden="true"
|
|
2396
|
+
hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n.firstDayOfWeek)]]"
|
|
2397
|
+
></th>
|
|
2398
|
+
<template
|
|
2399
|
+
is="dom-repeat"
|
|
2400
|
+
items="[[_getWeekDayNames(i18n.weekdays, i18n.weekdaysShort, showWeekNumbers, i18n.firstDayOfWeek)]]"
|
|
2401
|
+
>
|
|
2402
|
+
<th role="columnheader" part="weekday" scope="col" abbr$="[[item.weekDay]]" aria-hidden="true">
|
|
2403
|
+
[[item.weekDayShort]]
|
|
2404
|
+
</th>
|
|
2405
|
+
</template>
|
|
2406
|
+
</tr>
|
|
2407
|
+
</thead>
|
|
2408
|
+
<tbody id="days-container">
|
|
2409
|
+
<template is="dom-repeat" items="[[_weeks]]" as="week">
|
|
2410
|
+
<tr role="row">
|
|
2411
|
+
<td
|
|
2412
|
+
part="week-number"
|
|
2413
|
+
aria-hidden="true"
|
|
2414
|
+
hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n.firstDayOfWeek)]]"
|
|
2415
|
+
>
|
|
2416
|
+
[[__getWeekNumber(week)]]
|
|
2417
|
+
</td>
|
|
2418
|
+
<template is="dom-repeat" items="[[week]]">
|
|
2419
|
+
<td
|
|
2420
|
+
role="gridcell"
|
|
2421
|
+
part="date"
|
|
2422
|
+
date="[[item]]"
|
|
2423
|
+
today$="[[_isToday(item)]]"
|
|
2424
|
+
focused$="[[__isDayFocused(item, focusedDate)]]"
|
|
2425
|
+
tabindex$="[[__getDayTabindex(item, focusedDate)]]"
|
|
2426
|
+
selected$="[[__isDaySelected(item, selectedDate)]]"
|
|
2427
|
+
disabled$="[[__isDayDisabled(item, minDate, maxDate)]]"
|
|
2428
|
+
aria-selected$="[[__getDayAriaSelected(item, selectedDate)]]"
|
|
2429
|
+
aria-disabled$="[[__getDayAriaDisabled(item, minDate, maxDate)]]"
|
|
2430
|
+
aria-label$="[[__getDayAriaLabel(item)]]"
|
|
2431
|
+
>[[_getDate(item)]]</td
|
|
2432
|
+
>
|
|
2433
|
+
</template>
|
|
2434
|
+
</tr>
|
|
2435
|
+
</template>
|
|
2436
|
+
</tbody>
|
|
2437
|
+
</table>
|
|
2438
|
+
`}static get is(){return"vaadin-month-calendar"}static get properties(){return{month:{type:Date,value:new Date},selectedDate:{type:Date,notify:true},focusedDate:Date,showWeekNumbers:{type:Boolean,value:false},i18n:{type:Object},ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Date,value:null},maxDate:{type:Date,value:null},_days:{type:Array,computed:"_getDays(month, i18n.firstDayOfWeek, minDate, maxDate)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:true,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n.firstDayOfWeek)","__focusedDateChanged(focusedDate, _days)"]}ready(){super.ready();gn(this.$.monthGrid,"tap",this._handleTap.bind(this))}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part=date]")].find((t=>pa(t.date,this.focusedDate)))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear());s.setMonth(t.getMonth());s.setDate(1);const r=new Date(0,0);r.setFullYear(t.getFullYear());r.setMonth(t.getMonth()+1);r.setDate(0);if(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0){return false}return!ma(s,e,i)&&!ma(r,e,i)}_getTitle(t,e){if(t===undefined||e===undefined){return}return this.i18n.formatTitle(e[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=false;setTimeout((()=>{this._notTapping=true}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(t===undefined||e===undefined){return}return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e,i,s){if(t===undefined||e===undefined||i===undefined||s===undefined){return}t=this._applyFirstDayOfWeek(t,s);e=this._applyFirstDayOfWeek(e,s);t=t.map(((t,i)=>({weekDay:t,weekDayShort:e[i]})));return t}__focusedDateChanged(t,e){if(e.some((e=>pa(e,t)))){this.removeAttribute("aria-hidden")}else{this.setAttribute("aria-hidden","true")}}_getDate(t){return t?t.getDate():""}_showWeekNumbersChanged(t,e){if(t&&e===1){this.setAttribute("week-numbers","")}else{this.removeAttribute("week-numbers")}}_showWeekSeparator(t,e){return t&&e===1}_isToday(t){return pa(new Date,t)}_getDays(t,e){if(t===undefined||e===undefined){return}const i=new Date(0,0);i.setFullYear(t.getFullYear());i.setMonth(t.getMonth());i.setDate(1);while(i.getDay()!==e){this._dateAdd(i,-1)}const s=[];const r=i.getMonth();const o=t.getMonth();while(i.getMonth()===o||i.getMonth()===r){s.push(i.getMonth()===o?new Date(i.getTime()):null);this._dateAdd(i,1)}return s}_getWeeks(t){return t.reduce(((t,e,i)=>{if(i%7===0){t.push([])}t[t.length-1].push(e);return t}),[])}_handleTap(t){if(!this.ignoreTaps&&!this._notTapping&&t.target.date&&!t.target.hasAttribute("disabled")){this.selectedDate=t.target.date;this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:true,composed:true}))}}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){const e=t.reduce(((t,e)=>!t&&e?e:t));return fa(e)}__isDayFocused(t,e){return pa(t,e)}__isDaySelected(t,e){return pa(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e)){return"true"}}__isDayDisabled(t,e,i){return!ma(t,e,i)}__getDayAriaDisabled(t,e,i){if(t===undefined||e===undefined||i===undefined){return}if(this.__isDayDisabled(t,e,i)){return"true"}}__getDayAriaLabel(t){if(!t){return""}let e=`${this._getDate(t)} ${this.i18n.monthNames[t.getMonth()]} ${t.getFullYear()}, ${this.i18n.weekdays[t.getDay()]}`;if(this._isToday(t)){e+=`, ${this.i18n.today}`}return e}__getDayTabindex(t,e){if(this.__isDayFocused(t,e)){return"0"}return"-1"}}customElements.define(wa.is,wa);
|
|
2439
|
+
/**
|
|
2440
|
+
* @license
|
|
2441
|
+
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2442
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2443
|
+
*/class xa extends Ps{static get template(){return Ms`
|
|
2444
|
+
<style>
|
|
2445
|
+
:host {
|
|
2446
|
+
display: block;
|
|
2447
|
+
overflow: hidden;
|
|
2448
|
+
height: 500px;
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
#scroller {
|
|
2452
|
+
position: relative;
|
|
2453
|
+
height: 100%;
|
|
2454
|
+
overflow: auto;
|
|
2455
|
+
outline: none;
|
|
2456
|
+
margin-right: -40px;
|
|
2457
|
+
-webkit-overflow-scrolling: touch;
|
|
2458
|
+
overflow-x: hidden;
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
#scroller.notouchscroll {
|
|
2462
|
+
-webkit-overflow-scrolling: auto;
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
#scroller::-webkit-scrollbar {
|
|
2466
|
+
display: none;
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
.buffer {
|
|
2470
|
+
position: absolute;
|
|
2471
|
+
width: var(--vaadin-infinite-scroller-buffer-width, 100%);
|
|
2472
|
+
box-sizing: border-box;
|
|
2473
|
+
padding-right: 40px;
|
|
2474
|
+
top: var(--vaadin-infinite-scroller-buffer-offset, 0);
|
|
2475
|
+
animation: fadein 0.2s;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
@keyframes fadein {
|
|
2479
|
+
from {
|
|
2480
|
+
opacity: 0;
|
|
2481
|
+
}
|
|
2482
|
+
to {
|
|
2483
|
+
opacity: 1;
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2486
|
+
</style>
|
|
2487
|
+
|
|
2488
|
+
<div id="scroller" on-scroll="_scroll">
|
|
2489
|
+
<div class="buffer"></div>
|
|
2490
|
+
<div class="buffer"></div>
|
|
2491
|
+
<div id="fullHeight"></div>
|
|
2492
|
+
</div>
|
|
2493
|
+
`}static get is(){return"vaadin-infinite-scroller"}static get properties(){return{bufferSize:{type:Number,value:20},_initialScroll:{value:5e5},_initialIndex:{value:0},_buffers:Array,_preventScrollEvent:Boolean,_mayHaveMomentum:Boolean,_initialized:Boolean,active:{type:Boolean,observer:"_activated"}}}ready(){super.ready();this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")];this.$.fullHeight.style.height=`${this._initialScroll*2}px`;const t=this.querySelector("template");this._TemplateClass=Pr(t,this,{forwardHostProp(t,e){if(t!=="index"){this._buffers.forEach((i=>{[...i.children].forEach((i=>{i._itemWrapper.instance[t]=e}))}))}}});if(Nr){this.$.scroller.tabIndex=-1}}forceUpdate(){if(this._debouncerUpdateClones){this._buffers[0].updated=this._buffers[1].updated=false;this._updateClones();this._debouncerUpdateClones.cancel()}}_activated(t){if(t&&!this._initialized){this._createPool();this._initialized=true}}_finishInit(){if(!this._initDone){this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))}));if(!this._buffers[0].translateY){this._reset()}this._initDone=true}}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1);this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`;this._buffers[e].updated=false;this._buffers.reverse()}_scroll(){if(this._scrollDisabled){return}const t=this.$.scroller.scrollTop;if(t<this._bufferHeight||t>this._initialScroll*2-this._bufferHeight){this._initialIndex=~~this.position;this._reset()}const e=this.itemHeight+this.bufferOffset;const i=t>this._buffers[1].translateY+e;const s=t<this._buffers[0].translateY+e;if(i||s){this._translateBuffer(s);this._updateClones()}if(!this._preventScrollEvent){this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:false,composed:true}));this._mayHaveMomentum=true}this._preventScrollEvent=false;this._debouncerScrollFinish=Mo.debounce(this._debouncerScrollFinish,Co.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();if(!this._isVisible(this._buffers[0],t)&&!this._isVisible(this._buffers[1],t)){this.position=this.position}}))}get bufferOffset(){return this._buffers[0].offsetTop}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=true;if(t>this._firstIndex&&t<this._firstIndex+this.bufferSize*2){this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY}else{this._initialIndex=~~t;this._reset();this._scrollDisabled=true;this.$.scroller.scrollTop+=t%1*this.itemHeight;this._scrollDisabled=false}if(this._mayHaveMomentum){this.$.scroller.classList.add("notouchscroll");this._mayHaveMomentum=false;setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10)}}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height");const e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e);this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}_reset(){this._scrollDisabled=true;this.$.scroller.scrollTop=this._initialScroll;this._buffers[0].translateY=this._initialScroll-this._bufferHeight;this._buffers[1].translateY=this._initialScroll;this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`}));this._buffers[0].updated=this._buffers[1].updated=false;this._updateClones(true);this._debouncerUpdateClones=Mo.debounce(this._debouncerUpdateClones,Co.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=false;this._updateClones()}));this._scrollDisabled=false}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach((e=>{for(let i=0;i<this.bufferSize;i++){const i=document.createElement("div");i.style.height=`${this.itemHeight}px`;i.instance={};const s=xa._contentIndex=xa._contentIndex+1||0;const r=`vaadin-infinite-scroller-item-content-${s}`;const o=document.createElement("slot");o.setAttribute("name",r);o._itemWrapper=i;e.appendChild(o);i.setAttribute("slot",r);this.appendChild(i);setTimeout((()=>{if(this._isVisible(i,t)){this._ensureStampedInstance(i)}}),1)}}));setTimeout((()=>{ur(this,this._finishInit.bind(this))}),1)}_ensureStampedInstance(t){if(t.firstElementChild){return}const e=t.instance;t.instance=new this._TemplateClass({});t.appendChild(t.instance.root);Object.keys(e).forEach((i=>{t.instance.set(i,e[i])}))}_updateClones(t){this._firstIndex=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():undefined;this._buffers.forEach(((i,s)=>{if(!i.updated){const r=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const o=i._itemWrapper;if(!t||this._isVisible(o,e)){o.instance.index=r+s}}));i.updated=true}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}customElements.define(xa.is,xa);
|
|
2494
|
+
/**
|
|
2495
|
+
* @license
|
|
2496
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2497
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2498
|
+
*/class _a{constructor(t,e){this.query=t;this.callback=e;this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener();this._mediaQuery=window.matchMedia(this.query);this._addListener();this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){if(this._mediaQuery){this._mediaQuery.addListener(this._boundQueryHandler)}}_removeListener(){if(this._mediaQuery){this._mediaQuery.removeListener(this._boundQueryHandler)}this._mediaQuery=null}_queryHandler(t){if(typeof this.callback==="function"){this.callback(t.matches)}}}
|
|
2499
|
+
/**
|
|
2500
|
+
* @license
|
|
2501
|
+
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2502
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2503
|
+
*/class ka extends(Hr(Ct(js(Ps)))){static get template(){return Ms`
|
|
2504
|
+
<style>
|
|
2505
|
+
:host {
|
|
2506
|
+
display: flex;
|
|
2507
|
+
flex-direction: column;
|
|
2508
|
+
height: 100%;
|
|
2509
|
+
width: 100%;
|
|
2510
|
+
outline: none;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
[part='overlay-header'] {
|
|
2514
|
+
display: flex;
|
|
2515
|
+
flex-shrink: 0;
|
|
2516
|
+
flex-wrap: nowrap;
|
|
2517
|
+
align-items: center;
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
:host(:not([fullscreen])) [part='overlay-header'] {
|
|
2521
|
+
display: none;
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
[part='label'] {
|
|
2525
|
+
flex-grow: 1;
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
[hidden] {
|
|
2529
|
+
display: none !important;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
[part='years-toggle-button'] {
|
|
2533
|
+
display: flex;
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
#scrollers {
|
|
2537
|
+
display: flex;
|
|
2538
|
+
height: 100%;
|
|
2539
|
+
width: 100%;
|
|
2540
|
+
position: relative;
|
|
2541
|
+
overflow: hidden;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
[part='months'],
|
|
2545
|
+
[part='years'] {
|
|
2546
|
+
height: 100%;
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
[part='months'] {
|
|
2550
|
+
--vaadin-infinite-scroller-item-height: 270px;
|
|
2551
|
+
position: absolute;
|
|
2552
|
+
top: 0;
|
|
2553
|
+
left: 0;
|
|
2554
|
+
right: 0;
|
|
2555
|
+
bottom: 0;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
#scrollers[desktop] [part='months'] {
|
|
2559
|
+
right: 50px;
|
|
2560
|
+
transform: none !important;
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
[part='years'] {
|
|
2564
|
+
--vaadin-infinite-scroller-item-height: 80px;
|
|
2565
|
+
width: 50px;
|
|
2566
|
+
position: absolute;
|
|
2567
|
+
right: 0;
|
|
2568
|
+
transform: translateX(100%);
|
|
2569
|
+
-webkit-tap-highlight-color: transparent;
|
|
2570
|
+
-webkit-user-select: none;
|
|
2571
|
+
-moz-user-select: none;
|
|
2572
|
+
user-select: none;
|
|
2573
|
+
/* Center the year scroller position. */
|
|
2574
|
+
--vaadin-infinite-scroller-buffer-offset: 50%;
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
#scrollers[desktop] [part='years'] {
|
|
2578
|
+
position: absolute;
|
|
2579
|
+
transform: none !important;
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
[part='years']::before {
|
|
2583
|
+
content: '';
|
|
2584
|
+
display: block;
|
|
2585
|
+
background: transparent;
|
|
2586
|
+
width: 0;
|
|
2587
|
+
height: 0;
|
|
2588
|
+
position: absolute;
|
|
2589
|
+
left: 0;
|
|
2590
|
+
top: 50%;
|
|
2591
|
+
transform: translateY(-50%);
|
|
2592
|
+
border-width: 6px;
|
|
2593
|
+
border-style: solid;
|
|
2594
|
+
border-color: transparent;
|
|
2595
|
+
border-left-color: #000;
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
:host(.animate) [part='months'],
|
|
2599
|
+
:host(.animate) [part='years'] {
|
|
2600
|
+
transition: all 200ms;
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2603
|
+
[part='toolbar'] {
|
|
2604
|
+
display: flex;
|
|
2605
|
+
justify-content: space-between;
|
|
2606
|
+
z-index: 2;
|
|
2607
|
+
flex-shrink: 0;
|
|
2608
|
+
}
|
|
2609
|
+
</style>
|
|
2610
|
+
|
|
2611
|
+
<div part="overlay-header" on-touchend="_preventDefault" desktop$="[[_desktopMode]]" aria-hidden="true">
|
|
2612
|
+
<div part="label">[[_formatDisplayed(selectedDate, i18n.formatDate, label)]]</div>
|
|
2613
|
+
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
2614
|
+
<div part="toggle-button"></div>
|
|
2615
|
+
|
|
2616
|
+
<div part="years-toggle-button" hidden$="[[_desktopMode]]" aria-hidden="true">
|
|
2617
|
+
[[_yearAfterXMonths(_visibleMonthIndex)]]
|
|
2618
|
+
</div>
|
|
2619
|
+
</div>
|
|
2620
|
+
|
|
2621
|
+
<div id="scrollers" desktop$="[[_desktopMode]]">
|
|
2622
|
+
<vaadin-infinite-scroller
|
|
2623
|
+
id="monthScroller"
|
|
2624
|
+
on-custom-scroll="_onMonthScroll"
|
|
2625
|
+
on-touchstart="_onMonthScrollTouchStart"
|
|
2626
|
+
buffer-size="3"
|
|
2627
|
+
active="[[initialPosition]]"
|
|
2628
|
+
part="months"
|
|
2629
|
+
>
|
|
2630
|
+
<template>
|
|
2631
|
+
<vaadin-month-calendar
|
|
2632
|
+
i18n="[[i18n]]"
|
|
2633
|
+
month="[[_dateAfterXMonths(index)]]"
|
|
2634
|
+
selected-date="{{selectedDate}}"
|
|
2635
|
+
focused-date="[[focusedDate]]"
|
|
2636
|
+
ignore-taps="[[_ignoreTaps]]"
|
|
2637
|
+
show-week-numbers="[[showWeekNumbers]]"
|
|
2638
|
+
min-date="[[minDate]]"
|
|
2639
|
+
max-date="[[maxDate]]"
|
|
2640
|
+
part="month"
|
|
2641
|
+
theme$="[[_theme]]"
|
|
2642
|
+
on-keydown="__onMonthCalendarKeyDown"
|
|
2643
|
+
>
|
|
2644
|
+
</vaadin-month-calendar>
|
|
2645
|
+
</template>
|
|
2646
|
+
</vaadin-infinite-scroller>
|
|
2647
|
+
<vaadin-infinite-scroller
|
|
2648
|
+
id="yearScroller"
|
|
2649
|
+
on-custom-scroll="_onYearScroll"
|
|
2650
|
+
on-touchstart="_onYearScrollTouchStart"
|
|
2651
|
+
buffer-size="12"
|
|
2652
|
+
active="[[initialPosition]]"
|
|
2653
|
+
part="years"
|
|
2654
|
+
aria-hidden="true"
|
|
2655
|
+
>
|
|
2656
|
+
<template>
|
|
2657
|
+
<div
|
|
2658
|
+
part="year-number"
|
|
2659
|
+
current$="[[_isCurrentYear(index)]]"
|
|
2660
|
+
selected$="[[_isSelectedYear(index, selectedDate)]]"
|
|
2661
|
+
>
|
|
2662
|
+
[[_yearAfterXYears(index)]]
|
|
2663
|
+
</div>
|
|
2664
|
+
<div part="year-separator" aria-hidden="true"></div>
|
|
2665
|
+
</template>
|
|
2666
|
+
</vaadin-infinite-scroller>
|
|
2667
|
+
</div>
|
|
2668
|
+
|
|
2669
|
+
<div on-touchend="_preventDefault" role="toolbar" part="toolbar">
|
|
2670
|
+
<vaadin-button
|
|
2671
|
+
id="todayButton"
|
|
2672
|
+
part="today-button"
|
|
2673
|
+
theme="tertiary"
|
|
2674
|
+
disabled="[[!_isTodayAllowed(minDate, maxDate)]]"
|
|
2675
|
+
on-keydown="__onTodayButtonKeyDown"
|
|
2676
|
+
>
|
|
2677
|
+
[[i18n.today]]
|
|
2678
|
+
</vaadin-button>
|
|
2679
|
+
<vaadin-button id="cancelButton" part="cancel-button" theme="tertiary" on-keydown="__onCancelButtonKeyDown">
|
|
2680
|
+
[[i18n.cancel]]
|
|
2681
|
+
</vaadin-button>
|
|
2682
|
+
</div>
|
|
2683
|
+
`}static get is(){return"vaadin-date-picker-overlay-content"}static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Date,value:null},focusedDate:{type:Date,notify:true,observer:"_focusedDateChanged"},_focusedMonthDate:Number,initialPosition:{type:Date,observer:"_initialPositionChanged"},_originDate:{value:new Date},_visibleMonthIndex:Number,_desktopMode:Boolean,_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:Date,maxDate:Date,label:String}}get __isRTL(){return this.getAttribute("dir")==="rtl"}get __useSubMonthScrolling(){return this.$.monthScroller.clientHeight<this.$.monthScroller.itemHeight+this.$.monthScroller.bufferOffset}get calendars(){return[...this.shadowRoot.querySelectorAll("vaadin-month-calendar")]}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}ready(){super.ready();this.setAttribute("role","dialog");gn(this.$.scrollers,"track",this._track.bind(this));gn(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this));gn(this.shadowRoot.querySelector('[part="today-button"]'),"tap",this._onTodayTap.bind(this));gn(this.shadowRoot.querySelector('[part="cancel-button"]'),"tap",this._cancel.bind(this));gn(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this));gn(this.shadowRoot.querySelector('[part="years"]'),"tap",this._onYearTap.bind(this));gn(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this));this.addController(new _a(this._desktopMediaQuery,(t=>{this._desktopMode=t})))}connectedCallback(){super.connectedCallback();this._closeYearScroller();this._toggleAnimateClass(true);xn(this.$.scrollers,"pan-y")}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()}_selectDate(t){this.selectedDate=t;this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:true,composed:true}))}_focusedDateChanged(t){this.revealDate(t)}_isCurrentYear(t){return t===0}_isSelectedYear(t,e){if(e){return e.getFullYear()===this._originDate.getFullYear()+t}}revealDate(t,e=true){if(!t){return}const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);this._scrollToPosition(i+s,e);return}const s=this.$.monthScroller.position>i;const r=Math.max(this.$.monthScroller.itemHeight,this.$.monthScroller.clientHeight-this.$.monthScroller.bufferOffset*2);const o=r/this.$.monthScroller.itemHeight;const n=this.$.monthScroller.position+o-1<i;if(s){this._scrollToPosition(i,e)}else if(n){this._scrollToPosition(i-o+1,e)}}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear());e.setMonth(t.getMonth());e.setDate(1);let i=0;while(e.getDate()<t.getDate()){e.setDate(e.getDate()+1);if(e.getDay()===this.i18n.firstDayOfWeek){i+=1}}return i/6}_initialPositionChanged(t){this.scrollToDate(t)}_repositionYearScroller(){this._visibleMonthIndex=Math.floor(this.$.monthScroller.position);this.$.yearScroller.position=(this.$.monthScroller.position+this._originDate.getMonth())/12}_repositionMonthScroller(){this.$.monthScroller.position=this.$.yearScroller.position*12-this._originDate.getMonth();this._visibleMonthIndex=Math.floor(this.$.monthScroller.position)}_onMonthScroll(){this._repositionYearScroller();this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller();this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=false;setTimeout((()=>{this._notTapping=true}),300);this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=true;this._debouncer=Mo.debounce(this._debouncer,Co.after(300),(()=>{this._ignoreTaps=false}))}_formatDisplayed(t,e,i){if(t){return e(ga(t))}return i}_onTodayTap(){const t=new Date;if(Math.abs(this.$.monthScroller.position-this._differenceInMonths(t,this._originDate))<.001){this._selectDate(t);this._close()}else{this._scrollToCurrentMonth()}}_scrollToCurrentMonth(){if(this.focusedDate){this.focusedDate=new Date}this.scrollToDate(new Date,true)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this.$.yearScroller.getBoundingClientRect().top+this.$.yearScroller.clientHeight/2);const i=e/this.$.yearScroller.itemHeight;this._scrollToPosition(this.$.monthScroller.position+i*12,true)}}_scrollToPosition(t,e){if(this._targetPosition!==undefined){this._targetPosition=t;return}if(!e){this.$.monthScroller.position=t;this._targetPosition=undefined;this._repositionYearScroller();this.__tryFocusDate();return}this._targetPosition=t;let i;this._revealPromise=new Promise((t=>{i=t}));const s=(t,e,i,s)=>{t/=s/2;if(t<1){return i/2*t*t+e}t-=1;return-i/2*(t*(t-2)-1)+e};let r=0;const o=this.$.monthScroller.position;const n=t=>{r=r||t;const e=t-r;if(e<this.scrollDuration){const t=s(e,o,this._targetPosition-o,this.scrollDuration);this.$.monthScroller.position=t;window.requestAnimationFrame(n)}else{this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:true,composed:true,detail:{position:this._targetPosition,oldPosition:o}}));this.$.monthScroller.position=this._targetPosition;this._targetPosition=undefined;i();this._revealPromise=undefined}setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(n)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){if(Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10){return}if(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3){this._toggleAnimateClass(true)}const e=this._translateX+t.detail.ddx;this._translateX=this._limit(e,{min:0,max:this._yearScrollerWidth})}_track(t){if(this._desktopMode){return}switch(t.detail.state){case"start":this._toggleAnimateClass(false);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(true);if(this._translateX>=this._yearScrollerWidth/2){this._closeYearScroller()}else{this._openYearScroller()}break}}_toggleAnimateClass(t){if(t){this.classList.add("animate")}else{this.classList.remove("animate")}}_toggleYearScroller(){if(this._isYearScrollerVisible()){this._closeYearScroller()}else{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){if(!this._desktopMode){this.$.monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`;this.$.yearScroller.style.transform=`translateX(${t}px)`}}_yearAfterXYears(t){const e=new Date(this._originDate);e.setFullYear(parseInt(t)+this._originDate.getFullYear());return e.getFullYear()}_yearAfterXMonths(t){return this._dateAfterXMonths(t).getFullYear()}_dateAfterXMonths(t){const e=new Date(this._originDate);e.setDate(1);e.setMonth(parseInt(t)+this._originDate.getMonth());return e}_differenceInMonths(t,e){const i=(t.getFullYear()-e.getFullYear())*12;return i-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:true,composed:true}))}_cancel(){this.focusedDate=this.selectedDate;this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){if(pa(t,this.selectedDate)){this._clear();this.focusedDate=t}else{this._selectDate(t)}}__onMonthCalendarKeyDown(t){let e=false;switch(t.key){case"ArrowDown":this._moveFocusByDays(7);e=true;break;case"ArrowUp":this._moveFocusByDays(-7);e=true;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1);e=true;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1);e=true;break;case"Enter":this._selectDate(this.focusedDate);this._close();e=true;break;case" ":this.__toggleDate(this.focusedDate);e=true;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate");e=true;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate");e=true;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1);e=true;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1);e=true;break;case"Tab":this._onTabKeyDown(t,"calendar");break}if(e){t.preventDefault();t.stopPropagation()}}_onTabKeyDown(t,e){t.stopPropagation();switch(e){case"calendar":if(t.shiftKey){t.preventDefault();if(this.hasAttribute("fullscreen")){this.$.cancelButton.focus()}else{this.__focusInput()}}break;case"today":if(t.shiftKey){t.preventDefault();this.focusDateElement()}break;case"cancel":if(!t.shiftKey){t.preventDefault();if(this.hasAttribute("fullscreen")){this.focusDateElement()}else{this.__focusInput()}}break}}__onTodayButtonKeyDown(t){if(t.key==="Tab"){this._onTabKeyDown(t,"today")}}__onCancelButtonKeyDown(t){if(t.key==="Tab"){this._onTabKeyDown(t,"cancel")}}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:true,composed:true}))}__tryFocusDate(){const t=this.__pendingDateFocus;if(t){const t=this.focusableDateElement;if(t&&pa(t.date,this.__pendingDateFocus)){delete this.__pendingDateFocus;t.focus()}}}async focusDate(t,e){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i;if(!e){this._focusedMonthDate=i.getDate()}await this.focusDateElement(false)}async focusDateElement(t=true){this.__pendingDateFocus=this.focusedDate;if(!this.calendars.length){await new Promise((t=>{setTimeout(t)}))}if(t){this.revealDate(this.focusedDate)}if(this._revealPromise){await this._revealPromise}this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(ba(t,[this.minDate,this.maxDate]))}_moveFocusByDays(t){const e=this.focusedDate;const i=new Date(0,0);i.setFullYear(e.getFullYear());i.setMonth(e.getMonth());i.setDate(e.getDate()+t);if(this._dateAllowed(i,this.minDate,this.maxDate)){this.focusDate(i)}else if(this._dateAllowed(e,this.minDate,this.maxDate)){if(t>0){this.focusDate(this.maxDate)}else{this.focusDate(this.minDate)}}else{this._focusClosestDate(e)}}_moveFocusByMonths(t){const e=this.focusedDate;const i=new Date(0,0);i.setFullYear(e.getFullYear());i.setMonth(e.getMonth()+t);const s=i.getMonth();i.setDate(this._focusedMonthDate||(this._focusedMonthDate=e.getDate()));if(i.getMonth()!==s){i.setDate(0)}if(this._dateAllowed(i,this.minDate,this.maxDate)){this.focusDate(i,true)}else if(this._dateAllowed(e,this.minDate,this.maxDate)){if(t>0){this.focusDate(this.maxDate)}else{this.focusDate(this.minDate)}}else{this._focusClosestDate(e)}}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear());if(e==="minDate"){i.setMonth(t.getMonth());i.setDate(1)}else{i.setMonth(t.getMonth()+1);i.setDate(0)}if(this._dateAllowed(i,this.minDate,this.maxDate)){this.focusDate(i)}else if(this._dateAllowed(t,this.minDate,this.maxDate)){this.focusDate(this[e])}else{this._focusClosestDate(t)}}_dateAllowed(t,e,i){return(!e||t>=e)&&(!i||t<=i)}_isTodayAllowed(t,e){const i=new Date;const s=new Date(0,0);s.setFullYear(i.getFullYear());s.setMonth(i.getMonth());s.setDate(i.getDate());return this._dateAllowed(s,t,e)}}customElements.define(ka.is,ka);
|
|
2684
|
+
/**
|
|
2685
|
+
* @license
|
|
2686
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2687
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2688
|
+
*/const Aa=ae((t=>class e extends(zn(Pn(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:true,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super();this._boundOnBlur=this._onBlur.bind(this);this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready();if(this.autofocus&&!this.disabled){requestAnimationFrame((()=>{this.focus();this.setAttribute("focus-ring","")}))}}focus(){if(!this.focusElement||this.disabled){return}this.focusElement.focus();this._setFocused(true)}blur(){if(!this.focusElement){return}this.focusElement.blur();this._setFocused(false)}click(){if(this.focusElement&&!this.disabled){this.focusElement.click()}}_focusElementChanged(t,e){if(t){t.disabled=this.disabled;this._addFocusListeners(t);this.__forwardTabIndex(this.tabindex)}else if(e){this._removeFocusListeners(e)}}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur);t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur);t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation();this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation();this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e);if(this.focusElement){this.focusElement.disabled=t}if(t){this.blur()}}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){if(t!==undefined&&this.focusElement){this.focusElement.tabIndex=t;if(t!==-1){this.tabindex=undefined}}if(this.disabled&&t){if(t!==-1){this._lastTabIndex=t}this.tabindex=undefined}}}));
|
|
2689
|
+
/**
|
|
2690
|
+
* @license
|
|
2691
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2692
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2693
|
+
*/class Da extends No{constructor(t){super(t,"error-message",(()=>document.createElement("div")),((t,e)=>{this.__updateErrorId(e);this.__updateHasError()}),true)}get errorId(){return this.node&&this.node.id}setErrorMessage(t){this.errorMessage=t;this.__updateHasError()}setInvalid(t){this.invalid=t;this.__updateHasError()}initCustomNode(t){this.__updateErrorId(t);if(t.textContent&&!this.errorMessage){this.errorMessage=t.textContent.trim()}this.__updateHasError()}teardownNode(t){let e=this.getSlotChild();if(!e&&t!==this.defaultNode){e=this.attachDefaultNode();this.initNode(e)}this.__updateHasError()}__isNotEmpty(t){return Boolean(t&&t.trim()!=="")}__updateHasError(){const t=this.node;const e=Boolean(this.invalid&&this.__isNotEmpty(this.errorMessage));if(t){t.textContent=e?this.errorMessage:"";t.hidden=!e;if(e){t.setAttribute("role","alert")}else{t.removeAttribute("role")}}this.host.toggleAttribute("has-error-message",e)}__updateErrorId(t){if(!t.id){t.id=this.defaultId}}}
|
|
2694
|
+
/**
|
|
2695
|
+
* @license
|
|
2696
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2697
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2698
|
+
*/class Ca{constructor(t){this.host=t;this.__required=false}setTarget(t){this.__target=t;this.__setAriaRequiredAttribute(this.__required);this.__setLabelIdToAriaAttribute(this.__labelId);this.__setErrorIdToAriaAttribute(this.__errorId);this.__setHelperIdToAriaAttribute(this.__helperId)}setRequired(t){this.__setAriaRequiredAttribute(t);this.__required=t}setLabelId(t){this.__setLabelIdToAriaAttribute(t,this.__labelId);this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId);this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId);this.__helperId=t}get __isGroupField(){return this.__target===this.host}__setLabelIdToAriaAttribute(t,e){this.__setAriaAttributeId("aria-labelledby",t,e)}__setErrorIdToAriaAttribute(t,e){if(this.__isGroupField){this.__setAriaAttributeId("aria-labelledby",t,e)}else{this.__setAriaAttributeId("aria-describedby",t,e)}}__setHelperIdToAriaAttribute(t,e){if(this.__isGroupField){this.__setAriaAttributeId("aria-labelledby",t,e)}else{this.__setAriaAttributeId("aria-describedby",t,e)}}__setAriaRequiredAttribute(t){if(!this.__target){return}if(["input","textarea"].includes(this.__target.localName)){return}if(t){this.__target.setAttribute("aria-required","true")}else{this.__target.removeAttribute("aria-required")}}__setAriaAttributeId(t,e,i){if(!this.__target){return}if(i){Jn(this.__target,t,i)}if(e){Vn(this.__target,t,e)}}}
|
|
2699
|
+
/**
|
|
2700
|
+
* @license
|
|
2701
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2702
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2703
|
+
*/class Ta extends No{constructor(t){super(t,"helper",null,null,true)}get helperId(){return this.node&&this.node.id}initCustomNode(t){this.__updateHelperId(t);this.__observeHelper(t);const e=this.__hasHelper(t);this.__toggleHasHelper(e)}teardownNode(t){if(this.__helperIdObserver){this.__helperIdObserver.disconnect()}const e=this.getSlotChild();if(e&&e!==this.defaultNode){const t=this.__hasHelper(e);this.__toggleHasHelper(t)}else{this.__applyDefaultHelper(this.helperText,e)}}setHelperText(t){this.helperText=t;const e=this.getSlotChild();if(!e||e===this.defaultNode){this.__applyDefaultHelper(t,e)}}__hasHelper(t){if(!t){return false}return t.children.length>0||t.nodeType===Node.ELEMENT_NODE&&customElements.get(t.localName)||this.__isNotEmpty(t.textContent)}__isNotEmpty(t){return t&&t.trim()!==""}__applyDefaultHelper(t,e){const i=this.__isNotEmpty(t);if(i&&!e){this.slotFactory=()=>document.createElement("div");e=this.attachDefaultNode();this.__updateHelperId(e);this.__observeHelper(e)}if(e){e.textContent=t}this.__toggleHasHelper(i)}__observeHelper(t){this.__helperObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target;const i=e===this.node;if(t.type==="attributes"){if(i&&e.id!==this.defaultId){this.__updateHelperId(e)}}else if(i||e.parentElement===this.node){const t=this.__hasHelper(this.node);this.__toggleHasHelper(t)}}))}));this.__helperObserver.observe(t,{attributes:true,attributeFilter:["id"],childList:true,subtree:true,characterData:true})}__toggleHasHelper(t){this.host.toggleAttribute("has-helper",t);this.dispatchEvent(new CustomEvent("helper-changed",{detail:{hasHelper:t,node:this.node}}))}__updateHelperId(t){if(!t.id){t.id=this.defaultId}}}
|
|
2704
|
+
/**
|
|
2705
|
+
* @license
|
|
2706
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2707
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2708
|
+
*/class Sa extends No{constructor(t){super(t,"label",(()=>document.createElement("label")),((t,e)=>{this.__updateLabelId(e);this.__updateDefaultLabel(this.label);this.__observeLabel(e)}),true)}get labelId(){return this.node.id}initCustomNode(t){this.__updateLabelId(t);const e=this.__hasLabel(t);this.__toggleHasLabel(e)}teardownNode(t){if(this.__labelObserver){this.__labelObserver.disconnect()}let e=this.getSlotChild();if(!e&&t!==this.defaultNode){e=this.attachDefaultNode();this.initNode(e)}const i=this.__hasLabel(e);this.__toggleHasLabel(i)}setLabel(t){this.label=t;this.__updateDefaultLabel(t)}__hasLabel(t){if(!t){return false}return t.children.length>0||this.__isNotEmpty(t.textContent)}__isNotEmpty(t){return Boolean(t&&t.trim()!=="")}__observeLabel(t){this.__labelObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target;const i=e===this.node;if(t.type==="attributes"){if(i&&e.id!==this.defaultId){this.__updateLabelId(e)}}else if(i||e.parentElement===this.node){const t=this.__hasLabel(this.node);this.__toggleHasLabel(t)}}))}));this.__labelObserver.observe(t,{attributes:true,attributeFilter:["id"],childList:true,subtree:true,characterData:true})}__toggleHasLabel(t){this.host.toggleAttribute("has-label",t);this.dispatchEvent(new CustomEvent("label-changed",{detail:{hasLabel:t,node:this.node}}))}__updateDefaultLabel(t){if(this.defaultNode){this.defaultNode.textContent=t;if(this.defaultNode===this.node){const e=this.__isNotEmpty(t);this.__toggleHasLabel(e)}}}__updateLabelId(t){if(!t.id){t.id=this.defaultId}}}
|
|
2709
|
+
/**
|
|
2710
|
+
* @license
|
|
2711
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2712
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2713
|
+
*/const Ma=ae((t=>class e extends(Hr(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}get _labelId(){return this._labelController.labelId}get _labelNode(){return this._labelController.node}constructor(){super();this._labelController=new Sa(this)}ready(){super.ready();this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}}));
|
|
2714
|
+
/**
|
|
2715
|
+
* @license
|
|
2716
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2717
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2718
|
+
*/const za=ae((t=>class e extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:true,notify:true,value:false},required:{type:Boolean,reflectToAttribute:true}}}validate(){const t=this.checkValidity();this._setInvalid(!t);this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}}));return t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){if(this._shouldSetInvalid(t)){this.invalid=t}}_shouldSetInvalid(t){return true}}));
|
|
2719
|
+
/**
|
|
2720
|
+
* @license
|
|
2721
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2722
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2723
|
+
*/const Pa=t=>class e extends(za(Ma(Hr(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}get _errorId(){return this._errorController.errorId}get _errorNode(){return this._errorController.node}get _helperId(){return this._helperController.helperId}get _helperNode(){return this._helperController.node}constructor(){super();this._fieldAriaController=new Ca(this);this._helperController=new Ta(this);this._errorController=new Da(this);this._labelController.addEventListener("label-changed",(t=>{const{hasLabel:e,node:i}=t.detail;this.__labelChanged(e,i)}));this._helperController.addEventListener("helper-changed",(t=>{const{hasHelper:e,node:i}=t.detail;this.__helperChanged(e,i)}))}ready(){super.ready();this.addController(this._fieldAriaController);this.addController(this._helperController);this.addController(this._errorController)}__helperChanged(t,e){if(t){this._fieldAriaController.setHelperId(e.id)}else{this._fieldAriaController.setHelperId(null)}}__labelChanged(t,e){if(t){this._fieldAriaController.setLabelId(e.id)}else{this._fieldAriaController.setLabelId(null)}}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){if(t){this._fieldAriaController.setTarget(t)}}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t);setTimeout((()=>{if(t){this._fieldAriaController.setErrorId(this._errorController.errorId)}else{this._fieldAriaController.setErrorId(null)}}))}}
|
|
2724
|
+
/**
|
|
2725
|
+
* @license
|
|
2726
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2727
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2728
|
+
*/;const Ea=ae((t=>class e extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready();this._createDelegateAttrsObserver();this._createDelegatePropsObserver()}_stateTargetChanged(t){if(t){this._ensureAttrsDelegated();this._ensurePropsDelegated()}}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){if(!this.stateTarget){return}if(t==="invalid"){this._delegateAttribute("aria-invalid",e?"true":false)}if(typeof e==="boolean"){this.stateTarget.toggleAttribute(t,e)}else if(e){this.stateTarget.setAttribute(t,e)}else{this.stateTarget.removeAttribute(t)}}_delegateProperty(t,e){if(!this.stateTarget){return}this.stateTarget[t]=e}}));
|
|
2729
|
+
/**
|
|
2730
|
+
* @license
|
|
2731
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2732
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2733
|
+
*/const Fa=ae((t=>class e extends t{static get properties(){return{inputElement:{type:Object,readOnly:true,observer:"_inputElementChanged"},type:{type:String,readOnly:true},value:{type:String,value:"",observer:"_valueChanged",notify:true},_hasInputValue:{type:Boolean,value:false,observer:"_hasInputValueChanged"}}}constructor(){super();this._boundOnInput=this.__onInput.bind(this);this._boundOnChange=this._onChange.bind(this)}clear(){this.value=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput);t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput);t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){if(!this.inputElement){return}if(t!=null){this.inputElement.value=t}else{this.inputElement.value=""}}_inputElementChanged(t,e){if(t){this._addInputListeners(t)}else if(e){this._removeInputListeners(e)}}_hasInputValueChanged(t,e){if(t||e){this.dispatchEvent(new CustomEvent("has-input-value-changed"))}}__onInput(t){this._setHasInputValue(t);this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted;this.value=e.value;this.__userInput=false}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue);if(t===""&&e===undefined){return}if(this.__userInput){return}this._forwardInputValue(t)}get _hasValue(){return this.value!=null&&this.value!==""}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}}));
|
|
2734
|
+
/**
|
|
2735
|
+
* @license
|
|
2736
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2737
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2738
|
+
*/const Oa=ae((t=>class e extends(Ea(za(Fa(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready();this._createConstraintsObserver()}checkValidity(){if(this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))){return this.inputElement.checkValidity()}return!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);const s=this.__previousHasConstraints&&!i;if((this._hasValue||this.invalid)&&i){this.validate()}else if(s){this._setInvalid(false)}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 Boolean(t)||t===0}}));
|
|
2739
|
+
/**
|
|
2740
|
+
* @license
|
|
2741
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2742
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2743
|
+
*/const Ba=new WeakMap;function Ia(t){if(!Ba.has(t)){Ba.set(t,new Set)}return Ba.get(t)}function Na(t,e){const i=document.createElement("style");i.textContent=t;if(e===document){document.head.appendChild(i)}else{e.insertBefore(i,e.firstChild)}}const Ra=ae((t=>class e extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback();this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode();const e=Ia(t);this.slotStyles.forEach((i=>{if(!e.has(i)){Na(i,t);e.add(i)}}))}}));
|
|
2744
|
+
/**
|
|
2745
|
+
* @license
|
|
2746
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2747
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2748
|
+
*/const ja=t=>class e extends(Ra(Aa(Oa(Pa(Sn(t)))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:false},clearButtonVisible:{type:Boolean,reflectToAttribute:true,value:false},name:{type:String,reflectToAttribute:true},placeholder:{type:String,reflectToAttribute:true},readonly:{type:Boolean,value:false,reflectToAttribute:true},title:{type:String,reflectToAttribute:true}}}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 clearElement(){console.warn(`Please implement the 'clearElement' property in <${this.localName}>`);return null}get slotStyles(){return[`\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n `]}ready(){super.ready();if(this.clearElement){this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t)))}}_onClearButtonClick(t){t.preventDefault();this.inputElement.focus();this.__clear()}_onFocus(t){super._onFocus(t);if(this.autoselect&&this.inputElement){this.inputElement.select()}}_onEscape(t){super._onEscape(t);if(this.clearButtonVisible&&!!this.value){t.stopPropagation();this.__clear()}}_onChange(t){t.stopPropagation();this.validate();this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__clear(){this.clear();this.inputElement.dispatchEvent(new Event("input",{bubbles:true,composed:true}));this.inputElement.dispatchEvent(new Event("change",{bubbles:true}))}_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);if(this.allowedCharPattern&&!this.__shouldAcceptKey(t)){t.preventDefault();this._markInputPrevented()}}_markInputPrevented(){this.setAttribute("input-prevented","");this._preventInputDebouncer=Mo.debounce(this._preventInputDebouncer,Co.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||t.key.length!==1||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");if(!this.__allowedTextRegExp.test(e)){t.preventDefault();this._markInputPrevented()}}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");if(!this.__allowedTextRegExp.test(e)){t.preventDefault();this._markInputPrevented()}}}_onBeforeInput(t){if(this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)){t.preventDefault();this._markInputPrevented()}}_allowedCharPatternChanged(t){if(t){try{this.__allowedCharRegExp=new RegExp(`^${t}$`);this.__allowedTextRegExp=new RegExp(`^${t}*$`)}catch(t){console.error(t)}}}}
|
|
2749
|
+
/**
|
|
2750
|
+
* @license
|
|
2751
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2752
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2753
|
+
*/;class La extends No{constructor(t,e){super(t,"input",(()=>document.createElement("input")),((t,i)=>{if(t.value){i.setAttribute("value",t.value)}if(t.type){i.setAttribute("type",t.type)}i.id=this.defaultId;if(typeof e==="function"){e(i)}}),true)}}
|
|
2754
|
+
/**
|
|
2755
|
+
* @license
|
|
2756
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2757
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2758
|
+
*/class Ha{constructor(t,e){this.input=t;this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this);e.addEventListener("label-changed",(t=>{this.__initLabel(t.detail.node)}));this.__initLabel(e.node)}__initLabel(t){if(t){t.addEventListener("click",this.__preventDuplicateLabelClick);if(this.input){t.setAttribute("for",this.input.id)}}}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation();this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}}
|
|
2759
|
+
/**
|
|
2760
|
+
* @license
|
|
2761
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd..
|
|
2762
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2763
|
+
*/const Wa=p`
|
|
2764
|
+
[part='clear-button'] {
|
|
2765
|
+
display: none;
|
|
2766
|
+
cursor: default;
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
[part='clear-button']::before {
|
|
2770
|
+
content: '✕';
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
:host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part='clear-button'] {
|
|
2774
|
+
display: block;
|
|
2775
|
+
}
|
|
2776
|
+
`
|
|
2777
|
+
/**
|
|
2778
|
+
* @license
|
|
2779
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd..
|
|
2780
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2781
|
+
*/;const Ua=p`
|
|
2782
|
+
:host {
|
|
2783
|
+
display: inline-flex;
|
|
2784
|
+
outline: none;
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2787
|
+
:host::before {
|
|
2788
|
+
content: '\\2003';
|
|
2789
|
+
width: 0;
|
|
2790
|
+
display: inline-block;
|
|
2791
|
+
/* Size and position this element on the same vertical position as the input-field element
|
|
2792
|
+
to make vertical align for the host element work as expected */
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
:host([hidden]) {
|
|
2796
|
+
display: none !important;
|
|
2797
|
+
}
|
|
2798
|
+
|
|
2799
|
+
:host(:not([has-label])) [part='label'] {
|
|
2800
|
+
display: none;
|
|
2801
|
+
}
|
|
2802
|
+
`
|
|
2803
|
+
/**
|
|
2804
|
+
* @license
|
|
2805
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd..
|
|
2806
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2807
|
+
*/;const $a=p`
|
|
2808
|
+
[class$='container'] {
|
|
2809
|
+
display: flex;
|
|
2810
|
+
flex-direction: column;
|
|
2811
|
+
min-width: 100%;
|
|
2812
|
+
max-width: 100%;
|
|
2813
|
+
width: var(--vaadin-field-default-width, 12em);
|
|
2814
|
+
}
|
|
2815
|
+
`
|
|
2816
|
+
/**
|
|
2817
|
+
* @license
|
|
2818
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd..
|
|
2819
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2820
|
+
*/;const Ga=[Ua,$a,Wa];
|
|
2821
|
+
/**
|
|
2822
|
+
* @license
|
|
2823
|
+
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2824
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2825
|
+
*/class Ya{constructor(t){this.host=t;t.addEventListener("opened-changed",(()=>{if(!t.opened){this.__setVirtualKeyboardEnabled(false)}}));t.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(true)));t.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(true)))}__setVirtualKeyboardEnabled(t){if(this.host.inputElement){this.host.inputElement.inputMode=t?"":"none"}}}
|
|
2826
|
+
/**
|
|
2827
|
+
* @license
|
|
2828
|
+
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2829
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2830
|
+
*/const qa=t=>class e extends(Hr(Aa(Oa(Sn(t))))){static get properties(){return{_selectedDate:{type:Date},_focusedDate:Date,value:{type:String,notify:true,value:""},initialPosition:String,opened:{type:Boolean,reflectToAttribute:true,notify:true,observer:"_openedChanged"},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean},_fullscreen:{type:Boolean,value:false},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},i18n:{type:Object,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,week:"Week",calendar:"Calendar",today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/");const i=new Date;let s,r=i.getMonth(),o=i.getFullYear();if(e.length===3){r=parseInt(e[0])-1;s=parseInt(e[1]);o=parseInt(e[2]);if(e[2].length<3&&o>=0){const t=this.referenceDate?ya(this.referenceDate):new Date;o=va(t,o,r,s)}}else if(e.length===2){r=parseInt(e[0])-1;s=parseInt(e[1])}else if(e.length===1){s=parseInt(e[0])}if(s!==undefined){return{day:s,month:r,year:o}}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String},max:{type:String},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)"},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)"},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:Lr},_focusOverlayOnOpen:Boolean,_overlayInitialized:Boolean}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n.formatDate)","_focusedDateChanged(_focusedDate, i18n.formatDate)"]}static get constraints(){return[...super.constraints,"min","max"]}get clearElement(){return null}get _inputValue(){return this.inputElement?this.inputElement.value:undefined}set _inputValue(t){if(this.inputElement){this.inputElement.value=t}}get _nativeInput(){if(this.inputElement){return this.inputElement.focusElement||this.inputElement}return null}constructor(){super();this._boundOnClick=this._onClick.bind(this);this._boundOnScroll=this._onScroll.bind(this)}_onFocus(t){super._onFocus(t);if(this._noInput){t.target.blur()}}_onBlur(t){super._onBlur(t);if(!this.opened){if(this.autoOpenDisabled){this._selectParsedOrFocusedDate()}this.validate();if(this._inputValue===""&&this.value!==""){this.value=""}}}ready(){super.ready();this.addEventListener("click",this._boundOnClick);this.addController(new _a(this._fullscreenMediaQuery,(t=>{this._fullscreen=t})));this.addController(new Ya(this))}disconnectedCallback(){super.disconnectedCallback();this.opened=false}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i);if("value"in e&&this.__dispatchChange){this.dispatchEvent(new CustomEvent("change",{bubbles:true}));this.__dispatchChange=false}}open(){if(!this.disabled&&!this.readonly){this.opened=true}}close(){if(this._overlayInitialized||this.autoOpenDisabled){this.$.overlay.close()}}_initOverlay(){this.$.overlay.removeAttribute("disable-upgrade");this._overlayInitialized=true;this.$.overlay.addEventListener("opened-changed",(t=>{this.opened=t.detail.value}));this.$.overlay.addEventListener("vaadin-overlay-escape-press",(()=>{this._focusedDate=this._selectedDate;this._close()}));this._overlayContent.addEventListener("close",(()=>{this._close()}));this._overlayContent.addEventListener("focus-input",this._focusAndSelect.bind(this));this._overlayContent.addEventListener("date-tap",(t=>{this.__userConfirmedDate=true;this._selectDate(t.detail.date);this._close()}));this._overlayContent.addEventListener("date-selected",(t=>{this.__userConfirmedDate=!!t.detail.date;this._selectDate(t.detail.date)}));this._overlayContent.addEventListener("focusin",(()=>{if(this._keyboardActive){this._setFocused(true)}}));this.addEventListener("mousedown",(()=>this.__bringToFront()));this.addEventListener("touchstart",(()=>this.__bringToFront()))}checkValidity(){const t=!this._inputValue||!!this._selectedDate&&this._inputValue===this._getFormattedDate(this.i18n.formatDate,this._selectedDate);const e=!this._selectedDate||ma(this._selectedDate,this._minDate,this._maxDate);let i=true;if(this.inputElement){if(this.inputElement.checkValidity){i=this.inputElement.checkValidity()}else if(this.inputElement.validate){i=this.inputElement.validate()}}return t&&e&&i}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){return!this.opened}_setFocused(t){super._setFocused(t);this._shouldKeepFocusRing=t&&this._keyboardActive}_selectDate(t){const e=this._formatISO(t);if(this.value!==e){this.__dispatchChange=true}this._selectedDate=t}_close(){this._focus();this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,r,o){const n=e&&(!o||r);const a=i&&r;return!t||n||a||!s.parseDate}_formatISO(t){if(!(t instanceof Date)){return""}const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="";let s="0000";let r=t.getFullYear();if(r<0){r=-r;i="-";s="000000"}else if(t.getFullYear()>=1e4){i="+";s="000000"}const o=i+e(r,s);const n=e(t.getMonth()+1);const a=e(t.getDate());return[o,n,a].join("-")}_inputElementChanged(t){super._inputElementChanged(t);if(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){if(t&&!this._overlayInitialized){this._initOverlay()}if(this._overlayInitialized){this.$.overlay.opened=t}if(this.inputElement){this.inputElement.setAttribute("aria-expanded",t)}}_selectedDateChanged(t,e){if(t===undefined||e===undefined){return}const i=this._formatISO(t);if(!this.__keepInputValue){this._applyInputValue(t)}if(i!==this.value){this.validate();this.value=i}this._ignoreFocusedDateChange=true;this._focusedDate=t;this._ignoreFocusedDateChange=false}_focusedDateChanged(t,e){if(t===undefined||e===undefined){return}if(!this._ignoreFocusedDateChange&&!this._noInput){this._applyInputValue(t)}}__getOverlayTheme(t,e){if(e){return t}}_valueChanged(t,e){const i=ya(t);if(t&&!i){this.value=e;return}if(t){if(!pa(this._selectedDate,i)){this._selectedDate=i;if(e!==undefined){this.validate()}}}else{this._selectedDate=null}this._toggleHasValue(this._hasValue)}_onOverlayOpened(){const t=ya(this.initialPosition);const e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;if(t||ma(e,this._minDate,this._maxDate)){this._overlayContent.initialPosition=e}else{this._overlayContent.initialPosition=ba(e,[this._minDate,this._maxDate])}this._overlayContent.scrollToDate(this._overlayContent.focusedDate||this._overlayContent.initialPosition);this._ignoreFocusedDateChange=true;this._overlayContent.focusedDate=this._overlayContent.focusedDate||this._overlayContent.initialPosition;this._ignoreFocusedDateChange=false;window.addEventListener("scroll",this._boundOnScroll,true);if(this._focusOverlayOnOpen){this._overlayContent.focusDateElement();this._focusOverlayOnOpen=false}else{this._focus()}if(this._noInput&&this.focusElement){this.focusElement.blur();this._overlayContent.focusDateElement()}}_selectParsedOrFocusedDate(){this._ignoreFocusedDateChange=true;if(this.i18n.parseDate){const t=this._inputValue||"";const e=this._getParsedDate(t);if(this._isValidDate(e)){this._selectDate(e)}else{this.__keepInputValue=true;this._selectDate(null);this._selectedDate=null;this.__keepInputValue=false}}else if(this._focusedDate){this._selectDate(this._focusedDate)}this._ignoreFocusedDateChange=false}_onOverlayClosed(){window.removeEventListener("scroll",this._boundOnScroll,true);if(this.__userConfirmedDate){this.__userConfirmedDate=false}else{this._selectParsedOrFocusedDate()}if(this._nativeInput&&this._nativeInput.selectionStart){this._nativeInput.selectionStart=this._nativeInput.selectionEnd}if(!this.value){this.validate()}}_onScroll(t){if(t.target===window||!this._overlayContent.contains(t.target)){this._overlayContent._repositionYearScroller()}}_focus(){if(!this._noInput){this.inputElement.focus()}}_focusAndSelect(){this._focus();this._setSelectionRange(0,this._inputValue.length)}_applyInputValue(t){this._inputValue=t?this._getFormattedDate(this.i18n.formatDate,t):""}_getFormattedDate(t,e){return t(ga(e))}_setSelectionRange(t,e){if(this._nativeInput&&this._nativeInput.setSelectionRange){this._nativeInput.setSelectionRange(t,e)}}_isValidDate(t){return t&&!isNaN(t.getTime())}_onChange(t){if(this._inputValue===""){this.__dispatchChange=true}t.stopPropagation()}_onClick(t){if(!this._isClearButton(t)){this._onHostClick(t)}}_onHostClick(t){if(!this.autoOpenDisabled||this._noInput){t.preventDefault();this.open()}}_onClearButtonClick(t){t.preventDefault();this.value="";this._inputValue="";this.validate();this.dispatchEvent(new CustomEvent("change",{bubbles:true}))}_onKeyDown(t){super._onKeyDown(t);if(this._noInput){const e=[9];if(e.indexOf(t.keyCode)===-1){t.preventDefault()}}switch(t.key){case"ArrowDown":case"ArrowUp":t.preventDefault();if(this.opened){this._overlayContent.focusDateElement()}else{this._focusOverlayOnOpen=true;this.open()}break;case"Tab":if(this.opened){t.preventDefault();t.stopPropagation();this._setSelectionRange(0,0);if(t.shiftKey){this._overlayContent.focusCancel()}else{this._overlayContent.focusDateElement()}}break}}_onEnter(t){const e=this.value;if(this.opened){this.close()}else{this._selectParsedOrFocusedDate()}if(e===this.value){this.validate()}}_onEscape(t){if(this.opened){return}if(this.clearButtonVisible&&!!this.value){t.stopPropagation();this._onClearButtonClick(t);return}if(this.autoOpenDisabled){if(this.inputElement.value===""){this._selectDate(null)}this._applyInputValue(this._selectedDate)}else{this._focusedDate=this._selectedDate;this._selectParsedOrFocusedDate()}}_getParsedDate(t=this._inputValue){const e=this.i18n.parseDate&&this.i18n.parseDate(t);const i=e&&ya(`${e.year}-${e.month+1}-${e.day}`);return i}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this.inputElement.value&&!this.autoOpenDisabled){this.open()}this._userInputValueChanged()}_userInputValueChanged(){if(this._inputValue){const t=this._getParsedDate();if(this._isValidDate(t)){this._ignoreFocusedDateChange=true;if(!pa(t,this._focusedDate)){this._focusedDate=t}this._ignoreFocusedDateChange=false}}}get _overlayContent(){return this.$.overlay.content.querySelector("#overlay-content")}__computeMinOrMaxDate(t){return ya(t)}}
|
|
2831
|
+
/**
|
|
2832
|
+
* @license
|
|
2833
|
+
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2834
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2835
|
+
*/;bt("vaadin-date-picker",[Ga,ta],{moduleId:"vaadin-date-picker-styles"});class Va extends(qa(ja(Ct(Oo(Ps))))){static get is(){return"vaadin-date-picker"}static get template(){return Ms`
|
|
2836
|
+
<style>
|
|
2837
|
+
:host([opened]) {
|
|
2838
|
+
pointer-events: auto;
|
|
2839
|
+
}
|
|
2840
|
+
</style>
|
|
2841
|
+
|
|
2842
|
+
<div class="vaadin-date-picker-container">
|
|
2843
|
+
<div part="label">
|
|
2844
|
+
<slot name="label"></slot>
|
|
2845
|
+
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
2846
|
+
</div>
|
|
2847
|
+
|
|
2848
|
+
<vaadin-input-container
|
|
2849
|
+
part="input-field"
|
|
2850
|
+
readonly="[[readonly]]"
|
|
2851
|
+
disabled="[[disabled]]"
|
|
2852
|
+
invalid="[[invalid]]"
|
|
2853
|
+
theme$="[[_theme]]"
|
|
2854
|
+
>
|
|
2855
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
2856
|
+
<slot name="input"></slot>
|
|
2857
|
+
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
2858
|
+
<div part="toggle-button" slot="suffix" aria-hidden="true" on-click="_toggle"></div>
|
|
2859
|
+
</vaadin-input-container>
|
|
2860
|
+
|
|
2861
|
+
<div part="helper-text">
|
|
2862
|
+
<slot name="helper"></slot>
|
|
2863
|
+
</div>
|
|
2864
|
+
|
|
2865
|
+
<div part="error-message">
|
|
2866
|
+
<slot name="error-message"></slot>
|
|
2867
|
+
</div>
|
|
2868
|
+
</div>
|
|
2869
|
+
|
|
2870
|
+
<vaadin-date-picker-overlay
|
|
2871
|
+
id="overlay"
|
|
2872
|
+
fullscreen$="[[_fullscreen]]"
|
|
2873
|
+
theme$="[[__getOverlayTheme(_theme, _overlayInitialized)]]"
|
|
2874
|
+
on-vaadin-overlay-open="_onOverlayOpened"
|
|
2875
|
+
on-vaadin-overlay-closing="_onOverlayClosed"
|
|
2876
|
+
restore-focus-on-close
|
|
2877
|
+
restore-focus-node="[[inputElement]]"
|
|
2878
|
+
disable-upgrade
|
|
2879
|
+
>
|
|
2880
|
+
<template>
|
|
2881
|
+
<vaadin-date-picker-overlay-content
|
|
2882
|
+
id="overlay-content"
|
|
2883
|
+
i18n="[[i18n]]"
|
|
2884
|
+
fullscreen$="[[_fullscreen]]"
|
|
2885
|
+
label="[[label]]"
|
|
2886
|
+
selected-date="[[_selectedDate]]"
|
|
2887
|
+
focused-date="{{_focusedDate}}"
|
|
2888
|
+
show-week-numbers="[[showWeekNumbers]]"
|
|
2889
|
+
min-date="[[_minDate]]"
|
|
2890
|
+
max-date="[[_maxDate]]"
|
|
2891
|
+
part="overlay-content"
|
|
2892
|
+
theme$="[[__getOverlayTheme(_theme, _overlayInitialized)]]"
|
|
2893
|
+
></vaadin-date-picker-overlay-content>
|
|
2894
|
+
</template>
|
|
2895
|
+
</vaadin-date-picker-overlay>
|
|
2896
|
+
|
|
2897
|
+
<slot name="tooltip"></slot>
|
|
2898
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready();this.addController(new La(this,(t=>{this._setInputElement(t);this._setFocusElement(t);this.stateTarget=t;this.ariaTarget=t})));this.addController(new Ha(this.inputElement,this._labelController));this._tooltipController=new Ro(this);this.addController(this._tooltipController);this._tooltipController.setPosition("top");this._tooltipController.setShouldShow((t=>!t.opened));const t=this.shadowRoot.querySelector('[part="toggle-button"]');t.addEventListener("mousedown",(t=>t.preventDefault()))}_initOverlay(){super._initOverlay();this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){if(t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)){t.preventDefault()}}_toggle(t){t.stopPropagation();this[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_openedChanged(t){super._openedChanged(t);this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]');this.$.overlay.noVerticalOverlap=true}}customElements.define(Va.is,Va);const Ja='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}';const Ka=class{constructor(i){t(this,i);this.filterDraw=e(this,"filterDraw",7);this.filterSelection=e(this,"filterSelection",7);this.filterSelectionReset=e(this,"filterSelectionReset",7);this.showFilterId=true;this.activateTicketSearch=false;this.gameId="";this.playerId="";this.session="";this.postMessage=false;this.language="en";this.quickFiltersActive=false;this.clientStyling="";this.clientStylingUrlContent="";this.showFilterModal=false;this.showClearButton=false;this.filterData={};this.filterDataReset={ticketDrawId:"",filterFromCalendar:"",filterToCalendar:""};this.limitStylingAppends=false;this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling;this.stylingContainer.prepend(t)};this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(t)}),1)}}componentDidRender(){if(document.getElementById("#FilterById"))document.getElementById("#FilterById").value="";if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}filterSelectionHandler(t){if(this.postMessage)window.postMessage({type:"filterSelection",event:t},window.location.href);if(this.filterData.ticketDrawId||this.filterData.filterFromCalendar||this.filterData.filterToCalendar)this.filterSelection.emit(t)}filterSelectionResetHandler(t){if(this.postMessage)window.postMessage({type:"filterSelectionReset",event:t},window.location.href);this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=false}toggleFilterModal(){this.showFilterModal=true}filterSearch(){this.modalCloseEvent();this.showClearButton=true;this.filterSelectionHandler(this.filterData);console.log(this.showClearButton)}resetSearch(){this.showClearButton=false;this.filterSelectionResetHandler(this.filterDataReset);this.filterData={}}handleTicketDrawId(t){this.filterData.ticketDrawId=t.target.value}handleFilterFrom(t){this.filterData.filterFromCalendar=new Date(t.target.value).toISOString()}handleFilterTo(t){this.filterData.filterToCalendar=new Date(t.target.value).toISOString()}render(){return i("div",{class:"HelperFilters",ref:t=>this.stylingContainer=t},i("div",{class:"FilterButtonsWrapper"},i("button",{class:"FilterOpen",onClick:()=>this.toggleFilterModal()},n("filterOpen",this.language)),console.log("in filter Open",this.showClearButton,this.quickFiltersActive),this.showClearButton||this.quickFiltersActive?i("button",{class:"FilterClear",onClick:()=>this.resetSearch()},n("filterClear",this.language)):null),i("helper-modal",{"title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{class:"FilterModalHeader"},i("h3",{class:"FilterModalTitle"},this.activateTicketSearch?n("filterModalTicketTitle",this.language):n("filterModalDrawTitle",this.language))),i("div",{class:"FilterModalBody"},i("input",{id:"FilterById",type:"text",value:this.filterData.ticketDrawId,onInput:t=>this.handleTicketDrawId(t),class:"FilterModalSearch",placeholder:this.activateTicketSearch?n("filterTicketPlaceholder",this.language):n("filterDrawPlaceholder",this.language)}),i("p",null,n("filterOrDate",this.language)),i("div",{class:"FilterCalendarWrapper"},i("vaadin-date-picker",{value:this.filterData.filterFromCalendar,onChange:t=>this.handleFilterFrom(t),placeholder:n("filterFromCalendar",this.language),class:"VaadinDatePicker"}),i("vaadin-date-picker",{value:this.filterData.filterToCalendar,onChange:t=>this.handleFilterTo(t),placeholder:n("filterToCalendar",this.language),class:"VaadinDatePicker"}))),i("div",{class:"FilterModalFooter"},i("button",{class:"FilterModalButton",onClick:()=>this.filterSearch()},n("filterModalButton",this.language)))))}};Ka.style=Ja;const Za="en";const Xa=["ro","en"];const Qa={en:{drawResultsHeader:"Last draw results",drawId:"Draw ID",drawName:"Game name",drawDate:"Draw Date",drawNumbersGridDraw:"Draw numbers Grid ",drawNumbersGridTicket:"Draw numbers Grid ",ticketResult:"Ticket result",amountWon:"Amount won",numberOfDraws:"Number of draws",multiplier:"Multiplier:",ticketPurchaseDate:"Ticket Purchase Date",ticketStatus:"Ticket Status",ticketId:"Ticket ID",ticketAmount:"Ticket Amount",winUpTo:"Win up to"},ro:{drawResultsHeader:"Ultimele rezultate extragere",drawId:"Id extragere",drawName:"Numele jocului",drawDate:"Data extragerii",drawNumbersGridDraw:"Numerele extrase Grid",drawNumbersGridTicket:"Numerele extrase Grid",ticketResult:"Rezultatul biletului",amountWon:"Suma castigata",numberOfDraws:"Numarul de extrageri",multiplier:"Multiplicator:",ticketPurchaseDate:"Data achizitionarii biletului",ticketStatus:"Statusul biletului",ticketId:"Id biletul",ticketAmount:"Valoarea biletului",winUpTo:"Poti castiga"},fr:{drawResultsHeader:"Résultats du dernier tirage",drawId:"ID de tirage",drawName:"Nom du jeu",drawDate:"Date du tirage",drawNumbersGridDraw:"Tirage des numéros Grille",drawNumbersGridTicket:"Tirage des numéros Grille",ticketResult:"Résultat du ticket",amountWon:"Montant gagné",numberOfDraws:"Nombre de tirages",multiplier:"Multiplicateur",ticketPurchaseDate:"Date d'achat du billet",ticketStatus:"Statut du ticket",ticketId:"ID de billets",ticketAmount:"Montant du billet",winUpTo:"Gagnez jusqu'à"},ar:{drawResultsHeader:"نتائج آخر سحب",drawId:"معرّف السحب",drawName:"اسم اللعبة",drawDate:"تاريخ السحب",drawNumbersGridDraw:"شبكة أرقام السحب",drawNumbersGridTicket:"شبكة أرقام السحب",ticketResult:"نتيجة التذكرة",amountWon:"المبلغ الذي تم ربحه",numberOfDraws:"عدد السحوبات",multiplier:"مضاعف",ticketPurchaseDate:"تاريخ شراء التذكرة",ticketStatus:"حالة التذكرة",ticketId:"معرّف التذكرة",ticketAmount:"مبلغ التذكرة",winUpTo:"ربح يصل إلى"}};const tl=(t,e)=>{const i=e;return Qa[i!==undefined&&Xa.includes(i)?i:Za][t]};const el='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketInfo{display:flex;flex-direction:row;gap:15px;background-color:#009993;color:#fff;padding:12px;font-size:14px}.DrawResultsArea{margin-top:15px}.DrawResultsArea.TicketDraws .Content{padding:0;border:0}.DrawResultsArea.TicketDraws .DrawResultsBody{padding:0;margin-bottom:5px;border-radius:0;border:0}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:#009993;color:#fff;font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawResultsBody{padding:20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid #009993}.DrawResultsBody>div{margin:10px 0}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.DrawNumbersGrid{display:flex;flex-direction:column;gap:5px}.DrawNumbersGrid label{display:block;margin-bottom:7px}.Toggle{cursor:pointer;display:inline-block}.ToggleSwitch{display:inline-block;background:#ccc;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:""}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #eee 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#56c080}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{position:relative}.DrawTicketsContainer{display:flex;flex-direction:column;margin:20px auto 0}.DrawMultipler{margin-top:15px}.ExpandableBoxes{position:relative;display:flex;flex-direction:column;border:1px solid #ccc;border-radius:5px;background-color:white}.ExpandableBox{border-bottom:1px solid #ccc;transition:height 300ms ease-in-out;overflow:hidden;height:80px}.ExpandableBox:last-child{border-bottom:0}.ExpandableBoxHeader{position:relative;list-style:none;outline:0;cursor:pointer;text-transform:uppercase;transition:color 300ms ease-in-out;margin-bottom:24px;margin-left:5px}.ShowBox>.ExpandableBoxHeader{color:#009993}.ExpandableBoxHeader::-webkit-details-marker{display:none}.ExpandableBoxHeader:before,.ExpandableBoxHeader:after{content:"";position:absolute}.ExpandableBoxHeader:before{right:21px;top:50%;height:2px;margin-top:-1px;width:16px;background:#009993}.ExpandableBoxHeader:after{right:28px;top:50%;height:16px;margin-top:-8px;width:2px;margin-left:-1px;background:#009993;transition:all 300ms ease-in-out}.ShowBox .ExpandableBoxHeader:after{opacity:0;transform:translateY(25%)}.ExpandableBoxBody{padding-top:0;font-weight:lighter;margin-left:5px}.ExpandableBox.ShowBox{height:300px}';const il=class{constructor(e){t(this,e);this.language="en";this.drawMode=false;this.drawId="";this.gameName="";this.ticketDate="";this.ticketStatus="";this.ticketId="";this.ticketAmount="";this.ticketMultiplier=false;this.ticketDrawCount=0;this.ticketNumbers="";this.sessionId="";this.clientStyling="";this.clientStylingUrlContent="";this.ticketDrawData="";this.multiplier=3;this.isLoading=true;this.hasErrors=false;this.errorText="";this.ticketData=[];this.ticketDataLoaded=false;this.ticketDraws=[];this.toggleDrawer=[false];this.limitStylingAppends=false;this.ticketDrawDetails=[];this.ticketDrawDetailsFlag=true;this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling;this.stylingContainer.prepend(t)};this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(t)}),1)}}connectedCallback(){let t=[];if(this.ticketNumbers){this.gridNumbers=JSON.parse(this.ticketNumbers)}if(this.drawId){t.push(this.getDrawData())}Promise.all(t).then((()=>{this.isLoading=false})).catch((t=>{console.log("error ",t);this.isLoading=false}))}componentWillRender(){if(this.ticketDrawData&&this.ticketDrawDetailsFlag){this.ticketDrawDetails=JSON.parse(this.ticketDrawData);this.ticketDrawDetails.forEach((t=>{this.getDrawData(t.drawId).then((e=>t.drawData=e))}));this.ticketDrawDetailsFlag=false}}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}getDrawData(t){this.isLoading=true;return new Promise(((e,i)=>{let s=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t?t:this.drawId}`);fetch(s.href).then((t=>t.json())).then((i=>{if(t){e(i)}else{this.drawData=i;e(true)}this.isLoading=false})).catch((t=>{i(t);this.isLoading=false}))}))}drawerToggle(t){this.toggleDrawer=this.toggleDrawer.map(((e,i)=>{if(i==t){return!e}return e}));if(t>=this.toggleDrawer.length){this.toggleDrawer.push(true)}}render(){if(this.isLoading){return i("p",null,"Loading, please wait ...")}else if(this.hasErrors){i("p",null,this.errorText)}else{return i("section",{class:"DrawResultsSection",ref:t=>this.stylingContainer=t},this.drawMode?i("div",{class:"DrawResultsArea"},this.drawData&&i("div",null,i("div",{class:"DrawResultsHeader"},i("span",null,tl("drawId",this.language),": ",this.drawData.id),i("span",null,tl("drawDate",this.language),": ",this.drawData.date.slice(0,10))),i("div",{class:"DrawResultsBody"},i("div",{class:"DrawNumbersGrid"},i("p",null,tl("drawNumbersGridDraw",this.language),"0:"),i("div",{class:"BulletContainer"},i("lottery-grid",{"selected-numbers":this.drawData.winningNumbers.join(","),"display-selected":true,selectable:false,language:this.language,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},tl("multiplier",this.language)," ",this.multiplier)))))):i("div",{class:"DrawResultsArea TicketDraws"},i("div",{class:"DrawResultsBody"},i("div",{class:"TicketIdContainer"},i("label",{class:"Label"},tl("ticketId",this.language),": ",i("span",null,this.ticketId))),i("div",{class:"TicketAmountContainer"},i("label",{class:"Label"},tl("ticketAmount",this.language)," ",i("span",null,this.ticketAmount))),i("div",{class:"DrawNumbersGrid"},this.gridNumbers.map(((t,e)=>i("div",null,i("label",{class:"Label"},tl("drawNumbersGridTicket",this.language)," ",String.fromCharCode(e+65),":"),i("div",{class:"BulletContainer"},i("lottery-grid",{"selected-numbers":t.join(","),selectable:false,"display-selected":true,language:this.language,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))))),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},tl("multiplier",this.language)," ",JSON.stringify(this.ticketMultiplier))),i("div",{class:"NumberOfDrawsContainer"},i("label",{class:"Label"},tl("numberOfDraws",this.language),": ",this.ticketDrawCount),i("div",{class:"DrawTicketsContainer"},this.ticketDrawDetails&&this.ticketDrawDetails.length>0&&i("div",{class:"ExpandableBoxes"},this.ticketDrawDetails.map(((t,e)=>{var s,r,o,n,a;return i("div",{class:{ExpandableBox:true,ShowBox:this.toggleDrawer[e]},onClick:()=>this.drawerToggle(e)},i("div",{class:"ExpandableBoxHeader"},i("div",{class:"TicketResultContainer"},i("p",null,tl("ticketResult",this.language),": ",t.state)),t.state=="won"&&i("div",{class:"AmountWonContainer"},i("p",null,tl("amountWon",this.language),": ",Number(t.amount).toLocaleString("en")," ",t.currency)),t.state=="lost"&&i("div",{class:"DrawIdContainer"},i("p",null,tl("drawId",this.language),": ",t.drawId))),i("div",{class:"ExpandableBoxBody"},i("div",{class:"DrawIdContainer"},i("p",null,tl("drawId",this.language),": ",t.drawId)),i("div",{class:"DrawDateContainer"},i("p",null,tl("drawDate",this.language),": ",(s=t.drawData)===null||s===void 0?void 0:s.date.slice(0,10)," | ",(r=t.drawData)===null||r===void 0?void 0:r.date.slice(11,19))),i("div",{class:"DrawNumbersGrid"},t.drawData&&i("div",{class:"BulletContainer"},i("label",{class:"Label"},tl("drawNumbersGridDraw",this.language)," ",String.fromCharCode(e+10),":"),i("lottery-grid",{"selected-numbers":(n=(o=t.drawData)===null||o===void 0?void 0:o.winningNumbers)===null||n===void 0?void 0:n.join(","),selectable:false,"display-selected":true,language:this.language,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},tl("multiplier",this.language)," ",(a=t.drawData)===null||a===void 0?void 0:a.multiplier))))}))))))))}}};il.style=el;export{Ka as helper_filters,il as lottery_draw_results};
|
|
2899
|
+
//# sourceMappingURL=p-d9e7b5da.entry.js.map
|