@everymatrix/lottery-ticket-controller 1.53.0 → 1.53.10
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 +13686 -11831
- package/dist/cjs/{index-6ae7dc7f.js → index-805691f2.js} +166 -71
- 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 +81 -14
- package/dist/esm/helper-accordion_5.entry.js +13686 -11831
- package/dist/esm/{index-a992670b.js → index-112e65a8.js} +166 -71
- 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-1090b990.js +2 -0
- package/dist/lottery-ticket-controller/p-6d913fec.entry.js +3115 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-ticket-controller/.stencil/packages/stencil/lottery-ticket-controller/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/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-3ed74aee.entry.js +0 -3439
- package/dist/lottery-ticket-controller/p-ef00060e.js +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/lottery-ticket-controller/.stencil/packages/stencil/lottery-ticket-controller/stencil.config.d.ts +0 -2
- 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 +0 -2
|
@@ -0,0 +1,3115 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-1090b990.js";const o=["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(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),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.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){this.showContent=!this.collapsed}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 i("div",{key:"ad26faefd6e3dd089171c7e2bff13faa5a26d972",class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{key:"bb7045653ec12a2526029589744f7ef014ec6a6a",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},i("p",{key:"ae30943582063e368e942124d8d5acadc1732629",class:"Title"},this.headerTitle),i("p",{key:"7c35076cb768de784177988900c61fe40a71594c",class:"Subtitle"},this.headerSubtitle),i("p",{key:"daff2b456a427f45b00efc32ba33a68cdc2228f0",class:"Subtitle Description"},this.description),i("span",{key:"0c4f942642da6e8b1ac3d2aeac46034963965d8f",class:"Expand"},this.showContent?"<":">")),this.showContent&&i("div",{key:"c688ab7cc629a3974b905a2fdc43063e996a3b90"},i("div",{key:"aaa3ad7d9f1503b8e1baaa2c756376a580ffe261",class:"Content"},i("slot",{key:"8c5c8ff70857da9414c7284b052a3fbc5f503f4a",name:"accordionContent"}),this.footer&&this.showContent&&i("div",{key:"917191f55a45647d708a5e3ff5e188c7e565a0c0"},this.deleteTab&&i("span",{key:"e7fdd5b4f18cacaceda206b36ce9576cc3fc1472",class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return s[void 0!==t&&o.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(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.value="0",this.selectable=!0,this.isSelected=!1,this.isBonus=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,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)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("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(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.gridClearAllEvent=e(this,"gridClearAllEvent",7),this.totalNumbers=0,this.maximumAllowed=7,this.minimumAllowed=3,this.selectable=!0,this.selectedNumbers="",this.secondaryNumbers="",this.displaySelected=!1,this.language="en",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,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)}}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 i=Math.floor(Math.random()*t.length);e.push(t.splice(i,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 i("div",{key:"8ad436904a126e6bee036c7372cf45c075022e5f",class:"GridContainer",ref:t=>this.stylingContainer=t},i("div",{key:"5a8818209485f0808a99978910f6f26473dd6f59",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>i("div",null,i("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=>i("div",null,i("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",grid:"Grid",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",grid:"Grid",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",grid:"Grid",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",grid:"Grid",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",grid:"Tablica",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 i=e;return c[void 0!==i&&l.includes(i)?i:"en"][t]};
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
|
+
*/
|
|
7
|
+
window.Vaadin||={},window.Vaadin.featureFlags||={};const u={};function d(t,e="24.6.3"){if(Object.defineProperty(t,"version",{get:()=>e}),t.experimental){const e="string"==typeof t.experimental?t.experimental:`${i=t.is.split("-").slice(1).join("-"),i.replace(/-[a-z]/gu,(t=>t[1].toUpperCase()))}Component`;if(!window.Vaadin.featureFlags[e]&&!u[e])return u[e]=new Set,u[e].add(t),void Object.defineProperty(window.Vaadin.featureFlags,e,{get:()=>0===u[e].size,set(t){t&&u[e].size>0&&(u[e].forEach((t=>{customElements.define(t.is,t)})),u[e].clear())}});if(u[e])return void u[e].add(t)}var i;const o=customElements.get(t.is);if(o){const e=o.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${o.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
11
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12
|
+
*/class p extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}d(p);
|
|
13
|
+
/**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright 2019 Google LLC
|
|
16
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
+
*/
|
|
18
|
+
const m=globalThis,f=m.ShadowRoot&&(void 0===m.ShadyCSS||m.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),b=new WeakMap;class g{constructor(t,e,i){if(this._$cssResult$=!0,i!==v)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(f&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=b.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&b.set(e,t))}return t}toString(){return this.cssText}}const y=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new g(i,t,v)},w=(t,e)=>{if(f)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),o=m.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}},x=f?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new g("string"==typeof t?t:t+"",void 0,v))(e)})(t):t
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/,{is:k,defineProperty:_,getOwnPropertyDescriptor:A,getOwnPropertyNames:S,getOwnPropertySymbols:C,getPrototypeOf:T}=Object,z=globalThis,N=z.trustedTypes,E=N?N.emptyScript:"",O=z.reactiveElementPolyfillSupport,I={toAttribute(t,e){switch(e){case Boolean:t=t?E:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},B=(t,e)=>!k(t,e),P={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:B};Symbol.metadata??=Symbol("metadata"),z.litPropertyMetadata??=new WeakMap;class M extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=P){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&_(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:s}=A(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return o?.call(this)},set(e){const r=o?.call(this);s.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??P}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=T(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...S(t),...C(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(x(t))}else void 0!==t&&e.push(x(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return w(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const s=(void 0!==i.converter?.toAttribute?i.converter:I).toAttribute(e,i.type);this._$Em=t,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:I;this._$Em=o,this[o]=s.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??B)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}M.elementStyles=[],M.shadowRootOptions={mode:"open"},M.elementProperties=new Map,M.finalized=new Map,O?.({ReactiveElement:M}),(z.reactiveElementVersions??=[]).push("2.0.4");
|
|
24
|
+
/**
|
|
25
|
+
* @license
|
|
26
|
+
* Copyright 2017 Google LLC
|
|
27
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
+
*/
|
|
29
|
+
const D=globalThis,j=D.trustedTypes,F=j?j.createPolicy("lit-html",{createHTML:t=>t}):void 0,R="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+L,G=`<${H}>`,W=document,U=()=>W.createComment(""),q=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,V="[ \t\n\f\r]",J=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Y=/-->/g,K=/>/g,Z=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),X=/'/g,Q=/"/g,tt=/^(?:script|style|textarea|title)$/i,et=Symbol.for("lit-noChange"),it=Symbol.for("lit-nothing"),ot=new WeakMap,st=W.createTreeWalker(W,129);function rt(t,e){if(!$(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==F?F.createHTML(e):e}const nt=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":3===e?"<math>":"",n=J;for(let e=0;e<i;e++){const i=t[e];let a,l,c=-1,h=0;for(;h<i.length&&(n.lastIndex=h,l=n.exec(i),null!==l);)h=n.lastIndex,n===J?"!--"===l[1]?n=Y:void 0!==l[1]?n=K:void 0!==l[2]?(tt.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=Z):void 0!==l[3]&&(n=Z):n===Z?">"===l[0]?(n=s??J,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?Z:'"'===l[3]?Q:X):n===Q||n===X?n=Z:n===Y||n===K?n=J:(n=Z,s=void 0);const u=n===Z&&t[e+1].startsWith("/>")?" ":"";r+=n===J?i+G:c>=0?(o.push(a),i.slice(0,c)+R+i.slice(c)+L+u):i+L+(-2===c?e:u)}return[rt(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),o]};class at{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,c]=nt(t,e);if(this.el=at.createElement(l,i),st.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=st.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(R)){const e=c[r++],i=o.getAttribute(t).split(L),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:n[2],strings:i,ctor:"."===n[1]?dt:"?"===n[1]?pt:"@"===n[1]?mt:ut}),o.removeAttribute(t)}else t.startsWith(L)&&(a.push({type:6,index:s}),o.removeAttribute(t));if(tt.test(o.tagName)){const t=o.textContent.split(L),e=t.length-1;if(e>0){o.textContent=j?j.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],U()),st.nextNode(),a.push({type:2,index:++s});o.append(t[e],U())}}}else if(8===o.nodeType)if(o.data===H)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(L,t+1));)a.push({type:7,index:s}),t+=L.length-1}s++}}static createElement(t,e){const i=W.createElement("template");return i.innerHTML=t,i}}function lt(t,e,i=t,o){if(e===et)return e;let s=void 0!==o?i._$Co?.[o]:i._$Cl;const r=q(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),void 0===r?s=void 0:(s=new r(t),s._$AT(t,i,o)),void 0!==o?(i._$Co??=[])[o]=s:i._$Cl=s),void 0!==s&&(e=lt(t,s._$AS(t,e.values),s,o)),e}class ct{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){const{el:{content:e},parts:i}=this._$AD,o=(t?.creationScope??W).importNode(e,!0);st.currentNode=o;let s=st.nextNode(),r=0,n=0,a=i[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new ht(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new ft(s,this,t)),this._$AV.push(e),a=i[++n]}r!==a?.index&&(s=st.nextNode(),r++)}return st.currentNode=W,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ht{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,o){this.type=2,this._$AH=it,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=lt(this,t,e),q(t)?t===it||null==t||""===t?(this._$AH!==it&&this._$AR(),this._$AH=it):t!==this._$AH&&t!==et&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>$(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==it&&q(this._$AH)?this._$AA.nextSibling.data=t:this.T(W.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=at.createElement(rt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new ct(o,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=ot.get(t.strings);return void 0===e&&ot.set(t.strings,e=new at(t)),e}k(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new ht(this.O(U()),this.O(U()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ut{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,s){this.type=1,this._$AH=it,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=it}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=lt(this,t,e,0),r=!q(t)||t!==this._$AH&&t!==et,r&&(this._$AH=t);else{const o=t;let n,a;for(t=s[0],n=0;n<s.length-1;n++)a=lt(this,o[i+n],e,n),a===et&&(a=this._$AH[n]),r||=!q(a)||a!==this._$AH[n],a===it?t=it:t!==it&&(t+=(a??"")+s[n+1]),this._$AH[n]=a}r&&!o&&this.j(t)}j(t){t===it?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class dt extends ut{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===it?void 0:t}}class pt extends ut{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==it)}}class mt extends ut{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){if((t=lt(this,t,e,0)??it)===et)return;const i=this._$AH,o=t===it&&i!==it||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,s=t!==it&&(i===it||o);o&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ft{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){lt(this,t)}}const vt=D.litHtmlPolyfillSupport;vt?.(at,ht),(D.litHtmlVersions??=[]).push("3.2.1");
|
|
30
|
+
/**
|
|
31
|
+
* @license
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
+
*/
|
|
35
|
+
class bt extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const o=i?.renderBefore??e;let s=o._$litPart$;if(void 0===s){const t=i?.renderBefore??null;o._$litPart$=s=new ht(e.insertBefore(U(),t),t,void 0,i??{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return et}}bt._$litElement$=!0,bt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:bt});const gt=globalThis.litElementPolyfillSupport;gt?.({LitElement:bt}),(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
36
|
+
/**
|
|
37
|
+
* @license
|
|
38
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
39
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
40
|
+
*/
|
|
41
|
+
const yt=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"theme"===t&&this._set_theme(i)}}
|
|
42
|
+
/**
|
|
43
|
+
* @license
|
|
44
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
45
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
46
|
+
*/,wt=[],xt=new Set,kt=new Set;function _t(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function At(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function St(t){return t.map((t=>t.cssText)).join("\n")}const Ct="vaadin-themable-mixin-style";function Tt(t){t.prototype instanceof bt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Ct).textContent=St(t.getStylesForThis()),kt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&Tt(i)}))}function zt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof g||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):wt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&kt.forEach((i=>{if(At(t,i)&&function(t){return _t(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),Tt(t),function(t){xt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof bt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),w(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Ct).textContent=e.prototype._template.content.getElementById(Ct).textContent}(i):i||xt.delete(e)}))}(t)}}))}function Nt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():wt}function Et(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Ot(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=Nt().find((e=>e.moduleId===t));i?e.push(...Ot(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function It(t){const e=`${t}-default-theme`,i=Nt().filter((i=>i.moduleId!==e&&At(i.themeFor,t))).map((t=>({...t,styles:[...Ot(t),...t.styles],includePriority:Et(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Nt().filter((t=>t.moduleId===e))}const Bt=t=>class extends(yt(t)){constructor(){super(),xt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&kt.add(this.is),this.elementStyles)return;const t=this.prototype._template;t&&!_t(this)&&function(t,e){const i=document.createElement("style");i.id=Ct,i.textContent=St(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...It(this.is)];const o=this.__themes.flatMap((t=>t.styles));return o.filter(((t,e)=>e===o.lastIndexOf(t)))}}
|
|
47
|
+
/**
|
|
48
|
+
* @license
|
|
49
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
50
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
51
|
+
*/,Pt=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Pt("color-props",y`
|
|
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
|
+
`),zt("",y`
|
|
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
|
+
pre code {
|
|
252
|
+
background: transparent;
|
|
253
|
+
}
|
|
254
|
+
`,{moduleId:"lumo-color"}),Pt("sizing-props",y`
|
|
255
|
+
:host {
|
|
256
|
+
--lumo-size-xs: 1.625rem;
|
|
257
|
+
--lumo-size-s: 1.875rem;
|
|
258
|
+
--lumo-size-m: 2.25rem;
|
|
259
|
+
--lumo-size-l: 2.75rem;
|
|
260
|
+
--lumo-size-xl: 3.5rem;
|
|
261
|
+
|
|
262
|
+
/* Icons */
|
|
263
|
+
--lumo-icon-size-s: 1.25em;
|
|
264
|
+
--lumo-icon-size-m: 1.5em;
|
|
265
|
+
--lumo-icon-size-l: 2.25em;
|
|
266
|
+
/* For backwards compatibility */
|
|
267
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
268
|
+
}
|
|
269
|
+
`),y`
|
|
270
|
+
html {
|
|
271
|
+
/* Button */
|
|
272
|
+
--vaadin-button-background: var(--lumo-contrast-5pct);
|
|
273
|
+
--vaadin-button-border: none;
|
|
274
|
+
--vaadin-button-border-radius: var(--lumo-border-radius-m);
|
|
275
|
+
--vaadin-button-font-size: var(--lumo-font-size-m);
|
|
276
|
+
--vaadin-button-font-weight: 500;
|
|
277
|
+
--vaadin-button-height: var(--lumo-size-m);
|
|
278
|
+
--vaadin-button-margin: var(--lumo-space-xs) 0;
|
|
279
|
+
--vaadin-button-min-width: calc(var(--vaadin-button-height) * 2);
|
|
280
|
+
--vaadin-button-padding: 0 calc(var(--vaadin-button-height) / 3 + var(--lumo-border-radius-m) / 2);
|
|
281
|
+
--vaadin-button-text-color: var(--lumo-primary-text-color);
|
|
282
|
+
--vaadin-button-primary-background: var(--lumo-primary-color);
|
|
283
|
+
--vaadin-button-primary-border: none;
|
|
284
|
+
--vaadin-button-primary-font-weight: 600;
|
|
285
|
+
--vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);
|
|
286
|
+
--vaadin-button-tertiary-background: transparent !important;
|
|
287
|
+
--vaadin-button-tertiary-text-color: var(--lumo-primary-text-color);
|
|
288
|
+
--vaadin-button-tertiary-font-weight: 500;
|
|
289
|
+
--vaadin-button-tertiary-padding: 0 calc(var(--vaadin-button-height) / 6);
|
|
290
|
+
/* Checkbox */
|
|
291
|
+
--vaadin-checkbox-background: var(--lumo-contrast-20pct);
|
|
292
|
+
--vaadin-checkbox-background-hover: var(--lumo-contrast-30pct);
|
|
293
|
+
--vaadin-checkbox-border-radius: var(--lumo-border-radius-s);
|
|
294
|
+
--vaadin-checkbox-checkmark-char: var(--lumo-icons-checkmark);
|
|
295
|
+
--vaadin-checkbox-checkmark-char-indeterminate: '';
|
|
296
|
+
--vaadin-checkbox-checkmark-color: var(--lumo-primary-contrast-color);
|
|
297
|
+
--vaadin-checkbox-checkmark-size: calc(var(--vaadin-checkbox-size) + 2px);
|
|
298
|
+
--vaadin-checkbox-label-color: var(--lumo-body-text-color);
|
|
299
|
+
--vaadin-checkbox-label-font-size: var(--lumo-font-size-m);
|
|
300
|
+
--vaadin-checkbox-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs);
|
|
301
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
302
|
+
--vaadin-checkbox-disabled-checkmark-color: var(--lumo-contrast-30pct);
|
|
303
|
+
--vaadin-checkbox-disabled-background: var(--lumo-contrast-10pct);
|
|
304
|
+
/* Radio button */
|
|
305
|
+
--vaadin-radio-button-background: var(--lumo-contrast-20pct);
|
|
306
|
+
--vaadin-radio-button-background-hover: var(--lumo-contrast-30pct);
|
|
307
|
+
--vaadin-radio-button-dot-color: var(--lumo-primary-contrast-color);
|
|
308
|
+
--vaadin-radio-button-dot-size: 3px;
|
|
309
|
+
--vaadin-radio-button-label-color: var(--lumo-body-text-color);
|
|
310
|
+
--vaadin-radio-button-label-font-size: var(--lumo-font-size-m);
|
|
311
|
+
--vaadin-radio-button-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs)
|
|
312
|
+
var(--lumo-space-xs);
|
|
313
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
314
|
+
--vaadin-radio-button-disabled-background: var(--lumo-contrast-10pct);
|
|
315
|
+
--vaadin-radio-button-disabled-dot-color: var(--lumo-contrast-30pct);
|
|
316
|
+
--vaadin-selection-color: var(--lumo-primary-color);
|
|
317
|
+
--vaadin-selection-color-text: var(--lumo-primary-text-color);
|
|
318
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
319
|
+
--vaadin-focus-ring-color: var(--lumo-primary-color-50pct);
|
|
320
|
+
--vaadin-focus-ring-width: 2px;
|
|
321
|
+
/* Label */
|
|
322
|
+
--vaadin-input-field-label-color: var(--lumo-secondary-text-color);
|
|
323
|
+
--vaadin-input-field-focused-label-color: var(--lumo-primary-text-color);
|
|
324
|
+
--vaadin-input-field-hovered-label-color: var(--lumo-body-text-color);
|
|
325
|
+
--vaadin-input-field-label-font-size: var(--lumo-font-size-s);
|
|
326
|
+
--vaadin-input-field-label-font-weight: 500;
|
|
327
|
+
/* Helper */
|
|
328
|
+
--vaadin-input-field-helper-color: var(--lumo-secondary-text-color);
|
|
329
|
+
--vaadin-input-field-helper-font-size: var(--lumo-font-size-xs);
|
|
330
|
+
--vaadin-input-field-helper-font-weight: 400;
|
|
331
|
+
--vaadin-input-field-helper-spacing: 0.4em;
|
|
332
|
+
/* Error message */
|
|
333
|
+
--vaadin-input-field-error-color: var(--lumo-error-text-color);
|
|
334
|
+
--vaadin-input-field-error-font-size: var(--lumo-font-size-xs);
|
|
335
|
+
--vaadin-input-field-error-font-weight: 400;
|
|
336
|
+
/* Input field */
|
|
337
|
+
--vaadin-input-field-background: var(--lumo-contrast-10pct);
|
|
338
|
+
--vaadin-input-field-icon-color: var(--lumo-contrast-60pct);
|
|
339
|
+
--vaadin-input-field-icon-size: var(--lumo-icon-size-m);
|
|
340
|
+
--vaadin-input-field-invalid-background: var(--lumo-error-color-10pct);
|
|
341
|
+
--vaadin-input-field-invalid-hover-highlight: var(--lumo-error-color-50pct);
|
|
342
|
+
--vaadin-input-field-disabled-background: var(--lumo-contrast-5pct);
|
|
343
|
+
--vaadin-input-field-disabled-value-color: var(--lumo-disabled-text-color);
|
|
344
|
+
--vaadin-input-field-height: var(--lumo-size-m);
|
|
345
|
+
--vaadin-input-field-hover-highlight: var(--lumo-contrast-50pct);
|
|
346
|
+
--vaadin-input-field-placeholder-color: var(--lumo-secondary-text-color);
|
|
347
|
+
--vaadin-input-field-readonly-border: 1px dashed var(--lumo-contrast-30pct);
|
|
348
|
+
--vaadin-input-field-value-color: var(--lumo-body-text-color);
|
|
349
|
+
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
350
|
+
--vaadin-input-field-value-font-weight: 500;
|
|
351
|
+
}
|
|
352
|
+
`,Pt("style-props",y`
|
|
353
|
+
:host {
|
|
354
|
+
/* Border radius */
|
|
355
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
356
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
357
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
358
|
+
|
|
359
|
+
/* Shadow */
|
|
360
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
361
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
362
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
363
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
364
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
365
|
+
|
|
366
|
+
/* Clickable element cursor */
|
|
367
|
+
--lumo-clickable-cursor: default;
|
|
368
|
+
}
|
|
369
|
+
`);
|
|
370
|
+
/**
|
|
371
|
+
* @license
|
|
372
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
373
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
374
|
+
*/
|
|
375
|
+
const Mt=y`
|
|
376
|
+
:host {
|
|
377
|
+
/* prettier-ignore */
|
|
378
|
+
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
379
|
+
|
|
380
|
+
/* Font sizes */
|
|
381
|
+
--lumo-font-size-xxs: 0.75rem;
|
|
382
|
+
--lumo-font-size-xs: 0.8125rem;
|
|
383
|
+
--lumo-font-size-s: 0.875rem;
|
|
384
|
+
--lumo-font-size-m: 1rem;
|
|
385
|
+
--lumo-font-size-l: 1.125rem;
|
|
386
|
+
--lumo-font-size-xl: 1.375rem;
|
|
387
|
+
--lumo-font-size-xxl: 1.75rem;
|
|
388
|
+
--lumo-font-size-xxxl: 2.5rem;
|
|
389
|
+
|
|
390
|
+
/* Line heights */
|
|
391
|
+
--lumo-line-height-xs: 1.25;
|
|
392
|
+
--lumo-line-height-s: 1.375;
|
|
393
|
+
--lumo-line-height-m: 1.625;
|
|
394
|
+
}
|
|
395
|
+
`;zt("",y`
|
|
396
|
+
body,
|
|
397
|
+
:host {
|
|
398
|
+
font-family: var(--lumo-font-family);
|
|
399
|
+
font-size: var(--lumo-font-size-m);
|
|
400
|
+
line-height: var(--lumo-line-height-m);
|
|
401
|
+
-webkit-text-size-adjust: 100%;
|
|
402
|
+
-webkit-font-smoothing: antialiased;
|
|
403
|
+
-moz-osx-font-smoothing: grayscale;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
small,
|
|
407
|
+
[theme~='font-size-s'] {
|
|
408
|
+
font-size: var(--lumo-font-size-s);
|
|
409
|
+
line-height: var(--lumo-line-height-s);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
[theme~='font-size-xs'] {
|
|
413
|
+
font-size: var(--lumo-font-size-xs);
|
|
414
|
+
line-height: var(--lumo-line-height-xs);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
418
|
+
font-weight: 600;
|
|
419
|
+
line-height: var(--lumo-line-height-xs);
|
|
420
|
+
margin-block: 0;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
:where(h1) {
|
|
424
|
+
font-size: var(--lumo-font-size-xxxl);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
:where(h2) {
|
|
428
|
+
font-size: var(--lumo-font-size-xxl);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
:where(h3) {
|
|
432
|
+
font-size: var(--lumo-font-size-xl);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
:where(h4) {
|
|
436
|
+
font-size: var(--lumo-font-size-l);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
:where(h5) {
|
|
440
|
+
font-size: var(--lumo-font-size-m);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
:where(h6) {
|
|
444
|
+
font-size: var(--lumo-font-size-xs);
|
|
445
|
+
text-transform: uppercase;
|
|
446
|
+
letter-spacing: 0.03em;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
p,
|
|
450
|
+
blockquote {
|
|
451
|
+
margin-top: 0.5em;
|
|
452
|
+
margin-bottom: 0.75em;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
a {
|
|
456
|
+
text-decoration: none;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
a:where(:any-link):hover {
|
|
460
|
+
text-decoration: underline;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
hr {
|
|
464
|
+
display: block;
|
|
465
|
+
align-self: stretch;
|
|
466
|
+
height: 1px;
|
|
467
|
+
border: 0;
|
|
468
|
+
padding: 0;
|
|
469
|
+
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
|
470
|
+
background-color: var(--lumo-contrast-10pct);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
blockquote {
|
|
474
|
+
border-left: 2px solid var(--lumo-contrast-30pct);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
b,
|
|
478
|
+
strong {
|
|
479
|
+
font-weight: 600;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/* RTL specific styles */
|
|
483
|
+
blockquote[dir='rtl'] {
|
|
484
|
+
border-left: none;
|
|
485
|
+
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
486
|
+
}
|
|
487
|
+
`,{moduleId:"lumo-typography"}),Pt("typography-props",Mt),zt("vaadin-input-container",y`
|
|
488
|
+
:host {
|
|
489
|
+
background: var(--_background);
|
|
490
|
+
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
491
|
+
font-weight: var(--vaadin-input-field-value-font-weight, 500);
|
|
492
|
+
line-height: 1;
|
|
493
|
+
position: relative;
|
|
494
|
+
cursor: text;
|
|
495
|
+
box-sizing: border-box;
|
|
496
|
+
border-radius:
|
|
497
|
+
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#syntax */
|
|
498
|
+
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
|
499
|
+
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
|
500
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius))
|
|
501
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius));
|
|
502
|
+
/* Fallback */
|
|
503
|
+
--_input-container-radius: var(--vaadin-input-field-border-radius, var(--lumo-border-radius-m));
|
|
504
|
+
--_input-height: var(--lumo-text-field-size, var(--lumo-size-m));
|
|
505
|
+
/* Default values */
|
|
506
|
+
--_background: var(--vaadin-input-field-background, var(--lumo-contrast-10pct));
|
|
507
|
+
--_hover-highlight: var(--vaadin-input-field-hover-highlight, var(--lumo-contrast-50pct));
|
|
508
|
+
--_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
|
|
509
|
+
--_icon-color: var(--vaadin-input-field-icon-color, var(--lumo-contrast-60pct));
|
|
510
|
+
--_icon-size: var(--vaadin-input-field-icon-size, var(--lumo-icon-size-m));
|
|
511
|
+
--_invalid-background: var(--vaadin-input-field-invalid-background, var(--lumo-error-color-10pct));
|
|
512
|
+
--_invalid-hover-highlight: var(--vaadin-input-field-invalid-hover-highlight, var(--lumo-error-color-50pct));
|
|
513
|
+
--_disabled-background: var(--vaadin-input-field-disabled-background, var(--lumo-contrast-5pct));
|
|
514
|
+
--_disabled-value-color: var(--vaadin-input-field-disabled-value-color, var(--lumo-disabled-text-color));
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
:host([dir='rtl']) {
|
|
518
|
+
border-radius:
|
|
519
|
+
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
520
|
+
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
|
521
|
+
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
|
522
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius))
|
|
523
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius));
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/* Used for hover and activation effects */
|
|
527
|
+
:host::after {
|
|
528
|
+
content: '';
|
|
529
|
+
position: absolute;
|
|
530
|
+
inset: 0;
|
|
531
|
+
border-radius: inherit;
|
|
532
|
+
pointer-events: none;
|
|
533
|
+
background: var(--_hover-highlight);
|
|
534
|
+
opacity: 0;
|
|
535
|
+
transition:
|
|
536
|
+
transform 0.15s,
|
|
537
|
+
opacity 0.2s;
|
|
538
|
+
transform-origin: 100% 0;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
::slotted(:not([slot$='fix'])) {
|
|
542
|
+
cursor: inherit;
|
|
543
|
+
min-height: var(--vaadin-input-field-height, var(--_input-height));
|
|
544
|
+
padding: 0 0.25em;
|
|
545
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
546
|
+
-webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
547
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/* Read-only */
|
|
551
|
+
:host([readonly]) {
|
|
552
|
+
color: var(--lumo-secondary-text-color);
|
|
553
|
+
background-color: transparent;
|
|
554
|
+
cursor: default;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
:host([readonly])::after {
|
|
558
|
+
background-color: transparent;
|
|
559
|
+
opacity: 1;
|
|
560
|
+
border: var(--vaadin-input-field-readonly-border, 1px dashed var(--lumo-contrast-30pct));
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/* Disabled */
|
|
564
|
+
:host([disabled]) {
|
|
565
|
+
background: var(--_disabled-background);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
:host([disabled]) ::slotted(:not([slot$='fix'])) {
|
|
569
|
+
-webkit-text-fill-color: var(--_disabled-value-color);
|
|
570
|
+
color: var(--_disabled-value-color);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/* Invalid */
|
|
574
|
+
:host([invalid]) {
|
|
575
|
+
background: var(--_invalid-background);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
:host([invalid]:not([readonly]))::after {
|
|
579
|
+
background: var(--_invalid-hover-highlight);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/* Slotted icons */
|
|
583
|
+
::slotted(vaadin-icon) {
|
|
584
|
+
color: var(--_icon-color);
|
|
585
|
+
width: var(--_icon-size);
|
|
586
|
+
height: var(--_icon-size);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
590
|
+
::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
591
|
+
padding: 0.25em;
|
|
592
|
+
box-sizing: border-box !important;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/* Text align */
|
|
596
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
597
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
@-moz-document url-prefix() {
|
|
601
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
602
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
607
|
+
text-align: start;
|
|
608
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
:host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
|
|
612
|
+
text-align: center;
|
|
613
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
617
|
+
text-align: end;
|
|
618
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
@-moz-document url-prefix() {
|
|
622
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
623
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
624
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
@-moz-document url-prefix() {
|
|
629
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
630
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
631
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/* RTL specific styles */
|
|
636
|
+
:host([dir='rtl'])::after {
|
|
637
|
+
transform-origin: 0% 0;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
641
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
:host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
645
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
649
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
@-moz-document url-prefix() {
|
|
653
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
654
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
655
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
@-moz-document url-prefix() {
|
|
660
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
661
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
662
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
`,{moduleId:"lumo-input-container"}),Pt("font-icons",y`
|
|
666
|
+
@font-face {
|
|
667
|
+
font-family: 'lumo-icons';
|
|
668
|
+
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABHAAAsAAAAAI6AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuNY21hcAAAAYgAAAD+AAADymne8hxnbHlmAAACiAAAC+gAABioIzlOlWhlYWQAAA5wAAAAMAAAADZa/6SsaGhlYQAADqAAAAAdAAAAJAbpA4BobXR4AAAOwAAAABAAAAC0q+AAAGxvY2EAAA7QAAAAXAAAAFyF7o1GbWF4cAAADywAAAAfAAAAIAFMAXBuYW1lAAAPTAAAATEAAAIuUUJZCHBvc3QAABCAAAABPQAAAgfdkltveJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+xDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mEO+p/FEMUcxDANKMwIkgMABvgMMAB4nO3SV26EMABF0UsZpjG9d6Y3FpgF5StLYxMTP16WEUvHV1gGIQzQAJKgDFKIfojQ+A6rUb2e0KnXU77qPanWq/LzCXOkOVyn9RyHvWl4YkaTFu1wX5ecHn0GDBkxZsKUGXMWLFmxZsOWHXsOFBw5cebClRt3Hjx58dZ7RRn/I9cUF39Xpb691acRG2piOtUqNZ1P1TCdeJUZatNQW4baNtSO6U+ouoaam96u6hlq31AHhjo01JGhjg11YqhTQ50Z6txQF4a6NNSVoa4NdWOoW0PdGereUA+GWhjq0VBPhno21IuhXg31Zqh3Q30Y6tNQX4b6NtTSKH8BOIRpQQAAeJy1WH1sW9UVv+fG9vPz+7Bf/N6zHcd2/J04jbP6s0lap4kDpB9JWzUUCqxNgaHxpTI6hNhUNLVr17HSISb2D2iAJrWb6FTWahNQdQxRvmHamAR0qibE1E18CG3QaVNFvJ17n+3YIf1AiMQ679x77j3v3HPPPed3H7ER/OsYpw8TmQRIiuQJ8RZK+WjO1B3xaCzla21orY10a+OQ6aHTHtP0zB31mBs1GZ6RNU2uXc7oPL+xdRS9R9X1oK4fVfijdsBqvqF6vd1eLzPrYrYZ57WteF7bPDIc5+ZcJnta+S9i2Vfhs4MaMwZNQmO0Vv7gF/MZcNsCcJp4sJFSwYyAmRuFCmTBDRBUkwGqnlViyjmVBpLqaXhNpt0J5V1JOqMkuqn8WkMHvZX+iOlImiqkBiFVYDrCqINulmkwKb8ry2fkZBBn7FcTlk4ZdfpRZ9MOesLSAakKt0N3g4p2jAL8eIEOOqom/U0lgQRXUl8LtXM7HFkojUIpF0ErVBhcZC1vtyjtpsqr83a8RVcSH+ool8LgcIMjNohmVCACuDs506BdO6WIQeXjUsh1XKZGRNpp9piv3+Givoh00OU6KEV81HUHTLtN093Q+YGlE3wLHWRtMNy9XWqdLm2HKbaNsGzhu+41eswFOjE6WKSk2/1Wpt+qHeM6phbohmVmj3GvpdcVkiy9zbXfzHVqKuDB0IR2P6ZpF+D7dy6YC/9svGmBE5hKB9+X2+hh4iYRMkhGyTqyFc9APmeGQHf043tWQKHkizmwaY5AroTNVJzJDc2SFzUu92kOLsdmKu77vByb8/IjtxmhkMFISRBFISO4XMLJlj4XgGuRXtaHw2FLyHifdSOpisIhJjgkiPBAyJh7lfXTkhEadwk1mUngrOC6MazX7mASeEAPV1FyjEumBOaEDu4DP/ogRDKkiLEV1woVyMeLLKJCEM+FwdCwL4XLcRgdbfkhbzS8BNvXDKzNQiAWgOzagTXF1Eyq+Ci6/TPm/JrNY/59p1epKN4jQFGe0fx+LTMwNVCrAU2VSqnaKYzIiGmWe2Rvp9KDJhncrjLaFce8VCUbyQ1kB9lNfkJ+To6R58mfyd/Ip9ABXohDHqqwEW7A2Mij1ehntLu+h8xMtocjUJcYwoLdtYafv/1Vjy8vjLaLtBfOt3/B931Rexa24e5zstgnyqvZHs69zuhq3vFgRpQVJyN7FuE++RLSeW4xMi+t6Zeo5sIK6S5dlGVRD2hWnGoB3j7OV3lesvNLic8tOnLRSRfRdOna63VJp/1WbYs5dFZjy1AqpGICQEWKmNI+CZNoVTJ7pNop+IZkRrBHgnEmqr3TrEsfw1Gi8LqE+S1aV0SNNwXVVVvuUoU3ld6TLwmditIpvKTU50zSzWwO1h0rL8awnulwTXMYrGDT4aQ1fb4GPkyv5vMEh5Vec6yw0AMXnfcx1l/rfVZaKLDi0W4j/HfeyGZuHOf1IUGW1udizU2leXY0OmLpVDpVKJfKpZzPRKHgEBzpXAUKWYipoIeBdl3JfLZVBizEqWun1i4ZGFiyduq3DebayXsmJ+95gBG4+Urm1a2SdpKV57lP2wZyZqI+FAlfUtO+NCmgdWhMOS1gDY+jHWnBhwjBQLMEXxmLbx6t9JXTWDLtsSxgisfErqvQMbbBoywZmeyLeWe8OWNydFDxzMx4lMGRtX0xN3YFJkeW+O0bascGNwwObtjCCOzrzAVWjSwN2K9cpyn9o5cZOXMmkAuM85EbNHnJyHhfLLCnPhxJYw9eoIMkyC3l+4ZuY5ig7lW2oYUynDgg+Xrk+++Xe3zSgRYetnyuy+KbfjiB+GAAtZ8HHXmtijZfFFgrujhmOs2qkXvuSV6WqA1WLYqhPHOfsa26rklKFqbAGL2dOIlGurB6LWFVFd/KoBBaYTFYVBs93hZRFlrG5Ex4NVFIJguJVvqnBW2kNNvFGx90YUcSEvyZSMDeZjc0xYlEYy8+hHcWx9YrZOaPPyCGepP5Q34aXnGBr8d1QhSf4yjtiebZqNJfEYl4SY6dDRb8WSguLZW9ZQtBpoW4hX0QMyB2KmsYcOh8HMQxBn288oZ6BXV0GOq/ClKsC6T8g9X3OFKZNkJrYkOx2lEk+KNDy953+wGHXuGGzhGZ+uLK8FVrQkbtKBv+9EztU2sgTCNpvXMdJjqJ4tkdw+x00dPKkZ1QR254x7GQoFmvfakSnL3gCc5nREly2mN2pyTLMacMipNT7YInGU7JzlN2p9N+yinXTirOKEvPUafSWMNDmCf9pIQYaG19DSxKGqvAQ+xg60iabEm5MheUU2n+HxO4TDDbjnw6xxK8QzfhbHXq8pWVqanKysun9s6ztdt7sivGqruqYyuyPS6Hw9XehGt6q+l0dT0jvaFMZjiTuTHo7+vdtHJTb58/2ML+IxHt9/n9vv5owiWKrrbWD+sakKxhKoYzxF5f7y9INxki42QNuYrVFDPfvqxyY83xWNMV+ZxPSMWb62W+wPSCJwkDDl1WZOGW84nAEo4A7HjB/uWmOdayRFnKjazi668u/ajJlUd87aPk048Crlu4j1Oh9gxdL3Z1inNPIt2xvKNlsU4hn54Z5Y6YbTDu9hHOvkcFAb35fU6hNovKOrtQmcvbNV9/Ntfv5xf4atDWOOTX6CSHZ08xujhPs51+f9zvf1YLIGoPPKvxVh0TSLAXzzUBFiXs7GJVB7vH5/PAXznd4+vx4a95h3qI/oYIpIdMkA1kC7kVLS3GhWI5bwj1fIaVKG/Ei5gXWOjhtcJbzFthaMQrwIcIRj0ppvO6yV95icu9j/YPDNySWp7w+kOr95R1RfGpfVlDVhS/2geJ5Umv2mn0rkxBvzvgdisndJXaVF1X5z5jdHGe2n/QnYo8+b2uaMivhowgjYcLnVqnrEpQezsieyVZ6ooETbdJO6ip+cORLpes6BL82/qg8VHbo45B/vch/YQeJX28QvEANR3sQhxh+TcMCEd4l8BKF7uID7KM05tRYlIHHXY63YIi2fXQyj5XSBbcMeewKLpttkJ2Syz33YJfDdJdSYkqHbYb3VHRJgTV8c0TAy67YHeK7htwOKWax5co7Do8Pfh1tKdx1g5j9o6TZeQyMo27FuW3vbYsbY/Op3AG06DMKionRlpgHzCEeMmLU5opRrCyS670RzppZeW5p/iT3jL3lB4O63QS6dzzh8SAtOqwGJK3bv+lGJTWbr++471wsVKMRJCEK5H+cLg/Qp+IDsdqs7HhKD7hMXyyrD/Li8RjRqimHhI7HP2vSDZn9brplySb0L9dgpURSwmSiBFhilrwB8OA9gZ29NkRO/669parW9e7XZDxwvgRu+SE7zgl+xG5p/HtRqJ3cdwSZwsbwTA1WT3jEdyPN0sWxvDGy+xovIzHosnwc9LePf9tywun0fMkWaFYZbB4oovRq8VyKYUBkMVXqVhBHSylQ0wanvla3+rQ1XbR8ZzstYOo2Mf7vjk8ftcGDWxdSdXx0cAVveHg1TZFtEOn8ntBBFs11V++vuLUQ5qz+U6d/oUjpGIdNjOQhJXNqn5YCS1Yy5PofLGEs6Js2yOKe2yyOLxtaGjbt7cNIURCEDdWfaQ6lurtRYbePCuItv1iUNxvE4Vdw2zQ0LZhdv2fxjHp5uAmdlBpopHXoJGU8e6BRc0yi+PztkaHTRRrW1m2hcfFLlEUzzD+DGczjEVCg9jEQZhFcdAL2DjD+DPiSWQzjM2I89g5RXdxfECS+CIWy1hTGmFs6EIbkv/pbtkfU3aPrZ+4c2Lizn07qufym/L5TTdtyuU2/We3HPeDsjtb3bGPSSfW31aX3LQpX/d9sL7fWYpRJPBbCJavYjrFjj0rT2GWCZjf6Ytffr8beXl/HYeyGwJiIK8FLDHbfo65xGz7YCSRqCQSkbbHI5eUU5X4sjj+zrU9aHnRlEnrd7YGptd0x2Jf/RbH9PAiovadckSnEsJ661OgPFuH9B4O6e202vIN0h9xHXSJh1wRP5Vqv1uI6Wn9Gxmrwzqrii1gqhEscJanuAlGas+s2/uzvetgS72NpHZ6aHbZstmh/wPq1seEeJxjYGRgYADi31ySEvH8Nl8ZuJlfAEUYalQ3NCLo/6+ZpzLdAnI5GJhAogAiBgraeJxjYGRgYA76nwUkXzAAAfNUBkYGVKALAFb4A3EAAAB4nGNgYGBgfjG0MAAMzihlAAAAAABOAJoA6AEKASwBTgFwAZoBxAHuAhoCnALoBJoEvATWBPIFDgUqBXoF0AX+BkQGlga4BwgHagfiCGoIpAi8CVAJmAoQCiwKVgqQCtYLGAtOC4gL6AwuDFR4nGNgZGBg0GVMYRBlAAEmIOYCQgaG/2A+AwAYygG+AHicbZE9TsMwGIbf9A/RSggEYmHxAgtq+jN2ZGj3Dt3T1GlTOXHkuBW9AyfgEByCgTNwCA7BW/NJlVBtyd/jx+8XKwmAa3whwnFE6Ib1OBq44O6Pm6Qb4Rb5QbiNHh6FO/RD4S6eMRHu4RaaT4halzR3eBVu4Apvwk36d+EW+UO4jXt8Cnfov4W7WOBHuIen6MXsCtvPU1vWc73emcSdxIkW2tW5LdUoHp7kTJfaJV6v1PKg6v167H2mMmcLNbWl18ZYVTm71amPN95Xk8EgEx+ntoDBDgUs+siRspaoMef7rukNEriziXNuwS7Hmoe9wggxv+e55IzJMqQTeNYV00scuNbY8+YxrUfGfcaMZb/CNPQe04bT0lThbEuT0sfYhK6K/23Amf3Lx+H24hcj4GScAAAAeJxtjuduwzAMhH2NnTqOk+6993TfSZFY24giGZTVon36eiRFf5SAiO/A05HBWtBXEvxfGdYwQIgIQ6wjxggJxkgxwRQb2MQWtrGDXexhHwc4xBGOcYJTnOEcF7jEFa5xg1vc4R4PeMQTnvGCV2R4C1Khy9xkkkxNnPRC03s97pHLvKgTYXJNmbKfZom9o8POEffsq0Qw28+ltcPe2uHS2rGvRjPBmSwE1+GMtI6l0GSU4JEsSM4XgudpQx9sTRf3K9rAyUr0962UryKprZwPpM0jyda5uP2qrVBjxSLPCmGUplixrdpBSKqsI2oO4gF9Udq8TJVOzDSpcEHGR4vSeJdaVsSkMl26OqoKa6jttQ0rLb6a5l3YjO2QqV01YXLlNy2XDR0JlkXojbJTb/5GDX3V+kPviIPgB9AUks0AAAA=)
|
|
669
|
+
format('woff');
|
|
670
|
+
font-weight: normal;
|
|
671
|
+
font-style: normal;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
html {
|
|
675
|
+
--lumo-icons-align-center: '\\ea01';
|
|
676
|
+
--lumo-icons-align-left: '\\ea02';
|
|
677
|
+
--lumo-icons-align-right: '\\ea03';
|
|
678
|
+
--lumo-icons-angle-down: '\\ea04';
|
|
679
|
+
--lumo-icons-angle-left: '\\ea05';
|
|
680
|
+
--lumo-icons-angle-right: '\\ea06';
|
|
681
|
+
--lumo-icons-angle-up: '\\ea07';
|
|
682
|
+
--lumo-icons-arrow-down: '\\ea08';
|
|
683
|
+
--lumo-icons-arrow-left: '\\ea09';
|
|
684
|
+
--lumo-icons-arrow-right: '\\ea0a';
|
|
685
|
+
--lumo-icons-arrow-up: '\\ea0b';
|
|
686
|
+
--lumo-icons-bar-chart: '\\ea0c';
|
|
687
|
+
--lumo-icons-bell: '\\ea0d';
|
|
688
|
+
--lumo-icons-calendar: '\\ea0e';
|
|
689
|
+
--lumo-icons-checkmark: '\\ea0f';
|
|
690
|
+
--lumo-icons-chevron-down: '\\ea10';
|
|
691
|
+
--lumo-icons-chevron-left: '\\ea11';
|
|
692
|
+
--lumo-icons-chevron-right: '\\ea12';
|
|
693
|
+
--lumo-icons-chevron-up: '\\ea13';
|
|
694
|
+
--lumo-icons-clock: '\\ea14';
|
|
695
|
+
--lumo-icons-cog: '\\ea15';
|
|
696
|
+
--lumo-icons-cross: '\\ea16';
|
|
697
|
+
--lumo-icons-download: '\\ea17';
|
|
698
|
+
--lumo-icons-drag-handle: '\\ea18';
|
|
699
|
+
--lumo-icons-dropdown: '\\ea19';
|
|
700
|
+
--lumo-icons-edit: '\\ea1a';
|
|
701
|
+
--lumo-icons-error: '\\ea1b';
|
|
702
|
+
--lumo-icons-eye: '\\ea1c';
|
|
703
|
+
--lumo-icons-eye-disabled: '\\ea1d';
|
|
704
|
+
--lumo-icons-menu: '\\ea1e';
|
|
705
|
+
--lumo-icons-minus: '\\ea1f';
|
|
706
|
+
--lumo-icons-ordered-list: '\\ea20';
|
|
707
|
+
--lumo-icons-phone: '\\ea21';
|
|
708
|
+
--lumo-icons-photo: '\\ea22';
|
|
709
|
+
--lumo-icons-play: '\\ea23';
|
|
710
|
+
--lumo-icons-plus: '\\ea24';
|
|
711
|
+
--lumo-icons-redo: '\\ea25';
|
|
712
|
+
--lumo-icons-reload: '\\ea26';
|
|
713
|
+
--lumo-icons-resize-handle: '\\ea27';
|
|
714
|
+
--lumo-icons-search: '\\ea28';
|
|
715
|
+
--lumo-icons-undo: '\\ea29';
|
|
716
|
+
--lumo-icons-unordered-list: '\\ea2a';
|
|
717
|
+
--lumo-icons-upload: '\\ea2b';
|
|
718
|
+
--lumo-icons-user: '\\ea2c';
|
|
719
|
+
}
|
|
720
|
+
`),Pt("spacing-props",y`
|
|
721
|
+
:host {
|
|
722
|
+
/* Square */
|
|
723
|
+
--lumo-space-xs: 0.25rem;
|
|
724
|
+
--lumo-space-s: 0.5rem;
|
|
725
|
+
--lumo-space-m: 1rem;
|
|
726
|
+
--lumo-space-l: 1.5rem;
|
|
727
|
+
--lumo-space-xl: 2.5rem;
|
|
728
|
+
|
|
729
|
+
/* Wide */
|
|
730
|
+
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
|
731
|
+
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
|
732
|
+
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
|
733
|
+
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
|
734
|
+
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
|
735
|
+
|
|
736
|
+
/* Tall */
|
|
737
|
+
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
|
738
|
+
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
|
739
|
+
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
|
740
|
+
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
741
|
+
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
742
|
+
}
|
|
743
|
+
`);const Dt=y`
|
|
744
|
+
:host {
|
|
745
|
+
display: flex;
|
|
746
|
+
align-items: center;
|
|
747
|
+
box-sizing: border-box;
|
|
748
|
+
font-family: var(--lumo-font-family);
|
|
749
|
+
font-size: var(--lumo-font-size-m);
|
|
750
|
+
line-height: var(--lumo-line-height-xs);
|
|
751
|
+
padding: 0.5em calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4) 0.5em
|
|
752
|
+
var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
|
|
753
|
+
min-height: var(--lumo-size-m);
|
|
754
|
+
outline: none;
|
|
755
|
+
border-radius: var(--lumo-border-radius-m);
|
|
756
|
+
cursor: var(--lumo-clickable-cursor);
|
|
757
|
+
-webkit-font-smoothing: antialiased;
|
|
758
|
+
-moz-osx-font-smoothing: grayscale;
|
|
759
|
+
-webkit-tap-highlight-color: var(--lumo-primary-color-10pct);
|
|
760
|
+
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
|
761
|
+
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
|
762
|
+
--_selection-color-text: var(--vaadin-selection-color-text, var(--lumo-primary-text-color));
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/* Checkmark */
|
|
766
|
+
[part='checkmark']::before {
|
|
767
|
+
display: var(--_lumo-item-selected-icon-display, none);
|
|
768
|
+
content: var(--lumo-icons-checkmark);
|
|
769
|
+
font-family: lumo-icons;
|
|
770
|
+
font-size: var(--lumo-icon-size-m);
|
|
771
|
+
line-height: 1;
|
|
772
|
+
font-weight: normal;
|
|
773
|
+
width: 1em;
|
|
774
|
+
height: 1em;
|
|
775
|
+
margin: calc((1 - var(--lumo-line-height-xs)) * var(--lumo-font-size-m) / 2) 0;
|
|
776
|
+
color: var(--_selection-color-text);
|
|
777
|
+
flex: none;
|
|
778
|
+
opacity: 0;
|
|
779
|
+
transition:
|
|
780
|
+
transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2),
|
|
781
|
+
opacity 0.1s;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
:host([selected]) [part='checkmark']::before {
|
|
785
|
+
opacity: 1;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
:host([active]:not([selected])) [part='checkmark']::before {
|
|
789
|
+
transform: scale(0.8);
|
|
790
|
+
opacity: 0;
|
|
791
|
+
transition-duration: 0s;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
[part='content'] {
|
|
795
|
+
flex: auto;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/* Disabled */
|
|
799
|
+
:host([disabled]) {
|
|
800
|
+
color: var(--lumo-disabled-text-color);
|
|
801
|
+
cursor: default;
|
|
802
|
+
pointer-events: none;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
/* TODO a workaround until we have "focus-follows-mouse". After that, use the hover style for focus-ring as well */
|
|
806
|
+
@media (any-hover: hover) {
|
|
807
|
+
:host(:hover:not([disabled])) {
|
|
808
|
+
background-color: var(--lumo-primary-color-10pct);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
:host([focus-ring]:not([disabled])) {
|
|
813
|
+
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
/* RTL specific styles */
|
|
817
|
+
:host([dir='rtl']) {
|
|
818
|
+
padding-left: calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4);
|
|
819
|
+
padding-right: var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
/* Slotted icons */
|
|
823
|
+
:host ::slotted(vaadin-icon) {
|
|
824
|
+
width: var(--lumo-icon-size-m);
|
|
825
|
+
height: var(--lumo-icon-size-m);
|
|
826
|
+
}
|
|
827
|
+
`;zt("vaadin-item",Dt,{moduleId:"lumo-item"}),
|
|
828
|
+
/**
|
|
829
|
+
* @license
|
|
830
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
831
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
832
|
+
*/
|
|
833
|
+
window.Vaadin||={},window.Vaadin.featureFlags||={};const jt={};
|
|
834
|
+
/**
|
|
835
|
+
* @license
|
|
836
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
837
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
838
|
+
*/
|
|
839
|
+
class Ft extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}!function(t,e="24.6.3"){if(Object.defineProperty(t,"version",{get:()=>e}),t.experimental){const e="string"==typeof t.experimental?t.experimental:`${i=t.is.split("-").slice(1).join("-"),i.replace(/-[a-z]/gu,(t=>t[1].toUpperCase()))}Component`;if(!window.Vaadin.featureFlags[e]&&!jt[e])return jt[e]=new Set,jt[e].add(t),void Object.defineProperty(window.Vaadin.featureFlags,e,{get:()=>0===jt[e].size,set(t){t&&jt[e].size>0&&(jt[e].forEach((t=>{customElements.define(t.is,t)})),jt[e].clear())}});if(jt[e])return void jt[e].add(t)}var i;const o=customElements.get(t.is);if(o){const e=o.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${o.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}(Ft);
|
|
840
|
+
/**
|
|
841
|
+
* @license
|
|
842
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
843
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
844
|
+
*/
|
|
845
|
+
const Rt=new Set,Lt=new Set;const Ht="vaadin-themable-mixin-style";function Gt(t){t.prototype instanceof bt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Ht).textContent=t.getStylesForThis().map((t=>t.cssText)).join("\n"),Lt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&Gt(i)}))}function Wt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof g||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules&&window.Vaadin.styleModules.registerStyles(t,e,i),t&&Lt.forEach((i=>{if(function(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}(t,i)&&function(t){return(e=customElements.get(t))&&Object.prototype.hasOwnProperty.call(e,"__themes");var e}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),Gt(t),function(t){Rt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof bt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),w(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Ht).textContent=e.prototype._template.content.getElementById(Ht).textContent}(i):i||Rt.delete(e)}))}(t)}}))}
|
|
846
|
+
/**
|
|
847
|
+
* @license
|
|
848
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
849
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
850
|
+
*/const Ut=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Ut("color-props",y`
|
|
851
|
+
:host {
|
|
852
|
+
/* Base (background) */
|
|
853
|
+
--lumo-base-color: #fff;
|
|
854
|
+
|
|
855
|
+
/* Tint */
|
|
856
|
+
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
857
|
+
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
858
|
+
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
859
|
+
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
860
|
+
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
861
|
+
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
862
|
+
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
863
|
+
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
864
|
+
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
865
|
+
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
866
|
+
--lumo-tint: #fff;
|
|
867
|
+
|
|
868
|
+
/* Shade */
|
|
869
|
+
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
870
|
+
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
871
|
+
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
872
|
+
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
873
|
+
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
874
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
875
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
876
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
877
|
+
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
878
|
+
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
879
|
+
--lumo-shade: hsl(214, 35%, 15%);
|
|
880
|
+
|
|
881
|
+
/* Contrast */
|
|
882
|
+
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
883
|
+
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
884
|
+
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
885
|
+
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
886
|
+
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
887
|
+
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
888
|
+
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
889
|
+
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
890
|
+
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
891
|
+
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
892
|
+
--lumo-contrast: var(--lumo-shade);
|
|
893
|
+
|
|
894
|
+
/* Text */
|
|
895
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
896
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
897
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
898
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
899
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
900
|
+
|
|
901
|
+
/* Primary */
|
|
902
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
903
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
904
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
905
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
906
|
+
--lumo-primary-contrast-color: #fff;
|
|
907
|
+
|
|
908
|
+
/* Error */
|
|
909
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
|
910
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
911
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
912
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
913
|
+
--lumo-error-contrast-color: #fff;
|
|
914
|
+
|
|
915
|
+
/* Success */
|
|
916
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
917
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
918
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
919
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
920
|
+
--lumo-success-contrast-color: #fff;
|
|
921
|
+
|
|
922
|
+
/* Warning */
|
|
923
|
+
--lumo-warning-color: hsl(48, 100%, 50%);
|
|
924
|
+
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
|
925
|
+
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
|
926
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
/* forced-colors mode adjustments */
|
|
930
|
+
@media (forced-colors: active) {
|
|
931
|
+
html {
|
|
932
|
+
--lumo-disabled-text-color: GrayText;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
`),Wt("",y`
|
|
936
|
+
[theme~='dark'] {
|
|
937
|
+
/* Base (background) */
|
|
938
|
+
--lumo-base-color: hsl(214, 35%, 21%);
|
|
939
|
+
|
|
940
|
+
/* Tint */
|
|
941
|
+
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
942
|
+
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
943
|
+
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
944
|
+
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
945
|
+
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
946
|
+
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
947
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
948
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
949
|
+
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
950
|
+
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
951
|
+
--lumo-tint: hsl(214, 100%, 98%);
|
|
952
|
+
|
|
953
|
+
/* Shade */
|
|
954
|
+
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
955
|
+
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
956
|
+
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
957
|
+
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
958
|
+
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
959
|
+
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
960
|
+
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
961
|
+
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
962
|
+
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
963
|
+
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
964
|
+
--lumo-shade: hsl(214, 33%, 13%);
|
|
965
|
+
|
|
966
|
+
/* Contrast */
|
|
967
|
+
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
968
|
+
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
969
|
+
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
970
|
+
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
971
|
+
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
972
|
+
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
973
|
+
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
974
|
+
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
975
|
+
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
976
|
+
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
977
|
+
--lumo-contrast: var(--lumo-tint);
|
|
978
|
+
|
|
979
|
+
/* Text */
|
|
980
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
981
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
982
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
983
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
984
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
985
|
+
|
|
986
|
+
/* Primary */
|
|
987
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
988
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
989
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
990
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
991
|
+
--lumo-primary-contrast-color: #fff;
|
|
992
|
+
|
|
993
|
+
/* Error */
|
|
994
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
|
995
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
996
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
997
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
998
|
+
|
|
999
|
+
/* Success */
|
|
1000
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
1001
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
1002
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
1003
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
1004
|
+
|
|
1005
|
+
/* Warning */
|
|
1006
|
+
--lumo-warning-color: hsl(43, 100%, 48%);
|
|
1007
|
+
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
|
1008
|
+
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
|
1009
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
html {
|
|
1013
|
+
color: var(--lumo-body-text-color);
|
|
1014
|
+
background-color: var(--lumo-base-color);
|
|
1015
|
+
color-scheme: light;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
[theme~='dark'] {
|
|
1019
|
+
color: var(--lumo-body-text-color);
|
|
1020
|
+
background-color: var(--lumo-base-color);
|
|
1021
|
+
color-scheme: dark;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
h1,
|
|
1025
|
+
h2,
|
|
1026
|
+
h3,
|
|
1027
|
+
h4,
|
|
1028
|
+
h5,
|
|
1029
|
+
h6 {
|
|
1030
|
+
color: var(--lumo-header-text-color);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
a:where(:any-link) {
|
|
1034
|
+
color: var(--lumo-primary-text-color);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
a:not(:any-link) {
|
|
1038
|
+
color: var(--lumo-disabled-text-color);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
blockquote {
|
|
1042
|
+
color: var(--lumo-secondary-text-color);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
code,
|
|
1046
|
+
pre {
|
|
1047
|
+
background-color: var(--lumo-contrast-10pct);
|
|
1048
|
+
border-radius: var(--lumo-border-radius-m);
|
|
1049
|
+
}
|
|
1050
|
+
pre code {
|
|
1051
|
+
background: transparent;
|
|
1052
|
+
}
|
|
1053
|
+
`,{moduleId:"lumo-color"}),Ut("spacing-props",y`
|
|
1054
|
+
:host {
|
|
1055
|
+
/* Square */
|
|
1056
|
+
--lumo-space-xs: 0.25rem;
|
|
1057
|
+
--lumo-space-s: 0.5rem;
|
|
1058
|
+
--lumo-space-m: 1rem;
|
|
1059
|
+
--lumo-space-l: 1.5rem;
|
|
1060
|
+
--lumo-space-xl: 2.5rem;
|
|
1061
|
+
|
|
1062
|
+
/* Wide */
|
|
1063
|
+
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
|
1064
|
+
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
|
1065
|
+
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
|
1066
|
+
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
|
1067
|
+
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
|
1068
|
+
|
|
1069
|
+
/* Tall */
|
|
1070
|
+
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
|
1071
|
+
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
|
1072
|
+
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
|
1073
|
+
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
1074
|
+
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
1075
|
+
}
|
|
1076
|
+
`),y`
|
|
1077
|
+
html {
|
|
1078
|
+
/* Button */
|
|
1079
|
+
--vaadin-button-background: var(--lumo-contrast-5pct);
|
|
1080
|
+
--vaadin-button-border: none;
|
|
1081
|
+
--vaadin-button-border-radius: var(--lumo-border-radius-m);
|
|
1082
|
+
--vaadin-button-font-size: var(--lumo-font-size-m);
|
|
1083
|
+
--vaadin-button-font-weight: 500;
|
|
1084
|
+
--vaadin-button-height: var(--lumo-size-m);
|
|
1085
|
+
--vaadin-button-margin: var(--lumo-space-xs) 0;
|
|
1086
|
+
--vaadin-button-min-width: calc(var(--vaadin-button-height) * 2);
|
|
1087
|
+
--vaadin-button-padding: 0 calc(var(--vaadin-button-height) / 3 + var(--lumo-border-radius-m) / 2);
|
|
1088
|
+
--vaadin-button-text-color: var(--lumo-primary-text-color);
|
|
1089
|
+
--vaadin-button-primary-background: var(--lumo-primary-color);
|
|
1090
|
+
--vaadin-button-primary-border: none;
|
|
1091
|
+
--vaadin-button-primary-font-weight: 600;
|
|
1092
|
+
--vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);
|
|
1093
|
+
--vaadin-button-tertiary-background: transparent !important;
|
|
1094
|
+
--vaadin-button-tertiary-text-color: var(--lumo-primary-text-color);
|
|
1095
|
+
--vaadin-button-tertiary-font-weight: 500;
|
|
1096
|
+
--vaadin-button-tertiary-padding: 0 calc(var(--vaadin-button-height) / 6);
|
|
1097
|
+
/* Checkbox */
|
|
1098
|
+
--vaadin-checkbox-background: var(--lumo-contrast-20pct);
|
|
1099
|
+
--vaadin-checkbox-background-hover: var(--lumo-contrast-30pct);
|
|
1100
|
+
--vaadin-checkbox-border-radius: var(--lumo-border-radius-s);
|
|
1101
|
+
--vaadin-checkbox-checkmark-char: var(--lumo-icons-checkmark);
|
|
1102
|
+
--vaadin-checkbox-checkmark-char-indeterminate: '';
|
|
1103
|
+
--vaadin-checkbox-checkmark-color: var(--lumo-primary-contrast-color);
|
|
1104
|
+
--vaadin-checkbox-checkmark-size: calc(var(--vaadin-checkbox-size) + 2px);
|
|
1105
|
+
--vaadin-checkbox-label-color: var(--lumo-body-text-color);
|
|
1106
|
+
--vaadin-checkbox-label-font-size: var(--lumo-font-size-m);
|
|
1107
|
+
--vaadin-checkbox-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs);
|
|
1108
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
1109
|
+
--vaadin-checkbox-disabled-checkmark-color: var(--lumo-contrast-30pct);
|
|
1110
|
+
--vaadin-checkbox-disabled-background: var(--lumo-contrast-10pct);
|
|
1111
|
+
/* Radio button */
|
|
1112
|
+
--vaadin-radio-button-background: var(--lumo-contrast-20pct);
|
|
1113
|
+
--vaadin-radio-button-background-hover: var(--lumo-contrast-30pct);
|
|
1114
|
+
--vaadin-radio-button-dot-color: var(--lumo-primary-contrast-color);
|
|
1115
|
+
--vaadin-radio-button-dot-size: 3px;
|
|
1116
|
+
--vaadin-radio-button-label-color: var(--lumo-body-text-color);
|
|
1117
|
+
--vaadin-radio-button-label-font-size: var(--lumo-font-size-m);
|
|
1118
|
+
--vaadin-radio-button-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs)
|
|
1119
|
+
var(--lumo-space-xs);
|
|
1120
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
1121
|
+
--vaadin-radio-button-disabled-background: var(--lumo-contrast-10pct);
|
|
1122
|
+
--vaadin-radio-button-disabled-dot-color: var(--lumo-contrast-30pct);
|
|
1123
|
+
--vaadin-selection-color: var(--lumo-primary-color);
|
|
1124
|
+
--vaadin-selection-color-text: var(--lumo-primary-text-color);
|
|
1125
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
1126
|
+
--vaadin-focus-ring-color: var(--lumo-primary-color-50pct);
|
|
1127
|
+
--vaadin-focus-ring-width: 2px;
|
|
1128
|
+
/* Label */
|
|
1129
|
+
--vaadin-input-field-label-color: var(--lumo-secondary-text-color);
|
|
1130
|
+
--vaadin-input-field-focused-label-color: var(--lumo-primary-text-color);
|
|
1131
|
+
--vaadin-input-field-hovered-label-color: var(--lumo-body-text-color);
|
|
1132
|
+
--vaadin-input-field-label-font-size: var(--lumo-font-size-s);
|
|
1133
|
+
--vaadin-input-field-label-font-weight: 500;
|
|
1134
|
+
/* Helper */
|
|
1135
|
+
--vaadin-input-field-helper-color: var(--lumo-secondary-text-color);
|
|
1136
|
+
--vaadin-input-field-helper-font-size: var(--lumo-font-size-xs);
|
|
1137
|
+
--vaadin-input-field-helper-font-weight: 400;
|
|
1138
|
+
--vaadin-input-field-helper-spacing: 0.4em;
|
|
1139
|
+
/* Error message */
|
|
1140
|
+
--vaadin-input-field-error-color: var(--lumo-error-text-color);
|
|
1141
|
+
--vaadin-input-field-error-font-size: var(--lumo-font-size-xs);
|
|
1142
|
+
--vaadin-input-field-error-font-weight: 400;
|
|
1143
|
+
/* Input field */
|
|
1144
|
+
--vaadin-input-field-background: var(--lumo-contrast-10pct);
|
|
1145
|
+
--vaadin-input-field-icon-color: var(--lumo-contrast-60pct);
|
|
1146
|
+
--vaadin-input-field-icon-size: var(--lumo-icon-size-m);
|
|
1147
|
+
--vaadin-input-field-invalid-background: var(--lumo-error-color-10pct);
|
|
1148
|
+
--vaadin-input-field-invalid-hover-highlight: var(--lumo-error-color-50pct);
|
|
1149
|
+
--vaadin-input-field-disabled-background: var(--lumo-contrast-5pct);
|
|
1150
|
+
--vaadin-input-field-disabled-value-color: var(--lumo-disabled-text-color);
|
|
1151
|
+
--vaadin-input-field-height: var(--lumo-size-m);
|
|
1152
|
+
--vaadin-input-field-hover-highlight: var(--lumo-contrast-50pct);
|
|
1153
|
+
--vaadin-input-field-placeholder-color: var(--lumo-secondary-text-color);
|
|
1154
|
+
--vaadin-input-field-readonly-border: 1px dashed var(--lumo-contrast-30pct);
|
|
1155
|
+
--vaadin-input-field-value-color: var(--lumo-body-text-color);
|
|
1156
|
+
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
1157
|
+
--vaadin-input-field-value-font-weight: 500;
|
|
1158
|
+
}
|
|
1159
|
+
`,Ut("style-props",y`
|
|
1160
|
+
:host {
|
|
1161
|
+
/* Border radius */
|
|
1162
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
1163
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
1164
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
1165
|
+
|
|
1166
|
+
/* Shadow */
|
|
1167
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
1168
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
1169
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
1170
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
1171
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
1172
|
+
|
|
1173
|
+
/* Clickable element cursor */
|
|
1174
|
+
--lumo-clickable-cursor: default;
|
|
1175
|
+
}
|
|
1176
|
+
`);const qt=y`
|
|
1177
|
+
:host {
|
|
1178
|
+
-webkit-tap-highlight-color: transparent;
|
|
1179
|
+
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/* Dividers */
|
|
1183
|
+
[part='items'] ::slotted(hr) {
|
|
1184
|
+
height: 1px;
|
|
1185
|
+
border: 0;
|
|
1186
|
+
padding: 0;
|
|
1187
|
+
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
1188
|
+
background-color: var(--lumo-contrast-10pct);
|
|
1189
|
+
}
|
|
1190
|
+
`;Wt("vaadin-list-box",qt,{moduleId:"lumo-list-box"});
|
|
1191
|
+
/**
|
|
1192
|
+
* @license
|
|
1193
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1194
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1195
|
+
*/
|
|
1196
|
+
const $t=y`
|
|
1197
|
+
[part$='button'] {
|
|
1198
|
+
flex: none;
|
|
1199
|
+
width: 1em;
|
|
1200
|
+
height: 1em;
|
|
1201
|
+
line-height: 1;
|
|
1202
|
+
font-size: var(--lumo-icon-size-m);
|
|
1203
|
+
text-align: center;
|
|
1204
|
+
color: var(--lumo-contrast-60pct);
|
|
1205
|
+
transition: 0.2s color;
|
|
1206
|
+
cursor: var(--lumo-clickable-cursor);
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
[part$='button']:hover {
|
|
1210
|
+
color: var(--lumo-contrast-90pct);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
:host([disabled]) [part$='button'],
|
|
1214
|
+
:host([readonly]) [part$='button'] {
|
|
1215
|
+
color: var(--lumo-contrast-20pct);
|
|
1216
|
+
cursor: default;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
[part$='button']::before {
|
|
1220
|
+
font-family: 'lumo-icons';
|
|
1221
|
+
display: block;
|
|
1222
|
+
}
|
|
1223
|
+
`;zt("",$t,{moduleId:"lumo-field-button"});
|
|
1224
|
+
/**
|
|
1225
|
+
* @license
|
|
1226
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1227
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1228
|
+
*/
|
|
1229
|
+
const Vt=y`
|
|
1230
|
+
:host {
|
|
1231
|
+
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
:host([has-helper]) [part='helper-text']::before {
|
|
1235
|
+
content: '';
|
|
1236
|
+
display: block;
|
|
1237
|
+
height: var(--_helper-spacing);
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
[part='helper-text'] {
|
|
1241
|
+
display: block;
|
|
1242
|
+
color: var(--vaadin-input-field-helper-color, var(--lumo-secondary-text-color));
|
|
1243
|
+
font-size: var(--vaadin-input-field-helper-font-size, var(--lumo-font-size-xs));
|
|
1244
|
+
line-height: var(--lumo-line-height-xs);
|
|
1245
|
+
font-weight: var(--vaadin-input-field-helper-font-weight, 400);
|
|
1246
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1247
|
+
transition: color 0.2s;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
:host(:hover:not([readonly])) [part='helper-text'] {
|
|
1251
|
+
color: var(--lumo-body-text-color);
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
:host([disabled]) [part='helper-text'] {
|
|
1255
|
+
color: var(--lumo-disabled-text-color);
|
|
1256
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
|
|
1260
|
+
display: none;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
|
|
1264
|
+
content: '';
|
|
1265
|
+
display: block;
|
|
1266
|
+
height: var(--_helper-spacing);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] {
|
|
1270
|
+
order: 0;
|
|
1271
|
+
padding-bottom: var(--_helper-spacing);
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
|
|
1275
|
+
order: 1;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] + * {
|
|
1279
|
+
order: 2;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
:host([has-helper][theme~='helper-above-field']) [part='error-message'] {
|
|
1283
|
+
order: 3;
|
|
1284
|
+
}
|
|
1285
|
+
`
|
|
1286
|
+
/**
|
|
1287
|
+
* @license
|
|
1288
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1289
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1290
|
+
*/,Jt=y`
|
|
1291
|
+
[part='label'] {
|
|
1292
|
+
align-self: flex-start;
|
|
1293
|
+
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
1294
|
+
font-weight: var(--vaadin-input-field-label-font-weight, 500);
|
|
1295
|
+
font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
|
|
1296
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1297
|
+
transition: color 0.2s;
|
|
1298
|
+
line-height: 1;
|
|
1299
|
+
padding-right: 1em;
|
|
1300
|
+
padding-bottom: 0.5em;
|
|
1301
|
+
/* As a workaround for diacritics being cut off, add a top padding and a
|
|
1302
|
+
negative margin to compensate */
|
|
1303
|
+
padding-top: 0.25em;
|
|
1304
|
+
margin-top: -0.25em;
|
|
1305
|
+
overflow: hidden;
|
|
1306
|
+
white-space: nowrap;
|
|
1307
|
+
text-overflow: ellipsis;
|
|
1308
|
+
position: relative;
|
|
1309
|
+
max-width: 100%;
|
|
1310
|
+
box-sizing: border-box;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
:host([focused]:not([readonly])) [part='label'] {
|
|
1314
|
+
color: var(--vaadin-input-field-focused-label-color, var(--lumo-primary-text-color));
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
1318
|
+
color: var(--vaadin-input-field-hovered-label-color, var(--lumo-body-text-color));
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
/* Touch device adjustment */
|
|
1322
|
+
@media (pointer: coarse) {
|
|
1323
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
1324
|
+
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
:host([has-label])::before {
|
|
1329
|
+
margin-top: calc(var(--lumo-font-size-s) * 1.5);
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
:host([has-label][theme~='small'])::before {
|
|
1333
|
+
margin-top: calc(var(--lumo-font-size-xs) * 1.5);
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
:host([has-label]) {
|
|
1337
|
+
padding-top: var(--lumo-space-m);
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
:host([has-label]) ::slotted([slot='tooltip']) {
|
|
1341
|
+
--vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
:host([required]) [part='required-indicator']::after {
|
|
1345
|
+
content: var(--lumo-required-field-indicator, '\\2022');
|
|
1346
|
+
transition: opacity 0.2s;
|
|
1347
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
|
|
1348
|
+
position: absolute;
|
|
1349
|
+
right: 0;
|
|
1350
|
+
width: 1em;
|
|
1351
|
+
text-align: center;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
:host([invalid]) [part='required-indicator']::after {
|
|
1355
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
[part='error-message'] {
|
|
1359
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1360
|
+
font-size: var(--vaadin-input-field-error-font-size, var(--lumo-font-size-xs));
|
|
1361
|
+
line-height: var(--lumo-line-height-xs);
|
|
1362
|
+
font-weight: var(--vaadin-input-field-error-font-weight, 400);
|
|
1363
|
+
color: var(--vaadin-input-field-error-color, var(--lumo-error-text-color));
|
|
1364
|
+
will-change: max-height;
|
|
1365
|
+
transition: 0.4s max-height;
|
|
1366
|
+
max-height: 5em;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
:host([has-error-message]) [part='error-message']::before,
|
|
1370
|
+
:host([has-error-message]) [part='error-message']::after {
|
|
1371
|
+
content: '';
|
|
1372
|
+
display: block;
|
|
1373
|
+
height: 0.4em;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
:host(:not([invalid])) [part='error-message'] {
|
|
1377
|
+
max-height: 0;
|
|
1378
|
+
overflow: hidden;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
/* RTL specific styles */
|
|
1382
|
+
|
|
1383
|
+
:host([dir='rtl']) [part='label'] {
|
|
1384
|
+
margin-left: 0;
|
|
1385
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
:host([dir='rtl']) [part='label'] {
|
|
1389
|
+
padding-left: 1em;
|
|
1390
|
+
padding-right: 0;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
:host([dir='rtl']) [part='required-indicator']::after {
|
|
1394
|
+
right: auto;
|
|
1395
|
+
left: 0;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
:host([dir='rtl']) [part='error-message'] {
|
|
1399
|
+
margin-left: 0;
|
|
1400
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1401
|
+
}
|
|
1402
|
+
`;zt("",Jt,{moduleId:"lumo-required-field"});
|
|
1403
|
+
/**
|
|
1404
|
+
* @license
|
|
1405
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1406
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1407
|
+
*/
|
|
1408
|
+
const Yt=[Jt,$t,Vt,y`
|
|
1409
|
+
:host {
|
|
1410
|
+
--lumo-text-field-size: var(--lumo-size-m);
|
|
1411
|
+
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
1412
|
+
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
1413
|
+
font-family: var(--lumo-font-family);
|
|
1414
|
+
-webkit-font-smoothing: antialiased;
|
|
1415
|
+
-moz-osx-font-smoothing: grayscale;
|
|
1416
|
+
-webkit-tap-highlight-color: transparent;
|
|
1417
|
+
padding: var(--lumo-space-xs) 0;
|
|
1418
|
+
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
|
1419
|
+
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
|
1420
|
+
--_input-height: var(--vaadin-input-field-height, var(--lumo-text-field-size));
|
|
1421
|
+
--_disabled-value-color: var(--vaadin-input-field-disabled-value-color, var(--lumo-disabled-text-color));
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
:host::before {
|
|
1425
|
+
height: var(--_input-height);
|
|
1426
|
+
box-sizing: border-box;
|
|
1427
|
+
display: inline-flex;
|
|
1428
|
+
align-items: center;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
:host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {
|
|
1432
|
+
-webkit-mask-image: none;
|
|
1433
|
+
mask-image: none;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
::slotted(:is(input, textarea):placeholder-shown) {
|
|
1437
|
+
color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
/* Hover */
|
|
1441
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
1442
|
+
opacity: var(--vaadin-input-field-hover-highlight-opacity, 0.1);
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
/* Touch device adjustment */
|
|
1446
|
+
@media (pointer: coarse) {
|
|
1447
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
1448
|
+
opacity: 0;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
:host(:active:not([readonly]):not([focused])) [part='input-field']::after {
|
|
1452
|
+
opacity: 0.2;
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
/* Trigger when not focusing using the keyboard */
|
|
1457
|
+
:host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {
|
|
1458
|
+
transform: scaleX(0);
|
|
1459
|
+
transition-duration: 0.15s, 1s;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
/* Focus-ring */
|
|
1463
|
+
:host([focus-ring]) [part='input-field'] {
|
|
1464
|
+
box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
/* Read-only and disabled */
|
|
1468
|
+
:host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {
|
|
1469
|
+
opacity: 0;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
/* Read-only style */
|
|
1473
|
+
:host([readonly]) {
|
|
1474
|
+
--vaadin-input-field-border-color: transparent;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
/* Disabled style */
|
|
1478
|
+
:host([disabled]) {
|
|
1479
|
+
pointer-events: none;
|
|
1480
|
+
--vaadin-input-field-border-color: var(--lumo-contrast-20pct);
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
:host([disabled]) [part='label'],
|
|
1484
|
+
:host([disabled]) [part='input-field'] ::slotted([slot$='fix']) {
|
|
1485
|
+
color: var(--lumo-disabled-text-color);
|
|
1486
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
:host([disabled]) [part='input-field'] ::slotted(:not([slot$='fix'])) {
|
|
1490
|
+
color: var(--_disabled-value-color);
|
|
1491
|
+
-webkit-text-fill-color: var(--_disabled-value-color);
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
/* Invalid style */
|
|
1495
|
+
:host([invalid]) {
|
|
1496
|
+
--vaadin-input-field-border-color: var(--lumo-error-color);
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
:host([invalid][focus-ring]) [part='input-field'] {
|
|
1500
|
+
box-shadow: 0 0 0 var(--_focus-ring-width) var(--lumo-error-color-50pct);
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
:host([input-prevented]) [part='input-field'] {
|
|
1504
|
+
animation: shake 0.15s infinite;
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
@keyframes shake {
|
|
1508
|
+
25% {
|
|
1509
|
+
transform: translateX(4px);
|
|
1510
|
+
}
|
|
1511
|
+
75% {
|
|
1512
|
+
transform: translateX(-4px);
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
/* Small theme */
|
|
1517
|
+
:host([theme~='small']) {
|
|
1518
|
+
font-size: var(--lumo-font-size-s);
|
|
1519
|
+
--lumo-text-field-size: var(--lumo-size-s);
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
:host([theme~='small']) [part='label'] {
|
|
1523
|
+
font-size: var(--lumo-font-size-xs);
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
:host([theme~='small']) [part='error-message'] {
|
|
1527
|
+
font-size: var(--lumo-font-size-xxs);
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
/* Slotted content */
|
|
1531
|
+
[part='input-field'] ::slotted(:not(vaadin-icon):not(input):not(textarea)) {
|
|
1532
|
+
color: var(--lumo-secondary-text-color);
|
|
1533
|
+
font-weight: 400;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
[part='clear-button']::before {
|
|
1537
|
+
content: var(--lumo-icons-cross);
|
|
1538
|
+
}
|
|
1539
|
+
`];zt("",Yt,{moduleId:"lumo-input-field-shared-styles"});
|
|
1540
|
+
/**
|
|
1541
|
+
* @license
|
|
1542
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1543
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1544
|
+
*/
|
|
1545
|
+
const Kt=y`
|
|
1546
|
+
:host {
|
|
1547
|
+
top: var(--lumo-space-m);
|
|
1548
|
+
right: var(--lumo-space-m);
|
|
1549
|
+
bottom: var(--lumo-space-m);
|
|
1550
|
+
left: var(--lumo-space-m);
|
|
1551
|
+
/* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
|
|
1552
|
+
/* stylelint-disable-next-line */
|
|
1553
|
+
outline: 0px solid transparent;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
[part='overlay'] {
|
|
1557
|
+
background-color: var(--lumo-base-color);
|
|
1558
|
+
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
1559
|
+
border-radius: var(--lumo-border-radius-m);
|
|
1560
|
+
box-shadow:
|
|
1561
|
+
0 0 0 1px var(--lumo-shade-5pct),
|
|
1562
|
+
var(--lumo-box-shadow-m);
|
|
1563
|
+
color: var(--lumo-body-text-color);
|
|
1564
|
+
font-family: var(--lumo-font-family);
|
|
1565
|
+
font-size: var(--lumo-font-size-m);
|
|
1566
|
+
font-weight: 400;
|
|
1567
|
+
line-height: var(--lumo-line-height-m);
|
|
1568
|
+
letter-spacing: 0;
|
|
1569
|
+
text-transform: none;
|
|
1570
|
+
-webkit-text-size-adjust: 100%;
|
|
1571
|
+
-webkit-font-smoothing: antialiased;
|
|
1572
|
+
-moz-osx-font-smoothing: grayscale;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
[part='content'] {
|
|
1576
|
+
padding: var(--lumo-space-xs);
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
[part='backdrop'] {
|
|
1580
|
+
background-color: var(--lumo-shade-20pct);
|
|
1581
|
+
animation: 0.2s lumo-overlay-backdrop-enter both;
|
|
1582
|
+
will-change: opacity;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
@keyframes lumo-overlay-backdrop-enter {
|
|
1586
|
+
0% {
|
|
1587
|
+
opacity: 0;
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
:host([closing]) [part='backdrop'] {
|
|
1592
|
+
animation: 0.2s lumo-overlay-backdrop-exit both;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
@keyframes lumo-overlay-backdrop-exit {
|
|
1596
|
+
100% {
|
|
1597
|
+
opacity: 0;
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
@keyframes lumo-overlay-dummy-animation {
|
|
1602
|
+
0% {
|
|
1603
|
+
opacity: 1;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
100% {
|
|
1607
|
+
opacity: 1;
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
`;zt("",Kt,{moduleId:"lumo-overlay"});
|
|
1611
|
+
/**
|
|
1612
|
+
* @license
|
|
1613
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1614
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1615
|
+
*/
|
|
1616
|
+
const Zt=y`
|
|
1617
|
+
:host([opening]),
|
|
1618
|
+
:host([closing]) {
|
|
1619
|
+
animation: 0.14s lumo-overlay-dummy-animation;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
[part='overlay'] {
|
|
1623
|
+
will-change: opacity, transform;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
:host([opening]) [part='overlay'] {
|
|
1627
|
+
animation: 0.1s lumo-menu-overlay-enter ease-out both;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
@keyframes lumo-menu-overlay-enter {
|
|
1631
|
+
0% {
|
|
1632
|
+
opacity: 0;
|
|
1633
|
+
transform: translateY(-4px);
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
:host([closing]) [part='overlay'] {
|
|
1638
|
+
animation: 0.1s lumo-menu-overlay-exit both;
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
@keyframes lumo-menu-overlay-exit {
|
|
1642
|
+
100% {
|
|
1643
|
+
opacity: 0;
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
`;zt("",Zt,{moduleId:"lumo-menu-overlay-core"});const Xt=[Kt,Zt,y`
|
|
1647
|
+
/* Small viewport (bottom sheet) styles */
|
|
1648
|
+
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
1649
|
+
@media (max-width: 450px), (max-height: 450px) {
|
|
1650
|
+
:host {
|
|
1651
|
+
top: 0 !important;
|
|
1652
|
+
right: 0 !important;
|
|
1653
|
+
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
1654
|
+
left: 0 !important;
|
|
1655
|
+
align-items: stretch !important;
|
|
1656
|
+
justify-content: flex-end !important;
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
[part='overlay'] {
|
|
1660
|
+
max-height: 50vh;
|
|
1661
|
+
width: 100vw;
|
|
1662
|
+
border-radius: 0;
|
|
1663
|
+
box-shadow: var(--lumo-box-shadow-xl);
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
/* The content part scrolls instead of the overlay part, because of the gradient fade-out */
|
|
1667
|
+
[part='content'] {
|
|
1668
|
+
padding: 30px var(--lumo-space-m);
|
|
1669
|
+
max-height: inherit;
|
|
1670
|
+
box-sizing: border-box;
|
|
1671
|
+
-webkit-overflow-scrolling: touch;
|
|
1672
|
+
overflow: auto;
|
|
1673
|
+
-webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
1674
|
+
mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
[part='backdrop'] {
|
|
1678
|
+
display: block;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
/* Animations */
|
|
1682
|
+
|
|
1683
|
+
:host([opening]) [part='overlay'] {
|
|
1684
|
+
animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
:host([closing]),
|
|
1688
|
+
:host([closing]) [part='backdrop'] {
|
|
1689
|
+
animation-delay: 0.14s;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
:host([closing]) [part='overlay'] {
|
|
1693
|
+
animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
@keyframes lumo-mobile-menu-overlay-enter {
|
|
1698
|
+
0% {
|
|
1699
|
+
transform: translateY(150%);
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
@keyframes lumo-mobile-menu-overlay-exit {
|
|
1704
|
+
100% {
|
|
1705
|
+
transform: translateY(150%);
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
`];zt("",Xt,{moduleId:"lumo-menu-overlay"}),
|
|
1709
|
+
/**
|
|
1710
|
+
* @license
|
|
1711
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1712
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1713
|
+
*/
|
|
1714
|
+
zt("vaadin-select-item",Dt,{moduleId:"lumo-select-item"}),zt("vaadin-select-list-box",qt,{moduleId:"lumo-select-list-box"}),zt("vaadin-select",[Yt,y`
|
|
1715
|
+
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
1716
|
+
text-align: start;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
[part='input-field'] {
|
|
1720
|
+
cursor: var(--lumo-clickable-cursor);
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
[part='input-field'] ::slotted([slot='value']) {
|
|
1724
|
+
font-weight: var(--vaadin-input-field-value-font-weight, 500);
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
[part='input-field'] ::slotted([slot='value']:not([placeholder])) {
|
|
1728
|
+
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
:host([readonly]) [part='input-field'] ::slotted([slot='value']:not([placeholder])) {
|
|
1732
|
+
color: var(--lumo-secondary-text-color);
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
/* placeholder styles */
|
|
1736
|
+
[part='input-field'] ::slotted([slot='value'][placeholder]) {
|
|
1737
|
+
color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
:host(:is([readonly], [disabled])) ::slotted([slot='value'][placeholder]) {
|
|
1741
|
+
opacity: 0;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
[part='toggle-button']::before {
|
|
1745
|
+
content: var(--lumo-icons-dropdown);
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
/* Highlight the toggle button when hovering over the entire component */
|
|
1749
|
+
:host(:hover:not([readonly]):not([disabled])) [part='toggle-button'] {
|
|
1750
|
+
color: var(--lumo-contrast-80pct);
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
:host([theme~='small']) [part='input-field'] ::slotted([slot='value']) {
|
|
1754
|
+
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
1755
|
+
--_lumo-selected-item-padding: 0;
|
|
1756
|
+
}
|
|
1757
|
+
`],{moduleId:"lumo-select"}),zt("vaadin-select-value-button",y`
|
|
1758
|
+
:host {
|
|
1759
|
+
font-family: var(--lumo-font-family);
|
|
1760
|
+
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
1761
|
+
padding: 0 0.25em;
|
|
1762
|
+
--_lumo-selected-item-height: var(--lumo-size-m);
|
|
1763
|
+
--_lumo-selected-item-padding: 0.5em;
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
::slotted(*) {
|
|
1767
|
+
min-height: var(--_lumo-selected-item-height);
|
|
1768
|
+
padding-top: var(--_lumo-selected-item-padding);
|
|
1769
|
+
padding-bottom: var(--_lumo-selected-item-padding);
|
|
1770
|
+
font-size: inherit;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
::slotted(*:hover) {
|
|
1774
|
+
background-color: transparent;
|
|
1775
|
+
}
|
|
1776
|
+
`,{moduleId:"lumo-select-value-button"}),zt("vaadin-select-overlay",[Xt,y`
|
|
1777
|
+
:host {
|
|
1778
|
+
--_lumo-item-selected-icon-display: block;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
/* Small viewport adjustment */
|
|
1782
|
+
:host([phone]) {
|
|
1783
|
+
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
|
1784
|
+
top: 0 !important;
|
|
1785
|
+
right: 0 !important;
|
|
1786
|
+
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
1787
|
+
left: 0 !important;
|
|
1788
|
+
/* stylelint-enable declaration-block-no-redundant-longhand-properties */
|
|
1789
|
+
align-items: stretch;
|
|
1790
|
+
justify-content: flex-end;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
:host([no-vertical-overlap][top-aligned]) [part='overlay'] {
|
|
1794
|
+
margin-block-start: var(--lumo-space-xs);
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
:host([no-vertical-overlap][bottom-aligned]) [part='overlay'] {
|
|
1798
|
+
margin-block-end: var(--lumo-space-xs);
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
:host([theme~='align-left']) {
|
|
1802
|
+
text-align: left;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
:host([theme~='align-right']) {
|
|
1806
|
+
text-align: right;
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
:host([theme~='align-center']) {
|
|
1810
|
+
text-align: center;
|
|
1811
|
+
}
|
|
1812
|
+
`],{moduleId:"lumo-select-overlay"}),
|
|
1813
|
+
/**
|
|
1814
|
+
@license
|
|
1815
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1816
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1817
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1818
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1819
|
+
Code distributed by Google as part of the polymer project is also
|
|
1820
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1821
|
+
*/
|
|
1822
|
+
window.JSCompiler_renameProperty=function(t){return t};
|
|
1823
|
+
/**
|
|
1824
|
+
@license
|
|
1825
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1826
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1827
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1828
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1829
|
+
Code distributed by Google as part of the polymer project is also
|
|
1830
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1831
|
+
*/
|
|
1832
|
+
let Qt,te,ee=/(url\()([^)]*)(\))/g,ie=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function oe(t,e){if(t&&ie.test(t))return t;if("//"===t)return t;if(void 0===Qt){Qt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Qt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Qt)try{return new URL(t,e).href}catch(e){return t}return te||(te=document.implementation.createHTMLDocument("temp"),te.base=te.createElement("base"),te.head.appendChild(te.base),te.anchor=te.createElement("a"),te.body.appendChild(te.anchor)),te.base.href=e,te.anchor.href=t,te.anchor.href||t}function se(t,e){return t.replace(ee,(function(t,i,o,s){return i+"'"+oe(o.replace(/["']/g,""),e)+"'"+s}))}function re(t){return t.substring(0,t.lastIndexOf("/")+1)}
|
|
1833
|
+
/**
|
|
1834
|
+
@license
|
|
1835
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1836
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1837
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1838
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1839
|
+
Code distributed by Google as part of the polymer project is also
|
|
1840
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1841
|
+
*/const ne=(!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 ae=window.Polymer&&window.Polymer.rootPath||re(document.baseURI||window.location.href),le=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,ce=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,he=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,ue=window.Polymer&&window.Polymer.legacyOptimizations||!1,de=window.Polymer&&window.Polymer.legacyWarnings||!1,pe=window.Polymer&&window.Polymer.syncInitialRender||!1,me=window.Polymer&&window.Polymer.legacyUndefined||!1,fe=window.Polymer&&window.Polymer.orderedComputed||!1,ve=window.Polymer&&window.Polymer.removeNestedTemplates||!1,be=window.Polymer&&window.Polymer.fastDomIf||!1,ge=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,ye=0;const we=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=ye++;return function(o){let s=o.__mixinSet;if(s&&s[i])return o;let r=e,n=r.get(o);if(!n){n=t(o),r.set(o,n);let e=Object.create(n.__mixinSet||s||null);e[i]=!0,n.__mixinSet=e}return n}};
|
|
1842
|
+
/**
|
|
1843
|
+
@license
|
|
1844
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1845
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1846
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1847
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1848
|
+
Code distributed by Google as part of the polymer project is also
|
|
1849
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1850
|
+
*/let xe={},ke={};function _e(t,e){xe[t]=ke[t.toLowerCase()]=e}function Ae(t){return xe[t]||ke[t.toLowerCase()]}class Se extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=Ae(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,o){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=oe(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=re(e)}return this.__assetpath}register(t){if(t=t||this.id){if(ce&&void 0!==Ae(t))throw _e(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,_e(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}Se.prototype.modules=xe,customElements.define("dom-module",Se);
|
|
1851
|
+
/**
|
|
1852
|
+
@license
|
|
1853
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1854
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1855
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1856
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1857
|
+
Code distributed by Google as part of the polymer project is also
|
|
1858
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1859
|
+
*/
|
|
1860
|
+
const Ce="link[rel=import][type~=css]",Te="include",ze="shady-unscoped";function Ne(t){return Se.import(t)}function Ee(t){const e=se((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function Oe(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...Ie(e[t]));return i}function Ie(t){const e=Ne(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...Pe(e));const i=e.querySelector("template");i&&t.push(...Be(i,e.assetpath)),e._styles=t}return e._styles}function Be(t,e){if(!t._styles){const i=[],o=t.content.querySelectorAll("style");for(let t=0;t<o.length;t++){let s=o[t],r=s.getAttribute(Te);r&&i.push(...Oe(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(s.textContent=se(s.textContent,e)),i.push(s)}t._styles=i}return t._styles}function Pe(t){const e=[],i=t.querySelectorAll(Ce);for(let t=0;t<i.length;t++){let o=i[t];if(o.import){const t=o.import,i=o.hasAttribute(ze);if(i&&!t._unscopedStyle){const e=Ee(t);e.setAttribute(ze,""),t._unscopedStyle=e}else t._style||(t._style=Ee(t));e.push(i?t._unscopedStyle:t._style)}}return e}
|
|
1861
|
+
/**
|
|
1862
|
+
@license
|
|
1863
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1864
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1865
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1866
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1867
|
+
Code distributed by Google as part of the polymer project is also
|
|
1868
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1869
|
+
*/const Me=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
|
|
1870
|
+
/**
|
|
1871
|
+
@license
|
|
1872
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1873
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1874
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1875
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1876
|
+
Code distributed by Google as part of the polymer project is also
|
|
1877
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1878
|
+
*/function De(t){return t.indexOf(".")>=0}function je(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Fe(t,e){return 0===e.indexOf(t+".")}function Re(t,e,i){return e+i.slice(t.length)}function Le(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let o=t[i].toString().split(".");for(let t=0;t<o.length;t++)e.push(o[t])}return e.join(".")}return t}function He(t){return Array.isArray(t)?Le(t).split("."):t.toString().split(".")}function Ge(t,e,i){let o=t,s=He(e);for(let t=0;t<s.length;t++){if(!o)return;o=o[s[t]]}return i&&(i.path=s.join(".")),o}function We(t,e,i){let o=t,s=He(e),r=s[s.length-1];if(s.length>1){for(let t=0;t<s.length-1;t++)if(o=o[s[t]],!o)return;o[r]=i}else o[e]=i;return s.join(".")}
|
|
1879
|
+
/**
|
|
1880
|
+
@license
|
|
1881
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1882
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1883
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1884
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1885
|
+
Code distributed by Google as part of the polymer project is also
|
|
1886
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1887
|
+
*/const Ue={},qe=/-[a-z]/g,$e=/([A-Z])/g;function Ve(t){return Ue[t]||(Ue[t]=t.indexOf("-")<0?t:t.replace(qe,(t=>t[1].toUpperCase())))}function Je(t){return Ue[t]||(Ue[t]=t.replace($e,"-$1").toLowerCase())}
|
|
1888
|
+
/**
|
|
1889
|
+
@license
|
|
1890
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1891
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1892
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1893
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1894
|
+
Code distributed by Google as part of the polymer project is also
|
|
1895
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1896
|
+
*/let Ye=0,Ke=0,Ze=[],Xe=0,Qe=!1,ti=document.createTextNode("");new window.MutationObserver((function(){Qe=!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),Ke+=t})).observe(ti,{characterData:!0});const ei={run:t=>(Qe||(Qe=!0,ti.textContent=Xe++),Ze.push(t),Ye++),cancel(t){const e=t-Ke;if(e>=0){if(!Ze[e])throw new Error("invalid async handle: "+t);Ze[e]=null}}},ii=we((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let o=this.__data[t],s=this._shouldPropertyChange(t,e,o);return s&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=o),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,ei.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,o){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,o)}_attributeToProperty(t,e,i){if(!this.__serializing){const o=this.__dataAttributes,s=o&&o[t]||t;this[s]=this._deserializeValue(e,i||this.constructor.typeForProperty(s))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const o=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=Me(t)),void 0===o?t.removeAttribute(i):t.setAttribute(i,""===o&&window.trustedTypes?window.trustedTypes.emptyScript:o)}_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}}})),oi={};
|
|
1897
|
+
/**
|
|
1898
|
+
@license
|
|
1899
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1900
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1901
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1902
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1903
|
+
Code distributed by Google as part of the polymer project is also
|
|
1904
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1905
|
+
*/let si=HTMLElement.prototype;for(;si;){let t=Object.getOwnPropertyNames(si);for(let e=0;e<t.length;e++)oi[t[e]]=!0;si=Object.getPrototypeOf(si)}const ri=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,ni=we((t=>{const e=ii(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Ve(t[e]))}static attributeNameForProperty(t){return Je(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(ri(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!oi[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),ai={"dom-if":!0,"dom-repeat":!0};let li=!1,ci=!1;const hi=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,o)=>{const s=i.getAttribute(o);t&&o.startsWith("on-")?e.setAttribute(o,t.createScript(s,o)):e.setAttribute(o,s)}})();function ui(t){let e=t.getAttribute("is");if(e&&ai[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];hi(t,i,e),i.removeAttribute(e)}}return t}function di(t,e){let i=e.parentInfo&&di(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,o=0;t;t=t.nextSibling)if(e.parentIndex===o++)return t}function pi(t,e,i,o){o.id&&(e[o.id]=i)}function mi(t,e,i){if(i.events&&i.events.length)for(let o,s=0,r=i.events;s<r.length&&(o=r[s]);s++)t._addMethodEventListenerToNode(e,o.name,o.value,t)}function fi(t,e,i,o){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=o)}const vi=we((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let o=!1,s=t;return"template"!=s.localName||s.hasAttribute("preserve-content")?"slot"===s.localName&&(e.hasInsertionPoint=!0):o=this._parseTemplateNestedTemplate(s,e,i)||o,function(t){(function(){if(!li){li=!0;const t=document.createElement("textarea");t.placeholder="a",ci=t.placeholder===t.textContent}return ci})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(s),s.firstChild&&this._parseTemplateChildNodes(s,e,i),s.hasAttributes&&s.hasAttributes()&&(o=this._parseTemplateNodeAttributes(s,e,i)||o),o||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let o,s=t.firstChild,r=0;s;s=o){if("template"==s.localName&&(s=ui(s)),o=s.nextSibling,s.nodeType===Node.TEXT_NODE){let i=o;for(;i&&i.nodeType===Node.TEXT_NODE;)s.textContent+=i.textContent,o=i.nextSibling,t.removeChild(i),i=o;if(e.stripWhiteSpace&&!s.textContent.trim()){t.removeChild(s);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(s,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),s.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let o=t,s=this._parseTemplate(o,e);return(s.content=o.content.ownerDocument.createDocumentFragment()).appendChild(o.content),i.templateInfo=s,!0}static _parseTemplateNodeAttributes(t,e,i){let o=!1,s=Array.from(t.attributes);for(let r,n=s.length-1;r=s[n];n--)o=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||o;return o}static _parseTemplateNodeAttribute(t,e,i,o,s){return"on-"===o.slice(0,3)?(t.removeAttribute(o),i.events=i.events||[],i.events.push({name:o.slice(3),value:s}),!0):"id"===o&&(i.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 i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,o=document.importNode(e.content||t.content,!0);o.__noInsertionPoint=!e.hasInsertionPoint;let s=o.nodeList=new Array(i.length);o.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=s[r]=di(o,t);pi(0,o.$,i,t),fi(0,i,t,e),mi(this,i,t)}return o}_addMethodEventListenerToNode(t,e,i,o){let s=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(o=o||t,0,i);return this._addEventListenerToNode(t,e,s),s}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
|
|
1906
|
+
/**
|
|
1907
|
+
* @fileoverview
|
|
1908
|
+
* @suppress {checkPrototypalTypes}
|
|
1909
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1910
|
+
* This code may only be used under the BSD style license found at
|
|
1911
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
1912
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
1913
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
1914
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
1915
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1916
|
+
*/let bi=0;const gi=[],yi={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},wi="__computeInfo",xi=/[A-Z]/;function ki(t,e,i){let o=t[e];if(o){if(!t.hasOwnProperty(e)&&(o=t[e]=Object.create(t[e]),i))for(let t in o){let e=o[t],i=o[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else o=t[e]={};return o}function _i(t,e,i,o,s,r){if(e){let n=!1;const a=bi++;for(let l in i){let c=e[s?je(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&&!Si(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,o,e.info,s,r),n=!0)}return n}return!1}function Ai(t,e,i,o,s,r,n,a){let l=!1,c=e[n?je(o):o];if(c)for(let e,h=0,u=c.length;h<u&&(e=c[h]);h++)e.info&&e.info.lastRun===i||n&&!Si(o,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,o,s,r,e.info,n,a),l=!0);return l}function Si(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!function(t,e){return 0===t.indexOf(e+".")}(i,t))||!(!e.wildcard||!Fe(i,t))}return!0}function Ci(t,e,i,o,s){let r="string"==typeof s.method?t[s.method]:s.method,n=s.property;r?r.call(t,t.__data[n],o[n]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function Ti(t,e,i){let o=je(e);return o!==e&&(zi(t,Je(o)+"-changed",i[e],e),!0)}function zi(t,e,i,o){let s={value:i,queueProperty:!0};o&&(s.path=o),Me(t).dispatchEvent(new CustomEvent(e,{detail:s}))}function Ni(t,e,i,o,s,r){let n=(r?je(e):e)!=e?e:null,a=n?Ge(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),zi(t,s.eventName,a,n)}function Ei(t,e,i,o,s){let r=t.__data[e];le&&(r=le(r,s.attrName,"attribute",t)),t._propertyToAttribute(e,s.attrName,r)}const Oi=(t,e,i)=>{let o=0,s=e.length-1,r=-1;for(;o<=s;){const n=o+s>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)o=n+1;else{if(!(a>0)){r=n;break}s=n-1}}r<0&&(r=s+1),e.splice(r,0,t)},Ii=(t,e,i,o,s)=>{const r=e[s?je(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===bi||s&&!Si(t,n.trigger)||(n.info.lastRun=bi,Oi(n.info,i,o))}};function Bi(t,e,i,o,s){let r=Li(t,e,i,0,s);if(r===gi)return!1;let n=s.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function Pi(t,e,i,o,s,r,n){i.bindings=i.bindings||[];let a={kind:o,target:s,parts:r,literal:n,isCompound:1!==r.length};if(i.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||Je(s)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let o=a.parts[i];o.compoundIndex=i,Mi(t,e,a,o,l)}}function Mi(t,e,i,o,s){if(!o.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=o.dependencies,n={index:s,binding:i,part:o,evaluator:t};for(let i=0;i<r.length;i++){let o=r[i];"string"==typeof o&&(o=Vi(o),o.wildcard=!0),t._addTemplatePropertyEffect(e,o.rootProperty,{fn:Di,info:n,trigger:o})}}}function Di(t,e,i,o,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 o=i[e];e=Re(c.source,l.target,e),a._setPendingPropertyOrPath(e,o,!1,!0)&&t._enqueueClient(a)}else{let n=s.evaluator._evaluateBinding(t,c,e,i,o,r);n!==gi&&function(t,e,i,o,s){if(s=function(t,e,i,o){if(i.isCompound){let s=t.__dataCompoundStorage[i.target];s[o.compoundIndex]=e,e=s.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,s,i,o),le&&(s=le(s,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,s,i.target);else{let o=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[o]?e[yi.READ_ONLY]&&e[yi.READ_ONLY][o]||e._setPendingProperty(o,s)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,o,s)}}(t,a,l,c,n)}}function ji(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),o=e.parts,s=new Array(o.length);for(let t=0;t<o.length;t++)s[t]=o[t].literal;let r=e.target;i[r]=s,e.literal&&"property"==e.kind&&("className"===r&&(t=Me(t)),t[r]=e.literal)}}function Fi(t,e,i){if(i.listenerEvent){let o=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,o,s){let r,n=t.detail,a=n&&n.path;a?(o=Re(i,o,a),r=n&&n.value):r=t.currentTarget[i],r=s?!r:r,e[yi.READ_ONLY]&&e[yi.READ_ONLY][o]||!e._setPendingPropertyOrPath(o,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,o.source,o.negate)}))}}function Ri(t,e,i,o,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,i,{fn:o,info:n,trigger:s});return r&&t._addPropertyEffect(e.methodName,i,{fn:o,info:n}),n}function Li(t,e,i,o,s){let r=t._methodHost||t,n=r[s.methodName];if(n){let o=t._marshalArgs(s.args,e,i);return o===gi?gi:n.apply(r,o)}s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const Hi=[],Gi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Wi="(?:("+Gi+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Ui=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Gi+"\\s*(?:\\(\\s*(?:(?:"+Wi+"(?:,\\s*"+Wi+")*)?)\\)\\s*)?)(?:]]|}})","g");function qi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function $i(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Hi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Vi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Vi(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},o=e[0];switch("-"===o&&(o=e[1]),o>="0"&&o<="9"&&(o="#"),o){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=je(e),i.structured=De(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Ji(t,e,i){let o=Ge(t,i);return void 0===o&&(o=e[i]),o}function Yi(t,e,i,o){const s={indexSplices:o};me&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(i+".splices",s),t.notifyPath(i+".length",e.length),me&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function Ki(t,e,i,o,s,r){Yi(t,e,i,[{index:o,addedCount:s,removed:r,object:e,type:"splice"}])}const Zi=we((t=>{const e=vi(ni(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return yi}_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(Xi.length){let t=Xi[Xi.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[yi.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==yi.READ_ONLY);let o=ki(this,e,!0)[t];o||(o=this[e][t]=[]),o.push(i)}_removePropertyEffect(t,e,i){let o=ki(this,e,!0)[t],s=o.indexOf(i);s>=0&&o.splice(s,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,yi.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,yi.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,yi.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,yi.COMPUTE)}_setPendingPropertyOrPath(t,e,i,o){if(o||je(Array.isArray(t)?t[0]:t)!==t){if(!o){let i=Ge(this,t);if(!(t=We(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let o=t.__dataLinkedPaths;if(o){let s;for(let r in o){let n=o[r];Fe(r,e)?(s=Re(r,n,e),t._setPendingPropertyOrPath(s,i,!0,!0)):Fe(n,e)&&(s=Re(n,r,e),t._setPendingPropertyOrPath(s,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=Me(t)),t[e]=i)}_setPendingProperty(t,e,i){let o=this.__dataHasPaths&&De(t);return!!this._shouldPropertyChange(t,e,(o?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),o?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(o||this[yi.NOTIFY]&&this[yi.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[yi.READ_ONLY]&&this[yi.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let o,s=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,o){let s=t[yi.COMPUTE];if(s)if(fe){bi++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[yi.COMPUTE];let o,{counts:s,ready:r,total:n}=function(t){const e=t[wi],i={},o=t[yi.COMPUTE],s=[];let r=0;for(let t in e){const o=e[t];r+=i[t]=o.args.filter((t=>!t.literal)).length+(o.dynamicFn?1:0)}for(let t in o)e[t]||s.push(t);return{counts:i,ready:s,total:r}}(t);for(;o=r.shift();){e.set(o,e.size);const t=i[o];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)Ii(t,s,n,r,o);let a;for(;a=n.shift();)Bi(t,"",e,0,a)&&Ii(a.methodInfo,s,n,r,o);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;_i(t,s,r,i,o);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,s),o=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,s),this._flushClients(),_i(this,this[yi.REFLECT],e,i,s),_i(this,this[yi.OBSERVE],e,i,s),o&&function(t,e,i,o,s){let r,n,a=t[yi.NOTIFY],l=bi++;for(let n in e)e[n]&&(a&&Ai(t,a,l,n,i,o,s)||s&&Ti(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,o,e,i,s),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[yi.PROPAGATE]&&_i(this,this[yi.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,o){const s=(e,o)=>{_i(this,t.propertyEffects,e,i,o,t.nodeList);for(let s=t.firstChild;s;s=s.nextSibling)this._runEffectsForTemplate(s,e,i,o)};t.runEffects?t.runEffects(s,e,o):s(e,o)}linkPaths(t,e){t=Le(t),e=Le(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Le(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Yi(this,Ge(this,t,i),i.path,e)}get(t,e){return Ge(e||this,t)}set(t,e,i){i?We(i,t,e):this[yi.READ_ONLY]&&this[yi.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},o=Ge(this,t,i),s=o.length,r=o.push(...e);return e.length&&Ki(this,o,i.path,s,e.length,[]),r}pop(t){let e={path:""},i=Ge(this,t,e),o=Boolean(i.length),s=i.pop();return o&&Ki(this,i,e.path,i.length,0,[s]),s}splice(t,e,i,...o){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,i,...o),(o.length||s.length)&&Ki(this,n,r.path,e,o.length,s),s}shift(t){let e={path:""},i=Ge(this,t,e),o=Boolean(i.length),s=i.shift();return o&&Ki(this,i,e.path,0,0,[s]),s}unshift(t,...e){let i={path:""},o=Ge(this,t,i),s=o.unshift(...e);return e.length&&Ki(this,o,i.path,0,e.length,[]),s}notifyPath(t,e){let i;if(1==arguments.length){let o={path:""};e=Ge(this,t,o),i=o.path}else i=Array.isArray(t)?Le(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,yi.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let o={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,yi.OBSERVE,{fn:Ci,info:o,trigger:{name:t}}),i&&this._addPropertyEffect(e,yi.OBSERVE,{fn:Ci,info:o,trigger:{name:e}})}_createMethodObserver(t,e){let i=$i(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Ri(this,i,yi.OBSERVE,Li,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,yi.NOTIFY,{fn:Ni,info:{eventName:Je(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,yi.REFLECT,{fn:Ei,info:{attrName:e}})}_createComputedProperty(t,e,i){let o=$i(e);if(!o)throw new Error("Malformed computed expression '"+e+"'");const s=Ri(this,o,yi.COMPUTE,Bi,t,i);ki(this,wi)[t]=s}_marshalArgs(t,e,i){const o=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=Fe(n,e),s=Ji(o,i,t?e:n);c={path:t?e:n,value:s,base:t?Ge(o,n):s}}else c=a?Ji(o,i,n):o[n];if(me&&!this._overrideLegacyUndefined&&void 0===c&&t.length>1)return gi;s[r]=c}return s}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),o=this.__preBoundTemplateInfo==i;if(!o)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=o,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,o=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=o,o?o.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let o=t.propertyEffects=t.propertyEffects||{};(o[e]=o[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Xi.push(this);let i=super._stampTemplate(t,e);if(Xi.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:o}=e;if(o.length)for(let e=0;e<o.length;e++){let s=i[e],r=o[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];ji(s,i),Fi(s,t,i)}s.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:o,parent:s}=e;i?i.nextSibling=o:s&&(s.firstChild=o),o?o.previousSibling=i:s&&(s.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];Me(Me(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,o){let s=e._parseTemplateNode.call(this,t,i,o);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=qi(e)||" ",Pi(this,i,o,"text","textContent",e),s=!0)}return s}static _parseTemplateNodeAttribute(t,i,o,s,r){let n=this._parseBindings(r,i);if(n){let e=s,r="property";xi.test(s)?r="attribute":"$"==s[s.length-1]&&(s=s.slice(0,-1),r="attribute");let a=qi(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=Ve(s)),Pi(this,i,o,r,s,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,o,s,r)}static _parseTemplateNestedTemplate(t,i,o){let s=e._parseTemplateNestedTemplate.call(this,t,i,o);const r=t.parentNode,n=o.templateInfo,a="dom-if"===r.localName;ve&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(o=o.parentInfo).templateInfo=n,o.noted=!0,s=!1);let l=n.hostProps;if(be&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ve||(o.parentInfo.noted=!0));else{let t="{";for(let e in l)Pi(this,i,o,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return s}static _parseBindings(t,e){let i,o=[],s=0;for(;null!==(i=Ui.exec(t));){i.index>s&&o.push({literal:t.slice(s,i.index)});let r=i[1][0],n=Boolean(i[2]),a=i[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=$i(a),d=[];if(u){let{args:t,methodName:i}=u;for(let e=0;e<t.length;e++){let i=t[e];i.literal||d.push(i)}let o=e.dynamicFns;(o&&o[i]||u.static)&&(d.push(i),u.dynamicFn=!0)}else d.push(a);o.push({source:a,mode:r,negate:n,customEvent:l,signature:u,dependencies:d,event:c}),s=Ui.lastIndex}if(s&&s<t.length){let e=t.substring(s);e&&o.push({literal:e})}return o.length?o:null}static _evaluateBinding(t,e,i,o,s,r){let n;return n=e.signature?Li(t,i,o,0,e.signature):i!=e.source?Ge(t,e.source):r&&De(i)?Ge(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Xi=[],Qi=we((t=>{const e=ii(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof s?e:null}function o(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
1917
|
+
/**
|
|
1918
|
+
@license
|
|
1919
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1920
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1921
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1922
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1923
|
+
Code distributed by Google as part of the polymer project is also
|
|
1924
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1925
|
+
*/
|
|
1926
|
+
function(t){const e={};for(let i in t){const o=t[i];e[i]="function"==typeof o?{type:o}:o}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class 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=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=o(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,o(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s})),to=window.ShadyCSS&&window.ShadyCSS.cssBuild,eo=we((t=>{const e=Qi(Zi(t));function i(t,e,i,o){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,o)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,o[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):ue||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let o=0;o<t.length;o++)i._createMethodObserver(t[o],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!ce||he)&&(e=Se.import(t,"template"),ce&&!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=re(t.url);else{const t=Se.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=ae,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let o=e[i];"value"in o&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=o)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return se(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,o){if(!to){const s=e.content.querySelectorAll("style"),r=Be(e),n=function(t){let e=Ne(t);return e?Pe(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let s=n[i];s.textContent=t._processStyleText(s.textContent,o),e.content.insertBefore(s,a)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],n=s[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,o)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),ge&&to&&ne){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?oe(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=Me(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])),pe&&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=oe(this.importPath)),oe(t,e)}static _parseTemplateContent(t,i,o){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,o)}static _addTemplatePropertyEffect(t,i,o){return!de||i in this._properties||o.info.part.signature&&o.info.part.signature.static||o.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,o)}}})),io=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class oo{constructor(t,e){no(t,e);const i=e.reduce(((e,i,o)=>e+so(i)+t[o+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function so(t){if(t instanceof oo)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const ro=function(t,...e){no(t,e);const i=document.createElement("template");let o=e.reduce(((e,i,o)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof oo)return so(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[o+1]),t[0]);return io&&(o=io.createHTML(o)),i.innerHTML=o,i},no=(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")},ao=eo(HTMLElement),lo=[];function co(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function ho(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=ho();lo.forEach((e=>{co(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const uo=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(),co(this,ho(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const o=ho(),s=i===o&&-1===lo.indexOf(this),r=!i&&e&&-1===lo.indexOf(this),n=i!==o&&e===o;s||r?(this.__subscribe(),co(this,o,i)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=lo.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(){lo.includes(this)||lo.push(this)}__unsubscribe(){lo.includes(this)&&lo.splice(lo.indexOf(this),1)}}
|
|
1927
|
+
/**
|
|
1928
|
+
* @license
|
|
1929
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1930
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1931
|
+
*/,po=t=>class extends t{static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}
|
|
1932
|
+
/**
|
|
1933
|
+
* @license
|
|
1934
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1935
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1936
|
+
*/;
|
|
1937
|
+
/**
|
|
1938
|
+
* @license
|
|
1939
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1940
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1941
|
+
*/
|
|
1942
|
+
zt("vaadin-input-container",y`
|
|
1943
|
+
:host {
|
|
1944
|
+
display: flex;
|
|
1945
|
+
align-items: center;
|
|
1946
|
+
flex: 0 1 auto;
|
|
1947
|
+
border-radius:
|
|
1948
|
+
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius */
|
|
1949
|
+
var(--vaadin-input-field-top-start-radius, var(--__border-radius))
|
|
1950
|
+
var(--vaadin-input-field-top-end-radius, var(--__border-radius))
|
|
1951
|
+
var(--vaadin-input-field-bottom-end-radius, var(--__border-radius))
|
|
1952
|
+
var(--vaadin-input-field-bottom-start-radius, var(--__border-radius));
|
|
1953
|
+
--_border-radius: var(--vaadin-input-field-border-radius, 0);
|
|
1954
|
+
--_input-border-width: var(--vaadin-input-field-border-width, 0);
|
|
1955
|
+
--_input-border-color: var(--vaadin-input-field-border-color, transparent);
|
|
1956
|
+
box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
:host([dir='rtl']) {
|
|
1960
|
+
border-radius:
|
|
1961
|
+
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
1962
|
+
var(--vaadin-input-field-top-end-radius, var(--_border-radius))
|
|
1963
|
+
var(--vaadin-input-field-top-start-radius, var(--_border-radius))
|
|
1964
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_border-radius))
|
|
1965
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_border-radius));
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
:host([hidden]) {
|
|
1969
|
+
display: none !important;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
/* Reset the native input styles */
|
|
1973
|
+
::slotted(input) {
|
|
1974
|
+
-webkit-appearance: none;
|
|
1975
|
+
-moz-appearance: none;
|
|
1976
|
+
flex: auto;
|
|
1977
|
+
white-space: nowrap;
|
|
1978
|
+
overflow: hidden;
|
|
1979
|
+
width: 100%;
|
|
1980
|
+
height: 100%;
|
|
1981
|
+
outline: none;
|
|
1982
|
+
margin: 0;
|
|
1983
|
+
padding: 0;
|
|
1984
|
+
border: 0;
|
|
1985
|
+
border-radius: 0;
|
|
1986
|
+
min-width: 0;
|
|
1987
|
+
font: inherit;
|
|
1988
|
+
line-height: normal;
|
|
1989
|
+
color: inherit;
|
|
1990
|
+
background-color: transparent;
|
|
1991
|
+
/* Disable default invalid style in Firefox */
|
|
1992
|
+
box-shadow: none;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
::slotted(*) {
|
|
1996
|
+
flex: none;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
::slotted(:is(input, textarea))::placeholder {
|
|
2000
|
+
/* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
|
|
2001
|
+
/* because ::slotted(...)::placeholder does not work in Safari. */
|
|
2002
|
+
font: inherit;
|
|
2003
|
+
color: inherit;
|
|
2004
|
+
/* Override default opacity in Firefox */
|
|
2005
|
+
opacity: 1;
|
|
2006
|
+
}
|
|
2007
|
+
`,{moduleId:"vaadin-input-container-styles"});class mo extends(po(Bt(uo(ao)))){static get is(){return"vaadin-input-container"}static get template(){return ro`
|
|
2008
|
+
<slot name="prefix"></slot>
|
|
2009
|
+
<slot></slot>
|
|
2010
|
+
<slot name="suffix"></slot>
|
|
2011
|
+
`}}d(mo);
|
|
2012
|
+
/**
|
|
2013
|
+
* @license
|
|
2014
|
+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2015
|
+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2016
|
+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2017
|
+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2018
|
+
* Code distributed by Google as part of the polymer project is also
|
|
2019
|
+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2020
|
+
*/
|
|
2021
|
+
let fo=0,vo=0;const bo=[];let go=!1;const yo={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)}},wo={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},xo={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},ko={run(t){go||(go=!0,queueMicrotask((()=>function(){go=!1;const t=bo.length;for(let e=0;e<t;e++){const t=bo[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}bo.splice(0,t),vo+=t}()))),bo.push(t);const e=fo;return fo+=1,e},cancel(t){const e=t-vo;if(e>=0){if(!bo[e])throw new Error(`invalid async handle: ${t}`);bo[e]=null}}},_o=!1,Ao=t=>t,So="string"==typeof document.head.style.touchAction,Co="__polymerGestures",To="__polymerGesturesHandled",zo="__polymerGesturesTouchAction",No=["mousedown","mousemove","mouseup","click"],Eo=[0,1,4,2],Oo=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Io(t){return No.indexOf(t)>-1}let Bo=!1;function Po(t){if(!Io(t)&&"touchend"!==t)return So&&Bo&&_o?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){Bo=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const Mo=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Do={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function jo(t){const e=t.type;if(!Io(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Oo&&(e=Eo[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const Fo={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Ro(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Lo(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Ho=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Go={},Wo=[];function Uo(t){const e=Ho(t);return e.length>0?e[0]:t.target}function qo(t){const e=t.type,i=t.currentTarget[Co];if(!i)return;const o=i[e];if(!o)return;if(!t[To]&&(t[To]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Fo.touch.id=i.identifier),Fo.touch.id!==i.identifier)return;So||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Fo.touch.x=e.clientX,Fo.touch.y=e.clientY,Fo.touch.scrollDecided=!1;else if("touchmove"===i){if(Fo.touch.scrollDecided)return;Fo.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Ho(t);for(let t,o=0;o<i.length;o++)if(t=i[o],t[zo]){e=t[zo];break}return e}(t);let o=!1;const s=Math.abs(Fo.touch.x-e.clientX),r=Math.abs(Fo.touch.y-e.clientY);t.cancelable&&("none"===i?o=!0:"pan-x"===i?o=r>s:"pan-y"===i&&(o=s>r)),o?t.preventDefault():Yo("track")}}(t)}const s=t[To];if(!s.skip){for(let e,i=0;i<Wo.length;i++)e=Wo[i],o[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<Wo.length;r++)i=Wo[r],o[i.name]&&!s[i.name]&&(s[i.name]=!0,i[e](t))}}function $o(t,e,i){return!!Go[e]&&(function(t,e,i){const o=Go[e],s=o.deps,r=o.name;let n=t[Co];n||(t[Co]=n={});for(let e,i,o=0;o<s.length;o++)e=s[o],Mo&&Io(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,qo,Po(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),o.touchAction&&function(t,e){So&&t instanceof HTMLElement&&ko.run((()=>{t.style.touchAction=e})),t[zo]=e}(t,o.touchAction)}(t,e,i),!0)}function Vo(t){Wo.push(t),t.emits.forEach((e=>{Go[e]=t}))}function Jo(t,e,i){const o=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=i,Ao(t).dispatchEvent(o),o.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Yo(t){const e=function(t){for(let e,i=0;i<Wo.length;i++){e=Wo[i];for(let i,o=0;o<e.emits.length;o++)if(i=e.emits[o],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Ko(t,e,i,o){e&&Jo(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:o,prevent:t=>Yo(t)})}function Zo(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const o=Math.abs(t.x-e),s=Math.abs(t.y-i);return o>=5||s>=5}function Xo(t,e,i){if(!e)return;const o=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1];let r,n=0;o&&(r=s.x-o.x,n=s.y-o.y),Jo(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:s.x-t.x,dy:s.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),o=i;for(;o&&o.shadowRoot&&!window.ShadyDOM;){const s=o;if(o=o.shadowRoot.elementFromPoint(t,e),s===o)break;o&&(i=o)}return i}(i.clientX,i.clientY)})}function Qo(t,e,i){const o=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),r=Uo(i||e);!r||Do[r.localName]&&r.hasAttribute("disabled")||(isNaN(o)||isNaN(s)||o<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Uo(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),o=t.pageX,s=t.pageY;return!(o>=i.left&&o<=i.right&&s>=i.top&&s<=i.bottom)}return!1}(e))&&(t.prevent||Jo(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
2022
|
+
/**
|
|
2023
|
+
* @license
|
|
2024
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2025
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2026
|
+
*/Vo({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Lo(this.info)},mousedown(t){if(!jo(t))return;const e=Uo(t),i=this;Ro(this.info,(t=>{jo(t)||(Ko("up",e,t),Lo(i.info))}),(t=>{jo(t)&&Ko("up",e,t),Lo(i.info)})),Ko("down",e,t)},touchstart(t){Ko("down",Uo(t),t.changedTouches[0],t)},touchend(t){Ko("up",Uo(t),t.changedTouches[0],t)}}),Vo({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,Lo(this.info)},mousedown(t){if(!jo(t))return;const e=Uo(t),i=this,o=t=>{const o=t.clientX,s=t.clientY;Zo(i.info,o,s)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&Yo("tap"),i.info.addMove({x:o,y:s}),jo(t)||(i.info.state="end",Lo(i.info)),e&&Xo(i.info,e,t),i.info.started=!0)};Ro(this.info,o,(t=>{i.info.started&&o(t),Lo(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=Uo(t),i=t.changedTouches[0],o=i.clientX,s=i.clientY;Zo(this.info,o,s)&&("start"===this.info.state&&Yo("tap"),this.info.addMove({x:o,y:s}),Xo(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Uo(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Xo(this.info,e,i))}}),Vo({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){jo(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){jo(t)&&Qo(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Qo(this.info,t.changedTouches[0],t)}});const ts=we((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),es=we((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){}})),is=t=>class extends(ts(es(t))){get _activeKeys(){return[" "]}ready(){super.ready(),$o(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),$o(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)}}
|
|
2027
|
+
/**
|
|
2028
|
+
* @license
|
|
2029
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2030
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2031
|
+
*/;
|
|
2032
|
+
/**
|
|
2033
|
+
* @license
|
|
2034
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2035
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2036
|
+
*/let os=!1;function ss(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function rs(){return os}function ns(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}function as(t,e){const i=Math.max(t.tabIndex,0),o=Math.max(e.tabIndex,0);return 0===i||0===o?o>i:i>o}function ls(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)as(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(ls(t.slice(0,i)),ls(t.slice(i)))}function cs(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||ns(t)}function hs(t){return t.getRootNode().activeElement===t}function us(t,e){if(t.nodeType!==Node.ELEMENT_NODE||ns(t))return!1;const i=t,o=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)}(i);let s=o>0;o>=0&&e.push(i);let r=[];return r="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...r].forEach((t=>{s=us(t,e)||s})),s}window.addEventListener("keydown",(()=>{os=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{os=!1}),{capture:!0});
|
|
2037
|
+
/**
|
|
2038
|
+
* @license
|
|
2039
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2040
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2041
|
+
*/
|
|
2042
|
+
const ds=we((t=>class extends t{get _keyboardActive(){return rs()}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}})),ps=t=>class extends(is(ds(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())}}
|
|
2043
|
+
/**
|
|
2044
|
+
* @license
|
|
2045
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2046
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2047
|
+
*/;
|
|
2048
|
+
/**
|
|
2049
|
+
* @license
|
|
2050
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2051
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2052
|
+
*/class ms extends(ps(Bt(uo(ao)))){static get is(){return"vaadin-select-item"}static get template(){return ro`
|
|
2053
|
+
<style>
|
|
2054
|
+
:host {
|
|
2055
|
+
display: inline-block;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
:host([hidden]) {
|
|
2059
|
+
display: none !important;
|
|
2060
|
+
}
|
|
2061
|
+
</style>
|
|
2062
|
+
<span part="checkmark" aria-hidden="true"></span>
|
|
2063
|
+
<div part="content">
|
|
2064
|
+
<slot></slot>
|
|
2065
|
+
</div>
|
|
2066
|
+
`}ready(){super.ready(),this.setAttribute("role","option")}}d(ms);
|
|
2067
|
+
/**
|
|
2068
|
+
@license
|
|
2069
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2070
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2071
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2072
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2073
|
+
Code distributed by Google as part of the polymer project is also
|
|
2074
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2075
|
+
*/
|
|
2076
|
+
const fs=new Set;class vs{static debounce(t,e,i){return t instanceof vs?t._cancelAsync():t=new vs,t.setConfig(e,i),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,fs.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),fs.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 bs(t){const e=[];let i;return"slot"===t.localName?i=t.assignedElements():(e.push(t),i=[...t.children]),i.forEach((t=>e.push(...bs(t)))),e}function gs(t){return t?new Set(t.split(" ")):new Set}function ys(t){return t?[...t].join(" "):""}function ws(t,e,i){const o=gs(t.getAttribute(e));o.add(i),t.setAttribute(e,ys(o))}
|
|
2077
|
+
/**
|
|
2078
|
+
* @license
|
|
2079
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2080
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2081
|
+
*/
|
|
2082
|
+
class xs{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],o=[];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?i.push(e):r!==s&&o.push(e)})),(e.length||i.length||o.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:o,removedNodes:i}),this._storedNodes=t}}
|
|
2083
|
+
/**
|
|
2084
|
+
* @license
|
|
2085
|
+
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2086
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2087
|
+
*/const ks=t=>class extends(es(t)){get focused(){return(this._getItems()||[]).find(hs)}get _vertical(){return!0}focus(){const t=this._getItems();if(Array.isArray(t)){const e=this._getAvailableIndex(t,0,null,(t=>!cs(t)));e>=0&&this._focus(e)}}_getItems(){return Array.from(this.children)}_onKeyDown(t){if(super._onKeyDown(t),t.metaKey||t.ctrlKey)return;const{key:e}=t,i=this._getItems()||[],o=i.indexOf(this.focused);let s,r;const n=this._vertical||"rtl"!==this.getAttribute("dir")?1:-1;this.__isPrevKey(e)?(r=-n,s=o-n):this.__isNextKey(e)?(r=n,s=o+n):"Home"===e?(r=1,s=0):"End"===e&&(r=-1,s=i.length-1),s=this._getAvailableIndex(i,s,r,(t=>!cs(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 i=this._getItems();this._focusItem(i[t],e)}_focusItem(t){t&&(t.focus(),t.setAttribute("focus-ring",""))}_getAvailableIndex(t,e,i,o){const s=t.length;let r=e;for(let e=0;"number"==typeof r&&e<s;e+=1,r+=i||1){r<0?r=s-1:r>=s&&(r=0);const e=t[r];if(!e.hasAttribute("disabled")&&this.__isMatchingItem(e,o))return r}return-1}__isMatchingItem(t,e){return"function"!=typeof e||e(t)}}
|
|
2088
|
+
/**
|
|
2089
|
+
* @license
|
|
2090
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2091
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2092
|
+
*/,_s=t=>class extends(ks(t)){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return"horizontal"!==this.orientation}focus(){this._observer&&this._observer.flush();const t=Array.isArray(this.items)?this.items:[],e=this._getAvailableIndex(t,0,null,(t=>0===t.tabIndex&&!cs(t)));e>=0?this._focus(e):super.focus()}ready(){super.ready(),this.addEventListener("click",(t=>this._onClick(t)));const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new xs(t,(()=>{this._setItems(this._filterItems(bs(this)))}))}_getItems(){return this.items}_enhanceItems(t,e,i,o){if(!o&&t){this.setAttribute("aria-orientation",e||"vertical"),t.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(i<0||!i?0:i);const o=t[i];t.forEach((t=>{t.selected=t===o})),o&&!o.disabled&&this._scrollToItem(i)}}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let i;e&&!e.disabled&&(i=this.items.indexOf(e))>=0&&(this.selected=i)}_searchKey(t,e){return this._searchReset=vs.debounce(this._searchReset,yo.after(500),(()=>{this._searchBuf=""})),this._searchBuf+=e.toLowerCase(),this.items.some((t=>this.__isMatchingKey(t)))||(this._searchBuf=e.toLowerCase()),this._getAvailableIndex(this.items,1===this._searchBuf.length?t+1:t,1,(t=>this.__isMatchingKey(t)&&"none"!==getComputedStyle(t).display))}__isMatchingKey(t){return t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(t){if(t.metaKey||t.ctrlKey)return;const e=t.key,i=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(e)&&1===e.length){const t=this._searchKey(i,e);t>=0&&this._focus(t)}else super._onKeyDown(t)}_isItemHidden(t){return"none"===getComputedStyle(t).display}_setFocusable(t){t=this._getAvailableIndex(this.items,t,1);const e=this.items[t];this.items.forEach((t=>{t.tabIndex=t===e?0:-1}))}_focus(t){this.items.forEach(((e,i)=>{e.focused=i===t})),this._setFocusable(t),this._scrollToItem(t),super._focus(t)}_scrollToItem(t){const e=this.items[t];if(!e)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],o=this._scrollerElement.getBoundingClientRect(),s=(this.items[t+1]||e).getBoundingClientRect(),r=(this.items[t-1]||e).getBoundingClientRect();let n=0;!this._isRTL&&s[i[1]]>=o[i[1]]||this._isRTL&&s[i[1]]<=o[i[1]]?n=s[i[1]]-o[i[1]]:(!this._isRTL&&r[i[0]]<=o[i[0]]||this._isRTL&&r[i[0]]>=o[i[0]])&&(n=r[i[0]]-o[i[0]]),this._scroll(n)}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",i=
|
|
2093
|
+
/**
|
|
2094
|
+
* @license
|
|
2095
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2096
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2097
|
+
*/
|
|
2098
|
+
function(t,e){const{scrollLeft:i}=t;return"rtl"!==e?i:t.scrollWidth-t.clientWidth+i}(this._scrollerElement,e)+t;!function(t,e,i){t.scrollLeft="rtl"!==e?i:t.clientWidth-t.scrollWidth+i}
|
|
2099
|
+
/**
|
|
2100
|
+
* @license
|
|
2101
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2102
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2103
|
+
*/(this._scrollerElement,e,i)}}}
|
|
2104
|
+
/**
|
|
2105
|
+
* @license
|
|
2106
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2107
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2108
|
+
*/,As=we((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)}}));
|
|
2109
|
+
/**
|
|
2110
|
+
* @license
|
|
2111
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2112
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2113
|
+
*/
|
|
2114
|
+
class Ss extends(_s(Bt(uo(As(ao))))){static get is(){return"vaadin-select-list-box"}static get template(){return ro`
|
|
2115
|
+
<style>
|
|
2116
|
+
:host {
|
|
2117
|
+
display: flex;
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
:host([hidden]) {
|
|
2121
|
+
display: none !important;
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
[part='items'] {
|
|
2125
|
+
height: 100%;
|
|
2126
|
+
width: 100%;
|
|
2127
|
+
overflow-y: auto;
|
|
2128
|
+
-webkit-overflow-scrolling: touch;
|
|
2129
|
+
}
|
|
2130
|
+
</style>
|
|
2131
|
+
<div part="items">
|
|
2132
|
+
<slot></slot>
|
|
2133
|
+
</div>
|
|
2134
|
+
`}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox")}}d(Ss);
|
|
2135
|
+
/**
|
|
2136
|
+
* @license
|
|
2137
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2138
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2139
|
+
*/
|
|
2140
|
+
const Cs=y`
|
|
2141
|
+
:host {
|
|
2142
|
+
z-index: 200;
|
|
2143
|
+
position: fixed;
|
|
2144
|
+
|
|
2145
|
+
/* Despite of what the names say, <vaadin-overlay> is just a container
|
|
2146
|
+
for position/sizing/alignment. The actual overlay is the overlay part. */
|
|
2147
|
+
|
|
2148
|
+
/* Default position constraints: the entire viewport. Note: themes can
|
|
2149
|
+
override this to introduce gaps between the overlay and the viewport. */
|
|
2150
|
+
inset: 0;
|
|
2151
|
+
bottom: var(--vaadin-overlay-viewport-bottom);
|
|
2152
|
+
|
|
2153
|
+
/* Use flexbox alignment for the overlay part. */
|
|
2154
|
+
display: flex;
|
|
2155
|
+
flex-direction: column; /* makes dropdowns sizing easier */
|
|
2156
|
+
/* Align to center by default. */
|
|
2157
|
+
align-items: center;
|
|
2158
|
+
justify-content: center;
|
|
2159
|
+
|
|
2160
|
+
/* Allow centering when max-width/max-height applies. */
|
|
2161
|
+
margin: auto;
|
|
2162
|
+
|
|
2163
|
+
/* The host is not clickable, only the overlay part is. */
|
|
2164
|
+
pointer-events: none;
|
|
2165
|
+
|
|
2166
|
+
/* Remove tap highlight on touch devices. */
|
|
2167
|
+
-webkit-tap-highlight-color: transparent;
|
|
2168
|
+
|
|
2169
|
+
/* CSS API for host */
|
|
2170
|
+
--vaadin-overlay-viewport-bottom: 0;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
:host([hidden]),
|
|
2174
|
+
:host(:not([opened]):not([closing])),
|
|
2175
|
+
:host(:not([opened]):not([closing])) [part='overlay'] {
|
|
2176
|
+
display: none !important;
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
[part='overlay'] {
|
|
2180
|
+
-webkit-overflow-scrolling: touch;
|
|
2181
|
+
overflow: auto;
|
|
2182
|
+
pointer-events: auto;
|
|
2183
|
+
|
|
2184
|
+
/* Prevent overflowing the host */
|
|
2185
|
+
max-width: 100%;
|
|
2186
|
+
box-sizing: border-box;
|
|
2187
|
+
|
|
2188
|
+
-webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
[part='backdrop'] {
|
|
2192
|
+
z-index: -1;
|
|
2193
|
+
content: '';
|
|
2194
|
+
background: rgba(0, 0, 0, 0.5);
|
|
2195
|
+
position: fixed;
|
|
2196
|
+
inset: 0;
|
|
2197
|
+
pointer-events: auto;
|
|
2198
|
+
}
|
|
2199
|
+
`
|
|
2200
|
+
/**
|
|
2201
|
+
@license
|
|
2202
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2203
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2204
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2205
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2206
|
+
Code distributed by Google as part of the polymer project is also
|
|
2207
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2208
|
+
*/;let Ts=!1,zs=[],Ns=[];function Es(t){const e=t[0],i=t[1],o=t[2];try{i.apply(e,o)}catch(t){setTimeout((()=>{throw t}))}}
|
|
2209
|
+
/**
|
|
2210
|
+
* @license
|
|
2211
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2212
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2213
|
+
*/
|
|
2214
|
+
const Os=t=>t.test(navigator.userAgent),Is=t=>t.test(navigator.platform);Os(/Android/u),Os(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),Os(/Firefox/u);const Bs=Is(/^iPad/u)||Is(/^Mac/u)&&navigator.maxTouchPoints>1,Ps=Is(/^iPhone/u)||Bs;Os(/^((?!chrome|android).)*safari/iu),(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
|
|
2215
|
+
/**
|
|
2216
|
+
* @license
|
|
2217
|
+
* Copyright (c) 2017 Anton Korzunov
|
|
2218
|
+
* SPDX-License-Identifier: MIT
|
|
2219
|
+
*/
|
|
2220
|
+
let Ms=new WeakMap,Ds=new WeakMap,js={},Fs=0;const Rs=t=>t&&t.nodeType===Node.ELEMENT_NODE,Ls=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)};
|
|
2221
|
+
/**
|
|
2222
|
+
* @license
|
|
2223
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2224
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2225
|
+
*/
|
|
2226
|
+
class Hs{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=((t,e=document.body,i="data-aria-hidden")=>{const o=Array.from(Array.isArray(t)?t:[t]);return e&&o.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,o)=>{const s=((t,e)=>Rs(t)?e.map((e=>{if(!Rs(e))return Ls(e,"is not a valid element"),null;let i=e;for(;i&&i!==t;){if(t.contains(i))return e;i=i.getRootNode().host}return Ls(e,"is not contained inside",t),null})).filter((t=>Boolean(t))):(Ls(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);js[i]||(js[i]=new WeakMap);const r=js[i],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(o),s=null!==e&&"false"!==e,a=(Ms.get(t)||0)+1,l=(r.get(t)||0)+1;Ms.set(t,a),r.set(t,l),n.push(t),1===a&&s&&Ds.set(t,!0),1===l&&t.setAttribute(i,"true"),s||t.setAttribute(o,"true")}}))};return h(e),a.clear(),Fs+=1,()=>{n.forEach((t=>{const e=Ms.get(t)-1,s=r.get(t)-1;Ms.set(t,e),r.set(t,s),e||(Ds.has(t)?Ds.delete(t):t.removeAttribute(o)),s||t.removeAttribute(i)})),Fs-=1,Fs||(Ms=new WeakMap,Ms=new WeakMap,Ds=new WeakMap,js={})}})(o,e,i,"aria-hidden")})(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
|
|
2227
|
+
/**
|
|
2228
|
+
* @license
|
|
2229
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2230
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2231
|
+
*/class Gs{saveFocus(t){this.focusNode=t||ss()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;ss()===document.body?setTimeout((()=>e.focus({preventScroll:i}))):e.focus({preventScroll:i}),this.focusNode=null}}
|
|
2232
|
+
/**
|
|
2233
|
+
* @license
|
|
2234
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2235
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2236
|
+
*/const Ws=[];class Us{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return us(t,e)?ls(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(hs).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.");Ws.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Ws.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Ws).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
|
|
2237
|
+
/**
|
|
2238
|
+
* @license
|
|
2239
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2240
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2241
|
+
*/const qs=t=>class extends(As(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Hs(this),this.__focusTrapController=new Us(this),this.__focusRestorationController=new Gs}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!rs();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=ss();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
|
|
2242
|
+
/**
|
|
2243
|
+
* @license
|
|
2244
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2245
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2246
|
+
*/,$s=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Vs=()=>$s().filter((t=>t.$.overlay)),Js=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Vs().pop())()}bringToFront(){let t="";const e=$s().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Vs().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Vs();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
|
|
2247
|
+
/**
|
|
2248
|
+
* @license
|
|
2249
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2250
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2251
|
+
*/,Ys=t=>class extends(qs(Js(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!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),Ps&&(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,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,o){const s=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,n=void 0!==this._oldRenderer;this._oldRenderer=t;const a=this._oldOpened!==o;this._oldOpened=o,r&&n&&(this.innerHTML="",delete this._$litPart$),o&&t&&(r||a||s)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){var i;t?(this._saveFocus(),this._animatedOpening(),i=()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)},Ts||(Ts=!0,requestAnimationFrame((function(){Ts=!1,function(t){for(;t.length;)Es(t.shift())}(zs),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)Es(t.shift())}(Ns)}))}))),Ns.push([this,i,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 i=`__${t}Handler`,o=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",o),delete this[i])};this[i]=o,this.addEventListener("animationend",o)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
|
|
2252
|
+
/**
|
|
2253
|
+
* @license
|
|
2254
|
+
* Copyright (c) 2024 Vaadin Ltd.
|
|
2255
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2256
|
+
*/,Ks={start:"top",end:"bottom"},Zs={start:"left",end:"right"},Xs=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),Qs=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)})),this.positionTarget&&(this.__observePositionTargetMove=function(t,e){let i=null;const o=document.documentElement;function s(){i&&i.disconnect(),i=null}return function r(n=!1,a=1){s();const{left:l,top:c,width:h,height:u}=t.getBoundingClientRect();if(n||e(),!h||!u)return;const d={rootMargin:`${-Math.floor(c)}px ${-Math.floor(o.clientWidth-(l+h))}px ${-Math.floor(o.clientHeight-(c+u))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==a){if(!p)return r();0===e&&(e=1e-7),r(!1,e)}p=!1}),d),i.observe(t)}(!0),s}
|
|
2257
|
+
/**
|
|
2258
|
+
* @license
|
|
2259
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2260
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2261
|
+
*/(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Xs.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Xs.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,o=this.__shouldAlignStartHorizontally(t,i),s=!i&&o||i&&!o;this.style.alignItems=s?"flex-start":"flex-end";const r=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,Ks,this,e),a=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Zs,this,o);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 i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const o=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,o,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Zs)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,Ks)}__shouldAlignStart(t,e,i,o,s,r,n){const a=i-t[r?n.end:n.start]-o[n.end],l=t[r?n.start:n.end]-o[n.start],c=s?a:l;return s===(c>(s?l:a)||c>e)}__adjustBottomProperty(t,e,i){let o;if(t===e.end){if(e.end===Ks.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(o=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Zs.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(o=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return o}__calculatePositionInOneDimension(t,e,i,o,s,r){const n=r?o.start:o.end,a=r?o.end:o.start,l=parseFloat(s.style[n]||getComputedStyle(s)[n]),c=this.__adjustBottomProperty(n,o,l),h=c?`${c}px`:`${l+(e[r?o.start:o.end]-t[i===r?o.end:o.start])*(r?-1:1)}px`;return{[n]:h,[a]:""}}}
|
|
2262
|
+
/**
|
|
2263
|
+
* @license
|
|
2264
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2265
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2266
|
+
*/,tr=t=>class extends(Qs(Ys(uo(t)))){static get observers(){return["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0}_getMenuElement(){return Array.from(this.children).find((t=>"style"!==t.localName))}_updateOverlayWidth(t,e){if(t&&e){const t="--vaadin-select-overlay-width",i=getComputedStyle(e).getPropertyValue(t);""===i?this.style.removeProperty(t):this.style.setProperty(t,i)}}}
|
|
2267
|
+
/**
|
|
2268
|
+
* @license
|
|
2269
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2270
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2271
|
+
*/;zt("vaadin-select-overlay",[Cs,y`
|
|
2272
|
+
:host {
|
|
2273
|
+
align-items: flex-start;
|
|
2274
|
+
justify-content: flex-start;
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
:host(:not([phone])) [part='overlay'] {
|
|
2278
|
+
min-width: var(--vaadin-select-overlay-width, var(--vaadin-select-text-field-width));
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
@media (forced-colors: active) {
|
|
2282
|
+
[part='overlay'] {
|
|
2283
|
+
outline: 3px solid;
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
`],{moduleId:"vaadin-select-overlay-styles"});class er extends(tr(Bt(ao))){static get is(){return"vaadin-select-overlay"}static get template(){return ro`
|
|
2287
|
+
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
2288
|
+
<div part="overlay" id="overlay" tabindex="0">
|
|
2289
|
+
<div part="content" id="content">
|
|
2290
|
+
<slot></slot>
|
|
2291
|
+
</div>
|
|
2292
|
+
</div>
|
|
2293
|
+
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t)}}}d(er);
|
|
2294
|
+
/**
|
|
2295
|
+
* @license
|
|
2296
|
+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2297
|
+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2298
|
+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2299
|
+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2300
|
+
* Code distributed by Google as part of the polymer project is also
|
|
2301
|
+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2302
|
+
*/
|
|
2303
|
+
let ir=0,or=0;const sr=[];let rr=!1;const nr={run(t){rr||(rr=!0,queueMicrotask((()=>function(){rr=!1;const t=sr.length;for(let e=0;e<t;e++){const t=sr[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}sr.splice(0,t),or+=t}()))),sr.push(t);const e=ir;return ir+=1,e},cancel(t){const e=t-or;if(e>=0){if(!sr[e])throw new Error(`invalid async handle: ${t}`);sr[e]=null}}},ar=!1,lr=t=>t,cr="string"==typeof document.head.style.touchAction,hr="__polymerGestures",ur="__polymerGesturesHandled",dr="__polymerGesturesTouchAction",pr=["mousedown","mousemove","mouseup","click"],mr=[0,1,4,2],fr=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();
|
|
2304
|
+
/**
|
|
2305
|
+
@license
|
|
2306
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2307
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2308
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2309
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2310
|
+
Code distributed by Google as part of the polymer project is also
|
|
2311
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2312
|
+
*/function vr(t){return pr.indexOf(t)>-1}let br=!1;function gr(t){if(!vr(t)&&"touchend"!==t)return cr&&br&&ar?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){br=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const yr=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),wr={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function xr(t){const e=t.type;if(!vr(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!fr&&(e=mr[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const kr={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function _r(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Ar(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Sr=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Cr={},Tr=[];function zr(t){const e=Sr(t);return e.length>0?e[0]:t.target}function Nr(t){const e=t.type,i=t.currentTarget[hr];if(!i)return;const o=i[e];if(!o)return;if(!t[ur]&&(t[ur]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(kr.touch.id=i.identifier),kr.touch.id!==i.identifier)return;cr||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)kr.touch.x=e.clientX,kr.touch.y=e.clientY,kr.touch.scrollDecided=!1;else if("touchmove"===i){if(kr.touch.scrollDecided)return;kr.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Sr(t);for(let t,o=0;o<i.length;o++)if(t=i[o],t[dr]){e=t[dr];break}return e}(t);let o=!1;const s=Math.abs(kr.touch.x-e.clientX),r=Math.abs(kr.touch.y-e.clientY);t.cancelable&&("none"===i?o=!0:"pan-x"===i?o=r>s:"pan-y"===i&&(o=s>r)),o?t.preventDefault():Br("track")}}(t)}const s=t[ur];if(!s.skip){for(let e,i=0;i<Tr.length;i++)e=Tr[i],o[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<Tr.length;r++)i=Tr[r],o[i.name]&&!s[i.name]&&(s[i.name]=!0,i[e](t))}}function Er(t,e,i){return!!Cr[e]&&(function(t,e,i){const o=Cr[e],s=o.deps,r=o.name;let n=t[hr];n||(t[hr]=n={});for(let e,i,o=0;o<s.length;o++)e=s[o],yr&&vr(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Nr,gr(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),o.touchAction&&function(t,e){cr&&t instanceof HTMLElement&&nr.run((()=>{t.style.touchAction=e})),t[dr]=e}(t,o.touchAction)}(t,e,i),!0)}function Or(t){Tr.push(t),t.emits.forEach((e=>{Cr[e]=t}))}function Ir(t,e,i){const o=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=i,lr(t).dispatchEvent(o),o.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Br(t){const e=function(t){for(let e,i=0;i<Tr.length;i++){e=Tr[i];for(let i,o=0;o<e.emits.length;o++)if(i=e.emits[o],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Pr(t,e,i,o){e&&Ir(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:o,prevent:t=>Br(t)})}function Mr(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const o=Math.abs(t.x-e),s=Math.abs(t.y-i);return o>=5||s>=5}function Dr(t,e,i){if(!e)return;const o=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1];let r,n=0;o&&(r=s.x-o.x,n=s.y-o.y),Ir(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:s.x-t.x,dy:s.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),o=i;for(;o&&o.shadowRoot&&!window.ShadyDOM;){const s=o;if(o=o.shadowRoot.elementFromPoint(t,e),s===o)break;o&&(i=o)}return i}(i.clientX,i.clientY)})}function jr(t,e,i){const o=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),r=zr(i||e);!r||wr[r.localName]&&r.hasAttribute("disabled")||(isNaN(o)||isNaN(s)||o<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=zr(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),o=t.pageX,s=t.pageY;return!(o>=i.left&&o<=i.right&&s>=i.top&&s<=i.bottom)}return!1}(e))&&(t.prevent||Ir(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
2313
|
+
/**
|
|
2314
|
+
* @license
|
|
2315
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2316
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2317
|
+
*/Or({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Ar(this.info)},mousedown(t){if(!xr(t))return;const e=zr(t),i=this;_r(this.info,(t=>{xr(t)||(Pr("up",e,t),Ar(i.info))}),(t=>{xr(t)&&Pr("up",e,t),Ar(i.info)})),Pr("down",e,t)},touchstart(t){Pr("down",zr(t),t.changedTouches[0],t)},touchend(t){Pr("up",zr(t),t.changedTouches[0],t)}}),Or({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,Ar(this.info)},mousedown(t){if(!xr(t))return;const e=zr(t),i=this,o=t=>{const o=t.clientX,s=t.clientY;Mr(i.info,o,s)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&Br("tap"),i.info.addMove({x:o,y:s}),xr(t)||(i.info.state="end",Ar(i.info)),e&&Dr(i.info,e,t),i.info.started=!0)};_r(this.info,o,(t=>{i.info.started&&o(t),Ar(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=zr(t),i=t.changedTouches[0],o=i.clientX,s=i.clientY;Mr(this.info,o,s)&&("start"===this.info.state&&Br("tap"),this.info.addMove({x:o,y:s}),Dr(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=zr(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Dr(this.info,e,i))}}),Or({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){xr(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){xr(t)&&jr(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){jr(this.info,t.changedTouches[0],t)}});const Fr=we((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),Rr=we((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){}})),Lr=t=>class extends(Fr(Rr(t))){get _activeKeys(){return[" "]}ready(){super.ready(),Er(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),Er(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)}}
|
|
2318
|
+
/**
|
|
2319
|
+
* @license
|
|
2320
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2321
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2322
|
+
*/;
|
|
2323
|
+
/**
|
|
2324
|
+
* @license
|
|
2325
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2326
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2327
|
+
*/let Hr=!1;window.addEventListener("keydown",(()=>{Hr=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{Hr=!1}),{capture:!0});
|
|
2328
|
+
/**
|
|
2329
|
+
* @license
|
|
2330
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2331
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2332
|
+
*/
|
|
2333
|
+
const Gr=we((t=>class extends t{get _keyboardActive(){return Hr}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}})),Wr=t=>class extends(Fr(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)}}
|
|
2334
|
+
/**
|
|
2335
|
+
* @license
|
|
2336
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2337
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2338
|
+
*/,Ur=t=>class extends(Lr(Wr(Gr(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())}}
|
|
2339
|
+
/**
|
|
2340
|
+
* @license
|
|
2341
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2342
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2343
|
+
*/;
|
|
2344
|
+
/**
|
|
2345
|
+
* @license
|
|
2346
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2347
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2348
|
+
*/
|
|
2349
|
+
/**
|
|
2350
|
+
* @license
|
|
2351
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2352
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2353
|
+
*/
|
|
2354
|
+
zt("vaadin-select-value-button",y`
|
|
2355
|
+
:host {
|
|
2356
|
+
display: inline-block;
|
|
2357
|
+
position: relative;
|
|
2358
|
+
outline: none;
|
|
2359
|
+
white-space: nowrap;
|
|
2360
|
+
-webkit-user-select: none;
|
|
2361
|
+
-moz-user-select: none;
|
|
2362
|
+
user-select: none;
|
|
2363
|
+
min-width: 0;
|
|
2364
|
+
width: 0;
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
::slotted(*) {
|
|
2368
|
+
padding-left: 0;
|
|
2369
|
+
padding-right: 0;
|
|
2370
|
+
flex: auto;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
/* placeholder styles */
|
|
2374
|
+
::slotted(*:not([selected])) {
|
|
2375
|
+
line-height: 1;
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
.vaadin-button-container {
|
|
2379
|
+
display: inline-flex;
|
|
2380
|
+
align-items: center;
|
|
2381
|
+
justify-content: center;
|
|
2382
|
+
text-align: inherit;
|
|
2383
|
+
width: 100%;
|
|
2384
|
+
height: 100%;
|
|
2385
|
+
min-height: inherit;
|
|
2386
|
+
text-shadow: inherit;
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
[part='label'] {
|
|
2390
|
+
white-space: nowrap;
|
|
2391
|
+
overflow: hidden;
|
|
2392
|
+
text-overflow: ellipsis;
|
|
2393
|
+
width: 100%;
|
|
2394
|
+
line-height: inherit;
|
|
2395
|
+
}
|
|
2396
|
+
`,{moduleId:"vaadin-select-value-button-styles"});class qr extends(Ur(Bt(ao))){static get is(){return"vaadin-select-value-button"}static get template(){return ro`
|
|
2397
|
+
<div class="vaadin-button-container">
|
|
2398
|
+
<span part="label">
|
|
2399
|
+
<slot></slot>
|
|
2400
|
+
</span>
|
|
2401
|
+
</div>
|
|
2402
|
+
`}}d(qr);
|
|
2403
|
+
/**
|
|
2404
|
+
* @license
|
|
2405
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
2406
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2407
|
+
*/
|
|
2408
|
+
const $r=y`
|
|
2409
|
+
.sr-only {
|
|
2410
|
+
border: 0 !important;
|
|
2411
|
+
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
2412
|
+
-webkit-clip-path: inset(50%) !important;
|
|
2413
|
+
clip-path: inset(50%) !important;
|
|
2414
|
+
height: 1px !important;
|
|
2415
|
+
margin: -1px !important;
|
|
2416
|
+
overflow: hidden !important;
|
|
2417
|
+
padding: 0 !important;
|
|
2418
|
+
position: absolute !important;
|
|
2419
|
+
width: 1px !important;
|
|
2420
|
+
white-space: nowrap !important;
|
|
2421
|
+
}
|
|
2422
|
+
`,Vr=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Jr=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Yr(t,e){if("function"!=typeof t)return;const i=Vr.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function Kr(){
|
|
2423
|
+
/*! vaadin-dev-mode:start
|
|
2424
|
+
(function () {
|
|
2425
|
+
'use strict';
|
|
2426
|
+
|
|
2427
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
2428
|
+
return typeof obj;
|
|
2429
|
+
} : function (obj) {
|
|
2430
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2431
|
+
};
|
|
2432
|
+
|
|
2433
|
+
var classCallCheck = function (instance, Constructor) {
|
|
2434
|
+
if (!(instance instanceof Constructor)) {
|
|
2435
|
+
throw new TypeError("Cannot call a class as a function");
|
|
2436
|
+
}
|
|
2437
|
+
};
|
|
2438
|
+
|
|
2439
|
+
var createClass = function () {
|
|
2440
|
+
function defineProperties(target, props) {
|
|
2441
|
+
for (var i = 0; i < props.length; i++) {
|
|
2442
|
+
var descriptor = props[i];
|
|
2443
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
2444
|
+
descriptor.configurable = true;
|
|
2445
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
2446
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
return function (Constructor, protoProps, staticProps) {
|
|
2451
|
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
2452
|
+
if (staticProps) defineProperties(Constructor, staticProps);
|
|
2453
|
+
return Constructor;
|
|
2454
|
+
};
|
|
2455
|
+
}();
|
|
2456
|
+
|
|
2457
|
+
var getPolymerVersion = function getPolymerVersion() {
|
|
2458
|
+
return window.Polymer && window.Polymer.version;
|
|
2459
|
+
};
|
|
2460
|
+
|
|
2461
|
+
var StatisticsGatherer = function () {
|
|
2462
|
+
function StatisticsGatherer(logger) {
|
|
2463
|
+
classCallCheck(this, StatisticsGatherer);
|
|
2464
|
+
|
|
2465
|
+
this.now = new Date().getTime();
|
|
2466
|
+
this.logger = logger;
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
createClass(StatisticsGatherer, [{
|
|
2470
|
+
key: 'frameworkVersionDetectors',
|
|
2471
|
+
value: function frameworkVersionDetectors() {
|
|
2472
|
+
return {
|
|
2473
|
+
'Flow': function Flow() {
|
|
2474
|
+
if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {
|
|
2475
|
+
var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {
|
|
2476
|
+
return window.Vaadin.Flow.clients[key];
|
|
2477
|
+
}).filter(function (client) {
|
|
2478
|
+
return client.getVersionInfo;
|
|
2479
|
+
}).map(function (client) {
|
|
2480
|
+
return client.getVersionInfo().flow;
|
|
2481
|
+
});
|
|
2482
|
+
if (flowVersions.length > 0) {
|
|
2483
|
+
return flowVersions[0];
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2486
|
+
},
|
|
2487
|
+
'Vaadin Framework': function VaadinFramework() {
|
|
2488
|
+
if (window.vaadin && window.vaadin.clients) {
|
|
2489
|
+
var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {
|
|
2490
|
+
return client.getVersionInfo;
|
|
2491
|
+
}).map(function (client) {
|
|
2492
|
+
return client.getVersionInfo().vaadinVersion;
|
|
2493
|
+
});
|
|
2494
|
+
if (frameworkVersions.length > 0) {
|
|
2495
|
+
return frameworkVersions[0];
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
},
|
|
2499
|
+
'AngularJs': function AngularJs() {
|
|
2500
|
+
if (window.angular && window.angular.version && window.angular.version) {
|
|
2501
|
+
return window.angular.version.full;
|
|
2502
|
+
}
|
|
2503
|
+
},
|
|
2504
|
+
'Angular': function Angular() {
|
|
2505
|
+
if (window.ng) {
|
|
2506
|
+
var tags = document.querySelectorAll("[ng-version]");
|
|
2507
|
+
if (tags.length > 0) {
|
|
2508
|
+
return tags[0].getAttribute("ng-version");
|
|
2509
|
+
}
|
|
2510
|
+
return "Unknown";
|
|
2511
|
+
}
|
|
2512
|
+
},
|
|
2513
|
+
'Backbone.js': function BackboneJs() {
|
|
2514
|
+
if (window.Backbone) {
|
|
2515
|
+
return window.Backbone.VERSION;
|
|
2516
|
+
}
|
|
2517
|
+
},
|
|
2518
|
+
'React': function React() {
|
|
2519
|
+
var reactSelector = '[data-reactroot], [data-reactid]';
|
|
2520
|
+
if (!!document.querySelector(reactSelector)) {
|
|
2521
|
+
// React does not publish the version by default
|
|
2522
|
+
return "unknown";
|
|
2523
|
+
}
|
|
2524
|
+
},
|
|
2525
|
+
'Ember': function Ember() {
|
|
2526
|
+
if (window.Em && window.Em.VERSION) {
|
|
2527
|
+
return window.Em.VERSION;
|
|
2528
|
+
} else if (window.Ember && window.Ember.VERSION) {
|
|
2529
|
+
return window.Ember.VERSION;
|
|
2530
|
+
}
|
|
2531
|
+
},
|
|
2532
|
+
'jQuery': function (_jQuery) {
|
|
2533
|
+
function jQuery() {
|
|
2534
|
+
return _jQuery.apply(this, arguments);
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
jQuery.toString = function () {
|
|
2538
|
+
return _jQuery.toString();
|
|
2539
|
+
};
|
|
2540
|
+
|
|
2541
|
+
return jQuery;
|
|
2542
|
+
}(function () {
|
|
2543
|
+
if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {
|
|
2544
|
+
return jQuery.prototype.jquery;
|
|
2545
|
+
}
|
|
2546
|
+
}),
|
|
2547
|
+
'Polymer': function Polymer() {
|
|
2548
|
+
var version = getPolymerVersion();
|
|
2549
|
+
if (version) {
|
|
2550
|
+
return version;
|
|
2551
|
+
}
|
|
2552
|
+
},
|
|
2553
|
+
'LitElement': function LitElement() {
|
|
2554
|
+
var version = window.litElementVersions && window.litElementVersions[0];
|
|
2555
|
+
if (version) {
|
|
2556
|
+
return version;
|
|
2557
|
+
}
|
|
2558
|
+
},
|
|
2559
|
+
'LitHtml': function LitHtml() {
|
|
2560
|
+
var version = window.litHtmlVersions && window.litHtmlVersions[0];
|
|
2561
|
+
if (version) {
|
|
2562
|
+
return version;
|
|
2563
|
+
}
|
|
2564
|
+
},
|
|
2565
|
+
'Vue.js': function VueJs() {
|
|
2566
|
+
if (window.Vue) {
|
|
2567
|
+
return window.Vue.version;
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
};
|
|
2571
|
+
}
|
|
2572
|
+
}, {
|
|
2573
|
+
key: 'getUsedVaadinElements',
|
|
2574
|
+
value: function getUsedVaadinElements(elements) {
|
|
2575
|
+
var version = getPolymerVersion();
|
|
2576
|
+
var elementClasses = void 0;
|
|
2577
|
+
// NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.
|
|
2578
|
+
// Check all locations calling the method getEntries() in
|
|
2579
|
+
// https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106
|
|
2580
|
+
// Currently it is only used by BootstrapHandler.
|
|
2581
|
+
if (version && version.indexOf('2') === 0) {
|
|
2582
|
+
// Polymer 2: components classes are stored in window.Vaadin
|
|
2583
|
+
elementClasses = Object.keys(window.Vaadin).map(function (c) {
|
|
2584
|
+
return window.Vaadin[c];
|
|
2585
|
+
}).filter(function (c) {
|
|
2586
|
+
return c.is;
|
|
2587
|
+
});
|
|
2588
|
+
} else {
|
|
2589
|
+
// Polymer 3: components classes are stored in window.Vaadin.registrations
|
|
2590
|
+
elementClasses = window.Vaadin.registrations || [];
|
|
2591
|
+
}
|
|
2592
|
+
elementClasses.forEach(function (klass) {
|
|
2593
|
+
var version = klass.version ? klass.version : "0.0.0";
|
|
2594
|
+
elements[klass.is] = { version: version };
|
|
2595
|
+
});
|
|
2596
|
+
}
|
|
2597
|
+
}, {
|
|
2598
|
+
key: 'getUsedVaadinThemes',
|
|
2599
|
+
value: function getUsedVaadinThemes(themes) {
|
|
2600
|
+
['Lumo', 'Material'].forEach(function (themeName) {
|
|
2601
|
+
var theme;
|
|
2602
|
+
var version = getPolymerVersion();
|
|
2603
|
+
if (version && version.indexOf('2') === 0) {
|
|
2604
|
+
// Polymer 2: themes are stored in window.Vaadin
|
|
2605
|
+
theme = window.Vaadin[themeName];
|
|
2606
|
+
} else {
|
|
2607
|
+
// Polymer 3: themes are stored in custom element registry
|
|
2608
|
+
theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');
|
|
2609
|
+
}
|
|
2610
|
+
if (theme && theme.version) {
|
|
2611
|
+
themes[themeName] = { version: theme.version };
|
|
2612
|
+
}
|
|
2613
|
+
});
|
|
2614
|
+
}
|
|
2615
|
+
}, {
|
|
2616
|
+
key: 'getFrameworks',
|
|
2617
|
+
value: function getFrameworks(frameworks) {
|
|
2618
|
+
var detectors = this.frameworkVersionDetectors();
|
|
2619
|
+
Object.keys(detectors).forEach(function (framework) {
|
|
2620
|
+
var detector = detectors[framework];
|
|
2621
|
+
try {
|
|
2622
|
+
var version = detector();
|
|
2623
|
+
if (version) {
|
|
2624
|
+
frameworks[framework] = { version: version };
|
|
2625
|
+
}
|
|
2626
|
+
} catch (e) {}
|
|
2627
|
+
});
|
|
2628
|
+
}
|
|
2629
|
+
}, {
|
|
2630
|
+
key: 'gather',
|
|
2631
|
+
value: function gather(storage) {
|
|
2632
|
+
var storedStats = storage.read();
|
|
2633
|
+
var gatheredStats = {};
|
|
2634
|
+
var types = ["elements", "frameworks", "themes"];
|
|
2635
|
+
|
|
2636
|
+
types.forEach(function (type) {
|
|
2637
|
+
gatheredStats[type] = {};
|
|
2638
|
+
if (!storedStats[type]) {
|
|
2639
|
+
storedStats[type] = {};
|
|
2640
|
+
}
|
|
2641
|
+
});
|
|
2642
|
+
|
|
2643
|
+
var previousStats = JSON.stringify(storedStats);
|
|
2644
|
+
|
|
2645
|
+
this.getUsedVaadinElements(gatheredStats.elements);
|
|
2646
|
+
this.getFrameworks(gatheredStats.frameworks);
|
|
2647
|
+
this.getUsedVaadinThemes(gatheredStats.themes);
|
|
2648
|
+
|
|
2649
|
+
var now = this.now;
|
|
2650
|
+
types.forEach(function (type) {
|
|
2651
|
+
var keys = Object.keys(gatheredStats[type]);
|
|
2652
|
+
keys.forEach(function (key) {
|
|
2653
|
+
if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {
|
|
2654
|
+
storedStats[type][key] = { firstUsed: now };
|
|
2655
|
+
}
|
|
2656
|
+
// Discards any previously logged version number
|
|
2657
|
+
storedStats[type][key].version = gatheredStats[type][key].version;
|
|
2658
|
+
storedStats[type][key].lastUsed = now;
|
|
2659
|
+
});
|
|
2660
|
+
});
|
|
2661
|
+
|
|
2662
|
+
var newStats = JSON.stringify(storedStats);
|
|
2663
|
+
storage.write(newStats);
|
|
2664
|
+
if (newStats != previousStats && Object.keys(storedStats).length > 0) {
|
|
2665
|
+
this.logger.debug("New stats: " + newStats);
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
}]);
|
|
2669
|
+
return StatisticsGatherer;
|
|
2670
|
+
}();
|
|
2671
|
+
|
|
2672
|
+
var StatisticsStorage = function () {
|
|
2673
|
+
function StatisticsStorage(key) {
|
|
2674
|
+
classCallCheck(this, StatisticsStorage);
|
|
2675
|
+
|
|
2676
|
+
this.key = key;
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
createClass(StatisticsStorage, [{
|
|
2680
|
+
key: 'read',
|
|
2681
|
+
value: function read() {
|
|
2682
|
+
var localStorageStatsString = localStorage.getItem(this.key);
|
|
2683
|
+
try {
|
|
2684
|
+
return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');
|
|
2685
|
+
} catch (e) {
|
|
2686
|
+
return {};
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
}, {
|
|
2690
|
+
key: 'write',
|
|
2691
|
+
value: function write(data) {
|
|
2692
|
+
localStorage.setItem(this.key, data);
|
|
2693
|
+
}
|
|
2694
|
+
}, {
|
|
2695
|
+
key: 'clear',
|
|
2696
|
+
value: function clear() {
|
|
2697
|
+
localStorage.removeItem(this.key);
|
|
2698
|
+
}
|
|
2699
|
+
}, {
|
|
2700
|
+
key: 'isEmpty',
|
|
2701
|
+
value: function isEmpty() {
|
|
2702
|
+
var storedStats = this.read();
|
|
2703
|
+
var empty = true;
|
|
2704
|
+
Object.keys(storedStats).forEach(function (key) {
|
|
2705
|
+
if (Object.keys(storedStats[key]).length > 0) {
|
|
2706
|
+
empty = false;
|
|
2707
|
+
}
|
|
2708
|
+
});
|
|
2709
|
+
|
|
2710
|
+
return empty;
|
|
2711
|
+
}
|
|
2712
|
+
}]);
|
|
2713
|
+
return StatisticsStorage;
|
|
2714
|
+
}();
|
|
2715
|
+
|
|
2716
|
+
var StatisticsSender = function () {
|
|
2717
|
+
function StatisticsSender(url, logger) {
|
|
2718
|
+
classCallCheck(this, StatisticsSender);
|
|
2719
|
+
|
|
2720
|
+
this.url = url;
|
|
2721
|
+
this.logger = logger;
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2724
|
+
createClass(StatisticsSender, [{
|
|
2725
|
+
key: 'send',
|
|
2726
|
+
value: function send(data, errorHandler) {
|
|
2727
|
+
var logger = this.logger;
|
|
2728
|
+
|
|
2729
|
+
if (navigator.onLine === false) {
|
|
2730
|
+
logger.debug("Offline, can't send");
|
|
2731
|
+
errorHandler();
|
|
2732
|
+
return;
|
|
2733
|
+
}
|
|
2734
|
+
logger.debug("Sending data to " + this.url);
|
|
2735
|
+
|
|
2736
|
+
var req = new XMLHttpRequest();
|
|
2737
|
+
req.withCredentials = true;
|
|
2738
|
+
req.addEventListener("load", function () {
|
|
2739
|
+
// Stats sent, nothing more to do
|
|
2740
|
+
logger.debug("Response: " + req.responseText);
|
|
2741
|
+
});
|
|
2742
|
+
req.addEventListener("error", function () {
|
|
2743
|
+
logger.debug("Send failed");
|
|
2744
|
+
errorHandler();
|
|
2745
|
+
});
|
|
2746
|
+
req.addEventListener("abort", function () {
|
|
2747
|
+
logger.debug("Send aborted");
|
|
2748
|
+
errorHandler();
|
|
2749
|
+
});
|
|
2750
|
+
req.open("POST", this.url);
|
|
2751
|
+
req.setRequestHeader("Content-Type", "application/json");
|
|
2752
|
+
req.send(data);
|
|
2753
|
+
}
|
|
2754
|
+
}]);
|
|
2755
|
+
return StatisticsSender;
|
|
2756
|
+
}();
|
|
2757
|
+
|
|
2758
|
+
var StatisticsLogger = function () {
|
|
2759
|
+
function StatisticsLogger(id) {
|
|
2760
|
+
classCallCheck(this, StatisticsLogger);
|
|
2761
|
+
|
|
2762
|
+
this.id = id;
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
createClass(StatisticsLogger, [{
|
|
2766
|
+
key: '_isDebug',
|
|
2767
|
+
value: function _isDebug() {
|
|
2768
|
+
return localStorage.getItem("vaadin." + this.id + ".debug");
|
|
2769
|
+
}
|
|
2770
|
+
}, {
|
|
2771
|
+
key: 'debug',
|
|
2772
|
+
value: function debug(msg) {
|
|
2773
|
+
if (this._isDebug()) {
|
|
2774
|
+
console.info(this.id + ": " + msg);
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2777
|
+
}]);
|
|
2778
|
+
return StatisticsLogger;
|
|
2779
|
+
}();
|
|
2780
|
+
|
|
2781
|
+
var UsageStatistics = function () {
|
|
2782
|
+
function UsageStatistics() {
|
|
2783
|
+
classCallCheck(this, UsageStatistics);
|
|
2784
|
+
|
|
2785
|
+
this.now = new Date();
|
|
2786
|
+
this.timeNow = this.now.getTime();
|
|
2787
|
+
this.gatherDelay = 10; // Delay between loading this file and gathering stats
|
|
2788
|
+
this.initialDelay = 24 * 60 * 60;
|
|
2789
|
+
|
|
2790
|
+
this.logger = new StatisticsLogger("statistics");
|
|
2791
|
+
this.storage = new StatisticsStorage("vaadin.statistics.basket");
|
|
2792
|
+
this.gatherer = new StatisticsGatherer(this.logger);
|
|
2793
|
+
this.sender = new StatisticsSender("https://tools.vaadin.com/usage-stats/submit", this.logger);
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
createClass(UsageStatistics, [{
|
|
2797
|
+
key: 'maybeGatherAndSend',
|
|
2798
|
+
value: function maybeGatherAndSend() {
|
|
2799
|
+
var _this = this;
|
|
2800
|
+
|
|
2801
|
+
if (localStorage.getItem(UsageStatistics.optOutKey)) {
|
|
2802
|
+
return;
|
|
2803
|
+
}
|
|
2804
|
+
this.gatherer.gather(this.storage);
|
|
2805
|
+
setTimeout(function () {
|
|
2806
|
+
_this.maybeSend();
|
|
2807
|
+
}, this.gatherDelay * 1000);
|
|
2808
|
+
}
|
|
2809
|
+
}, {
|
|
2810
|
+
key: 'lottery',
|
|
2811
|
+
value: function lottery() {
|
|
2812
|
+
return true;
|
|
2813
|
+
}
|
|
2814
|
+
}, {
|
|
2815
|
+
key: 'currentMonth',
|
|
2816
|
+
value: function currentMonth() {
|
|
2817
|
+
return this.now.getYear() * 12 + this.now.getMonth();
|
|
2818
|
+
}
|
|
2819
|
+
}, {
|
|
2820
|
+
key: 'maybeSend',
|
|
2821
|
+
value: function maybeSend() {
|
|
2822
|
+
var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
2823
|
+
var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));
|
|
2824
|
+
|
|
2825
|
+
if (!firstUse) {
|
|
2826
|
+
// Use a grace period to avoid interfering with tests, incognito mode etc
|
|
2827
|
+
firstUse = this.timeNow;
|
|
2828
|
+
localStorage.setItem(UsageStatistics.firstUseKey, firstUse);
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
if (this.timeNow < firstUse + this.initialDelay * 1000) {
|
|
2832
|
+
this.logger.debug("No statistics will be sent until the initial delay of " + this.initialDelay + "s has passed");
|
|
2833
|
+
return;
|
|
2834
|
+
}
|
|
2835
|
+
if (this.currentMonth() <= monthProcessed) {
|
|
2836
|
+
this.logger.debug("This month has already been processed");
|
|
2837
|
+
return;
|
|
2838
|
+
}
|
|
2839
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());
|
|
2840
|
+
// Use random sampling
|
|
2841
|
+
if (this.lottery()) {
|
|
2842
|
+
this.logger.debug("Congratulations, we have a winner!");
|
|
2843
|
+
} else {
|
|
2844
|
+
this.logger.debug("Sorry, no stats from you this time");
|
|
2845
|
+
return;
|
|
2846
|
+
}
|
|
2847
|
+
|
|
2848
|
+
this.send();
|
|
2849
|
+
}
|
|
2850
|
+
}, {
|
|
2851
|
+
key: 'send',
|
|
2852
|
+
value: function send() {
|
|
2853
|
+
// Ensure we have the latest data
|
|
2854
|
+
this.gatherer.gather(this.storage);
|
|
2855
|
+
|
|
2856
|
+
// Read, send and clean up
|
|
2857
|
+
var data = this.storage.read();
|
|
2858
|
+
data["firstUse"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
2859
|
+
data["usageStatisticsVersion"] = UsageStatistics.version;
|
|
2860
|
+
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';
|
|
2861
|
+
var self = this;
|
|
2862
|
+
this.sender.send(info + JSON.stringify(data), function () {
|
|
2863
|
+
// Revert the 'month processed' flag
|
|
2864
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);
|
|
2865
|
+
});
|
|
2866
|
+
}
|
|
2867
|
+
}], [{
|
|
2868
|
+
key: 'version',
|
|
2869
|
+
get: function get$1() {
|
|
2870
|
+
return '2.1.2';
|
|
2871
|
+
}
|
|
2872
|
+
}, {
|
|
2873
|
+
key: 'firstUseKey',
|
|
2874
|
+
get: function get$1() {
|
|
2875
|
+
return 'vaadin.statistics.firstuse';
|
|
2876
|
+
}
|
|
2877
|
+
}, {
|
|
2878
|
+
key: 'monthProcessedKey',
|
|
2879
|
+
get: function get$1() {
|
|
2880
|
+
return 'vaadin.statistics.monthProcessed';
|
|
2881
|
+
}
|
|
2882
|
+
}, {
|
|
2883
|
+
key: 'optOutKey',
|
|
2884
|
+
get: function get$1() {
|
|
2885
|
+
return 'vaadin.statistics.optout';
|
|
2886
|
+
}
|
|
2887
|
+
}]);
|
|
2888
|
+
return UsageStatistics;
|
|
2889
|
+
}();
|
|
2890
|
+
|
|
2891
|
+
try {
|
|
2892
|
+
window.Vaadin = window.Vaadin || {};
|
|
2893
|
+
window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();
|
|
2894
|
+
window.Vaadin.usageStatsChecker.maybeGatherAndSend();
|
|
2895
|
+
} catch (e) {
|
|
2896
|
+
// Intentionally ignored as this is not a problem in the app being developed
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
}());
|
|
2900
|
+
|
|
2901
|
+
vaadin-dev-mode:end **/}let Zr;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&&(Jr?!(Jr&&Object.keys(Jr).map((t=>Jr[t])).filter((t=>t.productionMode)).length>0):!Yr((function(){return!0})))}catch(t){return!1}}()),
|
|
2902
|
+
/**
|
|
2903
|
+
* @license
|
|
2904
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2905
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2906
|
+
*/
|
|
2907
|
+
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)Yr(t,e)}(Kr)};const Xr=new Set,Qr=t=>class extends(uo(t)){static finalize(){super.finalize();const{is:t}=this;t&&!Xr.has(t)&&(window.Vaadin.registrations.push(this),Xr.add(t),window.Vaadin.developmentModeCallback&&(Zr=vs.debounce(Zr,xo,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),fs.add(Zr)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
|
|
2908
|
+
/**
|
|
2909
|
+
* @license
|
|
2910
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2911
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2912
|
+
*/,tn=y`
|
|
2913
|
+
:host {
|
|
2914
|
+
display: inline-flex;
|
|
2915
|
+
outline: none;
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
:host::before {
|
|
2919
|
+
content: '\\2003';
|
|
2920
|
+
width: 0;
|
|
2921
|
+
display: inline-block;
|
|
2922
|
+
/* Size and position this element on the same vertical position as the input-field element
|
|
2923
|
+
to make vertical align for the host element work as expected */
|
|
2924
|
+
}
|
|
2925
|
+
|
|
2926
|
+
:host([hidden]) {
|
|
2927
|
+
display: none !important;
|
|
2928
|
+
}
|
|
2929
|
+
|
|
2930
|
+
:host(:not([has-label])) [part='label'] {
|
|
2931
|
+
display: none;
|
|
2932
|
+
}
|
|
2933
|
+
|
|
2934
|
+
@media (forced-colors: active) {
|
|
2935
|
+
:host(:not([readonly])) [part='input-field'] {
|
|
2936
|
+
outline: 1px solid;
|
|
2937
|
+
outline-offset: -1px;
|
|
2938
|
+
}
|
|
2939
|
+
:host([focused]) [part='input-field'] {
|
|
2940
|
+
outline-width: 2px;
|
|
2941
|
+
}
|
|
2942
|
+
:host([disabled]) [part='input-field'] {
|
|
2943
|
+
outline-color: GrayText;
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
`
|
|
2947
|
+
/**
|
|
2948
|
+
* @license
|
|
2949
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
2950
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2951
|
+
*/,en=y`
|
|
2952
|
+
[class$='container'] {
|
|
2953
|
+
display: flex;
|
|
2954
|
+
flex-direction: column;
|
|
2955
|
+
min-width: 100%;
|
|
2956
|
+
max-width: 100%;
|
|
2957
|
+
width: var(--vaadin-field-default-width, 12em);
|
|
2958
|
+
}
|
|
2959
|
+
`
|
|
2960
|
+
/**
|
|
2961
|
+
* @license
|
|
2962
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2963
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2964
|
+
*/,on=new Map;function sn(t){return on.has(t)||on.set(t,new WeakMap),on.get(t)}function rn(t,e){t&&t.removeAttribute(e)}function nn(t,e){if(!t||!e)return;const i=sn(e);if(i.has(t))return;const o=gs(t.getAttribute(e));i.set(t,new Set(o))}function an(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:o,oldId:s,fromUser:r}=i,n=sn(e),a=n.get(t);if(!r&&a)return s&&a.delete(s),void(o&&a.add(o));r&&(a?o||n.delete(t):nn(t,e),rn(t,e)),function(t,e,i){const o=gs(t.getAttribute(e));o.delete(i),0!==o.size?t.setAttribute(e,ys(o)):t.removeAttribute(e)}(t,e,s);const l=o||ys(a);l&&ws(t,e,l)}
|
|
2965
|
+
/**
|
|
2966
|
+
* @license
|
|
2967
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2968
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2969
|
+
*/
|
|
2970
|
+
const ln=t=>class extends(ts(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)}}
|
|
2971
|
+
/**
|
|
2972
|
+
* @license
|
|
2973
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2974
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2975
|
+
*/,cn=we((t=>class extends(ds(ln(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)}})),hn=we((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}}));
|
|
2976
|
+
/**
|
|
2977
|
+
* @license
|
|
2978
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2979
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2980
|
+
*/
|
|
2981
|
+
class un{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)}}
|
|
2982
|
+
/**
|
|
2983
|
+
* @license
|
|
2984
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2985
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2986
|
+
*/const dn=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:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const o="string"==typeof t?t.split(" ").filter(Boolean):[];o.length>0&&i.add(...o),this.__previousClasses=o}}
|
|
2987
|
+
/**
|
|
2988
|
+
* @license
|
|
2989
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2990
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2991
|
+
*/;let pn=0;function mn(){return pn++}
|
|
2992
|
+
/**
|
|
2993
|
+
* @license
|
|
2994
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2995
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2996
|
+
*/class fn extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${mn()}`}constructor(t,e,i,o={}){super();const{initializer:s,multiple:r,observe:n,useUniqueId:a,uniqueIdPrefix:l}=o;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof r&&r,this.slotInitializer=s,r&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,l||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let o=this.defaultNode;return!o&&i&&(o=document.createElement(i),o instanceof Element&&(""!==e&&o.setAttribute("slot",e),this.defaultNode=o)),o&&(this.node=o,t.appendChild(o)),o}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new xs(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],o=t.filter((t=>!function(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}(t)&&!i.includes(t)));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),o&&o.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...o].filter((t=>t!==this.defaultNode)),o.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=o[0],this.initAddedNode(this.node)))}))}}
|
|
2997
|
+
/**
|
|
2998
|
+
* @license
|
|
2999
|
+
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
3000
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3001
|
+
*/class vn extends fn{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}}))}}
|
|
3002
|
+
/**
|
|
3003
|
+
* @license
|
|
3004
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3005
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3006
|
+
*/class bn{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?(nn(e=this.__target,"aria-labelledby"),rn(e,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=sn(e),o=i.get(t);o&&0!==o.size?ws(t,e,ys(o)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){an(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){an(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){an(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")))}}
|
|
3007
|
+
/**
|
|
3008
|
+
* @license
|
|
3009
|
+
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
3010
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3011
|
+
*/const gn=document.createElement("div");let yn;gn.style.position="fixed",gn.style.clip="rect(0px, 0px, 0px, 0px)",gn.setAttribute("aria-live","polite"),document.body.appendChild(gn);
|
|
3012
|
+
/**
|
|
3013
|
+
* @license
|
|
3014
|
+
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
3015
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3016
|
+
*/
|
|
3017
|
+
class wn extends fn{constructor(t,e,i,o={}){super(t,e,i,{...o,useUniqueId:!0})}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType!==Node.ELEMENT_NODE||this.multiple&&this.nodes&&t!==this.nodes[0]||t.id||(t.id=this.defaultId)}}
|
|
3018
|
+
/**
|
|
3019
|
+
* @license
|
|
3020
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3021
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3022
|
+
*/class xn extends wn{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,o=Boolean(i&&e&&""!==e.trim());t&&(t.textContent=o?e:"",t.hidden=!o,o&&function(t,e={}){const i=e.mode||"polite",o=void 0===e.timeout?150:e.timeout;"alert"===i?(gn.removeAttribute("aria-live"),gn.removeAttribute("role"),yn=vs.debounce(yn,wo,(()=>{gn.setAttribute("role","alert")}))):(yn&&yn.cancel(),gn.removeAttribute("role"),gn.setAttribute("aria-live",i)),gn.textContent="",setTimeout((()=>{gn.textContent=t}),o)}(e,{mode:"assertive"})),super.updateDefaultNode(t)}}
|
|
3023
|
+
/**
|
|
3024
|
+
* @license
|
|
3025
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3026
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3027
|
+
*/class kn extends wn{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)}}
|
|
3028
|
+
/**
|
|
3029
|
+
* @license
|
|
3030
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3031
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3032
|
+
*/class _n extends wn{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)}}
|
|
3033
|
+
/**
|
|
3034
|
+
* @license
|
|
3035
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3036
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3037
|
+
*/const An=we((t=>class extends(As(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new _n(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)}})),Sn=we((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},manualValidation:{type:Boolean,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}_requestValidation(){this.manualValidation||this.validate()}})),Cn=t=>class extends(Sn(An(As(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 bn(this),this._helperController=new kn(this),this._errorController=new xn(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
|
|
3038
|
+
/**
|
|
3039
|
+
* @license
|
|
3040
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
3041
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3042
|
+
*/;
|
|
3043
|
+
/**
|
|
3044
|
+
* @license
|
|
3045
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3046
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3047
|
+
*/class Tn extends fn{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")}})}}
|
|
3048
|
+
/**
|
|
3049
|
+
* @license
|
|
3050
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3051
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3052
|
+
*/const zn=t=>class extends(dn(cn(hn(es(Cn(t)))))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${mn()}`,this._srLabelController=new _n(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new Tn(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new un(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new vn(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._requestValidation()}__itemsChanged(t,e){(t||e)&&this.requestContentUpdate()}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",(()=>{this.__initMenuItems(t)})),t.addEventListener("selected-changed",(()=>this.__updateValueButton())),t.addEventListener("keydown",(t=>this._onKeyDownInside(t)),!0),t.addEventListener("click",(t=>{const e=t.composedPath().find((t=>t._hasVaadinItemMixin));this.__dispatchChangePending=Boolean(e&&void 0!==e.value&&e.value!==this.value),this.opened=!1}),!0),this.__lastMenuElement=t)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,e){this.toggleAttribute("has-value",Boolean(t)),void 0===e||this.__dispatchChangePending||this._requestValidation()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onToggleMouseDown(t){t.preventDefault()}_onKeyDown(t){if(t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){const e=this._menuElement.selected,i=this._menuElement._searchKey(void 0!==e?e:-1,t.key);i>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=i)}}_onKeyDownInside(t){/^(Tab)$/u.test(t.key)&&(this.opened=!1)}_openedChanged(t,e,i){if(e&&i){if(t){if(this.disabled||this.readonly)return void(this.opened=!1);this._updateAriaLive(!1),e.style.setProperty("--vaadin-select-text-field-width",`${i.offsetWidth}px`);const t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),this.__dispatchChangePending||this._keyboardActive||this._requestValidation());this.__oldOpened=t}}_updateAriaExpanded(t,e){e&&e.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&(t?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(t){let e;const i=t.getAttribute("label");e=i?this.__createItemElement({label:i}):t.cloneNode(!0),e._sourceItem=t,this.__appendValueItemElement(e,this.focusElement),e.selected=!0}__createItemElement(t){const e=document.createElement(t.component||"vaadin-select-item");return t.label&&(e.textContent=t.label),t.value&&(e.value=t.value),t.disabled&&(e.disabled=t.disabled),t.className&&(e.className=t.className),e}__appendValueItemElement(t,e){e.appendChild(t),t.performUpdate&&t.performUpdate(),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}_accessibleNameChanged(t){this._srLabelController.setLabel(t),this._setCustomAriaLabelledBy(t?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(t){this._setCustomAriaLabelledBy(t)}_setCustomAriaLabelledBy(t){const e=this._getLabelIdWithItemId(t);this._fieldAriaController.setLabelId(e,!0)}_getLabelIdWithItemId(t){return t?`${t} ${this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:""}`.trim():null}__updateValueButton(){const t=this.focusElement;if(!t)return;t.innerHTML="";const e=this._items[this._menuElement.selected];if(t.removeAttribute("placeholder"),this._hasContent(e))this.__attachSelectedItem(e);else if(this.placeholder){const e=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(e,t),t.setAttribute("placeholder","")}!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),an(t,"aria-labelledby",e||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(t){return!!t&&(Boolean(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim())||t.childElementCount>0)}_updateSelectedItem(t,e){if(e){const i=null==t?t:t.toString();this._menuElement.selected=e.reduce(((t,e,o)=>void 0===t&&e.value===i?o:t),void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this._requestValidation()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,e){if(!this.items||0===this.items.length)return void(t.textContent="");let i=t.firstElementChild;i||(i=document.createElement("vaadin-select-list-box"),t.appendChild(i)),i.textContent="",this.items.forEach((t=>{i.appendChild(this.__createItemElement(t))}))}async __dispatchChange(){this.updateComplete&&await this.updateComplete,this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}}
|
|
3053
|
+
/**
|
|
3054
|
+
* @license
|
|
3055
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3056
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3057
|
+
*/;zt("vaadin-select",[tn,en,$r],{moduleId:"vaadin-select-styles"});class Nn extends(zn(Qr(Bt(ao)))){static get is(){return"vaadin-select"}static get template(){return ro`
|
|
3058
|
+
<style>
|
|
3059
|
+
:host {
|
|
3060
|
+
position: relative;
|
|
3061
|
+
}
|
|
3062
|
+
|
|
3063
|
+
::slotted([slot='value']) {
|
|
3064
|
+
flex-grow: 1;
|
|
3065
|
+
}
|
|
3066
|
+
</style>
|
|
3067
|
+
|
|
3068
|
+
<div class="vaadin-select-container">
|
|
3069
|
+
<div part="label" on-click="_onClick">
|
|
3070
|
+
<slot name="label"></slot>
|
|
3071
|
+
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
3072
|
+
</div>
|
|
3073
|
+
|
|
3074
|
+
<vaadin-input-container
|
|
3075
|
+
part="input-field"
|
|
3076
|
+
readonly="[[readonly]]"
|
|
3077
|
+
disabled="[[disabled]]"
|
|
3078
|
+
invalid="[[invalid]]"
|
|
3079
|
+
theme$="[[_theme]]"
|
|
3080
|
+
on-click="_onClick"
|
|
3081
|
+
>
|
|
3082
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
3083
|
+
<slot name="value"></slot>
|
|
3084
|
+
<div part="toggle-button" slot="suffix" aria-hidden="true" on-mousedown="_onToggleMouseDown"></div>
|
|
3085
|
+
</vaadin-input-container>
|
|
3086
|
+
|
|
3087
|
+
<div part="helper-text">
|
|
3088
|
+
<slot name="helper"></slot>
|
|
3089
|
+
</div>
|
|
3090
|
+
|
|
3091
|
+
<div part="error-message">
|
|
3092
|
+
<slot name="error-message"></slot>
|
|
3093
|
+
</div>
|
|
3094
|
+
</div>
|
|
3095
|
+
|
|
3096
|
+
<vaadin-select-overlay
|
|
3097
|
+
position-target="[[_inputContainer]]"
|
|
3098
|
+
opened="{{opened}}"
|
|
3099
|
+
with-backdrop="[[_phone]]"
|
|
3100
|
+
phone$="[[_phone]]"
|
|
3101
|
+
theme$="[[_theme]]"
|
|
3102
|
+
no-vertical-overlap$="[[noVerticalOverlap]]"
|
|
3103
|
+
on-vaadin-overlay-open="_onOverlayOpen"
|
|
3104
|
+
></vaadin-select-overlay>
|
|
3105
|
+
|
|
3106
|
+
<slot name="tooltip"></slot>
|
|
3107
|
+
<div class="sr-only">
|
|
3108
|
+
<slot name="sr-label"></slot>
|
|
3109
|
+
</div>
|
|
3110
|
+
`}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){var t;
|
|
3111
|
+
/**
|
|
3112
|
+
* @license
|
|
3113
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3114
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3115
|
+
*/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()}}d(Nn);const En=class{constructor(i){t(this,i),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.numberOfGrids=1,this.multipleDraws=!0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",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,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)}}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 i=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:[]}),o=Object.entries(i.groups).map((([t,e])=>({groupName:t,betType:e})));this.groupType=[...i.noGroup,...o],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)}))}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 i("div",null,i("p",null,h("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,h("error",this.language)));{const{rules:t}=this.gameData;return i("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},i("p",{class:"TicketTitle"},this.gameData.name),i("div",{class:"TicketTabs"},this.groupType.map(((t,e)=>i("div",{class:"TabButton"+(this.tabIndex==e?" Active":""),onClick:()=>this.tabIndex=e},t.groupName)))),this.playType.length>1&&i("div",null,i("label",{class:"Label"},h("playType",this.language),": "),i("vaadin-select",{style:{width:"160px"},items:this.playType,value:this.selectedPlayTypeId,"on-value-changed":t=>this.handlePlayTypeChange(t.detail.value)})),this.boardsAllowed.length>1&&i("div",null,i("label",{class:"Label"},h("lines",this.language),": "),i("div",{class:"WagerInput"},i("div",{ref:t=>this.selectLineRef=t,class:this.isCustomSelectLine?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleLineSelection()},i("span",null,this.lineMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},this.boardsAllowed.map((t=>i("li",{class:this.lineMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setLineMultiplier(t)},t)))))))),this.grids.map(((e,o)=>i("div",null,i("div",{class:"TicketGridHeader"},i("div",null,h("lineName",this.language),o+1),this.resetButton&&this.ticketDone[o]&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(o)},h("resetButton",this.language))),this.autoPick&&!this.ticketDone[o]&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(o)},h("autoButton",this.language)))),i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},t.boards[0].selectionName),i("lottery-grid",{"grid-index":o,"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,"selection-type":"mainSelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),this.secondarySelectionAllowed&&i("div",{class:"SecondarySelectionWrapper"},i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},t.boards[0].secondarySelectionName),i("lottery-grid",{"grid-index":o,"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,"selection-type":"secondarySelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))))),t.stakeMultiplierAvailable&&i("div",null,i("label",{class:"Label"},h("multiplier",this.language),": "),i("div",{class:"WagerInput"},t.stakeMultipliers.length>1?i("div",{ref:t=>this.selectStakeRef=t,class:this.isCustomSelectStake?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleSelection()},i("span",null,this.stakeMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.stakeMultipliers.map((t=>i("li",{class:this.stakeMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setStakeMultiplier(t)},t)))))):i("div",null,i("input",{min:"1",value:t.stakeMultipliers[0]||1,type:"number",disabled:!0})))),t.drawMultiplierAvailable&&i("div",null,i("label",{class:"Label"},h("numberOfDraws",this.language),": "),i("div",{class:"WagerInput"},t.durations.length>1?i("div",{ref:t=>this.selectDrawRef=t,class:this.isCustomSelectDraw?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleDrawSelection()},i("span",null,this.drawMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.durations.map((t=>i("li",{class:this.drawMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setDrawMultiplier(t)},t)))))):i("div",null,i("input",{min:"1",value:t.durations[0]||1,type:"number",disabled:!0})))),i("div",null,i("label",{class:"Label"},h("wagerPerDraw",this.language),": "),i("div",{class:"WagerInput"},t.stakes.length>1?i("div",{ref:t=>this.selectRef=t,class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleClass()},i("span",null,this.amountInfo.value," ",this.amountInfo.currency),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.stakes.map((t=>i("li",{class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setWagerPerDraw(t)},t.value," ",t.currency)))))):i("div",null,i("input",{min:"1",value:t.stakes[0].value,type:"number",disabled:!0}),i("span",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{lineMultiplier:["handleLineMultiplierChange"],tabIndex:["handleTabIndexChange"]}}};En.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 On=["ro","en","fr","ar","hr"],In={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},Bn=(t,e)=>{const i=e;return In[void 0!==i&&On.includes(i)?i:"en"][t]},Pn=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,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.limitStylingAppends=!1,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)}}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"4d590432063c3eb6ebc21d0c529d861d60f0af3c",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"afdc0f2938b173a41966fa93d2d0d92551058dc5","header-title":`${Bn("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"9f01d3ffcb6fa2342394de10efc666cbc5c7f042",slot:"accordionContent"},i("lottery-ticket",{key:"bdf5ea12c603665b6d9f9133de9d5206344677f1",endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};Pn.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,En as lottery_ticket,Pn as lottery_ticket_controller}
|