@everymatrix/lottery-ticket-controller 1.54.11 → 1.55.0
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_5.cjs.entry.js +7283 -7029
- package/dist/cjs/{index-ce57b34d.js → index-e28f68ca.js} +72 -173
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/lottery-ticket-controller.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/lottery-ticket-controller/lottery-ticket-controller.js +15 -83
- package/dist/esm/helper-accordion_5.entry.js +7283 -7029
- package/dist/esm/{index-30728886.js → index-bd95d491.js} +72 -173
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottery-ticket-controller.js +3 -3
- package/dist/lottery-ticket-controller/lottery-ticket-controller.esm.js +1 -1
- package/dist/lottery-ticket-controller/p-16bb9142.entry.js +3439 -0
- package/dist/lottery-ticket-controller/p-9e034c46.js +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/lottery-ticket-controller/.stencil/packages/stencil/lottery-ticket-controller/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/lottery-ticket-controller/.stencil/packages/stencil/lottery-ticket-controller/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/lottery-ticket-controller/p-2b9683a5.entry.js +0 -2727
- package/dist/lottery-ticket-controller/p-44ec1b95.js +0 -2
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-ticket-controller/.stencil/packages/stencil/lottery-ticket-controller/stencil.config.d.ts +0 -2
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-ticket-controller/.stencil/packages/stencil/lottery-ticket-controller/stencil.config.dev.d.ts +0 -2
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-ticket-controller/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-ticket-controller/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-ticket-controller/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-ticket-controller/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -0,0 +1,3439 @@
|
|
|
1
|
+
import{r as t,c as e,h as o}from"./p-9e034c46.js";const i=["ro","en","hr"],s={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}},r=class{constructor(o){t(this,o),this.accordionEvent=e(this,"helperAccordionAction",7),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)},this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.showContent=void 0,this.limitStylingAppends=!1}connectedCallback(){this.showContent=!this.collapsed}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let o in t[e])s[e][o]=t[e][o]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return o("div",{key:"2db19795aa22479f038d9fc7c936cf7403efa43e",class:"Wrapper",ref:t=>this.stylingContainer=t},o("div",{key:"6804e27dbd68e4f4182ab07beb665c53b54069b6",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},o("p",{key:"d1293990d39da1f50d36dff28e1abbe53259356b",class:"Title"},this.headerTitle),o("p",{key:"7632e3ddda5dea8e91d8a3935ff46c0f357c4397",class:"Subtitle"},this.headerSubtitle),o("p",{key:"1ab0dd4cc2625ef20c858738ee290e922e37dd21",class:"Subtitle Description"},this.description),o("span",{key:"3c7e3d3092aa97d24f62383e17a8a91646a78058",class:"Expand"},this.showContent?"<":">")),this.showContent&&o("div",{key:"ba970b8947e1986aedbdfd37b044e05f2b1c29fc"},o("div",{key:"7cfc0ca2b99d76d7647569f7105c29d1be8cf994",class:"Content"},o("slot",{key:"a2d866a914d33eac26b3b7e138e611be9f942c65",name:"accordionContent"}),this.footer&&this.showContent&&o("div",{key:"c44d54e98f712c921e7dd16faaaaa7cfb92e17c4"},this.deleteTab&&o("span",{key:"8c46aa94fcce959f370d07da69bd58509c143373",class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return s[void 0!==t&&i.includes(t)?t:"en"].deleteTicket})())))))}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:var(--emw--color-background, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-background-secondary, #00ABA4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-gray-50, #F1F1F1);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00ABA4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--button-text-color, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--button-border-color, #009993);padding:10px 15px;user-select:none;color:var(--emw--button-text-color, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ActionButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}';const n=class{constructor(o){t(this,o),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},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)},this.value="0",this.selectable=!0,this.isSelected=!1,this.isBonus=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return o("div",{key:"a21cbee8f556bfbbe9f97be5f44bfc08b6f24dd6",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":"")+(this.isBonus?" Bonus":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:var(--emw--button-text-color, #000);display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-50, #F1F1F1) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--button-border-color, #00958f)}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-gray-100, #D4D4D4);border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.Bonus{background:var(--emw--color-error, #FF3D00)}';const a=class{constructor(o){t(this,o),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.gridClearAllEvent=e(this,"gridClearAllEvent",7),this.selectedCounter=0,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)},this.ticketId=void 0,this.totalNumbers=0,this.gameId=void 0,this.maximumAllowed=7,this.minimumAllowed=3,this.numberRange=void 0,this.selectable=!0,this.selectedNumbers="",this.secondaryNumbers="",this.displaySelected=!1,this.language="en",this.gridIndex=void 0,this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.highNumber=47,this.lowNumber=1,this.selectionType="mainSelection",this.partialQuickpickAvailable=!1,this.numbers=[],this.bonusNumbers=[],this.limitStylingAppends=!1}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.secondaryNumbers.length>0&&(this.bonusNumbers=this.secondaryNumbers.split(",").map((t=>({number:t,selected:!0,selectable:this.selectable})))),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e)).map((t=>t.toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}shuffleArray(t){const e=[];for(;t.length>0;){const o=Math.floor(Math.random()*t.length);e.push(t.splice(o,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>({number:e.number,selected:e.number==t.detail.value?t.detail.selected:e.selected,selectable:e.selectable}))),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter>=this.minimumAllowed&&this.selectedCounter<=this.maximumAllowed&&(this.numbers=this.numbers.map((t=>this.selectedCounter===this.maximumAllowed?{number:t.number,selected:t.selected,selectable:!!t.selected}:{number:t.number,selected:t.selected,selectable:!0})),JSON.parse(this.numberRange).includes(this.selectedCounter)?this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter-=1,this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.selectedCounter<this.minimumAllowed?this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),0===this.selectedCounter&&this.gridClearAllEvent.emit(this.gridIndex))}async resetSelectionHandler(t){t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:[]}))}async autoSelectionHandler(t){if(t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex){this.resetSelectionHandler(t);let e=Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:!!this.partialQuickpickAvailable&&e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.minimumAllowed}}render(){return o("div",{key:"8ad436904a126e6bee036c7372cf45c075022e5f",class:"GridContainer",ref:t=>this.stylingContainer=t},o("div",{key:"5a8818209485f0808a99978910f6f26473dd6f59",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>o("div",null,o("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))),this.bonusNumbers.length?this.bonusNumbers.map((t=>o("div",null,o("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"is-bonus":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))):""))}};a.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const l=["ro","en","hr"],c={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},hr:{loading:"Učitavanje, molimo pričekajte ...",error:"Došlo je do pogreške prilikom pokušaja dohvaćanja podataka",multiplier:"Multiplikator",numberOfDraws:"Broj izvlačenja",wagerPerDraw:"Ulog po izvlačenju",resetButton:"Resetiraj",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"}},h=(t,e)=>{const o=e;return c[void 0!==o&&l.includes(o)?o:"en"][t]};
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
5
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
|
+
*/
|
|
7
|
+
function u(t){const e=customElements.get(t.is);if(e){const o=e.version;o&&t.version&&o===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${e.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
11
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12
|
+
*/class d extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.9"}}u(d);
|
|
13
|
+
/**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright 2019 Google LLC
|
|
16
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
+
*/
|
|
18
|
+
const m=window,p=m.ShadowRoot&&(void 0===m.ShadyCSS||m.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,f=Symbol(),v=new WeakMap;class b{constructor(t,e,o){if(this._$cssResult$=!0,o!==f)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(p&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=v.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&v.set(e,t))}return t}toString(){return this.cssText}}const g=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,o,i)=>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.")})(o)+t[i+1]),t[0]);return new b(o,t,f)},y=p?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new b("string"==typeof t?t:t+"",void 0,f))(e)})(t):t
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/;var x;const w=window,A=w.trustedTypes,k=A?A.emptyScript:"",_=w.reactiveElementPolyfillSupport,C={toAttribute(t,e){switch(e){case Boolean:t=t?k:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},S=(t,e)=>e!==t&&(e==e||t==t),z={attribute:!0,type:String,converter:C,reflect:!1,hasChanged:S},T="finalized";class N extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}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,o)=>{const i=this._$Ep(o,e);void 0!==i&&(this._$Ev.set(i,o),t.push(i))})),t}static createProperty(t,e=z){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const o="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,o,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){return{get(){return this[e]},set(i){const s=this[t];this[e]=i,this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||z}static finalize(){if(this.hasOwnProperty(T))return!1;this[T]=!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 o of e)this.createProperty(o,t[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(y(t))}else void 0!==t&&e.push(y(t));return e}static _$Ep(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){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,o;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(o=t.hostConnected)||void 0===o||o.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((t,e)=>{p?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),i=m.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=e.cssText,t.appendChild(o)}))})(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,o){this._$AK(t,o)}_$EO(t,e,o=z){var i;const s=this.constructor._$Ep(t,o);if(void 0!==s&&!0===o.reflect){const r=(void 0!==(null===(i=o.converter)||void 0===i?void 0:i.toAttribute)?o.converter:C).toAttribute(e,o.type);this._$El=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$El=null}}_$AK(t,e){var o;const i=this.constructor,s=i._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=i.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(o=t.converter)||void 0===o?void 0:o.fromAttribute)?t.converter:C;this._$El=s,this[s]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,o){let i=!0;void 0!==t&&(((o=o||this.constructor.getPropertyOptions(t)).hasChanged||S)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===o.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,o))):i=!1),!this.isUpdatePending&&i&&(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 o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),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(o)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(o)}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){}}
|
|
24
|
+
/**
|
|
25
|
+
* @license
|
|
26
|
+
* Copyright 2017 Google LLC
|
|
27
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
+
*/
|
|
29
|
+
var I;N[T]=!0,N.elementProperties=new Map,N.elementStyles=[],N.shadowRootOptions={mode:"open"},null==_||_({ReactiveElement:N}),(null!==(x=w.reactiveElementVersions)&&void 0!==x?x:w.reactiveElementVersions=[]).push("1.6.3");const B=window,P=B.trustedTypes,E=P?P.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",O=`lit$${(Math.random()+"").slice(9)}$`,D="?"+O,j=`<${D}>`,U=document,F=()=>U.createComment(""),R=t=>null===t||"object"!=typeof t&&"function"!=typeof t,L=Array.isArray,W="[ \t\n\f\r]",G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,q=/-->/g,Y=/>/g,H=RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,J=/"/g,K=/^(?:script|style|textarea|title)$/i,V=Symbol.for("lit-noChange"),Q=Symbol.for("lit-nothing"),X=new WeakMap,$=U.createTreeWalker(U,129,null,!1);function tt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==E?E.createHTML(e):e}const et=(t,e)=>{const o=t.length-1,i=[];let s,r=2===e?"<svg>":"",n=G;for(let e=0;e<o;e++){const o=t[e];let a,l,c=-1,h=0;for(;h<o.length&&(n.lastIndex=h,l=n.exec(o),null!==l);)h=n.lastIndex,n===G?"!--"===l[1]?n=q:void 0!==l[1]?n=Y:void 0!==l[2]?(K.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=H):void 0!==l[3]&&(n=H):n===H?">"===l[0]?(n=null!=s?s:G,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?H:'"'===l[3]?J:Z):n===J||n===Z?n=H:n===q||n===Y?n=G:(n=H,s=void 0);const u=n===H&&t[e+1].startsWith("/>")?" ":"";r+=n===G?o+j:c>=0?(i.push(a),o.slice(0,c)+M+o.slice(c)+O+u):o+O+(-2===c?(i.push(void 0),e):u)}return[tt(t,r+(t[o]||"<?>")+(2===e?"</svg>":"")),i]};class ot{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,c]=et(t,e);if(this.el=ot.createElement(l,o),$.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=$.nextNode())&&a.length<n;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith(M)||e.startsWith(O)){const o=c[r++];if(t.push(e),void 0!==o){const t=i.getAttribute(o.toLowerCase()+M).split(O),e=/([.?@])?(.*)/.exec(o);a.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?at:"?"===e[1]?ct:"@"===e[1]?ht:nt})}else a.push({type:6,index:s})}for(const e of t)i.removeAttribute(e)}if(K.test(i.tagName)){const t=i.textContent.split(O),e=t.length-1;if(e>0){i.textContent=P?P.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],F()),$.nextNode(),a.push({type:2,index:++s});i.append(t[e],F())}}}else if(8===i.nodeType)if(i.data===D)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(O,t+1));)a.push({type:7,index:s}),t+=O.length-1}s++}}static createElement(t,e){const o=U.createElement("template");return o.innerHTML=t,o}}function it(t,e,o=t,i){var s,r,n,a;if(e===V)return e;let l=void 0!==i?null===(s=o._$Co)||void 0===s?void 0:s[i]:o._$Cl;const c=R(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,o,i)),void 0!==i?(null!==(n=(a=o)._$Co)&&void 0!==n?n:a._$Co=[])[i]=l:o._$Cl=l),void 0!==l&&(e=it(t,l._$AS(t,e.values),l,i)),e}class st{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:o},parts:i}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:U).importNode(o,!0);$.currentNode=s;let r=$.nextNode(),n=0,a=0,l=i[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new rt(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new ut(r,this,t)),this._$AV.push(e),l=i[++a]}n!==(null==l?void 0:l.index)&&(r=$.nextNode(),n++)}return $.currentNode=U,s}v(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class rt{constructor(t,e,o,i){var s;this.type=2,this._$AH=Q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cp=null===(s=null==i?void 0:i.isConnected)||void 0===s||s}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=it(this,t,e),R(t)?t===Q||null==t||""===t?(this._$AH!==Q&&this._$AR(),this._$AH=Q):t!==this._$AH&&t!==V&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>L(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Q&&R(this._$AH)?this._$AA.nextSibling.data=t:this.$(U.createTextNode(t)),this._$AH=t}g(t){var e;const{values:o,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=ot.createElement(tt(i.h,i.h[0]),this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(o);else{const t=new st(s,this),e=t.u(this.options);t.v(o),this.$(e),this._$AH=t}}_$AC(t){let e=X.get(t.strings);return void 0===e&&X.set(t.strings,e=new ot(t)),e}T(t){L(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new rt(this.k(F()),this.k(F()),this,this.options)):o=e[i],o._$AI(s),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var o;for(null===(o=this._$AP)||void 0===o||o.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 nt{constructor(t,e,o,i,s){this.type=1,this._$AH=Q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=Q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,o,i){const s=this.strings;let r=!1;if(void 0===s)t=it(this,t,e,0),r=!R(t)||t!==this._$AH&&t!==V,r&&(this._$AH=t);else{const i=t;let n,a;for(t=s[0],n=0;n<s.length-1;n++)a=it(this,i[o+n],e,n),a===V&&(a=this._$AH[n]),r||(r=!R(a)||a!==this._$AH[n]),a===Q?t=Q:t!==Q&&(t+=(null!=a?a:"")+s[n+1]),this._$AH[n]=a}r&&!i&&this.j(t)}j(t){t===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class at extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Q?void 0:t}}const lt=P?P.emptyScript:"";class ct extends nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Q?this.element.setAttribute(this.name,lt):this.element.removeAttribute(this.name)}}class ht extends nt{constructor(t,e,o,i,s){super(t,e,o,i,s),this.type=5}_$AI(t,e=this){var o;if((t=null!==(o=it(this,t,e,0))&&void 0!==o?o:Q)===V)return;const i=this._$AH,s=t===Q&&i!==Q||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==Q&&(i===Q||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class ut{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){it(this,t)}}const dt=B.litHtmlPolyfillSupport;
|
|
30
|
+
/**
|
|
31
|
+
* @license
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
+
*/
|
|
35
|
+
var mt,pt;null==dt||dt(ot,rt),(null!==(I=B.litHtmlVersions)&&void 0!==I?I:B.litHtmlVersions=[]).push("2.8.0");class ft extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{var i,s;const r=null!==(i=null==o?void 0:o.renderBefore)&&void 0!==i?i:e;let n=r._$litPart$;if(void 0===n){const t=null!==(s=null==o?void 0:o.renderBefore)&&void 0!==s?s:null;r._$litPart$=n=new rt(e.insertBefore(F(),t),t,void 0,null!=o?o:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return V}}ft.finalized=!0,ft._$litElement$=!0,null===(mt=globalThis.litElementHydrateSupport)||void 0===mt||mt.call(globalThis,{LitElement:ft});const vt=globalThis.litElementPolyfillSupport;null==vt||vt({LitElement:ft}),(null!==(pt=globalThis.litElementVersions)&&void 0!==pt?pt:globalThis.litElementVersions=[]).push("3.3.3");
|
|
36
|
+
/**
|
|
37
|
+
* @license
|
|
38
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
39
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
40
|
+
*/
|
|
41
|
+
const bt=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,o){super.attributeChangedCallback(t,e,o),"theme"===t&&this._set_theme(o)}}
|
|
42
|
+
/**
|
|
43
|
+
* @license
|
|
44
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
45
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
46
|
+
*/,gt=[];function yt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function xt(t,e,o={}){t&&yt(customElements.get(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=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof b||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,o):gt.push({themeFor:t,styles:e,include:o.include,moduleId:o.moduleId})}function wt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():gt}function At(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function kt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const o=wt().find((e=>e.moduleId===t));o?e.push(...kt(o),...o.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function _t(t){const e=`${t}-default-theme`,o=wt().filter((o=>o.moduleId!==e&&function(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}(o.themeFor,t))).map((t=>({...t,styles:[...kt(t),...t.styles],includePriority:At(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return o.length>0?o:wt().filter((t=>t.moduleId===e))}const Ct=t=>class extends(bt(t)){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;t&&!yt(this)&&function(t,e){const o=document.createElement("style");o.innerHTML=t.map((t=>t.cssText)).join("\n"),e.content.appendChild(o)}(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);this.__themes=[...(t?t.constructor.__themes:[])||[],..._t(this.is)];const e=this.__themes.flatMap((t=>t.styles));return e.filter(((t,o)=>o===e.lastIndexOf(t)))}}
|
|
47
|
+
/**
|
|
48
|
+
* @license
|
|
49
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
50
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
51
|
+
*/,St=(t,...e)=>{const o=document.createElement("style");o.id=t,o.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",o)},zt=(t,...e)=>{St(`lumo-${t}`,e)};zt("color-props",g`
|
|
52
|
+
:host {
|
|
53
|
+
/* Base (background) */
|
|
54
|
+
--lumo-base-color: #fff;
|
|
55
|
+
|
|
56
|
+
/* Tint */
|
|
57
|
+
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
58
|
+
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
59
|
+
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
60
|
+
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
61
|
+
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
62
|
+
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
63
|
+
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
64
|
+
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
65
|
+
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
66
|
+
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
67
|
+
--lumo-tint: #fff;
|
|
68
|
+
|
|
69
|
+
/* Shade */
|
|
70
|
+
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
71
|
+
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
72
|
+
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
73
|
+
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
74
|
+
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
75
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
76
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
77
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
78
|
+
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
79
|
+
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
80
|
+
--lumo-shade: hsl(214, 35%, 15%);
|
|
81
|
+
|
|
82
|
+
/* Contrast */
|
|
83
|
+
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
84
|
+
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
85
|
+
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
86
|
+
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
87
|
+
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
88
|
+
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
89
|
+
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
90
|
+
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
91
|
+
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
92
|
+
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
93
|
+
--lumo-contrast: var(--lumo-shade);
|
|
94
|
+
|
|
95
|
+
/* Text */
|
|
96
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
97
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
98
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
99
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
100
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
101
|
+
|
|
102
|
+
/* Primary */
|
|
103
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
104
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
105
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
106
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
107
|
+
--lumo-primary-contrast-color: #fff;
|
|
108
|
+
|
|
109
|
+
/* Error */
|
|
110
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
|
111
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
112
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
113
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
114
|
+
--lumo-error-contrast-color: #fff;
|
|
115
|
+
|
|
116
|
+
/* Success */
|
|
117
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
118
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
119
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
120
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
121
|
+
--lumo-success-contrast-color: #fff;
|
|
122
|
+
|
|
123
|
+
/* Warning */
|
|
124
|
+
--lumo-warning-color: hsl(48, 100%, 50%);
|
|
125
|
+
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
|
126
|
+
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
|
127
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* forced-colors mode adjustments */
|
|
131
|
+
@media (forced-colors: active) {
|
|
132
|
+
html {
|
|
133
|
+
--lumo-disabled-text-color: GrayText;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
`),xt("",g`
|
|
137
|
+
[theme~='dark'] {
|
|
138
|
+
/* Base (background) */
|
|
139
|
+
--lumo-base-color: hsl(214, 35%, 21%);
|
|
140
|
+
|
|
141
|
+
/* Tint */
|
|
142
|
+
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
143
|
+
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
144
|
+
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
145
|
+
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
146
|
+
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
147
|
+
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
148
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
149
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
150
|
+
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
151
|
+
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
152
|
+
--lumo-tint: hsl(214, 100%, 98%);
|
|
153
|
+
|
|
154
|
+
/* Shade */
|
|
155
|
+
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
156
|
+
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
157
|
+
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
158
|
+
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
159
|
+
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
160
|
+
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
161
|
+
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
162
|
+
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
163
|
+
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
164
|
+
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
165
|
+
--lumo-shade: hsl(214, 33%, 13%);
|
|
166
|
+
|
|
167
|
+
/* Contrast */
|
|
168
|
+
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
169
|
+
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
170
|
+
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
171
|
+
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
172
|
+
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
173
|
+
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
174
|
+
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
175
|
+
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
176
|
+
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
177
|
+
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
178
|
+
--lumo-contrast: var(--lumo-tint);
|
|
179
|
+
|
|
180
|
+
/* Text */
|
|
181
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
182
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
183
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
184
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
185
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
186
|
+
|
|
187
|
+
/* Primary */
|
|
188
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
189
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
190
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
191
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
192
|
+
--lumo-primary-contrast-color: #fff;
|
|
193
|
+
|
|
194
|
+
/* Error */
|
|
195
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
|
196
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
197
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
198
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
199
|
+
|
|
200
|
+
/* Success */
|
|
201
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
202
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
203
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
204
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
205
|
+
|
|
206
|
+
/* Warning */
|
|
207
|
+
--lumo-warning-color: hsl(43, 100%, 48%);
|
|
208
|
+
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
|
209
|
+
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
|
210
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
html {
|
|
214
|
+
color: var(--lumo-body-text-color);
|
|
215
|
+
background-color: var(--lumo-base-color);
|
|
216
|
+
color-scheme: light;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
[theme~='dark'] {
|
|
220
|
+
color: var(--lumo-body-text-color);
|
|
221
|
+
background-color: var(--lumo-base-color);
|
|
222
|
+
color-scheme: dark;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
h1,
|
|
226
|
+
h2,
|
|
227
|
+
h3,
|
|
228
|
+
h4,
|
|
229
|
+
h5,
|
|
230
|
+
h6 {
|
|
231
|
+
color: var(--lumo-header-text-color);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
a:where(:any-link) {
|
|
235
|
+
color: var(--lumo-primary-text-color);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
a:not(:any-link) {
|
|
239
|
+
color: var(--lumo-disabled-text-color);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
blockquote {
|
|
243
|
+
color: var(--lumo-secondary-text-color);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
code,
|
|
247
|
+
pre {
|
|
248
|
+
background-color: var(--lumo-contrast-10pct);
|
|
249
|
+
border-radius: var(--lumo-border-radius-m);
|
|
250
|
+
}
|
|
251
|
+
`,{moduleId:"lumo-color"}),zt("sizing-props",g`
|
|
252
|
+
:host {
|
|
253
|
+
--lumo-size-xs: 1.625rem;
|
|
254
|
+
--lumo-size-s: 1.875rem;
|
|
255
|
+
--lumo-size-m: 2.25rem;
|
|
256
|
+
--lumo-size-l: 2.75rem;
|
|
257
|
+
--lumo-size-xl: 3.5rem;
|
|
258
|
+
|
|
259
|
+
/* Icons */
|
|
260
|
+
--lumo-icon-size-s: 1.25em;
|
|
261
|
+
--lumo-icon-size-m: 1.5em;
|
|
262
|
+
--lumo-icon-size-l: 2.25em;
|
|
263
|
+
/* For backwards compatibility */
|
|
264
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
265
|
+
}
|
|
266
|
+
`),g`
|
|
267
|
+
html {
|
|
268
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
269
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
270
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
271
|
+
}
|
|
272
|
+
`,zt("style-props",g`
|
|
273
|
+
:host {
|
|
274
|
+
/* Border radius */
|
|
275
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
276
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
277
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
278
|
+
|
|
279
|
+
/* Shadow */
|
|
280
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
281
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
282
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
283
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
284
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
285
|
+
|
|
286
|
+
/* Clickable element cursor */
|
|
287
|
+
--lumo-clickable-cursor: default;
|
|
288
|
+
}
|
|
289
|
+
`);
|
|
290
|
+
/**
|
|
291
|
+
* @license
|
|
292
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
293
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
294
|
+
*/
|
|
295
|
+
const Tt=g`
|
|
296
|
+
:host {
|
|
297
|
+
/* prettier-ignore */
|
|
298
|
+
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
299
|
+
|
|
300
|
+
/* Font sizes */
|
|
301
|
+
--lumo-font-size-xxs: 0.75rem;
|
|
302
|
+
--lumo-font-size-xs: 0.8125rem;
|
|
303
|
+
--lumo-font-size-s: 0.875rem;
|
|
304
|
+
--lumo-font-size-m: 1rem;
|
|
305
|
+
--lumo-font-size-l: 1.125rem;
|
|
306
|
+
--lumo-font-size-xl: 1.375rem;
|
|
307
|
+
--lumo-font-size-xxl: 1.75rem;
|
|
308
|
+
--lumo-font-size-xxxl: 2.5rem;
|
|
309
|
+
|
|
310
|
+
/* Line heights */
|
|
311
|
+
--lumo-line-height-xs: 1.25;
|
|
312
|
+
--lumo-line-height-s: 1.375;
|
|
313
|
+
--lumo-line-height-m: 1.625;
|
|
314
|
+
}
|
|
315
|
+
`;xt("",g`
|
|
316
|
+
body,
|
|
317
|
+
:host {
|
|
318
|
+
font-family: var(--lumo-font-family);
|
|
319
|
+
font-size: var(--lumo-font-size-m);
|
|
320
|
+
line-height: var(--lumo-line-height-m);
|
|
321
|
+
-webkit-text-size-adjust: 100%;
|
|
322
|
+
-webkit-font-smoothing: antialiased;
|
|
323
|
+
-moz-osx-font-smoothing: grayscale;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
small,
|
|
327
|
+
[theme~='font-size-s'] {
|
|
328
|
+
font-size: var(--lumo-font-size-s);
|
|
329
|
+
line-height: var(--lumo-line-height-s);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
[theme~='font-size-xs'] {
|
|
333
|
+
font-size: var(--lumo-font-size-xs);
|
|
334
|
+
line-height: var(--lumo-line-height-xs);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
338
|
+
font-weight: 600;
|
|
339
|
+
line-height: var(--lumo-line-height-xs);
|
|
340
|
+
margin-block: 0;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
:where(h1) {
|
|
344
|
+
font-size: var(--lumo-font-size-xxxl);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
:where(h2) {
|
|
348
|
+
font-size: var(--lumo-font-size-xxl);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
:where(h3) {
|
|
352
|
+
font-size: var(--lumo-font-size-xl);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
:where(h4) {
|
|
356
|
+
font-size: var(--lumo-font-size-l);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
:where(h5) {
|
|
360
|
+
font-size: var(--lumo-font-size-m);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
:where(h6) {
|
|
364
|
+
font-size: var(--lumo-font-size-xs);
|
|
365
|
+
text-transform: uppercase;
|
|
366
|
+
letter-spacing: 0.03em;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
p,
|
|
370
|
+
blockquote {
|
|
371
|
+
margin-top: 0.5em;
|
|
372
|
+
margin-bottom: 0.75em;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
a {
|
|
376
|
+
text-decoration: none;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
a:where(:any-link):hover {
|
|
380
|
+
text-decoration: underline;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
hr {
|
|
384
|
+
display: block;
|
|
385
|
+
align-self: stretch;
|
|
386
|
+
height: 1px;
|
|
387
|
+
border: 0;
|
|
388
|
+
padding: 0;
|
|
389
|
+
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
|
390
|
+
background-color: var(--lumo-contrast-10pct);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
blockquote {
|
|
394
|
+
border-left: 2px solid var(--lumo-contrast-30pct);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
b,
|
|
398
|
+
strong {
|
|
399
|
+
font-weight: 600;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/* RTL specific styles */
|
|
403
|
+
blockquote[dir='rtl'] {
|
|
404
|
+
border-left: none;
|
|
405
|
+
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
406
|
+
}
|
|
407
|
+
`,{moduleId:"lumo-typography"}),zt("typography-props",Tt),xt("vaadin-input-container",g`
|
|
408
|
+
:host {
|
|
409
|
+
background-color: var(--lumo-contrast-10pct);
|
|
410
|
+
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
411
|
+
font-weight: 500;
|
|
412
|
+
line-height: 1;
|
|
413
|
+
position: relative;
|
|
414
|
+
cursor: text;
|
|
415
|
+
box-sizing: border-box;
|
|
416
|
+
border-radius:
|
|
417
|
+
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#syntax */
|
|
418
|
+
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
|
419
|
+
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
|
420
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius))
|
|
421
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius));
|
|
422
|
+
/* Fallback */
|
|
423
|
+
--_input-container-radius: var(--vaadin-input-field-border-radius, var(--lumo-border-radius-m));
|
|
424
|
+
/* Default field border color */
|
|
425
|
+
--_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
:host([dir='rtl']) {
|
|
429
|
+
border-radius:
|
|
430
|
+
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
431
|
+
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
|
432
|
+
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
|
433
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius))
|
|
434
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius));
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/* Used for hover and activation effects */
|
|
438
|
+
:host::after {
|
|
439
|
+
content: '';
|
|
440
|
+
position: absolute;
|
|
441
|
+
inset: 0;
|
|
442
|
+
border-radius: inherit;
|
|
443
|
+
pointer-events: none;
|
|
444
|
+
background-color: var(--lumo-contrast-50pct);
|
|
445
|
+
opacity: 0;
|
|
446
|
+
transition: transform 0.15s, opacity 0.2s;
|
|
447
|
+
transform-origin: 100% 0;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
::slotted(:not([slot$='fix'])) {
|
|
451
|
+
cursor: inherit;
|
|
452
|
+
min-height: var(--lumo-text-field-size, var(--lumo-size-m));
|
|
453
|
+
padding: 0 0.25em;
|
|
454
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
455
|
+
-webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
456
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/* Read-only */
|
|
460
|
+
:host([readonly]) {
|
|
461
|
+
color: var(--lumo-secondary-text-color);
|
|
462
|
+
background-color: transparent;
|
|
463
|
+
cursor: default;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
:host([readonly])::after {
|
|
467
|
+
background-color: transparent;
|
|
468
|
+
opacity: 1;
|
|
469
|
+
border: 1px dashed var(--lumo-contrast-30pct);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/* Disabled */
|
|
473
|
+
:host([disabled]) {
|
|
474
|
+
background-color: var(--lumo-contrast-5pct);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
:host([disabled]) ::slotted(*) {
|
|
478
|
+
color: var(--lumo-disabled-text-color);
|
|
479
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/* Invalid */
|
|
483
|
+
:host([invalid]) {
|
|
484
|
+
background-color: var(--lumo-error-color-10pct);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
:host([invalid])::after {
|
|
488
|
+
background-color: var(--lumo-error-color-50pct);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/* Slotted icons */
|
|
492
|
+
::slotted(vaadin-icon) {
|
|
493
|
+
color: var(--lumo-contrast-60pct);
|
|
494
|
+
width: var(--lumo-icon-size-m);
|
|
495
|
+
height: var(--lumo-icon-size-m);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
499
|
+
::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
500
|
+
padding: 0.25em;
|
|
501
|
+
box-sizing: border-box !important;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/* Text align */
|
|
505
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
506
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
@-moz-document url-prefix() {
|
|
510
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
511
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
516
|
+
text-align: start;
|
|
517
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
:host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
|
|
521
|
+
text-align: center;
|
|
522
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
526
|
+
text-align: end;
|
|
527
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
@-moz-document url-prefix() {
|
|
531
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
532
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
533
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
@-moz-document url-prefix() {
|
|
538
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
539
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
540
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/* RTL specific styles */
|
|
545
|
+
:host([dir='rtl'])::after {
|
|
546
|
+
transform-origin: 0% 0;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
550
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
:host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
554
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
558
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
@-moz-document url-prefix() {
|
|
562
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
563
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
564
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
@-moz-document url-prefix() {
|
|
569
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
570
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
571
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
`,{moduleId:"lumo-input-container"}),
|
|
575
|
+
/**
|
|
576
|
+
@license
|
|
577
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
578
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
579
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
580
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
581
|
+
Code distributed by Google as part of the polymer project is also
|
|
582
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
583
|
+
*/
|
|
584
|
+
window.JSCompiler_renameProperty=function(t){return t};
|
|
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
|
+
*/
|
|
594
|
+
let Nt,It,Bt=/(url\()([^)]*)(\))/g,Pt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Et(t,e){if(t&&Pt.test(t))return t;if("//"===t)return t;if(void 0===Nt){Nt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Nt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Nt)try{return new URL(t,e).href}catch(e){return t}return It||(It=document.implementation.createHTMLDocument("temp"),It.base=It.createElement("base"),It.head.appendChild(It.base),It.anchor=It.createElement("a"),It.body.appendChild(It.anchor)),It.base.href=e,It.anchor.href=t,It.anchor.href||t}function Mt(t,e){return t.replace(Bt,(function(t,o,i,s){return o+"'"+Et(i.replace(/["']/g,""),e)+"'"+s}))}function Ot(t){return t.substring(0,t.lastIndexOf("/")+1)}
|
|
595
|
+
/**
|
|
596
|
+
@license
|
|
597
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
598
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
599
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
600
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
601
|
+
Code distributed by Google as part of the polymer project is also
|
|
602
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
603
|
+
*/const Dt=(!window.ShadyDOM||!window.ShadyDOM.inUse)&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let jt=window.Polymer&&window.Polymer.rootPath||Ot(document.baseURI||window.location.href),Ut=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Ft=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Rt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Lt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Wt=window.Polymer&&window.Polymer.legacyWarnings||!1,Gt=window.Polymer&&window.Polymer.syncInitialRender||!1,qt=window.Polymer&&window.Polymer.legacyUndefined||!1,Yt=window.Polymer&&window.Polymer.orderedComputed||!1,Ht=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Zt=window.Polymer&&window.Polymer.fastDomIf||!1,Jt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,Kt=0;const Vt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let o=Kt++;return function(i){let s=i.__mixinSet;if(s&&s[o])return i;let r=e,n=r.get(i);if(!n){n=t(i),r.set(i,n);let e=Object.create(n.__mixinSet||s||null);e[o]=!0,n.__mixinSet=e}return n}};
|
|
604
|
+
/**
|
|
605
|
+
@license
|
|
606
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
607
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
608
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
609
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
610
|
+
Code distributed by Google as part of the polymer project is also
|
|
611
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
612
|
+
*/let Qt={},Xt={};function $t(t,e){Qt[t]=Xt[t.toLowerCase()]=e}function te(t){return Qt[t]||Xt[t.toLowerCase()]}class ee extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let o=te(t);return o&&e?o.querySelector(e):o}return null}attributeChangedCallback(t,e,o,i){e!==o&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Et(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Ot(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Ft&&void 0!==te(t))throw $t(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,$t(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}ee.prototype.modules=Qt,customElements.define("dom-module",ee);
|
|
613
|
+
/**
|
|
614
|
+
@license
|
|
615
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
616
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
617
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
618
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
619
|
+
Code distributed by Google as part of the polymer project is also
|
|
620
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
621
|
+
*/
|
|
622
|
+
const oe="link[rel=import][type~=css]",ie="include",se="shady-unscoped";function re(t){return ee.import(t)}function ne(t){const e=Mt((t.body?t.body:t).textContent,t.baseURI),o=document.createElement("style");return o.textContent=e,o}function ae(t){const e=t.trim().split(/\s+/),o=[];for(let t=0;t<e.length;t++)o.push(...le(e[t]));return o}function le(t){const e=re(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...he(e));const o=e.querySelector("template");o&&t.push(...ce(o,e.assetpath)),e._styles=t}return e._styles}function ce(t,e){if(!t._styles){const o=[],i=t.content.querySelectorAll("style");for(let t=0;t<i.length;t++){let s=i[t],r=s.getAttribute(ie);r&&o.push(...ae(r).filter((function(t,e,o){return o.indexOf(t)===e}))),e&&(s.textContent=Mt(s.textContent,e)),o.push(s)}t._styles=o}return t._styles}function he(t){const e=[],o=t.querySelectorAll(oe);for(let t=0;t<o.length;t++){let i=o[t];if(i.import){const t=i.import,o=i.hasAttribute(se);if(o&&!t._unscopedStyle){const e=ne(t);e.setAttribute(se,""),t._unscopedStyle=e}else t._style||(t._style=ne(t));e.push(o?t._unscopedStyle:t._style)}}return e}
|
|
623
|
+
/**
|
|
624
|
+
@license
|
|
625
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
626
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
627
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
628
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
629
|
+
Code distributed by Google as part of the polymer project is also
|
|
630
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
631
|
+
*/const ue=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
|
|
632
|
+
/**
|
|
633
|
+
@license
|
|
634
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
635
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
636
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
637
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
638
|
+
Code distributed by Google as part of the polymer project is also
|
|
639
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
640
|
+
*/function de(t){return t.indexOf(".")>=0}function me(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function pe(t,e){return 0===e.indexOf(t+".")}function fe(t,e,o){return e+o.slice(t.length)}function ve(t){if(Array.isArray(t)){let e=[];for(let o=0;o<t.length;o++){let i=t[o].toString().split(".");for(let t=0;t<i.length;t++)e.push(i[t])}return e.join(".")}return t}function be(t){return Array.isArray(t)?ve(t).split("."):t.toString().split(".")}function ge(t,e,o){let i=t,s=be(e);for(let t=0;t<s.length;t++){if(!i)return;i=i[s[t]]}return o&&(o.path=s.join(".")),i}function ye(t,e,o){let i=t,s=be(e),r=s[s.length-1];if(s.length>1){for(let t=0;t<s.length-1;t++)if(i=i[s[t]],!i)return;i[r]=o}else i[e]=o;return s.join(".")}
|
|
641
|
+
/**
|
|
642
|
+
@license
|
|
643
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
644
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
645
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
646
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
647
|
+
Code distributed by Google as part of the polymer project is also
|
|
648
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
649
|
+
*/const xe={},we=/-[a-z]/g,Ae=/([A-Z])/g;function ke(t){return xe[t]||(xe[t]=t.indexOf("-")<0?t:t.replace(we,(t=>t[1].toUpperCase())))}function _e(t){return xe[t]||(xe[t]=t.replace(Ae,"-$1").toLowerCase())}
|
|
650
|
+
/**
|
|
651
|
+
@license
|
|
652
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
653
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
654
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
655
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
656
|
+
Code distributed by Google as part of the polymer project is also
|
|
657
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
658
|
+
*/let Ce=0,Se=0,ze=[],Te=0,Ne=!1,Ie=document.createTextNode("");new window.MutationObserver((function(){Ne=!1;const t=ze.length;for(let e=0;e<t;e++){let t=ze[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ze.splice(0,t),Se+=t})).observe(Ie,{characterData:!0});const Be={run:t=>(Ne||(Ne=!0,Ie.textContent=Te++),ze.push(t),Ce++),cancel(t){const e=t-Se;if(e>=0){if(!ze[e])throw new Error("invalid async handle: "+t);ze[e]=null}}},Pe=Vt((t=>class extends t{static createProperties(t){const e=this.prototype;for(let o in t)o in e||e._createPropertyAccessor(o)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,o){let i=this.__data[t],s=this._shouldPropertyChange(t,e,i);return s&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=i),this.__data[t]=e,this.__dataPending[t]=e),s}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Be.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,o=this.__dataOld;this._shouldPropertiesChange(t,e,o)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,o)),this.__dataCounter--}_shouldPropertiesChange(t,e,o){return Boolean(e)}_propertiesChanged(t,e,o){}_shouldPropertyChange(t,e,o){return o!==e&&(o==o||e==e)}attributeChangedCallback(t,e,o,i){e!==o&&this._attributeToProperty(t,o),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,o,i)}_attributeToProperty(t,e,o){if(!this.__serializing){const i=this.__dataAttributes,s=i&&i[t]||t;this[s]=this._deserializeValue(e,o||this.constructor.typeForProperty(s))}}_propertyToAttribute(t,e,o){this.__serializing=!0,this._valueToNodeAttribute(this,o=arguments.length<3?this[t]:o,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,o){const i=this._serializeValue(e);"class"!==o&&"name"!==o&&"slot"!==o||(t=ue(t)),void 0===i?t.removeAttribute(o):t.setAttribute(o,""===i&&window.trustedTypes?window.trustedTypes.emptyScript:i)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Ee={};
|
|
659
|
+
/**
|
|
660
|
+
@license
|
|
661
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
662
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
663
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
664
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
665
|
+
Code distributed by Google as part of the polymer project is also
|
|
666
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
667
|
+
*/let Me=HTMLElement.prototype;for(;Me;){let t=Object.getOwnPropertyNames(Me);for(let e=0;e<t.length;e++)Ee[t[e]]=!0;Me=Object.getPrototypeOf(Me)}const Oe=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,De=Vt((t=>{const e=Pe(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(ke(t[e]))}static attributeNameForProperty(t){return _e(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(Oe(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let o;switch(e){case Object:try{o=JSON.parse(t)}catch(e){o=t}break;case Array:try{o=JSON.parse(t)}catch(e){o=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:o=isNaN(t)?String(t):Number(t),o=new Date(o);break;default:o=super._deserializeValue(t,e)}return o}_definePropertyAccessor(t,e){!function(t,e){if(!Ee[e]){let o=t[e];void 0!==o&&(t.__data?t._setPendingProperty(e,o):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=o))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),je={"dom-if":!0,"dom-repeat":!0};let Ue=!1,Fe=!1;const Re=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,o,i)=>{const s=o.getAttribute(i);t&&i.startsWith("on-")?e.setAttribute(i,t.createScript(s,i)):e.setAttribute(i,s)}})();function Le(t){let e=t.getAttribute("is");if(e&&je[e]){let o=t;for(o.removeAttribute("is"),t=o.ownerDocument.createElement(e),o.parentNode.replaceChild(t,o),t.appendChild(o);o.attributes.length;){const{name:e}=o.attributes[0];Re(t,o,e),o.removeAttribute(e)}}return t}function We(t,e){let o=e.parentInfo&&We(t,e.parentInfo);if(!o)return t;for(let t=o.firstChild,i=0;t;t=t.nextSibling)if(e.parentIndex===i++)return t}function Ge(t,e,o,i){i.id&&(e[i.id]=o)}function qe(t,e,o){if(o.events&&o.events.length)for(let i,s=0,r=o.events;s<r.length&&(i=r[s]);s++)t._addMethodEventListenerToNode(e,i.name,i.value,t)}function Ye(t,e,o,i){o.templateInfo&&(e._templateInfo=o.templateInfo,e._parentTemplateInfo=i)}const He=Vt((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let o=t._templateInfo={};o.nodeInfoList=[],o.nestedTemplate=Boolean(e),o.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,o,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,o){return this._parseTemplateNode(t.content,e,o)}static _parseTemplateNode(t,e,o){let i=!1,s=t;return"template"!=s.localName||s.hasAttribute("preserve-content")?"slot"===s.localName&&(e.hasInsertionPoint=!0):i=this._parseTemplateNestedTemplate(s,e,o)||i,function(t){(function(){if(!Ue){Ue=!0;const t=document.createElement("textarea");t.placeholder="a",Fe=t.placeholder===t.textContent}return Fe})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(s),s.firstChild&&this._parseTemplateChildNodes(s,e,o),s.hasAttributes&&s.hasAttributes()&&(i=this._parseTemplateNodeAttributes(s,e,o)||i),i||o.noted}static _parseTemplateChildNodes(t,e,o){if("script"!==t.localName&&"style"!==t.localName)for(let i,s=t.firstChild,r=0;s;s=i){if("template"==s.localName&&(s=Le(s)),i=s.nextSibling,s.nodeType===Node.TEXT_NODE){let o=i;for(;o&&o.nodeType===Node.TEXT_NODE;)s.textContent+=o.textContent,i=o.nextSibling,t.removeChild(o),o=i;if(e.stripWhiteSpace&&!s.textContent.trim()){t.removeChild(s);continue}}let n={parentIndex:r,parentInfo:o};this._parseTemplateNode(s,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),s.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,o){let i=t,s=this._parseTemplate(i,e);return(s.content=i.content.ownerDocument.createDocumentFragment()).appendChild(i.content),o.templateInfo=s,!0}static _parseTemplateNodeAttributes(t,e,o){let i=!1,s=Array.from(t.attributes);for(let r,n=s.length-1;r=s[n];n--)i=this._parseTemplateNodeAttribute(t,e,o,r.name,r.value)||i;return i}static _parseTemplateNodeAttribute(t,e,o,i,s){return"on-"===i.slice(0,3)?(t.removeAttribute(i),o.events=o.events||[],o.events.push({name:i.slice(3),value:s}),!0):"id"===i&&(o.id=s,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let o=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,i=document.importNode(e.content||t.content,!0);i.__noInsertionPoint=!e.hasInsertionPoint;let s=i.nodeList=new Array(o.length);i.$={};for(let t,r=0,n=o.length;r<n&&(t=o[r]);r++){let o=s[r]=We(i,t);Ge(0,i.$,o,t),Ye(0,o,t,e),qe(this,o,t)}return i}_addMethodEventListenerToNode(t,e,o,i){let s=function(t,e,o){return t=t._methodHost||t,function(e){t[o]?t[o](e,e.detail):console.warn("listener method `"+o+"` not defined")}}(i=i||t,0,o);return this._addEventListenerToNode(t,e,s),s}_addEventListenerToNode(t,e,o){t.addEventListener(e,o)}_removeEventListenerFromNode(t,e,o){t.removeEventListener(e,o)}}));
|
|
668
|
+
/**
|
|
669
|
+
* @fileoverview
|
|
670
|
+
* @suppress {checkPrototypalTypes}
|
|
671
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
672
|
+
* This code may only be used under the BSD style license found at
|
|
673
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
674
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
675
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
676
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
677
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
678
|
+
*/let Ze=0;const Je=[],Ke={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ve="__computeInfo",Qe=/[A-Z]/;function Xe(t,e,o){let i=t[e];if(i){if(!t.hasOwnProperty(e)&&(i=t[e]=Object.create(t[e]),o))for(let t in i){let e=i[t],o=i[t]=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]}}else i=t[e]={};return i}function $e(t,e,o,i,s,r){if(e){let n=!1;const a=Ze++;for(let l in o){let c=e[s?me(l):l];if(c)for(let e,h=0,u=c.length;h<u&&(e=c[h]);h++)e.info&&e.info.lastRun===a||s&&!eo(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,o,i,e.info,s,r),n=!0)}return n}return!1}function to(t,e,o,i,s,r,n,a){let l=!1,c=e[n?me(i):i];if(c)for(let e,h=0,u=c.length;h<u&&(e=c[h]);h++)e.info&&e.info.lastRun===o||n&&!eo(i,e.trigger)||(e.info&&(e.info.lastRun=o),e.fn(t,i,s,r,e.info,n,a),l=!0);return l}function eo(t,e){if(e){let o=e.name;return o==t||!(!e.structured||!function(t,e){return 0===t.indexOf(e+".")}(o,t))||!(!e.wildcard||!pe(o,t))}return!0}function oo(t,e,o,i,s){let r="string"==typeof s.method?t[s.method]:s.method,n=s.property;r?r.call(t,t.__data[n],i[n]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function io(t,e,o){let i=me(e);return i!==e&&(so(t,_e(i)+"-changed",o[e],e),!0)}function so(t,e,o,i){let s={value:o,queueProperty:!0};i&&(s.path=i),ue(t).dispatchEvent(new CustomEvent(e,{detail:s}))}function ro(t,e,o,i,s,r){let n=(r?me(e):e)!=e?e:null,a=n?ge(t,n):t.__data[e];n&&void 0===a&&(a=o[e]),so(t,s.eventName,a,n)}function no(t,e,o,i,s){let r=t.__data[e];Ut&&(r=Ut(r,s.attrName,"attribute",t)),t._propertyToAttribute(e,s.attrName,r)}const ao=(t,e,o)=>{let i=0,s=e.length-1,r=-1;for(;i<=s;){const n=i+s>>1,a=o.get(e[n].methodInfo)-o.get(t.methodInfo);if(a<0)i=n+1;else{if(!(a>0)){r=n;break}s=n-1}}r<0&&(r=s+1),e.splice(r,0,t)},lo=(t,e,o,i,s)=>{const r=e[s?me(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===Ze||s&&!eo(t,n.trigger)||(n.info.lastRun=Ze,ao(n.info,o,i))}};function co(t,e,o,i,s){let r=bo(t,e,o,0,s);if(r===Je)return!1;let n=s.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function ho(t,e,o,i,s,r,n){o.bindings=o.bindings||[];let a={kind:i,target:s,parts:r,literal:n,isCompound:1!==r.length};if(o.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||_e(s)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let o=0;o<a.parts.length;o++){let i=a.parts[o];i.compoundIndex=o,uo(t,e,a,i,l)}}function uo(t,e,o,i,s){if(!i.literal)if("attribute"===o.kind&&"-"===o.target[0])console.warn("Cannot set attribute "+o.target+' because "-" is not a valid attribute starting character');else{let r=i.dependencies,n={index:s,binding:o,part:i,evaluator:t};for(let o=0;o<r.length;o++){let i=r[o];"string"==typeof i&&(i=_o(i),i.wildcard=!0),t._addTemplatePropertyEffect(e,i.rootProperty,{fn:mo,info:n,trigger:i})}}}function mo(t,e,o,i,s,r,n){let a=n[s.index],l=s.binding,c=s.part;if(r&&c.source&&e.length>c.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let i=o[e];e=fe(c.source,l.target,e),a._setPendingPropertyOrPath(e,i,!1,!0)&&t._enqueueClient(a)}else{let n=s.evaluator._evaluateBinding(t,c,e,o,i,r);n!==Je&&function(t,e,o,i,s){if(s=function(t,e,o,i){if(o.isCompound){let s=t.__dataCompoundStorage[o.target];s[i.compoundIndex]=e,e=s.join("")}return"attribute"!==o.kind&&("textContent"!==o.target&&("value"!==o.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,s,o,i),Ut&&(s=Ut(s,o.target,o.kind,e)),"attribute"==o.kind)t._valueToNodeAttribute(e,s,o.target);else{let i=o.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[i]?e[Ke.READ_ONLY]&&e[Ke.READ_ONLY][i]||e._setPendingProperty(i,s)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,i,s)}}(t,a,l,c,n)}}function po(t,e){if(e.isCompound){let o=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),i=e.parts,s=new Array(i.length);for(let t=0;t<i.length;t++)s[t]=i[t].literal;let r=e.target;o[r]=s,e.literal&&"property"==e.kind&&("className"===r&&(t=ue(t)),t[r]=e.literal)}}function fo(t,e,o){if(o.listenerEvent){let i=o.parts[0];t.addEventListener(o.listenerEvent,(function(t){!function(t,e,o,i,s){let r,n=t.detail,a=n&&n.path;a?(i=fe(o,i,a),r=n&&n.value):r=t.currentTarget[o],r=s?!r:r,e[Ke.READ_ONLY]&&e[Ke.READ_ONLY][i]||!e._setPendingPropertyOrPath(i,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,o.target,i.source,i.negate)}))}}function vo(t,e,o,i,s,r){let n={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let s,r=0;r<e.args.length&&(s=e.args[r]);r++)s.literal||t._addPropertyEffect(s.rootProperty,o,{fn:i,info:n,trigger:s});return r&&t._addPropertyEffect(e.methodName,o,{fn:i,info:n}),n}function bo(t,e,o,i,s){let r=t._methodHost||t,n=r[s.methodName];if(n){let i=t._marshalArgs(s.args,e,o);return i===Je?Je:n.apply(r,i)}s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const go=[],yo="(?:[a-zA-Z_$][\\w.:$\\-*]*)",xo="(?:("+yo+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",wo=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+yo+"\\s*(?:\\(\\s*(?:(?:"+xo+"(?:,\\s*"+xo+")*)?)\\)\\s*)?)(?:]]|}})","g");function Ao(t){let e="";for(let o=0;o<t.length;o++)e+=t[o].literal||"";return e}function ko(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:go};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let o=_o(t);return o.literal||(e.static=!1),o}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function _o(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),o={name:e,value:"",literal:!1},i=e[0];switch("-"===i&&(i=e[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':o.value=e.slice(1,-1),o.literal=!0;break;case"#":o.value=Number(e),o.literal=!0}return o.literal||(o.rootProperty=me(e),o.structured=de(e),o.structured&&(o.wildcard=".*"==e.slice(-2),o.wildcard&&(o.name=e.slice(0,-2)))),o}function Co(t,e,o){let i=ge(t,o);return void 0===i&&(i=e[o]),i}function So(t,e,o,i){const s={indexSplices:i};qt&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(o+".splices",s),t.notifyPath(o+".length",e.length),qt&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function zo(t,e,o,i,s,r){So(t,e,o,[{index:i,addedCount:s,removed:r,object:e,type:"splice"}])}const To=Vt((t=>{const e=He(De(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Ke}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(No.length){let t=No[No.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[Ke.READ_ONLY];for(let o in t)e&&e[o]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[o]=this.__dataPending[o]=t[o])}_addPropertyEffect(t,e,o){this._createPropertyAccessor(t,e==Ke.READ_ONLY);let i=Xe(this,e,!0)[t];i||(i=this[e][t]=[]),i.push(o)}_removePropertyEffect(t,e,o){let i=Xe(this,e,!0)[t],s=i.indexOf(o);s>=0&&i.splice(s,1)}_hasPropertyEffect(t,e){let o=this[e];return Boolean(o&&o[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Ke.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Ke.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Ke.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Ke.COMPUTE)}_setPendingPropertyOrPath(t,e,o,i){if(i||me(Array.isArray(t)?t[0]:t)!==t){if(!i){let o=ge(this,t);if(!(t=ye(this,t,e))||!super._shouldPropertyChange(t,e,o))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,o))return function(t,e,o){let i=t.__dataLinkedPaths;if(i){let s;for(let r in i){let n=i[r];pe(r,e)?(s=fe(r,n,e),t._setPendingPropertyOrPath(s,o,!0,!0)):pe(n,e)&&(s=fe(n,r,e),t._setPendingPropertyOrPath(s,o,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,o);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,o){o===t[e]&&"object"!=typeof o||("className"===e&&(t=ue(t)),t[e]=o)}_setPendingProperty(t,e,o){let i=this.__dataHasPaths&&de(t);return!!this._shouldPropertyChange(t,e,(i?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),i?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(i||this[Ke.NOTIFY]&&this[Ke.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=o),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let o=t[e];o.__dataEnabled?o.__dataPending&&o._flushProperties():o._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let o in t)!e&&this[Ke.READ_ONLY]&&this[Ke.READ_ONLY][o]||this._setPendingPropertyOrPath(o,t[o],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,o){let i,s=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,o,i){let s=t[Ke.COMPUTE];if(s)if(Yt){Ze++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const o=t[Ke.COMPUTE];let i,{counts:s,ready:r,total:n}=function(t){const e=t[Ve],o={},i=t[Ke.COMPUTE],s=[];let r=0;for(let t in e){const i=e[t];r+=o[t]=i.args.filter((t=>!t.literal)).length+(i.dynamicFn?1:0)}for(let t in i)e[t]||s.push(t);return{counts:o,ready:s,total:r}}(t);for(;i=r.shift();){e.set(i,e.size);const t=o[i];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--s[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)lo(t,s,n,r,i);let a;for(;a=n.shift();)co(t,"",e,0,a)&&lo(a.methodInfo,s,n,r,i);Object.assign(o,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;$e(t,s,r,o,i);)Object.assign(o,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,o,s),i=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,o,s),this._flushClients(),$e(this,this[Ke.REFLECT],e,o,s),$e(this,this[Ke.OBSERVE],e,o,s),i&&function(t,e,o,i,s){let r,n,a=t[Ke.NOTIFY],l=Ze++;for(let n in e)e[n]&&(a&&to(t,a,l,n,o,i,s)||s&&io(t,n,o))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,i,e,o,s),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,o){this[Ke.PROPAGATE]&&$e(this,this[Ke.PROPAGATE],t,e,o),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,o)}_runEffectsForTemplate(t,e,o,i){const s=(e,i)=>{$e(this,t.propertyEffects,e,o,i,t.nodeList);for(let s=t.firstChild;s;s=s.nextSibling)this._runEffectsForTemplate(s,e,o,i)};t.runEffects?t.runEffects(s,e,i):s(e,i)}linkPaths(t,e){t=ve(t),e=ve(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=ve(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let o={path:""};So(this,ge(this,t,o),o.path,e)}get(t,e){return ge(e||this,t)}set(t,e,o){o?ye(o,t,e):this[Ke.READ_ONLY]&&this[Ke.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let o={path:""},i=ge(this,t,o),s=i.length,r=i.push(...e);return e.length&&zo(this,i,o.path,s,e.length,[]),r}pop(t){let e={path:""},o=ge(this,t,e),i=Boolean(o.length),s=o.pop();return i&&zo(this,o,e.path,o.length,0,[s]),s}splice(t,e,o,...i){let s,r={path:""},n=ge(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),s=2===arguments.length?n.splice(e):n.splice(e,o,...i),(i.length||s.length)&&zo(this,n,r.path,e,i.length,s),s}shift(t){let e={path:""},o=ge(this,t,e),i=Boolean(o.length),s=o.shift();return i&&zo(this,o,e.path,0,0,[s]),s}unshift(t,...e){let o={path:""},i=ge(this,t,o),s=i.unshift(...e);return e.length&&zo(this,i,o.path,0,e.length,[]),s}notifyPath(t,e){let o;if(1==arguments.length){let i={path:""};e=ge(this,t,i),o=i.path}else o=Array.isArray(t)?ve(t):t;this._setPendingPropertyOrPath(o,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var o;this._addPropertyEffect(t,Ke.READ_ONLY),e&&(this["_set"+(o=t,o[0].toUpperCase()+o.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,o){let i={property:t,method:e,dynamicFn:Boolean(o)};this._addPropertyEffect(t,Ke.OBSERVE,{fn:oo,info:i,trigger:{name:t}}),o&&this._addPropertyEffect(e,Ke.OBSERVE,{fn:oo,info:i,trigger:{name:e}})}_createMethodObserver(t,e){let o=ko(t);if(!o)throw new Error("Malformed observer expression '"+t+"'");vo(this,o,Ke.OBSERVE,bo,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Ke.NOTIFY,{fn:ro,info:{eventName:_e(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Ke.REFLECT,{fn:no,info:{attrName:e}})}_createComputedProperty(t,e,o){let i=ko(e);if(!i)throw new Error("Malformed computed expression '"+e+"'");const s=vo(this,i,Ke.COMPUTE,co,t,o);Xe(this,Ve)[t]=s}_marshalArgs(t,e,o){const i=this.__data,s=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:c,literal:h}=t[r];if(!h)if(l){const t=pe(n,e),s=Co(i,o,t?e:n);c={path:t?e:n,value:s,base:t?ge(i,n):s}}else c=a?Co(i,o,n):i[n];if(qt&&!this._overrideLegacyUndefined&&void 0===c&&t.length>1)return Je;s[r]=c}return s}static addPropertyEffect(t,e,o){this.prototype._addPropertyEffect(t,e,o)}static createPropertyObserver(t,e,o){this.prototype._createPropertyObserver(t,e,o)}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,o){this.prototype._createComputedProperty(t,e,o)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let o=this.constructor._parseTemplate(t),i=this.__preBoundTemplateInfo==o;if(!i)for(let t in o.propertyEffects)this._createPropertyAccessor(t);if(e)if(o=Object.create(o),o.wasPreBound=i,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,i=e.lastChild;o.parent=e,e.lastChild=o,o.previousSibling=i,i?i.nextSibling=o:e.firstChild=o}else this.__templateInfo=o;else this.__preBoundTemplateInfo=o;return o}static _addTemplatePropertyEffect(t,e,o){(t.hostProps=t.hostProps||{})[e]=!0;let i=t.propertyEffects=t.propertyEffects||{};(i[e]=i[e]||[]).push(o)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),No.push(this);let o=super._stampTemplate(t,e);if(No.pop(),e.nodeList=o.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=o.firstChild;e;e=e.nextSibling)t.push(e)}return o.templateInfo=e,function(t,e){let{nodeList:o,nodeInfoList:i}=e;if(i.length)for(let e=0;e<i.length;e++){let s=o[e],r=i[e].bindings;if(r)for(let e=0;e<r.length;e++){let o=r[e];po(s,o),fo(s,t,o)}s.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),o}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:o,nextSibling:i,parent:s}=e;o?o.nextSibling=i:s&&(s.firstChild=i),i?i.previousSibling=o:s&&(s.lastChild=o),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];ue(ue(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,o,i){let s=e._parseTemplateNode.call(this,t,o,i);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,o);e&&(t.textContent=Ao(e)||" ",ho(this,o,i,"text","textContent",e),s=!0)}return s}static _parseTemplateNodeAttribute(t,o,i,s,r){let n=this._parseBindings(r,o);if(n){let e=s,r="property";Qe.test(s)?r="attribute":"$"==s[s.length-1]&&(s=s.slice(0,-1),r="attribute");let a=Ao(n);return a&&"attribute"==r&&("class"==s&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(s)),t.setAttribute(s,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(s,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(s=ke(s)),ho(this,o,i,r,s,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,o,i,s,r)}static _parseTemplateNestedTemplate(t,o,i){let s=e._parseTemplateNestedTemplate.call(this,t,o,i);const r=t.parentNode,n=i.templateInfo,a="dom-if"===r.localName;Ht&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(i=i.parentInfo).templateInfo=n,i.noted=!0,s=!1);let l=n.hostProps;if(Zt&&a)l&&(o.hostProps=Object.assign(o.hostProps||{},l),Ht||(i.parentInfo.noted=!0));else{let t="{";for(let e in l)ho(this,o,i,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return s}static _parseBindings(t,e){let o,i=[],s=0;for(;null!==(o=wo.exec(t));){o.index>s&&i.push({literal:t.slice(s,o.index)});let r=o[1][0],n=Boolean(o[2]),a=o[3].trim(),l=!1,c="",h=-1;"{"==r&&(h=a.indexOf("::"))>0&&(c=a.substring(h+2),a=a.substring(0,h),l=!0);let u=ko(a),d=[];if(u){let{args:t,methodName:o}=u;for(let e=0;e<t.length;e++){let o=t[e];o.literal||d.push(o)}let i=e.dynamicFns;(i&&i[o]||u.static)&&(d.push(o),u.dynamicFn=!0)}else d.push(a);i.push({source:a,mode:r,negate:n,customEvent:l,signature:u,dependencies:d,event:c}),s=wo.lastIndex}if(s&&s<t.length){let e=t.substring(s);e&&i.push({literal:e})}return i.length?i:null}static _evaluateBinding(t,e,o,i,s,r){let n;return n=e.signature?bo(t,o,i,0,e.signature):o!=e.source?ge(t,e.source):r&&de(o)?ge(t,o):t.__data[o],e.negate&&(n=!n),n}}})),No=[],Io=Vt((t=>{const e=Pe(t);function o(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof s?e:null}function i(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const o=t.properties;o&&(e=
|
|
679
|
+
/**
|
|
680
|
+
@license
|
|
681
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
682
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
683
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
684
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
685
|
+
Code distributed by Google as part of the polymer project is also
|
|
686
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
687
|
+
*/
|
|
688
|
+
function(t){const e={};for(let o in t){const i=t[o];e[o]="function"==typeof i?{type:i}:i}return e}(o))}t.__ownProperties=e}return t.__ownProperties}class s 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=o(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=i(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=o(this);this.__properties=Object.assign({},t&&t._properties,i(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s})),Bo=window.ShadyCSS&&window.ShadyCSS.cssBuild,Po=Vt((t=>{const e=Io(To(t));function o(t,e,o,i){o.computed&&(o.readOnly=!0),o.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,o.computed,i)),o.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!o.computed):!1===o.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),o.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===o.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),o.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===o.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),o.observer&&t._createPropertyObserver(e,o.observer,i[o.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((o=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",o))||(o.__ownObservers=o.hasOwnProperty(JSCompiler_renameProperty("observers",o))?o.observers:null),o.__ownObservers);var o;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Lt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)o(this.prototype,e,t[e],t)}static createObservers(t,e){const o=this.prototype;for(let i=0;i<t.length;i++)o._createMethodObserver(t[i],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!Ft||Rt)&&(e=ee.import(t,"template"),Ft&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Ot(t.url);else{const t=ee.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=jt,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let o in e){let i=e[o];"value"in i&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[o]=i)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let o=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof o.value?o.value.call(this):o.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return Mt(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const o=this.importPath;(function(t,e,o,i){if(!Bo){const s=e.content.querySelectorAll("style"),r=ce(e),n=function(t){let e=re(t);return e?he(e):[]}(o),a=e.content.firstElementChild;for(let o=0;o<n.length;o++){let s=n[o];s.textContent=t._processStyleText(s.textContent,i),e.content.insertBefore(s,a)}let l=0;for(let e=0;e<r.length;e++){let o=r[e],n=s[l];n!==o?(o=o.cloneNode(!0),n.parentNode.insertBefore(o,n)):l++,o.textContent=t._processStyleText(o.textContent,i)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,o),Jt&&Bo&&Dt){const o=e.content.querySelectorAll("style");if(o){let e="";Array.from(o).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,o?Et(o):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=ue(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Gt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=Et(this.importPath)),Et(t,e)}static _parseTemplateContent(t,o,i){return o.dynamicFns=o.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,o,i)}static _addTemplatePropertyEffect(t,o,i){return!Wt||o in this._properties||i.info.part.signature&&i.info.part.signature.static||i.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${o}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,o,i)}}})),Eo=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Mo{constructor(t,e){jo(t,e);const o=e.reduce(((e,o,i)=>e+Oo(o)+t[i+1]),t[0]);this.value=o.toString()}toString(){return this.value}}function Oo(t){if(t instanceof Mo)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Do=function(t,...e){jo(t,e);const o=document.createElement("template");let i=e.reduce(((e,o,i)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Mo)return Oo(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(o)+t[i+1]),t[0]);return Eo&&(i=Eo.createHTML(i)),o.innerHTML=i,o},jo=(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")},Uo=Po(HTMLElement),Fo=[];function Ro(t,e,o=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=o&&t.removeAttribute("dir")}function Lo(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Lo();Fo.forEach((e=>{Ro(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Wo=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),Ro(this,Lo(),null))}attributeChangedCallback(t,e,o){if(super.attributeChangedCallback(t,e,o),"dir"!==t)return;const i=Lo(),s=o===i&&-1===Fo.indexOf(this),r=!o&&e&&-1===Fo.indexOf(this),n=o!==i&&e===i;s||r?(this.__subscribe(),Ro(this,i,o)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Fo.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,o){("dir"!==o||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,o)}_attributeToProperty(t,e,o){"dir"!==t||e?super._attributeToProperty(t,e,o):this.dir=""}__subscribe(){Fo.includes(this)||Fo.push(this)}__unsubscribe(){Fo.includes(this)&&Fo.splice(Fo.indexOf(this),1)}}
|
|
689
|
+
/**
|
|
690
|
+
* @license
|
|
691
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
692
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
693
|
+
*/;class Go extends(Ct(Wo(Uo))){static get is(){return"vaadin-input-container"}static get template(){return Do`
|
|
694
|
+
<style>
|
|
695
|
+
:host {
|
|
696
|
+
display: flex;
|
|
697
|
+
align-items: center;
|
|
698
|
+
flex: 0 1 auto;
|
|
699
|
+
border-radius:
|
|
700
|
+
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius */
|
|
701
|
+
var(--vaadin-input-field-top-start-radius, var(--__border-radius))
|
|
702
|
+
var(--vaadin-input-field-top-end-radius, var(--__border-radius))
|
|
703
|
+
var(--vaadin-input-field-bottom-end-radius, var(--__border-radius))
|
|
704
|
+
var(--vaadin-input-field-bottom-start-radius, var(--__border-radius));
|
|
705
|
+
--_border-radius: var(--vaadin-input-field-border-radius, 0px);
|
|
706
|
+
--_input-border-width: var(--vaadin-input-field-border-width, 0);
|
|
707
|
+
--_input-border-color: var(--vaadin-input-field-border-color, transparent);
|
|
708
|
+
box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
:host([dir='rtl']) {
|
|
712
|
+
border-radius:
|
|
713
|
+
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
714
|
+
var(--vaadin-input-field-top-end-radius, var(--_border-radius))
|
|
715
|
+
var(--vaadin-input-field-top-start-radius, var(--_border-radius))
|
|
716
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_border-radius))
|
|
717
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_border-radius));
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
:host([hidden]) {
|
|
721
|
+
display: none !important;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/* Reset the native input styles */
|
|
725
|
+
::slotted(input) {
|
|
726
|
+
-webkit-appearance: none;
|
|
727
|
+
-moz-appearance: none;
|
|
728
|
+
flex: auto;
|
|
729
|
+
white-space: nowrap;
|
|
730
|
+
overflow: hidden;
|
|
731
|
+
width: 100%;
|
|
732
|
+
height: 100%;
|
|
733
|
+
outline: none;
|
|
734
|
+
margin: 0;
|
|
735
|
+
padding: 0;
|
|
736
|
+
border: 0;
|
|
737
|
+
border-radius: 0;
|
|
738
|
+
min-width: 0;
|
|
739
|
+
font: inherit;
|
|
740
|
+
line-height: normal;
|
|
741
|
+
color: inherit;
|
|
742
|
+
background-color: transparent;
|
|
743
|
+
/* Disable default invalid style in Firefox */
|
|
744
|
+
box-shadow: none;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
::slotted(*) {
|
|
748
|
+
flex: none;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
::slotted(:is(input, textarea))::placeholder {
|
|
752
|
+
/* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
|
|
753
|
+
/* because ::slotted(...)::placeholder does not work in Safari. */
|
|
754
|
+
font: inherit;
|
|
755
|
+
color: inherit;
|
|
756
|
+
/* Override default opacity in Firefox */
|
|
757
|
+
opacity: 1;
|
|
758
|
+
}
|
|
759
|
+
</style>
|
|
760
|
+
<slot name="prefix"></slot>
|
|
761
|
+
<slot></slot>
|
|
762
|
+
<slot name="suffix"></slot>
|
|
763
|
+
`}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}u(Go);
|
|
764
|
+
/**
|
|
765
|
+
* @license
|
|
766
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
767
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
768
|
+
*/
|
|
769
|
+
class qo extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.5"}}u(qo);const Yo=(t,...e)=>{St(`lumo-${t}`,e)};
|
|
770
|
+
/**
|
|
771
|
+
* @license
|
|
772
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
773
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
774
|
+
*/Yo("sizing-props",g`
|
|
775
|
+
:host {
|
|
776
|
+
--lumo-size-xs: 1.625rem;
|
|
777
|
+
--lumo-size-s: 1.875rem;
|
|
778
|
+
--lumo-size-m: 2.25rem;
|
|
779
|
+
--lumo-size-l: 2.75rem;
|
|
780
|
+
--lumo-size-xl: 3.5rem;
|
|
781
|
+
|
|
782
|
+
/* Icons */
|
|
783
|
+
--lumo-icon-size-s: 1.25em;
|
|
784
|
+
--lumo-icon-size-m: 1.5em;
|
|
785
|
+
--lumo-icon-size-l: 2.25em;
|
|
786
|
+
/* For backwards compatibility */
|
|
787
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
788
|
+
}
|
|
789
|
+
`),g`
|
|
790
|
+
html {
|
|
791
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
792
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
793
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
794
|
+
}
|
|
795
|
+
`,Yo("style-props",g`
|
|
796
|
+
:host {
|
|
797
|
+
/* Border radius */
|
|
798
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
799
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
800
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
801
|
+
|
|
802
|
+
/* Shadow */
|
|
803
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
804
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
805
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
806
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
807
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
808
|
+
|
|
809
|
+
/* Clickable element cursor */
|
|
810
|
+
--lumo-clickable-cursor: default;
|
|
811
|
+
}
|
|
812
|
+
`),Yo("font-icons",g`
|
|
813
|
+
@font-face {
|
|
814
|
+
font-family: 'lumo-icons';
|
|
815
|
+
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==)
|
|
816
|
+
format('woff');
|
|
817
|
+
font-weight: normal;
|
|
818
|
+
font-style: normal;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
html {
|
|
822
|
+
--lumo-icons-align-center: '\\ea01';
|
|
823
|
+
--lumo-icons-align-left: '\\ea02';
|
|
824
|
+
--lumo-icons-align-right: '\\ea03';
|
|
825
|
+
--lumo-icons-angle-down: '\\ea04';
|
|
826
|
+
--lumo-icons-angle-left: '\\ea05';
|
|
827
|
+
--lumo-icons-angle-right: '\\ea06';
|
|
828
|
+
--lumo-icons-angle-up: '\\ea07';
|
|
829
|
+
--lumo-icons-arrow-down: '\\ea08';
|
|
830
|
+
--lumo-icons-arrow-left: '\\ea09';
|
|
831
|
+
--lumo-icons-arrow-right: '\\ea0a';
|
|
832
|
+
--lumo-icons-arrow-up: '\\ea0b';
|
|
833
|
+
--lumo-icons-bar-chart: '\\ea0c';
|
|
834
|
+
--lumo-icons-bell: '\\ea0d';
|
|
835
|
+
--lumo-icons-calendar: '\\ea0e';
|
|
836
|
+
--lumo-icons-checkmark: '\\ea0f';
|
|
837
|
+
--lumo-icons-chevron-down: '\\ea10';
|
|
838
|
+
--lumo-icons-chevron-left: '\\ea11';
|
|
839
|
+
--lumo-icons-chevron-right: '\\ea12';
|
|
840
|
+
--lumo-icons-chevron-up: '\\ea13';
|
|
841
|
+
--lumo-icons-clock: '\\ea14';
|
|
842
|
+
--lumo-icons-cog: '\\ea15';
|
|
843
|
+
--lumo-icons-cross: '\\ea16';
|
|
844
|
+
--lumo-icons-download: '\\ea17';
|
|
845
|
+
--lumo-icons-dropdown: '\\ea18';
|
|
846
|
+
--lumo-icons-edit: '\\ea19';
|
|
847
|
+
--lumo-icons-error: '\\ea1a';
|
|
848
|
+
--lumo-icons-eye: '\\ea1b';
|
|
849
|
+
--lumo-icons-eye-disabled: '\\ea1c';
|
|
850
|
+
--lumo-icons-menu: '\\ea1d';
|
|
851
|
+
--lumo-icons-minus: '\\ea1e';
|
|
852
|
+
--lumo-icons-ordered-list: '\\ea1f';
|
|
853
|
+
--lumo-icons-phone: '\\ea20';
|
|
854
|
+
--lumo-icons-photo: '\\ea21';
|
|
855
|
+
--lumo-icons-play: '\\ea22';
|
|
856
|
+
--lumo-icons-plus: '\\ea23';
|
|
857
|
+
--lumo-icons-redo: '\\ea24';
|
|
858
|
+
--lumo-icons-reload: '\\ea25';
|
|
859
|
+
--lumo-icons-search: '\\ea26';
|
|
860
|
+
--lumo-icons-undo: '\\ea27';
|
|
861
|
+
--lumo-icons-unordered-list: '\\ea28';
|
|
862
|
+
--lumo-icons-upload: '\\ea29';
|
|
863
|
+
--lumo-icons-user: '\\ea2a';
|
|
864
|
+
}
|
|
865
|
+
`);
|
|
866
|
+
/**
|
|
867
|
+
* @license
|
|
868
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
869
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
870
|
+
*/
|
|
871
|
+
class Ho extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.9"}}u(Ho);const Zo=(t,...e)=>{St(`lumo-${t}`,e)};
|
|
872
|
+
/**
|
|
873
|
+
* @license
|
|
874
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
875
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
876
|
+
*/Zo("font-icons",g`
|
|
877
|
+
@font-face {
|
|
878
|
+
font-family: 'lumo-icons';
|
|
879
|
+
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==)
|
|
880
|
+
format('woff');
|
|
881
|
+
font-weight: normal;
|
|
882
|
+
font-style: normal;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
html {
|
|
886
|
+
--lumo-icons-align-center: '\\ea01';
|
|
887
|
+
--lumo-icons-align-left: '\\ea02';
|
|
888
|
+
--lumo-icons-align-right: '\\ea03';
|
|
889
|
+
--lumo-icons-angle-down: '\\ea04';
|
|
890
|
+
--lumo-icons-angle-left: '\\ea05';
|
|
891
|
+
--lumo-icons-angle-right: '\\ea06';
|
|
892
|
+
--lumo-icons-angle-up: '\\ea07';
|
|
893
|
+
--lumo-icons-arrow-down: '\\ea08';
|
|
894
|
+
--lumo-icons-arrow-left: '\\ea09';
|
|
895
|
+
--lumo-icons-arrow-right: '\\ea0a';
|
|
896
|
+
--lumo-icons-arrow-up: '\\ea0b';
|
|
897
|
+
--lumo-icons-bar-chart: '\\ea0c';
|
|
898
|
+
--lumo-icons-bell: '\\ea0d';
|
|
899
|
+
--lumo-icons-calendar: '\\ea0e';
|
|
900
|
+
--lumo-icons-checkmark: '\\ea0f';
|
|
901
|
+
--lumo-icons-chevron-down: '\\ea10';
|
|
902
|
+
--lumo-icons-chevron-left: '\\ea11';
|
|
903
|
+
--lumo-icons-chevron-right: '\\ea12';
|
|
904
|
+
--lumo-icons-chevron-up: '\\ea13';
|
|
905
|
+
--lumo-icons-clock: '\\ea14';
|
|
906
|
+
--lumo-icons-cog: '\\ea15';
|
|
907
|
+
--lumo-icons-cross: '\\ea16';
|
|
908
|
+
--lumo-icons-download: '\\ea17';
|
|
909
|
+
--lumo-icons-dropdown: '\\ea18';
|
|
910
|
+
--lumo-icons-edit: '\\ea19';
|
|
911
|
+
--lumo-icons-error: '\\ea1a';
|
|
912
|
+
--lumo-icons-eye: '\\ea1b';
|
|
913
|
+
--lumo-icons-eye-disabled: '\\ea1c';
|
|
914
|
+
--lumo-icons-menu: '\\ea1d';
|
|
915
|
+
--lumo-icons-minus: '\\ea1e';
|
|
916
|
+
--lumo-icons-ordered-list: '\\ea1f';
|
|
917
|
+
--lumo-icons-phone: '\\ea20';
|
|
918
|
+
--lumo-icons-photo: '\\ea21';
|
|
919
|
+
--lumo-icons-play: '\\ea22';
|
|
920
|
+
--lumo-icons-plus: '\\ea23';
|
|
921
|
+
--lumo-icons-redo: '\\ea24';
|
|
922
|
+
--lumo-icons-reload: '\\ea25';
|
|
923
|
+
--lumo-icons-search: '\\ea26';
|
|
924
|
+
--lumo-icons-undo: '\\ea27';
|
|
925
|
+
--lumo-icons-unordered-list: '\\ea28';
|
|
926
|
+
--lumo-icons-upload: '\\ea29';
|
|
927
|
+
--lumo-icons-user: '\\ea2a';
|
|
928
|
+
}
|
|
929
|
+
`),Zo("sizing-props",g`
|
|
930
|
+
:host {
|
|
931
|
+
--lumo-size-xs: 1.625rem;
|
|
932
|
+
--lumo-size-s: 1.875rem;
|
|
933
|
+
--lumo-size-m: 2.25rem;
|
|
934
|
+
--lumo-size-l: 2.75rem;
|
|
935
|
+
--lumo-size-xl: 3.5rem;
|
|
936
|
+
|
|
937
|
+
/* Icons */
|
|
938
|
+
--lumo-icon-size-s: 1.25em;
|
|
939
|
+
--lumo-icon-size-m: 1.5em;
|
|
940
|
+
--lumo-icon-size-l: 2.25em;
|
|
941
|
+
/* For backwards compatibility */
|
|
942
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
943
|
+
}
|
|
944
|
+
`),Zo("spacing-props",g`
|
|
945
|
+
:host {
|
|
946
|
+
/* Square */
|
|
947
|
+
--lumo-space-xs: 0.25rem;
|
|
948
|
+
--lumo-space-s: 0.5rem;
|
|
949
|
+
--lumo-space-m: 1rem;
|
|
950
|
+
--lumo-space-l: 1.5rem;
|
|
951
|
+
--lumo-space-xl: 2.5rem;
|
|
952
|
+
|
|
953
|
+
/* Wide */
|
|
954
|
+
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
|
955
|
+
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
|
956
|
+
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
|
957
|
+
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
|
958
|
+
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
|
959
|
+
|
|
960
|
+
/* Tall */
|
|
961
|
+
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
|
962
|
+
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
|
963
|
+
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
|
964
|
+
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
965
|
+
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
966
|
+
}
|
|
967
|
+
`),g`
|
|
968
|
+
html {
|
|
969
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
970
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
971
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
972
|
+
}
|
|
973
|
+
`,Zo("style-props",g`
|
|
974
|
+
:host {
|
|
975
|
+
/* Border radius */
|
|
976
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
977
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
978
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
979
|
+
|
|
980
|
+
/* Shadow */
|
|
981
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
982
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
983
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
984
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
985
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
986
|
+
|
|
987
|
+
/* Clickable element cursor */
|
|
988
|
+
--lumo-clickable-cursor: default;
|
|
989
|
+
}
|
|
990
|
+
`);
|
|
991
|
+
/**
|
|
992
|
+
* @license
|
|
993
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
994
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
995
|
+
*/
|
|
996
|
+
const Jo=g`
|
|
997
|
+
:host {
|
|
998
|
+
/* prettier-ignore */
|
|
999
|
+
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
1000
|
+
|
|
1001
|
+
/* Font sizes */
|
|
1002
|
+
--lumo-font-size-xxs: 0.75rem;
|
|
1003
|
+
--lumo-font-size-xs: 0.8125rem;
|
|
1004
|
+
--lumo-font-size-s: 0.875rem;
|
|
1005
|
+
--lumo-font-size-m: 1rem;
|
|
1006
|
+
--lumo-font-size-l: 1.125rem;
|
|
1007
|
+
--lumo-font-size-xl: 1.375rem;
|
|
1008
|
+
--lumo-font-size-xxl: 1.75rem;
|
|
1009
|
+
--lumo-font-size-xxxl: 2.5rem;
|
|
1010
|
+
|
|
1011
|
+
/* Line heights */
|
|
1012
|
+
--lumo-line-height-xs: 1.25;
|
|
1013
|
+
--lumo-line-height-s: 1.375;
|
|
1014
|
+
--lumo-line-height-m: 1.625;
|
|
1015
|
+
}
|
|
1016
|
+
`;xt("",g`
|
|
1017
|
+
body,
|
|
1018
|
+
:host {
|
|
1019
|
+
font-family: var(--lumo-font-family);
|
|
1020
|
+
font-size: var(--lumo-font-size-m);
|
|
1021
|
+
line-height: var(--lumo-line-height-m);
|
|
1022
|
+
-webkit-text-size-adjust: 100%;
|
|
1023
|
+
-webkit-font-smoothing: antialiased;
|
|
1024
|
+
-moz-osx-font-smoothing: grayscale;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
small,
|
|
1028
|
+
[theme~='font-size-s'] {
|
|
1029
|
+
font-size: var(--lumo-font-size-s);
|
|
1030
|
+
line-height: var(--lumo-line-height-s);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
[theme~='font-size-xs'] {
|
|
1034
|
+
font-size: var(--lumo-font-size-xs);
|
|
1035
|
+
line-height: var(--lumo-line-height-xs);
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
1039
|
+
font-weight: 600;
|
|
1040
|
+
line-height: var(--lumo-line-height-xs);
|
|
1041
|
+
margin-block: 0;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
:where(h1) {
|
|
1045
|
+
font-size: var(--lumo-font-size-xxxl);
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
:where(h2) {
|
|
1049
|
+
font-size: var(--lumo-font-size-xxl);
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
:where(h3) {
|
|
1053
|
+
font-size: var(--lumo-font-size-xl);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
:where(h4) {
|
|
1057
|
+
font-size: var(--lumo-font-size-l);
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
:where(h5) {
|
|
1061
|
+
font-size: var(--lumo-font-size-m);
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
:where(h6) {
|
|
1065
|
+
font-size: var(--lumo-font-size-xs);
|
|
1066
|
+
text-transform: uppercase;
|
|
1067
|
+
letter-spacing: 0.03em;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
p,
|
|
1071
|
+
blockquote {
|
|
1072
|
+
margin-top: 0.5em;
|
|
1073
|
+
margin-bottom: 0.75em;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
a {
|
|
1077
|
+
text-decoration: none;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
a:where(:any-link):hover {
|
|
1081
|
+
text-decoration: underline;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
hr {
|
|
1085
|
+
display: block;
|
|
1086
|
+
align-self: stretch;
|
|
1087
|
+
height: 1px;
|
|
1088
|
+
border: 0;
|
|
1089
|
+
padding: 0;
|
|
1090
|
+
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
|
1091
|
+
background-color: var(--lumo-contrast-10pct);
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
blockquote {
|
|
1095
|
+
border-left: 2px solid var(--lumo-contrast-30pct);
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
b,
|
|
1099
|
+
strong {
|
|
1100
|
+
font-weight: 600;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
/* RTL specific styles */
|
|
1104
|
+
blockquote[dir='rtl'] {
|
|
1105
|
+
border-left: none;
|
|
1106
|
+
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
1107
|
+
}
|
|
1108
|
+
`,{moduleId:"lumo-typography"}),Zo("typography-props",Jo);const Ko=g`
|
|
1109
|
+
:host {
|
|
1110
|
+
display: flex;
|
|
1111
|
+
align-items: center;
|
|
1112
|
+
box-sizing: border-box;
|
|
1113
|
+
font-family: var(--lumo-font-family);
|
|
1114
|
+
font-size: var(--lumo-font-size-m);
|
|
1115
|
+
line-height: var(--lumo-line-height-xs);
|
|
1116
|
+
padding: 0.5em calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4) 0.5em
|
|
1117
|
+
var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
|
|
1118
|
+
min-height: var(--lumo-size-m);
|
|
1119
|
+
outline: none;
|
|
1120
|
+
border-radius: var(--lumo-border-radius-m);
|
|
1121
|
+
cursor: var(--lumo-clickable-cursor);
|
|
1122
|
+
-webkit-font-smoothing: antialiased;
|
|
1123
|
+
-moz-osx-font-smoothing: grayscale;
|
|
1124
|
+
-webkit-tap-highlight-color: var(--lumo-primary-color-10pct);
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
/* Checkmark */
|
|
1128
|
+
[part='checkmark']::before {
|
|
1129
|
+
display: var(--_lumo-item-selected-icon-display, none);
|
|
1130
|
+
content: var(--lumo-icons-checkmark);
|
|
1131
|
+
font-family: lumo-icons;
|
|
1132
|
+
font-size: var(--lumo-icon-size-m);
|
|
1133
|
+
line-height: 1;
|
|
1134
|
+
font-weight: normal;
|
|
1135
|
+
width: 1em;
|
|
1136
|
+
height: 1em;
|
|
1137
|
+
margin: calc((1 - var(--lumo-line-height-xs)) * var(--lumo-font-size-m) / 2) 0;
|
|
1138
|
+
color: var(--lumo-primary-text-color);
|
|
1139
|
+
flex: none;
|
|
1140
|
+
opacity: 0;
|
|
1141
|
+
transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), opacity 0.1s;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
:host([selected]) [part='checkmark']::before {
|
|
1145
|
+
opacity: 1;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
:host([active]:not([selected])) [part='checkmark']::before {
|
|
1149
|
+
transform: scale(0.8);
|
|
1150
|
+
opacity: 0;
|
|
1151
|
+
transition-duration: 0s;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
[part='content'] {
|
|
1155
|
+
flex: auto;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
/* Disabled */
|
|
1159
|
+
:host([disabled]) {
|
|
1160
|
+
color: var(--lumo-disabled-text-color);
|
|
1161
|
+
cursor: default;
|
|
1162
|
+
pointer-events: none;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
/* TODO a workaround until we have "focus-follows-mouse". After that, use the hover style for focus-ring as well */
|
|
1166
|
+
@media (any-hover: hover) {
|
|
1167
|
+
:host(:hover:not([disabled])) {
|
|
1168
|
+
background-color: var(--lumo-primary-color-10pct);
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
:host([focus-ring]:not([disabled])) {
|
|
1172
|
+
box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
/* RTL specific styles */
|
|
1177
|
+
:host([dir='rtl']) {
|
|
1178
|
+
padding-left: calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4);
|
|
1179
|
+
padding-right: var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/* Slotted icons */
|
|
1183
|
+
:host ::slotted(vaadin-icon) {
|
|
1184
|
+
width: var(--lumo-icon-size-m);
|
|
1185
|
+
height: var(--lumo-icon-size-m);
|
|
1186
|
+
}
|
|
1187
|
+
`;xt("vaadin-item",Ko,{moduleId:"lumo-item"});
|
|
1188
|
+
/**
|
|
1189
|
+
* @license
|
|
1190
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1191
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1192
|
+
*/
|
|
1193
|
+
class Vo extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.9"}}u(Vo);const Qo=(t,...e)=>{St(`lumo-${t}`,e)};
|
|
1194
|
+
/**
|
|
1195
|
+
* @license
|
|
1196
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1197
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1198
|
+
*/Qo("color-props",g`
|
|
1199
|
+
:host {
|
|
1200
|
+
/* Base (background) */
|
|
1201
|
+
--lumo-base-color: #fff;
|
|
1202
|
+
|
|
1203
|
+
/* Tint */
|
|
1204
|
+
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
1205
|
+
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
1206
|
+
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
1207
|
+
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
1208
|
+
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
1209
|
+
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
1210
|
+
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
1211
|
+
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
1212
|
+
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
1213
|
+
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
1214
|
+
--lumo-tint: #fff;
|
|
1215
|
+
|
|
1216
|
+
/* Shade */
|
|
1217
|
+
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
1218
|
+
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
1219
|
+
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
1220
|
+
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
1221
|
+
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
1222
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
1223
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
1224
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
1225
|
+
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
1226
|
+
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
1227
|
+
--lumo-shade: hsl(214, 35%, 15%);
|
|
1228
|
+
|
|
1229
|
+
/* Contrast */
|
|
1230
|
+
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
1231
|
+
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
1232
|
+
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
1233
|
+
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
1234
|
+
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
1235
|
+
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
1236
|
+
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
1237
|
+
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
1238
|
+
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
1239
|
+
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
1240
|
+
--lumo-contrast: var(--lumo-shade);
|
|
1241
|
+
|
|
1242
|
+
/* Text */
|
|
1243
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
1244
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
1245
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
1246
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
1247
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
1248
|
+
|
|
1249
|
+
/* Primary */
|
|
1250
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
1251
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
1252
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
1253
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
1254
|
+
--lumo-primary-contrast-color: #fff;
|
|
1255
|
+
|
|
1256
|
+
/* Error */
|
|
1257
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
|
1258
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
1259
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
1260
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
1261
|
+
--lumo-error-contrast-color: #fff;
|
|
1262
|
+
|
|
1263
|
+
/* Success */
|
|
1264
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
1265
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
1266
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
1267
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
1268
|
+
--lumo-success-contrast-color: #fff;
|
|
1269
|
+
|
|
1270
|
+
/* Warning */
|
|
1271
|
+
--lumo-warning-color: hsl(48, 100%, 50%);
|
|
1272
|
+
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
|
1273
|
+
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
|
1274
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
/* forced-colors mode adjustments */
|
|
1278
|
+
@media (forced-colors: active) {
|
|
1279
|
+
html {
|
|
1280
|
+
--lumo-disabled-text-color: GrayText;
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
`),xt("",g`
|
|
1284
|
+
[theme~='dark'] {
|
|
1285
|
+
/* Base (background) */
|
|
1286
|
+
--lumo-base-color: hsl(214, 35%, 21%);
|
|
1287
|
+
|
|
1288
|
+
/* Tint */
|
|
1289
|
+
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
1290
|
+
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
1291
|
+
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
1292
|
+
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
1293
|
+
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
1294
|
+
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
1295
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
1296
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
1297
|
+
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
1298
|
+
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
1299
|
+
--lumo-tint: hsl(214, 100%, 98%);
|
|
1300
|
+
|
|
1301
|
+
/* Shade */
|
|
1302
|
+
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
1303
|
+
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
1304
|
+
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
1305
|
+
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
1306
|
+
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
1307
|
+
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
1308
|
+
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
1309
|
+
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
1310
|
+
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
1311
|
+
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
1312
|
+
--lumo-shade: hsl(214, 33%, 13%);
|
|
1313
|
+
|
|
1314
|
+
/* Contrast */
|
|
1315
|
+
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
1316
|
+
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
1317
|
+
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
1318
|
+
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
1319
|
+
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
1320
|
+
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
1321
|
+
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
1322
|
+
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
1323
|
+
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
1324
|
+
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
1325
|
+
--lumo-contrast: var(--lumo-tint);
|
|
1326
|
+
|
|
1327
|
+
/* Text */
|
|
1328
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
1329
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
1330
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
1331
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
1332
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
1333
|
+
|
|
1334
|
+
/* Primary */
|
|
1335
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
1336
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
1337
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
1338
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
1339
|
+
--lumo-primary-contrast-color: #fff;
|
|
1340
|
+
|
|
1341
|
+
/* Error */
|
|
1342
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
|
1343
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
1344
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
1345
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
1346
|
+
|
|
1347
|
+
/* Success */
|
|
1348
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
1349
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
1350
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
1351
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
1352
|
+
|
|
1353
|
+
/* Warning */
|
|
1354
|
+
--lumo-warning-color: hsl(43, 100%, 48%);
|
|
1355
|
+
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
|
1356
|
+
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
|
1357
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
html {
|
|
1361
|
+
color: var(--lumo-body-text-color);
|
|
1362
|
+
background-color: var(--lumo-base-color);
|
|
1363
|
+
color-scheme: light;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
[theme~='dark'] {
|
|
1367
|
+
color: var(--lumo-body-text-color);
|
|
1368
|
+
background-color: var(--lumo-base-color);
|
|
1369
|
+
color-scheme: dark;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
h1,
|
|
1373
|
+
h2,
|
|
1374
|
+
h3,
|
|
1375
|
+
h4,
|
|
1376
|
+
h5,
|
|
1377
|
+
h6 {
|
|
1378
|
+
color: var(--lumo-header-text-color);
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
a:where(:any-link) {
|
|
1382
|
+
color: var(--lumo-primary-text-color);
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
a:not(:any-link) {
|
|
1386
|
+
color: var(--lumo-disabled-text-color);
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
blockquote {
|
|
1390
|
+
color: var(--lumo-secondary-text-color);
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
code,
|
|
1394
|
+
pre {
|
|
1395
|
+
background-color: var(--lumo-contrast-10pct);
|
|
1396
|
+
border-radius: var(--lumo-border-radius-m);
|
|
1397
|
+
}
|
|
1398
|
+
`,{moduleId:"lumo-color"}),Qo("spacing-props",g`
|
|
1399
|
+
:host {
|
|
1400
|
+
/* Square */
|
|
1401
|
+
--lumo-space-xs: 0.25rem;
|
|
1402
|
+
--lumo-space-s: 0.5rem;
|
|
1403
|
+
--lumo-space-m: 1rem;
|
|
1404
|
+
--lumo-space-l: 1.5rem;
|
|
1405
|
+
--lumo-space-xl: 2.5rem;
|
|
1406
|
+
|
|
1407
|
+
/* Wide */
|
|
1408
|
+
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
|
1409
|
+
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
|
1410
|
+
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
|
1411
|
+
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
|
1412
|
+
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
|
1413
|
+
|
|
1414
|
+
/* Tall */
|
|
1415
|
+
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
|
1416
|
+
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
|
1417
|
+
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
|
1418
|
+
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
1419
|
+
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
1420
|
+
}
|
|
1421
|
+
`),g`
|
|
1422
|
+
html {
|
|
1423
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
1424
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
1425
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
1426
|
+
}
|
|
1427
|
+
`,Qo("style-props",g`
|
|
1428
|
+
:host {
|
|
1429
|
+
/* Border radius */
|
|
1430
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
1431
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
1432
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
1433
|
+
|
|
1434
|
+
/* Shadow */
|
|
1435
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
1436
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
1437
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
1438
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
1439
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
1440
|
+
|
|
1441
|
+
/* Clickable element cursor */
|
|
1442
|
+
--lumo-clickable-cursor: default;
|
|
1443
|
+
}
|
|
1444
|
+
`);const Xo=g`
|
|
1445
|
+
:host {
|
|
1446
|
+
-webkit-tap-highlight-color: transparent;
|
|
1447
|
+
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
/* Dividers */
|
|
1451
|
+
[part='items'] ::slotted(hr) {
|
|
1452
|
+
height: 1px;
|
|
1453
|
+
border: 0;
|
|
1454
|
+
padding: 0;
|
|
1455
|
+
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
1456
|
+
background-color: var(--lumo-contrast-10pct);
|
|
1457
|
+
}
|
|
1458
|
+
`;xt("vaadin-list-box",Xo,{moduleId:"lumo-list-box"}),Yo("color-props",g`
|
|
1459
|
+
:host {
|
|
1460
|
+
/* Base (background) */
|
|
1461
|
+
--lumo-base-color: #fff;
|
|
1462
|
+
|
|
1463
|
+
/* Tint */
|
|
1464
|
+
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
1465
|
+
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
1466
|
+
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
1467
|
+
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
1468
|
+
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
1469
|
+
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
1470
|
+
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
1471
|
+
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
1472
|
+
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
1473
|
+
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
1474
|
+
--lumo-tint: #fff;
|
|
1475
|
+
|
|
1476
|
+
/* Shade */
|
|
1477
|
+
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
1478
|
+
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
1479
|
+
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
1480
|
+
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
1481
|
+
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
1482
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
1483
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
1484
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
1485
|
+
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
1486
|
+
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
1487
|
+
--lumo-shade: hsl(214, 35%, 15%);
|
|
1488
|
+
|
|
1489
|
+
/* Contrast */
|
|
1490
|
+
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
1491
|
+
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
1492
|
+
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
1493
|
+
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
1494
|
+
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
1495
|
+
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
1496
|
+
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
1497
|
+
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
1498
|
+
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
1499
|
+
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
1500
|
+
--lumo-contrast: var(--lumo-shade);
|
|
1501
|
+
|
|
1502
|
+
/* Text */
|
|
1503
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
1504
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
1505
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
1506
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
1507
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
1508
|
+
|
|
1509
|
+
/* Primary */
|
|
1510
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
1511
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
1512
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
1513
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
1514
|
+
--lumo-primary-contrast-color: #fff;
|
|
1515
|
+
|
|
1516
|
+
/* Error */
|
|
1517
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
|
1518
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
1519
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
1520
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
1521
|
+
--lumo-error-contrast-color: #fff;
|
|
1522
|
+
|
|
1523
|
+
/* Success */
|
|
1524
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
1525
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
1526
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
1527
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
1528
|
+
--lumo-success-contrast-color: #fff;
|
|
1529
|
+
|
|
1530
|
+
/* Warning */
|
|
1531
|
+
--lumo-warning-color: hsl(48, 100%, 50%);
|
|
1532
|
+
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
|
1533
|
+
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
|
1534
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
/* forced-colors mode adjustments */
|
|
1538
|
+
@media (forced-colors: active) {
|
|
1539
|
+
html {
|
|
1540
|
+
--lumo-disabled-text-color: GrayText;
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
`),xt("",g`
|
|
1544
|
+
[theme~='dark'] {
|
|
1545
|
+
/* Base (background) */
|
|
1546
|
+
--lumo-base-color: hsl(214, 35%, 21%);
|
|
1547
|
+
|
|
1548
|
+
/* Tint */
|
|
1549
|
+
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
1550
|
+
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
1551
|
+
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
1552
|
+
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
1553
|
+
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
1554
|
+
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
1555
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
1556
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
1557
|
+
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
1558
|
+
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
1559
|
+
--lumo-tint: hsl(214, 100%, 98%);
|
|
1560
|
+
|
|
1561
|
+
/* Shade */
|
|
1562
|
+
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
1563
|
+
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
1564
|
+
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
1565
|
+
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
1566
|
+
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
1567
|
+
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
1568
|
+
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
1569
|
+
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
1570
|
+
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
1571
|
+
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
1572
|
+
--lumo-shade: hsl(214, 33%, 13%);
|
|
1573
|
+
|
|
1574
|
+
/* Contrast */
|
|
1575
|
+
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
1576
|
+
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
1577
|
+
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
1578
|
+
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
1579
|
+
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
1580
|
+
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
1581
|
+
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
1582
|
+
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
1583
|
+
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
1584
|
+
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
1585
|
+
--lumo-contrast: var(--lumo-tint);
|
|
1586
|
+
|
|
1587
|
+
/* Text */
|
|
1588
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
1589
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
1590
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
1591
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
1592
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
1593
|
+
|
|
1594
|
+
/* Primary */
|
|
1595
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
1596
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
1597
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
1598
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
1599
|
+
--lumo-primary-contrast-color: #fff;
|
|
1600
|
+
|
|
1601
|
+
/* Error */
|
|
1602
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
|
1603
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
1604
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
1605
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
1606
|
+
|
|
1607
|
+
/* Success */
|
|
1608
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
1609
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
1610
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
1611
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
1612
|
+
|
|
1613
|
+
/* Warning */
|
|
1614
|
+
--lumo-warning-color: hsl(43, 100%, 48%);
|
|
1615
|
+
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
|
1616
|
+
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
|
1617
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
html {
|
|
1621
|
+
color: var(--lumo-body-text-color);
|
|
1622
|
+
background-color: var(--lumo-base-color);
|
|
1623
|
+
color-scheme: light;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
[theme~='dark'] {
|
|
1627
|
+
color: var(--lumo-body-text-color);
|
|
1628
|
+
background-color: var(--lumo-base-color);
|
|
1629
|
+
color-scheme: dark;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
h1,
|
|
1633
|
+
h2,
|
|
1634
|
+
h3,
|
|
1635
|
+
h4,
|
|
1636
|
+
h5,
|
|
1637
|
+
h6 {
|
|
1638
|
+
color: var(--lumo-header-text-color);
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
a:where(:any-link) {
|
|
1642
|
+
color: var(--lumo-primary-text-color);
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
a:not(:any-link) {
|
|
1646
|
+
color: var(--lumo-disabled-text-color);
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
blockquote {
|
|
1650
|
+
color: var(--lumo-secondary-text-color);
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
code,
|
|
1654
|
+
pre {
|
|
1655
|
+
background-color: var(--lumo-contrast-10pct);
|
|
1656
|
+
border-radius: var(--lumo-border-radius-m);
|
|
1657
|
+
}
|
|
1658
|
+
`,{moduleId:"lumo-color"}),Yo("spacing-props",g`
|
|
1659
|
+
:host {
|
|
1660
|
+
/* Square */
|
|
1661
|
+
--lumo-space-xs: 0.25rem;
|
|
1662
|
+
--lumo-space-s: 0.5rem;
|
|
1663
|
+
--lumo-space-m: 1rem;
|
|
1664
|
+
--lumo-space-l: 1.5rem;
|
|
1665
|
+
--lumo-space-xl: 2.5rem;
|
|
1666
|
+
|
|
1667
|
+
/* Wide */
|
|
1668
|
+
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
|
1669
|
+
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
|
1670
|
+
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
|
1671
|
+
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
|
1672
|
+
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
|
1673
|
+
|
|
1674
|
+
/* Tall */
|
|
1675
|
+
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
|
1676
|
+
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
|
1677
|
+
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
|
1678
|
+
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
1679
|
+
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
1680
|
+
}
|
|
1681
|
+
`);
|
|
1682
|
+
/**
|
|
1683
|
+
* @license
|
|
1684
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1685
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1686
|
+
*/
|
|
1687
|
+
const $o=g`
|
|
1688
|
+
:host {
|
|
1689
|
+
/* prettier-ignore */
|
|
1690
|
+
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
1691
|
+
|
|
1692
|
+
/* Font sizes */
|
|
1693
|
+
--lumo-font-size-xxs: 0.75rem;
|
|
1694
|
+
--lumo-font-size-xs: 0.8125rem;
|
|
1695
|
+
--lumo-font-size-s: 0.875rem;
|
|
1696
|
+
--lumo-font-size-m: 1rem;
|
|
1697
|
+
--lumo-font-size-l: 1.125rem;
|
|
1698
|
+
--lumo-font-size-xl: 1.375rem;
|
|
1699
|
+
--lumo-font-size-xxl: 1.75rem;
|
|
1700
|
+
--lumo-font-size-xxxl: 2.5rem;
|
|
1701
|
+
|
|
1702
|
+
/* Line heights */
|
|
1703
|
+
--lumo-line-height-xs: 1.25;
|
|
1704
|
+
--lumo-line-height-s: 1.375;
|
|
1705
|
+
--lumo-line-height-m: 1.625;
|
|
1706
|
+
}
|
|
1707
|
+
`;xt("",g`
|
|
1708
|
+
body,
|
|
1709
|
+
:host {
|
|
1710
|
+
font-family: var(--lumo-font-family);
|
|
1711
|
+
font-size: var(--lumo-font-size-m);
|
|
1712
|
+
line-height: var(--lumo-line-height-m);
|
|
1713
|
+
-webkit-text-size-adjust: 100%;
|
|
1714
|
+
-webkit-font-smoothing: antialiased;
|
|
1715
|
+
-moz-osx-font-smoothing: grayscale;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
small,
|
|
1719
|
+
[theme~='font-size-s'] {
|
|
1720
|
+
font-size: var(--lumo-font-size-s);
|
|
1721
|
+
line-height: var(--lumo-line-height-s);
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
[theme~='font-size-xs'] {
|
|
1725
|
+
font-size: var(--lumo-font-size-xs);
|
|
1726
|
+
line-height: var(--lumo-line-height-xs);
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
1730
|
+
font-weight: 600;
|
|
1731
|
+
line-height: var(--lumo-line-height-xs);
|
|
1732
|
+
margin-block: 0;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
:where(h1) {
|
|
1736
|
+
font-size: var(--lumo-font-size-xxxl);
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
:where(h2) {
|
|
1740
|
+
font-size: var(--lumo-font-size-xxl);
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
:where(h3) {
|
|
1744
|
+
font-size: var(--lumo-font-size-xl);
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
:where(h4) {
|
|
1748
|
+
font-size: var(--lumo-font-size-l);
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
:where(h5) {
|
|
1752
|
+
font-size: var(--lumo-font-size-m);
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
:where(h6) {
|
|
1756
|
+
font-size: var(--lumo-font-size-xs);
|
|
1757
|
+
text-transform: uppercase;
|
|
1758
|
+
letter-spacing: 0.03em;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
p,
|
|
1762
|
+
blockquote {
|
|
1763
|
+
margin-top: 0.5em;
|
|
1764
|
+
margin-bottom: 0.75em;
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
a {
|
|
1768
|
+
text-decoration: none;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
a:where(:any-link):hover {
|
|
1772
|
+
text-decoration: underline;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
hr {
|
|
1776
|
+
display: block;
|
|
1777
|
+
align-self: stretch;
|
|
1778
|
+
height: 1px;
|
|
1779
|
+
border: 0;
|
|
1780
|
+
padding: 0;
|
|
1781
|
+
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
|
1782
|
+
background-color: var(--lumo-contrast-10pct);
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
blockquote {
|
|
1786
|
+
border-left: 2px solid var(--lumo-contrast-30pct);
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
b,
|
|
1790
|
+
strong {
|
|
1791
|
+
font-weight: 600;
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
/* RTL specific styles */
|
|
1795
|
+
blockquote[dir='rtl'] {
|
|
1796
|
+
border-left: none;
|
|
1797
|
+
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
1798
|
+
}
|
|
1799
|
+
`,{moduleId:"lumo-typography"}),Yo("typography-props",$o);
|
|
1800
|
+
/**
|
|
1801
|
+
* @license
|
|
1802
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1803
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1804
|
+
*/
|
|
1805
|
+
const ti=g`
|
|
1806
|
+
[part$='button'] {
|
|
1807
|
+
flex: none;
|
|
1808
|
+
width: 1em;
|
|
1809
|
+
height: 1em;
|
|
1810
|
+
line-height: 1;
|
|
1811
|
+
font-size: var(--lumo-icon-size-m);
|
|
1812
|
+
text-align: center;
|
|
1813
|
+
color: var(--lumo-contrast-60pct);
|
|
1814
|
+
transition: 0.2s color;
|
|
1815
|
+
cursor: var(--lumo-clickable-cursor);
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
[part$='button']:hover {
|
|
1819
|
+
color: var(--lumo-contrast-90pct);
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
:host([disabled]) [part$='button'],
|
|
1823
|
+
:host([readonly]) [part$='button'] {
|
|
1824
|
+
color: var(--lumo-contrast-20pct);
|
|
1825
|
+
cursor: default;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
[part$='button']::before {
|
|
1829
|
+
font-family: 'lumo-icons';
|
|
1830
|
+
display: block;
|
|
1831
|
+
}
|
|
1832
|
+
`;xt("",ti,{moduleId:"lumo-field-button"});
|
|
1833
|
+
/**
|
|
1834
|
+
* @license
|
|
1835
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1836
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1837
|
+
*/
|
|
1838
|
+
const ei=g`
|
|
1839
|
+
:host([has-helper]) [part='helper-text']::before {
|
|
1840
|
+
content: '';
|
|
1841
|
+
display: block;
|
|
1842
|
+
height: 0.4em;
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
[part='helper-text'] {
|
|
1846
|
+
display: block;
|
|
1847
|
+
color: var(--lumo-secondary-text-color);
|
|
1848
|
+
font-size: var(--lumo-font-size-xs);
|
|
1849
|
+
line-height: var(--lumo-line-height-xs);
|
|
1850
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1851
|
+
transition: color 0.2s;
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
:host(:hover:not([readonly])) [part='helper-text'] {
|
|
1855
|
+
color: var(--lumo-body-text-color);
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
:host([disabled]) [part='helper-text'] {
|
|
1859
|
+
color: var(--lumo-disabled-text-color);
|
|
1860
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
|
|
1864
|
+
display: none;
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
|
|
1868
|
+
content: '';
|
|
1869
|
+
display: block;
|
|
1870
|
+
height: 0.4em;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] {
|
|
1874
|
+
order: 0;
|
|
1875
|
+
padding-bottom: 0.4em;
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
|
|
1879
|
+
order: 1;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] + * {
|
|
1883
|
+
order: 2;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
:host([has-helper][theme~='helper-above-field']) [part='error-message'] {
|
|
1887
|
+
order: 3;
|
|
1888
|
+
}
|
|
1889
|
+
`
|
|
1890
|
+
/**
|
|
1891
|
+
* @license
|
|
1892
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1893
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1894
|
+
*/,oi=g`
|
|
1895
|
+
[part='label'] {
|
|
1896
|
+
align-self: flex-start;
|
|
1897
|
+
color: var(--lumo-secondary-text-color);
|
|
1898
|
+
font-weight: 500;
|
|
1899
|
+
font-size: var(--lumo-font-size-s);
|
|
1900
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1901
|
+
transition: color 0.2s;
|
|
1902
|
+
line-height: 1;
|
|
1903
|
+
padding-right: 1em;
|
|
1904
|
+
padding-bottom: 0.5em;
|
|
1905
|
+
/* As a workaround for diacritics being cut off, add a top padding and a
|
|
1906
|
+
negative margin to compensate */
|
|
1907
|
+
padding-top: 0.25em;
|
|
1908
|
+
margin-top: -0.25em;
|
|
1909
|
+
overflow: hidden;
|
|
1910
|
+
white-space: nowrap;
|
|
1911
|
+
text-overflow: ellipsis;
|
|
1912
|
+
position: relative;
|
|
1913
|
+
max-width: 100%;
|
|
1914
|
+
box-sizing: border-box;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
:host([has-label])::before {
|
|
1918
|
+
margin-top: calc(var(--lumo-font-size-s) * 1.5);
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
:host([has-label][theme~='small'])::before {
|
|
1922
|
+
margin-top: calc(var(--lumo-font-size-xs) * 1.5);
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
:host([has-label]) {
|
|
1926
|
+
padding-top: var(--lumo-space-m);
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
:host([has-label]) ::slotted([slot='tooltip']) {
|
|
1930
|
+
--vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
:host([required]) [part='required-indicator']::after {
|
|
1934
|
+
content: var(--lumo-required-field-indicator, '\\2022');
|
|
1935
|
+
transition: opacity 0.2s;
|
|
1936
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
|
|
1937
|
+
position: absolute;
|
|
1938
|
+
right: 0;
|
|
1939
|
+
width: 1em;
|
|
1940
|
+
text-align: center;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
:host([invalid]) [part='required-indicator']::after {
|
|
1944
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
[part='error-message'] {
|
|
1948
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1949
|
+
font-size: var(--lumo-font-size-xs);
|
|
1950
|
+
line-height: var(--lumo-line-height-xs);
|
|
1951
|
+
color: var(--lumo-error-text-color);
|
|
1952
|
+
will-change: max-height;
|
|
1953
|
+
transition: 0.4s max-height;
|
|
1954
|
+
max-height: 5em;
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
:host([has-error-message]) [part='error-message']::before,
|
|
1958
|
+
:host([has-error-message]) [part='error-message']::after {
|
|
1959
|
+
content: '';
|
|
1960
|
+
display: block;
|
|
1961
|
+
height: 0.4em;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
:host(:not([invalid])) [part='error-message'] {
|
|
1965
|
+
max-height: 0;
|
|
1966
|
+
overflow: hidden;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
/* RTL specific styles */
|
|
1970
|
+
|
|
1971
|
+
:host([dir='rtl']) [part='label'] {
|
|
1972
|
+
margin-left: 0;
|
|
1973
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
:host([dir='rtl']) [part='label'] {
|
|
1977
|
+
padding-left: 1em;
|
|
1978
|
+
padding-right: 0;
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
:host([dir='rtl']) [part='required-indicator']::after {
|
|
1982
|
+
right: auto;
|
|
1983
|
+
left: 0;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
:host([dir='rtl']) [part='error-message'] {
|
|
1987
|
+
margin-left: 0;
|
|
1988
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1989
|
+
}
|
|
1990
|
+
`;xt("",oi,{moduleId:"lumo-required-field"});
|
|
1991
|
+
/**
|
|
1992
|
+
* @license
|
|
1993
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1994
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1995
|
+
*/
|
|
1996
|
+
const ii=[oi,ti,ei,g`
|
|
1997
|
+
:host {
|
|
1998
|
+
--lumo-text-field-size: var(--lumo-size-m);
|
|
1999
|
+
color: var(--lumo-body-text-color);
|
|
2000
|
+
font-size: var(--lumo-font-size-m);
|
|
2001
|
+
font-family: var(--lumo-font-family);
|
|
2002
|
+
-webkit-font-smoothing: antialiased;
|
|
2003
|
+
-moz-osx-font-smoothing: grayscale;
|
|
2004
|
+
-webkit-tap-highlight-color: transparent;
|
|
2005
|
+
padding: var(--lumo-space-xs) 0;
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
:host::before {
|
|
2009
|
+
height: var(--lumo-text-field-size);
|
|
2010
|
+
box-sizing: border-box;
|
|
2011
|
+
display: inline-flex;
|
|
2012
|
+
align-items: center;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
:host([focused]:not([readonly])) [part='label'] {
|
|
2016
|
+
color: var(--lumo-primary-text-color);
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
:host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {
|
|
2020
|
+
-webkit-mask-image: none;
|
|
2021
|
+
mask-image: none;
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
::slotted(:is(input, textarea):placeholder-shown) {
|
|
2025
|
+
color: var(--lumo-secondary-text-color);
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
/* Hover */
|
|
2029
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
2030
|
+
color: var(--lumo-body-text-color);
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2034
|
+
opacity: 0.1;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
/* Touch device adjustment */
|
|
2038
|
+
@media (pointer: coarse) {
|
|
2039
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
2040
|
+
color: var(--lumo-secondary-text-color);
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2044
|
+
opacity: 0;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
:host(:active:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2048
|
+
opacity: 0.2;
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
/* Trigger when not focusing using the keyboard */
|
|
2053
|
+
:host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {
|
|
2054
|
+
transform: scaleX(0);
|
|
2055
|
+
transition-duration: 0.15s, 1s;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
/* Focus-ring */
|
|
2059
|
+
:host([focus-ring]) [part='input-field'] {
|
|
2060
|
+
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
/* Read-only and disabled */
|
|
2064
|
+
:host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {
|
|
2065
|
+
opacity: 0;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
/* Read-only style */
|
|
2069
|
+
:host([readonly]) {
|
|
2070
|
+
--vaadin-input-field-border-color: transparent;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
/* Disabled style */
|
|
2074
|
+
:host([disabled]) {
|
|
2075
|
+
pointer-events: none;
|
|
2076
|
+
--vaadin-input-field-border-color: var(--lumo-contrast-20pct);
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
:host([disabled]) [part='label'],
|
|
2080
|
+
:host([disabled]) [part='input-field'] ::slotted(*) {
|
|
2081
|
+
color: var(--lumo-disabled-text-color);
|
|
2082
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
/* Invalid style */
|
|
2086
|
+
:host([invalid]) {
|
|
2087
|
+
--vaadin-input-field-border-color: var(--lumo-error-color);
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
:host([invalid][focus-ring]) [part='input-field'] {
|
|
2091
|
+
box-shadow: 0 0 0 2px var(--lumo-error-color-50pct);
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
:host([input-prevented]) [part='input-field'] {
|
|
2095
|
+
animation: shake 0.15s infinite;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
@keyframes shake {
|
|
2099
|
+
25% {
|
|
2100
|
+
transform: translateX(4px);
|
|
2101
|
+
}
|
|
2102
|
+
75% {
|
|
2103
|
+
transform: translateX(-4px);
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
/* Small theme */
|
|
2108
|
+
:host([theme~='small']) {
|
|
2109
|
+
font-size: var(--lumo-font-size-s);
|
|
2110
|
+
--lumo-text-field-size: var(--lumo-size-s);
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
:host([theme~='small']) [part='label'] {
|
|
2114
|
+
font-size: var(--lumo-font-size-xs);
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
:host([theme~='small']) [part='error-message'] {
|
|
2118
|
+
font-size: var(--lumo-font-size-xxs);
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
/* Slotted content */
|
|
2122
|
+
[part='input-field'] ::slotted(:not(vaadin-icon):not(input):not(textarea)) {
|
|
2123
|
+
color: var(--lumo-secondary-text-color);
|
|
2124
|
+
font-weight: 400;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
[part='clear-button']::before {
|
|
2128
|
+
content: var(--lumo-icons-cross);
|
|
2129
|
+
}
|
|
2130
|
+
`];xt("",ii,{moduleId:"lumo-input-field-shared-styles"});
|
|
2131
|
+
/**
|
|
2132
|
+
* @license
|
|
2133
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2134
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2135
|
+
*/
|
|
2136
|
+
const si=g`
|
|
2137
|
+
:host {
|
|
2138
|
+
top: var(--lumo-space-m);
|
|
2139
|
+
right: var(--lumo-space-m);
|
|
2140
|
+
bottom: var(--lumo-space-m);
|
|
2141
|
+
left: var(--lumo-space-m);
|
|
2142
|
+
/* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
|
|
2143
|
+
/* stylelint-disable-next-line */
|
|
2144
|
+
outline: 0px solid transparent;
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
[part='overlay'] {
|
|
2148
|
+
background-color: var(--lumo-base-color);
|
|
2149
|
+
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
2150
|
+
border-radius: var(--lumo-border-radius-m);
|
|
2151
|
+
box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);
|
|
2152
|
+
color: var(--lumo-body-text-color);
|
|
2153
|
+
font-family: var(--lumo-font-family);
|
|
2154
|
+
font-size: var(--lumo-font-size-m);
|
|
2155
|
+
font-weight: 400;
|
|
2156
|
+
line-height: var(--lumo-line-height-m);
|
|
2157
|
+
letter-spacing: 0;
|
|
2158
|
+
text-transform: none;
|
|
2159
|
+
-webkit-text-size-adjust: 100%;
|
|
2160
|
+
-webkit-font-smoothing: antialiased;
|
|
2161
|
+
-moz-osx-font-smoothing: grayscale;
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
[part='content'] {
|
|
2165
|
+
padding: var(--lumo-space-xs);
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
[part='backdrop'] {
|
|
2169
|
+
background-color: var(--lumo-shade-20pct);
|
|
2170
|
+
animation: 0.2s lumo-overlay-backdrop-enter both;
|
|
2171
|
+
will-change: opacity;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
@keyframes lumo-overlay-backdrop-enter {
|
|
2175
|
+
0% {
|
|
2176
|
+
opacity: 0;
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
:host([closing]) [part='backdrop'] {
|
|
2181
|
+
animation: 0.2s lumo-overlay-backdrop-exit both;
|
|
2182
|
+
}
|
|
2183
|
+
|
|
2184
|
+
@keyframes lumo-overlay-backdrop-exit {
|
|
2185
|
+
100% {
|
|
2186
|
+
opacity: 0;
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
@keyframes lumo-overlay-dummy-animation {
|
|
2191
|
+
0% {
|
|
2192
|
+
opacity: 1;
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
100% {
|
|
2196
|
+
opacity: 1;
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
`;xt("",si,{moduleId:"lumo-overlay"});
|
|
2200
|
+
/**
|
|
2201
|
+
* @license
|
|
2202
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2203
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2204
|
+
*/
|
|
2205
|
+
const ri=g`
|
|
2206
|
+
:host([opening]),
|
|
2207
|
+
:host([closing]) {
|
|
2208
|
+
animation: 0.14s lumo-overlay-dummy-animation;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
[part='overlay'] {
|
|
2212
|
+
will-change: opacity, transform;
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
:host([opening]) [part='overlay'] {
|
|
2216
|
+
animation: 0.1s lumo-menu-overlay-enter ease-out both;
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
@keyframes lumo-menu-overlay-enter {
|
|
2220
|
+
0% {
|
|
2221
|
+
opacity: 0;
|
|
2222
|
+
transform: translateY(-4px);
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
:host([closing]) [part='overlay'] {
|
|
2227
|
+
animation: 0.1s lumo-menu-overlay-exit both;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
@keyframes lumo-menu-overlay-exit {
|
|
2231
|
+
100% {
|
|
2232
|
+
opacity: 0;
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
`;xt("",ri,{moduleId:"lumo-menu-overlay-core"});const ni=[si,ri,g`
|
|
2236
|
+
/* Small viewport (bottom sheet) styles */
|
|
2237
|
+
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
2238
|
+
@media (max-width: 420px), (max-height: 420px) {
|
|
2239
|
+
:host {
|
|
2240
|
+
top: 0 !important;
|
|
2241
|
+
right: 0 !important;
|
|
2242
|
+
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
2243
|
+
left: 0 !important;
|
|
2244
|
+
align-items: stretch !important;
|
|
2245
|
+
justify-content: flex-end !important;
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
[part='overlay'] {
|
|
2249
|
+
max-height: 50vh;
|
|
2250
|
+
width: 100vw;
|
|
2251
|
+
border-radius: 0;
|
|
2252
|
+
box-shadow: var(--lumo-box-shadow-xl);
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
/* The content part scrolls instead of the overlay part, because of the gradient fade-out */
|
|
2256
|
+
[part='content'] {
|
|
2257
|
+
padding: 30px var(--lumo-space-m);
|
|
2258
|
+
max-height: inherit;
|
|
2259
|
+
box-sizing: border-box;
|
|
2260
|
+
-webkit-overflow-scrolling: touch;
|
|
2261
|
+
overflow: auto;
|
|
2262
|
+
-webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
2263
|
+
mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
[part='backdrop'] {
|
|
2267
|
+
display: block;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
/* Animations */
|
|
2271
|
+
|
|
2272
|
+
:host([opening]) [part='overlay'] {
|
|
2273
|
+
animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
:host([closing]),
|
|
2277
|
+
:host([closing]) [part='backdrop'] {
|
|
2278
|
+
animation-delay: 0.14s;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
:host([closing]) [part='overlay'] {
|
|
2282
|
+
animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
@keyframes lumo-mobile-menu-overlay-enter {
|
|
2287
|
+
0% {
|
|
2288
|
+
transform: translateY(150%);
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
@keyframes lumo-mobile-menu-overlay-exit {
|
|
2293
|
+
100% {
|
|
2294
|
+
transform: translateY(150%);
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
`];xt("",ni,{moduleId:"lumo-menu-overlay"}),
|
|
2298
|
+
/**
|
|
2299
|
+
* @license
|
|
2300
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2301
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2302
|
+
*/
|
|
2303
|
+
xt("vaadin-select-item",Ko,{moduleId:"lumo-select-item"}),xt("vaadin-select-list-box",Xo,{moduleId:"lumo-select-list-box"}),xt("vaadin-select",[ii,g`
|
|
2304
|
+
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
2305
|
+
text-align: start;
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
[part='input-field'] {
|
|
2309
|
+
cursor: var(--lumo-clickable-cursor);
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
[part='input-field'] ::slotted([slot='value']) {
|
|
2313
|
+
font-weight: 500;
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
[part='input-field'] ::slotted([slot='value']:not([placeholder])) {
|
|
2317
|
+
color: var(--lumo-body-text-color);
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2320
|
+
:host([readonly]) [part='input-field'] ::slotted([slot='value']:not([placeholder])) {
|
|
2321
|
+
color: var(--lumo-secondary-text-color);
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
/* placeholder styles */
|
|
2325
|
+
[part='input-field'] ::slotted([slot='value'][placeholder]) {
|
|
2326
|
+
color: var(--lumo-secondary-text-color);
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
:host(:is([readonly], [disabled])) ::slotted([slot='value'][placeholder]) {
|
|
2330
|
+
opacity: 0;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
[part='toggle-button']::before {
|
|
2334
|
+
content: var(--lumo-icons-dropdown);
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
/* Highlight the toggle button when hovering over the entire component */
|
|
2338
|
+
:host(:hover:not([readonly]):not([disabled])) [part='toggle-button'] {
|
|
2339
|
+
color: var(--lumo-contrast-80pct);
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
:host([theme~='small']) [part='input-field'] ::slotted([slot='value']) {
|
|
2343
|
+
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
2344
|
+
--_lumo-selected-item-padding: 0;
|
|
2345
|
+
}
|
|
2346
|
+
`],{moduleId:"lumo-select"}),xt("vaadin-select-value-button",g`
|
|
2347
|
+
:host {
|
|
2348
|
+
font-family: var(--lumo-font-family);
|
|
2349
|
+
font-size: var(--lumo-font-size-m);
|
|
2350
|
+
padding: 0 0.25em;
|
|
2351
|
+
--_lumo-selected-item-height: var(--lumo-size-m);
|
|
2352
|
+
--_lumo-selected-item-padding: 0.5em;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
::slotted(*) {
|
|
2356
|
+
min-height: var(--_lumo-selected-item-height);
|
|
2357
|
+
padding-top: var(--_lumo-selected-item-padding);
|
|
2358
|
+
padding-bottom: var(--_lumo-selected-item-padding);
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
::slotted(*:hover) {
|
|
2362
|
+
background-color: transparent;
|
|
2363
|
+
}
|
|
2364
|
+
`,{moduleId:"lumo-select-value-button"}),xt("vaadin-select-overlay",[ni,g`
|
|
2365
|
+
:host {
|
|
2366
|
+
--_lumo-item-selected-icon-display: block;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
[part~='overlay'] {
|
|
2370
|
+
min-width: var(--vaadin-select-text-field-width);
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
/* Small viewport adjustment */
|
|
2374
|
+
:host([phone]) {
|
|
2375
|
+
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
|
2376
|
+
top: 0 !important;
|
|
2377
|
+
right: 0 !important;
|
|
2378
|
+
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
2379
|
+
left: 0 !important;
|
|
2380
|
+
/* stylelint-enable declaration-block-no-redundant-longhand-properties */
|
|
2381
|
+
align-items: stretch;
|
|
2382
|
+
justify-content: flex-end;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
:host([theme~='align-left']) {
|
|
2386
|
+
text-align: left;
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
:host([theme~='align-right']) {
|
|
2390
|
+
text-align: right;
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
:host([theme~='align-center']) {
|
|
2394
|
+
text-align: center;
|
|
2395
|
+
}
|
|
2396
|
+
`],{moduleId:"lumo-select-overlay"});
|
|
2397
|
+
/**
|
|
2398
|
+
* @license
|
|
2399
|
+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2400
|
+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2401
|
+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2402
|
+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2403
|
+
* Code distributed by Google as part of the polymer project is also
|
|
2404
|
+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2405
|
+
*/
|
|
2406
|
+
let ai=0,li=0;const ci=[];let hi=!1;const ui={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},di={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},mi={run(t){hi||(hi=!0,queueMicrotask((()=>function(){hi=!1;const t=ci.length;for(let e=0;e<t;e++){const t=ci[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ci.splice(0,t),li+=t}()))),ci.push(t);const e=ai;return ai+=1,e},cancel(t){const e=t-li;if(e>=0){if(!ci[e])throw new Error(`invalid async handle: ${t}`);ci[e]=null}}},pi=!1,fi=t=>t,vi="string"==typeof document.head.style.touchAction,bi="__polymerGestures",gi="__polymerGesturesHandled",yi="__polymerGesturesTouchAction",xi=["mousedown","mousemove","mouseup","click"],wi=[0,1,4,2],Ai=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function ki(t){return xi.indexOf(t)>-1}let _i=!1;function Ci(t){if(!ki(t)&&"touchend"!==t)return vi&&_i&&pi?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){_i=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const Si=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),zi={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Ti(t){const e=t.type;if(!ki(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Ai&&(e=wi[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const Ni={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Ii(t,e,o){t.movefn=e,t.upfn=o,document.addEventListener("mousemove",e),document.addEventListener("mouseup",o)}function Bi(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Pi=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Ei={},Mi=[];function Oi(t){const e=Pi(t);return e.length>0?e[0]:t.target}function Di(t){const e=t.type,o=t.currentTarget[bi];if(!o)return;const i=o[e];if(!i)return;if(!t[gi]&&(t[gi]={},e.startsWith("touch"))){const o=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Ni.touch.id=o.identifier),Ni.touch.id!==o.identifier)return;vi||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],o=t.type;if("touchstart"===o)Ni.touch.x=e.clientX,Ni.touch.y=e.clientY,Ni.touch.scrollDecided=!1;else if("touchmove"===o){if(Ni.touch.scrollDecided)return;Ni.touch.scrollDecided=!0;const o=function(t){let e="auto";const o=Pi(t);for(let t,i=0;i<o.length;i++)if(t=o[i],t[yi]){e=t[yi];break}return e}(t);let i=!1;const s=Math.abs(Ni.touch.x-e.clientX),r=Math.abs(Ni.touch.y-e.clientY);t.cancelable&&("none"===o?i=!0:"pan-x"===o?i=r>s:"pan-y"===o&&(i=s>r)),i?t.preventDefault():Ri("track")}}(t)}const s=t[gi];if(!s.skip){for(let e,o=0;o<Mi.length;o++)e=Mi[o],i[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let o,r=0;r<Mi.length;r++)o=Mi[r],i[o.name]&&!s[o.name]&&(s[o.name]=!0,o[e](t))}}function ji(t,e,o){return!!Ei[e]&&(function(t,e,o){const i=Ei[e],s=i.deps,r=i.name;let n=t[bi];n||(t[bi]=n={});for(let e,o,i=0;i<s.length;i++)e=s[i],Si&&ki(e)&&"click"!==e||(o=n[e],o||(n[e]=o={_count:0}),0===o._count&&t.addEventListener(e,Di,Ci(e)),o[r]=(o[r]||0)+1,o._count=(o._count||0)+1);t.addEventListener(e,o),i.touchAction&&function(t,e){vi&&t instanceof HTMLElement&&mi.run((()=>{t.style.touchAction=e})),t[yi]=e}(t,i.touchAction)}(t,e,o),!0)}function Ui(t){Mi.push(t),t.emits.forEach((e=>{Ei[e]=t}))}function Fi(t,e,o){const i=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(i.detail=o,fi(t).dispatchEvent(i),i.defaultPrevented){const t=o.preventer||o.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Ri(t){const e=function(t){for(let e,o=0;o<Mi.length;o++){e=Mi[o];for(let o,i=0;i<e.emits.length;i++)if(o=e.emits[i],o===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Li(t,e,o,i){e&&Fi(e,t,{x:o.clientX,y:o.clientY,sourceEvent:o,preventer:i,prevent:t=>Ri(t)})}function Wi(t,e,o){if(t.prevent)return!1;if(t.started)return!0;const i=Math.abs(t.x-e),s=Math.abs(t.y-o);return i>=5||s>=5}function Gi(t,e,o){if(!e)return;const i=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1];let r,n=0;i&&(r=s.x-i.x,n=s.y-i.y),Fi(e,"track",{state:t.state,x:o.clientX,y:o.clientY,dx:s.x-t.x,dy:s.y-t.y,ddx:r,ddy:n,sourceEvent:o,hover:()=>function(t,e){let o=document.elementFromPoint(t,e),i=o;for(;i&&i.shadowRoot&&!window.ShadyDOM;){const s=i;if(i=i.shadowRoot.elementFromPoint(t,e),s===i)break;i&&(o=i)}return o}(o.clientX,o.clientY)})}function qi(t,e,o){const i=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),r=Oi(o||e);!r||zi[r.localName]&&r.hasAttribute("disabled")||(isNaN(i)||isNaN(s)||i<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Oi(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const o=e.getBoundingClientRect(),i=t.pageX,s=t.pageY;return!(i>=o.left&&i<=o.right&&s>=o.top&&s<=o.bottom)}return!1}(e))&&(t.prevent||Fi(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:o}))}
|
|
2407
|
+
/**
|
|
2408
|
+
* @license
|
|
2409
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2410
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2411
|
+
*/Ui({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Bi(this.info)},mousedown(t){if(!Ti(t))return;const e=Oi(t),o=this;Ii(this.info,(t=>{Ti(t)||(Li("up",e,t),Bi(o.info))}),(t=>{Ti(t)&&Li("up",e,t),Bi(o.info)})),Li("down",e,t)},touchstart(t){Li("down",Oi(t),t.changedTouches[0],t)},touchend(t){Li("up",Oi(t),t.changedTouches[0],t)}}),Ui({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Bi(this.info)},mousedown(t){if(!Ti(t))return;const e=Oi(t),o=this,i=t=>{const i=t.clientX,s=t.clientY;Wi(o.info,i,s)&&(o.info.state=o.info.started?"mouseup"===t.type?"end":"track":"start","start"===o.info.state&&Ri("tap"),o.info.addMove({x:i,y:s}),Ti(t)||(o.info.state="end",Bi(o.info)),e&&Gi(o.info,e,t),o.info.started=!0)};Ii(this.info,i,(t=>{o.info.started&&i(t),Bi(o.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=Oi(t),o=t.changedTouches[0],i=o.clientX,s=o.clientY;Wi(this.info,i,s)&&("start"===this.info.state&&Ri("tap"),this.info.addMove({x:i,y:s}),Gi(this.info,e,o),this.info.state="track",this.info.started=!0)},touchend(t){const e=Oi(t),o=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:o.clientX,y:o.clientY}),Gi(this.info,e,o))}}),Ui({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){Ti(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){Ti(t)&&qi(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){qi(this.info,t.changedTouches[0],t)}});const Yi=Vt((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),Hi=Vt((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),Zi=t=>class extends(Yi(Hi(t))){get _activeKeys(){return[" "]}ready(){super.ready(),ji(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),ji(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
|
|
2412
|
+
/**
|
|
2413
|
+
* @license
|
|
2414
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2415
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2416
|
+
*/;
|
|
2417
|
+
/**
|
|
2418
|
+
* @license
|
|
2419
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2420
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2421
|
+
*/let Ji=!1;function Ki(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function Vi(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const o=window.getComputedStyle(t);return"hidden"===o.visibility||"none"===o.display}function Qi(t,e){const o=Math.max(t.tabIndex,0),i=Math.max(e.tabIndex,0);return 0===o||0===i?i>o:o>i}function Xi(t){const e=t.length;if(e<2)return t;const o=Math.ceil(e/2);return function(t,e){const o=[];for(;t.length>0&&e.length>0;)Qi(t[0],e[0])?o.push(e.shift()):o.push(t.shift());return o.concat(t,e)}(Xi(t.slice(0,o)),Xi(t.slice(o)))}function $i(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||Vi(t)}function ts(t){return t.getRootNode().activeElement===t}function es(t,e){if(t.nodeType!==Node.ELEMENT_NODE||Vi(t))return!1;const o=t,i=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(o);let s=i>0;i>=0&&e.push(o);let r=[];return r="slot"===o.localName?o.assignedNodes({flatten:!0}):(o.shadowRoot||o).children,[...r].forEach((t=>{s=es(t,e)||s})),s}window.addEventListener("keydown",(()=>{Ji=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{Ji=!1}),{capture:!0});
|
|
2422
|
+
/**
|
|
2423
|
+
* @license
|
|
2424
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2425
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2426
|
+
*/
|
|
2427
|
+
const os=Vt((t=>class extends t{get _keyboardActive(){return Ji}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),is=t=>class extends(Zi(os(t))){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return void 0!==this._value?this._value:this.textContent.trim()}set value(t){this._value=t}ready(){super.ready();const t=this.getAttribute("value");null!==t&&(this.value=t)}focus(){this.disabled||(super.focus(),this._setFocused(!0))}_shouldSetActive(t){return!(this.disabled||"keydown"===t.type&&t.defaultPrevented)}_selectedChanged(t){this.setAttribute("aria-selected",t)}_disabledChanged(t){super._disabledChanged(t),t&&(this.selected=!1,this.blur())}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&!t.defaultPrevented&&(t.preventDefault(),this.click())}}
|
|
2428
|
+
/**
|
|
2429
|
+
* @license
|
|
2430
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2431
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2432
|
+
*/;
|
|
2433
|
+
/**
|
|
2434
|
+
* @license
|
|
2435
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2436
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2437
|
+
*/class ss extends(is(Ct(Wo(Uo)))){static get is(){return"vaadin-select-item"}static get template(){return Do`
|
|
2438
|
+
<style>
|
|
2439
|
+
:host {
|
|
2440
|
+
display: inline-block;
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
:host([hidden]) {
|
|
2444
|
+
display: none !important;
|
|
2445
|
+
}
|
|
2446
|
+
</style>
|
|
2447
|
+
<span part="checkmark" aria-hidden="true"></span>
|
|
2448
|
+
<div part="content">
|
|
2449
|
+
<slot></slot>
|
|
2450
|
+
</div>
|
|
2451
|
+
`}ready(){super.ready(),this.setAttribute("role","option")}}u(ss);
|
|
2452
|
+
/**
|
|
2453
|
+
@license
|
|
2454
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2455
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2456
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2457
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2458
|
+
Code distributed by Google as part of the polymer project is also
|
|
2459
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2460
|
+
*/
|
|
2461
|
+
const rs=new Set;class ns{static debounce(t,e,o){return t instanceof ns?t._cancelAsync():t=new ns,t.setConfig(e,o),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,rs.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),rs.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}function as(t){const e=[];let o;return"slot"===t.localName?o=t.assignedElements():(e.push(t),o=[...t.children]),o.forEach((t=>e.push(...as(t)))),e}function ls(t){return t?new Set(t.split(" ")):new Set}function cs(t){return t?[...t].join(" "):""}function hs(t,e,o){const i=ls(t.getAttribute(e));i.add(o),t.setAttribute(e,cs(i))}
|
|
2462
|
+
/**
|
|
2463
|
+
* @license
|
|
2464
|
+
* Copyright (c) 2023 Vaadin Ltd.
|
|
2465
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2466
|
+
*/
|
|
2467
|
+
class us{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const o=[],i=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,s)=>{const r=t.indexOf(e);-1===r?o.push(e):r!==s&&i.push(e)})),(e.length||o.length||i.length)&&this.callback({addedNodes:e,movedNodes:i,removedNodes:o}),this._storedNodes=t}}
|
|
2468
|
+
/**
|
|
2469
|
+
* @license
|
|
2470
|
+
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
|
2471
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2472
|
+
*/const ds=t=>class extends(Hi(t)){get focused(){return(this._getItems()||[]).find(ts)}get _vertical(){return!0}focus(){const t=this._getItems();if(Array.isArray(t)){const e=this._getAvailableIndex(t,0,null,(t=>!$i(t)));e>=0&&t[e].focus()}}_getItems(){return Array.from(this.children)}_onKeyDown(t){if(super._onKeyDown(t),t.metaKey||t.ctrlKey)return;const{key:e}=t,o=this._getItems()||[],i=o.indexOf(this.focused);let s,r;const n=this._vertical||"rtl"!==this.getAttribute("dir")?1:-1;this.__isPrevKey(e)?(r=-n,s=i-n):this.__isNextKey(e)?(r=n,s=i+n):"Home"===e?(r=1,s=0):"End"===e&&(r=-1,s=o.length-1),s=this._getAvailableIndex(o,s,r,(t=>!$i(t))),s>=0&&(t.preventDefault(),this._focus(s,!0))}__isPrevKey(t){return this._vertical?"ArrowUp"===t:"ArrowLeft"===t}__isNextKey(t){return this._vertical?"ArrowDown"===t:"ArrowRight"===t}_focus(t,e=!1){const o=this._getItems();this._focusItem(o[t],e)}_focusItem(t){t&&(t.focus(),t.setAttribute("focus-ring",""))}_getAvailableIndex(t,e,o,i){const s=t.length;let r=e;for(let e=0;"number"==typeof r&&e<s;e+=1,r+=o||1){r<0?r=s-1:r>=s&&(r=0);const e=t[r];if(!e.hasAttribute("disabled")&&this.__isMatchingItem(e,i))return r}return-1}__isMatchingItem(t,e){return"function"!=typeof e||e(t)}}
|
|
2473
|
+
/**
|
|
2474
|
+
* @license
|
|
2475
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2476
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2477
|
+
*/,ms=t=>class extends(ds(t)){static get properties(){return{_hasVaadinListMixin:{value:!0},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return"horizontal"!==this.orientation}focus(){this._observer&&this._observer.flush();const t=this.querySelector('[tabindex="0"]')||(this.items?this.items[0]:null);this._focusItem(t)}ready(){super.ready(),this.addEventListener("click",(t=>this._onClick(t)));const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new us(t,(()=>{this._setItems(this._filterItems(as(this)))}))}_getItems(){return this.items}_enhanceItems(t,e,o,i){if(!i&&t){this.setAttribute("aria-orientation",e||"vertical"),t.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(o||0);const i=t[o];t.forEach((t=>{t.selected=t===i})),i&&!i.disabled&&this._scrollToItem(o)}}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let o;e&&!e.disabled&&(o=this.items.indexOf(e))>=0&&(this.selected=o)}_searchKey(t,e){return this._searchReset=ns.debounce(this._searchReset,ui.after(500),(()=>{this._searchBuf=""})),this._searchBuf+=e.toLowerCase(),this.items.some((t=>this.__isMatchingKey(t)))||(this._searchBuf=e.toLowerCase()),this._getAvailableIndex(this.items,1===this._searchBuf.length?t+1:t,1,(t=>this.__isMatchingKey(t)&&"none"!==getComputedStyle(t).display))}__isMatchingKey(t){return t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(t){if(t.metaKey||t.ctrlKey)return;const e=t.key,o=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(e)&&1===e.length){const t=this._searchKey(o,e);t>=0&&this._focus(t)}else super._onKeyDown(t)}_isItemHidden(t){return"none"===getComputedStyle(t).display}_setFocusable(t){t=this._getAvailableIndex(this.items,t,1);const e=this.items[t];this.items.forEach((t=>{t.tabIndex=t===e?0:-1}))}_focus(t){this.items.forEach(((e,o)=>{e.focused=o===t})),this._setFocusable(t),this._scrollToItem(t),super._focus(t)}_scrollToItem(t){const e=this.items[t];if(!e)return;const o=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],i=this._scrollerElement.getBoundingClientRect(),s=(this.items[t+1]||e).getBoundingClientRect(),r=(this.items[t-1]||e).getBoundingClientRect();let n=0;!this._isRTL&&s[o[1]]>=i[o[1]]||this._isRTL&&s[o[1]]<=i[o[1]]?n=s[o[1]]-i[o[1]]:(!this._isRTL&&r[o[0]]<=i[o[0]]||this._isRTL&&r[o[0]]>=i[o[0]])&&(n=r[o[0]]-i[o[0]]),this._scroll(n)}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",o=
|
|
2478
|
+
/**
|
|
2479
|
+
* @license
|
|
2480
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2481
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2482
|
+
*/
|
|
2483
|
+
function(t,e){const{scrollLeft:o}=t;return"rtl"!==e?o:t.scrollWidth-t.clientWidth+o}(this._scrollerElement,e)+t;!function(t,e,o){t.scrollLeft="rtl"!==e?o:t.clientWidth-t.scrollWidth+o}
|
|
2484
|
+
/**
|
|
2485
|
+
* @license
|
|
2486
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2487
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2488
|
+
*/(this._scrollerElement,e,o)}}}
|
|
2489
|
+
/**
|
|
2490
|
+
* @license
|
|
2491
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2492
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2493
|
+
*/,ps=Vt((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}}));
|
|
2494
|
+
/**
|
|
2495
|
+
* @license
|
|
2496
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2497
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2498
|
+
*/
|
|
2499
|
+
class fs extends(ms(Ct(Wo(ps(Uo))))){static get is(){return"vaadin-select-list-box"}static get template(){return Do`
|
|
2500
|
+
<style>
|
|
2501
|
+
:host {
|
|
2502
|
+
display: flex;
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
:host([hidden]) {
|
|
2506
|
+
display: none !important;
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
[part='items'] {
|
|
2510
|
+
height: 100%;
|
|
2511
|
+
width: 100%;
|
|
2512
|
+
overflow-y: auto;
|
|
2513
|
+
-webkit-overflow-scrolling: touch;
|
|
2514
|
+
}
|
|
2515
|
+
</style>
|
|
2516
|
+
<div part="items">
|
|
2517
|
+
<slot></slot>
|
|
2518
|
+
</div>
|
|
2519
|
+
`}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox")}}u(fs);
|
|
2520
|
+
/**
|
|
2521
|
+
@license
|
|
2522
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2523
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2524
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2525
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2526
|
+
Code distributed by Google as part of the polymer project is also
|
|
2527
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2528
|
+
*/
|
|
2529
|
+
let vs=!1,bs=[],gs=[];function ys(t){const e=t[0],o=t[1],i=t[2];try{o.apply(e,i)}catch(t){setTimeout((()=>{throw t}))}}
|
|
2530
|
+
/**
|
|
2531
|
+
* @license
|
|
2532
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2533
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2534
|
+
*/
|
|
2535
|
+
const xs=t=>t.test(navigator.userAgent),ws=t=>t.test(navigator.platform);xs(/Android/u),xs(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),xs(/Firefox/u);const As=ws(/^iPad/u)||ws(/^Mac/u)&&navigator.maxTouchPoints>1,ks=ws(/^iPhone/u)||As;xs(/^((?!chrome|android).)*safari/iu),(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
|
|
2536
|
+
/**
|
|
2537
|
+
* @license
|
|
2538
|
+
* Copyright (c) 2017 Anton Korzunov
|
|
2539
|
+
* SPDX-License-Identifier: MIT
|
|
2540
|
+
*/
|
|
2541
|
+
let _s=new WeakMap,Cs=new WeakMap,Ss={},zs=0;const Ts=t=>t&&t.nodeType===Node.ELEMENT_NODE,Ns=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)};
|
|
2542
|
+
/**
|
|
2543
|
+
* @license
|
|
2544
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2545
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2546
|
+
*/
|
|
2547
|
+
class Is{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=((t,e=document.body,o="data-aria-hidden")=>{const i=Array.from(Array.isArray(t)?t:[t]);return e&&i.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,o,i)=>{const s=((t,e)=>Ts(t)?e.map((e=>{if(!Ts(e))return Ns(e,"is not a valid element"),null;let o=e;for(;o&&o!==t;){if(t.contains(o))return e;o=o.getRootNode().host}return Ns(e,"is not contained inside",t),null})).filter((t=>Boolean(t))):(Ns(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);Ss[o]||(Ss[o]=new WeakMap);const r=Ss[o],n=[],a=new Set,l=new Set(s),c=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&c(e),c(t.parentNode||t.host)};s.forEach(c);const h=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(a.has(t))h(t);else{const e=t.getAttribute(i),s=null!==e&&"false"!==e,a=(_s.get(t)||0)+1,l=(r.get(t)||0)+1;_s.set(t,a),r.set(t,l),n.push(t),1===a&&s&&Cs.set(t,!0),1===l&&t.setAttribute(o,"true"),s||t.setAttribute(i,"true")}}))};return h(e),a.clear(),zs+=1,()=>{n.forEach((t=>{const e=_s.get(t)-1,s=r.get(t)-1;_s.set(t,e),r.set(t,s),e||(Cs.has(t)?Cs.delete(t):t.removeAttribute(i)),s||t.removeAttribute(o)})),zs-=1,zs||(_s=new WeakMap,_s=new WeakMap,Cs=new WeakMap,Ss={})}})(i,e,o,"aria-hidden")})(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
|
|
2548
|
+
/**
|
|
2549
|
+
* @license
|
|
2550
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2551
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2552
|
+
*/class Bs{saveFocus(t){this.focusNode=t||Ki()}restoreFocus(){const t=this.focusNode;t&&(Ki()===document.body?setTimeout((()=>t.focus())):t.focus(),this.focusNode=null)}}
|
|
2553
|
+
/**
|
|
2554
|
+
* @license
|
|
2555
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2556
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2557
|
+
*/const Ps=[];class Es{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return es(t,e)?Xi(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(ts).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Ps.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Ps.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Ps).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,o=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];o.focus(),"input"===o.localName&&o.select()}}
|
|
2558
|
+
/**
|
|
2559
|
+
* @license
|
|
2560
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2561
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2562
|
+
*/const Ms=t=>class extends(ps(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Is(this),this.__focusTrapController=new Es(this),this.__focusRestorationController=new Bs}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()&&this.__focusRestorationController.restoreFocus()}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=Ki();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const o=t.ownerDocument;for(;e&&e!==o&&e!==this;)e=e.parentNode||e.host;return e===this}}
|
|
2563
|
+
/**
|
|
2564
|
+
* @license
|
|
2565
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2566
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2567
|
+
*/,Os=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Ds=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Os().pop())()}bringToFront(){let t="";const e=Os().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Os().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Os();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
|
|
2568
|
+
/**
|
|
2569
|
+
* @license
|
|
2570
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2571
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2572
|
+
*/,js=t=>class extends(Ms(Ds(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),ks&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth,o=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&o>t?o-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,o,i){const s=this._oldOwner!==e||this._oldModel!==o;this._oldModel=o,this._oldOwner=e;const r=this._oldRenderer!==t;this._oldRenderer=t;const n=this._oldOpened!==i;this._oldOpened=i,r&&(this.innerHTML="",delete this._$litPart$),i&&t&&(r||n||s)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){var o;t?(this._saveFocus(),this._animatedOpening(),o=()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)},vs||(vs=!0,requestAnimationFrame((function(){vs=!1,function(t){for(;t.length;)ys(t.shift())}(bs),setTimeout((function(){!function(t){for(let e=0,o=t.length;e<o;e++)ys(t.shift())}(gs)}))}))),gs.push([this,o,undefined]),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const o=`__${t}Handler`,i=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",i),delete this[o])};this[o]=i,this.addEventListener("animationend",i)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
|
|
2573
|
+
/**
|
|
2574
|
+
* @license
|
|
2575
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2576
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2577
|
+
*/,Us={start:"top",end:"bottom"},Fs={start:"left",end:"right"},Rs=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),Ls=t=>class 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:!1},noVerticalOverlap:{type:Boolean,value:!1},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(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Rs.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Rs.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this.setAttribute("dir",t.direction),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect(),e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const o=this.__isRTL,i=this.__shouldAlignStartHorizontally(t,o),s=!o&&i||o&&!i;this.style.alignItems=s?"flex-start":"flex-end";const r=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,Us,this,e),a=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Fs,this,i);Object.assign(this.style,n,a),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!s),this.toggleAttribute("start-aligned",s)}__shouldAlignStartHorizontally(t,e){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const i=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,o,i,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Fs)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,o,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,Us)}__shouldAlignStart(t,e,o,i,s,r,n){const a=o-t[r?n.end:n.start]-i[n.end],l=t[r?n.start:n.end]-i[n.start],c=s?a:l;return s===(c>(s?l:a)||c>e)}__adjustBottomProperty(t,e,o){let i;if(t===e.end){if(e.end===Us.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);o>t&&this.__oldViewportHeight&&(i=o-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Fs.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);o>t&&this.__oldViewportWidth&&(i=o-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return i}__calculatePositionInOneDimension(t,e,o,i,s,r){const n=r?i.start:i.end,a=r?i.end:i.start,l=parseFloat(s.style[n]||getComputedStyle(s)[n]),c=this.__adjustBottomProperty(n,i,l),h=c?`${c}px`:`${l+(e[r?i.start:i.end]-t[o===r?i.end:i.start])*(r?-1:1)}px`;return{[n]:h,[a]:""}}}
|
|
2578
|
+
/**
|
|
2579
|
+
* @license
|
|
2580
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2581
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2582
|
+
*/;xt("vaadin-select-overlay",[g`
|
|
2583
|
+
:host {
|
|
2584
|
+
z-index: 200;
|
|
2585
|
+
position: fixed;
|
|
2586
|
+
|
|
2587
|
+
/* Despite of what the names say, <vaadin-overlay> is just a container
|
|
2588
|
+
for position/sizing/alignment. The actual overlay is the overlay part. */
|
|
2589
|
+
|
|
2590
|
+
/* Default position constraints: the entire viewport. Note: themes can
|
|
2591
|
+
override this to introduce gaps between the overlay and the viewport. */
|
|
2592
|
+
inset: 0;
|
|
2593
|
+
bottom: var(--vaadin-overlay-viewport-bottom);
|
|
2594
|
+
|
|
2595
|
+
/* Use flexbox alignment for the overlay part. */
|
|
2596
|
+
display: flex;
|
|
2597
|
+
flex-direction: column; /* makes dropdowns sizing easier */
|
|
2598
|
+
/* Align to center by default. */
|
|
2599
|
+
align-items: center;
|
|
2600
|
+
justify-content: center;
|
|
2601
|
+
|
|
2602
|
+
/* Allow centering when max-width/max-height applies. */
|
|
2603
|
+
margin: auto;
|
|
2604
|
+
|
|
2605
|
+
/* The host is not clickable, only the overlay part is. */
|
|
2606
|
+
pointer-events: none;
|
|
2607
|
+
|
|
2608
|
+
/* Remove tap highlight on touch devices. */
|
|
2609
|
+
-webkit-tap-highlight-color: transparent;
|
|
2610
|
+
|
|
2611
|
+
/* CSS API for host */
|
|
2612
|
+
--vaadin-overlay-viewport-bottom: 0;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
:host([hidden]),
|
|
2616
|
+
:host(:not([opened]):not([closing])) {
|
|
2617
|
+
display: none !important;
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
[part='overlay'] {
|
|
2621
|
+
-webkit-overflow-scrolling: touch;
|
|
2622
|
+
overflow: auto;
|
|
2623
|
+
pointer-events: auto;
|
|
2624
|
+
|
|
2625
|
+
/* Prevent overflowing the host */
|
|
2626
|
+
max-width: 100%;
|
|
2627
|
+
box-sizing: border-box;
|
|
2628
|
+
|
|
2629
|
+
-webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
[part='backdrop'] {
|
|
2633
|
+
z-index: -1;
|
|
2634
|
+
content: '';
|
|
2635
|
+
background: rgba(0, 0, 0, 0.5);
|
|
2636
|
+
position: fixed;
|
|
2637
|
+
inset: 0;
|
|
2638
|
+
pointer-events: auto;
|
|
2639
|
+
}
|
|
2640
|
+
`
|
|
2641
|
+
/**
|
|
2642
|
+
* @license
|
|
2643
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2644
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2645
|
+
*/,g`
|
|
2646
|
+
:host {
|
|
2647
|
+
align-items: flex-start;
|
|
2648
|
+
justify-content: flex-start;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
@media (forced-colors: active) {
|
|
2652
|
+
[part='overlay'] {
|
|
2653
|
+
outline: 3px solid;
|
|
2654
|
+
}
|
|
2655
|
+
}
|
|
2656
|
+
`],{moduleId:"vaadin-select-overlay-styles"});class Ws extends(Ls(js(Wo(Ct(Uo))))){static get is(){return"vaadin-select-overlay"}static get template(){return Do`
|
|
2657
|
+
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
2658
|
+
<div part="overlay" id="overlay" tabindex="0">
|
|
2659
|
+
<div part="content" id="content">
|
|
2660
|
+
<slot></slot>
|
|
2661
|
+
</div>
|
|
2662
|
+
</div>
|
|
2663
|
+
`}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t)}}_getMenuElement(){return Array.from(this.children).find((t=>"style"!==t.localName))}}u(Ws);
|
|
2664
|
+
/**
|
|
2665
|
+
* @license
|
|
2666
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2667
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2668
|
+
*/
|
|
2669
|
+
const Gs=t=>class extends(Yi(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}
|
|
2670
|
+
/**
|
|
2671
|
+
* @license
|
|
2672
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2673
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2674
|
+
*/,qs=t=>class extends(Zi(Gs(os(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
|
|
2675
|
+
/**
|
|
2676
|
+
* @license
|
|
2677
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2678
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2679
|
+
*/;
|
|
2680
|
+
/**
|
|
2681
|
+
* @license
|
|
2682
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2683
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2684
|
+
*/
|
|
2685
|
+
xt("vaadin-select-value-button",g`
|
|
2686
|
+
:host {
|
|
2687
|
+
display: inline-block;
|
|
2688
|
+
position: relative;
|
|
2689
|
+
outline: none;
|
|
2690
|
+
white-space: nowrap;
|
|
2691
|
+
-webkit-user-select: none;
|
|
2692
|
+
-moz-user-select: none;
|
|
2693
|
+
user-select: none;
|
|
2694
|
+
min-width: 0;
|
|
2695
|
+
width: 0;
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
::slotted(*) {
|
|
2699
|
+
padding-left: 0;
|
|
2700
|
+
padding-right: 0;
|
|
2701
|
+
flex: auto;
|
|
2702
|
+
}
|
|
2703
|
+
|
|
2704
|
+
/* placeholder styles */
|
|
2705
|
+
::slotted(*:not([selected])) {
|
|
2706
|
+
line-height: 1;
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
.vaadin-button-container {
|
|
2710
|
+
display: inline-flex;
|
|
2711
|
+
align-items: center;
|
|
2712
|
+
justify-content: center;
|
|
2713
|
+
text-align: inherit;
|
|
2714
|
+
width: 100%;
|
|
2715
|
+
height: 100%;
|
|
2716
|
+
min-height: inherit;
|
|
2717
|
+
text-shadow: inherit;
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
[part='label'] {
|
|
2721
|
+
white-space: nowrap;
|
|
2722
|
+
overflow: hidden;
|
|
2723
|
+
text-overflow: ellipsis;
|
|
2724
|
+
width: 100%;
|
|
2725
|
+
line-height: inherit;
|
|
2726
|
+
}
|
|
2727
|
+
`,{moduleId:"vaadin-select-value-button-styles"});class Ys extends(qs(Ct(Uo))){static get is(){return"vaadin-select-value-button"}static get template(){return Do`
|
|
2728
|
+
<div class="vaadin-button-container">
|
|
2729
|
+
<span part="label">
|
|
2730
|
+
<slot></slot>
|
|
2731
|
+
</span>
|
|
2732
|
+
</div>
|
|
2733
|
+
`}}u(Ys);
|
|
2734
|
+
/**
|
|
2735
|
+
* @license
|
|
2736
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
2737
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2738
|
+
*/
|
|
2739
|
+
const Hs=g`
|
|
2740
|
+
.sr-only {
|
|
2741
|
+
border: 0 !important;
|
|
2742
|
+
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
2743
|
+
-webkit-clip-path: inset(50%) !important;
|
|
2744
|
+
clip-path: inset(50%) !important;
|
|
2745
|
+
height: 1px !important;
|
|
2746
|
+
margin: -1px !important;
|
|
2747
|
+
overflow: hidden !important;
|
|
2748
|
+
padding: 0 !important;
|
|
2749
|
+
position: absolute !important;
|
|
2750
|
+
width: 1px !important;
|
|
2751
|
+
white-space: nowrap !important;
|
|
2752
|
+
}
|
|
2753
|
+
`,Zs=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Js=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Ks(t,e){if("function"!=typeof t)return;const o=Zs.exec(t.toString());if(o)try{t=new Function(o[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function Vs(){
|
|
2754
|
+
/*! vaadin-dev-mode:start
|
|
2755
|
+
(function () {
|
|
2756
|
+
'use strict';
|
|
2757
|
+
|
|
2758
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
2759
|
+
return typeof obj;
|
|
2760
|
+
} : function (obj) {
|
|
2761
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2762
|
+
};
|
|
2763
|
+
|
|
2764
|
+
var classCallCheck = function (instance, Constructor) {
|
|
2765
|
+
if (!(instance instanceof Constructor)) {
|
|
2766
|
+
throw new TypeError("Cannot call a class as a function");
|
|
2767
|
+
}
|
|
2768
|
+
};
|
|
2769
|
+
|
|
2770
|
+
var createClass = function () {
|
|
2771
|
+
function defineProperties(target, props) {
|
|
2772
|
+
for (var i = 0; i < props.length; i++) {
|
|
2773
|
+
var descriptor = props[i];
|
|
2774
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
2775
|
+
descriptor.configurable = true;
|
|
2776
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
2777
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
return function (Constructor, protoProps, staticProps) {
|
|
2782
|
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
2783
|
+
if (staticProps) defineProperties(Constructor, staticProps);
|
|
2784
|
+
return Constructor;
|
|
2785
|
+
};
|
|
2786
|
+
}();
|
|
2787
|
+
|
|
2788
|
+
var getPolymerVersion = function getPolymerVersion() {
|
|
2789
|
+
return window.Polymer && window.Polymer.version;
|
|
2790
|
+
};
|
|
2791
|
+
|
|
2792
|
+
var StatisticsGatherer = function () {
|
|
2793
|
+
function StatisticsGatherer(logger) {
|
|
2794
|
+
classCallCheck(this, StatisticsGatherer);
|
|
2795
|
+
|
|
2796
|
+
this.now = new Date().getTime();
|
|
2797
|
+
this.logger = logger;
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2800
|
+
createClass(StatisticsGatherer, [{
|
|
2801
|
+
key: 'frameworkVersionDetectors',
|
|
2802
|
+
value: function frameworkVersionDetectors() {
|
|
2803
|
+
return {
|
|
2804
|
+
'Flow': function Flow() {
|
|
2805
|
+
if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {
|
|
2806
|
+
var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {
|
|
2807
|
+
return window.Vaadin.Flow.clients[key];
|
|
2808
|
+
}).filter(function (client) {
|
|
2809
|
+
return client.getVersionInfo;
|
|
2810
|
+
}).map(function (client) {
|
|
2811
|
+
return client.getVersionInfo().flow;
|
|
2812
|
+
});
|
|
2813
|
+
if (flowVersions.length > 0) {
|
|
2814
|
+
return flowVersions[0];
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
},
|
|
2818
|
+
'Vaadin Framework': function VaadinFramework() {
|
|
2819
|
+
if (window.vaadin && window.vaadin.clients) {
|
|
2820
|
+
var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {
|
|
2821
|
+
return client.getVersionInfo;
|
|
2822
|
+
}).map(function (client) {
|
|
2823
|
+
return client.getVersionInfo().vaadinVersion;
|
|
2824
|
+
});
|
|
2825
|
+
if (frameworkVersions.length > 0) {
|
|
2826
|
+
return frameworkVersions[0];
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2829
|
+
},
|
|
2830
|
+
'AngularJs': function AngularJs() {
|
|
2831
|
+
if (window.angular && window.angular.version && window.angular.version) {
|
|
2832
|
+
return window.angular.version.full;
|
|
2833
|
+
}
|
|
2834
|
+
},
|
|
2835
|
+
'Angular': function Angular() {
|
|
2836
|
+
if (window.ng) {
|
|
2837
|
+
var tags = document.querySelectorAll("[ng-version]");
|
|
2838
|
+
if (tags.length > 0) {
|
|
2839
|
+
return tags[0].getAttribute("ng-version");
|
|
2840
|
+
}
|
|
2841
|
+
return "Unknown";
|
|
2842
|
+
}
|
|
2843
|
+
},
|
|
2844
|
+
'Backbone.js': function BackboneJs() {
|
|
2845
|
+
if (window.Backbone) {
|
|
2846
|
+
return window.Backbone.VERSION;
|
|
2847
|
+
}
|
|
2848
|
+
},
|
|
2849
|
+
'React': function React() {
|
|
2850
|
+
var reactSelector = '[data-reactroot], [data-reactid]';
|
|
2851
|
+
if (!!document.querySelector(reactSelector)) {
|
|
2852
|
+
// React does not publish the version by default
|
|
2853
|
+
return "unknown";
|
|
2854
|
+
}
|
|
2855
|
+
},
|
|
2856
|
+
'Ember': function Ember() {
|
|
2857
|
+
if (window.Em && window.Em.VERSION) {
|
|
2858
|
+
return window.Em.VERSION;
|
|
2859
|
+
} else if (window.Ember && window.Ember.VERSION) {
|
|
2860
|
+
return window.Ember.VERSION;
|
|
2861
|
+
}
|
|
2862
|
+
},
|
|
2863
|
+
'jQuery': function (_jQuery) {
|
|
2864
|
+
function jQuery() {
|
|
2865
|
+
return _jQuery.apply(this, arguments);
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
jQuery.toString = function () {
|
|
2869
|
+
return _jQuery.toString();
|
|
2870
|
+
};
|
|
2871
|
+
|
|
2872
|
+
return jQuery;
|
|
2873
|
+
}(function () {
|
|
2874
|
+
if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {
|
|
2875
|
+
return jQuery.prototype.jquery;
|
|
2876
|
+
}
|
|
2877
|
+
}),
|
|
2878
|
+
'Polymer': function Polymer() {
|
|
2879
|
+
var version = getPolymerVersion();
|
|
2880
|
+
if (version) {
|
|
2881
|
+
return version;
|
|
2882
|
+
}
|
|
2883
|
+
},
|
|
2884
|
+
'LitElement': function LitElement() {
|
|
2885
|
+
var version = window.litElementVersions && window.litElementVersions[0];
|
|
2886
|
+
if (version) {
|
|
2887
|
+
return version;
|
|
2888
|
+
}
|
|
2889
|
+
},
|
|
2890
|
+
'LitHtml': function LitHtml() {
|
|
2891
|
+
var version = window.litHtmlVersions && window.litHtmlVersions[0];
|
|
2892
|
+
if (version) {
|
|
2893
|
+
return version;
|
|
2894
|
+
}
|
|
2895
|
+
},
|
|
2896
|
+
'Vue.js': function VueJs() {
|
|
2897
|
+
if (window.Vue) {
|
|
2898
|
+
return window.Vue.version;
|
|
2899
|
+
}
|
|
2900
|
+
}
|
|
2901
|
+
};
|
|
2902
|
+
}
|
|
2903
|
+
}, {
|
|
2904
|
+
key: 'getUsedVaadinElements',
|
|
2905
|
+
value: function getUsedVaadinElements(elements) {
|
|
2906
|
+
var version = getPolymerVersion();
|
|
2907
|
+
var elementClasses = void 0;
|
|
2908
|
+
// NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.
|
|
2909
|
+
// Check all locations calling the method getEntries() in
|
|
2910
|
+
// https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106
|
|
2911
|
+
// Currently it is only used by BootstrapHandler.
|
|
2912
|
+
if (version && version.indexOf('2') === 0) {
|
|
2913
|
+
// Polymer 2: components classes are stored in window.Vaadin
|
|
2914
|
+
elementClasses = Object.keys(window.Vaadin).map(function (c) {
|
|
2915
|
+
return window.Vaadin[c];
|
|
2916
|
+
}).filter(function (c) {
|
|
2917
|
+
return c.is;
|
|
2918
|
+
});
|
|
2919
|
+
} else {
|
|
2920
|
+
// Polymer 3: components classes are stored in window.Vaadin.registrations
|
|
2921
|
+
elementClasses = window.Vaadin.registrations || [];
|
|
2922
|
+
}
|
|
2923
|
+
elementClasses.forEach(function (klass) {
|
|
2924
|
+
var version = klass.version ? klass.version : "0.0.0";
|
|
2925
|
+
elements[klass.is] = { version: version };
|
|
2926
|
+
});
|
|
2927
|
+
}
|
|
2928
|
+
}, {
|
|
2929
|
+
key: 'getUsedVaadinThemes',
|
|
2930
|
+
value: function getUsedVaadinThemes(themes) {
|
|
2931
|
+
['Lumo', 'Material'].forEach(function (themeName) {
|
|
2932
|
+
var theme;
|
|
2933
|
+
var version = getPolymerVersion();
|
|
2934
|
+
if (version && version.indexOf('2') === 0) {
|
|
2935
|
+
// Polymer 2: themes are stored in window.Vaadin
|
|
2936
|
+
theme = window.Vaadin[themeName];
|
|
2937
|
+
} else {
|
|
2938
|
+
// Polymer 3: themes are stored in custom element registry
|
|
2939
|
+
theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');
|
|
2940
|
+
}
|
|
2941
|
+
if (theme && theme.version) {
|
|
2942
|
+
themes[themeName] = { version: theme.version };
|
|
2943
|
+
}
|
|
2944
|
+
});
|
|
2945
|
+
}
|
|
2946
|
+
}, {
|
|
2947
|
+
key: 'getFrameworks',
|
|
2948
|
+
value: function getFrameworks(frameworks) {
|
|
2949
|
+
var detectors = this.frameworkVersionDetectors();
|
|
2950
|
+
Object.keys(detectors).forEach(function (framework) {
|
|
2951
|
+
var detector = detectors[framework];
|
|
2952
|
+
try {
|
|
2953
|
+
var version = detector();
|
|
2954
|
+
if (version) {
|
|
2955
|
+
frameworks[framework] = { version: version };
|
|
2956
|
+
}
|
|
2957
|
+
} catch (e) {}
|
|
2958
|
+
});
|
|
2959
|
+
}
|
|
2960
|
+
}, {
|
|
2961
|
+
key: 'gather',
|
|
2962
|
+
value: function gather(storage) {
|
|
2963
|
+
var storedStats = storage.read();
|
|
2964
|
+
var gatheredStats = {};
|
|
2965
|
+
var types = ["elements", "frameworks", "themes"];
|
|
2966
|
+
|
|
2967
|
+
types.forEach(function (type) {
|
|
2968
|
+
gatheredStats[type] = {};
|
|
2969
|
+
if (!storedStats[type]) {
|
|
2970
|
+
storedStats[type] = {};
|
|
2971
|
+
}
|
|
2972
|
+
});
|
|
2973
|
+
|
|
2974
|
+
var previousStats = JSON.stringify(storedStats);
|
|
2975
|
+
|
|
2976
|
+
this.getUsedVaadinElements(gatheredStats.elements);
|
|
2977
|
+
this.getFrameworks(gatheredStats.frameworks);
|
|
2978
|
+
this.getUsedVaadinThemes(gatheredStats.themes);
|
|
2979
|
+
|
|
2980
|
+
var now = this.now;
|
|
2981
|
+
types.forEach(function (type) {
|
|
2982
|
+
var keys = Object.keys(gatheredStats[type]);
|
|
2983
|
+
keys.forEach(function (key) {
|
|
2984
|
+
if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {
|
|
2985
|
+
storedStats[type][key] = { firstUsed: now };
|
|
2986
|
+
}
|
|
2987
|
+
// Discards any previously logged version number
|
|
2988
|
+
storedStats[type][key].version = gatheredStats[type][key].version;
|
|
2989
|
+
storedStats[type][key].lastUsed = now;
|
|
2990
|
+
});
|
|
2991
|
+
});
|
|
2992
|
+
|
|
2993
|
+
var newStats = JSON.stringify(storedStats);
|
|
2994
|
+
storage.write(newStats);
|
|
2995
|
+
if (newStats != previousStats && Object.keys(storedStats).length > 0) {
|
|
2996
|
+
this.logger.debug("New stats: " + newStats);
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
}]);
|
|
3000
|
+
return StatisticsGatherer;
|
|
3001
|
+
}();
|
|
3002
|
+
|
|
3003
|
+
var StatisticsStorage = function () {
|
|
3004
|
+
function StatisticsStorage(key) {
|
|
3005
|
+
classCallCheck(this, StatisticsStorage);
|
|
3006
|
+
|
|
3007
|
+
this.key = key;
|
|
3008
|
+
}
|
|
3009
|
+
|
|
3010
|
+
createClass(StatisticsStorage, [{
|
|
3011
|
+
key: 'read',
|
|
3012
|
+
value: function read() {
|
|
3013
|
+
var localStorageStatsString = localStorage.getItem(this.key);
|
|
3014
|
+
try {
|
|
3015
|
+
return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');
|
|
3016
|
+
} catch (e) {
|
|
3017
|
+
return {};
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
}, {
|
|
3021
|
+
key: 'write',
|
|
3022
|
+
value: function write(data) {
|
|
3023
|
+
localStorage.setItem(this.key, data);
|
|
3024
|
+
}
|
|
3025
|
+
}, {
|
|
3026
|
+
key: 'clear',
|
|
3027
|
+
value: function clear() {
|
|
3028
|
+
localStorage.removeItem(this.key);
|
|
3029
|
+
}
|
|
3030
|
+
}, {
|
|
3031
|
+
key: 'isEmpty',
|
|
3032
|
+
value: function isEmpty() {
|
|
3033
|
+
var storedStats = this.read();
|
|
3034
|
+
var empty = true;
|
|
3035
|
+
Object.keys(storedStats).forEach(function (key) {
|
|
3036
|
+
if (Object.keys(storedStats[key]).length > 0) {
|
|
3037
|
+
empty = false;
|
|
3038
|
+
}
|
|
3039
|
+
});
|
|
3040
|
+
|
|
3041
|
+
return empty;
|
|
3042
|
+
}
|
|
3043
|
+
}]);
|
|
3044
|
+
return StatisticsStorage;
|
|
3045
|
+
}();
|
|
3046
|
+
|
|
3047
|
+
var StatisticsSender = function () {
|
|
3048
|
+
function StatisticsSender(url, logger) {
|
|
3049
|
+
classCallCheck(this, StatisticsSender);
|
|
3050
|
+
|
|
3051
|
+
this.url = url;
|
|
3052
|
+
this.logger = logger;
|
|
3053
|
+
}
|
|
3054
|
+
|
|
3055
|
+
createClass(StatisticsSender, [{
|
|
3056
|
+
key: 'send',
|
|
3057
|
+
value: function send(data, errorHandler) {
|
|
3058
|
+
var logger = this.logger;
|
|
3059
|
+
|
|
3060
|
+
if (navigator.onLine === false) {
|
|
3061
|
+
logger.debug("Offline, can't send");
|
|
3062
|
+
errorHandler();
|
|
3063
|
+
return;
|
|
3064
|
+
}
|
|
3065
|
+
logger.debug("Sending data to " + this.url);
|
|
3066
|
+
|
|
3067
|
+
var req = new XMLHttpRequest();
|
|
3068
|
+
req.withCredentials = true;
|
|
3069
|
+
req.addEventListener("load", function () {
|
|
3070
|
+
// Stats sent, nothing more to do
|
|
3071
|
+
logger.debug("Response: " + req.responseText);
|
|
3072
|
+
});
|
|
3073
|
+
req.addEventListener("error", function () {
|
|
3074
|
+
logger.debug("Send failed");
|
|
3075
|
+
errorHandler();
|
|
3076
|
+
});
|
|
3077
|
+
req.addEventListener("abort", function () {
|
|
3078
|
+
logger.debug("Send aborted");
|
|
3079
|
+
errorHandler();
|
|
3080
|
+
});
|
|
3081
|
+
req.open("POST", this.url);
|
|
3082
|
+
req.setRequestHeader("Content-Type", "application/json");
|
|
3083
|
+
req.send(data);
|
|
3084
|
+
}
|
|
3085
|
+
}]);
|
|
3086
|
+
return StatisticsSender;
|
|
3087
|
+
}();
|
|
3088
|
+
|
|
3089
|
+
var StatisticsLogger = function () {
|
|
3090
|
+
function StatisticsLogger(id) {
|
|
3091
|
+
classCallCheck(this, StatisticsLogger);
|
|
3092
|
+
|
|
3093
|
+
this.id = id;
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3096
|
+
createClass(StatisticsLogger, [{
|
|
3097
|
+
key: '_isDebug',
|
|
3098
|
+
value: function _isDebug() {
|
|
3099
|
+
return localStorage.getItem("vaadin." + this.id + ".debug");
|
|
3100
|
+
}
|
|
3101
|
+
}, {
|
|
3102
|
+
key: 'debug',
|
|
3103
|
+
value: function debug(msg) {
|
|
3104
|
+
if (this._isDebug()) {
|
|
3105
|
+
console.info(this.id + ": " + msg);
|
|
3106
|
+
}
|
|
3107
|
+
}
|
|
3108
|
+
}]);
|
|
3109
|
+
return StatisticsLogger;
|
|
3110
|
+
}();
|
|
3111
|
+
|
|
3112
|
+
var UsageStatistics = function () {
|
|
3113
|
+
function UsageStatistics() {
|
|
3114
|
+
classCallCheck(this, UsageStatistics);
|
|
3115
|
+
|
|
3116
|
+
this.now = new Date();
|
|
3117
|
+
this.timeNow = this.now.getTime();
|
|
3118
|
+
this.gatherDelay = 10; // Delay between loading this file and gathering stats
|
|
3119
|
+
this.initialDelay = 24 * 60 * 60;
|
|
3120
|
+
|
|
3121
|
+
this.logger = new StatisticsLogger("statistics");
|
|
3122
|
+
this.storage = new StatisticsStorage("vaadin.statistics.basket");
|
|
3123
|
+
this.gatherer = new StatisticsGatherer(this.logger);
|
|
3124
|
+
this.sender = new StatisticsSender("https://tools.vaadin.com/usage-stats/submit", this.logger);
|
|
3125
|
+
}
|
|
3126
|
+
|
|
3127
|
+
createClass(UsageStatistics, [{
|
|
3128
|
+
key: 'maybeGatherAndSend',
|
|
3129
|
+
value: function maybeGatherAndSend() {
|
|
3130
|
+
var _this = this;
|
|
3131
|
+
|
|
3132
|
+
if (localStorage.getItem(UsageStatistics.optOutKey)) {
|
|
3133
|
+
return;
|
|
3134
|
+
}
|
|
3135
|
+
this.gatherer.gather(this.storage);
|
|
3136
|
+
setTimeout(function () {
|
|
3137
|
+
_this.maybeSend();
|
|
3138
|
+
}, this.gatherDelay * 1000);
|
|
3139
|
+
}
|
|
3140
|
+
}, {
|
|
3141
|
+
key: 'lottery',
|
|
3142
|
+
value: function lottery() {
|
|
3143
|
+
return true;
|
|
3144
|
+
}
|
|
3145
|
+
}, {
|
|
3146
|
+
key: 'currentMonth',
|
|
3147
|
+
value: function currentMonth() {
|
|
3148
|
+
return this.now.getYear() * 12 + this.now.getMonth();
|
|
3149
|
+
}
|
|
3150
|
+
}, {
|
|
3151
|
+
key: 'maybeSend',
|
|
3152
|
+
value: function maybeSend() {
|
|
3153
|
+
var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
3154
|
+
var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));
|
|
3155
|
+
|
|
3156
|
+
if (!firstUse) {
|
|
3157
|
+
// Use a grace period to avoid interfering with tests, incognito mode etc
|
|
3158
|
+
firstUse = this.timeNow;
|
|
3159
|
+
localStorage.setItem(UsageStatistics.firstUseKey, firstUse);
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3162
|
+
if (this.timeNow < firstUse + this.initialDelay * 1000) {
|
|
3163
|
+
this.logger.debug("No statistics will be sent until the initial delay of " + this.initialDelay + "s has passed");
|
|
3164
|
+
return;
|
|
3165
|
+
}
|
|
3166
|
+
if (this.currentMonth() <= monthProcessed) {
|
|
3167
|
+
this.logger.debug("This month has already been processed");
|
|
3168
|
+
return;
|
|
3169
|
+
}
|
|
3170
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());
|
|
3171
|
+
// Use random sampling
|
|
3172
|
+
if (this.lottery()) {
|
|
3173
|
+
this.logger.debug("Congratulations, we have a winner!");
|
|
3174
|
+
} else {
|
|
3175
|
+
this.logger.debug("Sorry, no stats from you this time");
|
|
3176
|
+
return;
|
|
3177
|
+
}
|
|
3178
|
+
|
|
3179
|
+
this.send();
|
|
3180
|
+
}
|
|
3181
|
+
}, {
|
|
3182
|
+
key: 'send',
|
|
3183
|
+
value: function send() {
|
|
3184
|
+
// Ensure we have the latest data
|
|
3185
|
+
this.gatherer.gather(this.storage);
|
|
3186
|
+
|
|
3187
|
+
// Read, send and clean up
|
|
3188
|
+
var data = this.storage.read();
|
|
3189
|
+
data["firstUse"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
3190
|
+
data["usageStatisticsVersion"] = UsageStatistics.version;
|
|
3191
|
+
var info = 'This request contains usage statistics gathered from the application running in development mode. \n\nStatistics gathering is automatically disabled and excluded from production builds.\n\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\n\n\n\n';
|
|
3192
|
+
var self = this;
|
|
3193
|
+
this.sender.send(info + JSON.stringify(data), function () {
|
|
3194
|
+
// Revert the 'month processed' flag
|
|
3195
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);
|
|
3196
|
+
});
|
|
3197
|
+
}
|
|
3198
|
+
}], [{
|
|
3199
|
+
key: 'version',
|
|
3200
|
+
get: function get$1() {
|
|
3201
|
+
return '2.1.2';
|
|
3202
|
+
}
|
|
3203
|
+
}, {
|
|
3204
|
+
key: 'firstUseKey',
|
|
3205
|
+
get: function get$1() {
|
|
3206
|
+
return 'vaadin.statistics.firstuse';
|
|
3207
|
+
}
|
|
3208
|
+
}, {
|
|
3209
|
+
key: 'monthProcessedKey',
|
|
3210
|
+
get: function get$1() {
|
|
3211
|
+
return 'vaadin.statistics.monthProcessed';
|
|
3212
|
+
}
|
|
3213
|
+
}, {
|
|
3214
|
+
key: 'optOutKey',
|
|
3215
|
+
get: function get$1() {
|
|
3216
|
+
return 'vaadin.statistics.optout';
|
|
3217
|
+
}
|
|
3218
|
+
}]);
|
|
3219
|
+
return UsageStatistics;
|
|
3220
|
+
}();
|
|
3221
|
+
|
|
3222
|
+
try {
|
|
3223
|
+
window.Vaadin = window.Vaadin || {};
|
|
3224
|
+
window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();
|
|
3225
|
+
window.Vaadin.usageStatsChecker.maybeGatherAndSend();
|
|
3226
|
+
} catch (e) {
|
|
3227
|
+
// Intentionally ignored as this is not a problem in the app being developed
|
|
3228
|
+
}
|
|
3229
|
+
|
|
3230
|
+
}());
|
|
3231
|
+
|
|
3232
|
+
vaadin-dev-mode:end **/}let Qs;void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(Js?!(Js&&Object.keys(Js).map((t=>Js[t])).filter((t=>t.productionMode)).length>0):!Ks((function(){return!0})))}catch(t){return!1}}()),
|
|
3233
|
+
/**
|
|
3234
|
+
* @license
|
|
3235
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3236
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3237
|
+
*/
|
|
3238
|
+
window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)Ks(t,e)}(Vs)};const Xs=new Set,$s=t=>class extends(Wo(t)){static get version(){return"24.2.9"}static finalize(){super.finalize();const{is:t}=this;t&&!Xs.has(t)&&(window.Vaadin.registrations.push(this),Xs.add(t),window.Vaadin.developmentModeCallback&&(Qs=ns.debounce(Qs,di,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),rs.add(Qs)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
|
|
3239
|
+
/**
|
|
3240
|
+
* @license
|
|
3241
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3242
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3243
|
+
*/,tr=g`
|
|
3244
|
+
:host {
|
|
3245
|
+
display: inline-flex;
|
|
3246
|
+
outline: none;
|
|
3247
|
+
}
|
|
3248
|
+
|
|
3249
|
+
:host::before {
|
|
3250
|
+
content: '\\2003';
|
|
3251
|
+
width: 0;
|
|
3252
|
+
display: inline-block;
|
|
3253
|
+
/* Size and position this element on the same vertical position as the input-field element
|
|
3254
|
+
to make vertical align for the host element work as expected */
|
|
3255
|
+
}
|
|
3256
|
+
|
|
3257
|
+
:host([hidden]) {
|
|
3258
|
+
display: none !important;
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3261
|
+
:host(:not([has-label])) [part='label'] {
|
|
3262
|
+
display: none;
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
@media (forced-colors: active) {
|
|
3266
|
+
:host(:not([readonly])) [part='input-field'] {
|
|
3267
|
+
outline: 1px solid;
|
|
3268
|
+
outline-offset: -1px;
|
|
3269
|
+
}
|
|
3270
|
+
:host([focused]) [part='input-field'] {
|
|
3271
|
+
outline-width: 2px;
|
|
3272
|
+
}
|
|
3273
|
+
:host([disabled]) [part='input-field'] {
|
|
3274
|
+
outline-color: GrayText;
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3277
|
+
`
|
|
3278
|
+
/**
|
|
3279
|
+
* @license
|
|
3280
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
3281
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3282
|
+
*/,er=g`
|
|
3283
|
+
[class$='container'] {
|
|
3284
|
+
display: flex;
|
|
3285
|
+
flex-direction: column;
|
|
3286
|
+
min-width: 100%;
|
|
3287
|
+
max-width: 100%;
|
|
3288
|
+
width: var(--vaadin-field-default-width, 12em);
|
|
3289
|
+
}
|
|
3290
|
+
`
|
|
3291
|
+
/**
|
|
3292
|
+
* @license
|
|
3293
|
+
* Copyright (c) 2023 Vaadin Ltd.
|
|
3294
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3295
|
+
*/,or=new Map;function ir(t){return or.has(t)||or.set(t,new WeakMap),or.get(t)}function sr(t,e){t&&t.removeAttribute(e)}function rr(t,e){if(!t||!e)return;const o=ir(e);if(o.has(t))return;const i=ls(t.getAttribute(e));o.set(t,new Set(i))}function nr(t,e,o={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:i,oldId:s,fromUser:r}=o,n=ir(e),a=n.get(t);if(!r&&a)return s&&a.delete(s),void(i&&a.add(i));r&&(a?i||n.delete(t):rr(t,e),sr(t,e)),function(t,e,o){const i=ls(t.getAttribute(e));i.delete(o),0!==i.size?t.setAttribute(e,cs(i)):t.removeAttribute(e)}(t,e,s);const l=i||cs(a);l&&hs(t,e,l)}
|
|
3296
|
+
/**
|
|
3297
|
+
* @license
|
|
3298
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3299
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3300
|
+
*/
|
|
3301
|
+
const ar=Vt((t=>class extends(os(Gs(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),lr=Vt((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,o)=>{this._delegateAttribute(e,t[o])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,o)=>{this._delegateProperty(e,t[o])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}}));
|
|
3302
|
+
/**
|
|
3303
|
+
* @license
|
|
3304
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3305
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3306
|
+
*/
|
|
3307
|
+
/**
|
|
3308
|
+
* @license
|
|
3309
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3310
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3311
|
+
*/
|
|
3312
|
+
class cr{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(t){"function"==typeof this.callback&&this.callback(t.matches)}}
|
|
3313
|
+
/**
|
|
3314
|
+
* @license
|
|
3315
|
+
* Copyright (c) 2023 Vaadin Ltd.
|
|
3316
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3317
|
+
*/const hr=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e)return;if(void 0===t)return;const{classList:o}=e;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&o.remove(...t)}const i="string"==typeof t?t.split(" "):[];i.length>0&&o.add(...i),this.__previousClasses=i}}
|
|
3318
|
+
/**
|
|
3319
|
+
* @license
|
|
3320
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3321
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3322
|
+
*/;let ur=0;function dr(){return ur++}
|
|
3323
|
+
/**
|
|
3324
|
+
* @license
|
|
3325
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3326
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3327
|
+
*/class mr extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${dr()}`}constructor(t,e,o,i={}){super();const{initializer:s,multiple:r,observe:n,useUniqueId:a}=i;this.host=t,this.slotName=e,this.tagName=o,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof r&&r,this.slotInitializer=s,r&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:o}=this;let i=this.defaultNode;return!i&&o&&(i=document.createElement(o),i instanceof Element&&(""!==e&&i.setAttribute("slot",e),this.node=i,this.defaultNode=i)),i&&t.appendChild(i),i}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new us(e,(({addedNodes:t,removedNodes:e})=>{const o=this.multiple?this.nodes:[this.node],i=t.filter((t=>!function(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}(t)&&!o.includes(t)));e.length&&(this.nodes=o.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),i&&i.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...o,...i].filter((t=>t!==this.defaultNode)),i.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=i[0],this.initAddedNode(this.node)))}))}}
|
|
3328
|
+
/**
|
|
3329
|
+
* @license
|
|
3330
|
+
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
|
3331
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3332
|
+
*/class pr extends mr{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
|
|
3333
|
+
/**
|
|
3334
|
+
* @license
|
|
3335
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3336
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3337
|
+
*/class fr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){var e;this.__target&&(t?(rr(e=this.__target,"aria-labelledby"),sr(e,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const o=ir(e),i=o.get(t);i&&0!==i.size?hs(t,e,cs(i)):t.removeAttribute(e),o.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,o){nr(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:o})}__setErrorIdToAriaAttribute(t,e){nr(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){nr(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}
|
|
3338
|
+
/**
|
|
3339
|
+
* @license
|
|
3340
|
+
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
|
3341
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3342
|
+
*/class vr extends mr{constructor(t,e,o,i={}){super(t,e,o,{...i,useUniqueId:!0})}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,o=e===this.node;"attributes"===t.type?o&&this.__updateNodeId(e):(o||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType!==Node.ELEMENT_NODE||this.multiple&&this.nodes&&t!==this.nodes[0]||t.id||(t.id=this.defaultId)}}
|
|
3343
|
+
/**
|
|
3344
|
+
* @license
|
|
3345
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3346
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3347
|
+
*/class br extends vr{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:o}=this,i=Boolean(o&&e&&""!==e.trim());t&&(t.textContent=i?e:"",t.hidden=!i,i?t.setAttribute("role","alert"):t.removeAttribute("role")),super.updateDefaultNode(t)}}
|
|
3348
|
+
/**
|
|
3349
|
+
* @license
|
|
3350
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3351
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3352
|
+
*/class gr extends vr{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
3353
|
+
/**
|
|
3354
|
+
* @license
|
|
3355
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3356
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3357
|
+
*/class yr extends vr{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
3358
|
+
/**
|
|
3359
|
+
* @license
|
|
3360
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3361
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3362
|
+
*/const xr=Vt((t=>class extends(ps(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new yr(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),wr=Vt((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}})),Ar=t=>class extends(wr(xr(ps(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new fr(this),this._helperController=new gr(this),this._errorController=new br(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:o}=t.detail;this.__labelChanged(e,o)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:o}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,o)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
|
|
3363
|
+
/**
|
|
3364
|
+
* @license
|
|
3365
|
+
* Copyright (c) 2023 Vaadin Ltd.
|
|
3366
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3367
|
+
*/;
|
|
3368
|
+
/**
|
|
3369
|
+
* @license
|
|
3370
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3371
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3372
|
+
*/class kr extends mr{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,e)=>{e._setFocusElement(t),e.ariaTarget=t,e.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}
|
|
3373
|
+
/**
|
|
3374
|
+
* @license
|
|
3375
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3376
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3377
|
+
*/const _r=t=>class extends(hr(ar(lr(Hi(Ar(t)))))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,observer:"_openedChanged"},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)"]}constructor(){super(),this._itemId=`value-${this.localName}-${dr()}`,this._srLabelController=new yr(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready();const t=this.shadowRoot.querySelector("vaadin-select-overlay");t.owner=this,this._overlayElement=t,this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new kr(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new cr(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new pr(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}__itemsChanged(t,e){(t||e)&&this.requestContentUpdate()}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",(()=>{this.__initMenuItems(t)})),t.addEventListener("selected-changed",(()=>this.__updateValueButton())),t.addEventListener("keydown",(t=>this._onKeyDownInside(t)),!0),t.addEventListener("click",(()=>{this.__dispatchChangePending=!0}),!0),this.__lastMenuElement=t)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,e){this.toggleAttribute("has-value",Boolean(t)),void 0===e||this.__dispatchChangePending||this.validate()}_onClick(t){t.preventDefault(),this.opened=!this.readonly}_onToggleMouseDown(t){t.preventDefault()}_onKeyDown(t){if(t.target===this.focusElement&&!this.readonly&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){const e=this._menuElement.selected,o=this._menuElement._searchKey(void 0!==e?e:-1,t.key);o>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=o)}}_onKeyDownInside(t){/^(Tab)$/u.test(t.key)&&(this.opened=!1)}_openedChanged(t,e){if(t){if(this._updateAriaLive(!1),!this._overlayElement||!this._menuElement||!this.focusElement||this.disabled||this.readonly)return void(this.opened=!1);this._overlayElement.style.setProperty("--vaadin-select-text-field-width",`${this._inputContainer.offsetWidth}px`);const t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else e&&(this.focus(),this._openedWithFocusRing&&this.setAttribute("focus-ring",""),this.__dispatchChangePending||this._keyboardActive||this.validate())}_updateAriaExpanded(t,e){e&&e.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&(t?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(t){let e;const o=t.getAttribute("label");e=o?this.__createItemElement({label:o}):t.cloneNode(!0),e._sourceItem=t,this.__appendValueItemElement(e,this.focusElement),e.selected=!0}__createItemElement(t){const e=document.createElement(t.component||"vaadin-select-item");return t.label&&(e.textContent=t.label),t.value&&(e.value=t.value),t.disabled&&(e.disabled=t.disabled),e}__appendValueItemElement(t,e){e.appendChild(t),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}_accessibleNameChanged(t){this._srLabelController.setLabel(t),this._setCustomAriaLabelledBy(t?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(t){this._setCustomAriaLabelledBy(t)}_setCustomAriaLabelledBy(t){const e=this._getLabelIdWithItemId(t);this._fieldAriaController.setLabelId(e,!0)}_getLabelIdWithItemId(t){return t?`${t} ${this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:""}`.trim():null}__updateValueButton(){const t=this.focusElement;if(!t)return;t.innerHTML="";const e=this._items[this._menuElement.selected];if(t.removeAttribute("placeholder"),e)this.__attachSelectedItem(e),this._valueChanging||(this._selectedChanging=!0,this.value=e.value||"",this.__dispatchChangePending&&(this.opened=!1,this.__dispatchChange()),delete this._selectedChanging);else if(this.placeholder){const e=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(e,t),t.setAttribute("placeholder","")}nr(t,"aria-labelledby",e||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_updateSelectedItem(t,e){if(e){const o=null==t?t:t.toString();this._menuElement.selected=e.reduce(((t,e,i)=>void 0===t&&e.value===o?i:t),void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,e){if(!this.items||0===this.items.length)return void(t.textContent="");let o=t.firstElementChild;o||(o=document.createElement("vaadin-select-list-box"),t.appendChild(o)),o.textContent="",this.items.forEach((t=>{o.appendChild(this.__createItemElement(t))}))}async __dispatchChange(){this.updateComplete&&await this.updateComplete,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}}
|
|
3378
|
+
/**
|
|
3379
|
+
* @license
|
|
3380
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3381
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3382
|
+
*/;xt("vaadin-select",[tr,er,Hs],{moduleId:"vaadin-select-styles"});class Cr extends(_r($s(Ct(Uo)))){static get is(){return"vaadin-select"}static get template(){return Do`
|
|
3383
|
+
<style>
|
|
3384
|
+
:host {
|
|
3385
|
+
position: relative;
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
::slotted([slot='value']) {
|
|
3389
|
+
flex-grow: 1;
|
|
3390
|
+
}
|
|
3391
|
+
</style>
|
|
3392
|
+
|
|
3393
|
+
<div class="vaadin-select-container">
|
|
3394
|
+
<div part="label" on-click="_onClick">
|
|
3395
|
+
<slot name="label"></slot>
|
|
3396
|
+
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
3397
|
+
</div>
|
|
3398
|
+
|
|
3399
|
+
<vaadin-input-container
|
|
3400
|
+
part="input-field"
|
|
3401
|
+
readonly="[[readonly]]"
|
|
3402
|
+
disabled="[[disabled]]"
|
|
3403
|
+
invalid="[[invalid]]"
|
|
3404
|
+
theme$="[[_theme]]"
|
|
3405
|
+
on-click="_onClick"
|
|
3406
|
+
>
|
|
3407
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
3408
|
+
<slot name="value"></slot>
|
|
3409
|
+
<div part="toggle-button" slot="suffix" aria-hidden="true" on-mousedown="_onToggleMouseDown"></div>
|
|
3410
|
+
</vaadin-input-container>
|
|
3411
|
+
|
|
3412
|
+
<div part="helper-text">
|
|
3413
|
+
<slot name="helper"></slot>
|
|
3414
|
+
</div>
|
|
3415
|
+
|
|
3416
|
+
<div part="error-message">
|
|
3417
|
+
<slot name="error-message"></slot>
|
|
3418
|
+
</div>
|
|
3419
|
+
</div>
|
|
3420
|
+
|
|
3421
|
+
<vaadin-select-overlay
|
|
3422
|
+
position-target="[[_inputContainer]]"
|
|
3423
|
+
opened="{{opened}}"
|
|
3424
|
+
with-backdrop="[[_phone]]"
|
|
3425
|
+
phone$="[[_phone]]"
|
|
3426
|
+
theme$="[[_theme]]"
|
|
3427
|
+
on-vaadin-overlay-open="_onOverlayOpen"
|
|
3428
|
+
></vaadin-select-overlay>
|
|
3429
|
+
|
|
3430
|
+
<slot name="tooltip"></slot>
|
|
3431
|
+
<div class="sr-only">
|
|
3432
|
+
<slot name="sr-label"></slot>
|
|
3433
|
+
</div>
|
|
3434
|
+
`}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){var t;
|
|
3435
|
+
/**
|
|
3436
|
+
* @license
|
|
3437
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
3438
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3439
|
+
*/super.ready(),t=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}u(Cr);const Sr=class{constructor(o){t(this,o),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.drawMultiplierChange=e(this,"drawMultiplierChange",7),this.lineMultiplierChange=e(this,"lineMultiplierChange",7),this.betTypeChange=e(this,"betTypeChange",7),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)},this.endpoint=void 0,this.gameId=void 0,this.numberOfGrids=1,this.multipleDraws=!0,this.ticketId=void 0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=[],this.isCustomSelect=!1,this.amountInfo={},this.limitStylingAppends=!1,this.stakeMultiplier="1",this.lineMultiplier=0,this.isCustomSelectStake=!1,this.isCustomSelectDraw=!1,this.isCustomSelectLine=!1,this.drawMultiplier=1,this.secondarySelectionAllowed=!1,this.partialQuickpickAvailable=!1,this.boardsAllowed=[],this.tabIndex=0,this.groupType=[],this.playType=[],this.selectedPlayTypeId="",this.maximumAllowed=6,this.numberRange=[],this.secondaryNumberRange=[],this.secondaryMaximumAllowed=1,this.minimumAllowed=6,this.secondaryMinimumAllowed=1}handleLineMultiplierChange(t){this.grids=Array.from({length:t},((t,e)=>e+1)),this.ticketDone=Array.from({length:t},(()=>!1)),this.grids.forEach(((t,e)=>{this.resetSelection.emit({ticketId:this.ticketId,index:e})}))}handleTabIndexChange(t){this.grids.forEach(((t,e)=>{this.toggleResetSelection(e)})),this.setDrawMultiplier(1),this.setStakeMultiplier("1"),this.amountInfo=this.gameData.rules.stakes[0],this.setWagerPerDraw(this.amountInfo),this.playType=this.groupType[t].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.boardsAllowed=this.playType[0].boardsAllowed,this.setLineMultiplier(this.boardsAllowed[0]),this.selectedPlayTypeId=this.playType[0].value,this.numberRange=this.playType[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=this.playType[0].secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange),this.betTypeChange.emit({ticketId:this.ticketId,betType:this.playType[0]})}checkForClickOutside(t){this.selectRef&&!this.selectRef.contains(t.composedPath()[0])&&(this.isCustomSelect=!1),this.selectStakeRef&&!this.selectStakeRef.contains(t.composedPath()[0])&&(this.isCustomSelectStake=!1),this.selectDrawRef&&!this.selectDrawRef.contains(t.composedPath()[0])&&(this.isCustomSelectDraw=!1),this.selectLineRef&&!this.selectLineRef.contains(t.composedPath()[0])&&(this.isCustomSelectLine=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{var e;this.isLoading=!1,this.gameData=t,this.amountInfo=this.gameData.rules.stakes[0],this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed;const o=this.gameData.rules.betTypes.reduce(((t,e)=>(e.group?(t.groups[e.group]||(t.groups[e.group]=[]),t.groups[e.group].push(e)):t.noGroup.push({groupName:e.name||e.id,betType:[Object.assign({},e)]}),t)),{groups:{},noGroup:[]}),i=Object.entries(o.groups).map((([t,e])=>({groupName:t,betType:e})));this.groupType=[...o.noGroup,...i],this.playType=this.groupType[0].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.partialQuickpickAvailable=this.gameData.rules.partialQuickpickAvailable,this.boardsAllowed=null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.filter((t=>"Prima"===t.id))[0].boardsAllowed,this.lineMultiplier=this.boardsAllowed[0];let s=this.gameData.rules.betTypes[0].secondarySelectionRules;this.numberRange=this.gameData.rules.betTypes[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=s.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange)})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let o in t[e])c[e][o]=t[e][o]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{drawCount:this.drawMultiplier,multiplierNum:Number(this.stakeMultiplier),multiplier:this.gameData.rules.stakeMultiplierAvailable}),this.ticketDone=[...this.ticketDone.slice(0,t.detail.index),!0,...this.ticketDone.slice(t.detail.index+1)],this.ticketCompleted.emit(this.ticket)}handleGridClearAllEvent(t){let e=t.detail;this.ticketDone=[...this.ticketDone.slice(0,e),!1,...this.ticketDone.slice(e+1)]}toggleAutoSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!0,...this.ticketDone.slice(t+1)],this.autoSelection.emit({ticketId:this.ticketId,index:t})}toggleResetSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!1,...this.ticketDone.slice(t+1)],this.resetSelection.emit({ticketId:this.ticketId,index:t})}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}toggleSelection(){this.isCustomSelectStake=!this.isCustomSelectStake}toggleLineSelection(){this.isCustomSelectLine=!this.isCustomSelectLine}toggleDrawSelection(){this.isCustomSelectDraw=!this.isCustomSelectDraw}setWagerPerDraw(t){this.amountInfo={value:t.value,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.value)}setStakeMultiplier(t){this.stakeMultiplier=t,this.isCustomSelectStake=!1,this.multiplierChange.emit({ticketId:this.ticketId,multiplierNum:Number(t),multiplier:this.gameData.rules.stakeMultiplierAvailable})}setLineMultiplier(t){this.lineMultiplier=t,this.isCustomSelectLine=!1,this.lineMultiplierChange.emit({ticketId:this.ticketId,lineNum:t})}setDrawMultiplier(t){this.drawMultiplier=t,this.isCustomSelectDraw=!1,this.drawMultiplierChange.emit({ticketId:this.ticketId,drawCount:t})}handlePlayTypeChange(t){this.selectedPlayTypeId=t;let e=this.playType.filter((e=>e.id===t))[0];this.boardsAllowed=e.boardsAllowed,this.numberRange=e.selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=e.secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange);for(let t=0;t<this.lineMultiplier;t++)this.toggleResetSelection(t);this.betTypeChange.emit({ticketId:this.ticketId,betType:e})}render(){if(this.isLoading)return o("div",null,o("p",null,h("loading",this.language)));if(this.hasErrors)return o("div",null,o("p",null,h("error",this.language)));{const{rules:t}=this.gameData;return o("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},o("p",{class:"TicketTitle"},this.gameData.name),o("div",{class:"TicketTabs"},this.groupType.map(((t,e)=>o("div",{class:"TabButton"+(this.tabIndex==e?" Active":""),onClick:()=>this.tabIndex=e},t.groupName)))),this.playType.length>1&&o("div",null,o("label",{class:"Label"},h("playType",this.language),": "),o("vaadin-select",{style:{width:"160px"},items:this.playType,value:this.selectedPlayTypeId,"on-value-changed":t=>this.handlePlayTypeChange(t.detail.value)})),this.boardsAllowed.length>1&&o("div",null,o("label",{class:"Label"},h("lines",this.language),": "),o("div",{class:"WagerInput"},o("div",{ref:t=>this.selectLineRef=t,class:this.isCustomSelectLine?"SelectWrapper SelectActive":"SelectWrapper"},o("div",{class:"SelectButton",onClick:()=>this.toggleLineSelection()},o("span",null,this.lineMultiplier),o("span",{class:"SelectExpand"},"▼")),o("div",{class:"SelectContent"},o("ul",{class:"SelectOptions"},this.boardsAllowed.map((t=>o("li",{class:this.lineMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setLineMultiplier(t)},t)))))))),this.grids.map(((e,i)=>o("div",null,o("div",{class:"TicketGridHeader"},o("div",null,h("lineName",this.language),i+1),this.resetButton&&this.ticketDone[i]&&o("div",{class:"ButtonContainer"},o("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(i)},h("resetButton",this.language))),this.autoPick&&!this.ticketDone[i]&&o("div",{class:"ButtonContainer"},o("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(i)},h("autoButton",this.language)))),o("div",{class:"TicketGridBullets"},o("p",{class:"TicketGridTitle"},t.boards[0].selectionName),o("lottery-grid",{"grid-index":i,"maximum-allowed":this.maximumAllowed,"minimum-allowed":this.minimumAllowed,"number-range":JSON.stringify(this.numberRange),"high-number":t.boards[0].highNumber,"low-number":t.boards[0].lowNumber,"total-numbers":t.boards[0].highNumber-t.boards[0].lowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"mainSelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),this.secondarySelectionAllowed&&o("div",{class:"SecondarySelectionWrapper"},o("div",{class:"TicketGridBullets"},o("p",{class:"TicketGridTitle"},t.boards[0].secondarySelectionName),o("lottery-grid",{"grid-index":i,"maximum-allowed":this.secondaryMaximumAllowed,"minimum-allowed":this.secondaryMinimumAllowed,"number-range":JSON.stringify(this.secondaryNumberRange),"high-number":t.boards[0].secondaryHighNumber,"low-number":t.boards[0].secondaryLowNumber,"total-numbers":t.boards[0].secondaryHighNumber-t.boards[0].secondaryLowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"secondarySelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))))),t.stakeMultiplierAvailable&&o("div",null,o("label",{class:"Label"},h("multiplier",this.language),": "),o("div",{class:"WagerInput"},t.stakeMultipliers.length>1?o("div",{ref:t=>this.selectStakeRef=t,class:this.isCustomSelectStake?"SelectWrapper SelectActive":"SelectWrapper"},o("div",{class:"SelectButton",onClick:()=>this.toggleSelection()},o("span",null,this.stakeMultiplier),o("span",{class:"SelectExpand"},"▼")),o("div",{class:"SelectContent"},o("ul",{class:"SelectOptions"},t.stakeMultipliers.map((t=>o("li",{class:this.stakeMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setStakeMultiplier(t)},t)))))):o("div",null,o("input",{min:"1",value:t.stakeMultipliers[0]||1,type:"number",disabled:!0})))),t.drawMultiplierAvailable&&o("div",null,o("label",{class:"Label"},h("numberOfDraws",this.language),": "),o("div",{class:"WagerInput"},t.durations.length>1?o("div",{ref:t=>this.selectDrawRef=t,class:this.isCustomSelectDraw?"SelectWrapper SelectActive":"SelectWrapper"},o("div",{class:"SelectButton",onClick:()=>this.toggleDrawSelection()},o("span",null,this.drawMultiplier),o("span",{class:"SelectExpand"},"▼")),o("div",{class:"SelectContent"},o("ul",{class:"SelectOptions"},t.durations.map((t=>o("li",{class:this.drawMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setDrawMultiplier(t)},t)))))):o("div",null,o("input",{min:"1",value:t.durations[0]||1,type:"number",disabled:!0})))),o("div",null,o("label",{class:"Label"},h("wagerPerDraw",this.language),": "),o("div",{class:"WagerInput"},t.stakes.length>1?o("div",{ref:t=>this.selectRef=t,class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},o("div",{class:"SelectButton",onClick:()=>this.toggleClass()},o("span",null,this.amountInfo.value," ",this.amountInfo.currency),o("span",{class:"SelectExpand"},"▼")),o("div",{class:"SelectContent"},o("ul",{class:"SelectOptions"},t.stakes.map((t=>o("li",{class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setWagerPerDraw(t)},t.value," ",t.currency)))))):o("div",null,o("input",{min:"1",value:t.stakes[0].value,type:"number",disabled:!0}),o("span",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{lineMultiplier:["handleLineMultiplierChange"],tabIndex:["handleTabIndexChange"]}}};Sr.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.TicketTabs{display:flex;overflow:auto}.TicketTabs .TabButton{color:var(--emw--color-typography, #009993);margin:0 40px 10px 0;cursor:pointer}.TicketTabs .Active{border-bottom:1px solid var(--emw--color-typography, #009993)}.ButtonContainer{display:flex;justify-content:flex-end}.SecondarySelectionWrapper{margin-top:20px}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:var(--emw--button-text-color, #000)}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:var(--emw--button-text-color, #000);padding:10px;margin-left:8px}.AutoButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}.TicketGridHeader{display:flex;justify-content:space-between;align-items:center;font-weight:bold;margin-top:10px}.TicketGridBullets{background:var(--emw--color-gray-50, #F1F1F1);border-radius:4px;padding:20px;margin-top:5px;margin-bottom:10px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid var(--emw--color-gray-transparency-80, #ccc);border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid var(--emw--color-gray-transparency-80, #ccc);overflow:hidden;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));z-index:20}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:var(--emw--color-gray-50, #F1F1F1);border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:var(--emw--color-gray-transparency-80, #ccc);border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:var(--emw--color-gray-150, #f2f2f2)}';const zr=["ro","en","fr","ar","hr"],Tr={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},Nr=(t,e)=>{const o=e;return Tr[void 0!==o&&zr.includes(o)?o:"en"][t]},Ir=class{constructor(o){t(this,o),this.deleteTicketEvent=e(this,"deleteTicket",7),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)},this.endpoint="",this.ticketId=1,this.ticketDescription=void 0,this.gameId=void 0,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.totalControllers=1,this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.limitStylingAppends=!1}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let o in t[e])Tr[e][o]=t[e][o]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return o("div",{key:"581989035aa42a397cd39a4cdd929ea91190494c",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},o("helper-accordion",{key:"724d50d1532510344ed7acd57c3c5faef17aef8c","header-title":`${Nr("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},o("div",{key:"ba851ea2792641971a5552a94558fe8d28068187",slot:"accordionContent"},o("lottery-ticket",{key:"199abc15160d60499d7d1d1d14084f64a6314c53",endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"translation-url":this.translationUrl,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};Ir.style=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}';export{r as helper_accordion,n as lottery_bullet,a as lottery_grid,Sr as lottery_ticket,Ir as lottery_ticket_controller}
|