@everymatrix/bonus-elevate-powerups-lobby 0.0.71 → 0.0.72
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/bonus-elevate-powerups-lobby/bonus-elevate-powerups-lobby.esm.js +1 -1
- package/dist/bonus-elevate-powerups-lobby/bonus-elevate-powerups_21.entry.js +140 -140
- package/dist/cjs/bonus-elevate-powerups-lobby.cjs.js +1 -1
- package/dist/cjs/bonus-elevate-powerups_21.cjs.entry.js +22 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/esm/bonus-elevate-powerups-lobby.js +1 -1
- package/dist/esm/bonus-elevate-powerups_21.entry.js +22 -3
- package/dist/esm/loader.js +1 -1
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-lobby/.stencil/libs/common/src/types/casino/powerups.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{r as t,h as e,c as i,g as s,H as r}from"./index-907b0f95.js";import{P as o,a as n,s as a,b as l,c as h}from"./bonus-elevate-powerups-lobby-e4209b1a.js";export{B as bonus_elevate_powerups_lobby}from"./bonus-elevate-powerups-lobby-e4209b1a.js";const d={en:{min:"MIN",rounds:"Rounds",coins:"Coins",xp:"XP",expiresIn:"EXPIRES IN ",playNow:"Start Now!",nothingHere:"Nothing here -- yet!",noPowerUps:"No power-ups at the moment.",gotoShop:"Go to the shop to check power-ups availability.",termsCon:"Read full Terms & Conditions > ",games:"Games",selectGameToActive:"Select the game to activate power-up",days:"days"}},c=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{d[e]||(d[e]={});for(let i in t[e])d[e][i]=t[e][i]})),e(!0)}))})),u=(t,e,i)=>{let s=d[void 0!==e&&e in d?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s},p={expand:"games",fields:"id,powerUpID,displayName,termsUrl,description,status,multiplier,boostingPeriod,currentTime,expireTime,games(id,gameId,name,slug,thumbnail)",status:`${o.ACTIVE},${o.ACTIVATED}`},m={expand:"games",fields:"id,powerUpID,games(id,gameId,slug,name,thumbnail)"},v=class{constructor(e){t(this,e),this.tableId="powerups",this.gameObservers=new Map,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.session=void 0,this.limit=10,this.openTermsPage=!1,this.pageLimitOptions="10,25,50",this.pageLimitSelectOptions=[],this.isLoading=!0,this.powerups=[],this.offset=0,this.total=void 0}onReloadPageByType(t){const{offset:e,tableId:i}=t.detail;i===this.tableId&&(this.offset=e)}setLimit(){try{const t=this.pageLimitOptions.split(",").map((t=>parseInt(t)));t.includes(this.limit)||(this.limit=t[0])}catch(t){console.error("Error when parse PageLimitOptions",t),this.limit=10}}onPageLimitChangedHandler(t){var e;if("pageLimits"===(null===(e=t.detail)||void 0===e?void 0:e.name)){const e=parseInt(t.detail.value||"10");this.limit!=e&&(this.limit=e,this.offset=0)}}async loadData(){if(this.endpoint&&this.session&&this.pageLimitSelectOptions.length){this.isLoading=!0,this.abortController&&this.abortController.abort(),this.abortController=new AbortController;try{const t=new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=${this.offset},limit=${this.limit},games(limit=20,offset=0)`);let e={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET",signal:this.abortController.signal};Object.entries(p).forEach((([e,i])=>{t.searchParams.append(e,i)})),t.searchParams.append("language",this.language);const i=await fetch(t,e);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const{data:s,total:r}=await i.json();this.powerups=s,this.total=r}catch(t){"AbortError"!==t.name&&(console.error("Failed to load powerups history:",t),window.postMessage({type:"peHistoryLoaderError",error:t}))}finally{this.abortController.signal.aborted||(this.isLoading=!1)}}}onGameClick(t){window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t.slug}})}onTermsUrlClick(t){window.postMessage({type:"onPowerupTermsUrlClicked",termsUrl:t.termsUrl,id:t.id},"*")}async loadMoreGames(t){var e;if(!(t.games.items.length>=t.games.total))try{const i=new URL(`${this.endpoint}/v1/elevate/powerups/available?pagination=games(limit=20,offset=${t.games.items.length})`),s={headers:{"x-SessionId":this.session}};i.searchParams.append("filter",`id=${t.powerUpID}`),Object.entries(m).forEach((([t,e])=>{i.searchParams.append(t,e)}));const r=await fetch(i.toString(),s);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const{data:o}=await r.json(),n=this.powerups.findIndex((e=>e.id===t.id));if(-1!==n){const t=Object.assign({},this.powerups[n]),i=null==o?void 0:o[0];if(i&&(null===(e=i.games)||void 0===e?void 0:e.items)){t.games.items=[...t.games.items,...i.games.items];const e=[...this.powerups];e[n]=t,this.powerups=e}}}catch(t){console.error("Failed to load more games:",t)}}initializeGamesObserver(t){let e=this.gameObservers.get(t.id);e&&e.disconnect(),e=new IntersectionObserver((i=>{i.forEach((i=>{i.isIntersecting&&(this.loadMoreGames(t),e.unobserve(i.target),this.gameObservers.delete(t.id))}))})),this.gameObservers.set(t.id,e),setTimeout((()=>{const i=this.stylingContainer.querySelector(`.PowerUpItem[data-powerup-id="${t.id}"] .Game:last-child`);i&&e.observe(i)}),200)}componentDidUpdate(){this.powerups.forEach((t=>{var e,i;(null===(e=t.games)||void 0===e?void 0:e.items.length)<(null===(i=t.games)||void 0===i?void 0:i.total)&&this.initializeGamesObserver(t)}))}render(){return e("div",{key:"1fbebb9517c75a1c3ad267c1b754bf5ca0df5cde",class:"PowerUpsContainer",ref:t=>this.stylingContainer=t},this.isLoading?e("p",null,"Loading..."):this.total?[e("div",{class:"PowerUps"},this.powerups.map((t=>{var i,s;return e("div",{class:"PowerUpItem Card","data-powerup-id":t.id},e("div",{class:"CardLeft"},e("div",{class:"MainInfo"},e("div",{class:"DisplayName"}," ",t.displayName||"-"," "),e("div",{class:"Title2 PowerUpMultiplier"},e("span",{class:"BoostingPeriod"},e("span",{class:"Period"},t.boostingPeriod.minutes||t.boostingPeriod.numberOfRounds," "),u(t.boostingPeriod.mode===n.TIME_PERIOD?"min":"rounds",this.language)," "),e("span",{class:"Spliter"},"|"),e("span",{class:"Multiplier"},"X ",t.multiplier.coefficient," "),e("span",{class:"Spliter"},"|"),e("span",{class:"MultiplierMode"},u(t.multiplier.mode,this.language)," "),t.expireTime&&[e("span",{class:"Spliter"}," | "),e("span",{class:"ExpireCount"},e("time-count",{"expire-time":t.expireTime,language:this.language}))]),e("div",{class:"Description"},t.description)),e("div",{class:"TermsC"},this.openTermsPage?e("a",{href:t.termsUrl?t.termsUrl:"#",target:"_blank"},u("termsCon",this.language)):e("span",{onClick:()=>this.onTermsUrlClick(t)},u("termsCon",this.language)," "))),e("div",{class:"GamesContent CardRight"},e("div",{class:"GamesTitle"},e("span",{class:"Title2"}," ",u("games",this.language)),e("span",{class:"GamesAmount"}," ( ",(null===(i=t.games)||void 0===i?void 0:i.total)||0," ) ")),e("div",{class:"GameTitleTip"},u("selectGameToActive",this.language)),e("div",{class:"GamesList"},e("div",{class:"Games"},null===(s=t.games)||void 0===s?void 0:s.items.map((t=>e("div",{class:"Game"},e("ui-image",{src:t.thumbnail}),e("div",{class:"GameMask",onClick:this.onGameClick.bind(this,t)},e("div",{class:"GameStartBtn"},e("div",{class:"PlayIcon"}),e("span",null,u("playNow",this.language)))))))))))}))),e("div",{class:"Pagination"},this.total&&[e("bonus-pagination-nav",{offset:this.offset,limit:this.limit,"secondary-arrows-active":!0,"table-id":this.tableId,total:this.total}),e("general-input",{"client-styling":"\n .pageLimits__input [part='input-field'] ::slotted([slot='value']:not([placeholder])) {\n\n text-align: center;\n }\n .pageLimits__input .select__input{background: transparent; width: 89px;\n vaadin-select-value-button{\n color: var(--vaadin-input-field-value-color, var(--emw--color-text));\n text-align: center;\n }\n }\n .pageLimits__input .select__input::part(toggle-button){\n color: var(--vaadin-input-field-value-color, var(--emw--color-text));\n right: 0px;\n }\n .pageLimits__input .select__input::part(input-field) {\n border-radius: 20px;\n background-color: transparent;\n border: 1px solid var(--emw--color-gray-100, #BCFCB10D);\n color: var(--emw--color-black, #000000);\n font-family: inherit;\n font-style: normal;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.5;\n padding: 5px;\n height: 34px;\n }",type:"dropdown",name:"pageLimits","display-name":"","default-value":this.limit,validation:{mandatory:!1},options:this.pageLimitSelectOptions,emitValue:!0,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl})])]:e("div",{class:"EmptyPowerups"},e("div",{class:"Icon",innerHTML:'<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<rect width="52" height="52" fill="url(#pattern0_1132_30534)"/>\n<defs>\n<pattern id="pattern0_1132_30534" patternContentUnits="objectBoundingBox" width="1" height="1">\n<use xlink:href="#image0_1132_30534" transform="scale(0.01)"/>\n</pattern>\n<image id="image0_1132_30534" width="100" height="100" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHlElEQVR4nO2daYwURRTH/4tnvPCI9xE1ahQTNZmp6gXRzar4wTtGvPWLUeIVPxgVNWbizqvZRdTAGoioEQwaFDWK0YBCvMUbJWJIBD8QOUIEowhEQFjzepu4WaZ6qnp6tqub+iX9hexUV/W/Xh3vvSoAj8fj8Xg8Ho/H4/F4ikapB8PLNYiyws2S8LBU6JEKU4TCNKkwWSjUhML9ZYWrRRfOPGUy9sm6zoWio4IDpMI1/NElYalU6LN5hMI2SVgoFUgqdI6djT2yblP+6ENbuYqLJGGmJGy0FSFWIMIqQZgoFUZk3Uz3qWBYmXC5VPg2TRFinvmS0J51s51EKnQKws9DJMRgq5kjqzgp62/gBOcoHC4VXs5CiEGibBaERzsq2BO7K6KK84XCykQfUOGvaGibJxVms6hC4Q0ehiJL25Kw3M9kD47D7oYkPBCugEw/FmGFJEwVCteafDDu6SWF06XCOKnwqiBssBDmd1nFBdgtqGAY7xcMe+u2aDjr5N8189pSBfsJhRsF4VNDUbaw+Ci8GISZBuP5v5LwXKsmWqlwnlD4yECU7WxhKCqSMNVgaPom6EZpKOrDFiMJaxqJUq7iOhQNSag0aji7PYZ6lROu8ghzDYavC1EURA2XScKOGKvYyH+T8VBabTjRF2H1Va7ieElYFzNxr3dlt1wm3BXNG9olce73KZKwIKaBf7PnFg4RiRJnKY8gr4STZsySNlAYAweJPMM6QTYF3TgReUNWcFCDFcyDcHuvNC9mWT4HeUMojI8RYx672OEwIys4Iq5DlQgSeaGjgn11jRGEzeVunIwcEEYl9UPu28gLcROjIDxmWx6HYjlimDTaF/Z2hek8jFr9sA9tkvCxZqm+I+jCGcgDugCTUFg/agIOtCkrchCujsqYbbvsjIaen6LO8N3obhxi8/uyQkfM0NsD1+HQaIx1PG5rGUJh7aAyZplaSmQZSwb17IW2lhK65Ot3sJXOx+j5o2sE2d5OOLYZMWxEqStGQlFEFTfpOhlbEFxGKnyhqfx80zJ4WBKEZXEbtDhRYsX4/5luWp+zJmJ/3sRqyumC0yk7hK2aio+zKUvUMDKKClqJYijGEv47q/oQXtdY2+dwFfaIaj9eDadZl2cpSqvEiNp2p0aQrSMq2BsuIhXu1lR6TdIyTUUZNQHHtEqMRosVZ5e/ktCrEWRBM+WaiGKQUJdYjJ3zWkzixFVwEUF4T1PhKU2XbSJKi8TYiS6VlXOJ4SI8wbXSZS2SiZKKGEyY6VjfOqtwEUFYrOlB96b1Do63C8IfRmIQlpYIR6f1bkF4SzOHTYKLSIXlmo9zW5rvCWq4wkCMjTzRp/leXcaMILwAF9Hl5rKzESkx0Ddl8Fj7vpLsRYTCM3ARqfC1pgc9lIEYqYsiCO9r2qfgItp0GsKTzZZtuOmr+9g4JBu0b5HGQsbDRdh0NR/lnQwsI11L6UOb1p9VxQ1wEV5NaXrosqRlmrpDJOHKJL4vU0o9OEFX7lBlWlpTUjhXM2TtEE/gKNvybH1TSR2SJrAV6NpmG3QbMtjJxmky9SpetsyPNRqm6uwzDPcp1sOXVHhe1yHgMoLwgebjvWIZD1lsahkJd/TG7hy2KD4sqmlXL1wmINyh+QCbbEw7ULg+PJZgKYaJKByJ5IikRV3GxAjrpmNxJ6KGw3ReUaFwu01ZGlGMfVP1RLEVIyyHMEszH23gg0BwnejMX93V1ljLCXWQKPaRvgGiJBEj6MKpMZZqHAbOlKCGQGviNdxiXV6/KIuTem1DUQjLbMVgJGFGzHDVibwgFT7RWMmqJMvEZt0fSX7PQuqOJwiF711Ph921MfpDOpPhOKVp2Esq/KCzDr7cBnlDN5dIFopwKRxGKjylE0MQfmz2VHAmcGKcJPypEWWdq9dZcO/XWjfn9FYxGnmFl7oxk+LyQOFIuLYgiUmYEIQXkWvYS6oJfcr+HrcorZh3GmLEul0IK9orOBR55+wKDo4J7/KK5Zesh6+ghktiU4kIW3mhgiLAFiAaXb1EWJfJ0egKhvGZlZjNX/gECvehCFhF+ihcffVaH6xJSLQL/9CgXk1HPJ2gibDrakm4tVVnwqMhlCThn0Z1EQov5WoD2IoYuBy4CmPvcUoWw1E/TkjQLsV3tYzeXO43kogh+ucU7URf57a3WXzu3TbxLUySJtwTnRXU3tIw6NnOV9CiCNiEXUs9GC4JbyaxHM4jFoSnOcWI877Yknji5Wv6BOFZnht0J7AaDFFrZQ0XowgkOp/RhzbObDQeRlr5EOamne2YGc0elmlnNwv7vuJuDWrRIwi/8WXNKAppnlyShHad674Fz2o+SsBnCFEU2BfVipNLQb9P6bWkt4vGWoTCl3zmkW+cQJFolRgDYd8ROyjDvNrk145v4csvwx15grOOuWAoxKgXNCpXMSq6uoP/J4R3BeGrKHPxVw4ohR++/98nRQc1O3ORiNAMSZPYPC3Ai+EQXgyH8GI4hBfDIbwYDuHFcAgvhkN4MRzCi+EQXgyH8GI4hBcjLzfBDfDaupaDW3g4WcBbhuuieDEcEsWL4Q5hnpOfMzwej8fj8Xg8Ho/H4/GgyPwHN+MBWXHaP7AAAAAASUVORK5CYII="/>\n</defs>\n</svg>\n'}),e("span",{class:"NoPowerTitle"},u("nothingHere",this.language)),e("div",{class:"NoPowerDescription"},e("span",null,u("noPowerUps")),e("span",null,u("gotoShop"))),e("div",null)))}handleDataConfigChange(){this.loadData().catch(console.error)}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleNewTranslations(){c(this.translationUrl)}async componentWillLoad(){this.translationUrl&&await c(this.translationUrl),this.setLimit(),this.pageLimitSelectOptions=this.pageLimitOptions.split(",").map((t=>({label:t,value:t}))),this.loadData().catch(console.error)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.abortController&&this.abortController.abort(),this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.gameObservers.forEach((t=>t.disconnect())),this.gameObservers.clear()}static get assetsDirs(){return["assets"]}static get watchers(){return{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData","handleDataConfigChange"],endpoint:["loadData","handleDataConfigChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};v.style=":host{display:block;font-family:inherit;--game-amount-line:4}@media screen and (max-width: 768px){.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:32%}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{padding:8px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{margin:8px}}@media screen and (max-width: 470px){.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:45%}.PowerUpsContainer .PowerUps .PowerUpItem.Card{max-height:600px;height:fit-content;flex-direction:column}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft{gap:10px;min-width:320px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{height:51%;overflow:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{width:auto;margin:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft .Game,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight .Game{width:45%}}.PowerUpsContainer{font-size:0.95rem;display:flex;flex-direction:column;min-height:500px}.PowerUpsContainer .EmptyPowerups{align-items:center;justify-content:center;font-weight:400;font-size:1.2em;line-height:24px;text-align:center;vertical-align:middle;width:max-content;margin:auto;display:flex;flex-direction:column;padding:50px}.PowerUpsContainer .EmptyPowerups .Icon,.PowerUpsContainer .EmptyPowerups .NoPowerTitle{text-align:center}.PowerUpsContainer .EmptyPowerups .Icon svg,.PowerUpsContainer .EmptyPowerups .NoPowerTitle svg{width:40px}.PowerUpsContainer .EmptyPowerups .NoPowerTitle{font-size:1.2em;font-weight:bold;margin:10px}.PowerUpsContainer .PowerUps{min-height:60vh;width:100%;gap:12px;display:flex;flex-direction:column}.PowerUpsContainer .PowerUps time-count{margin-left:3px}.PowerUpsContainer .PowerUps .Card{width:100%;max-height:307px;gap:12px;border-radius:12px;border:2px solid var(--emw--button-border-color-secondary, rgba(188, 252, 177, 0.0509803922));display:flex;flex-direction:row}.PowerUpsContainer .PowerUps .Card .CardLeft,.PowerUpsContainer .PowerUps .Card .CardRight{display:flex;flex-direction:column}.PowerUpsContainer .PowerUps .Card .CardLeft{padding:20px;width:35%;display:flex;min-width:339px;flex-direction:column;justify-content:space-between}.PowerUpsContainer .PowerUps .Card .CardLeft .MainInfo{display:flex;flex-direction:column;gap:12px}.PowerUpsContainer .PowerUps .Card .CardRight{padding:10px}.PowerUpsContainer .PowerUps .Card .Description{color:var(--emw--color-gray-150, #c8d6ce);line-height:1.2rem;flex:1;font-size:small;margin-top:8px}.PowerUpsContainer .PowerUps .Card .CardLeft .DisplayName{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;height:22px;gap:12px;font-size:large;font-family:var(--emw--font-family-primary, \"Montserrat\", sans-serif)}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier{text-transform:uppercase;font-size:smaller;gap:10px;display:flex;color:var(--emw--color-gray-dark, #727672)}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Label{text-transform:uppercase}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Highlighted{color:transparent;-webkit-background-clip:text;background-clip:text;background-image:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange2, #E0A84E) 100%)}.PowerUpsContainer .PowerUps .Card .CardLeft .ExpireCount,.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{display:inline-block;-webkit-background-clip:text;background-clip:text}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{color:var(--emw--color-powup-light-green, #18CE51);text-transform:uppercase;background-image:linear-gradient(180deg, var(--emw--color-powup-green, #24B24E) 0%, var(--emw--color-powup-light-green, #18CE51) 100%);font-size:0.8em;font-weight:bold}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC a{text-decoration:none}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC span{cursor:pointer}.PowerUpsContainer .PowerUps .Card .GamesContent{margin:20px;flex:1;gap:12px;display:flex;border-radius:8px;border:2px solid var(--emw--color-powup-light-green-0D, rgba(188, 252, 177, 0.0509803922))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle{display:flex;flex-direction:row}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .Title2{text-transform:capitalize}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .GamesAmount{opacity:0.8}.PowerUpsContainer .PowerUps .Card .GamesContent .GameTitleTip{color:var(--emw--color-powup-gray-green, #C8D6CE);font-size:0.8rem}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList{display:flex;justify-content:center;flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--emw--background-gray-color, gray) transparent}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList::-webkit-scrollbar-track{background-color:transparent;border-radius:5px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games{padding:0;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;gap:calc(30px / (var(--game-amount-line) - 1))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:calc((100% - 30px) / var(--game-amount-line));position:relative;min-width:132px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game .GameMask{display:none;transition:display;transition-duration:0.2s;position:absolute;width:70%;height:100%}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .mask-filter{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover img{opacity:0.4;filter:blur(1.5px)}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameStartBtn{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameMask{mix-blend-mode:screen;background-color:var(--emw--color-powup-green, #24B24E);display:flex;justify-content:center;align-items:center;position:absolute;width:100%;left:0;height:100%;top:0;border-radius:8px}.PowerUpsContainer .Pagination{display:flex;justify-content:center}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem.Active,.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem:hover{color:#00B74F;border:2px solid #00B74F}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem{background:transparent;border:2px solid rgba(188, 252, 177, 0.0509803922);border-radius:36px;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.PowerUpsContainer .Pagination .PageNavigation .PageArrow{color:transparent}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.PrePage.Disabled,.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage.Disabled{cursor:default;background-image:url(\"data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.25592 0.244078C7.58136 0.569515 7.58136 1.09715 7.25592 1.42259L2.84518 5.83333H12.5C12.9602 5.83333 13.3333 6.20643 13.3333 6.66667C13.3333 7.1269 12.9602 7.5 12.5 7.5H2.84518L7.25592 11.9107C7.58136 12.2362 7.58136 12.7638 7.25592 13.0893C6.93049 13.4147 6.40285 13.4147 6.07741 13.0893L0.244078 7.25592C-0.0813592 6.93049 -0.0813592 6.40285 0.244078 6.07741L6.07741 0.244078C6.40285 -0.0813592 6.93049 -0.0813592 7.25592 0.244078Z' fill='gray'/%3E%3C/svg%3E\")}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.PrePage,.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage{background-image:url(\"data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.25592 0.244078C7.58136 0.569515 7.58136 1.09715 7.25592 1.42259L2.84518 5.83333H12.5C12.9602 5.83333 13.3333 6.20643 13.3333 6.66667C13.3333 7.1269 12.9602 7.5 12.5 7.5H2.84518L7.25592 11.9107C7.58136 12.2362 7.58136 12.7638 7.25592 13.0893C6.93049 13.4147 6.40285 13.4147 6.07741 13.0893L0.244078 7.25592C-0.0813592 6.93049 -0.0813592 6.40285 0.244078 6.07741L6.07741 0.244078C6.40285 -0.0813592 6.93049 -0.0813592 7.25592 0.244078Z' fill='white'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center;display:inherit;width:fit-content;padding:0 15px}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage{rotate:180deg}.PowerUpsContainer .GameStartBtn{width:98px;height:22px;border-radius:8px;opacity:1;padding:4px 5px;background:linear-gradient(180deg, #03832D 0%, #4DC071 100%);border:1px solid #FFFFFF;display:flex;align-items:center;justify-content:space-between;cursor:pointer}.PowerUpsContainer .GameStartBtn .PlayIcon{background-image:url('data:image/svg+xml;charset=utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"11\" height=\"11\" viewBox=\"0 0 11 11\" fill=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.5 1C3.01472 1 1 3.01472 1 5.5C1 7.98528 3.01472 10 5.5 10C7.98528 10 10 7.98528 10 5.5C10 3.01472 7.98528 1 5.5 1ZM0 5.5C0 2.46243 2.46243 0 5.5 0C8.53757 0 11 2.46243 11 5.5C11 8.53757 8.53757 11 5.5 11C2.46243 11 0 8.53757 0 5.5ZM5.12255 3.21652C5.12728 3.21956 5.13199 3.22259 5.13668 3.22561L7.49698 4.74294C7.50129 4.74571 7.50562 4.74849 7.50998 4.75129C7.58551 4.79982 7.66805 4.85285 7.73381 4.90413C7.80355 4.95852 7.91363 5.05446 7.97854 5.20809C8.0574 5.39471 8.0574 5.60529 7.97854 5.79191C7.91363 5.94554 7.80355 6.04148 7.73381 6.09587C7.66805 6.14715 7.58551 6.20018 7.50998 6.24871C7.50562 6.25151 7.50129 6.25429 7.49698 6.25706L5.13668 7.77439C5.13199 7.77741 5.12727 7.78045 5.12255 7.78348C5.03469 7.84 4.9423 7.89941 4.86094 7.94176C4.77909 7.98436 4.63056 8.05332 4.44657 8.04018C4.22957 8.02468 4.02999 7.91572 3.89961 7.74157C3.78907 7.59391 3.76675 7.43167 3.75832 7.33979C3.74995 7.24844 3.74997 7.1386 3.75 7.03414C3.75 7.02852 3.75 7.02292 3.75 7.01733V3.98267C3.75 3.97708 3.75 3.97148 3.75 3.96586C3.74997 3.8614 3.74995 3.75156 3.75832 3.66021C3.76675 3.56833 3.78907 3.40609 3.89961 3.25843C4.02999 3.08428 4.22957 2.97532 4.44657 2.95982C4.63056 2.94668 4.77909 3.01564 4.86094 3.05824C4.94231 3.10059 5.03469 3.16001 5.12255 3.21652ZM4.75 4.16583V6.83417L6.82537 5.5L4.75 4.16583Z\" fill=\"white\"/> <path d=\"M4.75 6.83417V4.16583L6.82537 5.5L4.75 6.83417Z\" fill=\"white\"/></svg>');height:16px;width:16px;background-repeat:no-repeat;background-size:contain}";const f={en:{min:"MIN",rounds:"Rounds",coins:"Coins",xp:"XP",consumed:"Used",expired:"Expired",enabled:"Enabled",active:"Active",nothingHere:"Nothing here -- yet!",noPowerUps:"No power-ups have been used at the moment.",gotoShop:"Go to shop to check power-ups availability."}},g=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{f[e]||(f[e]={});for(let i in t[e])f[e][i]=t[e][i]})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})),b=(t,e,i)=>{let s=f[void 0!==e&&e in f?e:"en"][t]||t;if(null==i?void 0:i.values)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s};
|
|
1
|
+
import{r as t,h as e,c as i,g as s,H as r}from"./index-907b0f95.js";import{P as o,a as n,s as a,b as l,c as h}from"./bonus-elevate-powerups-lobby-e4209b1a.js";export{B as bonus_elevate_powerups_lobby}from"./bonus-elevate-powerups-lobby-e4209b1a.js";const d={en:{min:"MIN",rounds:"Rounds",coins:"Coins",xp:"XP",expiresIn:"EXPIRES IN ",playNow:"Start Now!",nothingHere:"Nothing here -- yet!",noPowerUps:"No power-ups at the moment.",gotoShop:"Go to the shop to check power-ups availability.",termsCon:"Read full Terms & Conditions > ",games:"Games",seeAll:"See All",selectGameToActive:"Select the game to activate power-up",days:"days"}},c=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{d[e]||(d[e]={});for(let i in t[e])d[e][i]=t[e][i]})),e(!0)}))})),u=(t,e,i)=>{let s=d[void 0!==e&&e in d?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s},p={expand:"games",fields:"id,powerUpID,displayName,termsUrl,description,status,multiplier,boostingPeriod,currentTime,expireTime,games(id,gameId,name,slug,thumbnail)",status:`${o.ACTIVE},${o.ACTIVATED}`},m={expand:"games",fields:"id,powerUpID,games(id,gameId,slug,name,thumbnail)"},v=class{constructor(e){t(this,e),this.tableId="powerups",this.gameObservers=new Map,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.session=void 0,this.limit=10,this.openTermsPage=!1,this.pageLimitOptions="10,25,50",this.pageLimitSelectOptions=[],this.isLoading=!0,this.powerups=[],this.offset=0,this.total=void 0,this.listIsExpanded={}}onReloadPageByType(t){const{offset:e,tableId:i}=t.detail;i===this.tableId&&(this.offset=e)}setLimit(){try{const t=this.pageLimitOptions.split(",").map((t=>parseInt(t)));t.includes(this.limit)||(this.limit=t[0])}catch(t){console.error("Error when parse PageLimitOptions",t),this.limit=10}}onPageLimitChangedHandler(t){var e;if("pageLimits"===(null===(e=t.detail)||void 0===e?void 0:e.name)){const e=parseInt(t.detail.value||"10");this.limit!=e&&(this.limit=e,this.offset=0)}}async loadData(){if(this.endpoint&&this.session&&this.pageLimitSelectOptions.length){this.isLoading=!0,this.abortController&&this.abortController.abort(),this.abortController=new AbortController;try{const t=new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=${this.offset},limit=${this.limit},games(limit=20,offset=0)`);let e={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET",signal:this.abortController.signal};Object.entries(p).forEach((([e,i])=>{t.searchParams.append(e,i)})),t.searchParams.append("language",this.language);const i=await fetch(t,e);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const{data:s,total:r}=await i.json();this.powerups=s,this.total=r}catch(t){"AbortError"!==t.name&&(console.error("Failed to load powerups history:",t),window.postMessage({type:"peHistoryLoaderError",error:t}))}finally{this.abortController.signal.aborted||(this.isLoading=!1)}}}onExpandGames(t){this.listIsExpanded[t.id]=!this.listIsExpanded[t.id],this.listIsExpanded=Object.assign({},this.listIsExpanded)}onGameClick(t){window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t.slug}})}onTermsUrlClick(t){window.postMessage({type:"onPowerupTermsUrlClicked",termsUrl:t.termsUrl,id:t.id},"*")}async loadMoreGames(t){var e;if(!(t.games.items.length>=t.games.total))try{const i=new URL(`${this.endpoint}/v1/elevate/powerups/available?pagination=games(limit=20,offset=${t.games.items.length})`),s={headers:{"x-SessionId":this.session}};i.searchParams.append("filter",`id=${t.powerUpID}`),Object.entries(m).forEach((([t,e])=>{i.searchParams.append(t,e)}));const r=await fetch(i.toString(),s);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const{data:o}=await r.json(),n=this.powerups.findIndex((e=>e.id===t.id));if(-1!==n){const t=Object.assign({},this.powerups[n]),i=null==o?void 0:o[0];if(i&&(null===(e=i.games)||void 0===e?void 0:e.items)){t.games.items=[...t.games.items,...i.games.items];const e=[...this.powerups];e[n]=t,this.powerups=e}}}catch(t){console.error("Failed to load more games:",t)}}initializeGamesObserver(t){let e=this.gameObservers.get(t.id);e&&e.disconnect(),e=new IntersectionObserver((i=>{i.forEach((i=>{i.isIntersecting&&(this.loadMoreGames(t),e.unobserve(i.target),this.gameObservers.delete(t.id))}))})),this.gameObservers.set(t.id,e),setTimeout((()=>{const i=this.stylingContainer.querySelector(`.PowerUpItem[data-powerup-id="${t.id}"] .Game:last-child`);i&&e.observe(i)}),200)}componentDidUpdate(){this.powerups.forEach((t=>{var e,i;(null===(e=t.games)||void 0===e?void 0:e.items.length)<(null===(i=t.games)||void 0===i?void 0:i.total)&&this.initializeGamesObserver(t)}))}render(){return e("div",{key:"06fccebd52868cb1e5526e95013b5f4eaeae5a80",class:"PowerUpsContainer",ref:t=>this.stylingContainer=t},this.isLoading?e("p",null,"Loading..."):this.total?[e("div",{class:"PowerUps"},this.powerups.map((t=>{var i,s;return e("div",{class:"PowerUpItem Card","data-powerup-id":t.id},e("div",{class:"CardLeft"},e("div",{class:"MainInfo"},e("div",{class:"DisplayName"}," ",t.displayName||"-"," "),e("div",{class:"Title2 PowerUpMultiplier"},e("span",{class:"BoostingPeriod"},e("span",{class:"Period"},t.boostingPeriod.minutes||t.boostingPeriod.numberOfRounds," "),u(t.boostingPeriod.mode===n.TIME_PERIOD?"min":"rounds",this.language)," "),e("span",{class:"Spliter"},"|"),e("span",{class:"Multiplier"},"X ",t.multiplier.coefficient," "),e("span",{class:"Spliter"},"|"),e("span",{class:"MultiplierMode"},u(t.multiplier.mode,this.language)," "),t.expireTime&&[e("span",{class:"Spliter"}," | "),e("span",{class:"ExpireCount"},e("time-count",{"expire-time":t.expireTime,language:this.language}))]),e("div",{class:"Description"},t.description)),e("div",{class:"TermsC"},this.openTermsPage?e("a",{href:t.termsUrl?t.termsUrl:"#",target:"_blank"},u("termsCon",this.language)):e("span",{onClick:()=>this.onTermsUrlClick(t)},u("termsCon",this.language)," "))),e("div",{class:"GamesContent CardRight"},e("div",{class:"GamesTitle"},e("div",{class:"TitleLeft"},e("span",{class:"Title2"}," ",u("games",this.language)),e("span",{class:"GamesAmount"}," ( ",(null===(i=t.games)||void 0===i?void 0:i.total)||0," ) ")),e("div",{class:"TitleRight ",onClick:()=>this.onExpandGames(t)},e("span",{class:"SeeAll"},u("seeAll",this.language)),e("div",{class:"SeeAllIcon "+(this.listIsExpanded&&this.listIsExpanded[t.id]?"Expanded":"Collapsed"),innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect x="23" y="23" width="22" height="22" rx="11" transform="rotate(-180 23 23)" fill="url(#paint0_linear_1504_33873)"/>\n<rect x="23" y="23" width="22" height="22" rx="11" transform="rotate(-180 23 23)" stroke="#083B17" stroke-width="2"/>\n<path d="M11 8L15 12L11 16" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n<defs>\n<linearGradient id="paint0_linear_1504_33873" x1="24" y1="36" x2="48" y2="36" gradientUnits="userSpaceOnUse">\n<stop stop-color="#24AA4D"/>\n<stop offset="1" stop-color="#113F21"/>\n</linearGradient>\n</defs>\n</svg>\n'}))),e("div",{class:"GameTitleTip"},u("selectGameToActive",this.language)),e("div",{class:"GamesList"},e("div",{class:"Games "+(this.listIsExpanded&&this.listIsExpanded[t.id]?"Expanded":"Collapsed")},null===(s=t.games)||void 0===s?void 0:s.items.map((t=>e("div",{class:"Game"},e("ui-image",{src:t.thumbnail}),e("div",{class:"GameMask",onClick:this.onGameClick.bind(this,t)},e("div",{class:"GameStartBtn"},e("div",{class:"PlayIcon"}),e("span",null,u("playNow",this.language)))))))))))}))),e("div",{class:"Pagination"},this.total&&[e("bonus-pagination-nav",{offset:this.offset,limit:this.limit,"secondary-arrows-active":!0,"table-id":this.tableId,total:this.total}),e("general-input",{"client-styling":"\n .pageLimits__input [part='input-field'] ::slotted([slot='value']:not([placeholder])) {\n\n text-align: center;\n }\n .pageLimits__input .select__input{background: transparent; width: 89px;\n vaadin-select-value-button{\n color: var(--vaadin-input-field-value-color, var(--emw--color-text));\n text-align: center;\n }\n }\n .pageLimits__input .select__input::part(toggle-button){\n color: var(--vaadin-input-field-value-color, var(--emw--color-text));\n right: 0px;\n }\n .pageLimits__input .select__input::part(input-field) {\n border-radius: 20px;\n background-color: transparent;\n border: 1px solid var(--emw--color-gray-100, #BCFCB10D);\n color: var(--emw--color-black, #000000);\n font-family: inherit;\n font-style: normal;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.5;\n padding: 5px;\n height: 34px;\n }",type:"dropdown",name:"pageLimits","display-name":"","default-value":this.limit,validation:{mandatory:!1},options:this.pageLimitSelectOptions,emitValue:!0,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl})])]:e("div",{class:"EmptyPowerups"},e("div",{class:"Icon",innerHTML:'<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<rect width="52" height="52" fill="url(#pattern0_1132_30534)"/>\n<defs>\n<pattern id="pattern0_1132_30534" patternContentUnits="objectBoundingBox" width="1" height="1">\n<use xlink:href="#image0_1132_30534" transform="scale(0.01)"/>\n</pattern>\n<image id="image0_1132_30534" width="100" height="100" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHlElEQVR4nO2daYwURRTH/4tnvPCI9xE1ahQTNZmp6gXRzar4wTtGvPWLUeIVPxgVNWbizqvZRdTAGoioEQwaFDWK0YBCvMUbJWJIBD8QOUIEowhEQFjzepu4WaZ6qnp6tqub+iX9hexUV/W/Xh3vvSoAj8fj8Xg8Ho/H4/F4ikapB8PLNYiyws2S8LBU6JEKU4TCNKkwWSjUhML9ZYWrRRfOPGUy9sm6zoWio4IDpMI1/NElYalU6LN5hMI2SVgoFUgqdI6djT2yblP+6ENbuYqLJGGmJGy0FSFWIMIqQZgoFUZk3Uz3qWBYmXC5VPg2TRFinvmS0J51s51EKnQKws9DJMRgq5kjqzgp62/gBOcoHC4VXs5CiEGibBaERzsq2BO7K6KK84XCykQfUOGvaGibJxVms6hC4Q0ehiJL25Kw3M9kD47D7oYkPBCugEw/FmGFJEwVCteafDDu6SWF06XCOKnwqiBssBDmd1nFBdgtqGAY7xcMe+u2aDjr5N8189pSBfsJhRsF4VNDUbaw+Ci8GISZBuP5v5LwXKsmWqlwnlD4yECU7WxhKCqSMNVgaPom6EZpKOrDFiMJaxqJUq7iOhQNSag0aji7PYZ6lROu8ghzDYavC1EURA2XScKOGKvYyH+T8VBabTjRF2H1Va7ieElYFzNxr3dlt1wm3BXNG9olce73KZKwIKaBf7PnFg4RiRJnKY8gr4STZsySNlAYAweJPMM6QTYF3TgReUNWcFCDFcyDcHuvNC9mWT4HeUMojI8RYx672OEwIys4Iq5DlQgSeaGjgn11jRGEzeVunIwcEEYl9UPu28gLcROjIDxmWx6HYjlimDTaF/Z2hek8jFr9sA9tkvCxZqm+I+jCGcgDugCTUFg/agIOtCkrchCujsqYbbvsjIaen6LO8N3obhxi8/uyQkfM0NsD1+HQaIx1PG5rGUJh7aAyZplaSmQZSwb17IW2lhK65Ot3sJXOx+j5o2sE2d5OOLYZMWxEqStGQlFEFTfpOhlbEFxGKnyhqfx80zJ4WBKEZXEbtDhRYsX4/5luWp+zJmJ/3sRqyumC0yk7hK2aio+zKUvUMDKKClqJYijGEv47q/oQXtdY2+dwFfaIaj9eDadZl2cpSqvEiNp2p0aQrSMq2BsuIhXu1lR6TdIyTUUZNQHHtEqMRosVZ5e/ktCrEWRBM+WaiGKQUJdYjJ3zWkzixFVwEUF4T1PhKU2XbSJKi8TYiS6VlXOJ4SI8wbXSZS2SiZKKGEyY6VjfOqtwEUFYrOlB96b1Do63C8IfRmIQlpYIR6f1bkF4SzOHTYKLSIXlmo9zW5rvCWq4wkCMjTzRp/leXcaMILwAF9Hl5rKzESkx0Ddl8Fj7vpLsRYTCM3ARqfC1pgc9lIEYqYsiCO9r2qfgItp0GsKTzZZtuOmr+9g4JBu0b5HGQsbDRdh0NR/lnQwsI11L6UOb1p9VxQ1wEV5NaXrosqRlmrpDJOHKJL4vU0o9OEFX7lBlWlpTUjhXM2TtEE/gKNvybH1TSR2SJrAV6NpmG3QbMtjJxmky9SpetsyPNRqm6uwzDPcp1sOXVHhe1yHgMoLwgebjvWIZD1lsahkJd/TG7hy2KD4sqmlXL1wmINyh+QCbbEw7ULg+PJZgKYaJKByJ5IikRV3GxAjrpmNxJ6KGw3ReUaFwu01ZGlGMfVP1RLEVIyyHMEszH23gg0BwnejMX93V1ljLCXWQKPaRvgGiJBEj6MKpMZZqHAbOlKCGQGviNdxiXV6/KIuTem1DUQjLbMVgJGFGzHDVibwgFT7RWMmqJMvEZt0fSX7PQuqOJwiF711Ph921MfpDOpPhOKVp2Esq/KCzDr7cBnlDN5dIFopwKRxGKjylE0MQfmz2VHAmcGKcJPypEWWdq9dZcO/XWjfn9FYxGnmFl7oxk+LyQOFIuLYgiUmYEIQXkWvYS6oJfcr+HrcorZh3GmLEul0IK9orOBR55+wKDo4J7/KK5Zesh6+ghktiU4kIW3mhgiLAFiAaXb1EWJfJ0egKhvGZlZjNX/gECvehCFhF+ihcffVaH6xJSLQL/9CgXk1HPJ2gibDrakm4tVVnwqMhlCThn0Z1EQov5WoD2IoYuBy4CmPvcUoWw1E/TkjQLsV3tYzeXO43kogh+ucU7URf57a3WXzu3TbxLUySJtwTnRXU3tIw6NnOV9CiCNiEXUs9GC4JbyaxHM4jFoSnOcWI877Yknji5Wv6BOFZnht0J7AaDFFrZQ0XowgkOp/RhzbObDQeRlr5EOamne2YGc0elmlnNwv7vuJuDWrRIwi/8WXNKAppnlyShHad674Fz2o+SsBnCFEU2BfVipNLQb9P6bWkt4vGWoTCl3zmkW+cQJFolRgDYd8ROyjDvNrk145v4csvwx15grOOuWAoxKgXNCpXMSq6uoP/J4R3BeGrKHPxVw4ohR++/98nRQc1O3ORiNAMSZPYPC3Ai+EQXgyH8GI4hBfDIbwYDuHFcAgvhkN4MRzCi+EQXgyH8GI4hBcjLzfBDfDaupaDW3g4WcBbhuuieDEcEsWL4Q5hnpOfMzwej8fj8Xg8Ho/H4/GgyPwHN+MBWXHaP7AAAAAASUVORK5CYII="/>\n</defs>\n</svg>\n'}),e("span",{class:"NoPowerTitle"},u("nothingHere",this.language)),e("div",{class:"NoPowerDescription"},e("span",null,u("noPowerUps")),e("span",null,u("gotoShop"))),e("div",null)))}handleDataConfigChange(){this.loadData().catch(console.error)}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleNewTranslations(){c(this.translationUrl)}async componentWillLoad(){this.translationUrl&&await c(this.translationUrl),this.setLimit(),this.pageLimitSelectOptions=this.pageLimitOptions.split(",").map((t=>({label:t,value:t}))),this.loadData().catch(console.error)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.abortController&&this.abortController.abort(),this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.gameObservers.forEach((t=>t.disconnect())),this.gameObservers.clear()}static get assetsDirs(){return["assets"]}static get watchers(){return{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData","handleDataConfigChange"],endpoint:["loadData","handleDataConfigChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};v.style=":host{display:block;font-family:inherit;--game-amount-line:4}@media screen and (max-width: 768px){:host{--game-amount-line:3}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games{height:108px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:32%}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{padding:8px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft .GamesTitle .TitleRight,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight .GamesTitle .TitleRight{display:flex}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{margin:8px}}@media screen and (max-width: 470px){:host{--game-amount-line:2}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games{height:108px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:45%}.PowerUpsContainer .PowerUps .PowerUpItem.Card{max-height:600px;height:fit-content;flex-direction:column}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft{gap:10px;min-width:320px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{width:auto;height:51%;overflow:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{margin:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft .Game,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight .Game{width:45%}}.PowerUpsContainer{font-size:0.95rem;display:flex;flex-direction:column;min-height:500px}.PowerUpsContainer .EmptyPowerups{align-items:center;justify-content:center;font-weight:400;font-size:1.2em;line-height:24px;text-align:center;vertical-align:middle;width:max-content;margin:auto;display:flex;flex-direction:column;padding:50px}.PowerUpsContainer .EmptyPowerups .Icon,.PowerUpsContainer .EmptyPowerups .NoPowerTitle{text-align:center}.PowerUpsContainer .EmptyPowerups .Icon svg,.PowerUpsContainer .EmptyPowerups .NoPowerTitle svg{width:40px}.PowerUpsContainer .EmptyPowerups .NoPowerTitle{font-size:1.2em;font-weight:bold;margin:10px}.PowerUpsContainer .PowerUps{min-height:60vh;width:100%;gap:12px;display:flex;flex-direction:column}.PowerUpsContainer .PowerUps time-count{margin-left:3px}.PowerUpsContainer .PowerUps .Card{width:100%;max-height:307px;gap:12px;border-radius:12px;border:2px solid var(--emw--button-border-color-secondary, rgba(188, 252, 177, 0.0509803922));display:flex;flex-direction:row}.PowerUpsContainer .PowerUps .Card .CardLeft,.PowerUpsContainer .PowerUps .Card .CardRight{display:flex;flex-direction:column}.PowerUpsContainer .PowerUps .Card .CardLeft{padding:20px;width:35%;display:flex;min-width:339px;flex-direction:column;justify-content:space-between}.PowerUpsContainer .PowerUps .Card .CardLeft .MainInfo{display:flex;flex-direction:column;gap:12px}.PowerUpsContainer .PowerUps .Card .CardRight{padding:10px}.PowerUpsContainer .PowerUps .Card .Description{color:var(--emw--color-gray-150, #c8d6ce);line-height:1.2rem;flex:1;font-size:small;margin-top:8px}.PowerUpsContainer .PowerUps .Card .CardLeft .DisplayName{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;height:22px;gap:12px;font-size:large;font-family:var(--emw--font-family-primary, \"Montserrat\", sans-serif)}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier{text-transform:uppercase;font-size:smaller;gap:10px;display:flex;color:var(--emw--color-gray-dark, #727672)}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Label{text-transform:uppercase}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Highlighted{color:transparent;-webkit-background-clip:text;background-clip:text;background-image:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange2, #E0A84E) 100%)}.PowerUpsContainer .PowerUps .Card .CardLeft .ExpireCount,.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{display:inline-block;-webkit-background-clip:text;background-clip:text}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{color:var(--emw--color-powup-light-green, #18CE51);text-transform:uppercase;background-image:linear-gradient(180deg, var(--emw--color-powup-green, #24B24E) 0%, var(--emw--color-powup-light-green, #18CE51) 100%);font-size:0.8em;font-weight:bold}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC a{text-decoration:none}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC span{cursor:pointer}.PowerUpsContainer .PowerUps .Card .GamesContent{margin:20px;flex:1;gap:12px;display:flex;border-radius:8px;border:2px solid var(--emw--color-powup-light-green-0D, rgba(188, 252, 177, 0.0509803922))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .TitleRight{display:none;gap:5px;align-items:center}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .SeeAllIcon{transition:rotate 200ms ease-in-out}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .SeeAllIcon.Collapse{rotate:0deg}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .SeeAllIcon.Expanded{rotate:-90deg}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .Title2{text-transform:capitalize}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .GamesAmount{opacity:0.8}.PowerUpsContainer .PowerUps .Card .GamesContent .GameTitleTip{color:var(--emw--color-powup-gray-green, #C8D6CE);font-size:0.8rem}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList{display:flex;justify-content:flex-start;flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--emw--background-gray-color, gray) transparent}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList::-webkit-scrollbar-track{background-color:transparent;border-radius:5px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games{transition:height 200ms ease-in-out;padding:0;display:flex;align-items:flex-start;align-content:flex-start;justify-content:flex-start;flex-wrap:wrap;gap:calc(30px / (var(--game-amount-line) - 1))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games.Expanded{height:400px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games.Collapse{height:108px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:calc((100% - 30px) / var(--game-amount-line));position:relative;min-width:132px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game .GameMask{display:none;transition:display;transition-duration:0.2s;position:absolute;width:70%;height:100%}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .mask-filter{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover img{opacity:0.4;filter:blur(1.5px)}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameStartBtn{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameMask{mix-blend-mode:screen;background-color:var(--emw--color-powup-green, #24B24E);display:flex;justify-content:center;align-items:center;position:absolute;width:100%;left:0;height:100%;top:0;border-radius:8px}.PowerUpsContainer .Pagination{display:flex;justify-content:center}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem.Active,.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem:hover{color:#00B74F;border:2px solid #00B74F}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem{background:transparent;border:2px solid rgba(188, 252, 177, 0.0509803922);border-radius:36px;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.PowerUpsContainer .Pagination .PageNavigation .PageArrow{color:transparent}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.PrePage.Disabled,.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage.Disabled{cursor:default;background-image:url(\"data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.25592 0.244078C7.58136 0.569515 7.58136 1.09715 7.25592 1.42259L2.84518 5.83333H12.5C12.9602 5.83333 13.3333 6.20643 13.3333 6.66667C13.3333 7.1269 12.9602 7.5 12.5 7.5H2.84518L7.25592 11.9107C7.58136 12.2362 7.58136 12.7638 7.25592 13.0893C6.93049 13.4147 6.40285 13.4147 6.07741 13.0893L0.244078 7.25592C-0.0813592 6.93049 -0.0813592 6.40285 0.244078 6.07741L6.07741 0.244078C6.40285 -0.0813592 6.93049 -0.0813592 7.25592 0.244078Z' fill='gray'/%3E%3C/svg%3E\")}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.PrePage,.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage{background-image:url(\"data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.25592 0.244078C7.58136 0.569515 7.58136 1.09715 7.25592 1.42259L2.84518 5.83333H12.5C12.9602 5.83333 13.3333 6.20643 13.3333 6.66667C13.3333 7.1269 12.9602 7.5 12.5 7.5H2.84518L7.25592 11.9107C7.58136 12.2362 7.58136 12.7638 7.25592 13.0893C6.93049 13.4147 6.40285 13.4147 6.07741 13.0893L0.244078 7.25592C-0.0813592 6.93049 -0.0813592 6.40285 0.244078 6.07741L6.07741 0.244078C6.40285 -0.0813592 6.93049 -0.0813592 7.25592 0.244078Z' fill='white'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center;display:inherit;width:fit-content;padding:0 15px}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage{rotate:180deg}.PowerUpsContainer .GameStartBtn{width:98px;height:22px;border-radius:8px;opacity:1;padding:4px 5px;background:linear-gradient(180deg, #03832D 0%, #4DC071 100%);border:1px solid #FFFFFF;display:flex;align-items:center;justify-content:space-between;cursor:pointer}.PowerUpsContainer .GameStartBtn .PlayIcon{background-image:url('data:image/svg+xml;charset=utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"11\" height=\"11\" viewBox=\"0 0 11 11\" fill=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.5 1C3.01472 1 1 3.01472 1 5.5C1 7.98528 3.01472 10 5.5 10C7.98528 10 10 7.98528 10 5.5C10 3.01472 7.98528 1 5.5 1ZM0 5.5C0 2.46243 2.46243 0 5.5 0C8.53757 0 11 2.46243 11 5.5C11 8.53757 8.53757 11 5.5 11C2.46243 11 0 8.53757 0 5.5ZM5.12255 3.21652C5.12728 3.21956 5.13199 3.22259 5.13668 3.22561L7.49698 4.74294C7.50129 4.74571 7.50562 4.74849 7.50998 4.75129C7.58551 4.79982 7.66805 4.85285 7.73381 4.90413C7.80355 4.95852 7.91363 5.05446 7.97854 5.20809C8.0574 5.39471 8.0574 5.60529 7.97854 5.79191C7.91363 5.94554 7.80355 6.04148 7.73381 6.09587C7.66805 6.14715 7.58551 6.20018 7.50998 6.24871C7.50562 6.25151 7.50129 6.25429 7.49698 6.25706L5.13668 7.77439C5.13199 7.77741 5.12727 7.78045 5.12255 7.78348C5.03469 7.84 4.9423 7.89941 4.86094 7.94176C4.77909 7.98436 4.63056 8.05332 4.44657 8.04018C4.22957 8.02468 4.02999 7.91572 3.89961 7.74157C3.78907 7.59391 3.76675 7.43167 3.75832 7.33979C3.74995 7.24844 3.74997 7.1386 3.75 7.03414C3.75 7.02852 3.75 7.02292 3.75 7.01733V3.98267C3.75 3.97708 3.75 3.97148 3.75 3.96586C3.74997 3.8614 3.74995 3.75156 3.75832 3.66021C3.76675 3.56833 3.78907 3.40609 3.89961 3.25843C4.02999 3.08428 4.22957 2.97532 4.44657 2.95982C4.63056 2.94668 4.77909 3.01564 4.86094 3.05824C4.94231 3.10059 5.03469 3.16001 5.12255 3.21652ZM4.75 4.16583V6.83417L6.82537 5.5L4.75 4.16583Z\" fill=\"white\"/> <path d=\"M4.75 6.83417V4.16583L6.82537 5.5L4.75 6.83417Z\" fill=\"white\"/></svg>');height:16px;width:16px;background-repeat:no-repeat;background-size:contain}";const f={en:{min:"MIN",rounds:"Rounds",coins:"Coins",xp:"XP",consumed:"Used",expired:"Expired",enabled:"Enabled",active:"Active",nothingHere:"Nothing here -- yet!",noPowerUps:"No power-ups have been used at the moment.",gotoShop:"Go to shop to check power-ups availability."}},g=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{f[e]||(f[e]={});for(let i in t[e])f[e][i]=t[e][i]})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})),b=(t,e,i)=>{let s=f[void 0!==e&&e in f?e:"en"][t]||t;if(null==i?void 0:i.values)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s};
|
|
2
2
|
//! moment.js
|
|
3
3
|
//! version : 2.29.4
|
|
4
4
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
5
5
|
//! license : MIT
|
|
6
6
|
//! momentjs.com
|
|
7
|
-
var w,y;function x(){return w.apply(null,arguments)}function _(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function k(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function S(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(C(t,e))return!1;return!0}function E(t){return void 0===t}function P(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function A(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function I(t,e){var i,s=[],r=t.length;for(i=0;i<r;++i)s.push(e(t[i],i));return s}function M(t,e){for(var i in e)C(e,i)&&(t[i]=e[i]);return C(e,"toString")&&(t.toString=e.toString),C(e,"valueOf")&&(t.valueOf=e.valueOf),t}function D(t,e,i,s){return Xe(t,e,i,s,!0).utc()}function z(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function T(t){if(null==t._isValid){var e=z(t),i=y.call(e.parsedDateParts,(function(t){return null!=t})),s=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(s=s&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return s;t._isValid=s}return t._isValid}function N(t){var e=D(NaN);return null!=t?M(z(e),t):z(e).userInvalidated=!0,e}y=Array.prototype.some?Array.prototype.some:function(t){var e,i=Object(this),s=i.length>>>0;for(e=0;e<s;e++)if(e in i&&t.call(this,i[e],e,i))return!0;return!1};var F=x.momentProperties=[],O=!1;function L(t,e){var i,s,r,o=F.length;if(E(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),E(e._i)||(t._i=e._i),E(e._f)||(t._f=e._f),E(e._l)||(t._l=e._l),E(e._strict)||(t._strict=e._strict),E(e._tzm)||(t._tzm=e._tzm),E(e._isUTC)||(t._isUTC=e._isUTC),E(e._offset)||(t._offset=e._offset),E(e._pf)||(t._pf=z(e)),E(e._locale)||(t._locale=e._locale),o>0)for(i=0;i<o;i++)E(r=e[s=F[i]])||(t[s]=r);return t}function U(t){L(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===O&&(O=!0,x.updateOffset(this),O=!1)}function j(t){return t instanceof U||null!=t&&null!=t._isAMomentObject}function Y(t){!1===x.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function R(t,e){var i=!0;return M((function(){if(null!=x.deprecationHandler&&x.deprecationHandler(null,t),i){var s,r,o,n=[],a=arguments.length;for(r=0;r<a;r++){if(s="","object"==typeof arguments[r]){for(o in s+="\n["+r+"] ",arguments[0])C(arguments[0],o)&&(s+=o+": "+arguments[0][o]+", ");s=s.slice(0,-2)}else s=arguments[r];n.push(s)}Y(t+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),i=!1}return e.apply(this,arguments)}),e)}var V,H={};function G(t,e){null!=x.deprecationHandler&&x.deprecationHandler(t,e),H[t]||(Y(e),H[t]=!0)}function $(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function W(t,e){var i,s=M({},t);for(i in e)C(e,i)&&(k(t[i])&&k(e[i])?(s[i]={},M(s[i],t[i]),M(s[i],e[i])):null!=e[i]?s[i]=e[i]:delete s[i]);for(i in t)C(t,i)&&!C(e,i)&&k(t[i])&&(s[i]=M({},s[i]));return s}function q(t){null!=t&&this.set(t)}function K(t,e,i){var s=""+Math.abs(t);return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,e-s.length)).toString().substr(1)+s}x.suppressDeprecationWarnings=!1,x.deprecationHandler=null,V=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)C(t,e)&&i.push(e);return i};var J=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,X=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Q={},Z={};function tt(t,e,i,s){var r=s;"string"==typeof s&&(r=function(){return this[s]()}),t&&(Z[t]=r),e&&(Z[e[0]]=function(){return K(r.apply(this,arguments),e[1],e[2])}),i&&(Z[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function et(t,e){return t.isValid()?(e=it(e,t.localeData()),Q[e]=Q[e]||function(t){var e,i,s,r=t.match(J);for(e=0,i=r.length;e<i;e++)r[e]=Z[r[e]]?Z[r[e]]:(s=r[e]).match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"");return function(e){var s,o="";for(s=0;s<i;s++)o+=$(r[s])?r[s].call(e,t):r[s];return o}}(e),Q[e](t)):t.localeData().invalidDate()}function it(t,e){var i=5;function s(t){return e.longDateFormat(t)||t}for(X.lastIndex=0;i>=0&&X.test(t);)t=t.replace(X,s),X.lastIndex=0,i-=1;return t}var st={};function rt(t,e){var i=t.toLowerCase();st[i]=st[i+"s"]=st[e]=t}function ot(t){return"string"==typeof t?st[t]||st[t.toLowerCase()]:void 0}function nt(t){var e,i,s={};for(i in t)C(t,i)&&(e=ot(i))&&(s[e]=t[i]);return s}var at={};function lt(t,e){at[t]=e}function ht(t){return t%4==0&&t%100!=0||t%400==0}function dt(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function ct(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=dt(e)),i}function ut(t,e){return function(i){return null!=i?(mt(this,t,i),x.updateOffset(this,e),this):pt(this,t)}}function pt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function mt(t,e,i){t.isValid()&&!isNaN(i)&&("FullYear"===e&&ht(t.year())&&1===t.month()&&29===t.date()?(i=ct(i),t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),Kt(i,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](i))}var vt,ft=/\d/,gt=/\d\d/,bt=/\d{3}/,wt=/\d{4}/,yt=/[+-]?\d{6}/,xt=/\d\d?/,_t=/\d\d\d\d?/,kt=/\d\d\d\d\d\d?/,Ct=/\d{1,3}/,St=/\d{1,4}/,Et=/[+-]?\d{1,6}/,Pt=/\d+/,At=/[+-]?\d+/,It=/Z|[+-]\d\d:?\d\d/gi,Mt=/Z|[+-]\d\d(?::?\d\d)?/gi,Dt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function zt(t,e,i){vt[t]=$(e)?e:function(t){return t&&i?i:e}}function Tt(t,e){return C(vt,t)?vt[t](e._strict,e._locale):new RegExp(Nt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,i,s,r){return e||i||s||r}))))}function Nt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}vt={};var Ft={};function Ot(t,e){var i,s,r=e;for("string"==typeof t&&(t=[t]),P(e)&&(r=function(t,i){i[e]=ct(t)}),s=t.length,i=0;i<s;i++)Ft[t[i]]=r}function Lt(t,e){Ot(t,(function(t,i,s,r){s._w=s._w||{},e(t,s._w,s,r)}))}function Bt(t,e,i){null!=e&&C(Ft,t)&&Ft[t](e,i._a,i,t)}var Ut,jt=0,Yt=1,Rt=2,Vt=3,Ht=4,Gt=5,$t=6,Wt=7,qt=8;function Kt(t,e){if(isNaN(t)||isNaN(e))return NaN;var i=(e%12+12)%12;return t+=(e-i)/12,1===i?ht(t)?29:28:31-i%7%2}Ut=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},tt("M",["MM",2],"Mo",(function(){return this.month()+1})),tt("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),tt("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),rt("month","M"),lt("month",8),zt("M",xt),zt("MM",xt,gt),zt("MMM",(function(t,e){return e.monthsShortRegex(t)})),zt("MMMM",(function(t,e){return e.monthsRegex(t)})),Ot(["M","MM"],(function(t,e){e[Yt]=ct(t)-1})),Ot(["MMM","MMMM"],(function(t,e,i,s){var r=i._locale.monthsParse(t,s,i._strict);null!=r?e[Yt]=r:z(i).invalidMonth=t}));var Jt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Xt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Qt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Zt=Dt,te=Dt;function ee(t,e,i){var s,r,o,n=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)o=D([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(o,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(r=Ut.call(this._shortMonthsParse,n))?r:null:-1!==(r=Ut.call(this._longMonthsParse,n))?r:null:"MMM"===e?-1!==(r=Ut.call(this._shortMonthsParse,n))||-1!==(r=Ut.call(this._longMonthsParse,n))?r:null:-1!==(r=Ut.call(this._longMonthsParse,n))||-1!==(r=Ut.call(this._shortMonthsParse,n))?r:null}function ie(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=ct(e);else if(!P(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),Kt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function se(t){return null!=t?(ie(this,t),x.updateOffset(this,!0),this):pt(this,"Month")}function re(){function t(t,e){return e.length-t.length}var e,i,s=[],r=[],o=[];for(e=0;e<12;e++)i=D([2e3,e]),s.push(this.monthsShort(i,"")),r.push(this.months(i,"")),o.push(this.months(i,"")),o.push(this.monthsShort(i,""));for(s.sort(t),r.sort(t),o.sort(t),e=0;e<12;e++)s[e]=Nt(s[e]),r[e]=Nt(r[e]);for(e=0;e<24;e++)o[e]=Nt(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function oe(t){return ht(t)?366:365}tt("Y",0,0,(function(){var t=this.year();return t<=9999?K(t,4):"+"+t})),tt(0,["YY",2],0,(function(){return this.year()%100})),tt(0,["YYYY",4],0,"year"),tt(0,["YYYYY",5],0,"year"),tt(0,["YYYYYY",6,!0],0,"year"),rt("year","y"),lt("year",1),zt("Y",At),zt("YY",xt,gt),zt("YYYY",St,wt),zt("YYYYY",Et,yt),zt("YYYYYY",Et,yt),Ot(["YYYYY","YYYYYY"],jt),Ot("YYYY",(function(t,e){e[jt]=2===t.length?x.parseTwoDigitYear(t):ct(t)})),Ot("YY",(function(t,e){e[jt]=x.parseTwoDigitYear(t)})),Ot("Y",(function(t,e){e[jt]=parseInt(t,10)})),x.parseTwoDigitYear=function(t){return ct(t)+(ct(t)>68?1900:2e3)};var ne=ut("FullYear",!0);function ae(t,e,i,s,r,o,n){var a;return t<100&&t>=0?(a=new Date(t+400,e,i,s,r,o,n),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,i,s,r,o,n),a}function le(t){var e,i;return t<100&&t>=0?((i=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function he(t,e,i){var s=7+e-i;return-(7+le(t,0,s).getUTCDay()-e)%7+s-1}function de(t,e,i,s,r){var o,n,a=1+7*(e-1)+(7+i-s)%7+he(t,s,r);return a<=0?n=oe(o=t-1)+a:a>oe(t)?(o=t+1,n=a-oe(t)):(o=t,n=a),{year:o,dayOfYear:n}}function ce(t,e,i){var s,r,o=he(t.year(),e,i),n=Math.floor((t.dayOfYear()-o-1)/7)+1;return n<1?s=n+ue(r=t.year()-1,e,i):n>ue(t.year(),e,i)?(s=n-ue(t.year(),e,i),r=t.year()+1):(r=t.year(),s=n),{week:s,year:r}}function ue(t,e,i){var s=he(t,e,i),r=he(t+1,e,i);return(oe(t)-s+r)/7}function pe(t,e){return t.slice(e,7).concat(t.slice(0,e))}tt("w",["ww",2],"wo","week"),tt("W",["WW",2],"Wo","isoWeek"),rt("week","w"),rt("isoWeek","W"),lt("week",5),lt("isoWeek",5),zt("w",xt),zt("ww",xt,gt),zt("W",xt),zt("WW",xt,gt),Lt(["w","ww","W","WW"],(function(t,e,i,s){e[s.substr(0,1)]=ct(t)})),tt("d",0,"do","day"),tt("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),tt("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),tt("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),tt("e",0,0,"weekday"),tt("E",0,0,"isoWeekday"),rt("day","d"),rt("weekday","e"),rt("isoWeekday","E"),lt("day",11),lt("weekday",11),lt("isoWeekday",11),zt("d",xt),zt("e",xt),zt("E",xt),zt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),zt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),zt("dddd",(function(t,e){return e.weekdaysRegex(t)})),Lt(["dd","ddd","dddd"],(function(t,e,i,s){var r=i._locale.weekdaysParse(t,s,i._strict);null!=r?e.d=r:z(i).invalidWeekday=t})),Lt(["d","e","E"],(function(t,e,i,s){e[s]=ct(t)}));var me="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),fe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ge=Dt,be=Dt,we=Dt;function ye(t,e,i){var s,r,o,n=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)o=D([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(o,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(r=Ut.call(this._weekdaysParse,n))?r:null:"ddd"===e?-1!==(r=Ut.call(this._shortWeekdaysParse,n))?r:null:-1!==(r=Ut.call(this._minWeekdaysParse,n))?r:null:"dddd"===e?-1!==(r=Ut.call(this._weekdaysParse,n))||-1!==(r=Ut.call(this._shortWeekdaysParse,n))||-1!==(r=Ut.call(this._minWeekdaysParse,n))?r:null:"ddd"===e?-1!==(r=Ut.call(this._shortWeekdaysParse,n))||-1!==(r=Ut.call(this._weekdaysParse,n))||-1!==(r=Ut.call(this._minWeekdaysParse,n))?r:null:-1!==(r=Ut.call(this._minWeekdaysParse,n))||-1!==(r=Ut.call(this._weekdaysParse,n))||-1!==(r=Ut.call(this._shortWeekdaysParse,n))?r:null}function xe(){function t(t,e){return e.length-t.length}var e,i,s,r,o,n=[],a=[],l=[],h=[];for(e=0;e<7;e++)i=D([2e3,1]).day(e),s=Nt(this.weekdaysMin(i,"")),r=Nt(this.weekdaysShort(i,"")),o=Nt(this.weekdays(i,"")),n.push(s),a.push(r),l.push(o),h.push(s),h.push(r),h.push(o);n.sort(t),a.sort(t),l.sort(t),h.sort(t),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i")}function _e(){return this.hours()%12||12}function ke(t,e){tt(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Ce(t,e){return e._meridiemParse}tt("H",["HH",2],0,"hour"),tt("h",["hh",2],0,_e),tt("k",["kk",2],0,(function(){return this.hours()||24})),tt("hmm",0,0,(function(){return""+_e.apply(this)+K(this.minutes(),2)})),tt("hmmss",0,0,(function(){return""+_e.apply(this)+K(this.minutes(),2)+K(this.seconds(),2)})),tt("Hmm",0,0,(function(){return""+this.hours()+K(this.minutes(),2)})),tt("Hmmss",0,0,(function(){return""+this.hours()+K(this.minutes(),2)+K(this.seconds(),2)})),ke("a",!0),ke("A",!1),rt("hour","h"),lt("hour",13),zt("a",Ce),zt("A",Ce),zt("H",xt),zt("h",xt),zt("k",xt),zt("HH",xt,gt),zt("hh",xt,gt),zt("kk",xt,gt),zt("hmm",_t),zt("hmmss",kt),zt("Hmm",_t),zt("Hmmss",kt),Ot(["H","HH"],Vt),Ot(["k","kk"],(function(t,e){var i=ct(t);e[Vt]=24===i?0:i})),Ot(["a","A"],(function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t})),Ot(["h","hh"],(function(t,e,i){e[Vt]=ct(t),z(i).bigHour=!0})),Ot("hmm",(function(t,e,i){var s=t.length-2;e[Vt]=ct(t.substr(0,s)),e[Ht]=ct(t.substr(s)),z(i).bigHour=!0})),Ot("hmmss",(function(t,e,i){var s=t.length-4,r=t.length-2;e[Vt]=ct(t.substr(0,s)),e[Ht]=ct(t.substr(s,2)),e[Gt]=ct(t.substr(r)),z(i).bigHour=!0})),Ot("Hmm",(function(t,e){var i=t.length-2;e[Vt]=ct(t.substr(0,i)),e[Ht]=ct(t.substr(i))})),Ot("Hmmss",(function(t,e){var i=t.length-4,s=t.length-2;e[Vt]=ct(t.substr(0,i)),e[Ht]=ct(t.substr(i,2)),e[Gt]=ct(t.substr(s))}));var Se,Ee=ut("Hours",!0),Pe={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Jt,monthsShort:Xt,week:{dow:0,doy:6},weekdays:me,weekdaysMin:fe,weekdaysShort:ve,meridiemParse:/[ap]\.?m?\.?/i},Ae={},Ie={};function Me(t,e){var i,s=Math.min(t.length,e.length);for(i=0;i<s;i+=1)if(t[i]!==e[i])return i;return s}function De(t){return t?t.toLowerCase().replace("_","-"):t}function ze(t){var e=null;if(void 0===Ae[t]&&"undefined"!=typeof module&&module&&module.exports&&function(t){return null!=t.match("^[^/\\\\]*$")}(t))try{e=Se._abbr,require("./locale/"+t),Te(e)}catch(e){Ae[t]=null}return Ae[t]}function Te(t,e){var i;return t&&((i=E(e)?Fe(t):Ne(t,e))?Se=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Se._abbr}function Ne(t,e){if(null!==e){var i,s=Pe;if(e.abbr=t,null!=Ae[t])G("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=Ae[t]._config;else if(null!=e.parentLocale)if(null!=Ae[e.parentLocale])s=Ae[e.parentLocale]._config;else{if(null==(i=ze(e.parentLocale)))return Ie[e.parentLocale]||(Ie[e.parentLocale]=[]),Ie[e.parentLocale].push({name:t,config:e}),null;s=i._config}return Ae[t]=new q(W(s,e)),Ie[t]&&Ie[t].forEach((function(t){Ne(t.name,t.config)})),Te(t),Ae[t]}return delete Ae[t],null}function Fe(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Se;if(!_(t)){if(e=ze(t))return e;t=[t]}return function(t){for(var e,i,s,r,o=0;o<t.length;){for(e=(r=De(t[o]).split("-")).length,i=(i=De(t[o+1]))?i.split("-"):null;e>0;){if(s=ze(r.slice(0,e).join("-")))return s;if(i&&i.length>=e&&Me(r,i)>=e-1)break;e--}o++}return Se}(t)}function Oe(t){var e,i=t._a;return i&&-2===z(t).overflow&&(e=i[Yt]<0||i[Yt]>11?Yt:i[Rt]<1||i[Rt]>Kt(i[jt],i[Yt])?Rt:i[Vt]<0||i[Vt]>24||24===i[Vt]&&(0!==i[Ht]||0!==i[Gt]||0!==i[$t])?Vt:i[Ht]<0||i[Ht]>59?Ht:i[Gt]<0||i[Gt]>59?Gt:i[$t]<0||i[$t]>999?$t:-1,z(t)._overflowDayOfYear&&(e<jt||e>Rt)&&(e=Rt),z(t)._overflowWeeks&&-1===e&&(e=Wt),z(t)._overflowWeekday&&-1===e&&(e=qt),z(t).overflow=e),t}var Le=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Be=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ue=/Z|[+-]\d\d(?::?\d\d)?/,je=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ye=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Re=/^\/?Date\((-?\d+)/i,Ve=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,He={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ge(t){var e,i,s,r,o,n,a=t._i,l=Le.exec(a)||Be.exec(a),h=je.length,d=Ye.length;if(l){for(z(t).iso=!0,e=0,i=h;e<i;e++)if(je[e][1].exec(l[1])){r=je[e][0],s=!1!==je[e][2];break}if(null==r)return void(t._isValid=!1);if(l[3]){for(e=0,i=d;e<i;e++)if(Ye[e][1].exec(l[3])){o=(l[2]||" ")+Ye[e][0];break}if(null==o)return void(t._isValid=!1)}if(!s&&null!=o)return void(t._isValid=!1);if(l[4]){if(!Ue.exec(l[4]))return void(t._isValid=!1);n="Z"}t._f=r+(o||"")+(n||""),Ke(t)}else t._isValid=!1}function $e(t){var e,i,s,r,o,n,a,l,h,d=Ve.exec(t._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(d){if(i=d[3],s=d[2],r=d[5],o=d[6],n=d[7],a=[(l=d[4],h=parseInt(l,10),h<=49?2e3+h:h<=999?1900+h:h),Xt.indexOf(i),parseInt(s,10),parseInt(r,10),parseInt(o,10)],n&&a.push(parseInt(n,10)),!function(t,e,i){return!t||ve.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(z(i).weekdayMismatch=!0,i._isValid=!1,!1)}(d[1],e=a,t))return;t._a=e,t._tzm=function(t,e,i){if(t)return He[t];if(e)return 0;var s=parseInt(i,10),r=s%100;return(s-r)/100*60+r}(d[8],d[9],d[10]),t._d=le.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),z(t).rfc2822=!0}else t._isValid=!1}function We(t,e,i){return null!=t?t:null!=e?e:i}function qe(t){var e,i,s,r,o,n=[];if(!t._d){for(s=function(t){var e=new Date(x.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[Rt]&&null==t._a[Yt]&&function(t){var e,i,s,r,o,n,a,l,h;null!=(e=t._w).GG||null!=e.W||null!=e.E?(o=1,n=4,i=We(e.GG,t._a[jt],ce(Qe(),1,4).year),s=We(e.W,1),((r=We(e.E,1))<1||r>7)&&(l=!0)):(o=t._locale._week.dow,n=t._locale._week.doy,h=ce(Qe(),o,n),i=We(e.gg,t._a[jt],h.year),s=We(e.w,h.week),null!=e.d?((r=e.d)<0||r>6)&&(l=!0):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o),s<1||s>ue(i,o,n)?z(t)._overflowWeeks=!0:null!=l?z(t)._overflowWeekday=!0:(a=de(i,s,r,o,n),t._a[jt]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(o=We(t._a[jt],s[jt]),(t._dayOfYear>oe(o)||0===t._dayOfYear)&&(z(t)._overflowDayOfYear=!0),i=le(o,0,t._dayOfYear),t._a[Yt]=i.getUTCMonth(),t._a[Rt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=n[e]=s[e];for(;e<7;e++)t._a[e]=n[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Vt]&&0===t._a[Ht]&&0===t._a[Gt]&&0===t._a[$t]&&(t._nextDay=!0,t._a[Vt]=0),t._d=(t._useUTC?le:ae).apply(null,n),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==r&&(z(t).weekdayMismatch=!0)}}function Ke(t){if(t._f!==x.ISO_8601)if(t._f!==x.RFC_2822){t._a=[],z(t).empty=!0;var e,i,s,r,o,n,a,l=""+t._i,h=l.length,d=0;for(a=(s=it(t._f,t._locale).match(J)||[]).length,e=0;e<a;e++)(i=(l.match(Tt(r=s[e],t))||[])[0])&&((o=l.substr(0,l.indexOf(i))).length>0&&z(t).unusedInput.push(o),l=l.slice(l.indexOf(i)+i.length),d+=i.length),Z[r]?(i?z(t).empty=!1:z(t).unusedTokens.push(r),Bt(r,i,t)):t._strict&&!i&&z(t).unusedTokens.push(r);z(t).charsLeftOver=h-d,l.length>0&&z(t).unusedInput.push(l),t._a[Vt]<=12&&!0===z(t).bigHour&&t._a[Vt]>0&&(z(t).bigHour=void 0),z(t).parsedDateParts=t._a.slice(0),z(t).meridiem=t._meridiem,t._a[Vt]=function(t,e,i){var s;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((s=t.isPM(i))&&e<12&&(e+=12),s||12!==e||(e=0),e):e}(t._locale,t._a[Vt],t._meridiem),null!==(n=z(t).era)&&(t._a[jt]=t._locale.erasConvertYear(n,t._a[jt])),qe(t),Oe(t)}else $e(t);else Ge(t)}function Je(t){var e=t._i,i=t._f;return t._locale=t._locale||Fe(t._l),null===e||void 0===i&&""===e?N({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),j(e)?new U(Oe(e)):(A(e)?t._d=e:_(i)?function(t){var e,i,s,r,o,n,a=!1,l=t._f.length;if(0===l)return z(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;r<l;r++)o=0,n=!1,e=L({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],Ke(e),T(e)&&(n=!0),o+=z(e).charsLeftOver,o+=10*z(e).unusedTokens.length,z(e).score=o,a?o<s&&(s=o,i=e):(null==s||o<s||n)&&(s=o,i=e,n&&(a=!0));M(t,i||e)}(t):i?Ke(t):function(t){var e=t._i;E(e)?t._d=new Date(x.now()):A(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=Re.exec(t._i);null===e?(Ge(t),!1===t._isValid&&(delete t._isValid,$e(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:x.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):_(e)?(t._a=I(e.slice(0),(function(t){return parseInt(t,10)})),qe(t)):k(e)?function(t){if(!t._d){var e=nt(t._i);t._a=I([e.year,e.month,void 0===e.day?e.date:e.day,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),qe(t)}}(t):P(e)?t._d=new Date(e):x.createFromInputFallback(t)}(t),T(t)||(t._d=null),t))}function Xe(t,e,i,s,r){var o,n={};return!0!==e&&!1!==e||(s=e,e=void 0),!0!==i&&!1!==i||(s=i,i=void 0),(k(t)&&S(t)||_(t)&&0===t.length)&&(t=void 0),n._isAMomentObject=!0,n._useUTC=n._isUTC=r,n._l=i,n._i=t,n._f=e,n._strict=s,(o=new U(Oe(Je(n))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function Qe(t,e,i,s){return Xe(t,e,i,s,!1)}x.createFromInputFallback=R("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),x.ISO_8601=function(){},x.RFC_2822=function(){};var Ze=R("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Qe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:N()})),ti=R("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Qe.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:N()}));function ei(t,e){var i,s;if(1===e.length&&_(e[0])&&(e=e[0]),!e.length)return Qe();for(i=e[0],s=1;s<e.length;++s)e[s].isValid()&&!e[s][t](i)||(i=e[s]);return i}var ii=["year","quarter","month","week","day","hour","minute","second","millisecond"];function si(t){var e=nt(t),i=e.year||0,s=e.quarter||0,r=e.month||0,o=e.week||e.isoWeek||0,n=e.day||0,a=e.hour||0,l=e.minute||0,h=e.second||0,d=e.millisecond||0;this._isValid=function(t){var e,i,s=!1,r=ii.length;for(e in t)if(C(t,e)&&(-1===Ut.call(ii,e)||null!=t[e]&&isNaN(t[e])))return!1;for(i=0;i<r;++i)if(t[ii[i]]){if(s)return!1;parseFloat(t[ii[i]])!==ct(t[ii[i]])&&(s=!0)}return!0}(e),this._milliseconds=+d+1e3*h+6e4*l+1e3*a*60*60,this._days=+n+7*o,this._months=+r+3*s+12*i,this._data={},this._locale=Fe(),this._bubble()}function ri(t){return t instanceof si}function oi(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function ni(t,e){tt(t,0,0,(function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+K(~~(t/60),2)+e+K(~~t%60,2)}))}ni("Z",":"),ni("ZZ",""),zt("Z",Mt),zt("ZZ",Mt),Ot(["Z","ZZ"],(function(t,e,i){i._useUTC=!0,i._tzm=li(Mt,t)}));var ai=/([\+\-]|\d\d)/gi;function li(t,e){var i,s,r=(e||"").match(t);return null===r?null:0===(s=60*(i=((r[r.length-1]||[])+"").match(ai)||["-",0,0])[1]+ct(i[2]))?0:"+"===i[0]?s:-s}function hi(t,e){var i,s;return e._isUTC?(i=e.clone(),s=(j(t)||A(t)?t.valueOf():Qe(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+s),x.updateOffset(i,!1),i):Qe(t).local()}function di(t){return-Math.round(t._d.getTimezoneOffset())}function ci(){return!!this.isValid()&&this._isUTC&&0===this._offset}x.updateOffset=function(){};var ui=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,pi=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function mi(t,e){var i,s,r,o,n,a,l=t,h=null;return ri(t)?l={ms:t._milliseconds,d:t._days,M:t._months}:P(t)||!isNaN(+t)?(l={},e?l[e]=+t:l.milliseconds=+t):(h=ui.exec(t))?(i="-"===h[1]?-1:1,l={y:0,d:ct(h[Rt])*i,h:ct(h[Vt])*i,m:ct(h[Ht])*i,s:ct(h[Gt])*i,ms:ct(oi(1e3*h[$t]))*i}):(h=pi.exec(t))?l={y:vi(h[2],i="-"===h[1]?-1:1),M:vi(h[3],i),w:vi(h[4],i),d:vi(h[5],i),h:vi(h[6],i),m:vi(h[7],i),s:vi(h[8],i)}:null==l?l={}:"object"==typeof l&&("from"in l||"to"in l)&&(o=Qe(l.from),n=Qe(l.to),r=o.isValid()&&n.isValid()?(n=hi(n,o),o.isBefore(n)?a=fi(o,n):((a=fi(n,o)).milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0},(l={}).ms=r.milliseconds,l.M=r.months),s=new si(l),ri(t)&&C(t,"_locale")&&(s._locale=t._locale),ri(t)&&C(t,"_isValid")&&(s._isValid=t._isValid),s}function vi(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function fi(t,e){var i={};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function gi(t,e){return function(i,s){var r;return null===s||isNaN(+s)||(G(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=i,i=s,s=r),bi(this,mi(i,s),t),this}}function bi(t,e,i,s){var r=e._milliseconds,o=oi(e._days),n=oi(e._months);t.isValid()&&(s=null==s||s,n&&ie(t,pt(t,"Month")+n*i),o&&mt(t,"Date",pt(t,"Date")+o*i),r&&t._d.setTime(t._d.valueOf()+r*i),s&&x.updateOffset(t,o||n))}mi.fn=si.prototype,mi.invalid=function(){return mi(NaN)};var wi=gi(1,"add"),yi=gi(-1,"subtract");function xi(t){return"string"==typeof t||t instanceof String}function _i(t,e){if(t.date()<e.date())return-_i(e,t);var i=12*(e.year()-t.year())+(e.month()-t.month()),s=t.clone().add(i,"months");return-(i+(e-s<0?(e-s)/(s-t.clone().add(i-1,"months")):(e-s)/(t.clone().add(i+1,"months")-s)))||0}function ki(t){var e;return void 0===t?this._locale._abbr:(null!=(e=Fe(t))&&(this._locale=e),this)}x.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",x.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ci=R("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function Si(){return this._locale}var Ei=1e3,Pi=6e4,Ai=36e5,Ii=126227808e5;function Mi(t,e){return(t%e+e)%e}function Di(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-Ii:new Date(t,e,i).valueOf()}function zi(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-Ii:Date.UTC(t,e,i)}function Ti(t,e){return e.erasAbbrRegex(t)}function Ni(){var t,e,i=[],s=[],r=[],o=[],n=this.eras();for(t=0,e=n.length;t<e;++t)s.push(Nt(n[t].name)),i.push(Nt(n[t].abbr)),r.push(Nt(n[t].narrow)),o.push(Nt(n[t].name)),o.push(Nt(n[t].abbr)),o.push(Nt(n[t].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function Fi(t,e){tt(0,[t,t.length],0,e)}function Oi(t,e,i,s,r){var o;return null==t?ce(this,s,r).year:(e>(o=ue(t,s,r))&&(e=o),Li.call(this,t,e,i,s,r))}function Li(t,e,i,s,r){var o=de(t,e,i,s,r),n=le(o.year,0,o.dayOfYear);return this.year(n.getUTCFullYear()),this.month(n.getUTCMonth()),this.date(n.getUTCDate()),this}tt("N",0,0,"eraAbbr"),tt("NN",0,0,"eraAbbr"),tt("NNN",0,0,"eraAbbr"),tt("NNNN",0,0,"eraName"),tt("NNNNN",0,0,"eraNarrow"),tt("y",["y",1],"yo","eraYear"),tt("y",["yy",2],0,"eraYear"),tt("y",["yyy",3],0,"eraYear"),tt("y",["yyyy",4],0,"eraYear"),zt("N",Ti),zt("NN",Ti),zt("NNN",Ti),zt("NNNN",(function(t,e){return e.erasNameRegex(t)})),zt("NNNNN",(function(t,e){return e.erasNarrowRegex(t)})),Ot(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,i,s){var r=i._locale.erasParse(t,s,i._strict);r?z(i).era=r:z(i).invalidEra=t})),zt("y",Pt),zt("yy",Pt),zt("yyy",Pt),zt("yyyy",Pt),zt("yo",(function(t,e){return e._eraYearOrdinalRegex||Pt})),Ot(["y","yy","yyy","yyyy"],jt),Ot(["yo"],(function(t,e,i){var s;i._locale._eraYearOrdinalRegex&&(s=t.match(i._locale._eraYearOrdinalRegex)),e[jt]=i._locale.eraYearOrdinalParse?i._locale.eraYearOrdinalParse(t,s):parseInt(t,10)})),tt(0,["gg",2],0,(function(){return this.weekYear()%100})),tt(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Fi("gggg","weekYear"),Fi("ggggg","weekYear"),Fi("GGGG","isoWeekYear"),Fi("GGGGG","isoWeekYear"),rt("weekYear","gg"),rt("isoWeekYear","GG"),lt("weekYear",1),lt("isoWeekYear",1),zt("G",At),zt("g",At),zt("GG",xt,gt),zt("gg",xt,gt),zt("GGGG",St,wt),zt("gggg",St,wt),zt("GGGGG",Et,yt),zt("ggggg",Et,yt),Lt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,i,s){e[s.substr(0,2)]=ct(t)})),Lt(["gg","GG"],(function(t,e,i,s){e[s]=x.parseTwoDigitYear(t)})),tt("Q",0,"Qo","quarter"),rt("quarter","Q"),lt("quarter",7),zt("Q",ft),Ot("Q",(function(t,e){e[Yt]=3*(ct(t)-1)})),tt("D",["DD",2],"Do","date"),rt("date","D"),lt("date",9),zt("D",xt),zt("DD",xt,gt),zt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),Ot(["D","DD"],Rt),Ot("Do",(function(t,e){e[Rt]=ct(t.match(xt)[0])}));var Bi=ut("Date",!0);tt("DDD",["DDDD",3],"DDDo","dayOfYear"),rt("dayOfYear","DDD"),lt("dayOfYear",4),zt("DDD",Ct),zt("DDDD",bt),Ot(["DDD","DDDD"],(function(t,e,i){i._dayOfYear=ct(t)})),tt("m",["mm",2],0,"minute"),rt("minute","m"),lt("minute",14),zt("m",xt),zt("mm",xt,gt),Ot(["m","mm"],Ht);var Ui=ut("Minutes",!1);tt("s",["ss",2],0,"second"),rt("second","s"),lt("second",15),zt("s",xt),zt("ss",xt,gt),Ot(["s","ss"],Gt);var ji,Yi,Ri=ut("Seconds",!1);for(tt("S",0,0,(function(){return~~(this.millisecond()/100)})),tt(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),tt(0,["SSS",3],0,"millisecond"),tt(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),tt(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),tt(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),tt(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),tt(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),tt(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),rt("millisecond","ms"),lt("millisecond",16),zt("S",Ct,ft),zt("SS",Ct,gt),zt("SSS",Ct,bt),ji="SSSS";ji.length<=9;ji+="S")zt(ji,Pt);function Vi(t,e){e[$t]=ct(1e3*("0."+t))}for(ji="S";ji.length<=9;ji+="S")Ot(ji,Vi);Yi=ut("Milliseconds",!1),tt("z",0,0,"zoneAbbr"),tt("zz",0,0,"zoneName");var Hi=U.prototype;function Gi(t){return t}Hi.add=wi,Hi.calendar=function(t,e){var i;1===arguments.length&&(arguments[0]?j(i=arguments[0])||A(i)||xi(i)||P(i)||function(t){var e=_(t),i=!1;return e&&(i=0===t.filter((function(e){return!P(e)&&xi(t)})).length),e&&i}(i)||function(t){var e,i=k(t)&&!S(t),s=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o=r.length;for(e=0;e<o;e+=1)s=s||C(t,r[e]);return i&&s}(i)||null==i?(t=arguments[0],e=void 0):function(t){var e,i=k(t)&&!S(t),s=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<r.length;e+=1)s=s||C(t,r[e]);return i&&s}(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var s=t||Qe(),r=hi(s,this).startOf("day"),o=x.calendarFormat(this,r)||"sameElse",n=e&&($(e[o])?e[o].call(this,s):e[o]);return this.format(n||this.localeData().calendar(o,this,Qe(s)))},Hi.clone=function(){return new U(this)},Hi.diff=function(t,e,i){var s,r,o;if(!this.isValid())return NaN;if(!(s=hi(t,this)).isValid())return NaN;switch(r=6e4*(s.utcOffset()-this.utcOffset()),e=ot(e)){case"year":o=_i(this,s)/12;break;case"month":o=_i(this,s);break;case"quarter":o=_i(this,s)/3;break;case"second":o=(this-s)/1e3;break;case"minute":o=(this-s)/6e4;break;case"hour":o=(this-s)/36e5;break;case"day":o=(this-s-r)/864e5;break;case"week":o=(this-s-r)/6048e5;break;default:o=this-s}return i?o:dt(o)},Hi.endOf=function(t){var e,i;if(void 0===(t=ot(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?zi:Di,t){case"year":e=i(this.year()+1,0,1)-1;break;case"quarter":e=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=i(this.year(),this.month()+1,1)-1;break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Ai-Mi(e+(this._isUTC?0:this.utcOffset()*Pi),Ai)-1;break;case"minute":e=this._d.valueOf(),e+=Pi-Mi(e,Pi)-1;break;case"second":e=this._d.valueOf(),e+=Ei-Mi(e,Ei)-1}return this._d.setTime(e),x.updateOffset(this,!0),this},Hi.format=function(t){t||(t=this.isUtc()?x.defaultFormatUtc:x.defaultFormat);var e=et(this,t);return this.localeData().postformat(e)},Hi.from=function(t,e){return this.isValid()&&(j(t)&&t.isValid()||Qe(t).isValid())?mi({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Hi.fromNow=function(t){return this.from(Qe(),t)},Hi.to=function(t,e){return this.isValid()&&(j(t)&&t.isValid()||Qe(t).isValid())?mi({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Hi.toNow=function(t){return this.to(Qe(),t)},Hi.get=function(t){return $(this[t=ot(t)])?this[t]():this},Hi.invalidAt=function(){return z(this).overflow},Hi.isAfter=function(t,e){var i=j(t)?t:Qe(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=ot(e)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},Hi.isBefore=function(t,e){var i=j(t)?t:Qe(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=ot(e)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},Hi.isBetween=function(t,e,i,s){var r=j(t)?t:Qe(t),o=j(e)?e:Qe(e);return!!(this.isValid()&&r.isValid()&&o.isValid())&&("("===(s=s||"()")[0]?this.isAfter(r,i):!this.isBefore(r,i))&&(")"===s[1]?this.isBefore(o,i):!this.isAfter(o,i))},Hi.isSame=function(t,e){var i,s=j(t)?t:Qe(t);return!(!this.isValid()||!s.isValid())&&("millisecond"===(e=ot(e)||"millisecond")?this.valueOf()===s.valueOf():(i=s.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},Hi.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},Hi.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},Hi.isValid=function(){return T(this)},Hi.lang=Ci,Hi.locale=ki,Hi.localeData=Si,Hi.max=ti,Hi.min=Ze,Hi.parsingFlags=function(){return M({},z(this))},Hi.set=function(t,e){if("object"==typeof t){var i,s=function(t){var e,i=[];for(e in t)C(t,e)&&i.push({unit:e,priority:at[e]});return i.sort((function(t,e){return t.priority-e.priority})),i}(t=nt(t)),r=s.length;for(i=0;i<r;i++)this[s[i].unit](t[s[i].unit])}else if($(this[t=ot(t)]))return this[t](e);return this},Hi.startOf=function(t){var e,i;if(void 0===(t=ot(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?zi:Di,t){case"year":e=i(this.year(),0,1);break;case"quarter":e=i(this.year(),this.month()-this.month()%3,1);break;case"month":e=i(this.year(),this.month(),1);break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=i(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Mi(e+(this._isUTC?0:this.utcOffset()*Pi),Ai);break;case"minute":e=this._d.valueOf(),e-=Mi(e,Pi);break;case"second":e=this._d.valueOf(),e-=Mi(e,Ei)}return this._d.setTime(e),x.updateOffset(this,!0),this},Hi.subtract=yi,Hi.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},Hi.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},Hi.toDate=function(){return new Date(this.valueOf())},Hi.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,i=e?this.clone().utc():this;return i.year()<0||i.year()>9999?et(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):$(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",et(i,"Z")):et(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Hi.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,i="moment",s="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),t="["+i+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+s+'[")]')},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Hi[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Hi.toJSON=function(){return this.isValid()?this.toISOString():null},Hi.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Hi.unix=function(){return Math.floor(this.valueOf()/1e3)},Hi.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Hi.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Hi.eraName=function(){var t,e,i,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),s[t].since<=i&&i<=s[t].until)return s[t].name;if(s[t].until<=i&&i<=s[t].since)return s[t].name}return""},Hi.eraNarrow=function(){var t,e,i,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),s[t].since<=i&&i<=s[t].until)return s[t].narrow;if(s[t].until<=i&&i<=s[t].since)return s[t].narrow}return""},Hi.eraAbbr=function(){var t,e,i,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),s[t].since<=i&&i<=s[t].until)return s[t].abbr;if(s[t].until<=i&&i<=s[t].since)return s[t].abbr}return""},Hi.eraYear=function(){var t,e,i,s,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(i=r[t].since<=r[t].until?1:-1,s=this.clone().startOf("day").valueOf(),r[t].since<=s&&s<=r[t].until||r[t].until<=s&&s<=r[t].since)return(this.year()-x(r[t].since).year())*i+r[t].offset;return this.year()},Hi.year=ne,Hi.isLeapYear=function(){return ht(this.year())},Hi.weekYear=function(t){return Oi.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Hi.isoWeekYear=function(t){return Oi.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},Hi.quarter=Hi.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},Hi.month=se,Hi.daysInMonth=function(){return Kt(this.year(),this.month())},Hi.week=Hi.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},Hi.isoWeek=Hi.isoWeeks=function(t){var e=ce(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},Hi.weeksInYear=function(){var t=this.localeData()._week;return ue(this.year(),t.dow,t.doy)},Hi.weeksInWeekYear=function(){var t=this.localeData()._week;return ue(this.weekYear(),t.dow,t.doy)},Hi.isoWeeksInYear=function(){return ue(this.year(),1,4)},Hi.isoWeeksInISOWeekYear=function(){return ue(this.isoWeekYear(),1,4)},Hi.date=Bi,Hi.day=Hi.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},Hi.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},Hi.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},Hi.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},Hi.hour=Hi.hours=Ee,Hi.minute=Hi.minutes=Ui,Hi.second=Hi.seconds=Ri,Hi.millisecond=Hi.milliseconds=Yi,Hi.utcOffset=function(t,e,i){var s,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=li(Mt,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&e&&(s=di(this)),this._offset=t,this._isUTC=!0,null!=s&&this.add(s,"m"),r!==t&&(!e||this._changeInProgress?bi(this,mi(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,x.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:di(this)},Hi.utc=function(t){return this.utcOffset(0,t)},Hi.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(di(this),"m")),this},Hi.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=li(It,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},Hi.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Qe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},Hi.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Hi.isLocal=function(){return!!this.isValid()&&!this._isUTC},Hi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Hi.isUtc=ci,Hi.isUTC=ci,Hi.zoneAbbr=function(){return this._isUTC?"UTC":""},Hi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Hi.dates=R("dates accessor is deprecated. Use date instead.",Bi),Hi.months=R("months accessor is deprecated. Use month instead",se),Hi.years=R("years accessor is deprecated. Use year instead",ne),Hi.zone=R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),Hi.isDSTShifted=R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!E(this._isDSTShifted))return this._isDSTShifted;var t,e={};return L(e,this),(e=Je(e))._a?(t=e._isUTC?D(e._a):Qe(e._a),this._isDSTShifted=this.isValid()&&function(t,e){var i,s=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),o=0;for(i=0;i<s;i++)ct(t[i])!==ct(e[i])&&o++;return o+r}(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var $i=q.prototype;function Wi(t,e,i,s){var r=Fe(),o=D().set(s,e);return r[i](o,t)}function qi(t,e,i){if(P(t)&&(e=t,t=void 0),t=t||"",null!=e)return Wi(t,e,i,"month");var s,r=[];for(s=0;s<12;s++)r[s]=Wi(t,s,i,"month");return r}function Ki(t,e,i,s){"boolean"==typeof t?(P(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,P(e)&&(i=e,e=void 0),e=e||"");var r,o=Fe(),n=t?o._week.dow:0,a=[];if(null!=i)return Wi(e,(i+n)%7,s,"day");for(r=0;r<7;r++)a[r]=Wi(e,(r+n)%7,s,"day");return a}$i.calendar=function(t,e,i){var s=this._calendar[t]||this._calendar.sameElse;return $(s)?s.call(e,i):s},$i.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.match(J).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])},$i.invalidDate=function(){return this._invalidDate},$i.ordinal=function(t){return this._ordinal.replace("%d",t)},$i.preparse=Gi,$i.postformat=Gi,$i.relativeTime=function(t,e,i,s){var r=this._relativeTime[i];return $(r)?r(t,e,i,s):r.replace(/%d/i,t)},$i.pastFuture=function(t,e){var i=this._relativeTime[t>0?"future":"past"];return $(i)?i(e):i.replace(/%s/i,e)},$i.set=function(t){var e,i;for(i in t)C(t,i)&&($(e=t[i])?this[i]=e:this["_"+i]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},$i.eras=function(){var t,e,i,s=this._eras||Fe("en")._eras;for(t=0,e=s.length;t<e;++t)switch("string"==typeof s[t].since&&(i=x(s[t].since).startOf("day"),s[t].since=i.valueOf()),typeof s[t].until){case"undefined":s[t].until=1/0;break;case"string":i=x(s[t].until).startOf("day").valueOf(),s[t].until=i.valueOf()}return s},$i.erasParse=function(t,e,i){var s,r,o,n,a,l=this.eras();for(t=t.toUpperCase(),s=0,r=l.length;s<r;++s)if(o=l[s].name.toUpperCase(),n=l[s].abbr.toUpperCase(),a=l[s].narrow.toUpperCase(),i)switch(e){case"N":case"NN":case"NNN":if(n===t)return l[s];break;case"NNNN":if(o===t)return l[s];break;case"NNNNN":if(a===t)return l[s]}else if([o,n,a].indexOf(t)>=0)return l[s]},$i.erasConvertYear=function(t,e){var i=t.since<=t.until?1:-1;return void 0===e?x(t.since).year():x(t.since).year()+(e-t.offset)*i},$i.erasAbbrRegex=function(t){return C(this,"_erasAbbrRegex")||Ni.call(this),t?this._erasAbbrRegex:this._erasRegex},$i.erasNameRegex=function(t){return C(this,"_erasNameRegex")||Ni.call(this),t?this._erasNameRegex:this._erasRegex},$i.erasNarrowRegex=function(t){return C(this,"_erasNarrowRegex")||Ni.call(this),t?this._erasNarrowRegex:this._erasRegex},$i.months=function(t,e){return t?_(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Qt).test(e)?"format":"standalone"][t.month()]:_(this._months)?this._months:this._months.standalone},$i.monthsShort=function(t,e){return t?_(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Qt.test(e)?"format":"standalone"][t.month()]:_(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},$i.monthsParse=function(t,e,i){var s,r,o;if(this._monthsParseExact)return ee.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(r=D([2e3,s]),i&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[s]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[s]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[s].test(t))return s;if(i&&"MMM"===e&&this._shortMonthsParse[s].test(t))return s;if(!i&&this._monthsParse[s].test(t))return s}},$i.monthsRegex=function(t){return this._monthsParseExact?(C(this,"_monthsRegex")||re.call(this),t?this._monthsStrictRegex:this._monthsRegex):(C(this,"_monthsRegex")||(this._monthsRegex=te),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},$i.monthsShortRegex=function(t){return this._monthsParseExact?(C(this,"_monthsRegex")||re.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(C(this,"_monthsShortRegex")||(this._monthsShortRegex=Zt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},$i.week=function(t){return ce(t,this._week.dow,this._week.doy).week},$i.firstDayOfYear=function(){return this._week.doy},$i.firstDayOfWeek=function(){return this._week.dow},$i.weekdays=function(t,e){var i=_(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?pe(i,this._week.dow):t?i[t.day()]:i},$i.weekdaysMin=function(t){return!0===t?pe(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},$i.weekdaysShort=function(t){return!0===t?pe(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},$i.weekdaysParse=function(t,e,i){var s,r,o;if(this._weekdaysParseExact)return ye.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(r=D([2e3,1]).day(s),i&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[s]=new RegExp(o.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[s].test(t))return s;if(i&&"ddd"===e&&this._shortWeekdaysParse[s].test(t))return s;if(i&&"dd"===e&&this._minWeekdaysParse[s].test(t))return s;if(!i&&this._weekdaysParse[s].test(t))return s}},$i.weekdaysRegex=function(t){return this._weekdaysParseExact?(C(this,"_weekdaysRegex")||xe.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(C(this,"_weekdaysRegex")||(this._weekdaysRegex=ge),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},$i.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(C(this,"_weekdaysRegex")||xe.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(C(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=be),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},$i.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(C(this,"_weekdaysRegex")||xe.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(C(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=we),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},$i.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},$i.meridiem=function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},Te("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===ct(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),x.lang=R("moment.lang is deprecated. Use moment.locale instead.",Te),x.langData=R("moment.langData is deprecated. Use moment.localeData instead.",Fe);var Ji=Math.abs;function Xi(t,e,i,s){var r=mi(e,i);return t._milliseconds+=s*r._milliseconds,t._days+=s*r._days,t._months+=s*r._months,t._bubble()}function Qi(t){return t<0?Math.floor(t):Math.ceil(t)}function Zi(t){return 4800*t/146097}function ts(t){return 146097*t/4800}function es(t){return function(){return this.as(t)}}var is=es("ms"),ss=es("s"),rs=es("m"),os=es("h"),ns=es("d"),as=es("w"),ls=es("M"),hs=es("Q"),ds=es("y");function cs(t){return function(){return this.isValid()?this._data[t]:NaN}}var us=cs("milliseconds"),ps=cs("seconds"),ms=cs("minutes"),vs=cs("hours"),fs=cs("days"),gs=cs("months"),bs=cs("years"),ws=Math.round,ys={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function xs(t,e,i,s,r){return r.relativeTime(e||1,!!i,t,s)}var _s=Math.abs;function ks(t){return(t>0)-(t<0)||+t}function Cs(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,s,r,o,n,a,l=_s(this._milliseconds)/1e3,h=_s(this._days),d=_s(this._months),c=this.asSeconds();return c?(t=dt(l/60),e=dt(t/60),l%=60,t%=60,i=dt(d/12),d%=12,s=l?l.toFixed(3).replace(/\.?0+$/,""):"",r=c<0?"-":"",o=ks(this._months)!==ks(c)?"-":"",n=ks(this._days)!==ks(c)?"-":"",a=ks(this._milliseconds)!==ks(c)?"-":"",r+"P"+(i?o+i+"Y":"")+(d?o+d+"M":"")+(h?n+h+"D":"")+(e||t||l?"T":"")+(e?a+e+"H":"")+(t?a+t+"M":"")+(l?a+s+"S":"")):"P0D"}var Ss=si.prototype;Ss.isValid=function(){return this._isValid},Ss.abs=function(){var t=this._data;return this._milliseconds=Ji(this._milliseconds),this._days=Ji(this._days),this._months=Ji(this._months),t.milliseconds=Ji(t.milliseconds),t.seconds=Ji(t.seconds),t.minutes=Ji(t.minutes),t.hours=Ji(t.hours),t.months=Ji(t.months),t.years=Ji(t.years),this},Ss.add=function(t,e){return Xi(this,t,e,1)},Ss.subtract=function(t,e){return Xi(this,t,e,-1)},Ss.as=function(t){if(!this.isValid())return NaN;var e,i,s=this._milliseconds;if("month"===(t=ot(t))||"quarter"===t||"year"===t)switch(i=this._months+Zi(e=this._days+s/864e5),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(ts(this._months)),t){case"week":return e/7+s/6048e5;case"day":return e+s/864e5;case"hour":return 24*e+s/36e5;case"minute":return 1440*e+s/6e4;case"second":return 86400*e+s/1e3;case"millisecond":return Math.floor(864e5*e)+s;default:throw new Error("Unknown unit "+t)}},Ss.asMilliseconds=is,Ss.asSeconds=ss,Ss.asMinutes=rs,Ss.asHours=os,Ss.asDays=ns,Ss.asWeeks=as,Ss.asMonths=ls,Ss.asQuarters=hs,Ss.asYears=ds,Ss.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ct(this._months/12):NaN},Ss._bubble=function(){var t,e,i,s,r,o=this._milliseconds,n=this._days,a=this._months,l=this._data;return o>=0&&n>=0&&a>=0||o<=0&&n<=0&&a<=0||(o+=864e5*Qi(ts(a)+n),n=0,a=0),l.milliseconds=o%1e3,t=dt(o/1e3),l.seconds=t%60,e=dt(t/60),l.minutes=e%60,i=dt(e/60),l.hours=i%24,n+=dt(i/24),a+=r=dt(Zi(n)),n-=Qi(ts(r)),s=dt(a/12),a%=12,l.days=n,l.months=a,l.years=s,this},Ss.clone=function(){return mi(this)},Ss.get=function(t){return t=ot(t),this.isValid()?this[t+"s"]():NaN},Ss.milliseconds=us,Ss.seconds=ps,Ss.minutes=ms,Ss.hours=vs,Ss.days=fs,Ss.weeks=function(){return dt(this.days()/7)},Ss.months=gs,Ss.years=bs,Ss.humanize=function(t,e){if(!this.isValid())return this.localeData().invalidDate();var i,s,r=!1,o=ys;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(r=t),"object"==typeof e&&(o=Object.assign({},ys,e),null!=e.s&&null==e.ss&&(o.ss=e.s-1)),s=function(t,e,i,s){var r=mi(t).abs(),o=ws(r.as("s")),n=ws(r.as("m")),a=ws(r.as("h")),l=ws(r.as("d")),h=ws(r.as("M")),d=ws(r.as("w")),c=ws(r.as("y")),u=o<=i.ss&&["s",o]||o<i.s&&["ss",o]||n<=1&&["m"]||n<i.m&&["mm",n]||a<=1&&["h"]||a<i.h&&["hh",a]||l<=1&&["d"]||l<i.d&&["dd",l];return null!=i.w&&(u=u||d<=1&&["w"]||d<i.w&&["ww",d]),(u=u||h<=1&&["M"]||h<i.M&&["MM",h]||c<=1&&["y"]||["yy",c])[2]=e,u[3]=+t>0,u[4]=s,xs.apply(null,u)}(this,!r,o,i=this.localeData()),r&&(s=i.pastFuture(+this,s)),i.postformat(s)},Ss.toISOString=Cs,Ss.toString=Cs,Ss.toJSON=Cs,Ss.locale=ki,Ss.localeData=Si,Ss.toIsoString=R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Cs),Ss.lang=Ci,tt("X",0,0,"unix"),tt("x",0,0,"valueOf"),zt("x",At),zt("X",/[+-]?\d+(\.\d{1,3})?/),Ot("X",(function(t,e,i){i._d=new Date(1e3*parseFloat(t))})),Ot("x",(function(t,e,i){i._d=new Date(ct(t))})),
|
|
7
|
+
var w,y;function x(){return w.apply(null,arguments)}function _(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function k(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function S(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(C(t,e))return!1;return!0}function E(t){return void 0===t}function P(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function A(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function I(t,e){var i,s=[],r=t.length;for(i=0;i<r;++i)s.push(e(t[i],i));return s}function M(t,e){for(var i in e)C(e,i)&&(t[i]=e[i]);return C(e,"toString")&&(t.toString=e.toString),C(e,"valueOf")&&(t.valueOf=e.valueOf),t}function D(t,e,i,s){return Xe(t,e,i,s,!0).utc()}function T(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function z(t){if(null==t._isValid){var e=T(t),i=y.call(e.parsedDateParts,(function(t){return null!=t})),s=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(s=s&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return s;t._isValid=s}return t._isValid}function N(t){var e=D(NaN);return null!=t?M(T(e),t):T(e).userInvalidated=!0,e}y=Array.prototype.some?Array.prototype.some:function(t){var e,i=Object(this),s=i.length>>>0;for(e=0;e<s;e++)if(e in i&&t.call(this,i[e],e,i))return!0;return!1};var F=x.momentProperties=[],O=!1;function L(t,e){var i,s,r,o=F.length;if(E(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),E(e._i)||(t._i=e._i),E(e._f)||(t._f=e._f),E(e._l)||(t._l=e._l),E(e._strict)||(t._strict=e._strict),E(e._tzm)||(t._tzm=e._tzm),E(e._isUTC)||(t._isUTC=e._isUTC),E(e._offset)||(t._offset=e._offset),E(e._pf)||(t._pf=T(e)),E(e._locale)||(t._locale=e._locale),o>0)for(i=0;i<o;i++)E(r=e[s=F[i]])||(t[s]=r);return t}function U(t){L(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===O&&(O=!0,x.updateOffset(this),O=!1)}function j(t){return t instanceof U||null!=t&&null!=t._isAMomentObject}function Y(t){!1===x.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function R(t,e){var i=!0;return M((function(){if(null!=x.deprecationHandler&&x.deprecationHandler(null,t),i){var s,r,o,n=[],a=arguments.length;for(r=0;r<a;r++){if(s="","object"==typeof arguments[r]){for(o in s+="\n["+r+"] ",arguments[0])C(arguments[0],o)&&(s+=o+": "+arguments[0][o]+", ");s=s.slice(0,-2)}else s=arguments[r];n.push(s)}Y(t+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),i=!1}return e.apply(this,arguments)}),e)}var G,H={};function V(t,e){null!=x.deprecationHandler&&x.deprecationHandler(t,e),H[t]||(Y(e),H[t]=!0)}function $(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function W(t,e){var i,s=M({},t);for(i in e)C(e,i)&&(k(t[i])&&k(e[i])?(s[i]={},M(s[i],t[i]),M(s[i],e[i])):null!=e[i]?s[i]=e[i]:delete s[i]);for(i in t)C(t,i)&&!C(e,i)&&k(t[i])&&(s[i]=M({},s[i]));return s}function q(t){null!=t&&this.set(t)}function K(t,e,i){var s=""+Math.abs(t);return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,e-s.length)).toString().substr(1)+s}x.suppressDeprecationWarnings=!1,x.deprecationHandler=null,G=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)C(t,e)&&i.push(e);return i};var J=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,X=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Q={},Z={};function tt(t,e,i,s){var r=s;"string"==typeof s&&(r=function(){return this[s]()}),t&&(Z[t]=r),e&&(Z[e[0]]=function(){return K(r.apply(this,arguments),e[1],e[2])}),i&&(Z[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function et(t,e){return t.isValid()?(e=it(e,t.localeData()),Q[e]=Q[e]||function(t){var e,i,s,r=t.match(J);for(e=0,i=r.length;e<i;e++)r[e]=Z[r[e]]?Z[r[e]]:(s=r[e]).match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"");return function(e){var s,o="";for(s=0;s<i;s++)o+=$(r[s])?r[s].call(e,t):r[s];return o}}(e),Q[e](t)):t.localeData().invalidDate()}function it(t,e){var i=5;function s(t){return e.longDateFormat(t)||t}for(X.lastIndex=0;i>=0&&X.test(t);)t=t.replace(X,s),X.lastIndex=0,i-=1;return t}var st={};function rt(t,e){var i=t.toLowerCase();st[i]=st[i+"s"]=st[e]=t}function ot(t){return"string"==typeof t?st[t]||st[t.toLowerCase()]:void 0}function nt(t){var e,i,s={};for(i in t)C(t,i)&&(e=ot(i))&&(s[e]=t[i]);return s}var at={};function lt(t,e){at[t]=e}function ht(t){return t%4==0&&t%100!=0||t%400==0}function dt(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function ct(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=dt(e)),i}function ut(t,e){return function(i){return null!=i?(mt(this,t,i),x.updateOffset(this,e),this):pt(this,t)}}function pt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function mt(t,e,i){t.isValid()&&!isNaN(i)&&("FullYear"===e&&ht(t.year())&&1===t.month()&&29===t.date()?(i=ct(i),t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),Kt(i,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](i))}var vt,ft=/\d/,gt=/\d\d/,bt=/\d{3}/,wt=/\d{4}/,yt=/[+-]?\d{6}/,xt=/\d\d?/,_t=/\d\d\d\d?/,kt=/\d\d\d\d\d\d?/,Ct=/\d{1,3}/,St=/\d{1,4}/,Et=/[+-]?\d{1,6}/,Pt=/\d+/,At=/[+-]?\d+/,It=/Z|[+-]\d\d:?\d\d/gi,Mt=/Z|[+-]\d\d(?::?\d\d)?/gi,Dt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Tt(t,e,i){vt[t]=$(e)?e:function(t){return t&&i?i:e}}function zt(t,e){return C(vt,t)?vt[t](e._strict,e._locale):new RegExp(Nt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,i,s,r){return e||i||s||r}))))}function Nt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}vt={};var Ft={};function Ot(t,e){var i,s,r=e;for("string"==typeof t&&(t=[t]),P(e)&&(r=function(t,i){i[e]=ct(t)}),s=t.length,i=0;i<s;i++)Ft[t[i]]=r}function Lt(t,e){Ot(t,(function(t,i,s,r){s._w=s._w||{},e(t,s._w,s,r)}))}function Ut(t,e,i){null!=e&&C(Ft,t)&&Ft[t](e,i._a,i,t)}var Bt,jt=0,Yt=1,Rt=2,Gt=3,Ht=4,Vt=5,$t=6,Wt=7,qt=8;function Kt(t,e){if(isNaN(t)||isNaN(e))return NaN;var i=(e%12+12)%12;return t+=(e-i)/12,1===i?ht(t)?29:28:31-i%7%2}Bt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},tt("M",["MM",2],"Mo",(function(){return this.month()+1})),tt("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),tt("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),rt("month","M"),lt("month",8),Tt("M",xt),Tt("MM",xt,gt),Tt("MMM",(function(t,e){return e.monthsShortRegex(t)})),Tt("MMMM",(function(t,e){return e.monthsRegex(t)})),Ot(["M","MM"],(function(t,e){e[Yt]=ct(t)-1})),Ot(["MMM","MMMM"],(function(t,e,i,s){var r=i._locale.monthsParse(t,s,i._strict);null!=r?e[Yt]=r:T(i).invalidMonth=t}));var Jt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Xt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Qt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Zt=Dt,te=Dt;function ee(t,e,i){var s,r,o,n=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)o=D([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(o,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(r=Bt.call(this._shortMonthsParse,n))?r:null:-1!==(r=Bt.call(this._longMonthsParse,n))?r:null:"MMM"===e?-1!==(r=Bt.call(this._shortMonthsParse,n))||-1!==(r=Bt.call(this._longMonthsParse,n))?r:null:-1!==(r=Bt.call(this._longMonthsParse,n))||-1!==(r=Bt.call(this._shortMonthsParse,n))?r:null}function ie(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=ct(e);else if(!P(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),Kt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function se(t){return null!=t?(ie(this,t),x.updateOffset(this,!0),this):pt(this,"Month")}function re(){function t(t,e){return e.length-t.length}var e,i,s=[],r=[],o=[];for(e=0;e<12;e++)i=D([2e3,e]),s.push(this.monthsShort(i,"")),r.push(this.months(i,"")),o.push(this.months(i,"")),o.push(this.monthsShort(i,""));for(s.sort(t),r.sort(t),o.sort(t),e=0;e<12;e++)s[e]=Nt(s[e]),r[e]=Nt(r[e]);for(e=0;e<24;e++)o[e]=Nt(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function oe(t){return ht(t)?366:365}tt("Y",0,0,(function(){var t=this.year();return t<=9999?K(t,4):"+"+t})),tt(0,["YY",2],0,(function(){return this.year()%100})),tt(0,["YYYY",4],0,"year"),tt(0,["YYYYY",5],0,"year"),tt(0,["YYYYYY",6,!0],0,"year"),rt("year","y"),lt("year",1),Tt("Y",At),Tt("YY",xt,gt),Tt("YYYY",St,wt),Tt("YYYYY",Et,yt),Tt("YYYYYY",Et,yt),Ot(["YYYYY","YYYYYY"],jt),Ot("YYYY",(function(t,e){e[jt]=2===t.length?x.parseTwoDigitYear(t):ct(t)})),Ot("YY",(function(t,e){e[jt]=x.parseTwoDigitYear(t)})),Ot("Y",(function(t,e){e[jt]=parseInt(t,10)})),x.parseTwoDigitYear=function(t){return ct(t)+(ct(t)>68?1900:2e3)};var ne=ut("FullYear",!0);function ae(t,e,i,s,r,o,n){var a;return t<100&&t>=0?(a=new Date(t+400,e,i,s,r,o,n),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,i,s,r,o,n),a}function le(t){var e,i;return t<100&&t>=0?((i=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function he(t,e,i){var s=7+e-i;return-(7+le(t,0,s).getUTCDay()-e)%7+s-1}function de(t,e,i,s,r){var o,n,a=1+7*(e-1)+(7+i-s)%7+he(t,s,r);return a<=0?n=oe(o=t-1)+a:a>oe(t)?(o=t+1,n=a-oe(t)):(o=t,n=a),{year:o,dayOfYear:n}}function ce(t,e,i){var s,r,o=he(t.year(),e,i),n=Math.floor((t.dayOfYear()-o-1)/7)+1;return n<1?s=n+ue(r=t.year()-1,e,i):n>ue(t.year(),e,i)?(s=n-ue(t.year(),e,i),r=t.year()+1):(r=t.year(),s=n),{week:s,year:r}}function ue(t,e,i){var s=he(t,e,i),r=he(t+1,e,i);return(oe(t)-s+r)/7}function pe(t,e){return t.slice(e,7).concat(t.slice(0,e))}tt("w",["ww",2],"wo","week"),tt("W",["WW",2],"Wo","isoWeek"),rt("week","w"),rt("isoWeek","W"),lt("week",5),lt("isoWeek",5),Tt("w",xt),Tt("ww",xt,gt),Tt("W",xt),Tt("WW",xt,gt),Lt(["w","ww","W","WW"],(function(t,e,i,s){e[s.substr(0,1)]=ct(t)})),tt("d",0,"do","day"),tt("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),tt("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),tt("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),tt("e",0,0,"weekday"),tt("E",0,0,"isoWeekday"),rt("day","d"),rt("weekday","e"),rt("isoWeekday","E"),lt("day",11),lt("weekday",11),lt("isoWeekday",11),Tt("d",xt),Tt("e",xt),Tt("E",xt),Tt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),Tt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),Tt("dddd",(function(t,e){return e.weekdaysRegex(t)})),Lt(["dd","ddd","dddd"],(function(t,e,i,s){var r=i._locale.weekdaysParse(t,s,i._strict);null!=r?e.d=r:T(i).invalidWeekday=t})),Lt(["d","e","E"],(function(t,e,i,s){e[s]=ct(t)}));var me="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),fe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ge=Dt,be=Dt,we=Dt;function ye(t,e,i){var s,r,o,n=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)o=D([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(o,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(r=Bt.call(this._weekdaysParse,n))?r:null:"ddd"===e?-1!==(r=Bt.call(this._shortWeekdaysParse,n))?r:null:-1!==(r=Bt.call(this._minWeekdaysParse,n))?r:null:"dddd"===e?-1!==(r=Bt.call(this._weekdaysParse,n))||-1!==(r=Bt.call(this._shortWeekdaysParse,n))||-1!==(r=Bt.call(this._minWeekdaysParse,n))?r:null:"ddd"===e?-1!==(r=Bt.call(this._shortWeekdaysParse,n))||-1!==(r=Bt.call(this._weekdaysParse,n))||-1!==(r=Bt.call(this._minWeekdaysParse,n))?r:null:-1!==(r=Bt.call(this._minWeekdaysParse,n))||-1!==(r=Bt.call(this._weekdaysParse,n))||-1!==(r=Bt.call(this._shortWeekdaysParse,n))?r:null}function xe(){function t(t,e){return e.length-t.length}var e,i,s,r,o,n=[],a=[],l=[],h=[];for(e=0;e<7;e++)i=D([2e3,1]).day(e),s=Nt(this.weekdaysMin(i,"")),r=Nt(this.weekdaysShort(i,"")),o=Nt(this.weekdays(i,"")),n.push(s),a.push(r),l.push(o),h.push(s),h.push(r),h.push(o);n.sort(t),a.sort(t),l.sort(t),h.sort(t),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i")}function _e(){return this.hours()%12||12}function ke(t,e){tt(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Ce(t,e){return e._meridiemParse}tt("H",["HH",2],0,"hour"),tt("h",["hh",2],0,_e),tt("k",["kk",2],0,(function(){return this.hours()||24})),tt("hmm",0,0,(function(){return""+_e.apply(this)+K(this.minutes(),2)})),tt("hmmss",0,0,(function(){return""+_e.apply(this)+K(this.minutes(),2)+K(this.seconds(),2)})),tt("Hmm",0,0,(function(){return""+this.hours()+K(this.minutes(),2)})),tt("Hmmss",0,0,(function(){return""+this.hours()+K(this.minutes(),2)+K(this.seconds(),2)})),ke("a",!0),ke("A",!1),rt("hour","h"),lt("hour",13),Tt("a",Ce),Tt("A",Ce),Tt("H",xt),Tt("h",xt),Tt("k",xt),Tt("HH",xt,gt),Tt("hh",xt,gt),Tt("kk",xt,gt),Tt("hmm",_t),Tt("hmmss",kt),Tt("Hmm",_t),Tt("Hmmss",kt),Ot(["H","HH"],Gt),Ot(["k","kk"],(function(t,e){var i=ct(t);e[Gt]=24===i?0:i})),Ot(["a","A"],(function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t})),Ot(["h","hh"],(function(t,e,i){e[Gt]=ct(t),T(i).bigHour=!0})),Ot("hmm",(function(t,e,i){var s=t.length-2;e[Gt]=ct(t.substr(0,s)),e[Ht]=ct(t.substr(s)),T(i).bigHour=!0})),Ot("hmmss",(function(t,e,i){var s=t.length-4,r=t.length-2;e[Gt]=ct(t.substr(0,s)),e[Ht]=ct(t.substr(s,2)),e[Vt]=ct(t.substr(r)),T(i).bigHour=!0})),Ot("Hmm",(function(t,e){var i=t.length-2;e[Gt]=ct(t.substr(0,i)),e[Ht]=ct(t.substr(i))})),Ot("Hmmss",(function(t,e){var i=t.length-4,s=t.length-2;e[Gt]=ct(t.substr(0,i)),e[Ht]=ct(t.substr(i,2)),e[Vt]=ct(t.substr(s))}));var Se,Ee=ut("Hours",!0),Pe={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Jt,monthsShort:Xt,week:{dow:0,doy:6},weekdays:me,weekdaysMin:fe,weekdaysShort:ve,meridiemParse:/[ap]\.?m?\.?/i},Ae={},Ie={};function Me(t,e){var i,s=Math.min(t.length,e.length);for(i=0;i<s;i+=1)if(t[i]!==e[i])return i;return s}function De(t){return t?t.toLowerCase().replace("_","-"):t}function Te(t){var e=null;if(void 0===Ae[t]&&"undefined"!=typeof module&&module&&module.exports&&function(t){return null!=t.match("^[^/\\\\]*$")}(t))try{e=Se._abbr,require("./locale/"+t),ze(e)}catch(e){Ae[t]=null}return Ae[t]}function ze(t,e){var i;return t&&((i=E(e)?Fe(t):Ne(t,e))?Se=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Se._abbr}function Ne(t,e){if(null!==e){var i,s=Pe;if(e.abbr=t,null!=Ae[t])V("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=Ae[t]._config;else if(null!=e.parentLocale)if(null!=Ae[e.parentLocale])s=Ae[e.parentLocale]._config;else{if(null==(i=Te(e.parentLocale)))return Ie[e.parentLocale]||(Ie[e.parentLocale]=[]),Ie[e.parentLocale].push({name:t,config:e}),null;s=i._config}return Ae[t]=new q(W(s,e)),Ie[t]&&Ie[t].forEach((function(t){Ne(t.name,t.config)})),ze(t),Ae[t]}return delete Ae[t],null}function Fe(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Se;if(!_(t)){if(e=Te(t))return e;t=[t]}return function(t){for(var e,i,s,r,o=0;o<t.length;){for(e=(r=De(t[o]).split("-")).length,i=(i=De(t[o+1]))?i.split("-"):null;e>0;){if(s=Te(r.slice(0,e).join("-")))return s;if(i&&i.length>=e&&Me(r,i)>=e-1)break;e--}o++}return Se}(t)}function Oe(t){var e,i=t._a;return i&&-2===T(t).overflow&&(e=i[Yt]<0||i[Yt]>11?Yt:i[Rt]<1||i[Rt]>Kt(i[jt],i[Yt])?Rt:i[Gt]<0||i[Gt]>24||24===i[Gt]&&(0!==i[Ht]||0!==i[Vt]||0!==i[$t])?Gt:i[Ht]<0||i[Ht]>59?Ht:i[Vt]<0||i[Vt]>59?Vt:i[$t]<0||i[$t]>999?$t:-1,T(t)._overflowDayOfYear&&(e<jt||e>Rt)&&(e=Rt),T(t)._overflowWeeks&&-1===e&&(e=Wt),T(t)._overflowWeekday&&-1===e&&(e=qt),T(t).overflow=e),t}var Le=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ue=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Be=/Z|[+-]\d\d(?::?\d\d)?/,je=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ye=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Re=/^\/?Date\((-?\d+)/i,Ge=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,He={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ve(t){var e,i,s,r,o,n,a=t._i,l=Le.exec(a)||Ue.exec(a),h=je.length,d=Ye.length;if(l){for(T(t).iso=!0,e=0,i=h;e<i;e++)if(je[e][1].exec(l[1])){r=je[e][0],s=!1!==je[e][2];break}if(null==r)return void(t._isValid=!1);if(l[3]){for(e=0,i=d;e<i;e++)if(Ye[e][1].exec(l[3])){o=(l[2]||" ")+Ye[e][0];break}if(null==o)return void(t._isValid=!1)}if(!s&&null!=o)return void(t._isValid=!1);if(l[4]){if(!Be.exec(l[4]))return void(t._isValid=!1);n="Z"}t._f=r+(o||"")+(n||""),Ke(t)}else t._isValid=!1}function $e(t){var e,i,s,r,o,n,a,l,h,d=Ge.exec(t._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(d){if(i=d[3],s=d[2],r=d[5],o=d[6],n=d[7],a=[(l=d[4],h=parseInt(l,10),h<=49?2e3+h:h<=999?1900+h:h),Xt.indexOf(i),parseInt(s,10),parseInt(r,10),parseInt(o,10)],n&&a.push(parseInt(n,10)),!function(t,e,i){return!t||ve.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(T(i).weekdayMismatch=!0,i._isValid=!1,!1)}(d[1],e=a,t))return;t._a=e,t._tzm=function(t,e,i){if(t)return He[t];if(e)return 0;var s=parseInt(i,10),r=s%100;return(s-r)/100*60+r}(d[8],d[9],d[10]),t._d=le.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),T(t).rfc2822=!0}else t._isValid=!1}function We(t,e,i){return null!=t?t:null!=e?e:i}function qe(t){var e,i,s,r,o,n=[];if(!t._d){for(s=function(t){var e=new Date(x.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[Rt]&&null==t._a[Yt]&&function(t){var e,i,s,r,o,n,a,l,h;null!=(e=t._w).GG||null!=e.W||null!=e.E?(o=1,n=4,i=We(e.GG,t._a[jt],ce(Qe(),1,4).year),s=We(e.W,1),((r=We(e.E,1))<1||r>7)&&(l=!0)):(o=t._locale._week.dow,n=t._locale._week.doy,h=ce(Qe(),o,n),i=We(e.gg,t._a[jt],h.year),s=We(e.w,h.week),null!=e.d?((r=e.d)<0||r>6)&&(l=!0):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o),s<1||s>ue(i,o,n)?T(t)._overflowWeeks=!0:null!=l?T(t)._overflowWeekday=!0:(a=de(i,s,r,o,n),t._a[jt]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(o=We(t._a[jt],s[jt]),(t._dayOfYear>oe(o)||0===t._dayOfYear)&&(T(t)._overflowDayOfYear=!0),i=le(o,0,t._dayOfYear),t._a[Yt]=i.getUTCMonth(),t._a[Rt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=n[e]=s[e];for(;e<7;e++)t._a[e]=n[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Gt]&&0===t._a[Ht]&&0===t._a[Vt]&&0===t._a[$t]&&(t._nextDay=!0,t._a[Gt]=0),t._d=(t._useUTC?le:ae).apply(null,n),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Gt]=24),t._w&&void 0!==t._w.d&&t._w.d!==r&&(T(t).weekdayMismatch=!0)}}function Ke(t){if(t._f!==x.ISO_8601)if(t._f!==x.RFC_2822){t._a=[],T(t).empty=!0;var e,i,s,r,o,n,a,l=""+t._i,h=l.length,d=0;for(a=(s=it(t._f,t._locale).match(J)||[]).length,e=0;e<a;e++)(i=(l.match(zt(r=s[e],t))||[])[0])&&((o=l.substr(0,l.indexOf(i))).length>0&&T(t).unusedInput.push(o),l=l.slice(l.indexOf(i)+i.length),d+=i.length),Z[r]?(i?T(t).empty=!1:T(t).unusedTokens.push(r),Ut(r,i,t)):t._strict&&!i&&T(t).unusedTokens.push(r);T(t).charsLeftOver=h-d,l.length>0&&T(t).unusedInput.push(l),t._a[Gt]<=12&&!0===T(t).bigHour&&t._a[Gt]>0&&(T(t).bigHour=void 0),T(t).parsedDateParts=t._a.slice(0),T(t).meridiem=t._meridiem,t._a[Gt]=function(t,e,i){var s;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((s=t.isPM(i))&&e<12&&(e+=12),s||12!==e||(e=0),e):e}(t._locale,t._a[Gt],t._meridiem),null!==(n=T(t).era)&&(t._a[jt]=t._locale.erasConvertYear(n,t._a[jt])),qe(t),Oe(t)}else $e(t);else Ve(t)}function Je(t){var e=t._i,i=t._f;return t._locale=t._locale||Fe(t._l),null===e||void 0===i&&""===e?N({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),j(e)?new U(Oe(e)):(A(e)?t._d=e:_(i)?function(t){var e,i,s,r,o,n,a=!1,l=t._f.length;if(0===l)return T(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;r<l;r++)o=0,n=!1,e=L({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],Ke(e),z(e)&&(n=!0),o+=T(e).charsLeftOver,o+=10*T(e).unusedTokens.length,T(e).score=o,a?o<s&&(s=o,i=e):(null==s||o<s||n)&&(s=o,i=e,n&&(a=!0));M(t,i||e)}(t):i?Ke(t):function(t){var e=t._i;E(e)?t._d=new Date(x.now()):A(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=Re.exec(t._i);null===e?(Ve(t),!1===t._isValid&&(delete t._isValid,$e(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:x.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):_(e)?(t._a=I(e.slice(0),(function(t){return parseInt(t,10)})),qe(t)):k(e)?function(t){if(!t._d){var e=nt(t._i);t._a=I([e.year,e.month,void 0===e.day?e.date:e.day,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),qe(t)}}(t):P(e)?t._d=new Date(e):x.createFromInputFallback(t)}(t),z(t)||(t._d=null),t))}function Xe(t,e,i,s,r){var o,n={};return!0!==e&&!1!==e||(s=e,e=void 0),!0!==i&&!1!==i||(s=i,i=void 0),(k(t)&&S(t)||_(t)&&0===t.length)&&(t=void 0),n._isAMomentObject=!0,n._useUTC=n._isUTC=r,n._l=i,n._i=t,n._f=e,n._strict=s,(o=new U(Oe(Je(n))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function Qe(t,e,i,s){return Xe(t,e,i,s,!1)}x.createFromInputFallback=R("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),x.ISO_8601=function(){},x.RFC_2822=function(){};var Ze=R("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Qe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:N()})),ti=R("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Qe.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:N()}));function ei(t,e){var i,s;if(1===e.length&&_(e[0])&&(e=e[0]),!e.length)return Qe();for(i=e[0],s=1;s<e.length;++s)e[s].isValid()&&!e[s][t](i)||(i=e[s]);return i}var ii=["year","quarter","month","week","day","hour","minute","second","millisecond"];function si(t){var e=nt(t),i=e.year||0,s=e.quarter||0,r=e.month||0,o=e.week||e.isoWeek||0,n=e.day||0,a=e.hour||0,l=e.minute||0,h=e.second||0,d=e.millisecond||0;this._isValid=function(t){var e,i,s=!1,r=ii.length;for(e in t)if(C(t,e)&&(-1===Bt.call(ii,e)||null!=t[e]&&isNaN(t[e])))return!1;for(i=0;i<r;++i)if(t[ii[i]]){if(s)return!1;parseFloat(t[ii[i]])!==ct(t[ii[i]])&&(s=!0)}return!0}(e),this._milliseconds=+d+1e3*h+6e4*l+1e3*a*60*60,this._days=+n+7*o,this._months=+r+3*s+12*i,this._data={},this._locale=Fe(),this._bubble()}function ri(t){return t instanceof si}function oi(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function ni(t,e){tt(t,0,0,(function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+K(~~(t/60),2)+e+K(~~t%60,2)}))}ni("Z",":"),ni("ZZ",""),Tt("Z",Mt),Tt("ZZ",Mt),Ot(["Z","ZZ"],(function(t,e,i){i._useUTC=!0,i._tzm=li(Mt,t)}));var ai=/([\+\-]|\d\d)/gi;function li(t,e){var i,s,r=(e||"").match(t);return null===r?null:0===(s=60*(i=((r[r.length-1]||[])+"").match(ai)||["-",0,0])[1]+ct(i[2]))?0:"+"===i[0]?s:-s}function hi(t,e){var i,s;return e._isUTC?(i=e.clone(),s=(j(t)||A(t)?t.valueOf():Qe(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+s),x.updateOffset(i,!1),i):Qe(t).local()}function di(t){return-Math.round(t._d.getTimezoneOffset())}function ci(){return!!this.isValid()&&this._isUTC&&0===this._offset}x.updateOffset=function(){};var ui=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,pi=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function mi(t,e){var i,s,r,o,n,a,l=t,h=null;return ri(t)?l={ms:t._milliseconds,d:t._days,M:t._months}:P(t)||!isNaN(+t)?(l={},e?l[e]=+t:l.milliseconds=+t):(h=ui.exec(t))?(i="-"===h[1]?-1:1,l={y:0,d:ct(h[Rt])*i,h:ct(h[Gt])*i,m:ct(h[Ht])*i,s:ct(h[Vt])*i,ms:ct(oi(1e3*h[$t]))*i}):(h=pi.exec(t))?l={y:vi(h[2],i="-"===h[1]?-1:1),M:vi(h[3],i),w:vi(h[4],i),d:vi(h[5],i),h:vi(h[6],i),m:vi(h[7],i),s:vi(h[8],i)}:null==l?l={}:"object"==typeof l&&("from"in l||"to"in l)&&(o=Qe(l.from),n=Qe(l.to),r=o.isValid()&&n.isValid()?(n=hi(n,o),o.isBefore(n)?a=fi(o,n):((a=fi(n,o)).milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0},(l={}).ms=r.milliseconds,l.M=r.months),s=new si(l),ri(t)&&C(t,"_locale")&&(s._locale=t._locale),ri(t)&&C(t,"_isValid")&&(s._isValid=t._isValid),s}function vi(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function fi(t,e){var i={};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function gi(t,e){return function(i,s){var r;return null===s||isNaN(+s)||(V(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=i,i=s,s=r),bi(this,mi(i,s),t),this}}function bi(t,e,i,s){var r=e._milliseconds,o=oi(e._days),n=oi(e._months);t.isValid()&&(s=null==s||s,n&&ie(t,pt(t,"Month")+n*i),o&&mt(t,"Date",pt(t,"Date")+o*i),r&&t._d.setTime(t._d.valueOf()+r*i),s&&x.updateOffset(t,o||n))}mi.fn=si.prototype,mi.invalid=function(){return mi(NaN)};var wi=gi(1,"add"),yi=gi(-1,"subtract");function xi(t){return"string"==typeof t||t instanceof String}function _i(t,e){if(t.date()<e.date())return-_i(e,t);var i=12*(e.year()-t.year())+(e.month()-t.month()),s=t.clone().add(i,"months");return-(i+(e-s<0?(e-s)/(s-t.clone().add(i-1,"months")):(e-s)/(t.clone().add(i+1,"months")-s)))||0}function ki(t){var e;return void 0===t?this._locale._abbr:(null!=(e=Fe(t))&&(this._locale=e),this)}x.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",x.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ci=R("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function Si(){return this._locale}var Ei=1e3,Pi=6e4,Ai=36e5,Ii=126227808e5;function Mi(t,e){return(t%e+e)%e}function Di(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-Ii:new Date(t,e,i).valueOf()}function Ti(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-Ii:Date.UTC(t,e,i)}function zi(t,e){return e.erasAbbrRegex(t)}function Ni(){var t,e,i=[],s=[],r=[],o=[],n=this.eras();for(t=0,e=n.length;t<e;++t)s.push(Nt(n[t].name)),i.push(Nt(n[t].abbr)),r.push(Nt(n[t].narrow)),o.push(Nt(n[t].name)),o.push(Nt(n[t].abbr)),o.push(Nt(n[t].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function Fi(t,e){tt(0,[t,t.length],0,e)}function Oi(t,e,i,s,r){var o;return null==t?ce(this,s,r).year:(e>(o=ue(t,s,r))&&(e=o),Li.call(this,t,e,i,s,r))}function Li(t,e,i,s,r){var o=de(t,e,i,s,r),n=le(o.year,0,o.dayOfYear);return this.year(n.getUTCFullYear()),this.month(n.getUTCMonth()),this.date(n.getUTCDate()),this}tt("N",0,0,"eraAbbr"),tt("NN",0,0,"eraAbbr"),tt("NNN",0,0,"eraAbbr"),tt("NNNN",0,0,"eraName"),tt("NNNNN",0,0,"eraNarrow"),tt("y",["y",1],"yo","eraYear"),tt("y",["yy",2],0,"eraYear"),tt("y",["yyy",3],0,"eraYear"),tt("y",["yyyy",4],0,"eraYear"),Tt("N",zi),Tt("NN",zi),Tt("NNN",zi),Tt("NNNN",(function(t,e){return e.erasNameRegex(t)})),Tt("NNNNN",(function(t,e){return e.erasNarrowRegex(t)})),Ot(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,i,s){var r=i._locale.erasParse(t,s,i._strict);r?T(i).era=r:T(i).invalidEra=t})),Tt("y",Pt),Tt("yy",Pt),Tt("yyy",Pt),Tt("yyyy",Pt),Tt("yo",(function(t,e){return e._eraYearOrdinalRegex||Pt})),Ot(["y","yy","yyy","yyyy"],jt),Ot(["yo"],(function(t,e,i){var s;i._locale._eraYearOrdinalRegex&&(s=t.match(i._locale._eraYearOrdinalRegex)),e[jt]=i._locale.eraYearOrdinalParse?i._locale.eraYearOrdinalParse(t,s):parseInt(t,10)})),tt(0,["gg",2],0,(function(){return this.weekYear()%100})),tt(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Fi("gggg","weekYear"),Fi("ggggg","weekYear"),Fi("GGGG","isoWeekYear"),Fi("GGGGG","isoWeekYear"),rt("weekYear","gg"),rt("isoWeekYear","GG"),lt("weekYear",1),lt("isoWeekYear",1),Tt("G",At),Tt("g",At),Tt("GG",xt,gt),Tt("gg",xt,gt),Tt("GGGG",St,wt),Tt("gggg",St,wt),Tt("GGGGG",Et,yt),Tt("ggggg",Et,yt),Lt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,i,s){e[s.substr(0,2)]=ct(t)})),Lt(["gg","GG"],(function(t,e,i,s){e[s]=x.parseTwoDigitYear(t)})),tt("Q",0,"Qo","quarter"),rt("quarter","Q"),lt("quarter",7),Tt("Q",ft),Ot("Q",(function(t,e){e[Yt]=3*(ct(t)-1)})),tt("D",["DD",2],"Do","date"),rt("date","D"),lt("date",9),Tt("D",xt),Tt("DD",xt,gt),Tt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),Ot(["D","DD"],Rt),Ot("Do",(function(t,e){e[Rt]=ct(t.match(xt)[0])}));var Ui=ut("Date",!0);tt("DDD",["DDDD",3],"DDDo","dayOfYear"),rt("dayOfYear","DDD"),lt("dayOfYear",4),Tt("DDD",Ct),Tt("DDDD",bt),Ot(["DDD","DDDD"],(function(t,e,i){i._dayOfYear=ct(t)})),tt("m",["mm",2],0,"minute"),rt("minute","m"),lt("minute",14),Tt("m",xt),Tt("mm",xt,gt),Ot(["m","mm"],Ht);var Bi=ut("Minutes",!1);tt("s",["ss",2],0,"second"),rt("second","s"),lt("second",15),Tt("s",xt),Tt("ss",xt,gt),Ot(["s","ss"],Vt);var ji,Yi,Ri=ut("Seconds",!1);for(tt("S",0,0,(function(){return~~(this.millisecond()/100)})),tt(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),tt(0,["SSS",3],0,"millisecond"),tt(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),tt(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),tt(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),tt(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),tt(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),tt(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),rt("millisecond","ms"),lt("millisecond",16),Tt("S",Ct,ft),Tt("SS",Ct,gt),Tt("SSS",Ct,bt),ji="SSSS";ji.length<=9;ji+="S")Tt(ji,Pt);function Gi(t,e){e[$t]=ct(1e3*("0."+t))}for(ji="S";ji.length<=9;ji+="S")Ot(ji,Gi);Yi=ut("Milliseconds",!1),tt("z",0,0,"zoneAbbr"),tt("zz",0,0,"zoneName");var Hi=U.prototype;function Vi(t){return t}Hi.add=wi,Hi.calendar=function(t,e){var i;1===arguments.length&&(arguments[0]?j(i=arguments[0])||A(i)||xi(i)||P(i)||function(t){var e=_(t),i=!1;return e&&(i=0===t.filter((function(e){return!P(e)&&xi(t)})).length),e&&i}(i)||function(t){var e,i=k(t)&&!S(t),s=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o=r.length;for(e=0;e<o;e+=1)s=s||C(t,r[e]);return i&&s}(i)||null==i?(t=arguments[0],e=void 0):function(t){var e,i=k(t)&&!S(t),s=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<r.length;e+=1)s=s||C(t,r[e]);return i&&s}(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var s=t||Qe(),r=hi(s,this).startOf("day"),o=x.calendarFormat(this,r)||"sameElse",n=e&&($(e[o])?e[o].call(this,s):e[o]);return this.format(n||this.localeData().calendar(o,this,Qe(s)))},Hi.clone=function(){return new U(this)},Hi.diff=function(t,e,i){var s,r,o;if(!this.isValid())return NaN;if(!(s=hi(t,this)).isValid())return NaN;switch(r=6e4*(s.utcOffset()-this.utcOffset()),e=ot(e)){case"year":o=_i(this,s)/12;break;case"month":o=_i(this,s);break;case"quarter":o=_i(this,s)/3;break;case"second":o=(this-s)/1e3;break;case"minute":o=(this-s)/6e4;break;case"hour":o=(this-s)/36e5;break;case"day":o=(this-s-r)/864e5;break;case"week":o=(this-s-r)/6048e5;break;default:o=this-s}return i?o:dt(o)},Hi.endOf=function(t){var e,i;if(void 0===(t=ot(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?Ti:Di,t){case"year":e=i(this.year()+1,0,1)-1;break;case"quarter":e=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=i(this.year(),this.month()+1,1)-1;break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Ai-Mi(e+(this._isUTC?0:this.utcOffset()*Pi),Ai)-1;break;case"minute":e=this._d.valueOf(),e+=Pi-Mi(e,Pi)-1;break;case"second":e=this._d.valueOf(),e+=Ei-Mi(e,Ei)-1}return this._d.setTime(e),x.updateOffset(this,!0),this},Hi.format=function(t){t||(t=this.isUtc()?x.defaultFormatUtc:x.defaultFormat);var e=et(this,t);return this.localeData().postformat(e)},Hi.from=function(t,e){return this.isValid()&&(j(t)&&t.isValid()||Qe(t).isValid())?mi({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Hi.fromNow=function(t){return this.from(Qe(),t)},Hi.to=function(t,e){return this.isValid()&&(j(t)&&t.isValid()||Qe(t).isValid())?mi({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Hi.toNow=function(t){return this.to(Qe(),t)},Hi.get=function(t){return $(this[t=ot(t)])?this[t]():this},Hi.invalidAt=function(){return T(this).overflow},Hi.isAfter=function(t,e){var i=j(t)?t:Qe(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=ot(e)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},Hi.isBefore=function(t,e){var i=j(t)?t:Qe(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=ot(e)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},Hi.isBetween=function(t,e,i,s){var r=j(t)?t:Qe(t),o=j(e)?e:Qe(e);return!!(this.isValid()&&r.isValid()&&o.isValid())&&("("===(s=s||"()")[0]?this.isAfter(r,i):!this.isBefore(r,i))&&(")"===s[1]?this.isBefore(o,i):!this.isAfter(o,i))},Hi.isSame=function(t,e){var i,s=j(t)?t:Qe(t);return!(!this.isValid()||!s.isValid())&&("millisecond"===(e=ot(e)||"millisecond")?this.valueOf()===s.valueOf():(i=s.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},Hi.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},Hi.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},Hi.isValid=function(){return z(this)},Hi.lang=Ci,Hi.locale=ki,Hi.localeData=Si,Hi.max=ti,Hi.min=Ze,Hi.parsingFlags=function(){return M({},T(this))},Hi.set=function(t,e){if("object"==typeof t){var i,s=function(t){var e,i=[];for(e in t)C(t,e)&&i.push({unit:e,priority:at[e]});return i.sort((function(t,e){return t.priority-e.priority})),i}(t=nt(t)),r=s.length;for(i=0;i<r;i++)this[s[i].unit](t[s[i].unit])}else if($(this[t=ot(t)]))return this[t](e);return this},Hi.startOf=function(t){var e,i;if(void 0===(t=ot(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?Ti:Di,t){case"year":e=i(this.year(),0,1);break;case"quarter":e=i(this.year(),this.month()-this.month()%3,1);break;case"month":e=i(this.year(),this.month(),1);break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=i(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Mi(e+(this._isUTC?0:this.utcOffset()*Pi),Ai);break;case"minute":e=this._d.valueOf(),e-=Mi(e,Pi);break;case"second":e=this._d.valueOf(),e-=Mi(e,Ei)}return this._d.setTime(e),x.updateOffset(this,!0),this},Hi.subtract=yi,Hi.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},Hi.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},Hi.toDate=function(){return new Date(this.valueOf())},Hi.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,i=e?this.clone().utc():this;return i.year()<0||i.year()>9999?et(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):$(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",et(i,"Z")):et(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Hi.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,i="moment",s="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),t="["+i+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+s+'[")]')},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Hi[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Hi.toJSON=function(){return this.isValid()?this.toISOString():null},Hi.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Hi.unix=function(){return Math.floor(this.valueOf()/1e3)},Hi.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Hi.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Hi.eraName=function(){var t,e,i,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),s[t].since<=i&&i<=s[t].until)return s[t].name;if(s[t].until<=i&&i<=s[t].since)return s[t].name}return""},Hi.eraNarrow=function(){var t,e,i,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),s[t].since<=i&&i<=s[t].until)return s[t].narrow;if(s[t].until<=i&&i<=s[t].since)return s[t].narrow}return""},Hi.eraAbbr=function(){var t,e,i,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),s[t].since<=i&&i<=s[t].until)return s[t].abbr;if(s[t].until<=i&&i<=s[t].since)return s[t].abbr}return""},Hi.eraYear=function(){var t,e,i,s,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(i=r[t].since<=r[t].until?1:-1,s=this.clone().startOf("day").valueOf(),r[t].since<=s&&s<=r[t].until||r[t].until<=s&&s<=r[t].since)return(this.year()-x(r[t].since).year())*i+r[t].offset;return this.year()},Hi.year=ne,Hi.isLeapYear=function(){return ht(this.year())},Hi.weekYear=function(t){return Oi.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Hi.isoWeekYear=function(t){return Oi.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},Hi.quarter=Hi.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},Hi.month=se,Hi.daysInMonth=function(){return Kt(this.year(),this.month())},Hi.week=Hi.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},Hi.isoWeek=Hi.isoWeeks=function(t){var e=ce(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},Hi.weeksInYear=function(){var t=this.localeData()._week;return ue(this.year(),t.dow,t.doy)},Hi.weeksInWeekYear=function(){var t=this.localeData()._week;return ue(this.weekYear(),t.dow,t.doy)},Hi.isoWeeksInYear=function(){return ue(this.year(),1,4)},Hi.isoWeeksInISOWeekYear=function(){return ue(this.isoWeekYear(),1,4)},Hi.date=Ui,Hi.day=Hi.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},Hi.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},Hi.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},Hi.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},Hi.hour=Hi.hours=Ee,Hi.minute=Hi.minutes=Bi,Hi.second=Hi.seconds=Ri,Hi.millisecond=Hi.milliseconds=Yi,Hi.utcOffset=function(t,e,i){var s,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=li(Mt,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&e&&(s=di(this)),this._offset=t,this._isUTC=!0,null!=s&&this.add(s,"m"),r!==t&&(!e||this._changeInProgress?bi(this,mi(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,x.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:di(this)},Hi.utc=function(t){return this.utcOffset(0,t)},Hi.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(di(this),"m")),this},Hi.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=li(It,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},Hi.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Qe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},Hi.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Hi.isLocal=function(){return!!this.isValid()&&!this._isUTC},Hi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Hi.isUtc=ci,Hi.isUTC=ci,Hi.zoneAbbr=function(){return this._isUTC?"UTC":""},Hi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Hi.dates=R("dates accessor is deprecated. Use date instead.",Ui),Hi.months=R("months accessor is deprecated. Use month instead",se),Hi.years=R("years accessor is deprecated. Use year instead",ne),Hi.zone=R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),Hi.isDSTShifted=R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!E(this._isDSTShifted))return this._isDSTShifted;var t,e={};return L(e,this),(e=Je(e))._a?(t=e._isUTC?D(e._a):Qe(e._a),this._isDSTShifted=this.isValid()&&function(t,e){var i,s=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),o=0;for(i=0;i<s;i++)ct(t[i])!==ct(e[i])&&o++;return o+r}(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var $i=q.prototype;function Wi(t,e,i,s){var r=Fe(),o=D().set(s,e);return r[i](o,t)}function qi(t,e,i){if(P(t)&&(e=t,t=void 0),t=t||"",null!=e)return Wi(t,e,i,"month");var s,r=[];for(s=0;s<12;s++)r[s]=Wi(t,s,i,"month");return r}function Ki(t,e,i,s){"boolean"==typeof t?(P(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,P(e)&&(i=e,e=void 0),e=e||"");var r,o=Fe(),n=t?o._week.dow:0,a=[];if(null!=i)return Wi(e,(i+n)%7,s,"day");for(r=0;r<7;r++)a[r]=Wi(e,(r+n)%7,s,"day");return a}$i.calendar=function(t,e,i){var s=this._calendar[t]||this._calendar.sameElse;return $(s)?s.call(e,i):s},$i.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.match(J).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])},$i.invalidDate=function(){return this._invalidDate},$i.ordinal=function(t){return this._ordinal.replace("%d",t)},$i.preparse=Vi,$i.postformat=Vi,$i.relativeTime=function(t,e,i,s){var r=this._relativeTime[i];return $(r)?r(t,e,i,s):r.replace(/%d/i,t)},$i.pastFuture=function(t,e){var i=this._relativeTime[t>0?"future":"past"];return $(i)?i(e):i.replace(/%s/i,e)},$i.set=function(t){var e,i;for(i in t)C(t,i)&&($(e=t[i])?this[i]=e:this["_"+i]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},$i.eras=function(){var t,e,i,s=this._eras||Fe("en")._eras;for(t=0,e=s.length;t<e;++t)switch("string"==typeof s[t].since&&(i=x(s[t].since).startOf("day"),s[t].since=i.valueOf()),typeof s[t].until){case"undefined":s[t].until=1/0;break;case"string":i=x(s[t].until).startOf("day").valueOf(),s[t].until=i.valueOf()}return s},$i.erasParse=function(t,e,i){var s,r,o,n,a,l=this.eras();for(t=t.toUpperCase(),s=0,r=l.length;s<r;++s)if(o=l[s].name.toUpperCase(),n=l[s].abbr.toUpperCase(),a=l[s].narrow.toUpperCase(),i)switch(e){case"N":case"NN":case"NNN":if(n===t)return l[s];break;case"NNNN":if(o===t)return l[s];break;case"NNNNN":if(a===t)return l[s]}else if([o,n,a].indexOf(t)>=0)return l[s]},$i.erasConvertYear=function(t,e){var i=t.since<=t.until?1:-1;return void 0===e?x(t.since).year():x(t.since).year()+(e-t.offset)*i},$i.erasAbbrRegex=function(t){return C(this,"_erasAbbrRegex")||Ni.call(this),t?this._erasAbbrRegex:this._erasRegex},$i.erasNameRegex=function(t){return C(this,"_erasNameRegex")||Ni.call(this),t?this._erasNameRegex:this._erasRegex},$i.erasNarrowRegex=function(t){return C(this,"_erasNarrowRegex")||Ni.call(this),t?this._erasNarrowRegex:this._erasRegex},$i.months=function(t,e){return t?_(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Qt).test(e)?"format":"standalone"][t.month()]:_(this._months)?this._months:this._months.standalone},$i.monthsShort=function(t,e){return t?_(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Qt.test(e)?"format":"standalone"][t.month()]:_(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},$i.monthsParse=function(t,e,i){var s,r,o;if(this._monthsParseExact)return ee.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(r=D([2e3,s]),i&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[s]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[s]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[s].test(t))return s;if(i&&"MMM"===e&&this._shortMonthsParse[s].test(t))return s;if(!i&&this._monthsParse[s].test(t))return s}},$i.monthsRegex=function(t){return this._monthsParseExact?(C(this,"_monthsRegex")||re.call(this),t?this._monthsStrictRegex:this._monthsRegex):(C(this,"_monthsRegex")||(this._monthsRegex=te),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},$i.monthsShortRegex=function(t){return this._monthsParseExact?(C(this,"_monthsRegex")||re.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(C(this,"_monthsShortRegex")||(this._monthsShortRegex=Zt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},$i.week=function(t){return ce(t,this._week.dow,this._week.doy).week},$i.firstDayOfYear=function(){return this._week.doy},$i.firstDayOfWeek=function(){return this._week.dow},$i.weekdays=function(t,e){var i=_(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?pe(i,this._week.dow):t?i[t.day()]:i},$i.weekdaysMin=function(t){return!0===t?pe(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},$i.weekdaysShort=function(t){return!0===t?pe(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},$i.weekdaysParse=function(t,e,i){var s,r,o;if(this._weekdaysParseExact)return ye.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(r=D([2e3,1]).day(s),i&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[s]=new RegExp(o.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[s].test(t))return s;if(i&&"ddd"===e&&this._shortWeekdaysParse[s].test(t))return s;if(i&&"dd"===e&&this._minWeekdaysParse[s].test(t))return s;if(!i&&this._weekdaysParse[s].test(t))return s}},$i.weekdaysRegex=function(t){return this._weekdaysParseExact?(C(this,"_weekdaysRegex")||xe.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(C(this,"_weekdaysRegex")||(this._weekdaysRegex=ge),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},$i.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(C(this,"_weekdaysRegex")||xe.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(C(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=be),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},$i.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(C(this,"_weekdaysRegex")||xe.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(C(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=we),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},$i.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},$i.meridiem=function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},ze("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===ct(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),x.lang=R("moment.lang is deprecated. Use moment.locale instead.",ze),x.langData=R("moment.langData is deprecated. Use moment.localeData instead.",Fe);var Ji=Math.abs;function Xi(t,e,i,s){var r=mi(e,i);return t._milliseconds+=s*r._milliseconds,t._days+=s*r._days,t._months+=s*r._months,t._bubble()}function Qi(t){return t<0?Math.floor(t):Math.ceil(t)}function Zi(t){return 4800*t/146097}function ts(t){return 146097*t/4800}function es(t){return function(){return this.as(t)}}var is=es("ms"),ss=es("s"),rs=es("m"),os=es("h"),ns=es("d"),as=es("w"),ls=es("M"),hs=es("Q"),ds=es("y");function cs(t){return function(){return this.isValid()?this._data[t]:NaN}}var us=cs("milliseconds"),ps=cs("seconds"),ms=cs("minutes"),vs=cs("hours"),fs=cs("days"),gs=cs("months"),bs=cs("years"),ws=Math.round,ys={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function xs(t,e,i,s,r){return r.relativeTime(e||1,!!i,t,s)}var _s=Math.abs;function ks(t){return(t>0)-(t<0)||+t}function Cs(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,s,r,o,n,a,l=_s(this._milliseconds)/1e3,h=_s(this._days),d=_s(this._months),c=this.asSeconds();return c?(t=dt(l/60),e=dt(t/60),l%=60,t%=60,i=dt(d/12),d%=12,s=l?l.toFixed(3).replace(/\.?0+$/,""):"",r=c<0?"-":"",o=ks(this._months)!==ks(c)?"-":"",n=ks(this._days)!==ks(c)?"-":"",a=ks(this._milliseconds)!==ks(c)?"-":"",r+"P"+(i?o+i+"Y":"")+(d?o+d+"M":"")+(h?n+h+"D":"")+(e||t||l?"T":"")+(e?a+e+"H":"")+(t?a+t+"M":"")+(l?a+s+"S":"")):"P0D"}var Ss=si.prototype;Ss.isValid=function(){return this._isValid},Ss.abs=function(){var t=this._data;return this._milliseconds=Ji(this._milliseconds),this._days=Ji(this._days),this._months=Ji(this._months),t.milliseconds=Ji(t.milliseconds),t.seconds=Ji(t.seconds),t.minutes=Ji(t.minutes),t.hours=Ji(t.hours),t.months=Ji(t.months),t.years=Ji(t.years),this},Ss.add=function(t,e){return Xi(this,t,e,1)},Ss.subtract=function(t,e){return Xi(this,t,e,-1)},Ss.as=function(t){if(!this.isValid())return NaN;var e,i,s=this._milliseconds;if("month"===(t=ot(t))||"quarter"===t||"year"===t)switch(i=this._months+Zi(e=this._days+s/864e5),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(ts(this._months)),t){case"week":return e/7+s/6048e5;case"day":return e+s/864e5;case"hour":return 24*e+s/36e5;case"minute":return 1440*e+s/6e4;case"second":return 86400*e+s/1e3;case"millisecond":return Math.floor(864e5*e)+s;default:throw new Error("Unknown unit "+t)}},Ss.asMilliseconds=is,Ss.asSeconds=ss,Ss.asMinutes=rs,Ss.asHours=os,Ss.asDays=ns,Ss.asWeeks=as,Ss.asMonths=ls,Ss.asQuarters=hs,Ss.asYears=ds,Ss.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ct(this._months/12):NaN},Ss._bubble=function(){var t,e,i,s,r,o=this._milliseconds,n=this._days,a=this._months,l=this._data;return o>=0&&n>=0&&a>=0||o<=0&&n<=0&&a<=0||(o+=864e5*Qi(ts(a)+n),n=0,a=0),l.milliseconds=o%1e3,t=dt(o/1e3),l.seconds=t%60,e=dt(t/60),l.minutes=e%60,i=dt(e/60),l.hours=i%24,n+=dt(i/24),a+=r=dt(Zi(n)),n-=Qi(ts(r)),s=dt(a/12),a%=12,l.days=n,l.months=a,l.years=s,this},Ss.clone=function(){return mi(this)},Ss.get=function(t){return t=ot(t),this.isValid()?this[t+"s"]():NaN},Ss.milliseconds=us,Ss.seconds=ps,Ss.minutes=ms,Ss.hours=vs,Ss.days=fs,Ss.weeks=function(){return dt(this.days()/7)},Ss.months=gs,Ss.years=bs,Ss.humanize=function(t,e){if(!this.isValid())return this.localeData().invalidDate();var i,s,r=!1,o=ys;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(r=t),"object"==typeof e&&(o=Object.assign({},ys,e),null!=e.s&&null==e.ss&&(o.ss=e.s-1)),s=function(t,e,i,s){var r=mi(t).abs(),o=ws(r.as("s")),n=ws(r.as("m")),a=ws(r.as("h")),l=ws(r.as("d")),h=ws(r.as("M")),d=ws(r.as("w")),c=ws(r.as("y")),u=o<=i.ss&&["s",o]||o<i.s&&["ss",o]||n<=1&&["m"]||n<i.m&&["mm",n]||a<=1&&["h"]||a<i.h&&["hh",a]||l<=1&&["d"]||l<i.d&&["dd",l];return null!=i.w&&(u=u||d<=1&&["w"]||d<i.w&&["ww",d]),(u=u||h<=1&&["M"]||h<i.M&&["MM",h]||c<=1&&["y"]||["yy",c])[2]=e,u[3]=+t>0,u[4]=s,xs.apply(null,u)}(this,!r,o,i=this.localeData()),r&&(s=i.pastFuture(+this,s)),i.postformat(s)},Ss.toISOString=Cs,Ss.toString=Cs,Ss.toJSON=Cs,Ss.locale=ki,Ss.localeData=Si,Ss.toIsoString=R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Cs),Ss.lang=Ci,tt("X",0,0,"unix"),tt("x",0,0,"valueOf"),Tt("x",At),Tt("X",/[+-]?\d+(\.\d{1,3})?/),Ot("X",(function(t,e,i){i._d=new Date(1e3*parseFloat(t))})),Ot("x",(function(t,e,i){i._d=new Date(ct(t))})),
|
|
8
8
|
//! moment.js
|
|
9
|
-
x.version="2.29.4",w=Qe,x.fn=Hi,x.min=function(){return ei("isBefore",[].slice.call(arguments,0))},x.max=function(){return ei("isAfter",[].slice.call(arguments,0))},x.now=function(){return Date.now?Date.now():+new Date},x.utc=D,x.unix=function(t){return Qe(1e3*t)},x.months=function(t,e){return qi(t,e,"months")},x.isDate=A,x.locale=Te,x.invalid=N,x.duration=mi,x.isMoment=j,x.weekdays=function(t,e,i){return Ki(t,e,i,"weekdays")},x.parseZone=function(){return Qe.apply(null,arguments).parseZone()},x.localeData=Fe,x.isDuration=ri,x.monthsShort=function(t,e){return qi(t,e,"monthsShort")},x.weekdaysMin=function(t,e,i){return Ki(t,e,i,"weekdaysMin")},x.defineLocale=Ne,x.updateLocale=function(t,e){if(null!=e){var i,s,r=Pe;null!=Ae[t]&&null!=Ae[t].parentLocale?Ae[t].set(W(Ae[t]._config,e)):(null!=(s=ze(t))&&(r=s._config),e=W(r,e),null==s&&(e.abbr=t),(i=new q(e)).parentLocale=Ae[t],Ae[t]=i),Te(t)}else null!=Ae[t]&&(null!=Ae[t].parentLocale?(Ae[t]=Ae[t].parentLocale,t===Te()&&Te(t)):null!=Ae[t]&&delete Ae[t]);return Ae[t]},x.locales=function(){return V(Ae)},x.weekdaysShort=function(t,e,i){return Ki(t,e,i,"weekdaysShort")},x.normalizeUnits=ot,x.relativeTimeRounding=function(t){return void 0===t?ws:"function"==typeof t&&(ws=t,!0)},x.relativeTimeThreshold=function(t,e){return void 0!==ys[t]&&(void 0===e?ys[t]:(ys[t]=e,"s"===t&&(ys.ss=e-1),!0))},x.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},x.prototype=Hi,x.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Es={[o.ACTIVE]:{label:"active"},[o.ACTIVATED]:{label:"activated"},[o.EXPIRED]:{label:"expired"},[o.CONSUMED]:{label:"consumed"},[o.DISABLED]:{label:"disabled"},[o.ENABLED]:{label:"enabled"}},Ps=class{constructor(e){t(this,e),this.tableId="powerupsHistory",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.endpoint=void 0,this.session=void 0,this.limit=10,this.translationUrl="",this.pageLimitOptions="10,25,50",this.pageLimitSelectOptions=[],this.isLoading=!0,this.powerups=[],this.offset=0,this.total=void 0}onReloadPageByType(t){const{limit:e,offset:i,tableId:s}=t.detail;s===this.tableId&&(this.offset=i,this.limit=e)}setLimit(){try{const t=this.pageLimitOptions.split(",").map((t=>parseInt(t)));t.includes(this.limit)||(this.limit=t[0])}catch(t){console.error("Error when parse PageLimitOptions",t),this.limit=10}}onPageLimitChangedHandler(t){var e;if("historyPageLimits"===(null===(e=t.detail)||void 0===e?void 0:e.name)){const e=parseInt(t.detail.value||"10");this.limit!=e&&(this.limit=e,this.offset=0)}}async loadData(){if(this.endpoint&&this.session&&this.pageLimitSelectOptions.length){this.isLoading=!0,this.abortController&&this.abortController.abort(),this.abortController=new AbortController;try{const t=new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=${this.offset},limit=${this.limit}`);let e={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET",signal:this.abortController.signal};t.searchParams.append("language",this.language),t.searchParams.append("status",`${o.CONSUMED},${o.EXPIRED}`);const i=await fetch(t,e);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const{data:s,total:r}=await i.json();this.powerups=s,this.total=r}catch(t){"AbortError"!==t.name&&(console.error("Failed to load powerups history:",t),window.postMessage({type:"peHistoryLoaderError",error:t}))}finally{this.abortController.signal.aborted||(this.isLoading=!1)}}}render(){var t;return e("div",{key:"ba00e65f374616634a43507795af711bb5c28224",class:"PowerUpsContainer",ref:t=>this.stylingContainer=t},this.isLoading?e("p",null,"Loading..."):(null===(t=this.powerups)||void 0===t?void 0:t.length)?[e("ul",{class:"PowerUps"},this.powerups.map((t=>{var i;return e("li",{class:"PowerUpItem"},e("div",{class:"HistoryLeft"},e("div",{class:"DisplayName"}," ",t.powerUpName||"-"," "),e("div",{class:"Details"},e("span",{class:"BoostingPeriod"},e("span",{class:"Period"},t.boostingPeriod.minutes||t.boostingPeriod.numberOfRounds," "),b(t.boostingPeriod.mode===n.TIME_PERIOD?"min":"rounds",this.language)," "),e("span",{class:"Multiplier"},"| X ",t.multiplier.coefficient," "),e("span",{class:"MultiplierMode"},"| ",b(t.multiplier.mode,this.language)," "))),e("div",{class:"HistoryRight"},e("div",{class:`Status S${t.status}`},b((null===(i=Es[t.status])||void 0===i?void 0:i.label)||t.status,this.language)),e("div",{class:"HistoryTime"},x(t.status===o.EXPIRED?t.expireTime:t.endTime).format("YYYY-MM-DD HH:mm:ss")," ")))}))),e("div",{class:"Pagination"},this.total&&this.total>this.limit&&[e("bonus-pagination-nav",{offset:this.offset,limit:this.limit,"arrows-active":"false",secondaryArrowsActive:!0,"table-id":this.tableId,total:this.total}),e("general-input",{"client-styling":"\n .historyPageLimits__input [part='input-field'] ::slotted([slot='value']:not([placeholder])) {\n\n text-align: center;\n }\n .historyPageLimits__input .select__input{background: transparent; width: 89px;\n vaadin-select-value-button{\n color: var(--vaadin-input-field-value-color, var(--emw--color-text));\n text-align: center;\n }\n }\n .historyPageLimits__input .select__input::part(toggle-button){\n color: var(--vaadin-input-field-value-color, var(--emw--color-text));\n right: 0px;\n }\n .historyPageLimits__input .select__input::part(input-field) {\n border-radius: 20px;\n background-color: transparent;\n border: 1px solid var(--emw--color-gray-100, #BCFCB10D);\n color: var(--emw--color-black, #000000);\n font-family: inherit;\n font-style: normal;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.5;\n padding: 5px;\n height: 34px;\n }",type:"dropdown",name:"historyPageLimits","display-name":"","default-value":this.limit,validation:{mandatory:!1},options:this.pageLimitSelectOptions,emitValue:!0,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl})])]:e("div",{class:"EmptyPowerups"},e("div",{class:"Icon",innerHTML:'<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<rect width="52" height="52" fill="url(#pattern0_1132_30534)"/>\n<defs>\n<pattern id="pattern0_1132_30534" patternContentUnits="objectBoundingBox" width="1" height="1">\n<use xlink:href="#image0_1132_30534" transform="scale(0.01)"/>\n</pattern>\n<image id="image0_1132_30534" width="100" height="100" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHlElEQVR4nO2daYwURRTH/4tnvPCI9xE1ahQTNZmp6gXRzar4wTtGvPWLUeIVPxgVNWbizqvZRdTAGoioEQwaFDWK0YBCvMUbJWJIBD8QOUIEowhEQFjzepu4WaZ6qnp6tqub+iX9hexUV/W/Xh3vvSoAj8fj8Xg8Ho/H4/F4ikapB8PLNYiyws2S8LBU6JEKU4TCNKkwWSjUhML9ZYWrRRfOPGUy9sm6zoWio4IDpMI1/NElYalU6LN5hMI2SVgoFUgqdI6djT2yblP+6ENbuYqLJGGmJGy0FSFWIMIqQZgoFUZk3Uz3qWBYmXC5VPg2TRFinvmS0J51s51EKnQKws9DJMRgq5kjqzgp62/gBOcoHC4VXs5CiEGibBaERzsq2BO7K6KK84XCykQfUOGvaGibJxVms6hC4Q0ehiJL25Kw3M9kD47D7oYkPBCugEw/FmGFJEwVCteafDDu6SWF06XCOKnwqiBssBDmd1nFBdgtqGAY7xcMe+u2aDjr5N8189pSBfsJhRsF4VNDUbaw+Ci8GISZBuP5v5LwXKsmWqlwnlD4yECU7WxhKCqSMNVgaPom6EZpKOrDFiMJaxqJUq7iOhQNSag0aji7PYZ6lROu8ghzDYavC1EURA2XScKOGKvYyH+T8VBabTjRF2H1Va7ieElYFzNxr3dlt1wm3BXNG9olce73KZKwIKaBf7PnFg4RiRJnKY8gr4STZsySNlAYAweJPMM6QTYF3TgReUNWcFCDFcyDcHuvNC9mWT4HeUMojI8RYx672OEwIys4Iq5DlQgSeaGjgn11jRGEzeVunIwcEEYl9UPu28gLcROjIDxmWx6HYjlimDTaF/Z2hek8jFr9sA9tkvCxZqm+I+jCGcgDugCTUFg/agIOtCkrchCujsqYbbvsjIaen6LO8N3obhxi8/uyQkfM0NsD1+HQaIx1PG5rGUJh7aAyZplaSmQZSwb17IW2lhK65Ot3sJXOx+j5o2sE2d5OOLYZMWxEqStGQlFEFTfpOhlbEFxGKnyhqfx80zJ4WBKEZXEbtDhRYsX4/5luWp+zJmJ/3sRqyumC0yk7hK2aio+zKUvUMDKKClqJYijGEv47q/oQXtdY2+dwFfaIaj9eDadZl2cpSqvEiNp2p0aQrSMq2BsuIhXu1lR6TdIyTUUZNQHHtEqMRosVZ5e/ktCrEWRBM+WaiGKQUJdYjJ3zWkzixFVwEUF4T1PhKU2XbSJKi8TYiS6VlXOJ4SI8wbXSZS2SiZKKGEyY6VjfOqtwEUFYrOlB96b1Do63C8IfRmIQlpYIR6f1bkF4SzOHTYKLSIXlmo9zW5rvCWq4wkCMjTzRp/leXcaMILwAF9Hl5rKzESkx0Ddl8Fj7vpLsRYTCM3ARqfC1pgc9lIEYqYsiCO9r2qfgItp0GsKTzZZtuOmr+9g4JBu0b5HGQsbDRdh0NR/lnQwsI11L6UOb1p9VxQ1wEV5NaXrosqRlmrpDJOHKJL4vU0o9OEFX7lBlWlpTUjhXM2TtEE/gKNvybH1TSR2SJrAV6NpmG3QbMtjJxmky9SpetsyPNRqm6uwzDPcp1sOXVHhe1yHgMoLwgebjvWIZD1lsahkJd/TG7hy2KD4sqmlXL1wmINyh+QCbbEw7ULg+PJZgKYaJKByJ5IikRV3GxAjrpmNxJ6KGw3ReUaFwu01ZGlGMfVP1RLEVIyyHMEszH23gg0BwnejMX93V1ljLCXWQKPaRvgGiJBEj6MKpMZZqHAbOlKCGQGviNdxiXV6/KIuTem1DUQjLbMVgJGFGzHDVibwgFT7RWMmqJMvEZt0fSX7PQuqOJwiF711Ph921MfpDOpPhOKVp2Esq/KCzDr7cBnlDN5dIFopwKRxGKjylE0MQfmz2VHAmcGKcJPypEWWdq9dZcO/XWjfn9FYxGnmFl7oxk+LyQOFIuLYgiUmYEIQXkWvYS6oJfcr+HrcorZh3GmLEul0IK9orOBR55+wKDo4J7/KK5Zesh6+ghktiU4kIW3mhgiLAFiAaXb1EWJfJ0egKhvGZlZjNX/gECvehCFhF+ihcffVaH6xJSLQL/9CgXk1HPJ2gibDrakm4tVVnwqMhlCThn0Z1EQov5WoD2IoYuBy4CmPvcUoWw1E/TkjQLsV3tYzeXO43kogh+ucU7URf57a3WXzu3TbxLUySJtwTnRXU3tIw6NnOV9CiCNiEXUs9GC4JbyaxHM4jFoSnOcWI877Yknji5Wv6BOFZnht0J7AaDFFrZQ0XowgkOp/RhzbObDQeRlr5EOamne2YGc0elmlnNwv7vuJuDWrRIwi/8WXNKAppnlyShHad674Fz2o+SsBnCFEU2BfVipNLQb9P6bWkt4vGWoTCl3zmkW+cQJFolRgDYd8ROyjDvNrk145v4csvwx15grOOuWAoxKgXNCpXMSq6uoP/J4R3BeGrKHPxVw4ohR++/98nRQc1O3ORiNAMSZPYPC3Ai+EQXgyH8GI4hBfDIbwYDuHFcAgvhkN4MRzCi+EQXgyH8GI4hBcjLzfBDfDaupaDW3g4WcBbhuuieDEcEsWL4Q5hnpOfMzwej8fj8Xg8Ho/H4/GgyPwHN+MBWXHaP7AAAAAASUVORK5CYII="/>\n</defs>\n</svg>\n'}),e("span",{class:"NoPowerTitle"},b("nothingHere",this.language)),e("span",null,b("noPowerUps",this.language)),e("span",null,b("gotoShop",this.language)),e("div",null)))}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleNewTranslations(){g(this.translationUrl)}async componentWillLoad(){this.translationUrl&&await g(this.translationUrl),this.setLimit(),this.pageLimitSelectOptions=this.pageLimitOptions.split(",").map((t=>({label:t,value:t})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl)),this.loadData()}disconnectedCallback(){this.abortController&&this.abortController.abort(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}static get watchers(){return{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData"],endpoint:["loadData"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};Ps.style=":host{display:block}.PowerUpsContainer{font-size:0.95rem;min-height:500px;display:flex;width:100%;flex-direction:column}.PowerUpsContainer .EmptyPowerups{align-items:center;justify-content:center;font-weight:400;font-size:1.2rem;line-height:24px;text-align:center;vertical-align:middle;width:max-content;margin:auto;display:flex;flex-direction:column;padding:50px}.PowerUpsContainer .EmptyPowerups .Icon,.PowerUpsContainer .EmptyPowerups .NoPowerTitle{text-align:center}.PowerUpsContainer .EmptyPowerups .Icon svg,.PowerUpsContainer .EmptyPowerups .NoPowerTitle svg{width:40px}.PowerUpsContainer .EmptyPowerups .NoPowerTitle{font-size:1.2rem;font-weight:bold;margin:10px}.PowerUpsContainer .PowerUps{min-height:60vh;width:100%;display:flex;gap:20px;flex-direction:column;padding-inline-start:0}.PowerUpsContainer .PowerUpItem{display:flex;justify-content:space-between;border:2px solid var(--emw--button-border-color-secondary, rgba(188, 252, 177, 0.0509803922));opacity:1;font-size:0.9rem;border-radius:12px;padding:20px;gap:4px;text-transform:uppercase}.PowerUpsContainer .PowerUpItem .HistoryRight{text-align:right}.PowerUpsContainer .PowerUpItem .HistoryLeft,.PowerUpsContainer .PowerUpItem .HistoryRight{display:flex;flex-direction:column;gap:8px}.PowerUpsContainer .PowerUpItem .DisplayName{text-transform:none;font-weight:500;line-height:100%;vertical-align:middle;font-size:1.1rem}.PowerUpsContainer .PowerUpItem .Details,.PowerUpsContainer .PowerUpItem .HistoryTime{text-transform:uppercase;font-size:0.85em;color:var(--emw--color-gray-dark, #727672)}.PowerUpsContainer .PowerUpItem .Status.S3{color:var(--emw--color-powup-light-green, #18CE51)}.PowerUpsContainer .Pagination{display:flex;justify-content:center}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.Disabled{opacity:0.5}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem:hover{background-color:transparent}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem{width:22px;height:22px;line-height:22px;opacity:1;border-radius:22px;padding:6px;border:2px solid var(--emw--button-border-color-secondary, rgba(188, 252, 177, 0.0509803922))}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem.Active{border-radius:22px;border:2px solid var(--emw--color-powup-green, #24B24E);color:var(--emw--color-powup-green, #24B24E);background-color:transparent}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem.Active,.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem:hover{color:#00B74F;border:2px solid #00B74F}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem{background:transparent;border:2px solid rgba(188, 252, 177, 0.0509803922);border-radius:36px;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.PowerUpsContainer .Pagination .PageNavigation .PageArrow{color:transparent}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.PrePage.Disabled,.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage.Disabled{cursor:default;background-image:url(\"data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.25592 0.244078C7.58136 0.569515 7.58136 1.09715 7.25592 1.42259L2.84518 5.83333H12.5C12.9602 5.83333 13.3333 6.20643 13.3333 6.66667C13.3333 7.1269 12.9602 7.5 12.5 7.5H2.84518L7.25592 11.9107C7.58136 12.2362 7.58136 12.7638 7.25592 13.0893C6.93049 13.4147 6.40285 13.4147 6.07741 13.0893L0.244078 7.25592C-0.0813592 6.93049 -0.0813592 6.40285 0.244078 6.07741L6.07741 0.244078C6.40285 -0.0813592 6.93049 -0.0813592 7.25592 0.244078Z' fill='gray'/%3E%3C/svg%3E\")}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.PrePage,.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage{background-image:url(\"data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.25592 0.244078C7.58136 0.569515 7.58136 1.09715 7.25592 1.42259L2.84518 5.83333H12.5C12.9602 5.83333 13.3333 6.20643 13.3333 6.66667C13.3333 7.1269 12.9602 7.5 12.5 7.5H2.84518L7.25592 11.9107C7.58136 12.2362 7.58136 12.7638 7.25592 13.0893C6.93049 13.4147 6.40285 13.4147 6.07741 13.0893L0.244078 7.25592C-0.0813592 6.93049 -0.0813592 6.40285 0.244078 6.07741L6.07741 0.244078C6.40285 -0.0813592 6.93049 -0.0813592 7.25592 0.244078Z' fill='white'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center;display:inherit;width:fit-content;padding:0 15px}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage{rotate:180deg}";const As=["pt-br","en","es-mx","hu","hr"],Is={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},Ms=(t,e,i)=>{const s=e;let r=Is[void 0!==s&&As.includes(s)?s:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");r=r.replace(i,e)}return r},Ds=class{constructor(e){t(this,e),this.reloadPageEmitter=i(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=7,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(t){this.limit=t.detail.limit?t.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==t.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(t){"..."==t||0==t||parseInt(t.toString(),10)>this.endPageIndex+1||(this.currentPage=t,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return e("ul",{class:"PaginationArea"},this.pagesArray.map((t=>e("li",{class:"PageItem "+(this.currentPage==t?"Active":""),onClick:()=>{this.goTo(t)}},t))))}renderStylingWrapper(){return e("general-styling-wrapper",{targetTranslations:Is,translationUrl:this.translationUrl})}generateNavItemsByType(t,e){if(this.endPageIndex<t)return Array.from({length:this.endPageIndex+1},((t,e)=>e+1));let i=[],s=Math.floor(t/2);const r=this.endPageIndex+1;if(e)if(this.currentPage<s||this.currentPage>r-s+1){i=Array.from({length:s},((t,e)=>e+1)),i.push("...");for(let e=r-(t-i.length-1);e<=r;e++)i.push(e)}else if(this.currentPage==s){i=Array.from({length:s+1},((t,e)=>e+1)),i.push("...");for(let e=r-(t-i.length-1);e<=r;e++)i.push(e)}else if(this.currentPage==r-s+1){i=Array.from({length:s-1},((t,e)=>e+1)),i.push("...");for(let e=r-(t-i.length-1);e<=r;e++)i.push(e)}else i=[1,"..."],i=i.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),i=i.concat(["...",r]);else this.currentPage<=t-s?(i=Array.from({length:t-1},((t,e)=>e+1)),i.push("...")):this.currentPage>r-(t-s)?(i=Array.from({length:t-1},((e,i)=>r-(t-2)+i)),i.unshift("...")):(i=Array.from({length:t-2},((t,e)=>this.currentPage+e-s+1)),i.push("..."),i.unshift("..."));return i}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return e("div",{key:"a6d3cd6cd1e5ff8d927486806d26c6eb61e57833",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&e("span",{key:"56f81e329deb0d5160d4d4e020571d1cc402dcc1",class:"PageOfMessage"},Ms("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),e("div",{key:"eaf964e00190b690564d57af6da91aed717e1690",class:"PageNavigation"},this.arrowsActive&&e("div",{key:"2be57e1c4d3d6fb80db83c6b5c60710573da5f5e",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},Ms("firstPage",this.language)),this.secondaryArrowsActive&&e("span",{key:"d240849c9ba6b9c14d4ebed6c346d7cc629a1a59",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},Ms("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&e("span",{key:"90cb6da1e51256e86f8678e0520d4b221b99957d",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},Ms("nextPage",this.language)),this.arrowsActive&&e("div",{key:"c74711a45bbbf822ca56e6f2fe70ee541ae91cfa",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",Ms("lastPage",this.language)," "),this.renderStylingWrapper()))}};Ds.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emw--color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emw--color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emw--color-primary, #f5f1f1);background-color:var(--emw--color-secondary, #8c8989);border-radius:0.3rem}";const zs={en:{dateError:"The selected date should be between {min} and {max}",dateError2:"The selected date is not within the accepted range",dateFormatError:"The selected date has a different format then the one required.",numberLengthError:"The number should be between {min} and {max}",lengthError:"The length should be between {minLength} and {maxLength}",fixedLengthError:"The length should be {length} characters",requiredError:"This input is required.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",invalidPassword:"Password does not meet all criteria",passwordStrength:"Password strength",passwordStrengthWeak:"is not adequate",passwordStrengthStrong:"is adequate",SpecialCharactersNotAllowed:"Should not contain special characters",InvalidEmailFormat:"Invalid email format.",EmailNotMatching:"Emails not matching!",PasswordNotMatching:"Passwords not matching",MustIncludeNumber:"Password must include a number",MustContainCapital:"Password must include a capital letter",MustIncludePunctation:"Password must include punctuation",MustIncludeLowercase:"Password must include one lowercase character",OnlyNumbers:"The input should contain only digits.",InvalidFieldSize:"The length must be exactly 11 digits.",InvalidDocumentNumber:"Only numerical characters are allowed.",twofaDescription:"<p> We have sent the verification code to <p> {destination}. </p> </p> <p> Please insert the PIN below. </p>",twofaResendMessage:"Didn't receive the verification code?",twofaResendButton:"Resend",enterIEAddressManually:"For IRE, enter the address manually",postalLookUpNoAddressFound:"No addresses found for this postal code",searchingForAddresses:"Searching for addresses...",SAIdLengthError:"SA ID must be 13 digits",SAIdInvalidError:"Invalid SA ID",PassportLengthError:"Passport number must be 8 or 9 digits.",PasswordMustContain:"Password must contain:",AlphanumericalOnly:"Only alphanumerical characters are allowed",InvalidFirstName:"Only alphabetic characters are allowed.",InvalidLastName:"Only alphabetic characters are allowed.",MissingTrunkCode:"Phone number must start with 0"},hu:{dateError:"A választott dátumnak {min} és {max} között kell lennie",dateError2:"A kiválasztott dátum nincs az elfogadott tartományon belül",dateFormatError:"A kiválasztott dátum formátuma eltér a szükségestől.",numberLengthError:"A számnak {min} és {max} között kell lennie",lengthError:"A hossznak {minLength} és {maxLength} között kell lennie",fixedLengthError:"A hossznak {length} karakternek kell lennie",requiredError:"Ez a beviteli mező kötelező.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",invalidPassword:"A jelszó nem felel meg minden kritériumnak",passwordStrength:"Jelszó erőssége",passwordStrengthWeak:"nem megfelelő",passwordStrengthStrong:"megfelelő",SpecialCharactersNotAllowed:"Nem tartalmazhat speciális karaktereket",InvalidEmailFormat:"Érvénytelen e-mail formátum.",EmailNotMatching:"Az e-mailek nem egyeznek!",PasswordNotMatching:"A jelszavak nem egyeznek",MustIncludeNumber:"A jelszónak tartalmaznia kell egy számot",MustContainCapital:"A jelszónak tartalmaznia kell egy nagybetűt",MustIncludePunctation:"A jelszónak tartalmaznia kell írásjelet",MustIncludeLowercase:"A jelszónak legalább egy kisbetűt kell tartalmaznia",OnlyNumbers:"Csak számjegyeket tartalmazhat.",InvalidFieldSize:"A hosszúságnak pontosan 11 számjegynek kell lennie.",InvalidDocumentNumber:"Csak számjegyek engedélyezettek.",twofaDescription:"<p> A megerősítő kódot elküldtük a következő címre: <p> {destination}. </p> </p> <p> Kérjük, írja be az alábbi PIN-kódot. </p>",twofaResendMessage:"Nem kapta meg a megerősítő kódot?",twofaResendButton:"Újraküldés",PassportLengthError:"Az útlevélszámnak 9 számjegyűnek kell lennie",SAIdLengthError:"A dél-afrikai személyi számnak 13 számjegyűnek kell lennie",SAIdInvalidError:"Érvénytelen dél-afrikai személyi szám",PasswordMustContain:"A jelszónak tartalmaznia kell:",AlphanumericalOnly:"Csak alfanumerikus karakterek engedélyezettek",InvalidFirstName:"Csak betűk engedélyezettek.",InvalidLastName:"Csak betűk engedélyezettek.",MissingTrunkCode:"A telefonszámnak 0-val kell kezdődnie"},hr:{dateError:"Odabrani datum treba biti između {min} i {max}",dateError2:"Odabrani datum nije unutar prihvaćenog raspona",dateFormatError:"Odabrani datum je u drugačijem formatu od potrebnog.",numberLengthError:"Broj bi trebao biti između {min} i {max}",lengthError:"Duljina bi trebala biti između {minLength} i {maxLength}",fixedLengthError:"Duljina mora biti {length} znakova",requiredError:"Ovaj unos je obavezan.",invalidOriginalPasswordError:"Lozinke se ne podudaraju",invalidPassword:"Lozinka ne zadovoljava sve kriterije",passwordStrength:"Lozinka",passwordStrengthWeak:"nije dovoljno jaka",passwordStrengthStrong:"je dovoljno jaka",SpecialCharactersNotAllowed:"Ne smije sadržavati posebne znakove",InvalidEmailFormat:"Nevažeći format e-maila",EmailNotMatching:"E-mailovi se ne podudaraju!",PasswordNotMatching:"Lozinke se ne podudaraju",MustIncludeNumber:"Lozinka mora sadržavati broj",MustContainCapital:"Lozinka mora sadržavati veliko slovo",MustIncludePunctation:"Lozinka mora sadržavati barem jedan znak",MustIncludeLowercase:"Lozinka mora sadržavati barem jedno malo slovo",OnlyNumbers:"Smije sadržavati samo znamenke.",InvalidFieldSize:"Dužina mora biti točno 11 znamenki.",InvalidDocumentNumber:"Dopušteni su samo numerički znakovi.",twofaDescription:"<p> Poslali smo verifikacijski kod na: <p> {destination}. </p> </p> <p> Molimo unesite PIN ispod. </p>",twofaResendMessage:"Niste primili verifikacijski kod?",twofaResendButton:"Ponovno pošalji",PassportLengthError:"Broj putovnice mora imati 9 znamenki",SAIdLengthError:"Južnoafrički osobni broj mora imati 13 znamenki",SAIdInvalidError:"Nevažeći južnoafrički osobni broj",PasswordMustContain:"Lozinka mora sadržavati:",AlphanumericalOnly:"Dopušteni su samo alfanumerički znakovi",InvalidFirstName:"Dozvoljena su samo slova.",InvalidLastName:"Dozvoljena su samo slova.",MissingTrunkCode:"Telefonski broj mora počinjati s 0"},tr:{dateError:"Seçilen tarih {min} ve {max} arasında olmalıdır",dateError2:"Seçilen tarih kabul edilen aralıkta değil",dateFormatError:"Seçilen tarihin formatı, gereken formattan farklı.",numberLengthError:"Sayı {min} ve {max} arasında olmalıdır",lengthError:"Uzunluk {minLength} ve {maxLength} arasında olmalıdır",fixedLengthError:"Uzunluk {length} karakter olmalıdır",requiredError:"Bu alan zorunludur.",invalidOriginalPasswordError:"İlk şifre alanı tüm kriterleri karşılamıyor.",invalidPassword:"Şifre tüm kriterleri karşılamıyor",passwordStrength:"Şifre gücü",passwordStrengthWeak:"yetersiz",passwordStrengthStrong:"yeterli",SpecialCharactersNotAllowed:"Özel karakter içermemelidir",InvalidEmailFormat:"Geçersiz e-posta formatı.",EmailNotMatching:"E-postalar uyuşmuyor!",PasswordNotMatching:"Şifreler uyuşmuyor",MustIncludeNumber:"bir sayı içermelidir",MustContainCapital:"büyük harf içermelidir",MustIncludePunctation:"noktalama işareti içermelidir",MustIncludeLowercase:"Şifre en az bir küçük harf içermelidir",OnlyNumbers:"Yalnızca rakamlar içermelidir.",InvalidFieldSize:"Uzunluk tam olarak 11 rakam olmalıdır.",InvalidDocumentNumber:"Sadece sayısal karakterlere izin verilir.",twofaDescription:"<p> Doğrulama kodunu şu adrese gönderdik: <p> {destination}. </p> </p> <p> Lütfen aşağıya PIN kodunu girin. </p>",twofaResendMessage:"Doğrulama kodunu almadınız mı?",twofaResendButton:"Yeniden gönder",PassportLengthError:"Pasaport numarası 9 haneli olmalıdır",SAIdLengthError:"Güney Afrika kimlik numarası 13 haneli olmalıdır",SAIdInvalidError:"Geçersiz Güney Afrika kimlik numarası",PasswordMustContain:"Şifre şunları içermelidir:",AlphanumericalOnly:"Yalnızca alfanümerik karakterlere izin verilir",InvalidFirstName:"Yalnızca alfabetik karakterlere izin verilir.",InvalidLastName:"Yalnızca alfabetik karakterlere izin verilir.",MissingTrunkCode:"Telefon numarası 0 ile başlamalıdır"},"pt-br":{dateError:"A data selecionada deve estar entre {min} e {max}",dateError2:"A data selecionada não está dentro de um intervalo válido",dateFormatError:"A data selecionada está em um formato diferente do exigido.",numberLengthError:"O número deve estar entre {min} e {max}",lengthError:"O comprimento deve estar entre {minLength} e {maxLength}",fixedLengthError:"O comprimento deve ser de {length} caracteres",requiredError:"Este campo é obrigatório",invalidOriginalPasswordError:"O campo de senha inicial não faz parte dos critérios válidos",invalidPassword:"A senha não atende a todos os critérios",PasswordStrength:"Força da senha",PasswordStrengthWeak:"Não é adequado",PasswordStrengthStrong:"é apropriado",SpecialCharactersNotAllowed:"Não deve conter caracteres especiais",InvalidEmailFormat:"Formato de email inválido",EmailNotMatching:"E-mail não corresponde",PasswordNotMatching:"Senha não corresponde",MustIncludeNumber:"A senha deve incluir um número",MustContainCapital:"A senha deve incluir uma letra maiúscula",MustIncludePunctation:"A senha deve incluir um sinal de pontuação",MustIncludeLowercase:"A senha deve conter pelo menos uma letra minúscula",OnlyNumbers:"Deve conter apenas dígitos.",InvalidFieldSize:"O comprimento deve ser exatamente 11 dígitos.",InvalidDocumentNumber:"Apenas caracteres numéricos são permitidos.",twofaDescription:"<p> Enviamos o código de verificação para: <p> {destination}. </p> </p> <p> Por favor, insira o PIN abaixo. </p>",twofaResendMessage:"Não recebeu o código de verificação?",twofaResendButton:"Reenviar",PassportLengthError:"O número do passaporte deve ter 9 dígitos",SAIdLengthError:"O número de identificação da África do Sul deve ter 13 dígitos",SAIdInvalidError:"Número de identificação da África do Sul inválido",PasswordMustContain:"A senha deve conter:",AlphanumericalOnly:"Apenas caracteres alfanuméricos são permitidos",InvalidFirstName:"Apenas caracteres alfabéticos são permitidos.",InvalidLastName:"Apenas caracteres alfabéticos são permitidos.",MissingTrunkCode:"O número de telefone deve começar com 0"},pt:{dateError:"A data selecionada deve estar entre {min} e {max}",dateError2:"A data selecionada não está dentro do intervalo aceite",dateFormatError:"A data selecionada tem um formato diferente do exigido.",numberLengthError:"O número deve estar entre {min} e {max}",lengthError:"O comprimento deve estar entre {minLength} e {maxLength}",fixedLengthError:"O comprimento deve ser de {length} caracteres",requiredError:"Este campo é obrigatório.",invalidOriginalPasswordError:"O campo da palavra-passe inicial não cumpre todos os critérios.",invalidPassword:"A palavra-passe não cumpre todos os critérios",passwordStrength:"Força da palavra-passe",passwordStrengthWeak:"não é adequada",passwordStrengthStrong:"é adequada",SpecialCharactersNotAllowed:"Não deve conter caracteres especiais",InvalidEmailFormat:"Formato de email inválido.",EmailNotMatching:"Os emails não coincidem!",PasswordNotMatching:"As palavras-passe não coincidem",MustIncludeNumber:"A palavra-passe deve incluir um número",MustContainCapital:"A palavra-passe deve incluir uma letra maiúscula",MustIncludePunctation:"A palavra-passe deve incluir pontuação",MustIncludeLowercase:"A palavra-passe deve incluir um caractere minúsculo",OnlyNumbers:"O campo deve conter apenas dígitos.",InvalidFieldSize:"O comprimento deve ser exatamente 11 dígitos.",InvalidDocumentNumber:"Apenas caracteres numéricos são permitidos.",twofaDescription:"<p> Enviámos o código de verificação para <p> {destination}. </p> </p> <p> Por favor, introduza o PIN abaixo. </p>",twofaResendMessage:"Não recebeu o código de verificação?",twofaResendButton:"Reenviar",enterIEAddressManually:"Para IRE, introduza o endereço manualmente",postalLookUpNoAddressFound:"Não foram encontrados endereços para este código postal",searchingForAddresses:"A procurar endereços...",SAIdLengthError:"O ID da África do Sul deve ter 13 dígitos",SAIdInvalidError:"ID da África do Sul inválido",PassportLengthError:"O número de passaporte deve ter 8 ou 9 dígitos.",PasswordMustContain:"A palavra-passe deve conter:",AlphanumericalOnly:"Apenas caracteres alfanuméricos são permitidos",InvalidFirstName:"Apenas caracteres alfabéticos são permitidos.",InvalidLastName:"Apenas caracteres alfabéticos são permitidos.",MissingTrunkCode:"O número de telefone deve começar por 0"},"es-mx":{dateError:"La fecha seleccionada debe ser entre {min} y {max}",dateError2:"La fecha seleccionada no está dentro de un rango válido",dateFormatError:"La fecha seleccionada tiene un formato diferente al requerido.",numberLengthError:"El número debe ser entre {min} y {max}",lengthError:"La longitud deber ser entre {minLength} y {maxLength}",fixedLengthError:"La longitud debe ser de {length} caracteres",requiredError:"Este campo es requerido",invalidOriginalPasswordError:"El campo de contraseña inicial no es parte del criterio válido",invalidPassword:"La contraseña no cumple con todos los criterios",PasswordStrength:"La fortaleza de la contraseña",PasswordStrengthWeak:"no es adecuada",PasswordStrengthStrong:"es adecuada",SpecialCharactersNotAllowed:"No debe contener caracteres especiales",InvalidEmailFormat:"Formato inválido de correo",EmailNotMatching:"El correo electrónico no coincide",PasswordNotMatching:"La contraseña no coincide",MustIncludeNumber:"La contraseña debe incluir un número",MustContainCapital:"La contraseña debe incluir una letra mayúscula",MustIncludePunctation:"La contraseña debe incluir un signo de puntuación",MustIncludeLowercase:"La contraseña debe contener al menos una letra minúscula",OnlyNumbers:"Debe contener solo dígitos.",InvalidFieldSize:"La longitud debe ser exactamente de 11 dígitos.",InvalidDocumentNumber:"Solo se permiten caracteres numéricos.",twofaDescription:"<p> Hemos enviado el código de verificación a: <p> {destination}. </p> </p> <p> Por favor, ingrese el PIN a continuación. </p>",twofaResendMessage:"¿No recibiste el código de verificación?",twofaResendButton:"Reenviar",PassportLengthError:"El número de pasaporte debe tener 9 dígitos",SAIdLengthError:"El número de identificación de Sudáfrica debe tener 13 dígitos",SAIdInvalidError:"Número de identificación de Sudáfrica inválido",PasswordMustContain:"La contraseña debe contener:",AlphanumericalOnly:"Solo se permiten caracteres alfanuméricos",InvalidFirstName:"Solo se permiten caracteres alfabéticos.",InvalidLastName:"Solo se permiten caracteres alfabéticos.",MissingTrunkCode:"El número de teléfono debe comenzar con 0"},fr:{dateError:"La date sélectionnée doit être comprise entre {min} et {max}",dateError2:"La date sélectionnée n’est pas dans la plage autorisée",dateFormatError:"Le format de la date sélectionnée est incorrect.",numberLengthError:"Le nombre doit être compris entre {min} et {max}",lengthError:"La longueur doit être comprise entre {minLength} et {maxLength}",fixedLengthError:"La longueur doit être de {length} caractères",requiredError:"Ce champ est obligatoire.",invalidOriginalPasswordError:"Le mot de passe initial ne respecte pas tous les critères.",invalidPassword:"Le mot de passe ne respecte pas tous les critères",passwordStrength:"Robustesse du mot de passe",passwordStrengthWeak:"est insuffisante",passwordStrengthStrong:"est suffisante",SpecialCharactersNotAllowed:"Ne doit pas contenir de caractères spéciaux",InvalidEmailFormat:"Format d’adresse e-mail invalide.",EmailNotMatching:"Les adresses e-mail ne correspondent pas !",PasswordNotMatching:"Les mots de passe ne correspondent pas",MustIncludeNumber:"Le mot de passe doit contenir un chiffre",MustContainCapital:"Le mot de passe doit contenir une lettre majuscule",MustIncludePunctation:"Le mot de passe doit contenir un caractère de ponctuation",MustIncludeLowercase:"Le mot de passe doit contenir une lettre minuscule",OnlyNumbers:"Ce champ ne doit contenir que des chiffres.",InvalidFieldSize:"La longueur doit être exactement de 11 chiffres.",InvalidDocumentNumber:"Seuls les caractères numériques sont autorisés.",twofaDescription:"<p>Nous avons envoyé le code de vérification à <p>{destination}</p>.</p><p>Veuillez saisir le code PIN ci-dessous.</p>",twofaResendMessage:"Vous n’avez pas reçu le code de vérification ?",twofaResendButton:"Renvoyer",enterIEAddressManually:"Pour l’Irlande, saisissez l’adresse manuellement",postalLookUpNoAddressFound:"Aucune adresse trouvée pour ce code postal",searchingForAddresses:"Recherche d’adresses...",SAIdLengthError:"L’identifiant sud-africain doit comporter 13 chiffres",SAIdInvalidError:"Identifiant sud-africain invalide",PassportLengthError:"Le numéro de passeport doit comporter 8 ou 9 chiffres.",PasswordMustContain:"Le mot de passe doit contenir :",AlphanumericalOnly:"Seuls les caractères alphanumériques sont autorisés",InvalidFirstName:"Seuls les caractères alphabétiques sont autorisés.",InvalidLastName:"Seuls les caractères alphabétiques sont autorisés.",MissingTrunkCode:"Le numéro de téléphone doit commencer par 0"}},Ts={DOCUMENT_NUMBER:"DocumentNumber",FIRSTNAME_ON_DOCUMENT:"FirstnameOnDocument",LASTNAME_ON_DOCUMENT:"LastnameOnDocument",PASSPORT:"Passport",SOUTH_AFRICAN_ID:"SouthAfricanID",BIRTHDATE:"BirthDate",PASSPORT_NUMERIC_REGEX:/^\d{8,9}$/,SA_ID_BASIC_REGEX:/^\d{13}$/,SOUTH_AFRICAN_ID_LENGTH:13,NON_LETTERS_REGEX:/[^A-Za-z]/g,DATE_FORMAT:"yyyy-MM-dd",PASSWORD_COMPLEXITY_PASSED:"passed",PASSWORD_COMPLEXITY_FAILED:"failed"},Ns="requiredError",Fs="lengthError",Os="fixedLengthError",Ls=(t,e,i)=>{let s=zs[e]?zs[e][t]:zs.en[t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s},Bs='<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="6" cy="6" r="5.5" stroke="#979797"/>\n<rect x="5" y="5" width="2" height="5" fill="#979797"/>\n<circle cx="6" cy="3" r="1" fill="#979797"/>\n</svg>\n',Us=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.value=null,this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1,this.selectedValues=[],this.showCheckboxes=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.showCheckboxes=!0,this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language)}renderTooltip(){return this.showTooltip?e("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){const e=t.target.checked;this.showCheckboxes=e,this.selectedValues=e?this.options.map((t=>t.name)):[]}renderLabel(){return e("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},e("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return e("div",{key:"342900ae923094f2746fd43917743d01efba942e",class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"8f3b470274047b355741b438a4e15c7c46504f5a",class:"checkboxgroup__wrapper--flex"},e("vaadin-checkbox",{key:"c7a74f9da877304f4d71607d58eba90dd0a29de7",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&e("img",{key:"75d807ad544e043a2e3beed46bf0c7dfa2125324",class:"checkboxgroup__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),e("small",{key:"4b17e1e613c7561fb3c99f334926544ef2ba787a",class:"checkboxgroup__error-message"},this.errorMessage),this.showCheckboxes&&e("vaadin-checkbox-group",{key:"9a8d573a7cb48bb2d68cceec5f39f1e0886ea05f",theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>e("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};Us.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}';const js=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.value="",this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.inputReference=this.vaadinCheckbox.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleCheckbox(t){this.value=t.target.checked.toString(),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language)}renderLabel(){var t;return e("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},e("div",{class:{"checkbox__label-text":!0,mandatory:null===(t=this.validation)||void 0===t?void 0:t.mandatory},innerHTML:this.displayName}))}renderTooltip(){return this.showTooltip?e("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return e("div",{key:"a8d8bf6aa2001b6aee44d728a198244819ae169e",class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},e("vaadin-checkbox",{key:"13a5589a78bef4277922535e59c5718d36b1f318",class:"checkbox__input",required:this.validation.mandatory,checked:"true"===this.defaultValue,onChange:t=>this.handleCheckbox(t),"error-message":!this.isValid&&this.errorMessage,ref:t=>this.vaadinCheckbox=t},this.renderLabel()),this.tooltip&&e("img",{key:"008bb9a318c914b4b40e80b15080f7f174cc1262",class:"checkboxgroup__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};function Ys(t){return Ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ys(t)}function Rs(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Vs(t){Rs(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Ys(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Hs(t){if(Rs(1,arguments),!function(t){return Rs(1,arguments),t instanceof Date||"object"===Ys(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Vs(t);return!isNaN(Number(e))}function Gs(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function $s(t,e){return Rs(2,arguments),function(t,e){Rs(2,arguments);var i=Vs(t).getTime(),s=Gs(e);return new Date(i+s)}(t,-Gs(e))}function Ws(t){Rs(1,arguments);var e=Vs(t),i=e.getUTCDay(),s=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-s),e.setUTCHours(0,0,0,0),e}function qs(t){Rs(1,arguments);var e=Vs(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var r=Ws(s),o=new Date(0);o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0);var n=Ws(o);return e.getTime()>=r.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}js.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal;font-size:15px}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input[indeterminate]::part(checkbox)::after,.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding:0px;vertical-align:baseline}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input::part(required-indicator)::after{display:none}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}.checkbox__label-text.mandatory::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}';function Ks(t){Rs(1,arguments);var e=Vs(t),i=Ws(e).getTime()-function(t){Rs(1,arguments);var e=qs(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Ws(i)}(e).getTime();return Math.round(i/6048e5)+1}var Js={};function Xs(){return Js}function Qs(t,e){var i,s,r,o,n,a,l,h;Rs(1,arguments);var d=Xs(),c=Gs(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:d.weekStartsOn)&&void 0!==s?s:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Vs(t),p=u.getUTCDay(),m=(p<c?7:0)+p-c;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Zs(t,e){var i,s,r,o,n,a,l,h;Rs(1,arguments);var d=Vs(t),c=d.getUTCFullYear(),u=Xs(),p=Gs(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:u.firstWeekContainsDate)&&void 0!==s?s:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(c+1,0,p),m.setUTCHours(0,0,0,0);var v=Qs(m,e),f=new Date(0);f.setUTCFullYear(c,0,p),f.setUTCHours(0,0,0,0);var g=Qs(f,e);return d.getTime()>=v.getTime()?c+1:d.getTime()>=g.getTime()?c:c-1}function tr(t,e){Rs(1,arguments);var i=Vs(t),s=Qs(i,e).getTime()-function(t,e){var i,s,r,o,n,a,l,h;Rs(1,arguments);var d=Xs(),c=Gs(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==s?s:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Zs(t,e),p=new Date(0);return p.setUTCFullYear(u,0,c),p.setUTCHours(0,0,0,0),Qs(p,e)}(i,e).getTime();return Math.round(s/6048e5)+1}function er(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}var ir={y:function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return er("yy"===e?s%100:s,e.length)},M:function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):er(i+1,2)},d:function(t,e){return er(t.getUTCDate(),e.length)},a:function(t,e){var i=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:function(t,e){return er(t.getUTCHours()%12||12,e.length)},H:function(t,e){return er(t.getUTCHours(),e.length)},m:function(t,e){return er(t.getUTCMinutes(),e.length)},s:function(t,e){return er(t.getUTCSeconds(),e.length)},S:function(t,e){var i=e.length,s=t.getUTCMilliseconds();return er(Math.floor(s*Math.pow(10,i-3)),e.length)}};const sr=ir;var rr={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return sr.y(t,e)},Y:function(t,e,i,s){var r=Zs(t,s),o=r>0?r:1-r;return"YY"===e?er(o%100,2):"Yo"===e?i.ordinalNumber(o,{unit:"year"}):er(o,e.length)},R:function(t,e){return er(qs(t),e.length)},u:function(t,e){return er(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return er(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return er(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return sr.M(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return er(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var r=tr(t,s);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):er(r,e.length)},I:function(t,e,i){var s=Ks(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):er(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):sr.d(t,e)},D:function(t,e,i){var s=function(t){Rs(1,arguments);var e=Vs(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):er(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var r=t.getUTCDay(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return er(o,2);case"eo":return i.ordinalNumber(o,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var r=t.getUTCDay(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return er(o,e.length);case"co":return i.ordinalNumber(o,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),r=0===s?7:s;switch(e){case"i":return String(r);case"ii":return er(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,r=t.getUTCHours();switch(s=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,r=t.getUTCHours();switch(s=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return sr.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):sr.H(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):er(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):er(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):sr.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):sr.s(t,e)},S:function(t,e){return sr.S(t,e)},X:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return nr(r);case"XXXX":case"XX":return ar(r);default:return ar(r,":")}},x:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return nr(r);case"xxxx":case"xx":return ar(r);default:return ar(r,":")}},O:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+or(r,":");default:return"GMT"+ar(r,":")}},z:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+or(r,":");default:return"GMT"+ar(r,":")}},t:function(t,e,i,s){return er(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return er((s._originalDate||t).getTime(),e.length)}};function or(t,e){var i=t>0?"-":"+",s=Math.abs(t),r=Math.floor(s/60),o=s%60;if(0===o)return i+String(r);var n=e||"";return i+String(r)+n+er(o,2)}function nr(t,e){return t%60==0?(t>0?"-":"+")+er(Math.abs(t)/60,2):ar(t,e)}function ar(t,e){var i=e||"",s=t>0?"-":"+",r=Math.abs(t);return s+er(Math.floor(r/60),2)+i+er(r%60,2)}const lr=rr;var hr=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},dr=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},cr={p:dr,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],r=s[1],o=s[2];if(!o)return hr(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",hr(r,e)).replace("{{time}}",dr(o,e))}};const ur=cr;function pr(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var mr=["D","DD"],vr=["YY","YYYY"];function fr(t){return-1!==mr.indexOf(t)}function gr(t){return-1!==vr.indexOf(t)}function br(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var wr={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function yr(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var xr={date:yr({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:yr({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:yr({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},_r={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function kr(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,o=null!=i&&i.width?String(i.width):r;s=t.formattingValues[o]||t.formattingValues[r]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[n]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function Cr(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,r=e.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var o,n=r[0],a=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return o=t.valueCallback?t.valueCallback(l):l,{value:o=i.valueCallback?i.valueCallback(o):o,rest:e.slice(n.length)}}}var Sr;const Er={code:"en-US",formatDistance:function(t,e,i){var s,r=wr[t];return s="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:xr,formatRelative:function(t){return _r[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:kr({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:kr({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:kr({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:kr({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:kr({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Sr={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(Sr.matchPattern);if(!i)return null;var s=i[0],r=t.match(Sr.parsePattern);if(!r)return null;var o=Sr.valueCallback?Sr.valueCallback(r[0]):r[0];return{value:o=e.valueCallback?e.valueCallback(o):o,rest:t.slice(s.length)}}),era:Cr({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Cr({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Cr({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Cr({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Cr({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Pr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ar=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ir=/^'([^]*?)'?$/,Mr=/''/g,Dr=/[a-zA-Z]/;function zr(t,e,i){var s,r,o,n,a,l,h,d,c,u,p,m,v,f,g,b,w,y;Rs(2,arguments);var x=String(e),_=Xs(),k=null!==(s=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:_.locale)&&void 0!==s?s:Er,C=Gs(null!==(o=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==a?a:_.firstWeekContainsDate)&&void 0!==n?n:null===(c=_.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Gs(null!==(p=null!==(m=null!==(v=null!==(f=null==i?void 0:i.weekStartsOn)&&void 0!==f?f:null==i||null===(g=i.locale)||void 0===g||null===(b=g.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==v?v:_.weekStartsOn)&&void 0!==m?m:null===(w=_.locale)||void 0===w||null===(y=w.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==p?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var E=Vs(t);if(!Hs(E))throw new RangeError("Invalid time value");var P=$s(E,pr(E)),A={firstWeekContainsDate:C,weekStartsOn:S,locale:k,_originalDate:E};return x.match(Ar).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,ur[e])(t,k.formatLong):t})).join("").match(Pr).map((function(s){if("''"===s)return"'";var r,o,n=s[0];if("'"===n)return(o=(r=s).match(Ir))?o[1].replace(Mr,"'"):r;var a=lr[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||!gr(s)||br(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!fr(s)||br(s,e,String(t)),a(P,s,k.localize,A);if(n.match(Dr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return s})).join("")}function Tr(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}function Nr(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Tr(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Tr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0,r=function(){};return{s:r,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,o=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw o}}}}function Fr(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function Or(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lr(t,e){return Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lr(t,e)}function Br(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lr(t,e)}function Ur(t){return Ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ur(t)}function jr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jr=function(){return!!t})()}function Yr(t){var e=jr();return function(){var i,s=Ur(t);if(e){var r=Ur(this).constructor;i=Reflect.construct(s,arguments,r)}else i=s.apply(this,arguments);return function(t,e){if(e&&("object"==Ys(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Or(t)}(this,i)}}function Rr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vr(t){var e=function(t){if("object"!=Ys(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Ys(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ys(e)?e:e+""}function Hr(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,Vr(s.key),s)}}function Gr(t,e,i){return e&&Hr(t.prototype,e),i&&Hr(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function $r(t,e,i){return(e=Vr(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Wr=function(){function t(){Rr(this,t),$r(this,"priority",void 0),$r(this,"subPriority",0)}return Gr(t,[{key:"validate",value:function(){return!0}}]),t}(),qr=function(){Br(e,Wr);var t=Yr(e);function e(i,s,r,o,n){var a;return Rr(this,e),(a=t.call(this)).value=i,a.validateValue=s,a.setValue=r,a.priority=o,n&&(a.subPriority=n),a}return Gr(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Kr=function(){Br(e,Wr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",10),$r(Or(i),"subPriority",-1),i}return Gr(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),Jr=function(){function t(){Rr(this,t),$r(this,"incompatibleTokens",void 0),$r(this,"priority",void 0),$r(this,"subPriority",void 0)}return Gr(t,[{key:"run",value:function(t,e,i,s){var r=this.parse(t,e,i,s);return r?{setter:new qr(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Xr=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",140),$r(Or(i),"incompatibleTokens",["R","u","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Qr=/^(1[0-2]|0?\d)/,Zr=/^(3[0-1]|[0-2]?\d)/,to=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,eo=/^(5[0-3]|[0-4]?\d)/,io=/^(2[0-3]|[0-1]?\d)/,so=/^(2[0-4]|[0-1]?\d)/,ro=/^(1[0-1]|0?\d)/,oo=/^(1[0-2]|0?\d)/,no=/^[0-5]?\d/,ao=/^[0-5]?\d/,lo=/^\d/,ho=/^\d{1,2}/,co=/^\d{1,3}/,uo=/^\d{1,4}/,po=/^-?\d+/,mo=/^-?\d/,vo=/^-?\d{1,2}/,fo=/^-?\d{1,3}/,go=/^-?\d{1,4}/,bo=/^([+-])(\d{2})(\d{2})?|Z/,wo=/^([+-])(\d{2})(\d{2})|Z/,yo=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,xo=/^([+-])(\d{2}):(\d{2})|Z/,_o=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function ko(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Co(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function So(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function Eo(t){return Co(po,t)}function Po(t,e){switch(t){case 1:return Co(lo,e);case 2:return Co(ho,e);case 3:return Co(co,e);case 4:return Co(uo,e);default:return Co(new RegExp("^\\d{1,"+t+"}"),e)}}function Ao(t,e){switch(t){case 1:return Co(mo,e);case 2:return Co(vo,e);case 3:return Co(fo,e);case 4:return Co(go,e);default:return Co(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Io(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Mo(t,e){var i,s=e>0,r=s?e:1-e;if(r<=50)i=t||100;else{var o=r+50;i=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return s?i:1-i}function Do(t){return t%400==0||t%4==0&&t%100!=0}var zo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",130),$r(Or(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return ko(Po(4,t),s);case"yo":return ko(i.ordinalNumber(t,{unit:"year"}),s);default:return ko(Po(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var s=t.getUTCFullYear();if(i.isTwoDigitYear){var r=Mo(i.year,s);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),To=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",130),$r(Or(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return ko(Po(4,t),s);case"Yo":return ko(i.ordinalNumber(t,{unit:"year"}),s);default:return ko(Po(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,s){var r=Zs(t,s);if(i.isTwoDigitYear){var o=Mo(i.year,r);return t.setUTCFullYear(o,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Qs(t,s)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Qs(t,s)}}]),e}(),No=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",130),$r(Or(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e){return Ao("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),Ws(s)}}]),e}(),Fo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",130),$r(Or(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e){return Ao("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Oo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",120),$r(Or(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return Po(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Lo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",120),$r(Or(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return Po(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Bo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),$r(Or(i),"priority",110),i}return Gr(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"M":return ko(Co(Qr,t),s);case"MM":return ko(Po(2,t),s);case"Mo":return ko(i.ordinalNumber(t,{unit:"month"}),s);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Uo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",110),$r(Or(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"L":return ko(Co(Qr,t),s);case"LL":return ko(Po(2,t),s);case"Lo":return ko(i.ordinalNumber(t,{unit:"month"}),s);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),jo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",100),$r(Or(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return Co(eo,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,s){return Qs(function(t,e,i){Rs(2,arguments);var s=Vs(t),r=Gs(e),o=tr(s,i)-r;return s.setUTCDate(s.getUTCDate()-7*o),s}(t,i,s),s)}}]),e}(),Yo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",100),$r(Or(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return Co(eo,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Ws(function(t,e){Rs(2,arguments);var i=Vs(t),s=Gs(e),r=Ks(i)-s;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Ro=[31,28,31,30,31,30,31,31,30,31,30,31],Vo=[31,29,31,30,31,30,31,31,30,31,30,31],Ho=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"subPriority",1),$r(Or(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return Co(Zr,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){var i=Do(t.getUTCFullYear()),s=t.getUTCMonth();return i?e>=1&&e<=Vo[s]:e>=1&&e<=Ro[s]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Go=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"subpriority",1),$r(Or(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return Co(to,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return Do(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function $o(t,e,i){var s,r,o,n,a,l,h,d;Rs(2,arguments);var c=Xs(),u=Gs(null!==(s=null!==(r=null!==(o=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==r?r:null===(h=c.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==s?s:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Vs(t),m=Gs(e),v=((m%7+7)%7<u?7:0)+m-p.getUTCDay();return p.setUTCDate(p.getUTCDate()+v),p}var Wo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=$o(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),qo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return ko(Po(e.length,t),r);case"eo":return ko(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=$o(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),Ko=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return ko(Po(e.length,t),r);case"co":return ko(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=$o(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),Jo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){var s=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Po(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return ko(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return ko(i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ko(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);default:return ko(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){Rs(2,arguments);var i=Gs(e);i%7==0&&(i-=7);var s=Vs(t),r=((i%7+7)%7<1?7:0)+i-s.getUTCDay();return s.setUTCDate(s.getUTCDate()+r),s}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Xo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",80),$r(Or(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Io(i),0,0,0),t}}]),e}(),Qo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",80),$r(Or(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Io(i),0,0,0),t}}]),e}(),Zo=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",80),$r(Or(i),"incompatibleTokens",["a","b","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Io(i),0,0,0),t}}]),e}(),tn=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",70),$r(Or(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return Co(oo,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:s||12!==i?i:0,0,0,0),t}}]),e}(),en=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",70),$r(Or(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return Co(io,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),sn=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",70),$r(Or(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return Co(ro,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:i,0,0,0),t}}]),e}(),rn=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",70),$r(Or(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return Co(so,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),on=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",60),$r(Or(i),"incompatibleTokens",["t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return Co(no,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),nn=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",50),$r(Or(i),"incompatibleTokens",["t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return Co(ao,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),an=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",30),$r(Or(i),"incompatibleTokens",["t","T"]),i}return Gr(e,[{key:"parse",value:function(t,e){return ko(Po(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),ln=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",10),$r(Or(i),"incompatibleTokens",["t","T","x"]),i}return Gr(e,[{key:"parse",value:function(t,e){switch(e){case"X":return So(bo,t);case"XX":return So(wo,t);case"XXXX":return So(yo,t);case"XXXXX":return So(_o,t);default:return So(xo,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),hn=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",10),$r(Or(i),"incompatibleTokens",["t","T","X"]),i}return Gr(e,[{key:"parse",value:function(t,e){switch(e){case"x":return So(bo,t);case"xx":return So(wo,t);case"xxxx":return So(yo,t);case"xxxxx":return So(_o,t);default:return So(xo,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),dn=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",40),$r(Or(i),"incompatibleTokens","*"),i}return Gr(e,[{key:"parse",value:function(t){return Eo(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),cn=function(){Br(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",20),$r(Or(i),"incompatibleTokens","*"),i}return Gr(e,[{key:"parse",value:function(t){return Eo(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),un={G:new Xr,y:new zo,Y:new To,R:new No,u:new Fo,Q:new Oo,q:new Lo,M:new Bo,L:new Uo,w:new jo,I:new Yo,d:new Ho,D:new Go,E:new Wo,e:new qo,c:new Ko,i:new Jo,a:new Xo,b:new Qo,B:new Zo,h:new tn,H:new en,K:new sn,k:new rn,m:new on,s:new nn,S:new an,X:new ln,x:new hn,t:new dn,T:new cn},pn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vn=/^'([^]*?)'?$/,fn=/''/g,gn=/\S/,bn=/[a-zA-Z]/;function wn(t,e,i,s){var r,o,n,a,l,h,d,c,u,p,m,v,f,g,b,w,y,x;Rs(3,arguments);var _=String(t),k=String(e),C=Xs(),S=null!==(r=null!==(o=null==s?void 0:s.locale)&&void 0!==o?o:C.locale)&&void 0!==r?r:Er;if(!S.match)throw new RangeError("locale must contain match property");var E=Gs(null!==(n=null!==(a=null!==(l=null!==(h=null==s?void 0:s.firstWeekContainsDate)&&void 0!==h?h:null==s||null===(d=s.locale)||void 0===d||null===(c=d.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==l?l:C.firstWeekContainsDate)&&void 0!==a?a:null===(u=C.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=Gs(null!==(m=null!==(v=null!==(f=null!==(g=null==s?void 0:s.weekStartsOn)&&void 0!==g?g:null==s||null===(b=s.locale)||void 0===b||null===(w=b.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==f?f:C.weekStartsOn)&&void 0!==v?v:null===(y=C.locale)||void 0===y||null===(x=y.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==m?m:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===_?Vs(i):new Date(NaN);var A,I={firstWeekContainsDate:E,weekStartsOn:P,locale:S},M=[new Kr],D=k.match(mn).map((function(t){var e=t[0];return e in ur?(0,ur[e])(t,S.formatLong):t})).join("").match(pn),z=[],T=Nr(D);try{var N=function(){var e=A.value;null!=s&&s.useAdditionalWeekYearTokens||!gr(e)||br(e,k,t),null!=s&&s.useAdditionalDayOfYearTokens||!fr(e)||br(e,k,t);var i=e[0],r=un[i];if(r){var o=r.incompatibleTokens;if(Array.isArray(o)){var n=z.find((function(t){return o.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&z.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));z.push({token:i,fullToken:e});var a=r.run(_,e,S.match,I);if(!a)return{v:new Date(NaN)};M.push(a.setter),_=a.rest}else{if(i.match(bn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(vn)[1].replace(fn,"'")),0!==_.indexOf(e))return{v:new Date(NaN)};_=_.slice(e.length)}};for(T.s();!(A=T.n()).done;){var F=N();if("object"===Ys(F))return F.v}}catch(t){T.e(t)}finally{T.f()}if(_.length>0&&gn.test(_))return new Date(NaN);var O=M.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return M.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),L=Vs(i);if(isNaN(L.getTime()))return new Date(NaN);var B,U=$s(L,pr(L)),j={},Y=Nr(O);try{for(Y.s();!(B=Y.n()).done;){var R=B.value;if(!R.validate(U,I))return new Date(NaN);var V=R.set(U,j,I);Array.isArray(V)?(U=V[0],Fr(j,V[1])):U=V}}catch(t){Y.e(t)}finally{Y.f()}return U}function yn(t,e){Rs(2,arguments);var i=Vs(t),s=Vs(e);return i.getTime()>s.getTime()}function xn(t,e){Rs(2,arguments);var i=Vs(t),s=Vs(e);return i.getTime()<s.getTime()}function _n(t,e,i){return Rs(2,arguments),Hs(wn(t,e,new Date,i))}const kn=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:s}=t;return zr(new Date(e,i,s),this.dateFormat)},this.parseDate=t=>{const e=wn(t,this.dateFormat,new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleDocumentIdUpdate=t=>{this.name===Ts.BIRTHDATE&&(this.value=t.detail,this.valueAsDate=wn(this.value||"",Ts.DATE_FORMAT,new Date),this.touched=!0,this.datePicker&&(this.datePicker.value=this.value),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.valueHandler({name:this.name,value:this.value}))},this.handleMaskedTyping=t=>{var e;const i=t.target;if(!i)return;const s=null!==(e=i.selectionStart)&&void 0!==e?e:i.value.length,r=i.value,[o,n,a]=this.getFormatStructure(this.dateFormat),{seps:l}=this.parseFormat(this.dateFormat),[h,d]=l,c=o+n+a,u=r.replace(/\D/g,"").slice(0,c),p=u.slice(0,o),m=u.slice(o,o+n),v=u.slice(o+n,o+n+a);let f=p;u.length>o&&(f+=h+m),u.length>o+n&&(f+=d+v),i.value=f;const g=this.totalSeparatorLength(r,[h,d]),b=this.totalSeparatorLength(f,[h,d]);let w=s+Math.max(0,b-g);w=Math.max(0,Math.min(w,f.length));try{i.setSelectionRange(w,w)}catch(t){}if(u.length<c)return this.errorMessage="",void this.resetIncompleteState();try{const t=wn(f,this.dateFormat,new Date);if(t&&!isNaN(t.getTime())){const e=zr(t,"yyyy-MM-dd");this.value=e,this.valueAsDate=t,this.isValid=!0,this.errorMessage="",this.datePicker&&(this.datePicker.value=e),this.valueHandler({name:this.name,value:this.value})}else this.resetIncompleteState()}catch(t){this.resetIncompleteState()}},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.dateFormat="yyyy-MM-dd",this.emitOnClick=!1,this.enableSouthAfricanMode=void 0,this.enableManualDateInput=!1,this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}get formattedValue(){return this.value?zr(wn(this.value,"yyyy-MM-dd",new Date),this.dateFormat):""}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}handleCustomRegistrationChange(t){t?window.addEventListener("documentIdUpdated",this.handleDocumentIdUpdate):window.removeEventListener("documentIdUpdated",this.handleDocumentIdUpdate)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=wn((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=wn((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){var t;if(this.handleClientStyling(),this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker){const e=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');if(e&&e.addEventListener("click",(()=>this.handleCalendarIconClick())),this.datePicker.addEventListener("opened-changed",(t=>{!0===t.detail.value?this.errorMessage="":(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0)})),this.enableManualDateInput){const e=null===(t=this.datePicker)||void 0===t?void 0:t.inputElement;e&&e.addEventListener("input",this.handleMaskedTyping)}}this.enableSouthAfricanMode&&window.addEventListener("documentIdUpdated",this.handleDocumentIdUpdate),this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value})),this.isValid=this.setValidity()}disconnectedCallback(){var t;if(this.enableSouthAfricanMode&&window.removeEventListener("documentIdUpdated",this.handleDocumentIdUpdate),this.enableManualDateInput){const e=null===(t=this.datePicker)||void 0===t?void 0:t.inputElement;e&&e.removeEventListener("input",this.handleMaskedTyping)}}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=wn(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0),this.enableSouthAfricanMode&&window.dispatchEvent(new CustomEvent("birthDateUpdated",{detail:{birthDate:this.value}}))}handleValidated(){this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()}setValidity(){return!(xn(this.valueAsDate,this.minDate)||yn(this.valueAsDate,this.maxDate)||!_n(this.formattedValue,this.dateFormat))&&this.inputReference.validity.valid}setErrorMessage(){return this.inputReference.validity.valueMissing?Ls("requiredError",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?Ls("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):xn(this.valueAsDate,this.minDate)||yn(this.valueAsDate,this.maxDate)?Ls("dateError2",this.language):_n(this.formattedValue,this.dateFormat)?void 0:Ls("dateFormatError",this.language)}renderTooltip(){return this.showTooltip?e("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}parseFormat(t){var e;const i=null!=t?t:"dd-MM-yyyy",s=/([dMy]+)|([^dMy]+)/g,r=[],o=[];let n;for(;n=s.exec(i);)n[1]?r.push(n[1]):n[2]&&o.push(n[2]);if(o.length<2){const t=null!==(e=o[0])&&void 0!==e?e:"-";for(;o.length<2;)o.push(t)}return{tokens:r,seps:[o[0],o[1]]}}getFormatStructure(t){const{tokens:e}=this.parseFormat(t);if(e.length<3)return[2,2,4];const i=e.map((t=>t.length));return[i[0],i[1],i[2]]}totalSeparatorLength(t,e){if(!t)return 0;let i=0;for(const s of e){if(!s)continue;const e=new RegExp(this.escapeRegExp(s),"g"),r=t.match(e);r&&(i+=r.length*s.length)}return i}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}resetIncompleteState(){this.value="",this.valueAsDate=void 0,this.isValid=!1}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"ffff8be16fb22a41ea8c5168a79e40b9f410c63b",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("label",{key:"60da1ad0bc4cc7757e6f1096866667a97bd146b5",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName,e("span",{key:"450b4638efa34f4490035b0d99b0b186f053a2d0",class:this.validation.mandatory?"date__label--required":""})),e("vaadin-date-picker",{key:"421875a710bb4508e3218d28bf2c28dcd0e9793b",id:`${this.name}__input`,type:"date",class:`date__input ${t} ${this.enableManualDateInput&&"date__manual-mode"}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onValidated:()=>this.handleValidated(),autoOpenDisabled:this.enableManualDateInput}),e("small",{key:"33a6fed8057a84cb648f94a318c3ec0b1e495fff",class:"date__error-message"},this.errorMessage),this.tooltip&&e("img",{key:"d91fcd13e1ae384b67b6d478834b65136ab77b77",class:"date__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],enableSouthAfricanMode:["handleCustomRegistrationChange"]}}};kn.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.date__manual-mode::part(toggle-button){display:none}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.date__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const Cn=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return Ls("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return Ls(`${i}`,this.language)?Ls(`${i}`,this.language):s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return Ls(`${t}`,this.language)?Ls(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?e("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"f852525fe8d8b695e638fdd83e8b0c2c20d98771",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"d6a6dec4e76ba1fbe15bed09f82cecde12cabe1a",class:"email__wrapper--flex"},e("label",{key:"4498ae1bac287cb80544c4d743afad2ec678e3bd",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"e54d1258e48f54304a553cffb83466e4a4fadb4c",class:"email__wrapper--relative"},this.tooltip&&e("img",{key:"29d7b95f22c8cb70d505f74a7ea18284faa908ee",class:"email__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("input",{key:"08754b178e395f26c1d8a61ff667b91df3fb0ec7",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),e("small",{key:"3024a57f5d0897f34013eb4397d78babc2333192",class:"email__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Cn.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emw--color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.email__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__input::placeholder{color:var(--emw--color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';var Sn=Object.defineProperty,En=Object.defineProperties,Pn=Object.getOwnPropertyDescriptors,An=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,Dn=(t,e,i)=>e in t?Sn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,zn=(t,e)=>{for(var i in e||(e={}))In.call(e,i)&&Dn(t,i,e[i]);if(An)for(var i of An(e))Mn.call(e,i)&&Dn(t,i,e[i]);return t},Tn=(t,e)=>En(t,Pn(e)),Nn=(t,e,i)=>(Dn(t,"symbol"!=typeof e?e+"":e,i),i),Fn=(t,e,i)=>new Promise(((s,r)=>{var o=t=>{try{a(i.next(t))}catch(t){r(t)}},n=t=>{try{a(i.throw(t))}catch(t){r(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(o,n);a((i=i.apply(t,e)).next())}))
|
|
9
|
+
x.version="2.29.4",w=Qe,x.fn=Hi,x.min=function(){return ei("isBefore",[].slice.call(arguments,0))},x.max=function(){return ei("isAfter",[].slice.call(arguments,0))},x.now=function(){return Date.now?Date.now():+new Date},x.utc=D,x.unix=function(t){return Qe(1e3*t)},x.months=function(t,e){return qi(t,e,"months")},x.isDate=A,x.locale=ze,x.invalid=N,x.duration=mi,x.isMoment=j,x.weekdays=function(t,e,i){return Ki(t,e,i,"weekdays")},x.parseZone=function(){return Qe.apply(null,arguments).parseZone()},x.localeData=Fe,x.isDuration=ri,x.monthsShort=function(t,e){return qi(t,e,"monthsShort")},x.weekdaysMin=function(t,e,i){return Ki(t,e,i,"weekdaysMin")},x.defineLocale=Ne,x.updateLocale=function(t,e){if(null!=e){var i,s,r=Pe;null!=Ae[t]&&null!=Ae[t].parentLocale?Ae[t].set(W(Ae[t]._config,e)):(null!=(s=Te(t))&&(r=s._config),e=W(r,e),null==s&&(e.abbr=t),(i=new q(e)).parentLocale=Ae[t],Ae[t]=i),ze(t)}else null!=Ae[t]&&(null!=Ae[t].parentLocale?(Ae[t]=Ae[t].parentLocale,t===ze()&&ze(t)):null!=Ae[t]&&delete Ae[t]);return Ae[t]},x.locales=function(){return G(Ae)},x.weekdaysShort=function(t,e,i){return Ki(t,e,i,"weekdaysShort")},x.normalizeUnits=ot,x.relativeTimeRounding=function(t){return void 0===t?ws:"function"==typeof t&&(ws=t,!0)},x.relativeTimeThreshold=function(t,e){return void 0!==ys[t]&&(void 0===e?ys[t]:(ys[t]=e,"s"===t&&(ys.ss=e-1),!0))},x.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},x.prototype=Hi,x.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Es={[o.ACTIVE]:{label:"active"},[o.ACTIVATED]:{label:"activated"},[o.EXPIRED]:{label:"expired"},[o.CONSUMED]:{label:"consumed"},[o.DISABLED]:{label:"disabled"},[o.ENABLED]:{label:"enabled"}},Ps=class{constructor(e){t(this,e),this.tableId="powerupsHistory",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.endpoint=void 0,this.session=void 0,this.limit=10,this.translationUrl="",this.pageLimitOptions="10,25,50",this.pageLimitSelectOptions=[],this.isLoading=!0,this.powerups=[],this.offset=0,this.total=void 0}onReloadPageByType(t){const{limit:e,offset:i,tableId:s}=t.detail;s===this.tableId&&(this.offset=i,this.limit=e)}setLimit(){try{const t=this.pageLimitOptions.split(",").map((t=>parseInt(t)));t.includes(this.limit)||(this.limit=t[0])}catch(t){console.error("Error when parse PageLimitOptions",t),this.limit=10}}onPageLimitChangedHandler(t){var e;if("historyPageLimits"===(null===(e=t.detail)||void 0===e?void 0:e.name)){const e=parseInt(t.detail.value||"10");this.limit!=e&&(this.limit=e,this.offset=0)}}async loadData(){if(this.endpoint&&this.session&&this.pageLimitSelectOptions.length){this.isLoading=!0,this.abortController&&this.abortController.abort(),this.abortController=new AbortController;try{const t=new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=${this.offset},limit=${this.limit}`);let e={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET",signal:this.abortController.signal};t.searchParams.append("language",this.language),t.searchParams.append("status",`${o.CONSUMED},${o.EXPIRED}`);const i=await fetch(t,e);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const{data:s,total:r}=await i.json();this.powerups=s,this.total=r}catch(t){"AbortError"!==t.name&&(console.error("Failed to load powerups history:",t),window.postMessage({type:"peHistoryLoaderError",error:t}))}finally{this.abortController.signal.aborted||(this.isLoading=!1)}}}render(){var t;return e("div",{key:"ba00e65f374616634a43507795af711bb5c28224",class:"PowerUpsContainer",ref:t=>this.stylingContainer=t},this.isLoading?e("p",null,"Loading..."):(null===(t=this.powerups)||void 0===t?void 0:t.length)?[e("ul",{class:"PowerUps"},this.powerups.map((t=>{var i;return e("li",{class:"PowerUpItem"},e("div",{class:"HistoryLeft"},e("div",{class:"DisplayName"}," ",t.powerUpName||"-"," "),e("div",{class:"Details"},e("span",{class:"BoostingPeriod"},e("span",{class:"Period"},t.boostingPeriod.minutes||t.boostingPeriod.numberOfRounds," "),b(t.boostingPeriod.mode===n.TIME_PERIOD?"min":"rounds",this.language)," "),e("span",{class:"Multiplier"},"| X ",t.multiplier.coefficient," "),e("span",{class:"MultiplierMode"},"| ",b(t.multiplier.mode,this.language)," "))),e("div",{class:"HistoryRight"},e("div",{class:`Status S${t.status}`},b((null===(i=Es[t.status])||void 0===i?void 0:i.label)||t.status,this.language)),e("div",{class:"HistoryTime"},x(t.status===o.EXPIRED?t.expireTime:t.endTime).format("YYYY-MM-DD HH:mm:ss")," ")))}))),e("div",{class:"Pagination"},this.total&&this.total>this.limit&&[e("bonus-pagination-nav",{offset:this.offset,limit:this.limit,"arrows-active":"false",secondaryArrowsActive:!0,"table-id":this.tableId,total:this.total}),e("general-input",{"client-styling":"\n .historyPageLimits__input [part='input-field'] ::slotted([slot='value']:not([placeholder])) {\n\n text-align: center;\n }\n .historyPageLimits__input .select__input{background: transparent; width: 89px;\n vaadin-select-value-button{\n color: var(--vaadin-input-field-value-color, var(--emw--color-text));\n text-align: center;\n }\n }\n .historyPageLimits__input .select__input::part(toggle-button){\n color: var(--vaadin-input-field-value-color, var(--emw--color-text));\n right: 0px;\n }\n .historyPageLimits__input .select__input::part(input-field) {\n border-radius: 20px;\n background-color: transparent;\n border: 1px solid var(--emw--color-gray-100, #BCFCB10D);\n color: var(--emw--color-black, #000000);\n font-family: inherit;\n font-style: normal;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.5;\n padding: 5px;\n height: 34px;\n }",type:"dropdown",name:"historyPageLimits","display-name":"","default-value":this.limit,validation:{mandatory:!1},options:this.pageLimitSelectOptions,emitValue:!0,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl})])]:e("div",{class:"EmptyPowerups"},e("div",{class:"Icon",innerHTML:'<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<rect width="52" height="52" fill="url(#pattern0_1132_30534)"/>\n<defs>\n<pattern id="pattern0_1132_30534" patternContentUnits="objectBoundingBox" width="1" height="1">\n<use xlink:href="#image0_1132_30534" transform="scale(0.01)"/>\n</pattern>\n<image id="image0_1132_30534" width="100" height="100" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHlElEQVR4nO2daYwURRTH/4tnvPCI9xE1ahQTNZmp6gXRzar4wTtGvPWLUeIVPxgVNWbizqvZRdTAGoioEQwaFDWK0YBCvMUbJWJIBD8QOUIEowhEQFjzepu4WaZ6qnp6tqub+iX9hexUV/W/Xh3vvSoAj8fj8Xg8Ho/H4/F4ikapB8PLNYiyws2S8LBU6JEKU4TCNKkwWSjUhML9ZYWrRRfOPGUy9sm6zoWio4IDpMI1/NElYalU6LN5hMI2SVgoFUgqdI6djT2yblP+6ENbuYqLJGGmJGy0FSFWIMIqQZgoFUZk3Uz3qWBYmXC5VPg2TRFinvmS0J51s51EKnQKws9DJMRgq5kjqzgp62/gBOcoHC4VXs5CiEGibBaERzsq2BO7K6KK84XCykQfUOGvaGibJxVms6hC4Q0ehiJL25Kw3M9kD47D7oYkPBCugEw/FmGFJEwVCteafDDu6SWF06XCOKnwqiBssBDmd1nFBdgtqGAY7xcMe+u2aDjr5N8189pSBfsJhRsF4VNDUbaw+Ci8GISZBuP5v5LwXKsmWqlwnlD4yECU7WxhKCqSMNVgaPom6EZpKOrDFiMJaxqJUq7iOhQNSag0aji7PYZ6lROu8ghzDYavC1EURA2XScKOGKvYyH+T8VBabTjRF2H1Va7ieElYFzNxr3dlt1wm3BXNG9olce73KZKwIKaBf7PnFg4RiRJnKY8gr4STZsySNlAYAweJPMM6QTYF3TgReUNWcFCDFcyDcHuvNC9mWT4HeUMojI8RYx672OEwIys4Iq5DlQgSeaGjgn11jRGEzeVunIwcEEYl9UPu28gLcROjIDxmWx6HYjlimDTaF/Z2hek8jFr9sA9tkvCxZqm+I+jCGcgDugCTUFg/agIOtCkrchCujsqYbbvsjIaen6LO8N3obhxi8/uyQkfM0NsD1+HQaIx1PG5rGUJh7aAyZplaSmQZSwb17IW2lhK65Ot3sJXOx+j5o2sE2d5OOLYZMWxEqStGQlFEFTfpOhlbEFxGKnyhqfx80zJ4WBKEZXEbtDhRYsX4/5luWp+zJmJ/3sRqyumC0yk7hK2aio+zKUvUMDKKClqJYijGEv47q/oQXtdY2+dwFfaIaj9eDadZl2cpSqvEiNp2p0aQrSMq2BsuIhXu1lR6TdIyTUUZNQHHtEqMRosVZ5e/ktCrEWRBM+WaiGKQUJdYjJ3zWkzixFVwEUF4T1PhKU2XbSJKi8TYiS6VlXOJ4SI8wbXSZS2SiZKKGEyY6VjfOqtwEUFYrOlB96b1Do63C8IfRmIQlpYIR6f1bkF4SzOHTYKLSIXlmo9zW5rvCWq4wkCMjTzRp/leXcaMILwAF9Hl5rKzESkx0Ddl8Fj7vpLsRYTCM3ARqfC1pgc9lIEYqYsiCO9r2qfgItp0GsKTzZZtuOmr+9g4JBu0b5HGQsbDRdh0NR/lnQwsI11L6UOb1p9VxQ1wEV5NaXrosqRlmrpDJOHKJL4vU0o9OEFX7lBlWlpTUjhXM2TtEE/gKNvybH1TSR2SJrAV6NpmG3QbMtjJxmky9SpetsyPNRqm6uwzDPcp1sOXVHhe1yHgMoLwgebjvWIZD1lsahkJd/TG7hy2KD4sqmlXL1wmINyh+QCbbEw7ULg+PJZgKYaJKByJ5IikRV3GxAjrpmNxJ6KGw3ReUaFwu01ZGlGMfVP1RLEVIyyHMEszH23gg0BwnejMX93V1ljLCXWQKPaRvgGiJBEj6MKpMZZqHAbOlKCGQGviNdxiXV6/KIuTem1DUQjLbMVgJGFGzHDVibwgFT7RWMmqJMvEZt0fSX7PQuqOJwiF711Ph921MfpDOpPhOKVp2Esq/KCzDr7cBnlDN5dIFopwKRxGKjylE0MQfmz2VHAmcGKcJPypEWWdq9dZcO/XWjfn9FYxGnmFl7oxk+LyQOFIuLYgiUmYEIQXkWvYS6oJfcr+HrcorZh3GmLEul0IK9orOBR55+wKDo4J7/KK5Zesh6+ghktiU4kIW3mhgiLAFiAaXb1EWJfJ0egKhvGZlZjNX/gECvehCFhF+ihcffVaH6xJSLQL/9CgXk1HPJ2gibDrakm4tVVnwqMhlCThn0Z1EQov5WoD2IoYuBy4CmPvcUoWw1E/TkjQLsV3tYzeXO43kogh+ucU7URf57a3WXzu3TbxLUySJtwTnRXU3tIw6NnOV9CiCNiEXUs9GC4JbyaxHM4jFoSnOcWI877Yknji5Wv6BOFZnht0J7AaDFFrZQ0XowgkOp/RhzbObDQeRlr5EOamne2YGc0elmlnNwv7vuJuDWrRIwi/8WXNKAppnlyShHad674Fz2o+SsBnCFEU2BfVipNLQb9P6bWkt4vGWoTCl3zmkW+cQJFolRgDYd8ROyjDvNrk145v4csvwx15grOOuWAoxKgXNCpXMSq6uoP/J4R3BeGrKHPxVw4ohR++/98nRQc1O3ORiNAMSZPYPC3Ai+EQXgyH8GI4hBfDIbwYDuHFcAgvhkN4MRzCi+EQXgyH8GI4hBcjLzfBDfDaupaDW3g4WcBbhuuieDEcEsWL4Q5hnpOfMzwej8fj8Xg8Ho/H4/GgyPwHN+MBWXHaP7AAAAAASUVORK5CYII="/>\n</defs>\n</svg>\n'}),e("span",{class:"NoPowerTitle"},b("nothingHere",this.language)),e("span",null,b("noPowerUps",this.language)),e("span",null,b("gotoShop",this.language)),e("div",null)))}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleNewTranslations(){g(this.translationUrl)}async componentWillLoad(){this.translationUrl&&await g(this.translationUrl),this.setLimit(),this.pageLimitSelectOptions=this.pageLimitOptions.split(",").map((t=>({label:t,value:t})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl)),this.loadData()}disconnectedCallback(){this.abortController&&this.abortController.abort(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}static get watchers(){return{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData"],endpoint:["loadData"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};Ps.style=":host{display:block}.PowerUpsContainer{font-size:0.95rem;min-height:500px;display:flex;width:100%;flex-direction:column}.PowerUpsContainer .EmptyPowerups{align-items:center;justify-content:center;font-weight:400;font-size:1.2rem;line-height:24px;text-align:center;vertical-align:middle;width:max-content;margin:auto;display:flex;flex-direction:column;padding:50px}.PowerUpsContainer .EmptyPowerups .Icon,.PowerUpsContainer .EmptyPowerups .NoPowerTitle{text-align:center}.PowerUpsContainer .EmptyPowerups .Icon svg,.PowerUpsContainer .EmptyPowerups .NoPowerTitle svg{width:40px}.PowerUpsContainer .EmptyPowerups .NoPowerTitle{font-size:1.2rem;font-weight:bold;margin:10px}.PowerUpsContainer .PowerUps{min-height:60vh;width:100%;display:flex;gap:20px;flex-direction:column;padding-inline-start:0}.PowerUpsContainer .PowerUpItem{display:flex;justify-content:space-between;border:2px solid var(--emw--button-border-color-secondary, rgba(188, 252, 177, 0.0509803922));opacity:1;font-size:0.9rem;border-radius:12px;padding:20px;gap:4px;text-transform:uppercase}.PowerUpsContainer .PowerUpItem .HistoryRight{text-align:right}.PowerUpsContainer .PowerUpItem .HistoryLeft,.PowerUpsContainer .PowerUpItem .HistoryRight{display:flex;flex-direction:column;gap:8px}.PowerUpsContainer .PowerUpItem .DisplayName{text-transform:none;font-weight:500;line-height:100%;vertical-align:middle;font-size:1.1rem}.PowerUpsContainer .PowerUpItem .Details,.PowerUpsContainer .PowerUpItem .HistoryTime{text-transform:uppercase;font-size:0.85em;color:var(--emw--color-gray-dark, #727672)}.PowerUpsContainer .PowerUpItem .Status.S3{color:var(--emw--color-powup-light-green, #18CE51)}.PowerUpsContainer .Pagination{display:flex;justify-content:center}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.Disabled{opacity:0.5}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem:hover{background-color:transparent}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem{width:22px;height:22px;line-height:22px;opacity:1;border-radius:22px;padding:6px;border:2px solid var(--emw--button-border-color-secondary, rgba(188, 252, 177, 0.0509803922))}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem.Active{border-radius:22px;border:2px solid var(--emw--color-powup-green, #24B24E);color:var(--emw--color-powup-green, #24B24E);background-color:transparent}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem.Active,.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem:hover{color:#00B74F;border:2px solid #00B74F}.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem{background:transparent;border:2px solid rgba(188, 252, 177, 0.0509803922);border-radius:36px;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.PowerUpsContainer .Pagination .PageNavigation .PageArrow{color:transparent}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.PrePage.Disabled,.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage.Disabled{cursor:default;background-image:url(\"data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.25592 0.244078C7.58136 0.569515 7.58136 1.09715 7.25592 1.42259L2.84518 5.83333H12.5C12.9602 5.83333 13.3333 6.20643 13.3333 6.66667C13.3333 7.1269 12.9602 7.5 12.5 7.5H2.84518L7.25592 11.9107C7.58136 12.2362 7.58136 12.7638 7.25592 13.0893C6.93049 13.4147 6.40285 13.4147 6.07741 13.0893L0.244078 7.25592C-0.0813592 6.93049 -0.0813592 6.40285 0.244078 6.07741L6.07741 0.244078C6.40285 -0.0813592 6.93049 -0.0813592 7.25592 0.244078Z' fill='gray'/%3E%3C/svg%3E\")}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.PrePage,.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage{background-image:url(\"data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.25592 0.244078C7.58136 0.569515 7.58136 1.09715 7.25592 1.42259L2.84518 5.83333H12.5C12.9602 5.83333 13.3333 6.20643 13.3333 6.66667C13.3333 7.1269 12.9602 7.5 12.5 7.5H2.84518L7.25592 11.9107C7.58136 12.2362 7.58136 12.7638 7.25592 13.0893C6.93049 13.4147 6.40285 13.4147 6.07741 13.0893L0.244078 7.25592C-0.0813592 6.93049 -0.0813592 6.40285 0.244078 6.07741L6.07741 0.244078C6.40285 -0.0813592 6.93049 -0.0813592 7.25592 0.244078Z' fill='white'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center;display:inherit;width:fit-content;padding:0 15px}.PowerUpsContainer .Pagination .PageNavigation .PageArrow.NextPage{rotate:180deg}";const As=["pt-br","en","es-mx","hu","hr"],Is={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},Ms=(t,e,i)=>{const s=e;let r=Is[void 0!==s&&As.includes(s)?s:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");r=r.replace(i,e)}return r},Ds=class{constructor(e){t(this,e),this.reloadPageEmitter=i(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=7,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(t){this.limit=t.detail.limit?t.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==t.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(t){"..."==t||0==t||parseInt(t.toString(),10)>this.endPageIndex+1||(this.currentPage=t,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return e("ul",{class:"PaginationArea"},this.pagesArray.map((t=>e("li",{class:"PageItem "+(this.currentPage==t?"Active":""),onClick:()=>{this.goTo(t)}},t))))}renderStylingWrapper(){return e("general-styling-wrapper",{targetTranslations:Is,translationUrl:this.translationUrl})}generateNavItemsByType(t,e){if(this.endPageIndex<t)return Array.from({length:this.endPageIndex+1},((t,e)=>e+1));let i=[],s=Math.floor(t/2);const r=this.endPageIndex+1;if(e)if(this.currentPage<s||this.currentPage>r-s+1){i=Array.from({length:s},((t,e)=>e+1)),i.push("...");for(let e=r-(t-i.length-1);e<=r;e++)i.push(e)}else if(this.currentPage==s){i=Array.from({length:s+1},((t,e)=>e+1)),i.push("...");for(let e=r-(t-i.length-1);e<=r;e++)i.push(e)}else if(this.currentPage==r-s+1){i=Array.from({length:s-1},((t,e)=>e+1)),i.push("...");for(let e=r-(t-i.length-1);e<=r;e++)i.push(e)}else i=[1,"..."],i=i.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),i=i.concat(["...",r]);else this.currentPage<=t-s?(i=Array.from({length:t-1},((t,e)=>e+1)),i.push("...")):this.currentPage>r-(t-s)?(i=Array.from({length:t-1},((e,i)=>r-(t-2)+i)),i.unshift("...")):(i=Array.from({length:t-2},((t,e)=>this.currentPage+e-s+1)),i.push("..."),i.unshift("..."));return i}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return e("div",{key:"a6d3cd6cd1e5ff8d927486806d26c6eb61e57833",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&e("span",{key:"56f81e329deb0d5160d4d4e020571d1cc402dcc1",class:"PageOfMessage"},Ms("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),e("div",{key:"eaf964e00190b690564d57af6da91aed717e1690",class:"PageNavigation"},this.arrowsActive&&e("div",{key:"2be57e1c4d3d6fb80db83c6b5c60710573da5f5e",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},Ms("firstPage",this.language)),this.secondaryArrowsActive&&e("span",{key:"d240849c9ba6b9c14d4ebed6c346d7cc629a1a59",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},Ms("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&e("span",{key:"90cb6da1e51256e86f8678e0520d4b221b99957d",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},Ms("nextPage",this.language)),this.arrowsActive&&e("div",{key:"c74711a45bbbf822ca56e6f2fe70ee541ae91cfa",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",Ms("lastPage",this.language)," "),this.renderStylingWrapper()))}};Ds.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emw--color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emw--color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emw--color-primary, #f5f1f1);background-color:var(--emw--color-secondary, #8c8989);border-radius:0.3rem}";const Ts={en:{dateError:"The selected date should be between {min} and {max}",dateError2:"The selected date is not within the accepted range",dateFormatError:"The selected date has a different format then the one required.",numberLengthError:"The number should be between {min} and {max}",lengthError:"The length should be between {minLength} and {maxLength}",fixedLengthError:"The length should be {length} characters",requiredError:"This input is required.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",invalidPassword:"Password does not meet all criteria",passwordStrength:"Password strength",passwordStrengthWeak:"is not adequate",passwordStrengthStrong:"is adequate",SpecialCharactersNotAllowed:"Should not contain special characters",InvalidEmailFormat:"Invalid email format.",EmailNotMatching:"Emails not matching!",PasswordNotMatching:"Passwords not matching",MustIncludeNumber:"Password must include a number",MustContainCapital:"Password must include a capital letter",MustIncludePunctation:"Password must include punctuation",MustIncludeLowercase:"Password must include one lowercase character",OnlyNumbers:"The input should contain only digits.",InvalidFieldSize:"The length must be exactly 11 digits.",InvalidDocumentNumber:"Only numerical characters are allowed.",twofaDescription:"<p> We have sent the verification code to <p> {destination}. </p> </p> <p> Please insert the PIN below. </p>",twofaResendMessage:"Didn't receive the verification code?",twofaResendButton:"Resend",enterIEAddressManually:"For IRE, enter the address manually",postalLookUpNoAddressFound:"No addresses found for this postal code",searchingForAddresses:"Searching for addresses...",SAIdLengthError:"SA ID must be 13 digits",SAIdInvalidError:"Invalid SA ID",PassportLengthError:"Passport number must be 8 or 9 digits.",PasswordMustContain:"Password must contain:",AlphanumericalOnly:"Only alphanumerical characters are allowed",InvalidFirstName:"Only alphabetic characters are allowed.",InvalidLastName:"Only alphabetic characters are allowed.",MissingTrunkCode:"Phone number must start with 0"},hu:{dateError:"A választott dátumnak {min} és {max} között kell lennie",dateError2:"A kiválasztott dátum nincs az elfogadott tartományon belül",dateFormatError:"A kiválasztott dátum formátuma eltér a szükségestől.",numberLengthError:"A számnak {min} és {max} között kell lennie",lengthError:"A hossznak {minLength} és {maxLength} között kell lennie",fixedLengthError:"A hossznak {length} karakternek kell lennie",requiredError:"Ez a beviteli mező kötelező.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",invalidPassword:"A jelszó nem felel meg minden kritériumnak",passwordStrength:"Jelszó erőssége",passwordStrengthWeak:"nem megfelelő",passwordStrengthStrong:"megfelelő",SpecialCharactersNotAllowed:"Nem tartalmazhat speciális karaktereket",InvalidEmailFormat:"Érvénytelen e-mail formátum.",EmailNotMatching:"Az e-mailek nem egyeznek!",PasswordNotMatching:"A jelszavak nem egyeznek",MustIncludeNumber:"A jelszónak tartalmaznia kell egy számot",MustContainCapital:"A jelszónak tartalmaznia kell egy nagybetűt",MustIncludePunctation:"A jelszónak tartalmaznia kell írásjelet",MustIncludeLowercase:"A jelszónak legalább egy kisbetűt kell tartalmaznia",OnlyNumbers:"Csak számjegyeket tartalmazhat.",InvalidFieldSize:"A hosszúságnak pontosan 11 számjegynek kell lennie.",InvalidDocumentNumber:"Csak számjegyek engedélyezettek.",twofaDescription:"<p> A megerősítő kódot elküldtük a következő címre: <p> {destination}. </p> </p> <p> Kérjük, írja be az alábbi PIN-kódot. </p>",twofaResendMessage:"Nem kapta meg a megerősítő kódot?",twofaResendButton:"Újraküldés",PassportLengthError:"Az útlevélszámnak 9 számjegyűnek kell lennie",SAIdLengthError:"A dél-afrikai személyi számnak 13 számjegyűnek kell lennie",SAIdInvalidError:"Érvénytelen dél-afrikai személyi szám",PasswordMustContain:"A jelszónak tartalmaznia kell:",AlphanumericalOnly:"Csak alfanumerikus karakterek engedélyezettek",InvalidFirstName:"Csak betűk engedélyezettek.",InvalidLastName:"Csak betűk engedélyezettek.",MissingTrunkCode:"A telefonszámnak 0-val kell kezdődnie"},hr:{dateError:"Odabrani datum treba biti između {min} i {max}",dateError2:"Odabrani datum nije unutar prihvaćenog raspona",dateFormatError:"Odabrani datum je u drugačijem formatu od potrebnog.",numberLengthError:"Broj bi trebao biti između {min} i {max}",lengthError:"Duljina bi trebala biti između {minLength} i {maxLength}",fixedLengthError:"Duljina mora biti {length} znakova",requiredError:"Ovaj unos je obavezan.",invalidOriginalPasswordError:"Lozinke se ne podudaraju",invalidPassword:"Lozinka ne zadovoljava sve kriterije",passwordStrength:"Lozinka",passwordStrengthWeak:"nije dovoljno jaka",passwordStrengthStrong:"je dovoljno jaka",SpecialCharactersNotAllowed:"Ne smije sadržavati posebne znakove",InvalidEmailFormat:"Nevažeći format e-maila",EmailNotMatching:"E-mailovi se ne podudaraju!",PasswordNotMatching:"Lozinke se ne podudaraju",MustIncludeNumber:"Lozinka mora sadržavati broj",MustContainCapital:"Lozinka mora sadržavati veliko slovo",MustIncludePunctation:"Lozinka mora sadržavati barem jedan znak",MustIncludeLowercase:"Lozinka mora sadržavati barem jedno malo slovo",OnlyNumbers:"Smije sadržavati samo znamenke.",InvalidFieldSize:"Dužina mora biti točno 11 znamenki.",InvalidDocumentNumber:"Dopušteni su samo numerički znakovi.",twofaDescription:"<p> Poslali smo verifikacijski kod na: <p> {destination}. </p> </p> <p> Molimo unesite PIN ispod. </p>",twofaResendMessage:"Niste primili verifikacijski kod?",twofaResendButton:"Ponovno pošalji",PassportLengthError:"Broj putovnice mora imati 9 znamenki",SAIdLengthError:"Južnoafrički osobni broj mora imati 13 znamenki",SAIdInvalidError:"Nevažeći južnoafrički osobni broj",PasswordMustContain:"Lozinka mora sadržavati:",AlphanumericalOnly:"Dopušteni su samo alfanumerički znakovi",InvalidFirstName:"Dozvoljena su samo slova.",InvalidLastName:"Dozvoljena su samo slova.",MissingTrunkCode:"Telefonski broj mora počinjati s 0"},tr:{dateError:"Seçilen tarih {min} ve {max} arasında olmalıdır",dateError2:"Seçilen tarih kabul edilen aralıkta değil",dateFormatError:"Seçilen tarihin formatı, gereken formattan farklı.",numberLengthError:"Sayı {min} ve {max} arasında olmalıdır",lengthError:"Uzunluk {minLength} ve {maxLength} arasında olmalıdır",fixedLengthError:"Uzunluk {length} karakter olmalıdır",requiredError:"Bu alan zorunludur.",invalidOriginalPasswordError:"İlk şifre alanı tüm kriterleri karşılamıyor.",invalidPassword:"Şifre tüm kriterleri karşılamıyor",passwordStrength:"Şifre gücü",passwordStrengthWeak:"yetersiz",passwordStrengthStrong:"yeterli",SpecialCharactersNotAllowed:"Özel karakter içermemelidir",InvalidEmailFormat:"Geçersiz e-posta formatı.",EmailNotMatching:"E-postalar uyuşmuyor!",PasswordNotMatching:"Şifreler uyuşmuyor",MustIncludeNumber:"bir sayı içermelidir",MustContainCapital:"büyük harf içermelidir",MustIncludePunctation:"noktalama işareti içermelidir",MustIncludeLowercase:"Şifre en az bir küçük harf içermelidir",OnlyNumbers:"Yalnızca rakamlar içermelidir.",InvalidFieldSize:"Uzunluk tam olarak 11 rakam olmalıdır.",InvalidDocumentNumber:"Sadece sayısal karakterlere izin verilir.",twofaDescription:"<p> Doğrulama kodunu şu adrese gönderdik: <p> {destination}. </p> </p> <p> Lütfen aşağıya PIN kodunu girin. </p>",twofaResendMessage:"Doğrulama kodunu almadınız mı?",twofaResendButton:"Yeniden gönder",PassportLengthError:"Pasaport numarası 9 haneli olmalıdır",SAIdLengthError:"Güney Afrika kimlik numarası 13 haneli olmalıdır",SAIdInvalidError:"Geçersiz Güney Afrika kimlik numarası",PasswordMustContain:"Şifre şunları içermelidir:",AlphanumericalOnly:"Yalnızca alfanümerik karakterlere izin verilir",InvalidFirstName:"Yalnızca alfabetik karakterlere izin verilir.",InvalidLastName:"Yalnızca alfabetik karakterlere izin verilir.",MissingTrunkCode:"Telefon numarası 0 ile başlamalıdır"},"pt-br":{dateError:"A data selecionada deve estar entre {min} e {max}",dateError2:"A data selecionada não está dentro de um intervalo válido",dateFormatError:"A data selecionada está em um formato diferente do exigido.",numberLengthError:"O número deve estar entre {min} e {max}",lengthError:"O comprimento deve estar entre {minLength} e {maxLength}",fixedLengthError:"O comprimento deve ser de {length} caracteres",requiredError:"Este campo é obrigatório",invalidOriginalPasswordError:"O campo de senha inicial não faz parte dos critérios válidos",invalidPassword:"A senha não atende a todos os critérios",PasswordStrength:"Força da senha",PasswordStrengthWeak:"Não é adequado",PasswordStrengthStrong:"é apropriado",SpecialCharactersNotAllowed:"Não deve conter caracteres especiais",InvalidEmailFormat:"Formato de email inválido",EmailNotMatching:"E-mail não corresponde",PasswordNotMatching:"Senha não corresponde",MustIncludeNumber:"A senha deve incluir um número",MustContainCapital:"A senha deve incluir uma letra maiúscula",MustIncludePunctation:"A senha deve incluir um sinal de pontuação",MustIncludeLowercase:"A senha deve conter pelo menos uma letra minúscula",OnlyNumbers:"Deve conter apenas dígitos.",InvalidFieldSize:"O comprimento deve ser exatamente 11 dígitos.",InvalidDocumentNumber:"Apenas caracteres numéricos são permitidos.",twofaDescription:"<p> Enviamos o código de verificação para: <p> {destination}. </p> </p> <p> Por favor, insira o PIN abaixo. </p>",twofaResendMessage:"Não recebeu o código de verificação?",twofaResendButton:"Reenviar",PassportLengthError:"O número do passaporte deve ter 9 dígitos",SAIdLengthError:"O número de identificação da África do Sul deve ter 13 dígitos",SAIdInvalidError:"Número de identificação da África do Sul inválido",PasswordMustContain:"A senha deve conter:",AlphanumericalOnly:"Apenas caracteres alfanuméricos são permitidos",InvalidFirstName:"Apenas caracteres alfabéticos são permitidos.",InvalidLastName:"Apenas caracteres alfabéticos são permitidos.",MissingTrunkCode:"O número de telefone deve começar com 0"},pt:{dateError:"A data selecionada deve estar entre {min} e {max}",dateError2:"A data selecionada não está dentro do intervalo aceite",dateFormatError:"A data selecionada tem um formato diferente do exigido.",numberLengthError:"O número deve estar entre {min} e {max}",lengthError:"O comprimento deve estar entre {minLength} e {maxLength}",fixedLengthError:"O comprimento deve ser de {length} caracteres",requiredError:"Este campo é obrigatório.",invalidOriginalPasswordError:"O campo da palavra-passe inicial não cumpre todos os critérios.",invalidPassword:"A palavra-passe não cumpre todos os critérios",passwordStrength:"Força da palavra-passe",passwordStrengthWeak:"não é adequada",passwordStrengthStrong:"é adequada",SpecialCharactersNotAllowed:"Não deve conter caracteres especiais",InvalidEmailFormat:"Formato de email inválido.",EmailNotMatching:"Os emails não coincidem!",PasswordNotMatching:"As palavras-passe não coincidem",MustIncludeNumber:"A palavra-passe deve incluir um número",MustContainCapital:"A palavra-passe deve incluir uma letra maiúscula",MustIncludePunctation:"A palavra-passe deve incluir pontuação",MustIncludeLowercase:"A palavra-passe deve incluir um caractere minúsculo",OnlyNumbers:"O campo deve conter apenas dígitos.",InvalidFieldSize:"O comprimento deve ser exatamente 11 dígitos.",InvalidDocumentNumber:"Apenas caracteres numéricos são permitidos.",twofaDescription:"<p> Enviámos o código de verificação para <p> {destination}. </p> </p> <p> Por favor, introduza o PIN abaixo. </p>",twofaResendMessage:"Não recebeu o código de verificação?",twofaResendButton:"Reenviar",enterIEAddressManually:"Para IRE, introduza o endereço manualmente",postalLookUpNoAddressFound:"Não foram encontrados endereços para este código postal",searchingForAddresses:"A procurar endereços...",SAIdLengthError:"O ID da África do Sul deve ter 13 dígitos",SAIdInvalidError:"ID da África do Sul inválido",PassportLengthError:"O número de passaporte deve ter 8 ou 9 dígitos.",PasswordMustContain:"A palavra-passe deve conter:",AlphanumericalOnly:"Apenas caracteres alfanuméricos são permitidos",InvalidFirstName:"Apenas caracteres alfabéticos são permitidos.",InvalidLastName:"Apenas caracteres alfabéticos são permitidos.",MissingTrunkCode:"O número de telefone deve começar por 0"},"es-mx":{dateError:"La fecha seleccionada debe ser entre {min} y {max}",dateError2:"La fecha seleccionada no está dentro de un rango válido",dateFormatError:"La fecha seleccionada tiene un formato diferente al requerido.",numberLengthError:"El número debe ser entre {min} y {max}",lengthError:"La longitud deber ser entre {minLength} y {maxLength}",fixedLengthError:"La longitud debe ser de {length} caracteres",requiredError:"Este campo es requerido",invalidOriginalPasswordError:"El campo de contraseña inicial no es parte del criterio válido",invalidPassword:"La contraseña no cumple con todos los criterios",PasswordStrength:"La fortaleza de la contraseña",PasswordStrengthWeak:"no es adecuada",PasswordStrengthStrong:"es adecuada",SpecialCharactersNotAllowed:"No debe contener caracteres especiales",InvalidEmailFormat:"Formato inválido de correo",EmailNotMatching:"El correo electrónico no coincide",PasswordNotMatching:"La contraseña no coincide",MustIncludeNumber:"La contraseña debe incluir un número",MustContainCapital:"La contraseña debe incluir una letra mayúscula",MustIncludePunctation:"La contraseña debe incluir un signo de puntuación",MustIncludeLowercase:"La contraseña debe contener al menos una letra minúscula",OnlyNumbers:"Debe contener solo dígitos.",InvalidFieldSize:"La longitud debe ser exactamente de 11 dígitos.",InvalidDocumentNumber:"Solo se permiten caracteres numéricos.",twofaDescription:"<p> Hemos enviado el código de verificación a: <p> {destination}. </p> </p> <p> Por favor, ingrese el PIN a continuación. </p>",twofaResendMessage:"¿No recibiste el código de verificación?",twofaResendButton:"Reenviar",PassportLengthError:"El número de pasaporte debe tener 9 dígitos",SAIdLengthError:"El número de identificación de Sudáfrica debe tener 13 dígitos",SAIdInvalidError:"Número de identificación de Sudáfrica inválido",PasswordMustContain:"La contraseña debe contener:",AlphanumericalOnly:"Solo se permiten caracteres alfanuméricos",InvalidFirstName:"Solo se permiten caracteres alfabéticos.",InvalidLastName:"Solo se permiten caracteres alfabéticos.",MissingTrunkCode:"El número de teléfono debe comenzar con 0"},fr:{dateError:"La date sélectionnée doit être comprise entre {min} et {max}",dateError2:"La date sélectionnée n’est pas dans la plage autorisée",dateFormatError:"Le format de la date sélectionnée est incorrect.",numberLengthError:"Le nombre doit être compris entre {min} et {max}",lengthError:"La longueur doit être comprise entre {minLength} et {maxLength}",fixedLengthError:"La longueur doit être de {length} caractères",requiredError:"Ce champ est obligatoire.",invalidOriginalPasswordError:"Le mot de passe initial ne respecte pas tous les critères.",invalidPassword:"Le mot de passe ne respecte pas tous les critères",passwordStrength:"Robustesse du mot de passe",passwordStrengthWeak:"est insuffisante",passwordStrengthStrong:"est suffisante",SpecialCharactersNotAllowed:"Ne doit pas contenir de caractères spéciaux",InvalidEmailFormat:"Format d’adresse e-mail invalide.",EmailNotMatching:"Les adresses e-mail ne correspondent pas !",PasswordNotMatching:"Les mots de passe ne correspondent pas",MustIncludeNumber:"Le mot de passe doit contenir un chiffre",MustContainCapital:"Le mot de passe doit contenir une lettre majuscule",MustIncludePunctation:"Le mot de passe doit contenir un caractère de ponctuation",MustIncludeLowercase:"Le mot de passe doit contenir une lettre minuscule",OnlyNumbers:"Ce champ ne doit contenir que des chiffres.",InvalidFieldSize:"La longueur doit être exactement de 11 chiffres.",InvalidDocumentNumber:"Seuls les caractères numériques sont autorisés.",twofaDescription:"<p>Nous avons envoyé le code de vérification à <p>{destination}</p>.</p><p>Veuillez saisir le code PIN ci-dessous.</p>",twofaResendMessage:"Vous n’avez pas reçu le code de vérification ?",twofaResendButton:"Renvoyer",enterIEAddressManually:"Pour l’Irlande, saisissez l’adresse manuellement",postalLookUpNoAddressFound:"Aucune adresse trouvée pour ce code postal",searchingForAddresses:"Recherche d’adresses...",SAIdLengthError:"L’identifiant sud-africain doit comporter 13 chiffres",SAIdInvalidError:"Identifiant sud-africain invalide",PassportLengthError:"Le numéro de passeport doit comporter 8 ou 9 chiffres.",PasswordMustContain:"Le mot de passe doit contenir :",AlphanumericalOnly:"Seuls les caractères alphanumériques sont autorisés",InvalidFirstName:"Seuls les caractères alphabétiques sont autorisés.",InvalidLastName:"Seuls les caractères alphabétiques sont autorisés.",MissingTrunkCode:"Le numéro de téléphone doit commencer par 0"}},zs={DOCUMENT_NUMBER:"DocumentNumber",FIRSTNAME_ON_DOCUMENT:"FirstnameOnDocument",LASTNAME_ON_DOCUMENT:"LastnameOnDocument",PASSPORT:"Passport",SOUTH_AFRICAN_ID:"SouthAfricanID",BIRTHDATE:"BirthDate",PASSPORT_NUMERIC_REGEX:/^\d{8,9}$/,SA_ID_BASIC_REGEX:/^\d{13}$/,SOUTH_AFRICAN_ID_LENGTH:13,NON_LETTERS_REGEX:/[^A-Za-z]/g,DATE_FORMAT:"yyyy-MM-dd",PASSWORD_COMPLEXITY_PASSED:"passed",PASSWORD_COMPLEXITY_FAILED:"failed"},Ns="requiredError",Fs="lengthError",Os="fixedLengthError",Ls=(t,e,i)=>{let s=Ts[e]?Ts[e][t]:Ts.en[t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s},Us='<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="6" cy="6" r="5.5" stroke="#979797"/>\n<rect x="5" y="5" width="2" height="5" fill="#979797"/>\n<circle cx="6" cy="3" r="1" fill="#979797"/>\n</svg>\n',Bs=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.value=null,this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1,this.selectedValues=[],this.showCheckboxes=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.showCheckboxes=!0,this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language)}renderTooltip(){return this.showTooltip?e("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){const e=t.target.checked;this.showCheckboxes=e,this.selectedValues=e?this.options.map((t=>t.name)):[]}renderLabel(){return e("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},e("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return e("div",{key:"342900ae923094f2746fd43917743d01efba942e",class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"8f3b470274047b355741b438a4e15c7c46504f5a",class:"checkboxgroup__wrapper--flex"},e("vaadin-checkbox",{key:"c7a74f9da877304f4d71607d58eba90dd0a29de7",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&e("img",{key:"75d807ad544e043a2e3beed46bf0c7dfa2125324",class:"checkboxgroup__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),e("small",{key:"4b17e1e613c7561fb3c99f334926544ef2ba787a",class:"checkboxgroup__error-message"},this.errorMessage),this.showCheckboxes&&e("vaadin-checkbox-group",{key:"9a8d573a7cb48bb2d68cceec5f39f1e0886ea05f",theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>e("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};Bs.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}';const js=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.value="",this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.inputReference=this.vaadinCheckbox.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleCheckbox(t){this.value=t.target.checked.toString(),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language)}renderLabel(){var t;return e("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},e("div",{class:{"checkbox__label-text":!0,mandatory:null===(t=this.validation)||void 0===t?void 0:t.mandatory},innerHTML:this.displayName}))}renderTooltip(){return this.showTooltip?e("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return e("div",{key:"a8d8bf6aa2001b6aee44d728a198244819ae169e",class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},e("vaadin-checkbox",{key:"13a5589a78bef4277922535e59c5718d36b1f318",class:"checkbox__input",required:this.validation.mandatory,checked:"true"===this.defaultValue,onChange:t=>this.handleCheckbox(t),"error-message":!this.isValid&&this.errorMessage,ref:t=>this.vaadinCheckbox=t},this.renderLabel()),this.tooltip&&e("img",{key:"008bb9a318c914b4b40e80b15080f7f174cc1262",class:"checkboxgroup__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};function Ys(t){return Ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ys(t)}function Rs(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Gs(t){Rs(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Ys(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Hs(t){if(Rs(1,arguments),!function(t){return Rs(1,arguments),t instanceof Date||"object"===Ys(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Gs(t);return!isNaN(Number(e))}function Vs(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function $s(t,e){return Rs(2,arguments),function(t,e){Rs(2,arguments);var i=Gs(t).getTime(),s=Vs(e);return new Date(i+s)}(t,-Vs(e))}function Ws(t){Rs(1,arguments);var e=Gs(t),i=e.getUTCDay(),s=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-s),e.setUTCHours(0,0,0,0),e}function qs(t){Rs(1,arguments);var e=Gs(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var r=Ws(s),o=new Date(0);o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0);var n=Ws(o);return e.getTime()>=r.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}js.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal;font-size:15px}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input[indeterminate]::part(checkbox)::after,.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding:0px;vertical-align:baseline}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input::part(required-indicator)::after{display:none}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}.checkbox__label-text.mandatory::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}';function Ks(t){Rs(1,arguments);var e=Gs(t),i=Ws(e).getTime()-function(t){Rs(1,arguments);var e=qs(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Ws(i)}(e).getTime();return Math.round(i/6048e5)+1}var Js={};function Xs(){return Js}function Qs(t,e){var i,s,r,o,n,a,l,h;Rs(1,arguments);var d=Xs(),c=Vs(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:d.weekStartsOn)&&void 0!==s?s:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Gs(t),p=u.getUTCDay(),m=(p<c?7:0)+p-c;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Zs(t,e){var i,s,r,o,n,a,l,h;Rs(1,arguments);var d=Gs(t),c=d.getUTCFullYear(),u=Xs(),p=Vs(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:u.firstWeekContainsDate)&&void 0!==s?s:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(c+1,0,p),m.setUTCHours(0,0,0,0);var v=Qs(m,e),f=new Date(0);f.setUTCFullYear(c,0,p),f.setUTCHours(0,0,0,0);var g=Qs(f,e);return d.getTime()>=v.getTime()?c+1:d.getTime()>=g.getTime()?c:c-1}function tr(t,e){Rs(1,arguments);var i=Gs(t),s=Qs(i,e).getTime()-function(t,e){var i,s,r,o,n,a,l,h;Rs(1,arguments);var d=Xs(),c=Vs(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==s?s:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Zs(t,e),p=new Date(0);return p.setUTCFullYear(u,0,c),p.setUTCHours(0,0,0,0),Qs(p,e)}(i,e).getTime();return Math.round(s/6048e5)+1}function er(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}var ir={y:function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return er("yy"===e?s%100:s,e.length)},M:function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):er(i+1,2)},d:function(t,e){return er(t.getUTCDate(),e.length)},a:function(t,e){var i=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:function(t,e){return er(t.getUTCHours()%12||12,e.length)},H:function(t,e){return er(t.getUTCHours(),e.length)},m:function(t,e){return er(t.getUTCMinutes(),e.length)},s:function(t,e){return er(t.getUTCSeconds(),e.length)},S:function(t,e){var i=e.length,s=t.getUTCMilliseconds();return er(Math.floor(s*Math.pow(10,i-3)),e.length)}};const sr=ir;var rr={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return sr.y(t,e)},Y:function(t,e,i,s){var r=Zs(t,s),o=r>0?r:1-r;return"YY"===e?er(o%100,2):"Yo"===e?i.ordinalNumber(o,{unit:"year"}):er(o,e.length)},R:function(t,e){return er(qs(t),e.length)},u:function(t,e){return er(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return er(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return er(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return sr.M(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return er(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var r=tr(t,s);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):er(r,e.length)},I:function(t,e,i){var s=Ks(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):er(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):sr.d(t,e)},D:function(t,e,i){var s=function(t){Rs(1,arguments);var e=Gs(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):er(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var r=t.getUTCDay(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return er(o,2);case"eo":return i.ordinalNumber(o,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var r=t.getUTCDay(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return er(o,e.length);case"co":return i.ordinalNumber(o,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),r=0===s?7:s;switch(e){case"i":return String(r);case"ii":return er(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,r=t.getUTCHours();switch(s=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,r=t.getUTCHours();switch(s=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return sr.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):sr.H(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):er(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):er(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):sr.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):sr.s(t,e)},S:function(t,e){return sr.S(t,e)},X:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return nr(r);case"XXXX":case"XX":return ar(r);default:return ar(r,":")}},x:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return nr(r);case"xxxx":case"xx":return ar(r);default:return ar(r,":")}},O:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+or(r,":");default:return"GMT"+ar(r,":")}},z:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+or(r,":");default:return"GMT"+ar(r,":")}},t:function(t,e,i,s){return er(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return er((s._originalDate||t).getTime(),e.length)}};function or(t,e){var i=t>0?"-":"+",s=Math.abs(t),r=Math.floor(s/60),o=s%60;if(0===o)return i+String(r);var n=e||"";return i+String(r)+n+er(o,2)}function nr(t,e){return t%60==0?(t>0?"-":"+")+er(Math.abs(t)/60,2):ar(t,e)}function ar(t,e){var i=e||"",s=t>0?"-":"+",r=Math.abs(t);return s+er(Math.floor(r/60),2)+i+er(r%60,2)}const lr=rr;var hr=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},dr=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},cr={p:dr,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],r=s[1],o=s[2];if(!o)return hr(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",hr(r,e)).replace("{{time}}",dr(o,e))}};const ur=cr;function pr(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var mr=["D","DD"],vr=["YY","YYYY"];function fr(t){return-1!==mr.indexOf(t)}function gr(t){return-1!==vr.indexOf(t)}function br(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var wr={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function yr(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var xr={date:yr({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:yr({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:yr({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},_r={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function kr(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,o=null!=i&&i.width?String(i.width):r;s=t.formattingValues[o]||t.formattingValues[r]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[n]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function Cr(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,r=e.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var o,n=r[0],a=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return o=t.valueCallback?t.valueCallback(l):l,{value:o=i.valueCallback?i.valueCallback(o):o,rest:e.slice(n.length)}}}var Sr;const Er={code:"en-US",formatDistance:function(t,e,i){var s,r=wr[t];return s="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:xr,formatRelative:function(t){return _r[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:kr({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:kr({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:kr({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:kr({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:kr({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Sr={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(Sr.matchPattern);if(!i)return null;var s=i[0],r=t.match(Sr.parsePattern);if(!r)return null;var o=Sr.valueCallback?Sr.valueCallback(r[0]):r[0];return{value:o=e.valueCallback?e.valueCallback(o):o,rest:t.slice(s.length)}}),era:Cr({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Cr({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Cr({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Cr({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Cr({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Pr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ar=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ir=/^'([^]*?)'?$/,Mr=/''/g,Dr=/[a-zA-Z]/;function Tr(t,e,i){var s,r,o,n,a,l,h,d,c,u,p,m,v,f,g,b,w,y;Rs(2,arguments);var x=String(e),_=Xs(),k=null!==(s=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:_.locale)&&void 0!==s?s:Er,C=Vs(null!==(o=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==a?a:_.firstWeekContainsDate)&&void 0!==n?n:null===(c=_.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Vs(null!==(p=null!==(m=null!==(v=null!==(f=null==i?void 0:i.weekStartsOn)&&void 0!==f?f:null==i||null===(g=i.locale)||void 0===g||null===(b=g.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==v?v:_.weekStartsOn)&&void 0!==m?m:null===(w=_.locale)||void 0===w||null===(y=w.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==p?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var E=Gs(t);if(!Hs(E))throw new RangeError("Invalid time value");var P=$s(E,pr(E)),A={firstWeekContainsDate:C,weekStartsOn:S,locale:k,_originalDate:E};return x.match(Ar).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,ur[e])(t,k.formatLong):t})).join("").match(Pr).map((function(s){if("''"===s)return"'";var r,o,n=s[0];if("'"===n)return(o=(r=s).match(Ir))?o[1].replace(Mr,"'"):r;var a=lr[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||!gr(s)||br(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!fr(s)||br(s,e,String(t)),a(P,s,k.localize,A);if(n.match(Dr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return s})).join("")}function zr(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}function Nr(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return zr(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?zr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0,r=function(){};return{s:r,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,o=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw o}}}}function Fr(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function Or(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lr(t,e){return Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lr(t,e)}function Ur(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lr(t,e)}function Br(t){return Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Br(t)}function jr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jr=function(){return!!t})()}function Yr(t){var e=jr();return function(){var i,s=Br(t);if(e){var r=Br(this).constructor;i=Reflect.construct(s,arguments,r)}else i=s.apply(this,arguments);return function(t,e){if(e&&("object"==Ys(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Or(t)}(this,i)}}function Rr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gr(t){var e=function(t){if("object"!=Ys(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Ys(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ys(e)?e:e+""}function Hr(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,Gr(s.key),s)}}function Vr(t,e,i){return e&&Hr(t.prototype,e),i&&Hr(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function $r(t,e,i){return(e=Gr(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Wr=function(){function t(){Rr(this,t),$r(this,"priority",void 0),$r(this,"subPriority",0)}return Vr(t,[{key:"validate",value:function(){return!0}}]),t}(),qr=function(){Ur(e,Wr);var t=Yr(e);function e(i,s,r,o,n){var a;return Rr(this,e),(a=t.call(this)).value=i,a.validateValue=s,a.setValue=r,a.priority=o,n&&(a.subPriority=n),a}return Vr(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Kr=function(){Ur(e,Wr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",10),$r(Or(i),"subPriority",-1),i}return Vr(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),Jr=function(){function t(){Rr(this,t),$r(this,"incompatibleTokens",void 0),$r(this,"priority",void 0),$r(this,"subPriority",void 0)}return Vr(t,[{key:"run",value:function(t,e,i,s){var r=this.parse(t,e,i,s);return r?{setter:new qr(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Xr=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",140),$r(Or(i),"incompatibleTokens",["R","u","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Qr=/^(1[0-2]|0?\d)/,Zr=/^(3[0-1]|[0-2]?\d)/,to=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,eo=/^(5[0-3]|[0-4]?\d)/,io=/^(2[0-3]|[0-1]?\d)/,so=/^(2[0-4]|[0-1]?\d)/,ro=/^(1[0-1]|0?\d)/,oo=/^(1[0-2]|0?\d)/,no=/^[0-5]?\d/,ao=/^[0-5]?\d/,lo=/^\d/,ho=/^\d{1,2}/,co=/^\d{1,3}/,uo=/^\d{1,4}/,po=/^-?\d+/,mo=/^-?\d/,vo=/^-?\d{1,2}/,fo=/^-?\d{1,3}/,go=/^-?\d{1,4}/,bo=/^([+-])(\d{2})(\d{2})?|Z/,wo=/^([+-])(\d{2})(\d{2})|Z/,yo=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,xo=/^([+-])(\d{2}):(\d{2})|Z/,_o=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function ko(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Co(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function So(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function Eo(t){return Co(po,t)}function Po(t,e){switch(t){case 1:return Co(lo,e);case 2:return Co(ho,e);case 3:return Co(co,e);case 4:return Co(uo,e);default:return Co(new RegExp("^\\d{1,"+t+"}"),e)}}function Ao(t,e){switch(t){case 1:return Co(mo,e);case 2:return Co(vo,e);case 3:return Co(fo,e);case 4:return Co(go,e);default:return Co(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Io(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Mo(t,e){var i,s=e>0,r=s?e:1-e;if(r<=50)i=t||100;else{var o=r+50;i=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return s?i:1-i}function Do(t){return t%400==0||t%4==0&&t%100!=0}var To=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",130),$r(Or(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return ko(Po(4,t),s);case"yo":return ko(i.ordinalNumber(t,{unit:"year"}),s);default:return ko(Po(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var s=t.getUTCFullYear();if(i.isTwoDigitYear){var r=Mo(i.year,s);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),zo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",130),$r(Or(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return ko(Po(4,t),s);case"Yo":return ko(i.ordinalNumber(t,{unit:"year"}),s);default:return ko(Po(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,s){var r=Zs(t,s);if(i.isTwoDigitYear){var o=Mo(i.year,r);return t.setUTCFullYear(o,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Qs(t,s)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Qs(t,s)}}]),e}(),No=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",130),$r(Or(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e){return Ao("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),Ws(s)}}]),e}(),Fo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",130),$r(Or(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e){return Ao("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Oo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",120),$r(Or(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return Po(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Lo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",120),$r(Or(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return Po(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Uo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),$r(Or(i),"priority",110),i}return Vr(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"M":return ko(Co(Qr,t),s);case"MM":return ko(Po(2,t),s);case"Mo":return ko(i.ordinalNumber(t,{unit:"month"}),s);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Bo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",110),$r(Or(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"L":return ko(Co(Qr,t),s);case"LL":return ko(Po(2,t),s);case"Lo":return ko(i.ordinalNumber(t,{unit:"month"}),s);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),jo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",100),$r(Or(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return Co(eo,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,s){return Qs(function(t,e,i){Rs(2,arguments);var s=Gs(t),r=Vs(e),o=tr(s,i)-r;return s.setUTCDate(s.getUTCDate()-7*o),s}(t,i,s),s)}}]),e}(),Yo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",100),$r(Or(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return Co(eo,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Ws(function(t,e){Rs(2,arguments);var i=Gs(t),s=Vs(e),r=Ks(i)-s;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Ro=[31,28,31,30,31,30,31,31,30,31,30,31],Go=[31,29,31,30,31,30,31,31,30,31,30,31],Ho=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"subPriority",1),$r(Or(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return Co(Zr,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){var i=Do(t.getUTCFullYear()),s=t.getUTCMonth();return i?e>=1&&e<=Go[s]:e>=1&&e<=Ro[s]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Vo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"subpriority",1),$r(Or(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return Co(to,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return Do(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function $o(t,e,i){var s,r,o,n,a,l,h,d;Rs(2,arguments);var c=Xs(),u=Vs(null!==(s=null!==(r=null!==(o=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==r?r:null===(h=c.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==s?s:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Gs(t),m=Vs(e),v=((m%7+7)%7<u?7:0)+m-p.getUTCDay();return p.setUTCDate(p.getUTCDate()+v),p}var Wo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=$o(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),qo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return ko(Po(e.length,t),r);case"eo":return ko(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=$o(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),Ko=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return ko(Po(e.length,t),r);case"co":return ko(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=$o(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),Jo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",90),$r(Or(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){var s=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Po(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return ko(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return ko(i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ko(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);default:return ko(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){Rs(2,arguments);var i=Vs(e);i%7==0&&(i-=7);var s=Gs(t),r=((i%7+7)%7<1?7:0)+i-s.getUTCDay();return s.setUTCDate(s.getUTCDate()+r),s}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Xo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",80),$r(Or(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Io(i),0,0,0),t}}]),e}(),Qo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",80),$r(Or(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Io(i),0,0,0),t}}]),e}(),Zo=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",80),$r(Or(i),"incompatibleTokens",["a","b","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Io(i),0,0,0),t}}]),e}(),tn=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",70),$r(Or(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return Co(oo,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:s||12!==i?i:0,0,0,0),t}}]),e}(),en=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",70),$r(Or(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return Co(io,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),sn=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",70),$r(Or(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return Co(ro,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:i,0,0,0),t}}]),e}(),rn=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",70),$r(Or(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return Co(so,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),on=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",60),$r(Or(i),"incompatibleTokens",["t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return Co(no,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),nn=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",50),$r(Or(i),"incompatibleTokens",["t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return Co(ao,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Po(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),an=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",30),$r(Or(i),"incompatibleTokens",["t","T"]),i}return Vr(e,[{key:"parse",value:function(t,e){return ko(Po(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),ln=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",10),$r(Or(i),"incompatibleTokens",["t","T","x"]),i}return Vr(e,[{key:"parse",value:function(t,e){switch(e){case"X":return So(bo,t);case"XX":return So(wo,t);case"XXXX":return So(yo,t);case"XXXXX":return So(_o,t);default:return So(xo,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),hn=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",10),$r(Or(i),"incompatibleTokens",["t","T","X"]),i}return Vr(e,[{key:"parse",value:function(t,e){switch(e){case"x":return So(bo,t);case"xx":return So(wo,t);case"xxxx":return So(yo,t);case"xxxxx":return So(_o,t);default:return So(xo,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),dn=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",40),$r(Or(i),"incompatibleTokens","*"),i}return Vr(e,[{key:"parse",value:function(t){return Eo(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),cn=function(){Ur(e,Jr);var t=Yr(e);function e(){var i;Rr(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return $r(Or(i=t.call.apply(t,[this].concat(r))),"priority",20),$r(Or(i),"incompatibleTokens","*"),i}return Vr(e,[{key:"parse",value:function(t){return Eo(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),un={G:new Xr,y:new To,Y:new zo,R:new No,u:new Fo,Q:new Oo,q:new Lo,M:new Uo,L:new Bo,w:new jo,I:new Yo,d:new Ho,D:new Vo,E:new Wo,e:new qo,c:new Ko,i:new Jo,a:new Xo,b:new Qo,B:new Zo,h:new tn,H:new en,K:new sn,k:new rn,m:new on,s:new nn,S:new an,X:new ln,x:new hn,t:new dn,T:new cn},pn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vn=/^'([^]*?)'?$/,fn=/''/g,gn=/\S/,bn=/[a-zA-Z]/;function wn(t,e,i,s){var r,o,n,a,l,h,d,c,u,p,m,v,f,g,b,w,y,x;Rs(3,arguments);var _=String(t),k=String(e),C=Xs(),S=null!==(r=null!==(o=null==s?void 0:s.locale)&&void 0!==o?o:C.locale)&&void 0!==r?r:Er;if(!S.match)throw new RangeError("locale must contain match property");var E=Vs(null!==(n=null!==(a=null!==(l=null!==(h=null==s?void 0:s.firstWeekContainsDate)&&void 0!==h?h:null==s||null===(d=s.locale)||void 0===d||null===(c=d.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==l?l:C.firstWeekContainsDate)&&void 0!==a?a:null===(u=C.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=Vs(null!==(m=null!==(v=null!==(f=null!==(g=null==s?void 0:s.weekStartsOn)&&void 0!==g?g:null==s||null===(b=s.locale)||void 0===b||null===(w=b.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==f?f:C.weekStartsOn)&&void 0!==v?v:null===(y=C.locale)||void 0===y||null===(x=y.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==m?m:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===_?Gs(i):new Date(NaN);var A,I={firstWeekContainsDate:E,weekStartsOn:P,locale:S},M=[new Kr],D=k.match(mn).map((function(t){var e=t[0];return e in ur?(0,ur[e])(t,S.formatLong):t})).join("").match(pn),T=[],z=Nr(D);try{var N=function(){var e=A.value;null!=s&&s.useAdditionalWeekYearTokens||!gr(e)||br(e,k,t),null!=s&&s.useAdditionalDayOfYearTokens||!fr(e)||br(e,k,t);var i=e[0],r=un[i];if(r){var o=r.incompatibleTokens;if(Array.isArray(o)){var n=T.find((function(t){return o.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&T.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));T.push({token:i,fullToken:e});var a=r.run(_,e,S.match,I);if(!a)return{v:new Date(NaN)};M.push(a.setter),_=a.rest}else{if(i.match(bn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(vn)[1].replace(fn,"'")),0!==_.indexOf(e))return{v:new Date(NaN)};_=_.slice(e.length)}};for(z.s();!(A=z.n()).done;){var F=N();if("object"===Ys(F))return F.v}}catch(t){z.e(t)}finally{z.f()}if(_.length>0&&gn.test(_))return new Date(NaN);var O=M.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return M.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),L=Gs(i);if(isNaN(L.getTime()))return new Date(NaN);var U,B=$s(L,pr(L)),j={},Y=Nr(O);try{for(Y.s();!(U=Y.n()).done;){var R=U.value;if(!R.validate(B,I))return new Date(NaN);var G=R.set(B,j,I);Array.isArray(G)?(B=G[0],Fr(j,G[1])):B=G}}catch(t){Y.e(t)}finally{Y.f()}return B}function yn(t,e){Rs(2,arguments);var i=Gs(t),s=Gs(e);return i.getTime()>s.getTime()}function xn(t,e){Rs(2,arguments);var i=Gs(t),s=Gs(e);return i.getTime()<s.getTime()}function _n(t,e,i){return Rs(2,arguments),Hs(wn(t,e,new Date,i))}const kn=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:s}=t;return Tr(new Date(e,i,s),this.dateFormat)},this.parseDate=t=>{const e=wn(t,this.dateFormat,new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleDocumentIdUpdate=t=>{this.name===zs.BIRTHDATE&&(this.value=t.detail,this.valueAsDate=wn(this.value||"",zs.DATE_FORMAT,new Date),this.touched=!0,this.datePicker&&(this.datePicker.value=this.value),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.valueHandler({name:this.name,value:this.value}))},this.handleMaskedTyping=t=>{var e;const i=t.target;if(!i)return;const s=null!==(e=i.selectionStart)&&void 0!==e?e:i.value.length,r=i.value,[o,n,a]=this.getFormatStructure(this.dateFormat),{seps:l}=this.parseFormat(this.dateFormat),[h,d]=l,c=o+n+a,u=r.replace(/\D/g,"").slice(0,c),p=u.slice(0,o),m=u.slice(o,o+n),v=u.slice(o+n,o+n+a);let f=p;u.length>o&&(f+=h+m),u.length>o+n&&(f+=d+v),i.value=f;const g=this.totalSeparatorLength(r,[h,d]),b=this.totalSeparatorLength(f,[h,d]);let w=s+Math.max(0,b-g);w=Math.max(0,Math.min(w,f.length));try{i.setSelectionRange(w,w)}catch(t){}if(u.length<c)return this.errorMessage="",void this.resetIncompleteState();try{const t=wn(f,this.dateFormat,new Date);if(t&&!isNaN(t.getTime())){const e=Tr(t,"yyyy-MM-dd");this.value=e,this.valueAsDate=t,this.isValid=!0,this.errorMessage="",this.datePicker&&(this.datePicker.value=e),this.valueHandler({name:this.name,value:this.value})}else this.resetIncompleteState()}catch(t){this.resetIncompleteState()}},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.dateFormat="yyyy-MM-dd",this.emitOnClick=!1,this.enableSouthAfricanMode=void 0,this.enableManualDateInput=!1,this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}get formattedValue(){return this.value?Tr(wn(this.value,"yyyy-MM-dd",new Date),this.dateFormat):""}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}handleCustomRegistrationChange(t){t?window.addEventListener("documentIdUpdated",this.handleDocumentIdUpdate):window.removeEventListener("documentIdUpdated",this.handleDocumentIdUpdate)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=wn((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=wn((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){var t;if(this.handleClientStyling(),this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker){const e=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');if(e&&e.addEventListener("click",(()=>this.handleCalendarIconClick())),this.datePicker.addEventListener("opened-changed",(t=>{!0===t.detail.value?this.errorMessage="":(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0)})),this.enableManualDateInput){const e=null===(t=this.datePicker)||void 0===t?void 0:t.inputElement;e&&e.addEventListener("input",this.handleMaskedTyping)}}this.enableSouthAfricanMode&&window.addEventListener("documentIdUpdated",this.handleDocumentIdUpdate),this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value})),this.isValid=this.setValidity()}disconnectedCallback(){var t;if(this.enableSouthAfricanMode&&window.removeEventListener("documentIdUpdated",this.handleDocumentIdUpdate),this.enableManualDateInput){const e=null===(t=this.datePicker)||void 0===t?void 0:t.inputElement;e&&e.removeEventListener("input",this.handleMaskedTyping)}}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=wn(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0),this.enableSouthAfricanMode&&window.dispatchEvent(new CustomEvent("birthDateUpdated",{detail:{birthDate:this.value}}))}handleValidated(){this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()}setValidity(){return!(xn(this.valueAsDate,this.minDate)||yn(this.valueAsDate,this.maxDate)||!_n(this.formattedValue,this.dateFormat))&&this.inputReference.validity.valid}setErrorMessage(){return this.inputReference.validity.valueMissing?Ls("requiredError",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?Ls("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):xn(this.valueAsDate,this.minDate)||yn(this.valueAsDate,this.maxDate)?Ls("dateError2",this.language):_n(this.formattedValue,this.dateFormat)?void 0:Ls("dateFormatError",this.language)}renderTooltip(){return this.showTooltip?e("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}parseFormat(t){var e;const i=null!=t?t:"dd-MM-yyyy",s=/([dMy]+)|([^dMy]+)/g,r=[],o=[];let n;for(;n=s.exec(i);)n[1]?r.push(n[1]):n[2]&&o.push(n[2]);if(o.length<2){const t=null!==(e=o[0])&&void 0!==e?e:"-";for(;o.length<2;)o.push(t)}return{tokens:r,seps:[o[0],o[1]]}}getFormatStructure(t){const{tokens:e}=this.parseFormat(t);if(e.length<3)return[2,2,4];const i=e.map((t=>t.length));return[i[0],i[1],i[2]]}totalSeparatorLength(t,e){if(!t)return 0;let i=0;for(const s of e){if(!s)continue;const e=new RegExp(this.escapeRegExp(s),"g"),r=t.match(e);r&&(i+=r.length*s.length)}return i}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}resetIncompleteState(){this.value="",this.valueAsDate=void 0,this.isValid=!1}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"ffff8be16fb22a41ea8c5168a79e40b9f410c63b",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("label",{key:"60da1ad0bc4cc7757e6f1096866667a97bd146b5",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName,e("span",{key:"450b4638efa34f4490035b0d99b0b186f053a2d0",class:this.validation.mandatory?"date__label--required":""})),e("vaadin-date-picker",{key:"421875a710bb4508e3218d28bf2c28dcd0e9793b",id:`${this.name}__input`,type:"date",class:`date__input ${t} ${this.enableManualDateInput&&"date__manual-mode"}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onValidated:()=>this.handleValidated(),autoOpenDisabled:this.enableManualDateInput}),e("small",{key:"33a6fed8057a84cb648f94a318c3ec0b1e495fff",class:"date__error-message"},this.errorMessage),this.tooltip&&e("img",{key:"d91fcd13e1ae384b67b6d478834b65136ab77b77",class:"date__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],enableSouthAfricanMode:["handleCustomRegistrationChange"]}}};kn.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.date__manual-mode::part(toggle-button){display:none}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.date__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const Cn=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return Ls("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return Ls(`${i}`,this.language)?Ls(`${i}`,this.language):s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return Ls(`${t}`,this.language)?Ls(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?e("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"f852525fe8d8b695e638fdd83e8b0c2c20d98771",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"d6a6dec4e76ba1fbe15bed09f82cecde12cabe1a",class:"email__wrapper--flex"},e("label",{key:"4498ae1bac287cb80544c4d743afad2ec678e3bd",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"e54d1258e48f54304a553cffb83466e4a4fadb4c",class:"email__wrapper--relative"},this.tooltip&&e("img",{key:"29d7b95f22c8cb70d505f74a7ea18284faa908ee",class:"email__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("input",{key:"08754b178e395f26c1d8a61ff667b91df3fb0ec7",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),e("small",{key:"3024a57f5d0897f34013eb4397d78babc2333192",class:"email__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Cn.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emw--color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.email__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__input::placeholder{color:var(--emw--color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';var Sn=Object.defineProperty,En=Object.defineProperties,Pn=Object.getOwnPropertyDescriptors,An=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,Dn=(t,e,i)=>e in t?Sn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Tn=(t,e)=>{for(var i in e||(e={}))In.call(e,i)&&Dn(t,i,e[i]);if(An)for(var i of An(e))Mn.call(e,i)&&Dn(t,i,e[i]);return t},zn=(t,e)=>En(t,Pn(e)),Nn=(t,e,i)=>(Dn(t,"symbol"!=typeof e?e+"":e,i),i),Fn=(t,e,i)=>new Promise(((s,r)=>{var o=t=>{try{a(i.next(t))}catch(t){r(t)}},n=t=>{try{a(i.throw(t))}catch(t){r(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(o,n);a((i=i.apply(t,e)).next())}))
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
12
12
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -22,23 +22,23 @@ x.version="2.29.4",w=Qe,x.fn=Hi,x.min=function(){return ei("isBefore",[].slice.c
|
|
|
22
22
|
* Copyright 2019 Google LLC
|
|
23
23
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
24
24
|
*/
|
|
25
|
-
const
|
|
25
|
+
const Un=globalThis,Bn=Un.ShadowRoot&&(void 0===Un.ShadyCSS||Un.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,jn=Symbol(),Yn=new WeakMap;let Rn=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==jn)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(Bn&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=Yn.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Yn.set(e,t))}return t}toString(){return this.cssText}};const Gn=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new Rn(i,t,jn)},Hn=(t,e)=>{if(Bn)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=Un.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}},Vn=Bn?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new Rn("string"==typeof t?t:t+"",void 0,jn))(e)})(t):t
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright 2017 Google LLC
|
|
29
29
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
|
-
*/,{is:$n,defineProperty:Wn,getOwnPropertyDescriptor:qn,getOwnPropertyNames:Kn,getOwnPropertySymbols:Jn,getPrototypeOf:Xn}=Object,Qn=globalThis,Zn=Qn.trustedTypes,ta=Zn?Zn.emptyScript:"",ea=Qn.reactiveElementPolyfillSupport,ia={toAttribute(t,e){switch(e){case Boolean:t=t?ta: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}},sa=(t,e)=>!$n(t,e),ra={attribute:!0,type:String,converter:ia,reflect:!1,useDefault:!1,hasChanged:sa};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=Qn.litPropertyMetadata||(Qn.litPropertyMetadata=new WeakMap);let oa=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ra){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Wn(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:r,set:o}=null!=(s=qn(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const s=null==r?void 0:r.call(this);null==o||o.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:ra}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=Xn(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=[...Kn(t),...Jn(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(
|
|
30
|
+
*/,{is:$n,defineProperty:Wn,getOwnPropertyDescriptor:qn,getOwnPropertyNames:Kn,getOwnPropertySymbols:Jn,getPrototypeOf:Xn}=Object,Qn=globalThis,Zn=Qn.trustedTypes,ta=Zn?Zn.emptyScript:"",ea=Qn.reactiveElementPolyfillSupport,ia={toAttribute(t,e){switch(e){case Boolean:t=t?ta: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}},sa=(t,e)=>!$n(t,e),ra={attribute:!0,type:String,converter:ia,reflect:!1,useDefault:!1,hasChanged:sa};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=Qn.litPropertyMetadata||(Qn.litPropertyMetadata=new WeakMap);let oa=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ra){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Wn(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:r,set:o}=null!=(s=qn(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const s=null==r?void 0:r.call(this);null==o||o.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:ra}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=Xn(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=[...Kn(t),...Jn(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(Vn(t))}else void 0!==t&&e.push(Vn(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return Hn(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(void 0!==r&&!0===s.reflect){const o=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:ia).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var i,s,r;const o=this.constructor,n=o._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=o.getPropertyOptions(n),a="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:ia;this._$Em=n;const l=a.fromAttribute(e,t.type);this[n]=null!=(r=null!=l?l:null==(s=this._$Ej)?void 0:s.get(n))?r:l,this._$Em=null}}requestUpdate(t,e,i,s=!1,r){var o,n;if(void 0!==t){const a=this.constructor;if(!1===s&&(r=this[t]),null!=i||(i=a.getPropertyOptions(t)),!((null!=(o=i.hasChanged)?o:sa)(r,e)||i.useDefault&&i.reflect&&r===(null==(n=this._$Ej)?void 0:n.get(t))&&!this.hasAttribute(a._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:r},o){var n,a,l;i&&!(null!=(n=this._$Ej)?n:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,null!=(a=null!=o?o:e)?a:this[t]),!0!==r||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(null!=(l=this._$Eq)?l:this._$Eq=new Set).add(t))}_$EP(){return Fn(this,null,(function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&(yield t),!this.isUpdatePending}))}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(i)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(t){}firstUpdated(t){}};var na;oa.elementStyles=[],oa.shadowRootOptions={mode:"open"},oa.elementProperties=new Map,oa.finalized=new Map,null==ea||ea({ReactiveElement:oa}),(null!=(na=Qn.reactiveElementVersions)?na:Qn.reactiveElementVersions=[]).push("2.1.2");
|
|
31
31
|
/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
35
|
*/
|
|
36
|
-
const aa=globalThis,la=aa.trustedTypes,ha=la?la.createPolicy("lit-html",{createHTML:t=>t}):void 0,da="$lit$",ca=`lit$${Math.random().toFixed(9).slice(2)}$`,ua="?"+ca,pa=`<${ua}>`,ma=document,va=()=>ma.createComment(""),fa=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ga=Array.isArray,ba="[ \t\n\f\r]",wa=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ya=/-->/g,xa=/>/g,_a=RegExp(`>|${ba}(?:([^\\s"'>=/]+)(${ba}*=${ba}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ka=/'/g,Ca=/"/g,Sa=/^(?:script|style|textarea|title)$/i,Ea=Symbol.for("lit-noChange"),Pa=Symbol.for("lit-nothing"),Aa=new WeakMap,Ia=ma.createTreeWalker(ma,129);function Ma(t,e){if(!ga(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ha?ha.createHTML(e):e}class Da{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,h]=((t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"<svg>":3===e?"<math>":"",n=wa;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,d=0;for(;d<i.length&&(n.lastIndex=d,l=n.exec(i),null!==l);)d=n.lastIndex,n===wa?"!--"===l[1]?n=ya:void 0!==l[1]?n=xa:void 0!==l[2]?(Sa.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=_a):void 0!==l[3]&&(n=_a):n===_a?">"===l[0]?(n=null!=r?r:wa,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?_a:'"'===l[3]?Ca:ka):n===Ca||n===ka?n=_a:n===ya||n===xa?n=wa:(n=_a,r=void 0);const c=n===_a&&t[e+1].startsWith("/>")?" ":"";o+=n===wa?i+pa:h>=0?(s.push(a),i.slice(0,h)+da+i.slice(h)+ca+c):i+ca+(-2===h?e:c)}return[Ma(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=Da.createElement(l,i),Ia.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=Ia.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(da)){const e=h[o++],i=s.getAttribute(t).split(ca),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:n[2],strings:i,ctor:"."===n[1]?Oa:"?"===n[1]?La:"@"===n[1]?
|
|
36
|
+
const aa=globalThis,la=aa.trustedTypes,ha=la?la.createPolicy("lit-html",{createHTML:t=>t}):void 0,da="$lit$",ca=`lit$${Math.random().toFixed(9).slice(2)}$`,ua="?"+ca,pa=`<${ua}>`,ma=document,va=()=>ma.createComment(""),fa=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ga=Array.isArray,ba="[ \t\n\f\r]",wa=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ya=/-->/g,xa=/>/g,_a=RegExp(`>|${ba}(?:([^\\s"'>=/]+)(${ba}*=${ba}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ka=/'/g,Ca=/"/g,Sa=/^(?:script|style|textarea|title)$/i,Ea=Symbol.for("lit-noChange"),Pa=Symbol.for("lit-nothing"),Aa=new WeakMap,Ia=ma.createTreeWalker(ma,129);function Ma(t,e){if(!ga(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ha?ha.createHTML(e):e}class Da{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,h]=((t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"<svg>":3===e?"<math>":"",n=wa;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,d=0;for(;d<i.length&&(n.lastIndex=d,l=n.exec(i),null!==l);)d=n.lastIndex,n===wa?"!--"===l[1]?n=ya:void 0!==l[1]?n=xa:void 0!==l[2]?(Sa.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=_a):void 0!==l[3]&&(n=_a):n===_a?">"===l[0]?(n=null!=r?r:wa,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?_a:'"'===l[3]?Ca:ka):n===Ca||n===ka?n=_a:n===ya||n===xa?n=wa:(n=_a,r=void 0);const c=n===_a&&t[e+1].startsWith("/>")?" ":"";o+=n===wa?i+pa:h>=0?(s.push(a),i.slice(0,h)+da+i.slice(h)+ca+c):i+ca+(-2===h?e:c)}return[Ma(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=Da.createElement(l,i),Ia.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=Ia.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(da)){const e=h[o++],i=s.getAttribute(t).split(ca),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:n[2],strings:i,ctor:"."===n[1]?Oa:"?"===n[1]?La:"@"===n[1]?Ua:Fa}),s.removeAttribute(t)}else t.startsWith(ca)&&(a.push({type:6,index:r}),s.removeAttribute(t));if(Sa.test(s.tagName)){const t=s.textContent.split(ca),e=t.length-1;if(e>0){s.textContent=la?la.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],va()),Ia.nextNode(),a.push({type:2,index:++r});s.append(t[e],va())}}}else if(8===s.nodeType)if(s.data===ua)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(ca,t+1));)a.push({type:7,index:r}),t+=ca.length-1}r++}}static createElement(t,e){const i=ma.createElement("template");return i.innerHTML=t,i}}function Ta(t,e,i=t,s){var r,o,n;if(e===Ea)return e;let a=void 0!==s?null==(r=i._$Co)?void 0:r[s]:i._$Cl;const l=fa(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==l&&(null==(o=null==a?void 0:a._$AO)||o.call(a,!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,i,s)),void 0!==s?(null!=(n=i._$Co)?n:i._$Co=[])[s]=a:i._$Cl=a),void 0!==a&&(e=Ta(t,a._$AS(t,e.values),a,s)),e}class za{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,r=(null!=(e=null==t?void 0:t.creationScope)?e:ma).importNode(i,!0);Ia.currentNode=r;let o=Ia.nextNode(),n=0,a=0,l=s[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new Na(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new Ba(o,this,t)),this._$AV.push(e),l=s[++a]}n!==(null==l?void 0:l.index)&&(o=Ia.nextNode(),n++)}return Ia.currentNode=ma,r}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 Na{get _$AU(){var t,e;return null!=(e=null==(t=this._$AM)?void 0:t._$AU)?e:this._$Cv}constructor(t,e,i,s){var r;this.type=2,this._$AH=Pa,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=null==(r=null==s?void 0:s.isConnected)||r}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){var i;t=Ta(this,t,e),fa(t)?t===Pa||null==t||""===t?(this._$AH!==Pa&&this._$AR(),this._$AH=Pa):t!==this._$AH&&t!==Ea&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):ga(i=t)||"function"==typeof(null==i?void 0:i[Symbol.iterator])?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Pa&&fa(this._$AH)?this._$AA.nextSibling.data=t:this.T(ma.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,r="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=Da.createElement(Ma(s.h,s.h[0]),this.options)),s);if((null==(e=this._$AH)?void 0:e._$AD)===r)this._$AH.p(i);else{const t=new za(r,this),e=t.u(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=Aa.get(t.strings);return void 0===e&&Aa.set(t.strings,e=new Da(t)),e}k(t){ga(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new Na(this.O(va()),this.O(va()),this,this.options)):i=e[s],i._$AI(r),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null==(i=this._$AP)||i.call(this,!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class Fa{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,r){this.type=1,this._$AH=Pa,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Pa}_$AI(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=Ta(this,t,e,0),o=!fa(t)||t!==this._$AH&&t!==Ea,o&&(this._$AH=t);else{const s=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=Ta(this,s[i+n],e,n),a===Ea&&(a=this._$AH[n]),o||(o=!fa(a)||a!==this._$AH[n]),a===Pa?t=Pa:t!==Pa&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}o&&!s&&this.j(t)}j(t){t===Pa?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Oa extends Fa{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Pa?void 0:t}}class La extends Fa{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Pa)}}class Ua extends Fa{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){var i;if((t=null!=(i=Ta(this,t,e,0))?i:Pa)===Ea)return;const s=this._$AH,r=t===Pa&&s!==Pa||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==Pa&&(s===Pa||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!=(i=null==(e=this.options)?void 0:e.host)?i:this.element,t):this._$AH.handleEvent(t)}}class Ba{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){Ta(this,t)}}const ja=aa.litHtmlPolyfillSupport;var Ya;null==ja||ja(Da,Na),(null!=(Ya=aa.litHtmlVersions)?Ya:aa.litHtmlVersions=[]).push("3.3.3");const Ra=(t,e,i)=>{var s,r;const o=null!=(s=null==i?void 0:i.renderBefore)?s:e;let n=o._$litPart$;if(void 0===n){const t=null!=(r=null==i?void 0:i.renderBefore)?r:null;o._$litPart$=n=new Na(e.insertBefore(va(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/},
|
|
41
|
+
*/},Ga=globalThis;class Ha extends oa{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return null!=(t=this.renderOptions).renderBefore||(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ra(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return Ea}}var Va;Ha._$litElement$=!0,Ha.finalized=!0,null==(Va=Ga.litElementHydrateSupport)||Va.call(Ga,{LitElement:Ha});const $a=Ga.litElementPolyfillSupport;var Wa;null==$a||$a({LitElement:Ha}),(null!=(Wa=Ga.litElementVersions)?Wa:Ga.litElementVersions=[]).push("4.2.2");
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -49,12 +49,12 @@ const qa=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
49
49
|
* @license
|
|
50
50
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
51
51
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
52
|
-
*/,Ka=[],Ja=new Set,Xa=new Set;function Qa(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Za(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function tl(t){return t.map((t=>t.cssText)).join("\n")}const el="vaadin-themable-mixin-style";function il(t){t.prototype instanceof Ha?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(el).textContent=tl(t.getStylesForThis()),Xa.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&il(i)}))}function sl(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof Rn||(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):Ka.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&Xa.forEach((i=>{if(Za(t,i)&&function(t){return Qa(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}`),il(t),function(t){Ja.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof Ha?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),Hn(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(el).textContent=e.prototype._template.content.getElementById(el).textContent}(i):i||Ja.delete(e)}))}(t)}}))}function rl(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():Ka}function ol(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function nl(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=rl().find((e=>e.moduleId===t));i?e.push(...nl(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function al(t){const e=`${t}-default-theme`,i=rl().filter((i=>i.moduleId!==e&&Za(i.themeFor,t))).map((t=>Tn(
|
|
52
|
+
*/,Ka=[],Ja=new Set,Xa=new Set;function Qa(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Za(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function tl(t){return t.map((t=>t.cssText)).join("\n")}const el="vaadin-themable-mixin-style";function il(t){t.prototype instanceof Ha?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(el).textContent=tl(t.getStylesForThis()),Xa.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&il(i)}))}function sl(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof Rn||(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):Ka.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&Xa.forEach((i=>{if(Za(t,i)&&function(t){return Qa(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}`),il(t),function(t){Ja.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof Ha?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),Hn(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(el).textContent=e.prototype._template.content.getElementById(el).textContent}(i):i||Ja.delete(e)}))}(t)}}))}function rl(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():Ka}function ol(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function nl(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=rl().find((e=>e.moduleId===t));i?e.push(...nl(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function al(t){const e=`${t}-default-theme`,i=rl().filter((i=>i.moduleId!==e&&Za(i.themeFor,t))).map((t=>zn(Tn({},t),{styles:[...nl(t),...t.styles],includePriority:ol(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:rl().filter((t=>t.moduleId===e))}const ll=t=>class extends(qa(t)){constructor(){super(),Ja.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&Xa.add(this.is),this.elementStyles)return;const t=this.prototype._template;!t||Qa(this)||function(t,e){const i=document.createElement("style");i.id=el,i.textContent=tl(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:[])||[],...al(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
|
|
53
53
|
/**
|
|
54
54
|
* @license
|
|
55
55
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
56
56
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
57
|
-
*/,hl=(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)};hl("color-props",
|
|
57
|
+
*/,hl=(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)};hl("color-props",Gn`
|
|
58
58
|
:host {
|
|
59
59
|
/* Base (background) */
|
|
60
60
|
--lumo-base-color: #fff;
|
|
@@ -139,7 +139,7 @@ const qa=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
139
139
|
--lumo-disabled-text-color: GrayText;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
`),sl("",
|
|
142
|
+
`),sl("",Gn`
|
|
143
143
|
[theme~='dark'] {
|
|
144
144
|
/* Base (background) */
|
|
145
145
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -257,7 +257,7 @@ const qa=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
257
257
|
pre code {
|
|
258
258
|
background: transparent;
|
|
259
259
|
}
|
|
260
|
-
`,{moduleId:"lumo-color"}),hl("font-icons",
|
|
260
|
+
`,{moduleId:"lumo-color"}),hl("font-icons",Gn`
|
|
261
261
|
@font-face {
|
|
262
262
|
font-family: 'lumo-icons';
|
|
263
263
|
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABEgAAsAAAAAIjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuKY21hcAAAAYgAAAD4AAADrsCU8d5nbHlmAAACgAAAC2cAABeAWri7U2hlYWQAAA3oAAAAMAAAADZa/6SsaGhlYQAADhgAAAAdAAAAJAbpA35obXR4AAAOOAAAABAAAACspBAAAGxvY2EAAA5IAAAAWAAAAFh57oA4bWF4cAAADqAAAAAfAAAAIAFKAXBuYW1lAAAOwAAAATEAAAIuUUJZCHBvc3QAAA/0AAABKwAAAelm8SzVeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+yDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mIO+p/FEMUcxDANKMwIkgMABn8MLQB4nO3SWW6DMABF0UtwCEnIPM/zhLK8LqhfXRybSP14XUYtHV9hGYQwQBNIo3cUIPkhQeM7rib1ekqnXg981XuC1qvy84lzojleh3puxL0hPjGjRU473teloEefAUNGjJkwZcacBUtWrNmwZceeA0dOnLlw5cadB09elPGhGf+j0NTI/65KfXerT6JhqKnpRKtgOpuqaTrtKjPUlqHmhto21I7pL6i6hlqY3q7qGWrfUAeGOjTUkaGODXViqFNDnRnq3FAXhro01JWhrg11Y6hbQ90Z6t5QD4Z6NNSToZ4N9WKoV0O9GerdUB+G+jTUl6GWRvkL24BkEXictVh9bFvVFb/nxvbz+7Rf/N6zHcd2bCfP+Wic1Z9N0jpNHCD9SNqqoVBgbQoMjY+pjA4hNnWa2pV1rHSIif0DGkyT2k10Kmu1Cag6huj4ZpqYBHSqJsTEJgZCG3TaVBFv595nO3ZIv4RIrPPuvefe884599zzO/cRF8G/tgn6CFFImNgkR0ggX8wlspbhSSWSdrC5ozd30s2dw5afzvgtyz9/zG9t1hV4RtF1pXolowvtzc2z6L2aYUQM45jKH9WDTvd1LRDoDASYWhfTzTyvboXz6uZX4ARX5wrF39y+HM2+CJ8d0pkyqBIqoze3D12ez4DrFoYzxI8dWwMrDlZ2DMqQAR9AROsJU+2smlTPaTTco52BVxXa2a2+I8vvqd2dVHm1LoPeTn/AZPRYGthDYOeZjBjKoFsVGulR3lGU95SeCK44oHU7MhWUGUKZDT3oSUcG2GWuh+EDDfUYA/jhIhl0TOsJNYSEu7mQmi3UzfXwZKA4BsVsHLXQYGgJW95qEtpJ1VcW9HiTriZBlFEqxsDjA09yCNUoQxxwd7KWSTt2y3GTKifkqHRCoWZc3m11Wa/dKdFgXD4kSYfkeJBKd8KMz7J8dZn/cGRCcLGDnA2Ge3bKzcvlnTDNthFWLH7Xt80ua5FMjA4WKelWv5Xo16vHuYzpRbJhhdVlftuRK0VlR27D9lu5TF0DPBi60OrHNO0AfP/uRWvhn/U3LXICE+nh+3IHPUJ8JE6GyBjZQLbjGchlrSgYngF8zyrIF4NJD3atUcgWsWunGN/UHX5B5/yg7uF87Nqp4Gf52F3gH73DjEZNRoqCKAr9giQJp5rGJABpiVE2htNhW9R8nw0jqYjCYcY4LIjwYNScf4WN06IZnZCEqsI4cFaQbo4Z1TsZBx40YhXkHOecaYE5oY37IIQ+iJJ+UsDYSun5MuRSBRZRUUhlY2DqOGajOR6zrSU/5My6l2DnusH1GQgnw5BZP7iuYM/ahcfQ7Z8y51ddfutvuwNqWQ0cBYr8fj0U0vsHpwerVaB2sWhXT2NExi2r1KUE2tUuVMnkepVQrxTmpQrZTG4iu8he8iPyM3KcPE/+RP5KPoE2CEAKclCBzXATxkYOtUY/o961PWRqsj0chRrHFBbtrjP9/P0ven5pcbRdpL94vfsy33e5+izuwz3nFLFPVNayPZx/jdG1fOChflFRvYzsW6L18efgLrSWIgvcqnGJYi4skO4xREURjbDuxKke5v0T3Mrzkt2fi31uyZlLLrqIpEuXXsMlgw442Jb0GAxjS1DM20kBoCzHLXm/jEm0IltdcvU0fEW24jgiwwRjVd9u4NJHcIyoHJcwvyVqgqj5hqBJ1ZWSJryh9p56UWhX1XbhRbW2ZopuZWsQd5y8mEQ8M+C6xjRYxZbDKWf5AgY+Qq/l6wSPk16zDFjowYuu+wjx13mfkxbyDDxadYT/LijZyI0THB+6yfLaWsRcO82zo9mWTNtpO18qlorZoIVMwSN40tky5DOQ1MCIAe24mvlsuwIIxPb10+uXDQ4uWz/9m3rj+ql7p6bufZARuPVq5tXtsn6KwfP8Jy0TeWOyNhUJN6mhX5rkUTtUppQWEMNTqEdaCGKFYKJaQrCE4JtDLYOlNEKmO5kBTPGY2A0N2sY3+dVlo1N9ycBsIGtOjQ2p/tlZvzo0ur4v6cOh8NTospB7U/X40KahoU3bGIH97dnwmtHlYffVG3R1YOwKM2vNhrPhCT5zk64sG53oS4b31aYjqe/B7+kQiXBN+b6h21hNUPMq29B8CU4elINdygMPKF1B+WBTG7Z9ZshpN/xwEuuDQZR+nuoo4CDaAiiwXmLpmukMQyPf/JMclqgL1ixZQ/nnP2VbdUODFGt2fgBvL123rlLYu/6A9ckb7F3K0/CyBMEu6aQoPscroCcacVehvyQyCZAsizsWWBkoLC+WAiWnOksLKaeuQDzGuqSk42aiYTiJ4zf9afl17SrqaTO1f+XlZAfIuYcq7/IqYMaMrksOJ6vHkOCPDq943xcCnHqVD9pHFRpMqSPXrIua1WNs+tOz1U+ciTCDpPk+c4QYJIHnYhxP/kVPAq+ahFpVhPcHp8qyarhiF+HsBU9Hrl+UZa876fbKipL0KqB6OdUveErgtOI97fZ63ae9SvWU6k2w1JfwqnUbHsYcFCJFrC/W12zIMMirWYEHxMPs6LGYSdkSZ5TsNP9PCpwnWC3HKZ1lydNjWHC2Mn3l6vL0dHn1ldP3LTSrX+vKrBqv7KmMr8p0SR6P1NqF63or6XRlIyO90f7+kf7+myOhvt4tq7f09oUiTc2/dycGgqFQcCDRLYmi1NL7fk0CknVMxEg/cdfs/TnpJMNkgqwj17B8beVazSrVbU4lG67IZYOCnWrYy3yBR9cyWcChywos3LJBEdhhFoAdYjiw0rLGm0xU5OzoGm5/ZfmHjVZpNNg6SznzGKDdwv2cCtVn6Eaxo12cfxLprpVtTcZ6hVx6dow7Yq7e8LXO8PY9Jgjoze9yCtU5FNbegcKkQMdCbt9au/te4Ebe0jkc0ukUL32eYnTpNs20h0KpUOhZPYwVcfhZnfdqeCvDfXiuCbAoYWcXERPc/mDQD3/hdF+wK4i/xv3kYfprIpAuMkk2kW3kdtS0kBIKpZwp8KxmsCyfM1MFzAss9LBkDxRyThiaqTLwKYKJVTwmWTudMyz+yks09346MDh4m72yOxCKrt1XMlQ1qPVlTEVVQ1ofdK/sCWjtZu9qGwZ8YZ9PPWlo1IV3eW3+U0aXblP39zrt+JPf6UhEQ1rUjNBULN+utyuaDNW34kpAVuSOeMTyWbSNWnooFu+QFNWQ4d/Ox4IPWx41fP/fB/Rjeoz08ezPA9TysMtmnOXfGN7Ui3xIYLDALrlDLOP09qtJuY2OeL0+QZXdRnR1nxRVBF/SOyKKPpcrn9mWzH4rH9IidE+PTNU2182+hOgSItrE1slByS24vaLvJpxOqe4Pduf3HJkZ+jLqUz9rRzB7p8gKcgWZwV1L8JtUS5Z2JxZSOCuBoMTQihMzLbCPA0KqGMAljRQjONklW/wjnXKy8vxT/Elvm3/KiMUMOoV0/vnDYlhec0SMKtt3/kKMyOt33tj2bqxQLsTjSGLl+EAsNhCnTyRGktW55EgCn/A4PlnWn+Mg8bgZrWqHxTbPwMuyy1u5YeZF2SUM7JRhddwRgiRuxpmgJmxn9ZW7XpcF3ViX/ar6ptRpGJ0S9Adg4qhb9sI3vbL7qNJV/y4i07t5TZBiho1imFoMz3gED+CtjYUxvP4SOxov4bFoNPg5aR1e+G4UgDPoedJTpogyCJ7oYvRqoVS0MQAy+CoNEdTDUjok5ZHZL/WtjV7rFj3PKQE3iKp7ou+rIxN3b9LB1dGjeT4cvKo3FrnWpYpuaFd/h3dtV8UeKN1Y9hpR3dt4p0H/zKuPQq0kZQUIIpuDfoiETsnIk+gCWMJZUXHtE8V9LkUc2TE8vOMbO4ax/MACabzyaGXc7u3FBr11ThBdB8SIeMAlCntG2KThHSPsaj2Dc9KNyY2a0KZ7ODaTHoRiFkeYz+shZBpCS4X6471KKKnuHd84edfk5F37d1XO5bbkcltu2ZLNbvnPXiUVAnVvprJrP+NObryjxrllS65md6Tm6wzFHRR4dY3QUUjb7MgxaIixU8hspi98fl/Xc+IB4iU66eCVL9YfAfahiSUt4TONS8x0D8W7u8vd3fGWx6OXlM/U1IoU/s61PGhpyXRFa3eReq2qG56lvmYtXavCC1iN7lbiBpWxXHU+cSlztVLVz0tVN600fVsLxaVDknhYioeoXP3t4lqV1r79MAw0GCI1FTL1YIGzPL1MMlJ9ZsN9P7lvA2yr9ZFUzwzPrVgxN/x/SS+chwB4nGNgZGBgAOLPrYdY4vltvjJwM78AijDUqG5oRND/XzNPZboF5HIwMIFEAU/lC+J4nGNgZGBgDvqfBSRfMAAB81QGRgZUoA0AVvYDbwAAAHicY2BgYGB+MTQwAM8EJo8AAAAAAE4AmgDoAQoBLAFOAXABmgHEAe4CGgKcAugEmgS8BNYE8gUOBSoFegXQBf4GRAZmBrYHGAeQCBgIUghqCP4JRgm+CdoKBAo+CoQKugr0C1QLmgvAeJxjYGRgYNBmTGEQZQABJiDmAkIGhv9gPgMAGJQBvAB4nG2RPU7DMBiG3/QP0UoIBGJh8QILavozdmRo9w7d09RpUzlx5LgVvQMn4BAcgoEzcAgOwVvzSZVQbcnf48fvFysJgGt8IcJxROiG9TgauODuj5ukG+EW+UG4jR4ehTv0Q+EunjER7uEWmk+IWpc0d3gVbuAKb8JN+nfhFvlDuI17fAp36L+Fu1jgR7iHp+jF7Arbz1Nb1nO93pnEncSJFtrVuS3VKB6e5EyX2iVer9TyoOr9eux9pjJnCzW1pdfGWFU5u9WpjzfeV5PBIBMfp7aAwQ4FLPrIkbKWqDHn+67pDRK4s4lzbsEux5qHvcIIMb/nueSMyTKkE3jWFdNLHLjW2PPmMa1Hxn3GjGW/wjT0HtOG09JU4WxLk9LH2ISuiv9twJn9y8fh9uIXI+BknAAAAHicbY7ZboMwEEW5CVBCSLrv+76kfJRjTwHFsdGAG+Xvy5JUfehIHp0rnxmNN/D6ir3/a4YBhvARIMQOIowQY4wEE0yxiz3s4wCHOMIxTnCKM5zjApe4wjVucIs73OMBj3jCM17wije84wMzfHqJ0EVmUkmmJo77oOmrHvfIRZbXsTCZplTZldlgb3TYGVHProwFs11t1A57tcON2rErR3PBqcwF1/6ctI6k0GSU4JHMSS6WghdJQ99sTbfuN7QLJ9vQ37dNrgyktnIxlDYLJNuqitpRbYWKFNuyDT6pog6oOYKHtKakeakqKjHXpPwlGRcsC+OqxLIiJpXqoqqDMreG2l5bv9Ri3TRX+c23DZna9WFFgmXuO6Ps1Jm/w6ErW8N3FbHn/QC444j0AA==)
|
|
@@ -310,7 +310,7 @@ const qa=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
310
310
|
--lumo-icons-upload: '\\ea29';
|
|
311
311
|
--lumo-icons-user: '\\ea2a';
|
|
312
312
|
}
|
|
313
|
-
`),hl("sizing-props",
|
|
313
|
+
`),hl("sizing-props",Gn`
|
|
314
314
|
:host {
|
|
315
315
|
--lumo-size-xs: 1.625rem;
|
|
316
316
|
--lumo-size-s: 1.875rem;
|
|
@@ -325,7 +325,7 @@ const qa=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
325
325
|
/* For backwards compatibility */
|
|
326
326
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
327
327
|
}
|
|
328
|
-
`),hl("spacing-props",
|
|
328
|
+
`),hl("spacing-props",Gn`
|
|
329
329
|
:host {
|
|
330
330
|
/* Square */
|
|
331
331
|
--lumo-space-xs: 0.25rem;
|
|
@@ -348,7 +348,7 @@ const qa=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
348
348
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
349
349
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
350
350
|
}
|
|
351
|
-
`),
|
|
351
|
+
`),Gn`
|
|
352
352
|
html {
|
|
353
353
|
/* Button */
|
|
354
354
|
--vaadin-button-background: var(--lumo-contrast-5pct);
|
|
@@ -431,7 +431,7 @@ const qa=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
431
431
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
432
432
|
--vaadin-input-field-value-font-weight: 500;
|
|
433
433
|
}
|
|
434
|
-
`,hl("style-props",
|
|
434
|
+
`,hl("style-props",Gn`
|
|
435
435
|
:host {
|
|
436
436
|
/* Border radius */
|
|
437
437
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -454,7 +454,7 @@ const qa=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
454
454
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
455
455
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
456
456
|
*/
|
|
457
|
-
const dl=
|
|
457
|
+
const dl=Gn`
|
|
458
458
|
:host {
|
|
459
459
|
/* prettier-ignore */
|
|
460
460
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -474,7 +474,7 @@ const dl=Vn`
|
|
|
474
474
|
--lumo-line-height-s: 1.375;
|
|
475
475
|
--lumo-line-height-m: 1.625;
|
|
476
476
|
}
|
|
477
|
-
`;sl("",
|
|
477
|
+
`;sl("",Gn`
|
|
478
478
|
body,
|
|
479
479
|
:host {
|
|
480
480
|
font-family: var(--lumo-font-family);
|
|
@@ -566,7 +566,7 @@ const dl=Vn`
|
|
|
566
566
|
border-left: none;
|
|
567
567
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
568
568
|
}
|
|
569
|
-
`,{moduleId:"lumo-typography"}),hl("typography-props",dl),sl("vaadin-checkbox",
|
|
569
|
+
`,{moduleId:"lumo-typography"}),hl("typography-props",dl),sl("vaadin-checkbox",Gn`
|
|
570
570
|
:host {
|
|
571
571
|
color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
|
|
572
572
|
font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
|
|
@@ -899,7 +899,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
899
899
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
900
900
|
Code distributed by Google as part of the polymer project is also
|
|
901
901
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
902
|
-
*/const bl=!window.ShadyDOM||!window.ShadyDOM.inUse,wl=bl&&"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 yl=window.Polymer&&window.Polymer.rootPath||gl(document.baseURI||window.location.href),xl=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,_l=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,kl=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Cl=window.Polymer&&window.Polymer.legacyOptimizations||!1,Sl=window.Polymer&&window.Polymer.legacyWarnings||!1,El=window.Polymer&&window.Polymer.syncInitialRender||!1,Pl=window.Polymer&&window.Polymer.legacyUndefined||!1,Al=window.Polymer&&window.Polymer.orderedComputed||!1,Il=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Ml=window.Polymer&&window.Polymer.fastDomIf||!1,Dl=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,
|
|
902
|
+
*/const bl=!window.ShadyDOM||!window.ShadyDOM.inUse,wl=bl&&"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 yl=window.Polymer&&window.Polymer.rootPath||gl(document.baseURI||window.location.href),xl=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,_l=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,kl=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Cl=window.Polymer&&window.Polymer.legacyOptimizations||!1,Sl=window.Polymer&&window.Polymer.legacyWarnings||!1,El=window.Polymer&&window.Polymer.syncInitialRender||!1,Pl=window.Polymer&&window.Polymer.legacyUndefined||!1,Al=window.Polymer&&window.Polymer.orderedComputed||!1,Il=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Ml=window.Polymer&&window.Polymer.fastDomIf||!1,Dl=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Tl=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,zl=0;const Nl=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=zl++;return function(s){let r=s.__mixinSet;if(r&&r[i])return s;let o=e,n=o.get(s);if(!n){n=t(s),o.set(s,n);let e=Object.create(n.__mixinSet||r||null);e[i]=!0,n.__mixinSet=e}return n}};
|
|
903
903
|
/**
|
|
904
904
|
@license
|
|
905
905
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -908,7 +908,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
908
908
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
909
909
|
Code distributed by Google as part of the polymer project is also
|
|
910
910
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
911
|
-
*/let Fl={},Ol={};function Ll(t,e){Fl[t]=Ol[t.toLowerCase()]=e}function
|
|
911
|
+
*/let Fl={},Ol={};function Ll(t,e){Fl[t]=Ol[t.toLowerCase()]=e}function Ul(t){return Fl[t]||Ol[t.toLowerCase()]}class Bl extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=Ul(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=vl(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=gl(e)}return this.__assetpath}register(t){if(t=t||this.id){if(_l&&void 0!==Ul(t))throw Ll(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,Ll(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}Bl.prototype.modules=Fl,customElements.define("dom-module",Bl);
|
|
912
912
|
/**
|
|
913
913
|
@license
|
|
914
914
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -918,7 +918,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
918
918
|
Code distributed by Google as part of the polymer project is also
|
|
919
919
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
920
920
|
*/
|
|
921
|
-
const jl="link[rel=import][type~=css]",Yl="include",Rl="shady-unscoped";function
|
|
921
|
+
const jl="link[rel=import][type~=css]",Yl="include",Rl="shady-unscoped";function Gl(t){return Bl.import(t)}function Hl(t){const e=fl((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function Vl(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...$l(e[t]));return i}function $l(t){const e=Gl(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...ql(e));const i=e.querySelector("template");i&&t.push(...Wl(i,e.assetpath)),e._styles=t}return e._styles}function Wl(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let r=s[t],o=r.getAttribute(Yl);o&&i.push(...Vl(o).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(r.textContent=fl(r.textContent,e)),i.push(r)}t._styles=i}return t._styles}function ql(t){const e=[],i=t.querySelectorAll(jl);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(Rl);if(i&&!t._unscopedStyle){const e=Hl(t);e.setAttribute(Rl,""),t._unscopedStyle=e}else t._style||(t._style=Hl(t));e.push(i?t._unscopedStyle:t._style)}}return e}
|
|
922
922
|
/**
|
|
923
923
|
@license
|
|
924
924
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -963,7 +963,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
963
963
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
964
964
|
Code distributed by Google as part of the polymer project is also
|
|
965
965
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
966
|
-
*/let xh=HTMLElement.prototype;for(;xh;){let t=Object.getOwnPropertyNames(xh);for(let e=0;e<t.length;e++)yh[t[e]]=!0;xh=Object.getPrototypeOf(xh)}const _h=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,kh=Nl((t=>{const e=wh(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(lh(t[e]))}static attributeNameForProperty(t){return hh(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(_h(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(!yh[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}})(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return!(!this.__dataPending||!(t in this.__dataPending))}}})),Ch={"dom-if":!0,"dom-repeat":!0};let Sh=!1,Eh=!1;const Ph=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const r=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(r,s)):e.setAttribute(s,r)}})();function Ah(t){let e=t.getAttribute("is");if(e&&Ch[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];Ph(t,i,e),i.removeAttribute(e)}}return t}function Ih(t,e){let i=e.parentInfo&&Ih(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function Mh(t,e,i,s){s.id&&(e[s.id]=i)}function Dh(t,e,i){if(i.events&&i.events.length)for(let s,r=0,o=i.events;r<o.length&&(s=o[r]);r++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function
|
|
966
|
+
*/let xh=HTMLElement.prototype;for(;xh;){let t=Object.getOwnPropertyNames(xh);for(let e=0;e<t.length;e++)yh[t[e]]=!0;xh=Object.getPrototypeOf(xh)}const _h=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,kh=Nl((t=>{const e=wh(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(lh(t[e]))}static attributeNameForProperty(t){return hh(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(_h(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(!yh[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}})(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return!(!this.__dataPending||!(t in this.__dataPending))}}})),Ch={"dom-if":!0,"dom-repeat":!0};let Sh=!1,Eh=!1;const Ph=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const r=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(r,s)):e.setAttribute(s,r)}})();function Ah(t){let e=t.getAttribute("is");if(e&&Ch[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];Ph(t,i,e),i.removeAttribute(e)}}return t}function Ih(t,e){let i=e.parentInfo&&Ih(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function Mh(t,e,i,s){s.id&&(e[s.id]=i)}function Dh(t,e,i){if(i.events&&i.events.length)for(let s,r=0,o=i.events;r<o.length&&(s=o[r]);r++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function Th(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const zh=Nl((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=!!e,i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,r=t;return"template"!=r.localName||r.hasAttribute("preserve-content")?"slot"===r.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(r,e,i)||s,function(t){(function(){if(!Sh){Sh=!0;const t=document.createElement("textarea");t.placeholder="a",Eh=t.placeholder===t.textContent}return Eh})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(r),r.firstChild&&this._parseTemplateChildNodes(r,e,i),r.hasAttributes&&r.hasAttributes()&&(s=this._parseTemplateNodeAttributes(r,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,r=t.firstChild,o=0;r;r=s){if("template"==r.localName&&(r=Ah(r)),s=r.nextSibling,r.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)r.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!r.textContent.trim()){t.removeChild(r);continue}}let n={parentIndex:o,parentInfo:i};this._parseTemplateNode(r,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),r.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,r=this._parseTemplate(s,e);return(r.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=r,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,r=Array.from(t.attributes);for(let o,n=r.length-1;o=r[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,o.name,o.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,r){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:r}),!0):"id"===s&&(i.id=r,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let r=s.nodeList=new Array(i.length);s.$={};for(let t,o=0,n=i.length;o<n&&(t=i[o]);o++){let i=r[o]=Ih(s,t);Mh(0,s.$,i,t),Th(0,i,t,e),Dh(this,i,t)}return s}_addMethodEventListenerToNode(t,e,i,s){let r=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,r),r}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
|
|
967
967
|
/**
|
|
968
968
|
* @fileoverview
|
|
969
969
|
* @suppress {checkPrototypalTypes}
|
|
@@ -974,7 +974,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
974
974
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
975
975
|
* Google as part of the polymer project is also subject to an additional IP
|
|
976
976
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
977
|
-
*/let Nh=0;const Fh=[],Oh={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Lh="__computeInfo",Bh=/[A-Z]/;function Uh(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function jh(t,e,i,s,r,o){if(e){let n=!1;const a=Nh++;for(let l in i){let h=e[r?Xl(l):l];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==a)&&(!r||Rh(l,e.trigger))&&(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,r,o),n=!0)}return n}return!1}function Yh(t,e,i,s,r,o,n,a){let l=!1,h=e[n?Xl(s):s];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==i)&&(!n||Rh(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,r,o,e.info,n,a),l=!0);return l}function Rh(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Ql(i,t))||!(!e.wildcard||!Zl(i,t))}return!0}function Vh(t,e,i,s,r){let o="string"==typeof r.method?t[r.method]:r.method,n=r.property;o?o.call(t,t.__data[n],s[n]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function Hh(t,e,i){let s=Xl(e);return s!==e&&(Gh(t,hh(s)+"-changed",i[e],e),!0)}function Gh(t,e,i,s){let r={value:i,queueProperty:!0};s&&(r.path=s),Kl(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function $h(t,e,i,s,r,o){let n=(o?Xl(e):e)!=e?e:null,a=n?sh(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),Gh(t,r.eventName,a,n)}function Wh(t,e,i,s,r){let o=t.__data[e];xl&&(o=xl(o,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,o)}const qh=(t,e,i)=>{let s=0,r=e.length-1,o=-1;for(;s<=r;){const n=s+r>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){o=n;break}r=n-1}}o<0&&(o=r+1),e.splice(o,0,t)},Kh=(t,e,i,s,r)=>{const o=e[r?Xl(t):t];if(o)for(let e=0;e<o.length;e++){const n=o[e];n.info.lastRun!==Nh&&(!r||Rh(t,n.trigger))&&(n.info.lastRun=Nh,qh(n.info,i,s))}};function Jh(t,e,i,s,r){let o=sd(t,e,i,0,r);if(o===Fh)return!1;let n=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,o,!0):(t[n]=o,!1)}function Xh(t,e,i,s,r,o,n){i.bindings=i.bindings||[];let a={kind:s,target:r,parts:o,literal:n,isCompound:1!==o.length};if(i.bindings.push(a),function(t){return!!t.target&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||hh(r)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,Qh(t,e,a,s,l)}}function Qh(t,e,i,s,r){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let o=s.dependencies,n={index:r,binding:i,part:s,evaluator:t};for(let i=0;i<o.length;i++){let s=o[i];"string"==typeof s&&(s=dd(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Zh,info:n,trigger:s})}}}function Zh(t,e,i,s,r,o,n){let a=n[r.index],l=r.binding,h=r.part;if(o&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=th(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=r.evaluator._evaluateBinding(t,h,e,i,s,o);n!==Fh&&function(t,e,i,s,r){if(r=function(t,e,i,s){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[s.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,r,i,s),xl&&(r=xl(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[Oh.READ_ONLY]||!e[Oh.READ_ONLY][s])&&e._setPendingProperty(s,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,r)}}(t,a,l,h,n)}}function td(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,r=new Array(s.length);for(let t=0;t<s.length;t++)r[t]=s[t].literal;let o=e.target;i[o]=r,e.literal&&"property"==e.kind&&("className"===o&&(t=Kl(t)),t[o]=e.literal)}}function ed(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,r){let o,n=t.detail,a=n&&n.path;a?(s=th(i,s,a),o=n&&n.value):o=t.currentTarget[i],o=r?!o:o,(!e[Oh.READ_ONLY]||!e[Oh.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,o,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function id(t,e,i,s,r,o){let n={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:o=e.static||o&&("object"!=typeof o||o[e.methodName])};for(let r,o=0;o<e.args.length&&(r=e.args[o]);o++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:s,info:n,trigger:r});return o&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function sd(t,e,i,s,r){let o=t._methodHost||t,n=o[r.methodName];if(n){let s=t._marshalArgs(r.args,e,i);return s===Fh?Fh:n.apply(o,s)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const rd=[],od="(?:[a-zA-Z_$][\\w.:$\\-*]*)",nd="(?:("+od+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",ad=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+od+"\\s*(?:\\(\\s*(?:(?:"+nd+"(?:,\\s*"+nd+")*)?)\\)\\s*)?)(?:]]|}})","g");function ld(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function hd(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:rd};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=dd(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function dd(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=Xl(e),i.structured=Jl(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function cd(t,e,i){let s=sh(t,i);return void 0===s&&(s=e[i]),s}function ud(t,e,i,s){const r={indexSplices:s};Pl&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),Pl&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function pd(t,e,i,s,r,o){ud(t,e,i,[{index:s,addedCount:r,removed:o,object:e,type:"splice"}])}const md=Nl((t=>{const e=Th(kh(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Oh}_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(vd.length){let t=vd[vd.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[Oh.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==Oh.READ_ONLY);let s=Uh(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=Uh(this,e,!0)[t],r=s.indexOf(i);r>=0&&s.splice(r,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Oh.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Oh.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Oh.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Oh.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||Xl(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=sh(this,t);if(!(t=rh(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let r;for(let o in s){let n=s[o];Zl(o,e)?(r=th(o,n,e),t._setPendingPropertyOrPath(r,i,!0,!0)):Zl(n,e)&&(r=th(n,o,e),t._setPendingPropertyOrPath(r,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){(i!==t[e]||"object"==typeof i)&&("className"===e&&(t=Kl(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&Jl(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[Oh.NOTIFY]&&this[Oh.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[Oh.READ_ONLY]||!this[Oh.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let r=t[Oh.COMPUTE];if(r)if(Al){Nh++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Oh.COMPUTE];let s,{counts:r,ready:o,total:n}=function(t){const e=t[Lh],i={},s=t[Oh.COMPUTE],r=[];let o=0;for(let t in e){const s=e[t];o+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||r.push(t);return{counts:i,ready:r,total:o}}(t);for(;s=o.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--r[e]&&o.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)Kh(t,r,n,o,s);let a;for(;a=n.shift();)Jh(t,"",e,0,a)&&Kh(a.methodInfo,r,n,o,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;jh(t,r,o,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}(this,e,i,r),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),jh(this,this[Oh.REFLECT],e,i,r),jh(this,this[Oh.OBSERVE],e,i,r),s&&function(t,e,i,s,r){let o,n,a=t[Oh.NOTIFY],l=Nh++;for(let n in e)e[n]&&(a&&Yh(t,a,l,n,i,s,r)||r&&Hh(t,n,i))&&(o=!0);o&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Oh.PROPAGATE]&&jh(this,this[Oh.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const r=(e,s)=>{jh(this,t.propertyEffects,e,i,s,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,s)};t.runEffects?t.runEffects(r,e,s):r(e,s)}linkPaths(t,e){t=eh(t),e=eh(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=eh(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};ud(this,sh(this,t,i),i.path,e)}get(t,e){return sh(e||this,t)}set(t,e,i){i?rh(i,t,e):(!this[Oh.READ_ONLY]||!this[Oh.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=sh(this,t,i),r=s.length,o=s.push(...e);return e.length&&pd(this,s,i.path,r,e.length,[]),o}pop(t){let e={path:""},i=sh(this,t,e),s=!!i.length,r=i.pop();return s&&pd(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...s){let r,o={path:""},n=sh(this,t,o);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||r.length)&&pd(this,n,o.path,e,s.length,r),r}shift(t){let e={path:""},i=sh(this,t,e),s=!!i.length,r=i.shift();return s&&pd(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},s=sh(this,t,i),r=s.unshift(...e);return e.length&&pd(this,s,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=sh(this,t,s),i=s.path}else i=Array.isArray(t)?eh(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,Oh.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,Oh.OBSERVE,{fn:Vh,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Oh.OBSERVE,{fn:Vh,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=hd(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");id(this,i,Oh.OBSERVE,sd,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Oh.NOTIFY,{fn:$h,info:{eventName:hh(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,Oh.REFLECT,{fn:Wh,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=hd(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const r=id(this,s,Oh.COMPUTE,Jh,t,i);Uh(this,Lh)[t]=r}_marshalArgs(t,e,i){const s=this.__data,r=[];for(let o=0,n=t.length;o<n;o++){let{name:n,structured:a,wildcard:l,value:h,literal:d}=t[o];if(!d)if(l){const t=Zl(n,e),r=cd(s,i,t?e:n);h={path:t?e:n,value:r,base:t?sh(s,n):r}}else h=a?cd(s,i,n):s[n];if(Pl&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Fh;r[o]=h}return r}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),vd.push(this);let i=super._stampTemplate(t,e);if(vd.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let r=i[e],o=s[e].bindings;if(o)for(let e=0;e<o.length;e++){let i=o[e];td(r,i),ed(r,t,i)}r.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:r}=e;i?i.nextSibling=s:r&&(r.firstChild=s),s?s.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let o=e.childNodes;for(let t=0;t<o.length;t++){let e=o[t];Kl(Kl(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let r=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=ld(e)||" ",Xh(this,i,s,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,s,r,o){let n=this._parseBindings(o,i);if(n){let e=r,o="property";Bh.test(r)?o="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),o="attribute");let a=ld(n);return a&&"attribute"==o&&("class"==r&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(r)),t.setAttribute(r,a)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(r=lh(r)),Xh(this,i,s,o,r,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,r,o)}static _parseTemplateNestedTemplate(t,i,s){let r=e._parseTemplateNestedTemplate.call(this,t,i,s);const o=t.parentNode,n=s.templateInfo,a="dom-if"===o.localName;Il&&(a||"dom-repeat"===o.localName)&&(o.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,r=!1);let l=n.hostProps;if(Ml&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),Il||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)Xh(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,s=[],r=0;for(;null!==(i=ad.exec(t));){i.index>r&&s.push({literal:t.slice(r,i.index)});let o=i[1][0],n=!!i[2],a=i[3].trim(),l=!1,h="",d=-1;"{"==o&&(d=a.indexOf("::"))>0&&(h=a.substring(d+2),a=a.substring(0,d),l=!0);let c=hd(a),u=[];if(c){let{args:t,methodName:i}=c;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||c.static)&&(u.push(i),c.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:o,negate:n,customEvent:l,signature:c,dependencies:u,event:h}),r=ad.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,r,o){let n;return n=e.signature?sd(t,i,s,0,e.signature):i!=e.source?sh(t,e.source):o&&Jl(i)?sh(t,i):t.__data[i],e.negate&&(n=!n),n}}})),vd=[],fd=Nl((t=>{const e=wh(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
977
|
+
*/let Nh=0;const Fh=[],Oh={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Lh="__computeInfo",Uh=/[A-Z]/;function Bh(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function jh(t,e,i,s,r,o){if(e){let n=!1;const a=Nh++;for(let l in i){let h=e[r?Xl(l):l];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==a)&&(!r||Rh(l,e.trigger))&&(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,r,o),n=!0)}return n}return!1}function Yh(t,e,i,s,r,o,n,a){let l=!1,h=e[n?Xl(s):s];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==i)&&(!n||Rh(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,r,o,e.info,n,a),l=!0);return l}function Rh(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Ql(i,t))||!(!e.wildcard||!Zl(i,t))}return!0}function Gh(t,e,i,s,r){let o="string"==typeof r.method?t[r.method]:r.method,n=r.property;o?o.call(t,t.__data[n],s[n]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function Hh(t,e,i){let s=Xl(e);return s!==e&&(Vh(t,hh(s)+"-changed",i[e],e),!0)}function Vh(t,e,i,s){let r={value:i,queueProperty:!0};s&&(r.path=s),Kl(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function $h(t,e,i,s,r,o){let n=(o?Xl(e):e)!=e?e:null,a=n?sh(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),Vh(t,r.eventName,a,n)}function Wh(t,e,i,s,r){let o=t.__data[e];xl&&(o=xl(o,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,o)}const qh=(t,e,i)=>{let s=0,r=e.length-1,o=-1;for(;s<=r;){const n=s+r>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){o=n;break}r=n-1}}o<0&&(o=r+1),e.splice(o,0,t)},Kh=(t,e,i,s,r)=>{const o=e[r?Xl(t):t];if(o)for(let e=0;e<o.length;e++){const n=o[e];n.info.lastRun!==Nh&&(!r||Rh(t,n.trigger))&&(n.info.lastRun=Nh,qh(n.info,i,s))}};function Jh(t,e,i,s,r){let o=sd(t,e,i,0,r);if(o===Fh)return!1;let n=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,o,!0):(t[n]=o,!1)}function Xh(t,e,i,s,r,o,n){i.bindings=i.bindings||[];let a={kind:s,target:r,parts:o,literal:n,isCompound:1!==o.length};if(i.bindings.push(a),function(t){return!!t.target&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||hh(r)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,Qh(t,e,a,s,l)}}function Qh(t,e,i,s,r){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let o=s.dependencies,n={index:r,binding:i,part:s,evaluator:t};for(let i=0;i<o.length;i++){let s=o[i];"string"==typeof s&&(s=dd(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Zh,info:n,trigger:s})}}}function Zh(t,e,i,s,r,o,n){let a=n[r.index],l=r.binding,h=r.part;if(o&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=th(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=r.evaluator._evaluateBinding(t,h,e,i,s,o);n!==Fh&&function(t,e,i,s,r){if(r=function(t,e,i,s){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[s.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,r,i,s),xl&&(r=xl(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[Oh.READ_ONLY]||!e[Oh.READ_ONLY][s])&&e._setPendingProperty(s,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,r)}}(t,a,l,h,n)}}function td(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,r=new Array(s.length);for(let t=0;t<s.length;t++)r[t]=s[t].literal;let o=e.target;i[o]=r,e.literal&&"property"==e.kind&&("className"===o&&(t=Kl(t)),t[o]=e.literal)}}function ed(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,r){let o,n=t.detail,a=n&&n.path;a?(s=th(i,s,a),o=n&&n.value):o=t.currentTarget[i],o=r?!o:o,(!e[Oh.READ_ONLY]||!e[Oh.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,o,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function id(t,e,i,s,r,o){let n={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:o=e.static||o&&("object"!=typeof o||o[e.methodName])};for(let r,o=0;o<e.args.length&&(r=e.args[o]);o++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:s,info:n,trigger:r});return o&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function sd(t,e,i,s,r){let o=t._methodHost||t,n=o[r.methodName];if(n){let s=t._marshalArgs(r.args,e,i);return s===Fh?Fh:n.apply(o,s)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const rd=[],od="(?:[a-zA-Z_$][\\w.:$\\-*]*)",nd="(?:("+od+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",ad=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+od+"\\s*(?:\\(\\s*(?:(?:"+nd+"(?:,\\s*"+nd+")*)?)\\)\\s*)?)(?:]]|}})","g");function ld(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function hd(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:rd};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=dd(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function dd(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=Xl(e),i.structured=Jl(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function cd(t,e,i){let s=sh(t,i);return void 0===s&&(s=e[i]),s}function ud(t,e,i,s){const r={indexSplices:s};Pl&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),Pl&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function pd(t,e,i,s,r,o){ud(t,e,i,[{index:s,addedCount:r,removed:o,object:e,type:"splice"}])}const md=Nl((t=>{const e=zh(kh(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Oh}_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(vd.length){let t=vd[vd.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[Oh.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==Oh.READ_ONLY);let s=Bh(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=Bh(this,e,!0)[t],r=s.indexOf(i);r>=0&&s.splice(r,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Oh.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Oh.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Oh.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Oh.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||Xl(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=sh(this,t);if(!(t=rh(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let r;for(let o in s){let n=s[o];Zl(o,e)?(r=th(o,n,e),t._setPendingPropertyOrPath(r,i,!0,!0)):Zl(n,e)&&(r=th(n,o,e),t._setPendingPropertyOrPath(r,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){(i!==t[e]||"object"==typeof i)&&("className"===e&&(t=Kl(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&Jl(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[Oh.NOTIFY]&&this[Oh.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[Oh.READ_ONLY]||!this[Oh.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let r=t[Oh.COMPUTE];if(r)if(Al){Nh++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Oh.COMPUTE];let s,{counts:r,ready:o,total:n}=function(t){const e=t[Lh],i={},s=t[Oh.COMPUTE],r=[];let o=0;for(let t in e){const s=e[t];o+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||r.push(t);return{counts:i,ready:r,total:o}}(t);for(;s=o.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--r[e]&&o.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)Kh(t,r,n,o,s);let a;for(;a=n.shift();)Jh(t,"",e,0,a)&&Kh(a.methodInfo,r,n,o,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;jh(t,r,o,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}(this,e,i,r),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),jh(this,this[Oh.REFLECT],e,i,r),jh(this,this[Oh.OBSERVE],e,i,r),s&&function(t,e,i,s,r){let o,n,a=t[Oh.NOTIFY],l=Nh++;for(let n in e)e[n]&&(a&&Yh(t,a,l,n,i,s,r)||r&&Hh(t,n,i))&&(o=!0);o&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Oh.PROPAGATE]&&jh(this,this[Oh.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const r=(e,s)=>{jh(this,t.propertyEffects,e,i,s,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,s)};t.runEffects?t.runEffects(r,e,s):r(e,s)}linkPaths(t,e){t=eh(t),e=eh(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=eh(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};ud(this,sh(this,t,i),i.path,e)}get(t,e){return sh(e||this,t)}set(t,e,i){i?rh(i,t,e):(!this[Oh.READ_ONLY]||!this[Oh.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=sh(this,t,i),r=s.length,o=s.push(...e);return e.length&&pd(this,s,i.path,r,e.length,[]),o}pop(t){let e={path:""},i=sh(this,t,e),s=!!i.length,r=i.pop();return s&&pd(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...s){let r,o={path:""},n=sh(this,t,o);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||r.length)&&pd(this,n,o.path,e,s.length,r),r}shift(t){let e={path:""},i=sh(this,t,e),s=!!i.length,r=i.shift();return s&&pd(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},s=sh(this,t,i),r=s.unshift(...e);return e.length&&pd(this,s,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=sh(this,t,s),i=s.path}else i=Array.isArray(t)?eh(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,Oh.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,Oh.OBSERVE,{fn:Gh,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Oh.OBSERVE,{fn:Gh,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=hd(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");id(this,i,Oh.OBSERVE,sd,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Oh.NOTIFY,{fn:$h,info:{eventName:hh(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,Oh.REFLECT,{fn:Wh,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=hd(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const r=id(this,s,Oh.COMPUTE,Jh,t,i);Bh(this,Lh)[t]=r}_marshalArgs(t,e,i){const s=this.__data,r=[];for(let o=0,n=t.length;o<n;o++){let{name:n,structured:a,wildcard:l,value:h,literal:d}=t[o];if(!d)if(l){const t=Zl(n,e),r=cd(s,i,t?e:n);h={path:t?e:n,value:r,base:t?sh(s,n):r}}else h=a?cd(s,i,n):s[n];if(Pl&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Fh;r[o]=h}return r}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),vd.push(this);let i=super._stampTemplate(t,e);if(vd.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let r=i[e],o=s[e].bindings;if(o)for(let e=0;e<o.length;e++){let i=o[e];td(r,i),ed(r,t,i)}r.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:r}=e;i?i.nextSibling=s:r&&(r.firstChild=s),s?s.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let o=e.childNodes;for(let t=0;t<o.length;t++){let e=o[t];Kl(Kl(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let r=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=ld(e)||" ",Xh(this,i,s,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,s,r,o){let n=this._parseBindings(o,i);if(n){let e=r,o="property";Uh.test(r)?o="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),o="attribute");let a=ld(n);return a&&"attribute"==o&&("class"==r&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(r)),t.setAttribute(r,a)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(r=lh(r)),Xh(this,i,s,o,r,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,r,o)}static _parseTemplateNestedTemplate(t,i,s){let r=e._parseTemplateNestedTemplate.call(this,t,i,s);const o=t.parentNode,n=s.templateInfo,a="dom-if"===o.localName;Il&&(a||"dom-repeat"===o.localName)&&(o.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,r=!1);let l=n.hostProps;if(Ml&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),Il||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)Xh(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,s=[],r=0;for(;null!==(i=ad.exec(t));){i.index>r&&s.push({literal:t.slice(r,i.index)});let o=i[1][0],n=!!i[2],a=i[3].trim(),l=!1,h="",d=-1;"{"==o&&(d=a.indexOf("::"))>0&&(h=a.substring(d+2),a=a.substring(0,d),l=!0);let c=hd(a),u=[];if(c){let{args:t,methodName:i}=c;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||c.static)&&(u.push(i),c.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:o,negate:n,customEvent:l,signature:c,dependencies:u,event:h}),r=ad.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,r,o){let n;return n=e.signature?sd(t,i,s,0,e.signature):i!=e.source?sh(t,e.source):o&&Jl(i)?sh(t,i):t.__data[i],e.negate&&(n=!n),n}}})),vd=[],fd=Nl((t=>{const e=wh(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
978
978
|
/**
|
|
979
979
|
@license
|
|
980
980
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -993,7 +993,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
993
993
|
Code distributed by Google as part of the polymer project is also
|
|
994
994
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
995
995
|
*/
|
|
996
|
-
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class r extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return r})),gd=window.ShadyCSS&&window.ShadyCSS.cssBuild,bd=Nl((t=>{const e=fd(md(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Cl||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!_l||kl)&&(e=
|
|
996
|
+
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class r extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return r})),gd=window.ShadyCSS&&window.ShadyCSS.cssBuild,bd=Nl((t=>{const e=fd(md(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Cl||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!_l||kl)&&(e=Bl.import(t,"template"),_l&&!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=gl(t.url);else{const t=Bl.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=yl,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return fl(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!gd){const r=e.content.querySelectorAll("style"),o=Wl(e),n=function(t){let e=Gl(t);return e?ql(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let r=n[i];r.textContent=t._processStyleText(r.textContent,s),e.content.insertBefore(r,a)}let l=0;for(let e=0;e<o.length;e++){let i=o[e],n=r[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),Tl&&gd&&wl){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?vl(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=Kl(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])),El&&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=vl(this.importPath)),vl(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return Sl&&!(i in this._properties)&&!(s.info.part.signature&&s.info.part.signature.static)&&!s.info.part.hostProp&&!t.nestedTemplate&&console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),wd=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class yd{constructor(t,e){kd(t,e);const i=e.reduce(((e,i,s)=>e+xd(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function xd(t){if(t instanceof yd)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const _d=function(t,...e){kd(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof yd)return xd(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return wd&&(s=wd.createHTML(s)),i.innerHTML=s,i},kd=(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")},Cd=bd(HTMLElement),Sd=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Ed=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;
|
|
997
997
|
/**
|
|
998
998
|
@license
|
|
999
999
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1491,7 +1491,7 @@ try {
|
|
|
1491
1491
|
* Code distributed by Google as part of the polymer project is also
|
|
1492
1492
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1493
1493
|
*/
|
|
1494
|
-
let Id=0,Md=0;const Dd=[];let
|
|
1494
|
+
let Id=0,Md=0;const Dd=[];let Td=!1;const zd={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)}},Nd={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},Fd={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Od={run(t){Td||(Td=!0,queueMicrotask((()=>function(){Td=!1;const t=Dd.length;for(let e=0;e<t;e++){const t=Dd[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Dd.splice(0,t),Md+=t}()))),Dd.push(t);const e=Id;return Id+=1,e},cancel(t){const e=t-Md;if(e>=0){if(!Dd[e])throw new Error(`invalid async handle: ${t}`);Dd[e]=null}}},Ld=new Set;
|
|
1495
1495
|
/**
|
|
1496
1496
|
@license
|
|
1497
1497
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1500,17 +1500,17 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1500
1500
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1501
1501
|
Code distributed by Google as part of the polymer project is also
|
|
1502
1502
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1503
|
-
*/let
|
|
1503
|
+
*/let Ud=class t{static debounce(e,i,s){return e instanceof t?e._cancelAsync():e=new t,e.setConfig(i,s),e}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,Ld.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Ld.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 Bd(t){Ld.add(t)}function jd(){const t=!!Ld.size;return Ld.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const Yd=()=>{let t;do{t=jd()}while(t)},Rd=[];
|
|
1504
1504
|
/**
|
|
1505
1505
|
* @license
|
|
1506
1506
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1507
1507
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1508
|
-
*/function
|
|
1508
|
+
*/function Gd(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function Hd(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Hd();Rd.forEach((e=>{Gd(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Vd=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(),Gd(this,Hd(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=Hd(),r=i===s&&-1===Rd.indexOf(this),o=!i&&e&&-1===Rd.indexOf(this);r||o?(this.__subscribe(),Gd(this,s,i)):i!==s&&e===s&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Rd.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(){Rd.includes(this)||Rd.push(this)}__unsubscribe(){Rd.includes(this)&&Rd.splice(Rd.indexOf(this),1)}}
|
|
1509
1509
|
/**
|
|
1510
1510
|
* @license
|
|
1511
1511
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1512
1512
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1513
|
-
*/;let $d;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)Pd(t,e)}(Ad)};const Wd=new Set,qd=t=>class extends(
|
|
1513
|
+
*/;let $d;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)Pd(t,e)}(Ad)};const Wd=new Set,qd=t=>class extends(Vd(t)){static finalize(){super.finalize();const{is:t}=this;t&&!Wd.has(t)&&(window.Vaadin.registrations.push(this),Wd.add(t),window.Vaadin.developmentModeCallback&&($d=Ud.debounce($d,Fd,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),Bd($d)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
|
|
1514
1514
|
/**
|
|
1515
1515
|
* @license
|
|
1516
1516
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1545,12 +1545,12 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1545
1545
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1546
1546
|
Code distributed by Google as part of the polymer project is also
|
|
1547
1547
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1548
|
-
*/const rc=t=>t,oc="string"==typeof document.head.style.touchAction,nc="__polymerGestures",ac="__polymerGesturesHandled",lc="__polymerGesturesTouchAction",hc=["mousedown","mousemove","mouseup","click"],dc=[0,1,4,2],cc=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function uc(t){return hc.indexOf(t)>-1}!function(){try{const t=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const pc=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),mc={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function vc(t){const e=t.type;if(!uc(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!cc&&(e=dc[t.which]||0),!!(1&e)}return 0===(void 0===t.button?0:t.button)}const fc={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function gc(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function bc(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const wc=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],yc={},xc=[];function _c(t){const e=wc(t);return e.length>0?e[0]:t.target}function kc(t){const e=t.type,i=t.currentTarget[nc];if(!i)return;const s=i[e];if(!s)return;if(!t[ac]&&(t[ac]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(fc.touch.id=i.identifier),fc.touch.id!==i.identifier)return;oc||("touchstart"===e||"touchmove"===e)&&function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)fc.touch.x=e.clientX,fc.touch.y=e.clientY,fc.touch.scrollDecided=!1;else if("touchmove"===i){if(fc.touch.scrollDecided)return;fc.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=wc(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[lc]){e=t[lc];break}return e}(t);let s=!1;const r=Math.abs(fc.touch.x-e.clientX),o=Math.abs(fc.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=o>r:"pan-y"===i&&(s=r>o)),s?t.preventDefault():Ac("track")}}(t)}const r=t[ac];if(!r.skip){for(let e,i=0;i<xc.length;i++)e=xc[i],s[e.name]&&!r[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,o=0;o<xc.length;o++)i=xc[o],s[i.name]&&!r[i.name]&&(r[i.name]=!0,i[e](t))}}function Cc(t,e,i){return!!yc[e]&&(function(t,e,i){const s=yc[e],r=s.deps,o=s.name;let n=t[nc];n||(t[nc]=n={});for(let e,i,s=0;s<r.length;s++)e=r[s],(!pc||!uc(e)||"click"===e)&&(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,kc,void 0),i[o]=(i[o]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&Ec(t,s.touchAction)}(t,e,i),!0)}function Sc(t){xc.push(t),t.emits.forEach((e=>{yc[e]=t}))}function Ec(t,e){oc&&t instanceof HTMLElement&&Od.run((()=>{t.style.touchAction=e})),t[lc]=e}function Pc(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,rc(t).dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Ac(t){const e=function(t){for(let e,i=0;i<xc.length;i++){e=xc[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Ic(t,e,i,s){e&&Pc(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>Ac(t)})}function Mc(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),r=Math.abs(t.y-i);return s>=5||r>=5}function Dc(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],r=t.moves[t.moves.length-1];let o,n=0;s&&(o=r.x-s.x,n=r.y-s.y),Pc(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:r.x-t.x,dy:r.y-t.y,ddx:o,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const r=s;if(s=s.shadowRoot.elementFromPoint(t,e),r===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function
|
|
1548
|
+
*/const rc=t=>t,oc="string"==typeof document.head.style.touchAction,nc="__polymerGestures",ac="__polymerGesturesHandled",lc="__polymerGesturesTouchAction",hc=["mousedown","mousemove","mouseup","click"],dc=[0,1,4,2],cc=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function uc(t){return hc.indexOf(t)>-1}!function(){try{const t=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const pc=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),mc={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function vc(t){const e=t.type;if(!uc(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!cc&&(e=dc[t.which]||0),!!(1&e)}return 0===(void 0===t.button?0:t.button)}const fc={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function gc(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function bc(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const wc=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],yc={},xc=[];function _c(t){const e=wc(t);return e.length>0?e[0]:t.target}function kc(t){const e=t.type,i=t.currentTarget[nc];if(!i)return;const s=i[e];if(!s)return;if(!t[ac]&&(t[ac]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(fc.touch.id=i.identifier),fc.touch.id!==i.identifier)return;oc||("touchstart"===e||"touchmove"===e)&&function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)fc.touch.x=e.clientX,fc.touch.y=e.clientY,fc.touch.scrollDecided=!1;else if("touchmove"===i){if(fc.touch.scrollDecided)return;fc.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=wc(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[lc]){e=t[lc];break}return e}(t);let s=!1;const r=Math.abs(fc.touch.x-e.clientX),o=Math.abs(fc.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=o>r:"pan-y"===i&&(s=r>o)),s?t.preventDefault():Ac("track")}}(t)}const r=t[ac];if(!r.skip){for(let e,i=0;i<xc.length;i++)e=xc[i],s[e.name]&&!r[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,o=0;o<xc.length;o++)i=xc[o],s[i.name]&&!r[i.name]&&(r[i.name]=!0,i[e](t))}}function Cc(t,e,i){return!!yc[e]&&(function(t,e,i){const s=yc[e],r=s.deps,o=s.name;let n=t[nc];n||(t[nc]=n={});for(let e,i,s=0;s<r.length;s++)e=r[s],(!pc||!uc(e)||"click"===e)&&(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,kc,void 0),i[o]=(i[o]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&Ec(t,s.touchAction)}(t,e,i),!0)}function Sc(t){xc.push(t),t.emits.forEach((e=>{yc[e]=t}))}function Ec(t,e){oc&&t instanceof HTMLElement&&Od.run((()=>{t.style.touchAction=e})),t[lc]=e}function Pc(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,rc(t).dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Ac(t){const e=function(t){for(let e,i=0;i<xc.length;i++){e=xc[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Ic(t,e,i,s){e&&Pc(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>Ac(t)})}function Mc(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),r=Math.abs(t.y-i);return s>=5||r>=5}function Dc(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],r=t.moves[t.moves.length-1];let o,n=0;s&&(o=r.x-s.x,n=r.y-s.y),Pc(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:r.x-t.x,dy:r.y-t.y,ddx:o,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const r=s;if(s=s.shadowRoot.elementFromPoint(t,e),r===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function Tc(t,e,i){const s=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y),o=_c(i||e);!o||mc[o.localName]&&o.hasAttribute("disabled")||(isNaN(s)||isNaN(r)||s<=25&&r<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=_c(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,r=t.pageY;return!(s>=i.left&&s<=i.right&&r>=i.top&&r<=i.bottom)}return!1}(e))&&(t.prevent||Pc(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
1549
1549
|
/**
|
|
1550
1550
|
* @license
|
|
1551
1551
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1552
1552
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1553
|
-
*/Sc({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){bc(this.info)},mousedown(t){if(!vc(t))return;const e=_c(t),i=this;gc(this.info,(t=>{vc(t)||(Ic("up",e,t),bc(i.info))}),(t=>{vc(t)&&Ic("up",e,t),bc(i.info)})),Ic("down",e,t)},touchstart(t){Ic("down",_c(t),t.changedTouches[0],t)},touchend(t){Ic("up",_c(t),t.changedTouches[0],t)}}),Sc({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,bc(this.info)},mousedown(t){if(!vc(t))return;const e=_c(t),i=this,s=t=>{const s=t.clientX,r=t.clientY;Mc(i.info,s,r)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&Ac("tap"),i.info.addMove({x:s,y:r}),vc(t)||(i.info.state="end",bc(i.info)),e&&Dc(i.info,e,t),i.info.started=!0)};gc(this.info,s,(t=>{i.info.started&&s(t),bc(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=_c(t),i=t.changedTouches[0],s=i.clientX,r=i.clientY;Mc(this.info,s,r)&&("start"===this.info.state&&Ac("tap"),this.info.addMove({x:s,y:r}),Dc(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=_c(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Dc(this.info,e,i))}}),Sc({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){vc(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){vc(t)&&
|
|
1553
|
+
*/Sc({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){bc(this.info)},mousedown(t){if(!vc(t))return;const e=_c(t),i=this;gc(this.info,(t=>{vc(t)||(Ic("up",e,t),bc(i.info))}),(t=>{vc(t)&&Ic("up",e,t),bc(i.info)})),Ic("down",e,t)},touchstart(t){Ic("down",_c(t),t.changedTouches[0],t)},touchend(t){Ic("up",_c(t),t.changedTouches[0],t)}}),Sc({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,bc(this.info)},mousedown(t){if(!vc(t))return;const e=_c(t),i=this,s=t=>{const s=t.clientX,r=t.clientY;Mc(i.info,s,r)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&Ac("tap"),i.info.addMove({x:s,y:r}),vc(t)||(i.info.state="end",bc(i.info)),e&&Dc(i.info,e,t),i.info.started=!0)};gc(this.info,s,(t=>{i.info.started&&s(t),bc(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=_c(t),i=t.changedTouches[0],s=i.clientX,r=i.clientY;Mc(this.info,s,r)&&("start"===this.info.state&&Ac("tap"),this.info.addMove({x:s,y:r}),Dc(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=_c(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Dc(this.info,e,i))}}),Sc({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){vc(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){vc(t)&&Tc(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Tc(this.info,t.changedTouches[0],t)}});const zc=Nl((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),Nc=Nl((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){}})),Fc=t=>class extends(zc(Nc(t))){get _activeKeys(){return[" "]}ready(){super.ready(),Cc(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),Cc(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)}}
|
|
1554
1554
|
/**
|
|
1555
1555
|
* @license
|
|
1556
1556
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1560,18 +1560,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1560
1560
|
* @license
|
|
1561
1561
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1562
1562
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1563
|
-
*/let Oc=!1;function Lc(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function
|
|
1563
|
+
*/let Oc=!1;function Lc(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function Uc(){return Oc}function Bc(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 jc(t,e){const i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}function Yc(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;)jc(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(Yc(t.slice(0,i)),Yc(t.slice(i)))}function Rc(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||Bc(t)}function Gc(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function Hc(t){return t.getRootNode().activeElement===t}function Vc(t,e){if(t.nodeType!==Node.ELEMENT_NODE||Bc(t))return!1;const i=t,s=function(t){if(!Gc(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let r=s>0;s>=0&&e.push(i);let o=[];return o="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...o].forEach((t=>{r=Vc(t,e)||r})),r}window.addEventListener("keydown",(()=>{Oc=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{Oc=!1}),{capture:!0});
|
|
1564
1564
|
/**
|
|
1565
1565
|
* @license
|
|
1566
1566
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1567
1567
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1568
1568
|
*/
|
|
1569
|
-
const $c=Nl((t=>class extends t{get _keyboardActive(){return
|
|
1569
|
+
const $c=Nl((t=>class extends t{get _keyboardActive(){return Uc()}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}})),Wc=t=>class extends(zc(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)}}
|
|
1570
1570
|
/**
|
|
1571
1571
|
* @license
|
|
1572
1572
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1573
1573
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1574
|
-
*/,qc=Nl((t=>class extends($c(Wc(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)}})),Kc=Nl((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)}})),Jc=Nl((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),(""!==t||void 0!==e)&&(this.__userInput||this._forwardInputValue(t))}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),Xc=Nl((t=>class extends(Kc(
|
|
1574
|
+
*/,qc=Nl((t=>class extends($c(Wc(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)}})),Kc=Nl((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)}})),Jc=Nl((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),(""!==t||void 0!==e)&&(this.__userInput||this._forwardInputValue(t))}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),Xc=Nl((t=>class extends(Kc(zc(Jc(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){this._toggleChecked(t.target.checked)}_toggleChecked(t){this.checked=t}})),Qc=new Map;
|
|
1575
1575
|
/**
|
|
1576
1576
|
* @license
|
|
1577
1577
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1592,12 +1592,12 @@ class su{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
1592
1592
|
* @license
|
|
1593
1593
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1594
1594
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1595
|
-
*/let nu;function au(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(ou.removeAttribute("aria-live"),ou.removeAttribute("role"),nu=
|
|
1595
|
+
*/let nu;function au(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(ou.removeAttribute("aria-live"),ou.removeAttribute("role"),nu=Ud.debounce(nu,Nd,(()=>{ou.setAttribute("role","alert")}))):(nu&&nu.cancel(),ou.removeAttribute("role"),ou.setAttribute("aria-live",i)),ou.textContent="",setTimeout((()=>{ou.textContent=t}),s)}
|
|
1596
1596
|
/**
|
|
1597
1597
|
* @license
|
|
1598
1598
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1599
1599
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1600
|
-
*/ou.style.position="fixed",ou.style.clip="rect(0px, 0px, 0px, 0px)",ou.setAttribute("aria-live","polite"),document.body.appendChild(ou);class lu extends ic{constructor(t,e,i,s={}){super(t,e,i,Tn(
|
|
1600
|
+
*/ou.style.position="fixed",ou.style.clip="rect(0px, 0px, 0px, 0px)",ou.setAttribute("aria-live","polite"),document.body.appendChild(ou);class lu extends ic{constructor(t,e,i,s={}){super(t,e,i,zn(Tn({},s),{useUniqueId:!0}))}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||!this.nodes||t===this.nodes[0])&&!t.id&&(t.id=this.defaultId)}}
|
|
1601
1601
|
/**
|
|
1602
1602
|
* @license
|
|
1603
1603
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1648,7 +1648,7 @@ class su{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
1648
1648
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1649
1649
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1650
1650
|
*/
|
|
1651
|
-
sl("vaadin-checkbox",
|
|
1651
|
+
sl("vaadin-checkbox",Gn`
|
|
1652
1652
|
:host {
|
|
1653
1653
|
display: inline-block;
|
|
1654
1654
|
}
|
|
@@ -1758,7 +1758,7 @@ sl("vaadin-checkbox",Vn`
|
|
|
1758
1758
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1759
1759
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1760
1760
|
*/
|
|
1761
|
-
const wu=
|
|
1761
|
+
const wu=Gn`
|
|
1762
1762
|
:host {
|
|
1763
1763
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
1764
1764
|
}
|
|
@@ -1819,7 +1819,7 @@ const wu=Vn`
|
|
|
1819
1819
|
* @license
|
|
1820
1820
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1821
1821
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1822
|
-
*/,yu=
|
|
1822
|
+
*/,yu=Gn`
|
|
1823
1823
|
[part='label'] {
|
|
1824
1824
|
align-self: flex-start;
|
|
1825
1825
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
@@ -1931,7 +1931,7 @@ const wu=Vn`
|
|
|
1931
1931
|
margin-left: 0;
|
|
1932
1932
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1933
1933
|
}
|
|
1934
|
-
`;sl("",yu,{moduleId:"lumo-required-field"}),sl("vaadin-checkbox-group",[yu,wu,
|
|
1934
|
+
`;sl("",yu,{moduleId:"lumo-required-field"}),sl("vaadin-checkbox-group",[yu,wu,Gn`
|
|
1935
1935
|
:host {
|
|
1936
1936
|
color: var(--lumo-body-text-color);
|
|
1937
1937
|
font-size: var(--lumo-font-size-m);
|
|
@@ -1980,7 +1980,7 @@ const wu=Vn`
|
|
|
1980
1980
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
1981
1981
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1982
1982
|
*/
|
|
1983
|
-
const xu=t=>class extends(mu($c(
|
|
1983
|
+
const xu=t=>class extends(mu($c(zc(t)))){static get properties(){return{value:{type:Array,value:()=>[],notify:!0,sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__readonlyChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new sc(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Zd(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),s=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox);const r=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(r),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(t){return t.filter((t=>t.nodeType===Node.ELEMENT_NODE&&"vaadin-checkbox"===t.localName))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),this.readonly&&(t.readonly=!0),t.checked?this.__addCheckboxToValue(t.value):this.value&&this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value?this.value.includes(t)||(this.value=[...this.value,t]):this.value=[t]}__removeCheckboxFromValue(t){this.value&&this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){t&&0===t.length&&void 0===e||(this.toggleAttribute("has-value",t&&t.length>0),this.__checkboxes.forEach((e=>{e.checked=t&&t.includes(e.value)})),void 0!==e&&this.validate())}__readonlyChanged(t,e){(t||e)&&this.__checkboxes.forEach((e=>{e.readonly=t}))}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}
|
|
1984
1984
|
/**
|
|
1985
1985
|
* @license
|
|
1986
1986
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
@@ -1991,7 +1991,7 @@ const xu=t=>class extends(mu($c(Tc(t)))){static get properties(){return{value:{t
|
|
|
1991
1991
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
1992
1992
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1993
1993
|
*/
|
|
1994
|
-
sl("vaadin-checkbox-group",
|
|
1994
|
+
sl("vaadin-checkbox-group",Gn`
|
|
1995
1995
|
:host {
|
|
1996
1996
|
display: inline-flex;
|
|
1997
1997
|
}
|
|
@@ -2047,7 +2047,7 @@ sl("vaadin-checkbox-group",Vn`
|
|
|
2047
2047
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2048
2048
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2049
2049
|
*/
|
|
2050
|
-
const ku=
|
|
2050
|
+
const ku=Gn`
|
|
2051
2051
|
:host {
|
|
2052
2052
|
top: var(--lumo-space-m);
|
|
2053
2053
|
right: var(--lumo-space-m);
|
|
@@ -2118,7 +2118,7 @@ const ku=Vn`
|
|
|
2118
2118
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2119
2119
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2120
2120
|
*/
|
|
2121
|
-
const Cu=
|
|
2121
|
+
const Cu=Gn`
|
|
2122
2122
|
:host([opening]),
|
|
2123
2123
|
:host([closing]) {
|
|
2124
2124
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -2148,7 +2148,7 @@ const Cu=Vn`
|
|
|
2148
2148
|
opacity: 0;
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
2151
|
-
`;sl("",Cu,{moduleId:"lumo-menu-overlay-core"});const Su=[ku,Cu,
|
|
2151
|
+
`;sl("",Cu,{moduleId:"lumo-menu-overlay-core"});const Su=[ku,Cu,Gn`
|
|
2152
2152
|
/* Small viewport (bottom sheet) styles */
|
|
2153
2153
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
2154
2154
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -2210,7 +2210,7 @@ const Cu=Vn`
|
|
|
2210
2210
|
transform: translateY(150%);
|
|
2211
2211
|
}
|
|
2212
2212
|
}
|
|
2213
|
-
`];sl("",Su,{moduleId:"lumo-menu-overlay"}),sl("vaadin-date-picker-overlay",[Su,
|
|
2213
|
+
`];sl("",Su,{moduleId:"lumo-menu-overlay"}),sl("vaadin-date-picker-overlay",[Su,Gn`
|
|
2214
2214
|
[part='overlay'] {
|
|
2215
2215
|
/*
|
|
2216
2216
|
Width:
|
|
@@ -2255,7 +2255,7 @@ const Cu=Vn`
|
|
|
2255
2255
|
max-height: 70vh;
|
|
2256
2256
|
}
|
|
2257
2257
|
}
|
|
2258
|
-
`],{moduleId:"lumo-date-picker-overlay"});const Eu=
|
|
2258
|
+
`],{moduleId:"lumo-date-picker-overlay"});const Eu=Gn`
|
|
2259
2259
|
:host {
|
|
2260
2260
|
/* Sizing */
|
|
2261
2261
|
--lumo-button-size: var(--lumo-size-m);
|
|
@@ -2531,7 +2531,7 @@ const Cu=Vn`
|
|
|
2531
2531
|
margin-left: 0;
|
|
2532
2532
|
margin-right: 0;
|
|
2533
2533
|
}
|
|
2534
|
-
`;sl("vaadin-button",Eu,{moduleId:"lumo-button"}),sl("vaadin-date-picker-year",
|
|
2534
|
+
`;sl("vaadin-button",Eu,{moduleId:"lumo-button"}),sl("vaadin-date-picker-year",Gn`
|
|
2535
2535
|
:host([current]) [part='year-number'] {
|
|
2536
2536
|
color: var(--lumo-primary-text-color);
|
|
2537
2537
|
}
|
|
@@ -2555,7 +2555,7 @@ const Cu=Vn`
|
|
|
2555
2555
|
color: var(--lumo-disabled-text-color);
|
|
2556
2556
|
content: '\\2022';
|
|
2557
2557
|
}
|
|
2558
|
-
`,{moduleId:"lumo-date-picker-year"}),sl("vaadin-date-picker-overlay-content",
|
|
2558
|
+
`,{moduleId:"lumo-date-picker-year"}),sl("vaadin-date-picker-overlay-content",Gn`
|
|
2559
2559
|
:host {
|
|
2560
2560
|
position: relative;
|
|
2561
2561
|
/* Background for the year scroller, placed here as we are using a mask image on the actual years part */
|
|
@@ -2705,7 +2705,7 @@ const Cu=Vn`
|
|
|
2705
2705
|
padding-left: 50px;
|
|
2706
2706
|
}
|
|
2707
2707
|
}
|
|
2708
|
-
`,{moduleId:"lumo-date-picker-overlay-content"}),sl("vaadin-month-calendar",
|
|
2708
|
+
`,{moduleId:"lumo-date-picker-overlay-content"}),sl("vaadin-month-calendar",Gn`
|
|
2709
2709
|
:host {
|
|
2710
2710
|
-moz-user-select: none;
|
|
2711
2711
|
-webkit-user-select: none;
|
|
@@ -2852,7 +2852,7 @@ const Cu=Vn`
|
|
|
2852
2852
|
:host([disabled]) * {
|
|
2853
2853
|
color: var(--lumo-disabled-text-color) !important;
|
|
2854
2854
|
}
|
|
2855
|
-
`,{moduleId:"lumo-month-calendar"}),sl("vaadin-input-container",
|
|
2855
|
+
`,{moduleId:"lumo-month-calendar"}),sl("vaadin-input-container",Gn`
|
|
2856
2856
|
:host {
|
|
2857
2857
|
background: var(--_background);
|
|
2858
2858
|
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
@@ -3036,7 +3036,7 @@ const Cu=Vn`
|
|
|
3036
3036
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3037
3037
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3038
3038
|
*/
|
|
3039
|
-
const Pu=
|
|
3039
|
+
const Pu=Gn`
|
|
3040
3040
|
[part$='button'] {
|
|
3041
3041
|
flex: none;
|
|
3042
3042
|
width: 1em;
|
|
@@ -3069,7 +3069,7 @@ const Pu=Vn`
|
|
|
3069
3069
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3070
3070
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3071
3071
|
*/
|
|
3072
|
-
const Au=[yu,Pu,wu,
|
|
3072
|
+
const Au=[yu,Pu,wu,Gn`
|
|
3073
3073
|
:host {
|
|
3074
3074
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
3075
3075
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -3200,7 +3200,7 @@ const Au=[yu,Pu,wu,Vn`
|
|
|
3200
3200
|
[part='clear-button']::before {
|
|
3201
3201
|
content: var(--lumo-icons-cross);
|
|
3202
3202
|
}
|
|
3203
|
-
`];sl("",Au,{moduleId:"lumo-input-field-shared-styles"}),sl("vaadin-date-picker",[Au,
|
|
3203
|
+
`];sl("",Au,{moduleId:"lumo-input-field-shared-styles"}),sl("vaadin-date-picker",[Au,Gn`
|
|
3204
3204
|
[part='toggle-button']::before {
|
|
3205
3205
|
content: var(--lumo-icons-calendar);
|
|
3206
3206
|
}
|
|
@@ -3239,7 +3239,7 @@ const Iu=t=>class extends t{static get properties(){return{disabled:{type:Boolea
|
|
|
3239
3239
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3240
3240
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3241
3241
|
*/
|
|
3242
|
-
sl("vaadin-input-container",
|
|
3242
|
+
sl("vaadin-input-container",Gn`
|
|
3243
3243
|
:host {
|
|
3244
3244
|
display: flex;
|
|
3245
3245
|
align-items: center;
|
|
@@ -3304,7 +3304,7 @@ sl("vaadin-input-container",Vn`
|
|
|
3304
3304
|
/* Override default opacity in Firefox */
|
|
3305
3305
|
opacity: 1;
|
|
3306
3306
|
}
|
|
3307
|
-
`,{moduleId:"vaadin-input-container-styles"});class Mu extends(Iu(ll(
|
|
3307
|
+
`,{moduleId:"vaadin-input-container-styles"});class Mu extends(Iu(ll(Vd(Cd)))){static get is(){return"vaadin-input-container"}static get template(){return _d`
|
|
3308
3308
|
<slot name="prefix"></slot>
|
|
3309
3309
|
<slot></slot>
|
|
3310
3310
|
<slot name="suffix"></slot>
|
|
@@ -3314,7 +3314,7 @@ sl("vaadin-input-container",Vn`
|
|
|
3314
3314
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3315
3315
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3316
3316
|
*/
|
|
3317
|
-
const Du=
|
|
3317
|
+
const Du=Gn`
|
|
3318
3318
|
:host {
|
|
3319
3319
|
z-index: 200;
|
|
3320
3320
|
position: fixed;
|
|
@@ -3382,17 +3382,17 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3382
3382
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3383
3383
|
Code distributed by Google as part of the polymer project is also
|
|
3384
3384
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3385
|
-
*/;let
|
|
3385
|
+
*/;let Tu=!1,zu=[],Nu=[];function Fu(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function Ou(t,e,i){Tu||(Tu=!0,requestAnimationFrame((function(){Tu=!1,function(t){for(;t.length;)Fu(t.shift())}(zu),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)Fu(t.shift())}(Nu)}))}))),Nu.push([t,e,i])
|
|
3386
3386
|
/**
|
|
3387
3387
|
* @license
|
|
3388
3388
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3389
3389
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3390
|
-
*/}const Lu=t=>t.test(navigator.userAgent),
|
|
3390
|
+
*/}const Lu=t=>t.test(navigator.userAgent),Uu=t=>t.test(navigator.platform);Lu(/Android/u),Lu(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),Lu(/Firefox/u);const Bu=Uu(/^iPad/u)||Uu(/^Mac/u)&&navigator.maxTouchPoints>1,ju=Uu(/^iPhone/u)||Bu,Yu=Lu(/^((?!chrome|android).)*safari/iu),Ru=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
|
|
3391
3391
|
/**
|
|
3392
3392
|
* @license
|
|
3393
3393
|
* Copyright (c) 2017 Anton Korzunov
|
|
3394
3394
|
* SPDX-License-Identifier: MIT
|
|
3395
|
-
*/let
|
|
3395
|
+
*/let Gu=new WeakMap,Hu=new WeakMap,Vu={},$u=0;const Wu=t=>t&&t.nodeType===Node.ELEMENT_NODE,qu=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},Ku=(t,e=document.body,i="data-aria-hidden")=>{const s=Array.from(Array.isArray(t)?t:[t]);return e&&s.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,s)=>{const r=((t,e)=>Wu(t)?e.map((e=>{if(!Wu(e))return qu(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 qu(e,"is not contained inside",t),null})).filter((t=>!!t)):(qu(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);Vu[i]||(Vu[i]=new WeakMap);const o=Vu[i],n=[],a=new Set,l=new Set(r),h=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};r.forEach(h);const d=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(a.has(t))d(t);else{const e=t.getAttribute(s),r=null!==e&&"false"!==e,a=(Gu.get(t)||0)+1,l=(o.get(t)||0)+1;Gu.set(t,a),o.set(t,l),n.push(t),1===a&&r&&Hu.set(t,!0),1===l&&t.setAttribute(i,"true"),r||t.setAttribute(s,"true")}}))};return d(e),a.clear(),$u+=1,()=>{n.forEach((t=>{const e=Gu.get(t)-1,r=o.get(t)-1;Gu.set(t,e),o.set(t,r),e||(Hu.has(t)?Hu.delete(t):t.removeAttribute(s)),r||t.removeAttribute(i)})),$u-=1,$u||(Gu=new WeakMap,Gu=new WeakMap,Hu=new WeakMap,Vu={})}})(s,e,i,"aria-hidden")
|
|
3396
3396
|
/**
|
|
3397
3397
|
* @license
|
|
3398
3398
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -3407,12 +3407,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3407
3407
|
* @license
|
|
3408
3408
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3409
3409
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3410
|
-
*/const Qu=[];class Zu{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return
|
|
3410
|
+
*/const Qu=[];class Zu{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return Vc(t,e)?Yc(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Hc).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.");Qu.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Qu.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Qu).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()}}
|
|
3411
3411
|
/**
|
|
3412
3412
|
* @license
|
|
3413
3413
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3414
3414
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3415
|
-
*/const tp=t=>class extends(ru(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Ju(this),this.__focusTrapController=new Zu(this),this.__focusRestorationController=new Xu}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=!
|
|
3415
|
+
*/const tp=t=>class extends(ru(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Ju(this),this.__focusTrapController=new Zu(this),this.__focusRestorationController=new Xu}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=!Uc();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=Lc();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}}
|
|
3416
3416
|
/**
|
|
3417
3417
|
* @license
|
|
3418
3418
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -3437,7 +3437,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3437
3437
|
* @license
|
|
3438
3438
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
3439
3439
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3440
|
-
*/,hp=t=>class extends(lp(rp(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!
|
|
3440
|
+
*/,hp=t=>class extends(lp(rp(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!Gc(t.composedPath()[0])&&t.preventDefault()}}
|
|
3441
3441
|
/**
|
|
3442
3442
|
* @license
|
|
3443
3443
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3448,7 +3448,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3448
3448
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3449
3449
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3450
3450
|
*/
|
|
3451
|
-
sl("vaadin-date-picker-overlay",[Du,
|
|
3451
|
+
sl("vaadin-date-picker-overlay",[Du,Gn`
|
|
3452
3452
|
[part='overlay'] {
|
|
3453
3453
|
display: flex;
|
|
3454
3454
|
flex: auto;
|
|
@@ -3463,7 +3463,7 @@ sl("vaadin-date-picker-overlay",[Du,Vn`
|
|
|
3463
3463
|
outline: 3px solid;
|
|
3464
3464
|
}
|
|
3465
3465
|
}
|
|
3466
|
-
`],{moduleId:"vaadin-date-picker-overlay-styles"});class dp extends(hp(
|
|
3466
|
+
`],{moduleId:"vaadin-date-picker-overlay-styles"});class dp extends(hp(Vd(ll(Cd)))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return _d`
|
|
3467
3467
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
3468
3468
|
<div part="overlay" id="overlay">
|
|
3469
3469
|
<div part="content" id="content">
|
|
@@ -3476,7 +3476,7 @@ sl("vaadin-date-picker-overlay",[Du,Vn`
|
|
|
3476
3476
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3477
3477
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3478
3478
|
*/
|
|
3479
|
-
const cp=
|
|
3479
|
+
const cp=Gn`
|
|
3480
3480
|
:host {
|
|
3481
3481
|
display: inline-block;
|
|
3482
3482
|
position: relative;
|
|
@@ -3578,7 +3578,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3578
3578
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3579
3579
|
Code distributed by Google as part of the polymer project is also
|
|
3580
3580
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3581
|
-
*/},Cp=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=kp()}while(t||e)},Sp=document.createElement("template");Sp.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller" tabindex="-1">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class Ep extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(Sp.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px")}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),Cp()}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=
|
|
3581
|
+
*/},Cp=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=kp()}while(t||e)},Sp=document.createElement("template");Sp.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller" tabindex="-1">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class Ep extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(Sp.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px")}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),Cp()}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=Ud.debounce(this._debouncerScrollFinish,zd.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],t)&&!this._isVisible(this._buffers[1],t)&&(this.position=this.position)}))}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=Ud.debounce(this._debouncerUpdateClones,zd.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach((e=>{for(let i=0;i<this.bufferSize;i++){const i=document.createElement("div");i.style.height=`${this.itemHeight}px`,i.instance={};const s=`vaadin-infinite-scroller-item-content-${ec()}`,r=document.createElement("slot");r.setAttribute("name",s),r._itemWrapper=i,e.appendChild(r),i.setAttribute("slot",s),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),requestAnimationFrame((()=>{this._finishInit()}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const r=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const o=i._itemWrapper;(!t||this._isVisible(o,e))&&this._updateElement(o.instance,r+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
|
|
3582
3582
|
/**
|
|
3583
3583
|
* @license
|
|
3584
3584
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3619,7 +3619,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3619
3619
|
Code distributed by Google as part of the polymer project is also
|
|
3620
3620
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3621
3621
|
*/
|
|
3622
|
-
function Dp(t,e,i,s,r){let o;r&&(o="object"==typeof i&&null!==i,o&&(s=t.__dataTemp[e]));let n=s!==i&&(s==s||i==i);return o&&n&&(t.__dataTemp[e]=i),n}On(Mp);const
|
|
3622
|
+
function Dp(t,e,i,s,r){let o;r&&(o="object"==typeof i&&null!==i,o&&(s=t.__dataTemp[e]));let n=s!==i&&(s==s||i==i);return o&&n&&(t.__dataTemp[e]=i),n}On(Mp);const Tp=Nl((t=>class extends t{_shouldPropertyChange(t,e,i){return Dp(this,t,e,i,!0)}})),zp=Nl((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return Dp(this,t,e,i,this.mutableData)}}));Tp._mutablePropertyChange=Dp;
|
|
3623
3623
|
/**
|
|
3624
3624
|
@license
|
|
3625
3625
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3629,7 +3629,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3629
3629
|
Code distributed by Google as part of the polymer project is also
|
|
3630
3630
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3631
3631
|
*/
|
|
3632
|
-
let Np=null;function Fp(){return Np}Fp.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Fp,writable:!0}});const Op=md(Fp),Lp=
|
|
3632
|
+
let Np=null;function Fp(){return Np}Fp.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Fp,writable:!0}});const Op=md(Fp),Lp=Tp(Op),Up=md(class{});class Bp extends Up{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,i(t)}));else{let s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let s=e[i];if(!!t!=!!s.__hideTemplateChildren__)if(s.nodeType===Node.TEXT_NODE)t?(s.__polymerTextContent__=s.textContent,s.textContent=""):s.textContent=s.__polymerTextContent__;else if("slot"===s.localName)if(t)s.__polymerReplaced__=document.createComment("hidden-slot"),Kl(Kl(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&Kl(Kl(t).parentNode).replaceChild(s,t)}else s.style&&(t?(s.__polymerDisplay__=s.style.display,s.style.display="none"):s.style.display=s.__polymerDisplay__);s.__hideTemplateChildren__=t,s._showHideChildren&&s._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}const jp=Tp(Bp);function Yp(t){let e=t.__dataHost;return e&&e._methodHost||e}function Rp(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring(6),s[i])}}function Gp(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function Hp(t,e,i){if(_l&&!Yp(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(i=i||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let s=(e?e.constructor:Bp)._parseTemplate(t),r=s.templatizeInstanceClass;r||(r=function(t,e,i){let s=i.mutableData?jp:Bp;Hp.mixin&&(s=Hp.mixin(s));let r=class extends s{};return r.prototype.__templatizeOptions=i,r.prototype._bindTemplate(t),function(t,e,i,s){let r=i.hostProps||{};for(let e in s.instanceProps){delete r[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Gp(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in r)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(r,t,e,i),r}(t,s,i),s.templatizeInstanceClass=r);const o=Yp(t);!function(t,e,i,s){let r=i.forwardHostProp;if(r&&e.hasHostProps){const o="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(o){let t=i.mutableData?Lp:Op;class s extends t{}n=e.templatizeTemplateClass=s}else{const i=t.constructor;class s extends i{}n=e.templatizeTemplateClass=s}let a=e.hostProps;for(let t in a)n.prototype._addPropertyEffect("_host_"+t,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Rp(0,r)}),n.prototype._createNotifyingProperty("_host_"+t);Sl&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:r}=t,{instanceProps:o}=e;for(let t in r)if(!(s[t]||o&&o[t])){const e=r[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!s.signature||!s.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,s)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),o)(function(t,e){Np=t,Object.setPrototypeOf(t,e.prototype),new e,Np=null})(t,n),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,n.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}}(t,s,i,o);let n=class extends r{};return n.prototype._methodHost=o,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=s.hostProps,n}
|
|
3633
3633
|
/**
|
|
3634
3634
|
@license
|
|
3635
3635
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3639,7 +3639,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3639
3639
|
Code distributed by Google as part of the polymer project is also
|
|
3640
3640
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3641
3641
|
*/
|
|
3642
|
-
let
|
|
3642
|
+
let Vp=!1;
|
|
3643
3643
|
/**
|
|
3644
3644
|
@license
|
|
3645
3645
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3649,7 +3649,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3649
3649
|
Code distributed by Google as part of the polymer project is also
|
|
3650
3650
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3651
3651
|
*/
|
|
3652
|
-
const $p=
|
|
3652
|
+
const $p=zp(Cd);class Wp extends $p{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!Dl,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(Cl&&!bl){if(!Vp){Vp=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=Kl(Kl(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=Hp(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,r=0;r<i.length&&(s=i[r]);r++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if(function(t,e){return t===e||Ql(t,e)||Zl(t,e)}(this.as,e)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let r=th(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(r,i)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=xp.debounce(this.__renderDebouncer,e>0?fh.after(e):gh,t.bind(this)),_p.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),Cp()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),i=this.__calculateLimit(e.length);this.__updateInstances(t,i,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),(!Dl||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let r;for(r=0;r<e;r++){let e=this.__instances[r],o=i[r],n=t[o];s[o]=r,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,r),e._setPendingProperty(this.itemsIndexAs,o),e._flushProperties()):this.__insertInstance(n,r,o)}for(let t=this.__instances.length-1;t>=r;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=Kl(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let r=this.__instances[e+1],o=r?r.children[0]:this;return Kl(Kl(this).parentNode).insertBefore(s.root,o),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),r=s<0?i:i.substring(0,s);if(r==parseInt(r,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let o=this.__instances[this.__itemsIdxToInstIdx[r]];return o&&(o._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),o._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=Kl(e).parentNode;return null}(this.template,t)}}customElements.define(Wp.is,Wp);
|
|
3653
3653
|
/**
|
|
3654
3654
|
* @license
|
|
3655
3655
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3671,7 +3671,7 @@ const qp=t=>class extends($c(t)){static get properties(){return{month:{type:Obje
|
|
|
3671
3671
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3672
3672
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3673
3673
|
*/
|
|
3674
|
-
sl("vaadin-month-calendar",
|
|
3674
|
+
sl("vaadin-month-calendar",Gn`
|
|
3675
3675
|
:host {
|
|
3676
3676
|
display: block;
|
|
3677
3677
|
}
|
|
@@ -3780,7 +3780,7 @@ class Jp{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
|
|
|
3780
3780
|
* @license
|
|
3781
3781
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3782
3782
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3783
|
-
*/const Xp=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){Ec(this.$.scrollers,"pan-y"),Cc(this.$.scrollers,"track",this._track.bind(this)),Cc(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Cc(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Cc(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Jp(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new ic(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Cc(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new ic(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Cc(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new ic(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new ic(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Cc(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,r){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,r))}__updateCalendars(t,e,i,s,r,o,n,a,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=o,t.selectedDate=r,t.showWeekNumbers=n,t.ignoreTaps=a,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,r=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,o=this._monthScroller.position+r-1<i;s?this._scrollToPosition(i,e):o&&this._scrollToPosition(i-r+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=Bd.debounce(this._debouncer,Td.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(fp(t)):i}_onTodayTap(){const t=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=(t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*e,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const r=this._monthScroller.position,o=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,r,this._targetPosition-r);this._monthScroller.position=t,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:r}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return wp(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){vp(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),e=!0);break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&vp(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return Fn(this,null,(function*(){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),yield this.focusDateElement(!1)}))}focusDateElement(t=!0){return Fn(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{Ou(this,(()=>{Cp(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(bp(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,s=this.isDateDisabled){return gp(t,e,i,s)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
|
|
3783
|
+
*/const Xp=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){Ec(this.$.scrollers,"pan-y"),Cc(this.$.scrollers,"track",this._track.bind(this)),Cc(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Cc(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Cc(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Jp(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new ic(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Cc(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new ic(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Cc(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new ic(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new ic(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Cc(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,r){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,r))}__updateCalendars(t,e,i,s,r,o,n,a,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=o,t.selectedDate=r,t.showWeekNumbers=n,t.ignoreTaps=a,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,r=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,o=this._monthScroller.position+r-1<i;s?this._scrollToPosition(i,e):o&&this._scrollToPosition(i-r+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=Ud.debounce(this._debouncer,zd.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(fp(t)):i}_onTodayTap(){const t=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=(t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*e,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const r=this._monthScroller.position,o=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,r,this._targetPosition-r);this._monthScroller.position=t,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:r}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return wp(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){vp(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),e=!0);break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&vp(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return Fn(this,null,(function*(){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),yield this.focusDateElement(!1)}))}focusDateElement(t=!0){return Fn(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{Ou(this,(()=>{Cp(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(bp(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,s=this.isDateDisabled){return gp(t,e,i,s)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
|
|
3784
3784
|
/**
|
|
3785
3785
|
* @license
|
|
3786
3786
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3791,7 +3791,7 @@ class Jp{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
|
|
|
3791
3791
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3792
3792
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3793
3793
|
*/
|
|
3794
|
-
sl("vaadin-date-picker-overlay-content",
|
|
3794
|
+
sl("vaadin-date-picker-overlay-content",Gn`
|
|
3795
3795
|
:host {
|
|
3796
3796
|
display: flex;
|
|
3797
3797
|
flex-direction: column;
|
|
@@ -3851,7 +3851,7 @@ sl("vaadin-date-picker-overlay-content",Vn`
|
|
|
3851
3851
|
z-index: 2;
|
|
3852
3852
|
flex-shrink: 0;
|
|
3853
3853
|
}
|
|
3854
|
-
`,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Qp extends(Xp(ru(ll(
|
|
3854
|
+
`,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Qp extends(Xp(ru(ll(Vd(Cd))))){static get template(){return _d`
|
|
3855
3855
|
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
3856
3856
|
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
3857
3857
|
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
@@ -3882,12 +3882,12 @@ const Zp=new WeakMap,tm=Nl((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3882
3882
|
* @license
|
|
3883
3883
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3884
3884
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3885
|
-
*/,im=Nl((t=>class extends(Kc(pu(Jc(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||0===t}})),sm=t=>class extends(tm(qc(im(mu(em(Nc(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=
|
|
3885
|
+
*/,im=Nl((t=>class extends(Kc(pu(Jc(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||0===t}})),sm=t=>class extends(tm(qc(im(mu(em(Nc(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=Ud.debounce(this._preventInputDebouncer,zd.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
|
|
3886
3886
|
/**
|
|
3887
3887
|
* @license
|
|
3888
3888
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3889
3889
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3890
|
-
*/,rm=
|
|
3890
|
+
*/,rm=Gn`
|
|
3891
3891
|
:host {
|
|
3892
3892
|
display: inline-flex;
|
|
3893
3893
|
outline: none;
|
|
@@ -3926,7 +3926,7 @@ const Zp=new WeakMap,tm=Nl((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3926
3926
|
* @license
|
|
3927
3927
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3928
3928
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3929
|
-
*/,om=
|
|
3929
|
+
*/,om=Gn`
|
|
3930
3930
|
[class$='container'] {
|
|
3931
3931
|
display: flex;
|
|
3932
3932
|
flex-direction: column;
|
|
@@ -3939,7 +3939,7 @@ const Zp=new WeakMap,tm=Nl((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3939
3939
|
* @license
|
|
3940
3940
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3941
3941
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3942
|
-
*/,nm=[rm,om,
|
|
3942
|
+
*/,nm=[rm,om,Gn`
|
|
3943
3943
|
[part='clear-button'] {
|
|
3944
3944
|
display: none;
|
|
3945
3945
|
cursor: default;
|
|
@@ -3967,7 +3967,7 @@ const Zp=new WeakMap,tm=Nl((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3967
3967
|
* @license
|
|
3968
3968
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3969
3969
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3970
|
-
*/const hm=t=>class extends(am(ru(qc(im(Nc(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,r=i.getMonth(),o=i.getFullYear();if(3===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1]),o=parseInt(e[2]),e[2].length<3&&o>=0&&(o=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let r=e+100*Math.floor(t.getFullYear()/100);return t<new Date(r-50,i,s)?r-=100:t>new Date(r+50,i,s)&&(r+=100),r}(this.referenceDate?yp(this.referenceDate):new Date,o,r,s))):2===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:r,year:o}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:ju},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!Bc()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Jp(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new lm(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=yp(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(fp(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||gp(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,r,o){return!t||e&&(!o||r)||i&&r||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",r=t.year;return r<0?(r=-r,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(r,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0===t||void 0===e||(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0===t||void 0===e||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(t)}_valueChanged(t,e){const i=yp(t);!t||i?(t?vp(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,r,o,n,a,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=r,t.focusedDate=o,t.selectedDate=n,t.showWeekNumbers=a,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Ku(this._noInput?t:[s,t])}_getInitialPosition(){const t=yp(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||gp(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?bp(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,vp(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return yp(t)}}
|
|
3970
|
+
*/const hm=t=>class extends(am(ru(qc(im(Nc(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,r=i.getMonth(),o=i.getFullYear();if(3===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1]),o=parseInt(e[2]),e[2].length<3&&o>=0&&(o=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let r=e+100*Math.floor(t.getFullYear()/100);return t<new Date(r-50,i,s)?r-=100:t>new Date(r+50,i,s)&&(r+=100),r}(this.referenceDate?yp(this.referenceDate):new Date,o,r,s))):2===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:r,year:o}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:ju},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!Uc()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Jp(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new lm(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=yp(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(fp(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||gp(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,r,o){return!t||e&&(!o||r)||i&&r||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",r=t.year;return r<0?(r=-r,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(r,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0===t||void 0===e||(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0===t||void 0===e||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(t)}_valueChanged(t,e){const i=yp(t);!t||i?(t?vp(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,r,o,n,a,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=r,t.focusedDate=o,t.selectedDate=n,t.showWeekNumbers=a,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Ku(this._noInput?t:[s,t])}_getInitialPosition(){const t=yp(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||gp(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?bp(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,vp(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return yp(t)}}
|
|
3971
3971
|
/**
|
|
3972
3972
|
* @license
|
|
3973
3973
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3978,7 +3978,7 @@ const Zp=new WeakMap,tm=Nl((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3978
3978
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3979
3979
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3980
3980
|
*/
|
|
3981
|
-
sl("vaadin-date-picker",[nm,
|
|
3981
|
+
sl("vaadin-date-picker",[nm,Gn`
|
|
3982
3982
|
:host([opened]) {
|
|
3983
3983
|
pointer-events: auto;
|
|
3984
3984
|
}
|
|
@@ -4084,7 +4084,7 @@ const cm=t=>class extends(sm(t)){static get properties(){return{autocomplete:{ty
|
|
|
4084
4084
|
</div>
|
|
4085
4085
|
</div>
|
|
4086
4086
|
<slot name="tooltip"></slot>
|
|
4087
|
-
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new sc(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}On(pm),sl("vaadin-password-field-button",[Eu,
|
|
4087
|
+
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new sc(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}On(pm),sl("vaadin-password-field-button",[Eu,Gn`
|
|
4088
4088
|
:host {
|
|
4089
4089
|
position: absolute;
|
|
4090
4090
|
right: 0;
|
|
@@ -4097,7 +4097,7 @@ const cm=t=>class extends(sm(t)){static get properties(){return{autocomplete:{ty
|
|
|
4097
4097
|
background: transparent;
|
|
4098
4098
|
outline: none;
|
|
4099
4099
|
}
|
|
4100
|
-
`],{moduleId:"lumo-password-field-button"}),sl("vaadin-password-field",[Au,
|
|
4100
|
+
`],{moduleId:"lumo-password-field-button"}),sl("vaadin-password-field",[Au,Gn`
|
|
4101
4101
|
[part='reveal-button']::before {
|
|
4102
4102
|
content: var(--lumo-icons-eye);
|
|
4103
4103
|
}
|
|
@@ -4121,13 +4121,13 @@ const cm=t=>class extends(sm(t)){static get properties(){return{autocomplete:{ty
|
|
|
4121
4121
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4122
4122
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4123
4123
|
*/
|
|
4124
|
-
sl("vaadin-password-field-button",cp,{moduleId:"vaadin-password-field-button-styles"});class mm extends(up(
|
|
4124
|
+
sl("vaadin-password-field-button",cp,{moduleId:"vaadin-password-field-button-styles"});class mm extends(up(Vd(ll(Cd)))){static get is(){return"vaadin-password-field-button"}static get template(){return _d``}}On(mm);
|
|
4125
4125
|
/**
|
|
4126
4126
|
* @license
|
|
4127
4127
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4128
4128
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4129
4129
|
*/
|
|
4130
|
-
const vm=t=>class extends(tm(
|
|
4130
|
+
const vm=t=>class extends(tm(zc($c(Jc(t))))){static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new ic(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t&&t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}}
|
|
4131
4131
|
/**
|
|
4132
4132
|
* @license
|
|
4133
4133
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -4136,7 +4136,7 @@ const vm=t=>class extends(tm(Tc($c(Jc(t))))){static get properties(){return{reve
|
|
|
4136
4136
|
<div part="reveal-button" slot="suffix">
|
|
4137
4137
|
<slot name="reveal"></slot>
|
|
4138
4138
|
</div>
|
|
4139
|
-
`;let gm;class bm extends(vm(pm)){static get is(){return"vaadin-password-field"}static get template(){if(!gm){gm=super.template.cloneNode(!0);const t=fm.content.querySelector('[part="reveal-button"]');gm.content.querySelector('[part="input-field"]').appendChild(t)}return gm}}On(bm);const wm=
|
|
4139
|
+
`;let gm;class bm extends(vm(pm)){static get is(){return"vaadin-password-field"}static get template(){if(!gm){gm=super.template.cloneNode(!0);const t=fm.content.querySelector('[part="reveal-button"]');gm.content.querySelector('[part="input-field"]').appendChild(t)}return gm}}On(bm);const wm=Gn`
|
|
4140
4140
|
:host {
|
|
4141
4141
|
display: flex;
|
|
4142
4142
|
align-items: center;
|
|
@@ -4220,7 +4220,7 @@ const vm=t=>class extends(tm(Tc($c(Jc(t))))){static get properties(){return{reve
|
|
|
4220
4220
|
width: var(--lumo-icon-size-m);
|
|
4221
4221
|
height: var(--lumo-icon-size-m);
|
|
4222
4222
|
}
|
|
4223
|
-
`;sl("vaadin-item",wm,{moduleId:"lumo-item"});const ym=
|
|
4223
|
+
`;sl("vaadin-item",wm,{moduleId:"lumo-item"});const ym=Gn`
|
|
4224
4224
|
:host {
|
|
4225
4225
|
transition: background-color 100ms;
|
|
4226
4226
|
overflow: hidden;
|
|
@@ -4238,7 +4238,7 @@ const vm=t=>class extends(tm(Tc($c(Jc(t))))){static get properties(){return{reve
|
|
|
4238
4238
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
4239
4239
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4240
4240
|
*/
|
|
4241
|
-
const xm=
|
|
4241
|
+
const xm=Gn`
|
|
4242
4242
|
[part~='loader'] {
|
|
4243
4243
|
box-sizing: border-box;
|
|
4244
4244
|
width: var(--lumo-icon-size-s);
|
|
@@ -4280,7 +4280,7 @@ const xm=Vn`
|
|
|
4280
4280
|
transform: rotate(360deg);
|
|
4281
4281
|
}
|
|
4282
4282
|
}
|
|
4283
|
-
`,_m=
|
|
4283
|
+
`,_m=Gn`
|
|
4284
4284
|
[part='content'] {
|
|
4285
4285
|
padding: 0;
|
|
4286
4286
|
}
|
|
@@ -4301,7 +4301,7 @@ const xm=Vn`
|
|
|
4301
4301
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
4302
4302
|
margin-bottom: var(--lumo-space-xs);
|
|
4303
4303
|
}
|
|
4304
|
-
`,km=
|
|
4304
|
+
`,km=Gn`
|
|
4305
4305
|
[part~='loader'] {
|
|
4306
4306
|
position: absolute;
|
|
4307
4307
|
z-index: 1;
|
|
@@ -4309,12 +4309,12 @@ const xm=Vn`
|
|
|
4309
4309
|
top: var(--lumo-space-s);
|
|
4310
4310
|
margin-inline: auto 0;
|
|
4311
4311
|
}
|
|
4312
|
-
`;sl("vaadin-combo-box-overlay",[ku,Cu,_m,xm,km,
|
|
4312
|
+
`;sl("vaadin-combo-box-overlay",[ku,Cu,_m,xm,km,Gn`
|
|
4313
4313
|
:host {
|
|
4314
4314
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
4315
4315
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
4316
4316
|
}
|
|
4317
|
-
`],{moduleId:"lumo-combo-box-overlay"}),sl("vaadin-combo-box",[Au,
|
|
4317
|
+
`],{moduleId:"lumo-combo-box-overlay"}),sl("vaadin-combo-box",[Au,Gn`
|
|
4318
4318
|
[part='toggle-button']::before {
|
|
4319
4319
|
content: var(--lumo-icons-dropdown);
|
|
4320
4320
|
}
|
|
@@ -4329,7 +4329,7 @@ const Cm=t=>class extends t{static get properties(){return{index:{type:Number},i
|
|
|
4329
4329
|
* @license
|
|
4330
4330
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4331
4331
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4332
|
-
*/;class Sm extends(Cm(ll(
|
|
4332
|
+
*/;class Sm extends(Cm(ll(Vd(Cd)))){static get template(){return _d`
|
|
4333
4333
|
<style>
|
|
4334
4334
|
:host {
|
|
4335
4335
|
display: block;
|
|
@@ -4349,12 +4349,12 @@ const Cm=t=>class extends t{static get properties(){return{index:{type:Number},i
|
|
|
4349
4349
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4350
4350
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4351
4351
|
*/
|
|
4352
|
-
const Em=t=>class extends(lp(t)){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const t=this._comboBox,e=t&&t.getAttribute("dir");e&&this.setAttribute("dir",e)}_shouldCloseOnOutsideClick(t){const e=t.composedPath();return!e.includes(this.positionTarget)&&!e.includes(this)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!
|
|
4352
|
+
const Em=t=>class extends(lp(t)){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const t=this._comboBox,e=t&&t.getAttribute("dir");e&&this.setAttribute("dir",e)}_shouldCloseOnOutsideClick(t){const e=t.composedPath();return!e.includes(this.positionTarget)&&!e.includes(this)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!Gc(t.composedPath()[0])&&t.preventDefault()}_updateOverlayWidth(){const t=this.localName;this.style.setProperty(`--_${t}-default-width`,`${this.positionTarget.clientWidth}px`);const e=getComputedStyle(this._comboBox).getPropertyValue(`--${t}-width`);""===e?this.style.removeProperty(`--${t}-width`):this.style.setProperty(`--${t}-width`,e)}_setOverlayWidth(t,e){t&&e&&(this._updateOverlayWidth(),this._updatePosition())}}
|
|
4353
4353
|
/**
|
|
4354
4354
|
* @license
|
|
4355
4355
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4356
4356
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4357
|
-
*/;sl("vaadin-combo-box-overlay",[Du,
|
|
4357
|
+
*/;sl("vaadin-combo-box-overlay",[Du,Gn`
|
|
4358
4358
|
#overlay {
|
|
4359
4359
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
4360
4360
|
}
|
|
@@ -4364,7 +4364,7 @@ const Em=t=>class extends(lp(t)){static get observers(){return["_setOverlayWidth
|
|
|
4364
4364
|
flex-direction: column;
|
|
4365
4365
|
height: 100%;
|
|
4366
4366
|
}
|
|
4367
|
-
`],{moduleId:"vaadin-combo-box-overlay-styles"});class Pm extends(Em(rp(
|
|
4367
|
+
`],{moduleId:"vaadin-combo-box-overlay-styles"});class Pm extends(Em(rp(Vd(ll(Cd))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return _d`
|
|
4368
4368
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
4369
4369
|
<div part="overlay" id="overlay">
|
|
4370
4370
|
<div part="loader"></div>
|
|
@@ -4385,12 +4385,12 @@ function Am(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
|
4385
4385
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4386
4386
|
* Code distributed by Google as part of the polymer project is also
|
|
4387
4387
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4388
|
-
*/On(Pm);const Im=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),Mm=Im&&Im[1]>=8,Dm={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return!(!this.offsetWidth&&!this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,s)=>{e<this._scrollBottom&&(t=s),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),Od)}},_getReusables(t){let e,i,s;const r=[],o=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const d=this._scrollPosition,c=this._scrollBottom;for(t?(e=this._physicalStart,i=d-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-c);s=this._getPhysicalSizeIncrement(e),i-=s,!(r.length>=l||i<=o);)if(t){if(a+r.length+1>=this._virtualCount||h+s>=d-this._scrollOffset)break;r.push(e),h+=s,e=(e+1)%l}else{if(n-r.length<=0||h+this._physicalSize-s<=c)break;r.push(e),h-=s,e=0===e?l-1:e-1}return{indexes:r,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),Fd):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Od))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Nd))},_iterateItems(t,e){let i,s,r,o;if(2===arguments.length&&e){for(o=0;o<e.length;o++)if(i=e[o],s=this._computeVidx(i),null!=(r=t.call(this,i,s)))return r}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(r=t.call(this,i,s)))return r;for(i=0;i<this._physicalStart;i++,s++)if(null!=(r=t.call(this,i,s)))return r}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!Mm&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1||(Yd(),0===this._physicalCount))return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,s=0;const r=this._hiddenContentSize;for(;i<t&&s<=r;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),Nd)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=
|
|
4388
|
+
*/On(Pm);const Im=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),Mm=Im&&Im[1]>=8,Dm={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return!(!this.offsetWidth&&!this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,s)=>{e<this._scrollBottom&&(t=s),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),Od)}},_getReusables(t){let e,i,s;const r=[],o=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const d=this._scrollPosition,c=this._scrollBottom;for(t?(e=this._physicalStart,i=d-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-c);s=this._getPhysicalSizeIncrement(e),i-=s,!(r.length>=l||i<=o);)if(t){if(a+r.length+1>=this._virtualCount||h+s>=d-this._scrollOffset)break;r.push(e),h+=s,e=(e+1)%l}else{if(n-r.length<=0||h+this._physicalSize-s<=c)break;r.push(e),h-=s,e=0===e?l-1:e-1}return{indexes:r,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),Fd):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Od))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Nd))},_iterateItems(t,e){let i,s,r,o;if(2===arguments.length&&e){for(o=0;o<e.length;o++)if(i=e[o],s=this._computeVidx(i),null!=(r=t.call(this,i,s)))return r}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(r=t.call(this,i,s)))return r;for(i=0;i<this._physicalStart;i++,s++)if(null!=(r=t.call(this,i,s)))return r}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!Mm&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1||(Yd(),0===this._physicalCount))return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,s=0;const r=this._hiddenContentSize;for(;i<t&&s<=r;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),Nd)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=Ud.debounce(this._debouncers[t],i,e.bind(this)),Bd(this._debouncers[t])}},Tm=1e3;
|
|
4389
4389
|
/**
|
|
4390
4390
|
* @license
|
|
4391
4391
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4392
4392
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4393
|
-
*/class Tm{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:r,reorderElements:o}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=r||s,this.reorderElements=o,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),new ResizeObserver((([{contentRect:t}])=>{const e=0===t.width&&0===t.height;!e&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=e})).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.scrollTarget.addEventListener("virtualizer-element-focused",(t=>this.__onElementFocused(t))),this.elementsContainer.addEventListener("focusin",(()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))})),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<zm?(i=t,this._vidxOffset=0):(i=zm,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),Yd(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(t){Yd();let e=0,i=0;const s=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((r*s+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=Bd.debounce(this.__placeholderClearDebouncer,Nd,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0!==this.__pendingScrollToIndex&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;let e,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),Yd(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const s=this.__getIndexScrollOffset(e);void 0!==i&&void 0!==s&&(this._scrollTop+=i-s)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),Yd(),this._debounce("_update",this._update,Od)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL="rtl"===t.direction,this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const s=this._physicalItems[t];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return 0===e.indexOf(t)&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,s)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=Bd.debounce(this.__fixInvalidItemPositioningDebouncer,Td.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=Bd.debounce(this.__scrollReorderDebouncer,Td.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalBottom<this._scrollBottom;if(this._physicalTop>this._scrollTop&&0!==this.adjustedFirstVisibleIndex||t&&this.adjustedLastVisibleIndex!==this.size-1){const e=t,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(e?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=Bd.debounce(this.__debouncerWheelAnimationFrame,Nd,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=Bd.debounce(this._debouncerIgnoreNewWheel,Td.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,e)))}else super._increasePoolIfNeeded(t)}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const s=i.__virtualIndex-t,r=e.indexOf(i)-s;if(r>0)for(let t=0;t<r;t++)this.elementsContainer.appendChild(e[t]);else if(r<0)for(let t=e.length+r;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(Yu){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4)this._vidxOffset=Math.round(this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight)*e);else{const t=this._vidxOffset,i=zm,s=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<i&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-i&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(Tm.prototype,Dm);class Nm{constructor(t){this.__adapter=new Tm(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}
|
|
4393
|
+
*/class zm{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:r,reorderElements:o}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=r||s,this.reorderElements=o,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),new ResizeObserver((([{contentRect:t}])=>{const e=0===t.width&&0===t.height;!e&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=e})).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.scrollTarget.addEventListener("virtualizer-element-focused",(t=>this.__onElementFocused(t))),this.elementsContainer.addEventListener("focusin",(()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))})),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<Tm?(i=t,this._vidxOffset=0):(i=Tm,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),Yd(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(t){Yd();let e=0,i=0;const s=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((r*s+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=Ud.debounce(this.__placeholderClearDebouncer,Nd,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0!==this.__pendingScrollToIndex&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;let e,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),Yd(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const s=this.__getIndexScrollOffset(e);void 0!==i&&void 0!==s&&(this._scrollTop+=i-s)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),Yd(),this._debounce("_update",this._update,Od)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL="rtl"===t.direction,this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const s=this._physicalItems[t];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return 0===e.indexOf(t)&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,s)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=Ud.debounce(this.__fixInvalidItemPositioningDebouncer,zd.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=Ud.debounce(this.__scrollReorderDebouncer,zd.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalBottom<this._scrollBottom;if(this._physicalTop>this._scrollTop&&0!==this.adjustedFirstVisibleIndex||t&&this.adjustedLastVisibleIndex!==this.size-1){const e=t,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(e?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=Ud.debounce(this.__debouncerWheelAnimationFrame,Nd,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=Ud.debounce(this._debouncerIgnoreNewWheel,zd.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,e)))}else super._increasePoolIfNeeded(t)}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const s=i.__virtualIndex-t,r=e.indexOf(i)-s;if(r>0)for(let t=0;t<r;t++)this.elementsContainer.appendChild(e[t]);else if(r<0)for(let t=e.length+r;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(Yu){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4)this._vidxOffset=Math.round(this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight)*e);else{const t=this._vidxOffset,i=Tm,s=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<i&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-i&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(zm.prototype,Dm);class Nm{constructor(t){this.__adapter=new zm(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}
|
|
4394
4394
|
/**
|
|
4395
4395
|
* @license
|
|
4396
4396
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
@@ -4438,42 +4438,42 @@ function Am(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
|
4438
4438
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4439
4439
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4440
4440
|
*/
|
|
4441
|
-
const
|
|
4441
|
+
const Um=t=>class extends(im(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}}
|
|
4442
4442
|
/**
|
|
4443
4443
|
* @license
|
|
4444
4444
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4445
4445
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4446
|
-
*/;function
|
|
4446
|
+
*/;function Bm(t,e,i=0){let s=e;for(const e of t.subCaches){const t=e.parentCacheIndex;if(s<=t)break;if(s<=t+e.flatSize)return Bm(e,s-t-1,i+1);s-=e.flatSize}return{cache:t,item:t.items[s],index:s,page:Math.floor(s/t.pageSize),level:i}}function jm({getItemId:t},e,i,s=0,r=0){for(let o=0;o<e.items.length;o++){const n=e.items[o];if(n&&t(n)===t(i))return{cache:e,level:s,item:n,index:o,page:Math.floor(o/e.pageSize),subCache:e.getSubCache(o),flatIndex:r+e.getFlatIndex(o)}}for(const o of e.subCaches){const n=jm({getItemId:t},o,i,s+1,r+e.getFlatIndex(o.parentCacheIndex)+1);if(n)return n}}function Ym(t,[e,...i],s=0){e===1/0&&(e=t.size-1);const r=t.getFlatIndex(e),o=t.getSubCache(e);return o&&o.flatSize>0&&i.length?Ym(o,i,s+r+1):s+r}
|
|
4447
4447
|
/**
|
|
4448
4448
|
* @license
|
|
4449
4449
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4450
4450
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4451
|
-
*/class Rm{constructor(t,e,i,s,r){Nn(this,"context"),Nn(this,"pageSize"),Nn(this,"items",[]),Nn(this,"pendingRequests",{}),Nn(this,"__subCacheByIndex",{}),Nn(this,"__size",0),Nn(this,"__flatSize",0),this.context=t,this.pageSize=e,this.size=i,this.parentCache=s,this.parentCacheIndex=r,this.__flatSize=i||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0||this.subCaches.some((t=>t.isLoading))}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var e;if(this.__size!==t){if(this.__size=t,void 0!==this.context.placeholder){this.items.length=t||0;for(let i=0;i<t;i++)(e=this.items)[i]||(e[i]=this.context.placeholder)}Object.keys(this.pendingRequests).forEach((t=>{parseInt(t)*this.pageSize>=this.size&&delete this.pendingRequests[t]}))}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce(((t,e)=>(e.recalculateFlatSize(),t+e.flatSize)),0):0}setPage(t,e){const i=t*this.pageSize;e.forEach(((t,e)=>{const s=i+e;(void 0===this.size||s<this.size)&&(this.items[s]=t)}))}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(t){const e=new Rm(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce(((t,i)=>e>i.parentCacheIndex?t+i.flatSize:t),e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=
|
|
4451
|
+
*/class Rm{constructor(t,e,i,s,r){Nn(this,"context"),Nn(this,"pageSize"),Nn(this,"items",[]),Nn(this,"pendingRequests",{}),Nn(this,"__subCacheByIndex",{}),Nn(this,"__size",0),Nn(this,"__flatSize",0),this.context=t,this.pageSize=e,this.size=i,this.parentCache=s,this.parentCacheIndex=r,this.__flatSize=i||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0||this.subCaches.some((t=>t.isLoading))}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var e;if(this.__size!==t){if(this.__size=t,void 0!==this.context.placeholder){this.items.length=t||0;for(let i=0;i<t;i++)(e=this.items)[i]||(e[i]=this.context.placeholder)}Object.keys(this.pendingRequests).forEach((t=>{parseInt(t)*this.pageSize>=this.size&&delete this.pendingRequests[t]}))}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce(((t,e)=>(e.recalculateFlatSize(),t+e.flatSize)),0):0}setPage(t,e){const i=t*this.pageSize;e.forEach(((t,e)=>{const s=i+e;(void 0===this.size||s<this.size)&&(this.items[s]=t)}))}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(t){const e=new Rm(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce(((t,i)=>e>i.parentCacheIndex?t+i.flatSize:t),e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=Bm(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=Bm(this,t);return{cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize()}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0)}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex
|
|
4452
4452
|
/**
|
|
4453
4453
|
* @license
|
|
4454
4454
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4455
4455
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4456
|
-
*/}}class
|
|
4456
|
+
*/}}class Gm extends EventTarget{constructor(t,{size:e,pageSize:i,isExpanded:s,getItemId:r,isPlaceholder:o,placeholder:n,dataProvider:a,dataProviderParams:l}){super(),Nn(this,"host"),Nn(this,"dataProvider"),Nn(this,"dataProviderParams"),Nn(this,"pageSize"),Nn(this,"isExpanded"),Nn(this,"getItemId"),Nn(this,"rootCache"),Nn(this,"placeholder"),Nn(this,"isPlaceholder"),this.host=t,this.pageSize=i,this.getItemId=r,this.isExpanded=s,this.placeholder=n,this.isPlaceholder=o,this.dataProvider=a,this.dataProviderParams=l,this.rootCache=this.__createRootCache(e)}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return{isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(t){this.pageSize=t,this.clearCache()}setDataProvider(t){this.dataProvider=t,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size)}getFlatIndexContext(t){return Bm(this.rootCache,t)}getItemContext(t){return jm({getItemId:this.getItemId},this.rootCache,t)}getFlatIndexByPath(t){return Ym(this.rootCache,t)}ensureFlatIndexLoaded(t){const{cache:e,page:i,item:s}=this.getFlatIndexContext(t);this.__isItemLoaded(s)||this.__loadCachePage(e,i)}ensureFlatIndexHierarchy(t){const{cache:e,item:i,index:s}=this.getFlatIndexContext(t);if(this.__isItemLoaded(i)&&this.isExpanded(i)&&!e.getSubCache(s)){const t=e.createSubCache(s);this.__loadCachePage(t,0)}}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(t){return new Rm(this.__cacheContext,this.pageSize,t)}__loadCachePage(t,e){if(!this.dataProvider||t.pendingRequests[e])return;let i={page:e,pageSize:this.pageSize,parentItem:t.parentItem};this.dataProviderParams&&(i=Tn(Tn({},i),this.dataProviderParams()));const s=(r,o)=>{t.pendingRequests[e]===s&&(void 0!==o?t.size=o:i.parentItem&&(t.size=r.length),t.setPage(e,r),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete t.pendingRequests[e],this.dispatchEvent(new CustomEvent("page-loaded")))};t.pendingRequests[e]=s,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(i,s)}__isItemLoaded(t){return this.isPlaceholder?!this.isPlaceholder(t):this.placeholder?t!==this.placeholder:!!t}}
|
|
4457
4457
|
/**
|
|
4458
4458
|
* @license
|
|
4459
4459
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4460
4460
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4461
|
-
*/const Hm=t=>class extends t{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new
|
|
4461
|
+
*/const Hm=t=>class extends t{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new Gm(this,{placeholder:new Fm,isPlaceholder:t=>t instanceof Fm,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",(t=>{if(!this._shouldFetchData())return;const e=t.detail.index;void 0!==e&&this.__dataProviderController.ensureFlatIndexLoaded(e)})),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(t){void 0!==this.__previousDataProviderFilter||""!==t?this.__previousDataProviderFilter!==t&&(this.__previousDataProviderFilter=t,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1):this.__previousDataProviderFilter=t}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(t){!this._shouldFetchData()||!t||(this._forceNextRequest||void 0===this.size?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){const{rootCache:t}=this.__dataProviderController;t.items=[...t.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(t){const{rootCache:e}=this.__dataProviderController;e.size!==t&&(e.size=t,e.items=[...e.items],this.__synchronizeControllerState())}_filteredItemsChanged(t){if(super._filteredItemsChanged(t),this.dataProvider&&t){const{rootCache:e}=this.__dataProviderController;e.items!==t&&(e.items=t,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:t}=this.__dataProviderController;this.size=t.size,this.filteredItems=t.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(t,e){if(Math.floor(t)!==t||t<1)throw this.pageSize=e,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(t),this.clearCache()}_dataProviderChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.dataProvider=e})),this.__dataProviderController.setDataProvider(t),this.clearCache()}_ensureItemsOrDataProvider(t){if(void 0!==this.items&&void 0!==this.dataProvider)throw t(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(t,e){if(t&&""!==e&&null==this.selectedItem){const t=this.__getItemIndexByValue(this.filteredItems,e);(t<0||!this._getItemLabel(this.filteredItems[t]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}}
|
|
4462
4462
|
/**
|
|
4463
4463
|
* @license
|
|
4464
4464
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4465
4465
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4466
|
-
*/;function
|
|
4466
|
+
*/;function Vm(t){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}
|
|
4467
4467
|
/**
|
|
4468
4468
|
* @license
|
|
4469
4469
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4470
4470
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4471
|
-
*/function $m(t){return null!=t}function Wm(t,e){return t.findIndex((t=>!(t instanceof Fm)&&e(t)))}const qm=t=>class extends(am(ru(pu($c(Nc(Jc(Tc(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),Gm(this),this.addController(new lm(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,s,r,o,n,a,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:r,itemIdPath:o,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,s){this._overlayOpened=t&&(s||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&Hc(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?!this._isInputFocused()&&!Ru&&this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?Am(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Am(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{Ru&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,!this.opened&&!this._isClearButton(t)&&!this.autoOpenDisabled&&(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||($m(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){return t&&t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)))}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const r=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=r>-1?r:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&$m(e)?Wm(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Wm(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),!(t.detail.item instanceof Fm)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(Bc())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){!this.clearElement||t.composedPath()[0]!==this.clearElement||(t.preventDefault(),this._onClearAction())}}
|
|
4471
|
+
*/function $m(t){return null!=t}function Wm(t,e){return t.findIndex((t=>!(t instanceof Fm)&&e(t)))}const qm=t=>class extends(am(ru(pu($c(Nc(Jc(zc(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),Vm(this),this.addController(new lm(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,s,r,o,n,a,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:r,itemIdPath:o,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,s){this._overlayOpened=t&&(s||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&Hc(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?!this._isInputFocused()&&!Ru&&this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?Am(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Am(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{Ru&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,!this.opened&&!this._isClearButton(t)&&!this.autoOpenDisabled&&(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||($m(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){return t&&t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)))}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const r=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=r>-1?r:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&$m(e)?Wm(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Wm(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),!(t.detail.item instanceof Fm)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(Uc())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){!this.clearElement||t.composedPath()[0]!==this.clearElement||(t.preventDefault(),this._onClearAction())}}
|
|
4472
4472
|
/**
|
|
4473
4473
|
* @license
|
|
4474
4474
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4475
4475
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4476
|
-
*/;sl("vaadin-combo-box",nm,{moduleId:"vaadin-combo-box-styles"});class Km extends(Hm(qm(
|
|
4476
|
+
*/;sl("vaadin-combo-box",nm,{moduleId:"vaadin-combo-box-styles"});class Km extends(Hm(qm(Um(sm(ll(qd(Cd))))))){static get is(){return"vaadin-combo-box"}static get template(){return _d`
|
|
4477
4477
|
<style>
|
|
4478
4478
|
:host([opened]) {
|
|
4479
4479
|
pointer-events: auto;
|
|
@@ -4518,7 +4518,7 @@ const Bm=t=>class extends(im(t)){static get properties(){return{pattern:{type:St
|
|
|
4518
4518
|
></vaadin-combo-box-overlay>
|
|
4519
4519
|
|
|
4520
4520
|
<slot name="tooltip"></slot>
|
|
4521
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new vu(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new fu(this.inputElement,this._labelController)),this._tooltipController=new sc(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}On(Km),sl("vaadin-multi-select-combo-box-chip",[Pu,
|
|
4521
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new vu(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new fu(this.inputElement,this._labelController)),this._tooltipController=new sc(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}On(Km),sl("vaadin-multi-select-combo-box-chip",[Pu,Gn`
|
|
4522
4522
|
:host {
|
|
4523
4523
|
font-size: var(--lumo-font-size-xxs);
|
|
4524
4524
|
line-height: 1;
|
|
@@ -4607,23 +4607,23 @@ const Bm=t=>class extends(im(t)){static get properties(){return{pattern:{type:St
|
|
|
4607
4607
|
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
4608
4608
|
pointer-events: none;
|
|
4609
4609
|
}
|
|
4610
|
-
`],{moduleId:"lumo-multi-select-combo-box-chip"}),sl("vaadin-multi-select-combo-box-item",[wm,ym,
|
|
4610
|
+
`],{moduleId:"lumo-multi-select-combo-box-chip"}),sl("vaadin-multi-select-combo-box-item",[wm,ym,Gn`
|
|
4611
4611
|
@media (any-hover: hover) {
|
|
4612
4612
|
:host(:hover[readonly]) {
|
|
4613
4613
|
background-color: transparent;
|
|
4614
4614
|
cursor: default;
|
|
4615
4615
|
}
|
|
4616
4616
|
}
|
|
4617
|
-
`],{moduleId:"lumo-multi-select-combo-box-item"}),sl("vaadin-multi-select-combo-box-overlay",[ku,Cu,_m,xm,km,
|
|
4617
|
+
`],{moduleId:"lumo-multi-select-combo-box-item"}),sl("vaadin-multi-select-combo-box-overlay",[ku,Cu,_m,xm,km,Gn`
|
|
4618
4618
|
:host {
|
|
4619
4619
|
--_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
4620
4620
|
--_vaadin-multi-select-combo-box-items-container-border-style: solid;
|
|
4621
4621
|
}
|
|
4622
|
-
`],{moduleId:"lumo-multi-select-combo-box-overlay"}),sl("vaadin-multi-select-combo-box-container",
|
|
4622
|
+
`],{moduleId:"lumo-multi-select-combo-box-overlay"}),sl("vaadin-multi-select-combo-box-container",Gn`
|
|
4623
4623
|
:host([auto-expand-vertically]) {
|
|
4624
4624
|
padding-block: var(--lumo-space-xs);
|
|
4625
4625
|
}
|
|
4626
|
-
`,{moduleId:"lumo-multi-select-combo-box-container"}),sl("vaadin-multi-select-combo-box",[Au,
|
|
4626
|
+
`,{moduleId:"lumo-multi-select-combo-box-container"}),sl("vaadin-multi-select-combo-box",[Au,Gn`
|
|
4627
4627
|
:host([has-value]) {
|
|
4628
4628
|
padding-inline-start: 0;
|
|
4629
4629
|
}
|
|
@@ -4717,7 +4717,7 @@ class Jm extends(ll(Cd)){static get is(){return"vaadin-multi-select-combo-box-ch
|
|
|
4717
4717
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4718
4718
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4719
4719
|
*/
|
|
4720
|
-
sl("vaadin-multi-select-combo-box-container",
|
|
4720
|
+
sl("vaadin-multi-select-combo-box-container",Gn`
|
|
4721
4721
|
#wrapper {
|
|
4722
4722
|
display: flex;
|
|
4723
4723
|
width: 100%;
|
|
@@ -4733,7 +4733,7 @@ sl("vaadin-multi-select-combo-box-container",Vn`
|
|
|
4733
4733
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4734
4734
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4735
4735
|
*/
|
|
4736
|
-
class Qm extends(Cm(ll(
|
|
4736
|
+
class Qm extends(Cm(ll(Vd(Cd)))){static get is(){return"vaadin-multi-select-combo-box-item"}static get template(){return _d`
|
|
4737
4737
|
<style>
|
|
4738
4738
|
:host {
|
|
4739
4739
|
display: block;
|
|
@@ -4747,7 +4747,7 @@ class Qm extends(Cm(ll(Gd(Cd)))){static get is(){return"vaadin-multi-select-comb
|
|
|
4747
4747
|
<div part="content">
|
|
4748
4748
|
<slot></slot>
|
|
4749
4749
|
</div>
|
|
4750
|
-
`}}On(Qm),sl("vaadin-multi-select-combo-box-overlay",[Du,
|
|
4750
|
+
`}}On(Qm),sl("vaadin-multi-select-combo-box-overlay",[Du,Gn`
|
|
4751
4751
|
#overlay {
|
|
4752
4752
|
width: var(
|
|
4753
4753
|
--vaadin-multi-select-combo-box-overlay-width,
|
|
@@ -4760,7 +4760,7 @@ class Qm extends(Cm(ll(Gd(Cd)))){static get is(){return"vaadin-multi-select-comb
|
|
|
4760
4760
|
flex-direction: column;
|
|
4761
4761
|
height: 100%;
|
|
4762
4762
|
}
|
|
4763
|
-
`],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Zm extends(Em(rp(
|
|
4763
|
+
`],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Zm extends(Em(rp(Vd(ll(Cd))))){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get template(){return _d`
|
|
4764
4764
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
4765
4765
|
<div part="overlay" id="overlay">
|
|
4766
4766
|
<div part="loader"></div>
|
|
@@ -4834,7 +4834,7 @@ const iv=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resiza
|
|
|
4834
4834
|
* @license
|
|
4835
4835
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4836
4836
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4837
|
-
*/sl("vaadin-multi-select-combo-box",[nm,
|
|
4837
|
+
*/sl("vaadin-multi-select-combo-box",[nm,Gn`
|
|
4838
4838
|
:host {
|
|
4839
4839
|
--input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
|
|
4840
4840
|
--_chip-min-width: var(--vaadin-multi-select-combo-box-chip-min-width, 50px);
|
|
@@ -4943,7 +4943,7 @@ const iv=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resiza
|
|
|
4943
4943
|
</div>
|
|
4944
4944
|
|
|
4945
4945
|
<slot name="tooltip"></slot>
|
|
4946
|
-
`}static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged"},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged"},autoOpenDisabled:Boolean,clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1},items:{type:Array},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},itemIdPath:{type:String},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0},overlayClass:{type:String},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0},selectedItems:{type:Array,value:()=>[],notify:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},size:{type:Number},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged"},renderer:Function,filter:{type:String,value:"",notify:!0},filteredItems:Array,selectedItemsOnTop:{type:Boolean,value:!1},value:{type:String},_overflowItems:{type:Array,value:()=>[]},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems, selectedItems.*)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){return[...super.slotStyles,`\n ${this.localName}[has-value] input::placeholder {\n color: transparent !important;\n forced-color-adjust: none;\n }\n `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new vu(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new fu(this.inputElement,this._labelController)),this._tooltipController=new sc(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new ic(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:t=>{t.addEventListener("mousedown",(t=>this._preventBlur(t))),this._overflow=t}}),this.addController(this._overflowController),this.__updateChips(),Gm(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),au(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(t,e){super._disabledChanged(t,e),(t||e)&&this.__updateChips()}_inputElementChanged(t){super._inputElementChanged(t),t&&this.$.comboBox._setInputElement(t)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(t,e){if(this.stateTarget){if("required"===t)return void this._delegateAttribute("aria-required",!!e&&"true");super._delegateAttribute(t,e)}}_autoExpandHorizontallyChanged(t,e){(t||e)&&this.__updateChips()}_autoExpandVerticallyChanged(t,e){(t||e)&&this.__updateChips()}_clearButtonVisibleChanged(t,e){(t||e)&&this.__updateChips()}_onFilteredItemsChanged(t){const{value:e}=t.detail;(Array.isArray(e)||null==e)&&(this.filteredItems=e)}_readonlyChanged(t,e){(t||e)&&this.__updateChips(),this.dataProvider&&this.clearCache()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.__updateChips()}_pageSizeChanged(t,e){(Math.floor(t)!==t||t<=0)&&(this.pageSize=e,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(t){const e=this.__tmpA11yPlaceholder;e!==t&&(this.__savedPlaceholder=t,e&&(this.placeholder=e))}_selectedItemsChanged(t){if(this._toggleHasValue(this._hasValue),this._hasValue){const e=this._mergeItemLabels(t);void 0===this.__tmpA11yPlaceholder&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=e,this.placeholder=e}else void 0!==this.__tmpA11yPlaceholder&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(t){return this.$.comboBox._getItemLabel(t)}_mergeItemLabels(t){return t.map((t=>this._getItemLabel(t))).join(", ")}_findIndex(t,e,i){if(i&&t){for(let s=0;s<e.length;s++)if(e[s]&&e[s][i]===t[i])return s;return-1}return e.indexOf(t)}__clearInternalValue(t=!1){!this.keepFilter||t?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter)}__announceItem(t,e,i){const s=e?"selected":"deselected",r=this.i18n.total.replace("{count}",i||0);au(`${t} ${this.i18n[s]} ${r}`)}__removeItem(t){const e=[...this.selectedItems];e.splice(e.indexOf(t),1),this.__updateSelection(e);const i=this._getItemLabel(t);this.__announceItem(i,!1,e.length)}__selectItem(t){const e=[...this.selectedItems],i=this._findIndex(t,e,this.itemIdPath),s=this._getItemLabel(t);let r=!1;if(-1!==i){const t=this._lastFilter;if(t&&t.toLowerCase()===s.toLowerCase())return void this.__clearInternalValue();e.splice(i,1)}else e.push(t),r=!0;this.__updateSelection(e),this.__clearInternalValue(),this.__announceItem(s,r,e.length)}__updateSelection(t){this.selectedItems=t,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(t,e,i){t?i||(this._topGroup=[...e]):this._topGroup=[]}__createChip(t){const e=document.createElement("vaadin-multi-select-combo-box-chip");e.setAttribute("slot","chip"),e.item=t,e.disabled=this.disabled,e.readonly=this.readonly;const i=this._getItemLabel(t);return e.label=i,e.setAttribute("title",i),"function"==typeof this.itemClassNameGenerator&&(e.className=this.itemClassNameGenerator(t)),e.addEventListener("item-removed",(t=>this._onItemRemoved(t))),e.addEventListener("mousedown",(t=>this._preventBlur(t))),e}__getOverflowWidth(){const t=this._overflow;t.style.visibility="hidden",t.removeAttribute("hidden");const e=t.getAttribute("count");t.setAttribute("count","99");const i=getComputedStyle(t),s=t.clientWidth+parseInt(i.marginInlineStart);return t.setAttribute("count",e),t.setAttribute("hidden",""),t.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach((t=>{t.remove()}));const t=[...this.selectedItems],e=this._inputField.$.wrapper.clientWidth,i=parseInt(getComputedStyle(this.inputElement).flexBasis);let s=e-i;t.length>1&&(s-=this.__getOverflowWidth());const r=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const e=[];for(let i=t.length-1,s=null;i>=0;i--){const r=this.__createChip(t[i]);this.insertBefore(r,s),s=r,e.unshift(r)}const o=[];if(!this.autoExpandVertically&&this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth<i){for(;e.length>1;){e.pop().remove(),o.unshift(t.pop());const s=o.length>0?i+this.__getOverflowWidth():i;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=s)break}1===e.length&&(e[0].style.maxWidth=`${Math.max(r,s)}px`)}this._overflowItems=o}else{for(let e=t.length-1,i=null;e>=0;e--){const o=this.__createChip(t[e]);if(this.insertBefore(o,i),!this.autoExpandVertically&&this.$.chips.clientWidth>s){if(null!==i){o.remove();break}o.style.maxWidth=`${Math.max(r,s)}px`}t.pop(),i=o}this._overflowItems=t}}__updateOverflowChip(t,e,i,s){if(t){const r=e.length;t.label=`${r}`,t.setAttribute("count",`${r}`),t.setAttribute("title",this._mergeItemLabels(e)),t.toggleAttribute("hidden",0===r),t.disabled=i,t.readonly=s}}_onClearButtonTouchend(t){t.preventDefault(),t.stopPropagation(),this.clear()}_onClearButtonClick(t){t.stopPropagation(),this.clear()}_onChange(t){t.stopPropagation()}_onEscape(t){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(t.stopPropagation(),this.selectedItems=[])}_onKeyDown(t){super._onKeyDown(t);const e=this._chips;if(!this.readonly&&e.length>0)switch(t.key){case"Backspace":this._onBackSpace(e);break;case"ArrowLeft":this._onArrowLeft(e,t);break;case"ArrowRight":this._onArrowRight(e,t);break;default:this._focusedChipIndex=-1}}_onArrowLeft(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?i===t.length-1?s=-1:i>-1&&(s=i+1):-1===i?s=t.length-1:i>0&&(s=i-1),void 0!==s&&(this._focusedChipIndex=s)}_onArrowRight(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?-1===i?s=t.length-1:i>0&&(s=i-1):i===t.length-1?s=-1:i>-1&&(s=i+1),void 0!==s&&(this._focusedChipIndex=s)}_onBackSpace(t){if(0!==this.inputElement.selectionStart)return;const e=this._focusedChipIndex;-1===e?this._focusedChipIndex=t.length-1:(this.__removeItem(t[e].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(t,e){if(t>-1||e>-1){const e=this._chips;e.forEach(((e,i)=>{e.toggleAttribute("focused",i===t)})),t>-1&&au(`${this._getItemLabel(e[t].item)} ${this.i18n.focused}`)}}_onComboBoxChange(){const t=this.$.comboBox.selectedItem;t&&this.__selectItem(t)}_onComboBoxItemSelected(t){this.__selectItem(t.detail.item)}_onCustomValueSet(t){t.preventDefault(),t.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:t.detail,composed:!0,bubbles:!0}))}_onItemRemoved(t){this.__removeItem(t.detail.item)}_preventBlur(t){t.preventDefault()}}On(rv),sl("vaadin-notification-card",Vn`
|
|
4946
|
+
`}static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged"},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged"},autoOpenDisabled:Boolean,clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1},items:{type:Array},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},itemIdPath:{type:String},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0},overlayClass:{type:String},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0},selectedItems:{type:Array,value:()=>[],notify:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},size:{type:Number},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged"},renderer:Function,filter:{type:String,value:"",notify:!0},filteredItems:Array,selectedItemsOnTop:{type:Boolean,value:!1},value:{type:String},_overflowItems:{type:Array,value:()=>[]},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems, selectedItems.*)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){return[...super.slotStyles,`\n ${this.localName}[has-value] input::placeholder {\n color: transparent !important;\n forced-color-adjust: none;\n }\n `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new vu(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new fu(this.inputElement,this._labelController)),this._tooltipController=new sc(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new ic(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:t=>{t.addEventListener("mousedown",(t=>this._preventBlur(t))),this._overflow=t}}),this.addController(this._overflowController),this.__updateChips(),Vm(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),au(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(t,e){super._disabledChanged(t,e),(t||e)&&this.__updateChips()}_inputElementChanged(t){super._inputElementChanged(t),t&&this.$.comboBox._setInputElement(t)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(t,e){if(this.stateTarget){if("required"===t)return void this._delegateAttribute("aria-required",!!e&&"true");super._delegateAttribute(t,e)}}_autoExpandHorizontallyChanged(t,e){(t||e)&&this.__updateChips()}_autoExpandVerticallyChanged(t,e){(t||e)&&this.__updateChips()}_clearButtonVisibleChanged(t,e){(t||e)&&this.__updateChips()}_onFilteredItemsChanged(t){const{value:e}=t.detail;(Array.isArray(e)||null==e)&&(this.filteredItems=e)}_readonlyChanged(t,e){(t||e)&&this.__updateChips(),this.dataProvider&&this.clearCache()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.__updateChips()}_pageSizeChanged(t,e){(Math.floor(t)!==t||t<=0)&&(this.pageSize=e,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(t){const e=this.__tmpA11yPlaceholder;e!==t&&(this.__savedPlaceholder=t,e&&(this.placeholder=e))}_selectedItemsChanged(t){if(this._toggleHasValue(this._hasValue),this._hasValue){const e=this._mergeItemLabels(t);void 0===this.__tmpA11yPlaceholder&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=e,this.placeholder=e}else void 0!==this.__tmpA11yPlaceholder&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(t){return this.$.comboBox._getItemLabel(t)}_mergeItemLabels(t){return t.map((t=>this._getItemLabel(t))).join(", ")}_findIndex(t,e,i){if(i&&t){for(let s=0;s<e.length;s++)if(e[s]&&e[s][i]===t[i])return s;return-1}return e.indexOf(t)}__clearInternalValue(t=!1){!this.keepFilter||t?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter)}__announceItem(t,e,i){const s=e?"selected":"deselected",r=this.i18n.total.replace("{count}",i||0);au(`${t} ${this.i18n[s]} ${r}`)}__removeItem(t){const e=[...this.selectedItems];e.splice(e.indexOf(t),1),this.__updateSelection(e);const i=this._getItemLabel(t);this.__announceItem(i,!1,e.length)}__selectItem(t){const e=[...this.selectedItems],i=this._findIndex(t,e,this.itemIdPath),s=this._getItemLabel(t);let r=!1;if(-1!==i){const t=this._lastFilter;if(t&&t.toLowerCase()===s.toLowerCase())return void this.__clearInternalValue();e.splice(i,1)}else e.push(t),r=!0;this.__updateSelection(e),this.__clearInternalValue(),this.__announceItem(s,r,e.length)}__updateSelection(t){this.selectedItems=t,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(t,e,i){t?i||(this._topGroup=[...e]):this._topGroup=[]}__createChip(t){const e=document.createElement("vaadin-multi-select-combo-box-chip");e.setAttribute("slot","chip"),e.item=t,e.disabled=this.disabled,e.readonly=this.readonly;const i=this._getItemLabel(t);return e.label=i,e.setAttribute("title",i),"function"==typeof this.itemClassNameGenerator&&(e.className=this.itemClassNameGenerator(t)),e.addEventListener("item-removed",(t=>this._onItemRemoved(t))),e.addEventListener("mousedown",(t=>this._preventBlur(t))),e}__getOverflowWidth(){const t=this._overflow;t.style.visibility="hidden",t.removeAttribute("hidden");const e=t.getAttribute("count");t.setAttribute("count","99");const i=getComputedStyle(t),s=t.clientWidth+parseInt(i.marginInlineStart);return t.setAttribute("count",e),t.setAttribute("hidden",""),t.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach((t=>{t.remove()}));const t=[...this.selectedItems],e=this._inputField.$.wrapper.clientWidth,i=parseInt(getComputedStyle(this.inputElement).flexBasis);let s=e-i;t.length>1&&(s-=this.__getOverflowWidth());const r=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const e=[];for(let i=t.length-1,s=null;i>=0;i--){const r=this.__createChip(t[i]);this.insertBefore(r,s),s=r,e.unshift(r)}const o=[];if(!this.autoExpandVertically&&this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth<i){for(;e.length>1;){e.pop().remove(),o.unshift(t.pop());const s=o.length>0?i+this.__getOverflowWidth():i;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=s)break}1===e.length&&(e[0].style.maxWidth=`${Math.max(r,s)}px`)}this._overflowItems=o}else{for(let e=t.length-1,i=null;e>=0;e--){const o=this.__createChip(t[e]);if(this.insertBefore(o,i),!this.autoExpandVertically&&this.$.chips.clientWidth>s){if(null!==i){o.remove();break}o.style.maxWidth=`${Math.max(r,s)}px`}t.pop(),i=o}this._overflowItems=t}}__updateOverflowChip(t,e,i,s){if(t){const r=e.length;t.label=`${r}`,t.setAttribute("count",`${r}`),t.setAttribute("title",this._mergeItemLabels(e)),t.toggleAttribute("hidden",0===r),t.disabled=i,t.readonly=s}}_onClearButtonTouchend(t){t.preventDefault(),t.stopPropagation(),this.clear()}_onClearButtonClick(t){t.stopPropagation(),this.clear()}_onChange(t){t.stopPropagation()}_onEscape(t){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(t.stopPropagation(),this.selectedItems=[])}_onKeyDown(t){super._onKeyDown(t);const e=this._chips;if(!this.readonly&&e.length>0)switch(t.key){case"Backspace":this._onBackSpace(e);break;case"ArrowLeft":this._onArrowLeft(e,t);break;case"ArrowRight":this._onArrowRight(e,t);break;default:this._focusedChipIndex=-1}}_onArrowLeft(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?i===t.length-1?s=-1:i>-1&&(s=i+1):-1===i?s=t.length-1:i>0&&(s=i-1),void 0!==s&&(this._focusedChipIndex=s)}_onArrowRight(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?-1===i?s=t.length-1:i>0&&(s=i-1):i===t.length-1?s=-1:i>-1&&(s=i+1),void 0!==s&&(this._focusedChipIndex=s)}_onBackSpace(t){if(0!==this.inputElement.selectionStart)return;const e=this._focusedChipIndex;-1===e?this._focusedChipIndex=t.length-1:(this.__removeItem(t[e].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(t,e){if(t>-1||e>-1){const e=this._chips;e.forEach(((e,i)=>{e.toggleAttribute("focused",i===t)})),t>-1&&au(`${this._getItemLabel(e[t].item)} ${this.i18n.focused}`)}}_onComboBoxChange(){const t=this.$.comboBox.selectedItem;t&&this.__selectItem(t)}_onComboBoxItemSelected(t){this.__selectItem(t.detail.item)}_onCustomValueSet(t){t.preventDefault(),t.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:t.detail,composed:!0,bubbles:!0}))}_onItemRemoved(t){this.__removeItem(t.detail.item)}_preventBlur(t){t.preventDefault()}}On(rv),sl("vaadin-notification-card",Gn`
|
|
4947
4947
|
:host {
|
|
4948
4948
|
position: relative;
|
|
4949
4949
|
margin: var(--lumo-space-s);
|
|
@@ -5259,7 +5259,7 @@ class ov extends(sp(ll(qd(Cd)))){static get template(){return _d`
|
|
|
5259
5259
|
}
|
|
5260
5260
|
</style>
|
|
5261
5261
|
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
5262
|
-
`}static get is(){return"vaadin-notification"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return av._createAndShowNotification(void 0!==(null==(i=t)?void 0:i._$litType$)?e=>{Ra(t,e)}:e=>{e.innerText=t},e);var i}static _createAndShowNotification(t,e){const i=document.createElement(av.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",(t=>{t.detail.value||i.remove()})),i}get _container(){return av._container||(av._container=document.createElement("vaadin-notification-container"),document.body.appendChild(av._container)),av._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),
|
|
5262
|
+
`}static get is(){return"vaadin-notification"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return av._createAndShowNotification(void 0!==(null==(i=t)?void 0:i._$litType$)?e=>{Ra(t,e)}:e=>{e.innerText=t},e);var i}static _createAndShowNotification(t,e){const i=document.createElement(av.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",(t=>{t.detail.value||i.remove()})),i}get _container(){return av._container||(av._container=document.createElement("vaadin-notification-container"),document.body.appendChild(av._container)),av._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),Vm(this)}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask((()=>{this.isConnected||(this.opened=!1)}))}requestContentUpdate(){this.renderer&&this.renderer(this._card,this)}_rendererChanged(t,e,i){if(!i)return;const s=this._oldRenderer!==t;this._oldRenderer=t,s&&(i.innerHTML="",delete i._$litPart$),e&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate())}open(){this.opened=!0}close(){this.opened=!1}_openedChanged(t){t?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard()}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener)}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`))return void console.warn(`Invalid alignment parameter provided: position=${this.position}`);this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card)}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"))}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");t&&"none"!==t?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState()},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard()}_positionChanged(){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout((()=>this.close()),t)))}}On(ov),On(nv),On(av);const lv=Gn`
|
|
5263
5263
|
:host {
|
|
5264
5264
|
-webkit-tap-highlight-color: transparent;
|
|
5265
5265
|
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
@@ -5279,7 +5279,7 @@ class ov extends(sp(ll(qd(Cd)))){static get template(){return _d`
|
|
|
5279
5279
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5280
5280
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5281
5281
|
*/
|
|
5282
|
-
sl("vaadin-select-item",wm,{moduleId:"lumo-select-item"}),sl("vaadin-select-list-box",lv,{moduleId:"lumo-select-list-box"}),sl("vaadin-select",[Au,
|
|
5282
|
+
sl("vaadin-select-item",wm,{moduleId:"lumo-select-item"}),sl("vaadin-select-list-box",lv,{moduleId:"lumo-select-list-box"}),sl("vaadin-select",[Au,Gn`
|
|
5283
5283
|
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
5284
5284
|
text-align: start;
|
|
5285
5285
|
}
|
|
@@ -5322,7 +5322,7 @@ sl("vaadin-select-item",wm,{moduleId:"lumo-select-item"}),sl("vaadin-select-list
|
|
|
5322
5322
|
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
5323
5323
|
--_lumo-selected-item-padding: 0;
|
|
5324
5324
|
}
|
|
5325
|
-
`],{moduleId:"lumo-select"}),sl("vaadin-select-value-button",
|
|
5325
|
+
`],{moduleId:"lumo-select"}),sl("vaadin-select-value-button",Gn`
|
|
5326
5326
|
:host {
|
|
5327
5327
|
font-family: var(--lumo-font-family);
|
|
5328
5328
|
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
@@ -5341,7 +5341,7 @@ sl("vaadin-select-item",wm,{moduleId:"lumo-select-item"}),sl("vaadin-select-list
|
|
|
5341
5341
|
::slotted(*:hover) {
|
|
5342
5342
|
background-color: transparent;
|
|
5343
5343
|
}
|
|
5344
|
-
`,{moduleId:"lumo-select-value-button"}),sl("vaadin-select-overlay",[Su,
|
|
5344
|
+
`,{moduleId:"lumo-select-value-button"}),sl("vaadin-select-overlay",[Su,Gn`
|
|
5345
5345
|
:host {
|
|
5346
5346
|
--_lumo-item-selected-icon-display: block;
|
|
5347
5347
|
}
|
|
@@ -5388,7 +5388,7 @@ const hv=t=>class extends(Fc($c(t))){static get properties(){return{_hasVaadinIt
|
|
|
5388
5388
|
* @license
|
|
5389
5389
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5390
5390
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5391
|
-
*/;class dv extends(hv(ll(
|
|
5391
|
+
*/;class dv extends(hv(ll(Vd(Cd)))){static get is(){return"vaadin-select-item"}static get template(){return _d`
|
|
5392
5392
|
<style>
|
|
5393
5393
|
:host {
|
|
5394
5394
|
display: inline-block;
|
|
@@ -5419,12 +5419,12 @@ const uv=t=>class extends(Nc(t)){get focused(){return(this._getItems()||[]).find
|
|
|
5419
5419
|
* @license
|
|
5420
5420
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5421
5421
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5422
|
-
*/,pv=t=>class extends(uv(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&&!Rc(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 Zd(t,(()=>{this._setItems(this._filterItems(Kd(this)))}))}_getItems(){return this.items}_enhanceItems(t,e,i,s){if(!s&&t){this.setAttribute("aria-orientation",e||"vertical"),t.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(i<0||!i?0:i);const s=t[i];t.forEach((t=>{t.selected=t===s})),s&&!s.disabled&&this._scrollToItem(i)}}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let i;e&&!e.disabled&&(i=this.items.indexOf(e))>=0&&(this.selected=i)}_searchKey(t,e){return this._searchReset=
|
|
5422
|
+
*/,pv=t=>class extends(uv(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&&!Rc(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 Zd(t,(()=>{this._setItems(this._filterItems(Kd(this)))}))}_getItems(){return this.items}_enhanceItems(t,e,i,s){if(!s&&t){this.setAttribute("aria-orientation",e||"vertical"),t.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(i<0||!i?0:i);const s=t[i];t.forEach((t=>{t.selected=t===s})),s&&!s.disabled&&this._scrollToItem(i)}}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let i;e&&!e.disabled&&(i=this.items.indexOf(e))>=0&&(this.selected=i)}_searchKey(t,e){return this._searchReset=Ud.debounce(this._searchReset,zd.after(500),(()=>{this._searchBuf=""})),this._searchBuf+=e.toLowerCase(),this.items.some((t=>this.__isMatchingKey(t)))||(this._searchBuf=e.toLowerCase()),this._getAvailableIndex(this.items,1===this._searchBuf.length?t+1:t,1,(t=>this.__isMatchingKey(t)&&"none"!==getComputedStyle(t).display))}__isMatchingKey(t){return t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(t){if(t.metaKey||t.ctrlKey)return;const e=t.key,i=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(e)&&1===e.length){const t=this._searchKey(i,e);t>=0&&this._focus(t)}else super._onKeyDown(t)}_isItemHidden(t){return"none"===getComputedStyle(t).display}_setFocusable(t){t=this._getAvailableIndex(this.items,t,1);const e=this.items[t];this.items.forEach((t=>{t.tabIndex=t===e?0:-1}))}_focus(t){this.items.forEach(((e,i)=>{e.focused=i===t})),this._setFocusable(t),this._scrollToItem(t),super._focus(t)}_scrollToItem(t){const e=this.items[t];if(!e)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),r=(this.items[t+1]||e).getBoundingClientRect(),o=(this.items[t-1]||e).getBoundingClientRect();let n=0;!this._isRTL&&r[i[1]]>=s[i[1]]||this._isRTL&&r[i[1]]<=s[i[1]]?n=r[i[1]]-s[i[1]]:(!this._isRTL&&o[i[0]]<=s[i[0]]||this._isRTL&&o[i[0]]>=s[i[0]])&&(n=o[i[0]]-s[i[0]]),this._scroll(n)}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",i=cv(this._scrollerElement,e)+t;!function(t,e,i){t.scrollLeft="rtl"!==e?i:t.clientWidth-t.scrollWidth+i}(this._scrollerElement,e,i)}}}
|
|
5423
5423
|
/**
|
|
5424
5424
|
* @license
|
|
5425
5425
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5426
5426
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5427
|
-
*/;class mv extends(pv(ll(
|
|
5427
|
+
*/;class mv extends(pv(ll(Vd(ru(Cd))))){static get is(){return"vaadin-select-list-box"}static get template(){return _d`
|
|
5428
5428
|
<style>
|
|
5429
5429
|
:host {
|
|
5430
5430
|
display: flex;
|
|
@@ -5450,12 +5450,12 @@ const uv=t=>class extends(Nc(t)){get focused(){return(this._getItems()||[]).find
|
|
|
5450
5450
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5451
5451
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5452
5452
|
*/
|
|
5453
|
-
const vv=t=>class extends(lp(rp(
|
|
5453
|
+
const vv=t=>class extends(lp(rp(Vd(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)}}}
|
|
5454
5454
|
/**
|
|
5455
5455
|
* @license
|
|
5456
5456
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5457
5457
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5458
|
-
*/;sl("vaadin-select-overlay",[Du,
|
|
5458
|
+
*/;sl("vaadin-select-overlay",[Du,Gn`
|
|
5459
5459
|
:host {
|
|
5460
5460
|
align-items: flex-start;
|
|
5461
5461
|
justify-content: flex-start;
|
|
@@ -5483,7 +5483,7 @@ const vv=t=>class extends(lp(rp(Gd(t)))){static get observers(){return["_updateO
|
|
|
5483
5483
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5484
5484
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5485
5485
|
*/
|
|
5486
|
-
sl("vaadin-select-value-button",
|
|
5486
|
+
sl("vaadin-select-value-button",Gn`
|
|
5487
5487
|
:host {
|
|
5488
5488
|
display: inline-block;
|
|
5489
5489
|
position: relative;
|
|
@@ -5537,7 +5537,7 @@ sl("vaadin-select-value-button",Vn`
|
|
|
5537
5537
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
5538
5538
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5539
5539
|
*/
|
|
5540
|
-
const bv=
|
|
5540
|
+
const bv=Gn`
|
|
5541
5541
|
.sr-only {
|
|
5542
5542
|
border: 0 !important;
|
|
5543
5543
|
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
@@ -5619,7 +5619,7 @@ const bv=Vn`
|
|
|
5619
5619
|
<div class="sr-only">
|
|
5620
5620
|
<slot name="sr-label"></slot>
|
|
5621
5621
|
</div>
|
|
5622
|
-
`}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),
|
|
5622
|
+
`}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),Vm(this)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}On(xv);const _v=Gn`
|
|
5623
5623
|
/* Optical centering */
|
|
5624
5624
|
:host::before,
|
|
5625
5625
|
:host::after {
|
|
@@ -5719,7 +5719,7 @@ const bv=Vn`
|
|
|
5719
5719
|
transform: scale(1.02);
|
|
5720
5720
|
}
|
|
5721
5721
|
}
|
|
5722
|
-
`;sl("vaadin-dialog-overlay",[ku,_v],{moduleId:"lumo-dialog"}),sl("vaadin-confirm-dialog-overlay",[ku,_v,
|
|
5722
|
+
`;sl("vaadin-dialog-overlay",[ku,_v],{moduleId:"lumo-dialog"}),sl("vaadin-confirm-dialog-overlay",[ku,_v,Gn`
|
|
5723
5723
|
[part='header'] ::slotted(h3) {
|
|
5724
5724
|
margin-top: 0 !important;
|
|
5725
5725
|
margin-bottom: 0 !important;
|
|
@@ -5765,7 +5765,7 @@ const kv=t=>class extends t{static get properties(){return{opened:{type:Boolean,
|
|
|
5765
5765
|
* @license
|
|
5766
5766
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5767
5767
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5768
|
-
*/,Cv=
|
|
5768
|
+
*/,Cv=Gn`
|
|
5769
5769
|
[part='header'],
|
|
5770
5770
|
[part='header-content'],
|
|
5771
5771
|
[part='footer'] {
|
|
@@ -5843,7 +5843,7 @@ const kv=t=>class extends t{static get properties(){return{opened:{type:Boolean,
|
|
|
5843
5843
|
outline: 3px solid !important;
|
|
5844
5844
|
}
|
|
5845
5845
|
}
|
|
5846
|
-
`;
|
|
5846
|
+
`;Gn`
|
|
5847
5847
|
[part='overlay'] {
|
|
5848
5848
|
position: relative;
|
|
5849
5849
|
overflow: visible;
|
|
@@ -5952,7 +5952,7 @@ const kv=t=>class extends t{static get properties(){return{opened:{type:Boolean,
|
|
|
5952
5952
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
5953
5953
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5954
5954
|
*/
|
|
5955
|
-
sl("vaadin-confirm-dialog-overlay",[Du,Cv,
|
|
5955
|
+
sl("vaadin-confirm-dialog-overlay",[Du,Cv,Gn`
|
|
5956
5956
|
:host {
|
|
5957
5957
|
--_vaadin-confirm-dialog-content-width: auto;
|
|
5958
5958
|
--_vaadin-confirm-dialog-content-height: auto;
|
|
@@ -5971,7 +5971,7 @@ sl("vaadin-confirm-dialog-overlay",[Du,Cv,Vn`
|
|
|
5971
5971
|
[part='footer'] > * {
|
|
5972
5972
|
pointer-events: all;
|
|
5973
5973
|
}
|
|
5974
|
-
`],{moduleId:"vaadin-confirm-dialog-overlay-styles"});class Ev extends(rp(
|
|
5974
|
+
`],{moduleId:"vaadin-confirm-dialog-overlay-styles"});class Ev extends(rp(Vd(ll(Cd)))){static get is(){return"vaadin-confirm-dialog-overlay"}static get template(){return _d`
|
|
5975
5975
|
<div part="backdrop" id="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
5976
5976
|
<div part="overlay" id="overlay" tabindex="0">
|
|
5977
5977
|
<section id="resizerContainer" class="resizer-container">
|
|
@@ -6051,7 +6051,7 @@ const Av=t=>class extends t{static get properties(){return{accessibleDescription
|
|
|
6051
6051
|
<slot name="reject-button"></slot>
|
|
6052
6052
|
<slot name="confirm-button"></slot>
|
|
6053
6053
|
</div>
|
|
6054
|
-
`}static get is(){return"vaadin-confirm-dialog"}ready(){super.ready(),this._overlayElement=this.$.dialog.$.overlay,this._initOverlay(this._overlayElement)}}On(Iv),sl("vaadin-tab",
|
|
6054
|
+
`}static get is(){return"vaadin-confirm-dialog"}ready(){super.ready(),this._overlayElement=this.$.dialog.$.overlay,this._initOverlay(this._overlayElement)}}On(Iv),sl("vaadin-tab",Gn`
|
|
6055
6055
|
:host {
|
|
6056
6056
|
box-sizing: border-box;
|
|
6057
6057
|
padding: 0.5rem 0.75rem;
|
|
@@ -6301,7 +6301,7 @@ const Mv=t=>class extends(hv(t)){ready(){super.ready(),this.setAttribute("role",
|
|
|
6301
6301
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6302
6302
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6303
6303
|
*/
|
|
6304
|
-
sl("vaadin-tab",
|
|
6304
|
+
sl("vaadin-tab",Gn`
|
|
6305
6305
|
:host {
|
|
6306
6306
|
display: block;
|
|
6307
6307
|
}
|
|
@@ -6323,7 +6323,7 @@ sl("vaadin-tab",Vn`
|
|
|
6323
6323
|
`,{moduleId:"vaadin-tab-styles"});class Dv extends(qd(ll(Mv(ru(Cd))))){static get template(){return _d`
|
|
6324
6324
|
<slot></slot>
|
|
6325
6325
|
<slot name="tooltip"></slot>
|
|
6326
|
-
`}static get is(){return"vaadin-tab"}ready(){super.ready(),this._tooltipController=new sc(this),this.addController(this._tooltipController)}}On(Dv),sl("vaadin-tabs",
|
|
6326
|
+
`}static get is(){return"vaadin-tab"}ready(){super.ready(),this._tooltipController=new sc(this),this.addController(this._tooltipController)}}On(Dv),sl("vaadin-tabs",Gn`
|
|
6327
6327
|
:host {
|
|
6328
6328
|
-webkit-tap-highlight-color: transparent;
|
|
6329
6329
|
}
|
|
@@ -6567,7 +6567,7 @@ sl("vaadin-tab",Vn`
|
|
|
6567
6567
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6568
6568
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6569
6569
|
*/
|
|
6570
|
-
const
|
|
6570
|
+
const Tv=t=>class extends(sv(pv(t))){static get properties(){return{orientation:{value:"horizontal",type:String,reflectToAttribute:!0,sync:!0},selected:{value:0,type:Number}}}static get observers(){return["__tabsItemsChanged(items)"]}constructor(){super(),this.__itemsResizeObserver=new ResizeObserver((()=>{setTimeout((()=>this._updateOverflow()))}))}get _scrollOffset(){return this._vertical?this._scrollerElement.offsetHeight:this._scrollerElement.offsetWidth}get _scrollerElement(){return this.$.scroll}get __direction(){return!this._vertical&&this.__isRTL?1:-1}ready(){super.ready(),this._scrollerElement.addEventListener("scroll",(()=>this._updateOverflow())),this.setAttribute("role","tablist"),Ou(this,(()=>{this._updateOverflow()}))}_onResize(){this._updateOverflow()}__tabsItemsChanged(t){this.__itemsResizeObserver.disconnect(),(t||[]).forEach((t=>{this.__itemsResizeObserver.observe(t)})),this._updateOverflow()}_scrollForward(){const t=this._getNavigationButtonVisibleWidth("forward-button"),e=this._getNavigationButtonVisibleWidth("back-button"),i=this._scrollerElement.getBoundingClientRect(),s=[...this.items].reverse().find((s=>this._isItemVisible(s,t,e,i))).getBoundingClientRect(),r=20+this.shadowRoot.querySelector('[part="back-button"]').clientWidth;let o;o=this.__isRTL?s.right-(i.right-r):s.left-(i.left+r),-this.__direction*o<1&&(o=-this.__direction*(this._scrollOffset-r)),this._scroll(o)}_scrollBack(){const t=this._getNavigationButtonVisibleWidth("forward-button"),e=this._getNavigationButtonVisibleWidth("back-button"),i=this._scrollerElement.getBoundingClientRect(),s=this.items.find((s=>this._isItemVisible(s,t,e,i))).getBoundingClientRect(),r=20+this.shadowRoot.querySelector('[part="forward-button"]').clientWidth;let o;o=this.__isRTL?s.left-(i.left+r):s.right-(i.right-r),this.__direction*o<1&&(o=this.__direction*(this._scrollOffset-r)),this._scroll(o)}_isItemVisible(t,e,i,s){if(this._vertical)throw new Error("Visibility check is only supported for horizontal tabs.");const r=s.right-(this.__isRTL?i:e),o=s.left+(this.__isRTL?e:i),n=t.getBoundingClientRect();return r>Math.floor(n.left)&&o<Math.ceil(n.right)}_getNavigationButtonVisibleWidth(t){const e=this.shadowRoot.querySelector(`[part="${t}"]`);return"0"===window.getComputedStyle(e).opacity?0:e.clientWidth}_updateOverflow(){const t=this._vertical?this._scrollerElement.scrollTop:cv(this._scrollerElement,this.getAttribute("dir")),e=this._vertical?this._scrollerElement.scrollHeight:this._scrollerElement.scrollWidth;let i=Math.floor(t)>1?"start":"";Math.ceil(t)<Math.ceil(e-this._scrollOffset)&&(i+=" end"),1===this.__direction&&(i=i.replace(/start|end/giu,(t=>"start"===t?"end":"start"))),i?this.setAttribute("overflow",i.trim()):this.removeAttribute("overflow")}}
|
|
6571
6571
|
/**
|
|
6572
6572
|
* @license
|
|
6573
6573
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -6578,7 +6578,7 @@ const zv=t=>class extends(sv(pv(t))){static get properties(){return{orientation:
|
|
|
6578
6578
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6579
6579
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6580
6580
|
*/
|
|
6581
|
-
sl("vaadin-tabs",
|
|
6581
|
+
sl("vaadin-tabs",Gn`
|
|
6582
6582
|
:host {
|
|
6583
6583
|
display: flex;
|
|
6584
6584
|
align-items: center;
|
|
@@ -6654,7 +6654,7 @@ sl("vaadin-tabs",Vn`
|
|
|
6654
6654
|
:host([dir='rtl']) [part='forward-button']::after {
|
|
6655
6655
|
content: '\\25C0';
|
|
6656
6656
|
}
|
|
6657
|
-
`,{moduleId:"vaadin-tabs-styles"});class
|
|
6657
|
+
`,{moduleId:"vaadin-tabs-styles"});class zv extends(Tv(qd(ll(Cd)))){static get template(){return _d`
|
|
6658
6658
|
<div on-click="_scrollBack" part="back-button" aria-hidden="true"></div>
|
|
6659
6659
|
|
|
6660
6660
|
<div id="scroll" part="tabs">
|
|
@@ -6662,4 +6662,4 @@ sl("vaadin-tabs",Vn`
|
|
|
6662
6662
|
</div>
|
|
6663
6663
|
|
|
6664
6664
|
<div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
|
|
6665
|
-
`}static get is(){return"vaadin-tabs"}}On(Tv);const Nv=class{constructor(e){t(this,e),this.registrationWidgetLoaded=i(this,"registrationWidgetLoaded",7),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.noValidation=!1,this.clientStyling="",this.clientStylingUrl="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1,this.twofaDestination=void 0,this.twofaResendIntervalSeconds=60,this.twofaStartCountDown=!1,this.haspostalcodelookup=void 0,this.postalcodelength=void 0,this.addresses=[],this.ignoreCountry=!1,this.enableSouthAfricanMode=void 0,this.enableManualDateInput=!1,this.pinAttemptsExceeded=void 0,this.mbSource=void 0,this.enableCustomRegexValidation=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!==e&&this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl)}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{zs[e]=zs[e]||{};for(let i in t[e])"string"==typeof t[e][i]&&(zs[e]=zs[e]||{},zs[e][i]=t[e][i])})),e(!0)}))})))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.handleClientStyling(),this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href)}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return this.haspostalcodelookup&&"PostalCode"===this.name?e("postalcode-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,postalcodelength:this.postalcodelength,addresses:this.addresses,ignoreCountry:this.ignoreCountry,"mb-source":this.mbSource}):e("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,haspostalcodelookup:this.haspostalcodelookup,"enable-south-african-mode":this.enableSouthAfricanMode,"mb-source":this.mbSource});case"email":return e("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"mb-source":this.mbSource});case"number":return e("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"mb-source":this.mbSource});case"checkbox":return e("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,"mb-source":this.mbSource});case"checkboxgroup":return e("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"mb-source":this.mbSource});case"togglecheckbox":return e("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick,"mb-source":this.mbSource});case"datetime":return e("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick,"enable-south-african-mode":this.enableSouthAfricanMode,"enable-manual-date-input":this.enableManualDateInput,"mb-source":this.mbSource});case"password":return e("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,hidePasswordComplexity:this.hidePasswordComplexity,"no-validation":this.noValidation,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"enable-south-african-mode":this.enableSouthAfricanMode,"mb-source":this.mbSource});case"radio":return e("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,"mb-source":this.mbSource});case"tel":return e("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"mb-source":this.mbSource,"enable-custom-regex-validation":this.enableCustomRegexValidation});case"dropdown":return e("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"mb-source":this.mbSource});case"twofa":return e("twofa-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,destination:this.twofaDestination,"resend-interval-seconds":this.twofaResendIntervalSeconds,"start-count-down":this.twofaStartCountDown,"enable-south-african-mode":this.enableSouthAfricanMode,"pin-attempts-exceeded":this.pinAttemptsExceeded,"mb-source":this.mbSource});case"label":if(this.displayName&&""!==this.displayName.trim())return e("div",{class:"general-non-input",innerHTML:this.displayName});e("p",null,"No content in label type");default:return e("p",null,"The ",this.type," input type is not valid")}}render(){return e(r,{key:"66f9570a413592a61ea7f18190bcdde82077ab34",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}get host(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Nv.style=":host{display:block;height:100%}";const Fv=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return Ls("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return Ls(`${i}`,this.language)?Ls(`${i}`,this.language):s}}renderTooltip(){return this.showTooltip?e("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"bd11140dc6c8ddb6b800d4fe6544df733c5157c4",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"c8318c687bc471fc225b9aba52686e38ecb400de",class:"number__wrapper--flex"},e("label",{key:"7eaf64057ef71b07a0defc1e372fd85baab2bd68",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"99f4151f50a7fb0abb9a8e53bacc8c8bd303d659",class:"number__wrapper--relative"},this.tooltip&&e("img",{key:"875d6284697dc06ac05c682509856faeade3d8be",class:"number__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("input",{key:"f1f563567cde4a744c68e27ab91a3d795f596be6",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),e("small",{key:"0226f04a059fd8763822483de42bd7e647040bf3",class:"number__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Fv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';const Ov=class{constructor(e){t(this,e),this.sendOriginalValidityState=i(this,"sendOriginalValidityState",7),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.noValidation=!1,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.clientStyling="",this.enableSouthAfricanMode=void 0,this.mbSource=void 0,this.isValid=void 0,this.errorMessage=void 0,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.passwordButton.addEventListener("click",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.noValidation?[]:this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern);let s=!1;return t&&(s=i.test(t)),{rule:e.displayName,ruleKey:e.errorKey,passed:s}}))}setValidity(){var t,e;return!!this.noValidation||(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s,r;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return Ls("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language);if(this.isDuplicateInput&&!this.originalValid)return Ls("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return Ls(`${i}`,this.language)?Ls(`${i}`,this.language):s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return Ls(`${t}`,this.language)?Ls(`${t}`,this.language):e}return(null===(r=this.passwordComplexity)||void 0===r?void 0:r.every((t=>t.passed)))||this.showPopup?void 0:Ls("invalidPassword",this.language)}renderTooltip(){return this.showTooltip?e("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,i=this.passwordComplexity.filter((t=>t.passed)).length/t,s=this.passwordComplexity.every((t=>t.passed));return e("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},e("div",{class:"password__complexity--strength"},e("p",{class:"password__complexity--text"},Ls("passwordStrength",this.language)," ",e("span",{class:"password__complexity--text-bold"},Ls(s?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),e("meter",{value:i,min:"0",max:"1"})),e("div",null,this.passwordComplexity.map(((t,i)=>e("div",{key:i},e("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),e("span",null,Ls(`${t.ruleKey}`,this.language)?Ls(`${t.ruleKey}`,this.language):t.rule))))))}renderCustomComplexityPopup(){return e("div",{class:"customreg-password__complexity "+(this.showPopup?"":"customreg-password__complexity--hidden")},e("p",{class:"customreg-password__complexity--title"},Ls("PasswordMustContain",this.language)),e("div",{class:"customreg-password__complexity--rules"},this.passwordComplexity.map(((t,i)=>e("div",{class:"customreg-password__complexity--rule",key:i},e("span",{class:`customreg-password__complexity--icon ${t.passed?Ts.PASSWORD_COMPLEXITY_PASSED:Ts.PASSWORD_COMPLEXITY_FAILED}`},t.passed?"✓":"✕"),e("span",null,Ls(t.ruleKey,this.language)||t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"18213d251639938165f3e4ad58bdc904fb953fe2",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"092c431b178682d0006cf6ad5c14b0a7e6fb5569",class:"password__wrapper--flex"},e("label",{key:"64c101b7d70305ecf09735234d902a6b33823551",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"189929eefa1caf71a1be39f0d663eef914d241d5",class:"password__wrapper--relative"},this.tooltip&&e("img",{key:"95ee0d824b5be14ab4e62fc0b5f1731fe6ca5775",class:"password__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("vaadin-password-field",{key:"bf85dde83305233c566b1c50d0286548ba0f48a5",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!this.noValidation&&e("small",{key:"3acbe164ff532bcfcd9e4a237a6f352df0cfdc2d",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.hidePasswordComplexity&&!this.isDuplicateInput&&(this.enableSouthAfricanMode?this.renderCustomComplexityPopup():this.renderComplexityPopup()))}get element(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};Ov.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.password {\n font-family: "Roboto";\n font-style: normal;\n}\n.password__wrapper {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n container-type: inline-size;\n}\n.password__wrapper--autofilled {\n pointer-events: none;\n}\n.password__wrapper--autofilled .password__label {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__wrapper--autofilled .password__input::part(input-field) {\n color: var(--emw--color-black, #000000);\n}\n.password__wrapper--flex {\n display: flex;\n gap: 5px;\n}\n.password__wrapper--relative {\n position: relative;\n}\n.password__label {\n font-family: inherit;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 20px;\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__label--required::after {\n content: "*";\n font-family: inherit;\n color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n margin-left: 2px;\n}\n.password__input {\n width: inherit;\n border: none;\n}\n.password__input[focused]::part(input-field) {\n border-color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n}\n.password__input[invalid]::part(input-field) {\n border: 1px solid var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__input::part(input-field) {\n border-radius: 4px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-100, #E6E6E6);\n color: var(--emw--color-black, #000000);\n background-color: var(--emw--color-white, #FFFFFF);\n font-family: inherit;\n font-style: normal;\n font-weight: 300;\n font-size: 16px;\n line-height: 1.5;\n position: relative;\n margin-bottom: unset;\n height: 44px;\n padding: 0;\n width: 100%;\n}\n.password__input::part(reveal-button) {\n position: relative;\n right: 10px;\n}\n.password__input::part(reveal-button)::before {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__input > input {\n padding: 5px 15px;\n}\n.password__input > input:placeholder-shown {\n color: var(--emw--color-gray-150, #828282);\n}\n.password__error-message {\n position: absolute;\n top: calc(100% + 5px);\n left: 0;\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__complexity {\n height: 150px;\n position: relative;\n padding: 10px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n justify-content: center;\n margin-top: 20px;\n font-weight: 300;\n background: var(--emw--color-white, #FFFFFF);\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n border-radius: 5px;\n border: 1px solid #B0B0B0;\n box-sizing: content-box;\n /* works only in this order */\n}\n.password__complexity meter {\n border-color: transparent; /* Needed for Safari */\n}\n.password__complexity meter[value="1"]::-moz-meter-bar {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter[value="1"]::-webkit-meter-optimum-value {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter:not([value="1"])::-moz-meter-bar {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity--strength {\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.password__complexity--strength meter::-moz-meter-bar { /* Firefox Pseudo Class */\n background: #B0B0B0;\n}\n.password__complexity--hidden {\n display: none;\n}\n.password__complexity--text-bold {\n font-weight: 500;\n}\n.password__complexity--checkbox {\n margin-right: 5px;\n}\n.password__complexity:after {\n content: "";\n position: absolute;\n width: 25px;\n height: 25px;\n border-top: 1px solid var(--emw--color-gray-150, #828282);\n border-right: 0 solid var(--emw--color-gray-150, #828282);\n border-left: 1px solid var(--emw--color-gray-150, #828282);\n border-bottom: 0 solid var(--emw--color-gray-150, #828282);\n bottom: 92%;\n left: 50%;\n margin-left: -25px;\n transform: rotate(45deg);\n margin-top: -25px;\n background-color: var(--emw--color-white, #FFFFFF);\n}\n@container (max-width: 300px) {\n .password__complexity {\n height: 190px;\n }\n .password__complexity:after {\n width: 14px;\n height: 14px;\n bottom: 96%;\n left: 57%;\n }\n}\n.password__tooltip-icon {\n width: 16px;\n height: auto;\n}\n.password__tooltip {\n position: absolute;\n top: 0;\n left: 20px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-150, #828282);\n color: #2B2D3F;\n padding: 10px;\n border-radius: 5px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n z-index: 10;\n}\n.password__tooltip.visible {\n opacity: 1;\n}\n\n.customreg-password__complexity {\n background: var(--emw--color-white, #FFFFFF);\n border-radius: 6px;\n padding: 14px;\n}\n\n.customreg-password__complexity--title {\n font-size: var(--emw--font-size-small, 14px);\n color: var(--emw--color-black, #000000);\n margin-bottom: 12px;\n}\n\n.customreg-password__complexity--rules {\n display: flex;\n flex-direction: column;\n gap: 10px;\n font-size: var(--emw--font-size-small-xs, 12px);\n}\n\n.customreg-password__complexity--rule {\n display: flex;\n align-items: center;\n color: var(--emw--color-black, #000000);\n}\n\n.customreg-password__complexity--icon {\n width: 20px;\n height: 20px;\n min-width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n font-weight: bold;\n border-radius: 50%;\n margin-right: 10px;\n}\n\n.customreg-password__complexity--icon.failed {\n background-color: var(--emw--color-error, #FD2839);\n color: var(--emw--color-white, #FFFFFF);\n}\n\n.customreg-password__complexity--icon.passed {\n background-color: var(--emw--color-lottoball-green, #01af15);\n color: var(--emw--color-white, #FFFFFF);\n}\n\n.customreg-password__complexity::after {\n display: none;\n}';const Lv=class{constructor(e){t(this,e),this.sendAddressValue=i(this,"sendAddressValue",7),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.value="",this.validationPattern="",this.hasManualAddressBeenTriggered=!1,this.touched=!1,this.maxPostalCodeLength="10",this.handleInput=t=>{const e=t.target.value.toUpperCase();this.value=e,this.touched=!0,this.currentPostalCode=e,this.showNoResultsMessage=!1,this.inputReference&&(this.inputReference.value=e),this.value.length<this.postalcodelength&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),(""===this.value||this.value.length<1)&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.value.length>=this.postalcodelength&&(sessionStorage.setItem("currentPostalCode",this.value),this.showNoResultsMessage=!1,this.addresses&&this.addresses.length>0&&(this.openAddressDropdown=!0));const t=this.isValid;this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),t!==this.isValid&&this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),300)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.showNoResultsMessage=!1,this.openAddressDropdown||(this.showNoResultsMessage=!1)},this.handleFocus=()=>{this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&(this.openAddressDropdown=!0)},this.handlePostalCode=(t,e)=>{t.stopPropagation();const i=`${e.number}`.trim(),s=`${e.street}`.trim(),r=`${e.city}`.trim();this.sendAddressValue.emit({city:r,address1:i,address2:s}),this.value=this.currentPostalCode.toLocaleUpperCase(),this.touched=!0,this.isValid=!0,this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.isFetchingAddresses=!1,this.valueHandler({name:this.name,value:this.value}),this.validityStateHandler({valid:!0,name:this.name}),this.valueHandler({name:"address1",value:i}),this.valueHandler({name:"City",value:r}),s&&this.valueHandler({name:"address2",value:s}),this.refreshTrigger++},this.enterAddressManually=()=>{const t=window.targetInputRefs;if(!t)return;const e=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"address2",ref:t.address2},{name:"City",ref:t.City}],i=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"City",ref:t.City}].find((t=>{var e;const i=(null===(e=t.ref)||void 0===e?void 0:e.value)||"";return t.minLength?0===i.length||i.length<t.minLength:0===i.length})),s=(null==i?void 0:i.ref)||t.address1||t.PostalCode;s.scrollIntoView({behavior:"smooth",block:"center"}),this.hasManualAddressBeenTriggered||(this.hasManualAddressBeenTriggered=!0,e.forEach((t=>{var e;if(t.ref){const i=(null===(e=t.ref.shadowRoot)||void 0===e?void 0:e.querySelector("input"))||t.ref;if(i){i.classList.add("pulse-border");const t=()=>{i.classList.remove("pulse-border"),i.removeEventListener("animationend",t)};i.addEventListener("animationend",t)}}}))),s.focus()},this.handleOutsideClick=t=>{if(!this.openAddressDropdown)return;const e=t.composedPath?t.composedPath():[],i=e.includes(this.inputReference),s=e.includes(this.addressesDropdownRef),r=e.some((t=>{var e;return t instanceof Element&&(null===(e=t.classList)||void 0===e?void 0:e.contains("option"))}));i||s||r||(this.openAddressDropdown=!1,this.showNoResultsMessage=!1)},this.name="PostalCode",this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.postalcodelength=void 0,this.addresses=void 0,this.ignoreCountry=!1,this.mbSource=void 0,this.isValid=void 0,this.errorMessage="",this.showTooltip=!1,this.selectedCountryCode="",this.currentPostalCode="",this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.refreshTrigger=0,this.isFetchingAddresses=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value}),!0!==t||this.value.length||this.valueHandler({name:this.name,value:this.value})}handleAddresses(t){t&&t.length>0?(this.openAddressDropdown=!0,this.showNoResultsMessage=!1):(this.openAddressDropdown=!1,this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength&&setTimeout((()=>{this.currentPostalCode.length>=this.postalcodelength&&!this.isFetchingAddresses&&(this.showNoResultsMessage=!0)}),200)),this.isFetchingAddresses=!1}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&(this.resetPostalCodeField(),this.refreshTrigger++)}handleFetchStarted(){this.showNoResultsMessage=!1,this.isFetchingAddresses=!0,this.openAddressDropdown=!1}connectedCallback(){this.validationPattern=this.setPattern()}componentWillLoad(){this.defaultValue&&(this.value=this.defaultValue)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.defaultValue&&this.valueHandler({name:this.name,value:this.value}),this.inputReference&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.setValidity(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}setValidity(){if(!this.inputReference)return!1;const t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(!this.touched)return"";if(this.inputReference.validity.valueMissing)return Ls(Ns,this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong){const{minLength:t,maxLength:e}=this.validation;return t===e?Ls(Os,this.language,{values:{length:t}}):Ls(Fs,this.language,{values:{minLength:t,maxLength:e}})}if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return Ls(`${i}`,this.language)||s}return""}resetPostalCodeField(){this.value="",this.currentPostalCode="",this.showNoResultsMessage=!1,this.openAddressDropdown=!1,this.isFetchingAddresses=!1,sessionStorage.removeItem("currentPostalCode"),this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name})}renderTooltip(){return this.showTooltip?e("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}determineInputValue(){return this.inputReference&&this.name&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.value}render(){var t,i;let s="";this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid");let r="UK"===this.selectedCountryCode||"GB"===this.selectedCountryCode||this.ignoreCountry,o=(null===(t=this.addresses)||void 0===t?void 0:t.length)>0&&this.openAddressDropdown&&r,n=this.showNoResultsMessage&&this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&0===(null===(i=this.addresses)||void 0===i?void 0:i.length)&&r,a=this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength;return e("div",{key:"f0dda39cf9a02d53213848926908c0cb39d1cd3f",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},e("div",{key:"5e1c51af264392d2be986e305e6526310f55f40b",class:"text__wrapper--flex"},e("label",{key:"c12c45d88bdf42aeb6be505d473ab0f55da2be87",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"7b93a75f19590b445227fa1a64c90fd20c0afd5d",class:"text__wrapper--relative"},this.tooltip&&e("img",{key:"504004a13595694307c1e3450b69982150dc55fd",class:"text__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("div",{key:"19de66fd72fd0a6befe3bbaebb6c8f99ec5f850b",class:"input__text-wrapper"},e("input",{key:"78cd4229ed5104518b991df0bc6bf527df2ec3e2",name:this.name,id:`${this.name}__input`,value:this.determineInputValue(),type:"text",class:`text__input ${s}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.maxPostalCodeLength,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!r&&e("p",{key:"6b9e307d59fb9fed93f4df6c07a091d299844c62",class:"address__manual-input-msg",onClick:()=>this.enterAddressManually()},Ls("enterIEAddressManually",this.language)),o&&e("div",{key:"ecb7892a9a8d967540d8fd013518ae19498fcd48",class:"input__addresses-container",ref:t=>this.addressesDropdownRef=t},e("div",{key:"a5ef3f81a85207a821964e23b21aaf783be807cc",class:"options"},this.addresses.map(((t,i)=>e("div",{key:i,class:"option",onClick:e=>this.handlePostalCode(e,t)},t.number," ",t.street," ",t.city))))),a&&e("div",{key:"338c17e484721efb387e608f3ce4416a0e47b8af",class:"postalcode__loading-spinner"},e("div",{key:"7638cea4fba975e3a27d4cb00bce217129bd0750",class:"loading-spinner"}),e("span",{key:"b59a8a9c3d7ecf209a68717346d1d29062994f79"},Ls("searchingForAddresses",this.language))),n&&e("div",{key:"212a74fed94b3ee089aed5c9afb544966b5f11cd",class:"postalcode__no-results-message"},Ls("postalLookUpNoAddressFound",this.language))),e("small",{key:"4f66e97dd811b9917c92ff4bcbf236817ac57933",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],addresses:["handleAddresses"]}}};Lv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.input__text-wrapper{position:relative}.input__addresses-container{position:relative;left:0;width:100%;background:var(--emw--color-white);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1);max-height:200px;overflow-y:auto;z-index:999;margin-top:4px}.input__addresses-container .options{padding:4px 0}.input__addresses-container .option{padding:8px 12px;cursor:pointer;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6);font-size:14px;line-height:1.4;transition:background-color 0.2s ease;color:var(--emw--registration-gray-800, #333)}.input__addresses-container .option:last-child{border-bottom:none}.input__addresses-container .option:hover{background-color:var(--emw--registration-lightgray-100, #f8f9fa)}.input__addresses-container .option:active{background-color:var(--emw--registration-lightgray-200, #e9ecef)}.input__addresses-container::-webkit-scrollbar{width:6px}.input__addresses-container::-webkit-scrollbar-track{background:var(--emw--registration-lightgray-150, #f1f1f1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb{background:var(--emw--registration-lightgray-300, #c1c1c1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb:hover{background:var(--emw--registration-lightgray-400, #a8a8a8)}.postalcode__no-results-message{color:var(--emw--color-error, var(--emw--color-red, #ed0909));margin-top:10px}.address__manual-input-msg{text-decoration:underline;margin-top:10px;cursor:pointer;transition:opacity 0.3s ease}.address__manual-input-msg:active{opacity:0.7}.postalcode__loading-spinner{display:flex;align-items:center;gap:8px;padding:12px;color:var(--emw--registration-gray-600, #666);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-top:none;background-color:var(--emw--registration-lightgray-50, #f9f9f9)}.loading-spinner{width:14px;height:14px;border:2px solid var(--emw--color-gray-100, #E6E6E6);border-top:2px solid var(--emw--registration-gray-600, #666);border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}';const Bv=class{constructor(e){t(this,e),this.sendInputValue=i(this,"sendInputValue",7),this.sendValidityState=i(this,"sendValidityState",7),this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling()}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language)}renderTooltip(){return this.showTooltip?e("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return e("fieldset",{key:"7048de0e37c9541af1c9788e8b46c789ca788c31",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},e("legend",{key:"403b739c966d510740ca59621c094872b93e2cba",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>e("div",{class:"radio__wrapper"},e("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),e("label",{htmlFor:`${t.label}__input`},t.label)))),e("small",{key:"46dce1082a6aa9f2a5bdc3e3654c924fcd2a8357",class:"radio__error-message"},this.errorMessage),this.tooltip&&e("img",{key:"dfe155a429485b5c891db2943d9115cdc40e169b",class:"radio__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Bv.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";const Uv=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.touched=!1,this.handleComboChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=t=>{const e=t.currentTarget;e.opened||(this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}))},this.handleSelectChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value}))),this.isComboBox=(null===(t=this.displayedOptions)||void 0===t?void 0:t.length)>6}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{var e;const i=Object.keys(t)[0];this.displayedOptions=t[i].map((t=>({label:t.Name,value:t.Alpha2Code}))),this.isComboBox=(null===(e=this.displayedOptions)||void 0===e?void 0:e.length)>6}))}}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.inputReference=this.vaadinCombo.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.inputReference&&(this.inputReference.value=this.value)),this.isValid=this.setValidity(),!this.isComboBox&&this.vaadinCombo&&this.vaadinCombo.addEventListener("opened-changed",(t=>{if(!0===t.detail.value)this.errorMessage="";else{const e=t.currentTarget;this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})}}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){var t;return!(null===(t=this.validation)||void 0===t?void 0:t.mandatory)||!!this.value}setErrorMessage(){var t,e,i;if((null===(e=null===(t=this.inputReference)||void 0===t?void 0:t.validity)||void 0===e?void 0:e.valueMissing)||(null===(i=this.vaadinCombo)||void 0===i?void 0:i.invalid))return Ls("requiredError",this.language)}renderTooltip(){return this.showTooltip?e("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t,i;let s="";return this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"eb6c9d7d85546159d44d06a0635f173263edd7d1",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"0fd71c528870966fdb23049b1806a267e9e6ca5c",class:"select__wrapper--flex"},e("label",{key:"44aeb4e50ab2f79df06741ff07ac03131c987447",class:"select__label",htmlFor:`${this.name}__input`},this.displayName,e("span",{key:"796a83aeadd480a571b6bae035a46138d7b10b24",class:this.validation.mandatory?"select__label--required":""})),e("div",{key:"6d7b2d785c6b0bdd05c7444f563b21cedf26ff7c",class:"select__wrapper--relative"},this.tooltip&&e("img",{key:"f33e43a9d42e8b8d1cf136374505eeaedcbede26",class:"select__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),this.isComboBox?e("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(t=this.validation)||void 0===t?void 0:t.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleComboChange,onBlur:this.handleBlur}):e("vaadin-select",{name:this.name,popover:!1,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(i=this.validation)||void 0===i?void 0:i.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleSelectChange,"no-vertical-overlap":!0,noVerticalOverlap:!0}),e("small",{key:"261b3c4abc9b360e6b937d851f8bfc810280a8c6",class:"select__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Uv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%;--_invalid-hover-highlight:transparent;--vaadin-input-field-invalid-hover-highlight:transparent}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]:not(.text__input--invalid)::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.select__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const jv=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.setPhoneValue(t.target.value),this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.isValidValue(),this.applyCustomError(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.touched=!0,this.isValid=this.isValidValue(),this.applyCustomError(),this.errorMessage=this.setErrorMessage()},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.showLabels=void 0,this.action=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.enableCustomRegexValidation=!1,this.isValid=void 0,this.errorMessage=void 0,this.showTooltip=!1,this.disablePhonePrefix=!1,this.phoneValue="",this.phoneCodesOptions=void 0}setPhoneValue(t){const e=t.replace(/[^0-9]/g,"");this.phoneValue=e,this.inputReference&&(this.inputReference.value=this.phoneValue)}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}resetValidationState(){this.lastCustomErrorKey=void 0,this.lastCustomErrorMessage=void 0,this.inputReference.setCustomValidity("")}isMissingValue(t){return this.validation.mandatory&&""===t}isFixedLength(t){const e=this.validation.minLength,i=this.validation.maxLength;return!(!e||!i||e!==i||t.length===e)}isTooShort(t){const e=this.validation.minLength;return!!(e&&t.length<e)}isTooLong(t){const e=this.validation.maxLength;return!!(e&&t.length>e)}failsPattern(t){if(!this.validationPattern)return!1;let e;try{e=new RegExp(this.validationPattern)}catch(t){return console.warn("Invalid validationPattern:",this.validationPattern,t),!1}return!e.test(t)}failsCustomRules(t){const e=(this.validation.custom||[]).filter((t=>"regex"===t.rule&&t.pattern)),[,...i]=e;for(const e of i){let i;try{i=new RegExp(e.pattern)}catch(t){console.warn("Invalid regex pattern:",e.pattern,t);continue}if(!i.test(t))return!0}return!1}connectedCallback(){var t;this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.setPhoneValue(null!==(t=this.defaultValue.phone)&&void 0!==t?t:""),this.phoneCodesOptions=[{label:this.prefixValue,value:this.prefixValue}])}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>"object"==typeof t&&t.Prefix?{label:t.Prefix,value:t.Prefix}:{label:t,value:t})),this.disablePhonePrefix=this.phoneCodesOptions.length<=1}))}}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.isValid=this.isValidValue(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}isValidValue(){var t,e;if(!this.inputReference)return!1;this.resetValidationState();const i=null!==(e=null===(t=this.phoneValue)||void 0===t?void 0:t.trim())&&void 0!==e?e:"",s=""===i;return!(this.isMissingValue(i)||!s&&(this.isFixedLength(i)||this.isTooShort(i)||this.isTooLong(i)||this.failsPattern(i)||this.failsCustomRules(i)))}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if((null===(e=null===(t=this.inputReference)||void 0===t?void 0:t.validity)||void 0===e?void 0:e.customError)||(this.lastCustomErrorKey=void 0,this.lastCustomErrorMessage=void 0),this.inputReference.validity.patternMismatch){const t=null===(i=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===s?void 0:s.errorMessage;return Ls(`${t}`,this.language)?Ls(`${t}`,this.language):e}const{minLength:r,maxLength:o}=this.validation;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong||r&&this.phoneValue&&this.phoneValue.length<r||o&&this.phoneValue&&this.phoneValue.length>o)return r===o?Ls(Os,this.language,{values:{length:r}}):Ls(Fs,this.language,{values:{minLength:r,maxLength:o}});if(this.inputReference.validity.valueMissing)return Ls(Ns,this.language);if(this.inputReference.validity.customError&&(this.lastCustomErrorKey||this.lastCustomErrorMessage)){return(this.lastCustomErrorKey?Ls(`${this.lastCustomErrorKey}`,this.language):"")||this.lastCustomErrorMessage||""}}applyCustomError(){const t=(this.validation.custom||[]).filter((t=>"regex"===t.rule&&t.pattern)),[,...e]=t;for(const t of e){let e;try{e=new RegExp(t.pattern)}catch(e){console.warn("[applyCustomError] invalid regex pattern:",t.pattern,e);continue}if(!e.test(this.phoneValue))return this.lastCustomErrorKey=t.errorKey,this.lastCustomErrorMessage=t.errorMessage,void this.inputReference.setCustomValidity("customError")}}renderTooltip(){return this.showTooltip?e("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t;let i="";return this.touched&&(i=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"82da44bb2bacec9efb3631e377978d678e766919",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"4ca8d6dde2d3f8e15e2d26d593297519e0c94053",class:"tel__wrapper--flex-label"},e("label",{key:"3b0e2736fd47537b2ecd80cf49a146992d59474e",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"1577aafc7b68128e91cdfe9ddc563bbad9d7b901",class:"tel__wrapper--relative"},this.tooltip&&e("img",{key:"cb6576e1248fc52f937c685d59d994a1d098d7cc",class:"tel__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("div",{key:"a1e9f3c68691fbb61947cd41c0ffddcd124b4bbb",class:`tel__wrapper--flex ${i}`},e("vaadin-combo-box",{key:"9aa33a487f019ee7393e29a0ce0d1836a23f5e09",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.disablePhonePrefix,onChange:t=>this.handlePrefixInput(t)}),e("input",{key:"21d69c041b9a5f5f6fb1e6d7b392945cafe99e87",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:null!==(t=this.phoneValue)&&void 0!==t?t:"",placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),e("small",{key:"76febe89ad7ee581eb5fc79658d81123da08ccdd",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};jv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden;padding-left:4px}.tel__wrapper--flex:focus-within{border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__wrapper .text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){height:100%;border-radius:0 5px 5px 0;background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emw--color-white, #FFFFFF)}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emw--registration-typography, var(--emw--color-black, #000000));background-color:var(--emw--color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emw--color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const Yv=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.postalcodelength=5,this.touched=!1,this.handleInput=t=>{const e=t.target,i=!this.enableSouthAfricanMode||this.name!==Ts.FIRSTNAME_ON_DOCUMENT&&this.name!==Ts.LASTNAME_ON_DOCUMENT?e.value:e.value.replace(Ts.NON_LETTERS_REGEX,"");i!==e.value&&(e.value=i),this.value=i,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.updateValidationState(),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.updateValidationState()},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.haspostalcodelookup=void 0,this.enableSouthAfricanMode=void 0,this.mbSource=void 0,this.isValid=void 0,this.errorMessage="",this.showTooltip=!1,this.selectedCountryCode=""}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&this.updateValidationState()),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&this.touched&&this.updateValidationState()}handleValidationChange(t){t.detail.field===this.name&&(this.validation=t.detail.validation,this.validationPattern=this.setPattern(),this.touched&&(this.isValid=this.isValidValue(),this.errorMessage=this.setErrorMessage()))}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&["address1","address2","City"].includes(this.name)&&(this.value="",this.touched=!1,this.errorMessage="",this.isValid=!1,this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name}))}handleAddressSelection(t){const{city:e,address1:i,address2:s}=t.detail;if(!["address1","address2","City"].includes(this.name))return;let r="";"address1"===this.name?r=i:"address2"===this.name?r=s:"City"===this.name&&(r=e),this.value=r,this.touched=!0,this.updateValidationState()}connectedCallback(){this.validationPattern=this.setPattern()}handleExternalDocUpdate(t){this.name===Ts.DOCUMENT_NUMBER&&(this.value=t.detail||"",this.touched=!0,this.inputReference&&(this.inputReference.value=this.value),this.sendInputValue.emit({name:this.name,value:this.value}),this.updateValidationState())}handleDocReset(){this.name===Ts.DOCUMENT_NUMBER&&(this.value="",this.touched=!1,this.isValid=!1,this.errorMessage="",this.inputReference&&(this.inputReference.value=""),this.validityStateHandler({valid:!1,name:this.name}))}componentWillLoad(){this.defaultValue&&(this.value=this.defaultValue)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.haspostalcodelookup&&["address1","address2","City","PostalCode"].includes(this.name)&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.isValidValue()}validateDocument(t,e){const i=t.trim();if(e===Ts.PASSPORT)return Ts.PASSPORT_NUMERIC_REGEX.test(i)?{valid:!0}:{valid:!1,errorKey:"PassportLengthError"};if(e===Ts.SOUTH_AFRICAN_ID){if(i.length!==Ts.SOUTH_AFRICAN_ID_LENGTH)return{valid:!1,errorKey:"SAIdLengthError"};const t=(t=>{if(!Ts.SA_ID_BASIC_REGEX.test(t))return!1;const e=t.split("").map((t=>parseInt(t,10)));let i=0;for(let t=0;t<12;t+=2)i+=e[t];let s="";for(let t=1;t<12;t+=2)s+=e[t];return(10-(i+(2*parseInt(s,10)).toString().split("").reduce(((t,e)=>t+parseInt(e,10)),0))%10)%10===e[12]})(i);return t?{valid:!0}:{valid:!1,errorKey:"SAIdInvalidError"}}return{valid:!0}}updateValidationState(){const t=this.isValidValue();this.isValid=t,this.errorMessage=this.touched?t?"":this.setErrorMessage():""}isValidValue(){if(!this.inputReference)return!1;if(this.enableSouthAfricanMode&&this.name===Ts.DOCUMENT_NUMBER){const t=window.documentTypeValue;return this.validateDocument(this.value,t).valid}return""===this.value.trim()&&!this.validation.mandatory||this.inputReference.validity.valid&&(!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern))}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;const r=this.value.trim();if(this.enableSouthAfricanMode&&this.name===Ts.DOCUMENT_NUMBER){const t=window.documentTypeValue,e=this.validateDocument(this.value,t);return e.valid?"":Ls(e.errorKey,this.language)}if(""===r&&!this.validation.mandatory)return"";if(this.inputReference.validity.valueMissing)return Ls(Ns,this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong){const{minLength:t,maxLength:e}=this.validation;return t===e?Ls(Os,this.language,{values:{length:t}}):Ls(Fs,this.language,{values:{minLength:t,maxLength:e}})}if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return Ls(`${i}`,this.language)||s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return Ls(`${t}`,this.language)?Ls(`${t}`,this.language):e}return""}renderTooltip(){return this.showTooltip?e("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"f48e592bac049022b283bac917c095772b1508f5",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},e("div",{key:"fe3626ead38dd18dfa14795ee2332e93f5f09652",class:"text__wrapper--flex"},e("label",{key:"6b2854b460e0ac7d4ae0ebccc06dbe64770581d5",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"f29d266973bd700a4270495bc4eb6e8296b6eeaf",class:"text__wrapper--relative"},this.tooltip&&e("img",{key:"68e69abbb78250e763822608e963bc16d702f099",class:"text__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("input",{key:"99b8eab15ab32656f86fedd3f36a09a5bbe108d3",name:this.name,id:`${this.name}__input`,value:this.value,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.enableSouthAfricanMode?"":this.validation.minLength,maxlength:this.enableSouthAfricanMode?"":this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),e("small",{key:"cc28c1c19370faa94fa1f738066042dce8d694ce",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Yv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}';const Rv=class{constructor(e){t(this,e),this.expireTime=void 0,this.language="en",this.displayTime=void 0,this.isExpireInDay1=!1}componentWillLoad(){this.timer=setInterval((()=>this.updateDisplayTime()),1e3),this.updateDisplayTime()}disconnectedCallback(){clearInterval(this.timer)}startTimeChanged(){clearInterval(this.timer),this.timer=setInterval((()=>this.updateDisplayTime()),1e3),this.updateDisplayTime()}updateDisplayTime(){const t=x(),e=x(this.expireTime);if(!e.isValid())return this.displayTime="Invalid date",void clearInterval(this.timer);const i=x.duration(e.diff(t));if(this.isExpireInDay1=i.asDays()>1,i.asMilliseconds()<=0)return this.displayTime="00:00:00",void clearInterval(this.timer);const s=Math.floor(i.asHours());if(s>=48)this.displayTime=`${Math.floor(i.asDays())} ${u("days",this.language)}`;else if(s>=24)this.displayTime="1 day";else{const t=s,e=i.minutes(),r=i.seconds();this.displayTime=[t,e,r].map((t=>String(t).padStart(2,"0"))).join(":")}}render(){return[this.isExpireInDay1&&e("span",{key:"8432bdb52f3b5ecd2600c68179a0ee55d785c20c",class:"Label"},u("expiresIn",this.language)),e("span",{key:"6392f23c29ea2b9d02cbf3fec2cc19bfdfbb91c9",class:"TimeCountDown "+(this.isExpireInDay1?"":"Highlighted")},this.displayTime)]}static get watchers(){return{expireTime:["startTimeChanged"]}}},Vv=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.callBackObject={},this.subFieldsObject={},this.value="",this.handleRevealField=(t,e)=>{t.stopPropagation(),window.postMessage({type:`registration${e}Clicked`},window.location.href)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.options=void 0,this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1,this.showFields="true"===this.defaultValue}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),0!==this.options.length&&this.options.forEach((t=>{this.callBackObject[t.name]=e=>{this.handleRevealField(e,t.name)},this.subFieldsObject[t.name].addEventListener("click",this.callBackObject[t.name])}))}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.valueHandler({name:this.name,value:this.checkboxReference.checked?"true":"false",type:"toggle"})}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return Ls("requiredError",this.language)}disconnectedCallback(){this.options.forEach((t=>{this.subFieldsObject[t.name].removeEventListener("click",this.callBackObject[t.name])}))}renderLabel(){return e("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},e("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?e("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return e("div",{key:"31cd24b5da24368eef2f53952714395d6d9f6285",class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"aa14784bd8a3870f7015db79d23226521706ad58",class:"togglecheckbox__wrapper--flex"},e("input",{key:"0237f06c99b8b2ed7de80433f5b93b9eae7c25f5",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),e("small",{key:"7e26bea1cfcc725d5aa5a795fd0f999d99abe39d",class:"togglecheckbox__error-message"},this.errorMessage),e("div",{key:"4256fc552545b7a1050ff5cdeb005f5ea83cc5c1",class:"togglecheckbox__wrapper--relative"},this.tooltip&&e("img",{key:"be3c3e036f0bfe46658fce870ae0ffa258229e7d",class:"togglecheckbox__tooltip-icon",src:Bs,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),e("div",{key:"2d61bedaac02f21116318b10a21b361e70e0213f",class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>e("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,ref:e=>this.subFieldsObject[t.name]=e})))))}static get watchers(){return{clientStyling:["handleClientStylingChange"]}}};Vv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';const Hv=class{constructor(e){t(this,e),this.registrationWidgetLoaded=i(this,"registrationWidgetLoaded",7),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.resendCode=i(this,"resendCode",7),this.validationPattern="",this.stylingContainer=null,this.tooltipReference=null,this.tooltipIconReference=null,this.inputRefs=[],this.containerRef=null,this.resendInterval=null,this.resendCodeHandler=()=>{this.triggerResendInterval(),this.resendCode.emit()},this.setInputRef=(t,e)=>{t&&(this.inputRefs[e]=t)},this.setContainerRef=t=>{t&&(this.containerRef=t)},this.triggerResendInterval=()=>{this.isResendButtonAvailable=!1,this.resendInterval&&clearInterval(this.resendInterval),this.resendInterval=setInterval((()=>{--this.resendIntervalSecondsLeft<=0&&(clearInterval(this.resendInterval),this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.isResendButtonAvailable=!0)}),1e3)},this.formatTime=()=>{const t=String(Math.floor(this.resendIntervalSecondsLeft/60));let e=String(this.resendIntervalSecondsLeft%60);return 1===e.length&&(e="0"+e),`${t}:${e}`},this.handleInput=(t,e)=>{const i=t.target,s=i.value.slice(-1);if(i.value=s,!s)return;this.code[e]=s,this.enableSouthAfricanMode&&(this.revealedIndexes=[e],this.revealTimeout&&clearTimeout(this.revealTimeout),this.revealTimeout=setTimeout((()=>{this.revealedIndexes=[]}),500));const r=this.inputRefs[e+1];r&&r.focus(),this.setValidity(),this.setErrorMessage()},this.name="",this.displayName="",this.placeholder="",this.validation=void 0,this.tooltip="",this.language="en",this.emitValue=!0,this.destination="",this.resendIntervalSeconds=60,this.clientStyling="",this.enableSouthAfricanMode=void 0,this.pinAttemptsExceeded=void 0,this.clientStylingUrl="",this.mbSource=void 0,this.startCountDown=!1,this.isValid=!1,this.isResendButtonAvailable=!this.startCountDown,this.showTooltip=!1,this.errorMessage="",this.code=[],this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.revealedIndexes=[]}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.code.join("")})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.code.join("")})}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!==e&&this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl)}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.validationPattern=this.setPattern(),this.code=new Array(null===(t=this.validation)||void 0===t?void 0:t.maxLength).fill("")}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.setValidity(),this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),this.startCountDown&&this.triggerResendInterval(),this.handleClientStyling()}handleKeyDown(t,e){if("Backspace"===t.key){const t=[...this.code];t[e]="",this.code=t,this.enableSouthAfricanMode&&(this.revealedIndexes=this.revealedIndexes.filter((t=>t!==e)));const i=this.inputRefs[e-1];null==i||i.focus()}this.setValidity(),this.setErrorMessage()}handlePaste(t){var e,i;t.preventDefault();const s=null===(i=null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text"))||void 0===i?void 0:i.trim();if(!s)return;const r=s.slice(0,this.validation.maxLength).split("");this.code=[...r,...new Array(this.validation.maxLength-r.length).fill("")],this.enableSouthAfricanMode&&(this.revealedIndexes=r.map(((t,e)=>e)),this.revealTimeout&&clearTimeout(this.revealTimeout),this.revealTimeout=setTimeout((()=>{this.revealedIndexes=[]}),500));const o=this.inputRefs[Math.min(r.length,this.inputRefs.length-1)];null==o||o.focus(),this.setValidity(),this.setErrorMessage(),this.enableSouthAfricanMode&&(this.valueHandler({name:this.name,value:this.code.join("")}),this.validityStateHandler({valid:this.isValid,name:this.name}))}setValidity(){var t;const e=this.code.join(""),i=e.length===(null===(t=this.validation)||void 0===t?void 0:t.maxLength),s=null!==e.match(this.validationPattern);this.isValid=i&&s}setPattern(){var t,e,i,s,r;return this.validation&&(null===(t=this.validation)||void 0===t?void 0:t.custom)&&this.validation.custom.length>0&&null!==(r=null===(s=null===(i=null===(e=this.validation)||void 0===e?void 0:e.custom)||void 0===i?void 0:i.find((t=>"regex"===t.rule)))||void 0===s?void 0:s.pattern)&&void 0!==r?r:""}setErrorMessage(){var t,e,i;if(null!==this.code.join("").match(this.validationPattern))this.errorMessage="";else{const s=null===(i=null===(e=null===(t=this.validation)||void 0===t?void 0:t.custom)||void 0===e?void 0:e.find((t=>"regex"===t.rule)))||void 0===i?void 0:i.errorKey;s&&(this.errorMessage=Ls(s,this.language))}}renderTooltip(){return this.showTooltip?e("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}getInputDisplayValue(t){const e=this.code[t];return e?this.enableSouthAfricanMode?this.revealedIndexes.includes(t)?e:"*":e:""}render(){return e("div",{key:"c2accac3362fe80b2f78ff5f7f76fe45871d63b3",class:"twofa",ref:t=>this.stylingContainer=t},e("div",{key:"8cae1d115652698e0d579de8762ad767448c7bc5",class:"twofa__error-message"},e("p",{key:"73a3a6138d131dab6ae052401e7b4b44619b2a1b"},this.errorMessage)),e("div",{key:"447cebaf6d1f21f6b25af4a2a49932446eae812f",class:"twofa__description",innerHTML:Ls("twofaDescription",this.language,{values:{destination:this.destination}})}),e("div",{key:"72732322e151bdbcecbde20a348c54b79a9a064e",class:"twofa__input-wrapper",ref:this.setContainerRef},this.code.map(((t,i)=>e("input",{key:i,ref:t=>this.setInputRef(t,i),id:`otp-input-${i}`,type:"text",maxLength:2,value:this.getInputDisplayValue(i),onInput:t=>this.handleInput(t,i),onKeyDown:t=>this.handleKeyDown(t,i),onPaste:t=>this.handlePaste(t)})))),e("div",{key:"57062c200893d084fd0328ec6363b16821413f5e",class:"twofa__button-wrapper"},e("p",{key:"dafc860bf614c3c274c1b144bfc1584a347458de",class:"twofa__resend-message"},Ls("twofaResendMessage",this.language)),e("button",{key:"6d1bc6083e98c23879070f91a29b709b0223b02c",class:"twofa__resend-button "+(this.pinAttemptsExceeded?"twofa__resend-button--disabled":""),onClick:this.resendCodeHandler,disabled:!this.isResendButtonAvailable||this.pinAttemptsExceeded},this.isResendButtonAvailable?Ls("twofaResendButton",this.language):this.formatTime())))}get host(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Hv.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.twofa{display:flex;flex-direction:column;gap:10px}.twofa__description{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center}.twofa__error-message{text-align:center;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.twofa__input-wrapper{display:flex;justify-content:center}.twofa__input-wrapper input{width:35px;height:35px;padding:10px;text-align:center;border-radius:var(--emw--border-radius-small, 5px);margin-left:5px;margin-right:5px;border:2px solid var(--emw--otp-border-color, #55525c);font-weight:var(--emw-font-weight-bold, 800);outline:none;transition:all 0.1s}.twofa__input-wrapper input:focus{border:2px solid var(--emw--color-primary, #22B04E);box-shadow:0 0 2px 2px var(--emw--color-primary, #22B04E)}.twofa__button-wrapper{justify-content:center;text-align:center}.twofa__button-wrapper button{border:none;background:none;font-weight:var(--emw-font-weight-bold, 800);color:var(--emw--color-primary, #22B04E);cursor:pointer}";const Gv=class{constructor(e){t(this,e),this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.imgLoaded=!1,this.shouldLoad=!1}handleSrc(){if(!this.shouldLoad)return;const t=new Image;t.onload=()=>{this.image&&(this.image.src=this.src,this.imgLoaded=!0,t.onload=null)},t.src=this.src}componentDidLoad(){"IntersectionObserver"in window?(this.el.__uxComponent=this,window.EMUxObserver||(window.EMUxObserver=new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){const e=t.target.__uxComponent;e&&(e.shouldLoad=!0,e.handleSrc()),window.EMUxObserver.unobserve(t.target)}}))}),{rootMargin:this.detectDistance})),window.EMUxObserver.observe(this.el)):(this.shouldLoad=!0,this.handleSrc())}render(){return e(r,{key:"f506ba73852f257ad80bf59ca177d2065a5f365e",class:"HostContainer"},!this.imgLoaded&&e("ui-skeleton",{key:"564ebfab701f827ddc2debccb7615926dbc9e876",class:"UiContainer",structure:"image",width:"100%",height:"100%"}),e("img",{key:"2188ca4494c10587f064acc5459ffc468948f497",ref:t=>this.image=t,src:this.shouldLoad?this.src:void 0,onLoad:()=>this.imgLoaded=!0,style:this.styles,class:"UiContainer "+(this.imgLoaded?"Visible":"Hidden"),alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}get el(){return s(this)}static get watchers(){return{src:["handleSrc"]}}};Gv.style=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}";const $v=class{constructor(e){t(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}handleStylingProps(t){switch(typeof t){case"number":return 0===t?0:`${t}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(t)||t.endsWith("px")||t.endsWith("%")?t:"unset"}}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return e("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return e("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((t,i)=>e("div",{key:i,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let t="";switch(this.structure){case"logo":t=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":t=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":t=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":t=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":t=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":t=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:t=""}return e(r,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},e("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},t),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};$v.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{v as bonus_elevate_powerups,Ps as bonus_elevate_powerups_history,Ds as bonus_pagination_nav,Us as checkbox_group_input,js as checkbox_input,kn as date_input,Cn as email_input,Nv as general_input,Fv as number_input,Ov as password_input,Lv as postalcode_input,Bv as radio_input,Uv as select_input,jv as tel_input,Yv as text_input,Rv as time_count,Vv as toggle_checkbox_input,Hv as twofa_input,Gv as ui_image,$v as ui_skeleton}
|
|
6665
|
+
`}static get is(){return"vaadin-tabs"}}On(zv);const Nv=class{constructor(e){t(this,e),this.registrationWidgetLoaded=i(this,"registrationWidgetLoaded",7),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.noValidation=!1,this.clientStyling="",this.clientStylingUrl="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1,this.twofaDestination=void 0,this.twofaResendIntervalSeconds=60,this.twofaStartCountDown=!1,this.haspostalcodelookup=void 0,this.postalcodelength=void 0,this.addresses=[],this.ignoreCountry=!1,this.enableSouthAfricanMode=void 0,this.enableManualDateInput=!1,this.pinAttemptsExceeded=void 0,this.mbSource=void 0,this.enableCustomRegexValidation=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!==e&&this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl)}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{Ts[e]=Ts[e]||{};for(let i in t[e])"string"==typeof t[e][i]&&(Ts[e]=Ts[e]||{},Ts[e][i]=t[e][i])})),e(!0)}))})))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.handleClientStyling(),this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href)}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return this.haspostalcodelookup&&"PostalCode"===this.name?e("postalcode-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,postalcodelength:this.postalcodelength,addresses:this.addresses,ignoreCountry:this.ignoreCountry,"mb-source":this.mbSource}):e("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,haspostalcodelookup:this.haspostalcodelookup,"enable-south-african-mode":this.enableSouthAfricanMode,"mb-source":this.mbSource});case"email":return e("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"mb-source":this.mbSource});case"number":return e("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"mb-source":this.mbSource});case"checkbox":return e("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,"mb-source":this.mbSource});case"checkboxgroup":return e("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"mb-source":this.mbSource});case"togglecheckbox":return e("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick,"mb-source":this.mbSource});case"datetime":return e("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick,"enable-south-african-mode":this.enableSouthAfricanMode,"enable-manual-date-input":this.enableManualDateInput,"mb-source":this.mbSource});case"password":return e("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,hidePasswordComplexity:this.hidePasswordComplexity,"no-validation":this.noValidation,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"enable-south-african-mode":this.enableSouthAfricanMode,"mb-source":this.mbSource});case"radio":return e("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,"mb-source":this.mbSource});case"tel":return e("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"mb-source":this.mbSource,"enable-custom-regex-validation":this.enableCustomRegexValidation});case"dropdown":return e("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"mb-source":this.mbSource});case"twofa":return e("twofa-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,destination:this.twofaDestination,"resend-interval-seconds":this.twofaResendIntervalSeconds,"start-count-down":this.twofaStartCountDown,"enable-south-african-mode":this.enableSouthAfricanMode,"pin-attempts-exceeded":this.pinAttemptsExceeded,"mb-source":this.mbSource});case"label":if(this.displayName&&""!==this.displayName.trim())return e("div",{class:"general-non-input",innerHTML:this.displayName});e("p",null,"No content in label type");default:return e("p",null,"The ",this.type," input type is not valid")}}render(){return e(r,{key:"66f9570a413592a61ea7f18190bcdde82077ab34",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}get host(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Nv.style=":host{display:block;height:100%}";const Fv=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return Ls("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return Ls(`${i}`,this.language)?Ls(`${i}`,this.language):s}}renderTooltip(){return this.showTooltip?e("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"bd11140dc6c8ddb6b800d4fe6544df733c5157c4",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"c8318c687bc471fc225b9aba52686e38ecb400de",class:"number__wrapper--flex"},e("label",{key:"7eaf64057ef71b07a0defc1e372fd85baab2bd68",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"99f4151f50a7fb0abb9a8e53bacc8c8bd303d659",class:"number__wrapper--relative"},this.tooltip&&e("img",{key:"875d6284697dc06ac05c682509856faeade3d8be",class:"number__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("input",{key:"f1f563567cde4a744c68e27ab91a3d795f596be6",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),e("small",{key:"0226f04a059fd8763822483de42bd7e647040bf3",class:"number__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Fv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';const Ov=class{constructor(e){t(this,e),this.sendOriginalValidityState=i(this,"sendOriginalValidityState",7),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.noValidation=!1,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.clientStyling="",this.enableSouthAfricanMode=void 0,this.mbSource=void 0,this.isValid=void 0,this.errorMessage=void 0,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.passwordButton.addEventListener("click",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.noValidation?[]:this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern);let s=!1;return t&&(s=i.test(t)),{rule:e.displayName,ruleKey:e.errorKey,passed:s}}))}setValidity(){var t,e;return!!this.noValidation||(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s,r;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return Ls("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language);if(this.isDuplicateInput&&!this.originalValid)return Ls("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return Ls(`${i}`,this.language)?Ls(`${i}`,this.language):s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return Ls(`${t}`,this.language)?Ls(`${t}`,this.language):e}return(null===(r=this.passwordComplexity)||void 0===r?void 0:r.every((t=>t.passed)))||this.showPopup?void 0:Ls("invalidPassword",this.language)}renderTooltip(){return this.showTooltip?e("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,i=this.passwordComplexity.filter((t=>t.passed)).length/t,s=this.passwordComplexity.every((t=>t.passed));return e("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},e("div",{class:"password__complexity--strength"},e("p",{class:"password__complexity--text"},Ls("passwordStrength",this.language)," ",e("span",{class:"password__complexity--text-bold"},Ls(s?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),e("meter",{value:i,min:"0",max:"1"})),e("div",null,this.passwordComplexity.map(((t,i)=>e("div",{key:i},e("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),e("span",null,Ls(`${t.ruleKey}`,this.language)?Ls(`${t.ruleKey}`,this.language):t.rule))))))}renderCustomComplexityPopup(){return e("div",{class:"customreg-password__complexity "+(this.showPopup?"":"customreg-password__complexity--hidden")},e("p",{class:"customreg-password__complexity--title"},Ls("PasswordMustContain",this.language)),e("div",{class:"customreg-password__complexity--rules"},this.passwordComplexity.map(((t,i)=>e("div",{class:"customreg-password__complexity--rule",key:i},e("span",{class:`customreg-password__complexity--icon ${t.passed?zs.PASSWORD_COMPLEXITY_PASSED:zs.PASSWORD_COMPLEXITY_FAILED}`},t.passed?"✓":"✕"),e("span",null,Ls(t.ruleKey,this.language)||t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"18213d251639938165f3e4ad58bdc904fb953fe2",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"092c431b178682d0006cf6ad5c14b0a7e6fb5569",class:"password__wrapper--flex"},e("label",{key:"64c101b7d70305ecf09735234d902a6b33823551",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"189929eefa1caf71a1be39f0d663eef914d241d5",class:"password__wrapper--relative"},this.tooltip&&e("img",{key:"95ee0d824b5be14ab4e62fc0b5f1731fe6ca5775",class:"password__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("vaadin-password-field",{key:"bf85dde83305233c566b1c50d0286548ba0f48a5",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!this.noValidation&&e("small",{key:"3acbe164ff532bcfcd9e4a237a6f352df0cfdc2d",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.hidePasswordComplexity&&!this.isDuplicateInput&&(this.enableSouthAfricanMode?this.renderCustomComplexityPopup():this.renderComplexityPopup()))}get element(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};Ov.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.password {\n font-family: "Roboto";\n font-style: normal;\n}\n.password__wrapper {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n container-type: inline-size;\n}\n.password__wrapper--autofilled {\n pointer-events: none;\n}\n.password__wrapper--autofilled .password__label {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__wrapper--autofilled .password__input::part(input-field) {\n color: var(--emw--color-black, #000000);\n}\n.password__wrapper--flex {\n display: flex;\n gap: 5px;\n}\n.password__wrapper--relative {\n position: relative;\n}\n.password__label {\n font-family: inherit;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 20px;\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__label--required::after {\n content: "*";\n font-family: inherit;\n color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n margin-left: 2px;\n}\n.password__input {\n width: inherit;\n border: none;\n}\n.password__input[focused]::part(input-field) {\n border-color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n}\n.password__input[invalid]::part(input-field) {\n border: 1px solid var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__input::part(input-field) {\n border-radius: 4px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-100, #E6E6E6);\n color: var(--emw--color-black, #000000);\n background-color: var(--emw--color-white, #FFFFFF);\n font-family: inherit;\n font-style: normal;\n font-weight: 300;\n font-size: 16px;\n line-height: 1.5;\n position: relative;\n margin-bottom: unset;\n height: 44px;\n padding: 0;\n width: 100%;\n}\n.password__input::part(reveal-button) {\n position: relative;\n right: 10px;\n}\n.password__input::part(reveal-button)::before {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__input > input {\n padding: 5px 15px;\n}\n.password__input > input:placeholder-shown {\n color: var(--emw--color-gray-150, #828282);\n}\n.password__error-message {\n position: absolute;\n top: calc(100% + 5px);\n left: 0;\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__complexity {\n height: 150px;\n position: relative;\n padding: 10px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n justify-content: center;\n margin-top: 20px;\n font-weight: 300;\n background: var(--emw--color-white, #FFFFFF);\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n border-radius: 5px;\n border: 1px solid #B0B0B0;\n box-sizing: content-box;\n /* works only in this order */\n}\n.password__complexity meter {\n border-color: transparent; /* Needed for Safari */\n}\n.password__complexity meter[value="1"]::-moz-meter-bar {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter[value="1"]::-webkit-meter-optimum-value {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter:not([value="1"])::-moz-meter-bar {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity--strength {\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.password__complexity--strength meter::-moz-meter-bar { /* Firefox Pseudo Class */\n background: #B0B0B0;\n}\n.password__complexity--hidden {\n display: none;\n}\n.password__complexity--text-bold {\n font-weight: 500;\n}\n.password__complexity--checkbox {\n margin-right: 5px;\n}\n.password__complexity:after {\n content: "";\n position: absolute;\n width: 25px;\n height: 25px;\n border-top: 1px solid var(--emw--color-gray-150, #828282);\n border-right: 0 solid var(--emw--color-gray-150, #828282);\n border-left: 1px solid var(--emw--color-gray-150, #828282);\n border-bottom: 0 solid var(--emw--color-gray-150, #828282);\n bottom: 92%;\n left: 50%;\n margin-left: -25px;\n transform: rotate(45deg);\n margin-top: -25px;\n background-color: var(--emw--color-white, #FFFFFF);\n}\n@container (max-width: 300px) {\n .password__complexity {\n height: 190px;\n }\n .password__complexity:after {\n width: 14px;\n height: 14px;\n bottom: 96%;\n left: 57%;\n }\n}\n.password__tooltip-icon {\n width: 16px;\n height: auto;\n}\n.password__tooltip {\n position: absolute;\n top: 0;\n left: 20px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-150, #828282);\n color: #2B2D3F;\n padding: 10px;\n border-radius: 5px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n z-index: 10;\n}\n.password__tooltip.visible {\n opacity: 1;\n}\n\n.customreg-password__complexity {\n background: var(--emw--color-white, #FFFFFF);\n border-radius: 6px;\n padding: 14px;\n}\n\n.customreg-password__complexity--title {\n font-size: var(--emw--font-size-small, 14px);\n color: var(--emw--color-black, #000000);\n margin-bottom: 12px;\n}\n\n.customreg-password__complexity--rules {\n display: flex;\n flex-direction: column;\n gap: 10px;\n font-size: var(--emw--font-size-small-xs, 12px);\n}\n\n.customreg-password__complexity--rule {\n display: flex;\n align-items: center;\n color: var(--emw--color-black, #000000);\n}\n\n.customreg-password__complexity--icon {\n width: 20px;\n height: 20px;\n min-width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n font-weight: bold;\n border-radius: 50%;\n margin-right: 10px;\n}\n\n.customreg-password__complexity--icon.failed {\n background-color: var(--emw--color-error, #FD2839);\n color: var(--emw--color-white, #FFFFFF);\n}\n\n.customreg-password__complexity--icon.passed {\n background-color: var(--emw--color-lottoball-green, #01af15);\n color: var(--emw--color-white, #FFFFFF);\n}\n\n.customreg-password__complexity::after {\n display: none;\n}';const Lv=class{constructor(e){t(this,e),this.sendAddressValue=i(this,"sendAddressValue",7),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.value="",this.validationPattern="",this.hasManualAddressBeenTriggered=!1,this.touched=!1,this.maxPostalCodeLength="10",this.handleInput=t=>{const e=t.target.value.toUpperCase();this.value=e,this.touched=!0,this.currentPostalCode=e,this.showNoResultsMessage=!1,this.inputReference&&(this.inputReference.value=e),this.value.length<this.postalcodelength&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),(""===this.value||this.value.length<1)&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.value.length>=this.postalcodelength&&(sessionStorage.setItem("currentPostalCode",this.value),this.showNoResultsMessage=!1,this.addresses&&this.addresses.length>0&&(this.openAddressDropdown=!0));const t=this.isValid;this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),t!==this.isValid&&this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),300)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.showNoResultsMessage=!1,this.openAddressDropdown||(this.showNoResultsMessage=!1)},this.handleFocus=()=>{this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&(this.openAddressDropdown=!0)},this.handlePostalCode=(t,e)=>{t.stopPropagation();const i=`${e.number}`.trim(),s=`${e.street}`.trim(),r=`${e.city}`.trim();this.sendAddressValue.emit({city:r,address1:i,address2:s}),this.value=this.currentPostalCode.toLocaleUpperCase(),this.touched=!0,this.isValid=!0,this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.isFetchingAddresses=!1,this.valueHandler({name:this.name,value:this.value}),this.validityStateHandler({valid:!0,name:this.name}),this.valueHandler({name:"address1",value:i}),this.valueHandler({name:"City",value:r}),s&&this.valueHandler({name:"address2",value:s}),this.refreshTrigger++},this.enterAddressManually=()=>{const t=window.targetInputRefs;if(!t)return;const e=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"address2",ref:t.address2},{name:"City",ref:t.City}],i=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"City",ref:t.City}].find((t=>{var e;const i=(null===(e=t.ref)||void 0===e?void 0:e.value)||"";return t.minLength?0===i.length||i.length<t.minLength:0===i.length})),s=(null==i?void 0:i.ref)||t.address1||t.PostalCode;s.scrollIntoView({behavior:"smooth",block:"center"}),this.hasManualAddressBeenTriggered||(this.hasManualAddressBeenTriggered=!0,e.forEach((t=>{var e;if(t.ref){const i=(null===(e=t.ref.shadowRoot)||void 0===e?void 0:e.querySelector("input"))||t.ref;if(i){i.classList.add("pulse-border");const t=()=>{i.classList.remove("pulse-border"),i.removeEventListener("animationend",t)};i.addEventListener("animationend",t)}}}))),s.focus()},this.handleOutsideClick=t=>{if(!this.openAddressDropdown)return;const e=t.composedPath?t.composedPath():[],i=e.includes(this.inputReference),s=e.includes(this.addressesDropdownRef),r=e.some((t=>{var e;return t instanceof Element&&(null===(e=t.classList)||void 0===e?void 0:e.contains("option"))}));i||s||r||(this.openAddressDropdown=!1,this.showNoResultsMessage=!1)},this.name="PostalCode",this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.postalcodelength=void 0,this.addresses=void 0,this.ignoreCountry=!1,this.mbSource=void 0,this.isValid=void 0,this.errorMessage="",this.showTooltip=!1,this.selectedCountryCode="",this.currentPostalCode="",this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.refreshTrigger=0,this.isFetchingAddresses=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value}),!0!==t||this.value.length||this.valueHandler({name:this.name,value:this.value})}handleAddresses(t){t&&t.length>0?(this.openAddressDropdown=!0,this.showNoResultsMessage=!1):(this.openAddressDropdown=!1,this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength&&setTimeout((()=>{this.currentPostalCode.length>=this.postalcodelength&&!this.isFetchingAddresses&&(this.showNoResultsMessage=!0)}),200)),this.isFetchingAddresses=!1}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&(this.resetPostalCodeField(),this.refreshTrigger++)}handleFetchStarted(){this.showNoResultsMessage=!1,this.isFetchingAddresses=!0,this.openAddressDropdown=!1}connectedCallback(){this.validationPattern=this.setPattern()}componentWillLoad(){this.defaultValue&&(this.value=this.defaultValue)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.defaultValue&&this.valueHandler({name:this.name,value:this.value}),this.inputReference&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.setValidity(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}setValidity(){if(!this.inputReference)return!1;const t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(!this.touched)return"";if(this.inputReference.validity.valueMissing)return Ls(Ns,this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong){const{minLength:t,maxLength:e}=this.validation;return t===e?Ls(Os,this.language,{values:{length:t}}):Ls(Fs,this.language,{values:{minLength:t,maxLength:e}})}if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return Ls(`${i}`,this.language)||s}return""}resetPostalCodeField(){this.value="",this.currentPostalCode="",this.showNoResultsMessage=!1,this.openAddressDropdown=!1,this.isFetchingAddresses=!1,sessionStorage.removeItem("currentPostalCode"),this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name})}renderTooltip(){return this.showTooltip?e("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}determineInputValue(){return this.inputReference&&this.name&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.value}render(){var t,i;let s="";this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid");let r="UK"===this.selectedCountryCode||"GB"===this.selectedCountryCode||this.ignoreCountry,o=(null===(t=this.addresses)||void 0===t?void 0:t.length)>0&&this.openAddressDropdown&&r,n=this.showNoResultsMessage&&this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&0===(null===(i=this.addresses)||void 0===i?void 0:i.length)&&r,a=this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength;return e("div",{key:"f0dda39cf9a02d53213848926908c0cb39d1cd3f",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},e("div",{key:"5e1c51af264392d2be986e305e6526310f55f40b",class:"text__wrapper--flex"},e("label",{key:"c12c45d88bdf42aeb6be505d473ab0f55da2be87",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"7b93a75f19590b445227fa1a64c90fd20c0afd5d",class:"text__wrapper--relative"},this.tooltip&&e("img",{key:"504004a13595694307c1e3450b69982150dc55fd",class:"text__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("div",{key:"19de66fd72fd0a6befe3bbaebb6c8f99ec5f850b",class:"input__text-wrapper"},e("input",{key:"78cd4229ed5104518b991df0bc6bf527df2ec3e2",name:this.name,id:`${this.name}__input`,value:this.determineInputValue(),type:"text",class:`text__input ${s}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.maxPostalCodeLength,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!r&&e("p",{key:"6b9e307d59fb9fed93f4df6c07a091d299844c62",class:"address__manual-input-msg",onClick:()=>this.enterAddressManually()},Ls("enterIEAddressManually",this.language)),o&&e("div",{key:"ecb7892a9a8d967540d8fd013518ae19498fcd48",class:"input__addresses-container",ref:t=>this.addressesDropdownRef=t},e("div",{key:"a5ef3f81a85207a821964e23b21aaf783be807cc",class:"options"},this.addresses.map(((t,i)=>e("div",{key:i,class:"option",onClick:e=>this.handlePostalCode(e,t)},t.number," ",t.street," ",t.city))))),a&&e("div",{key:"338c17e484721efb387e608f3ce4416a0e47b8af",class:"postalcode__loading-spinner"},e("div",{key:"7638cea4fba975e3a27d4cb00bce217129bd0750",class:"loading-spinner"}),e("span",{key:"b59a8a9c3d7ecf209a68717346d1d29062994f79"},Ls("searchingForAddresses",this.language))),n&&e("div",{key:"212a74fed94b3ee089aed5c9afb544966b5f11cd",class:"postalcode__no-results-message"},Ls("postalLookUpNoAddressFound",this.language))),e("small",{key:"4f66e97dd811b9917c92ff4bcbf236817ac57933",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],addresses:["handleAddresses"]}}};Lv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.input__text-wrapper{position:relative}.input__addresses-container{position:relative;left:0;width:100%;background:var(--emw--color-white);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1);max-height:200px;overflow-y:auto;z-index:999;margin-top:4px}.input__addresses-container .options{padding:4px 0}.input__addresses-container .option{padding:8px 12px;cursor:pointer;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6);font-size:14px;line-height:1.4;transition:background-color 0.2s ease;color:var(--emw--registration-gray-800, #333)}.input__addresses-container .option:last-child{border-bottom:none}.input__addresses-container .option:hover{background-color:var(--emw--registration-lightgray-100, #f8f9fa)}.input__addresses-container .option:active{background-color:var(--emw--registration-lightgray-200, #e9ecef)}.input__addresses-container::-webkit-scrollbar{width:6px}.input__addresses-container::-webkit-scrollbar-track{background:var(--emw--registration-lightgray-150, #f1f1f1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb{background:var(--emw--registration-lightgray-300, #c1c1c1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb:hover{background:var(--emw--registration-lightgray-400, #a8a8a8)}.postalcode__no-results-message{color:var(--emw--color-error, var(--emw--color-red, #ed0909));margin-top:10px}.address__manual-input-msg{text-decoration:underline;margin-top:10px;cursor:pointer;transition:opacity 0.3s ease}.address__manual-input-msg:active{opacity:0.7}.postalcode__loading-spinner{display:flex;align-items:center;gap:8px;padding:12px;color:var(--emw--registration-gray-600, #666);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-top:none;background-color:var(--emw--registration-lightgray-50, #f9f9f9)}.loading-spinner{width:14px;height:14px;border:2px solid var(--emw--color-gray-100, #E6E6E6);border-top:2px solid var(--emw--registration-gray-600, #666);border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}';const Uv=class{constructor(e){t(this,e),this.sendInputValue=i(this,"sendInputValue",7),this.sendValidityState=i(this,"sendValidityState",7),this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling()}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return Ls("requiredError",this.language)}renderTooltip(){return this.showTooltip?e("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return e("fieldset",{key:"7048de0e37c9541af1c9788e8b46c789ca788c31",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},e("legend",{key:"403b739c966d510740ca59621c094872b93e2cba",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>e("div",{class:"radio__wrapper"},e("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),e("label",{htmlFor:`${t.label}__input`},t.label)))),e("small",{key:"46dce1082a6aa9f2a5bdc3e3654c924fcd2a8357",class:"radio__error-message"},this.errorMessage),this.tooltip&&e("img",{key:"dfe155a429485b5c891db2943d9115cdc40e169b",class:"radio__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Uv.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";const Bv=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.touched=!1,this.handleComboChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=t=>{const e=t.currentTarget;e.opened||(this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}))},this.handleSelectChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value}))),this.isComboBox=(null===(t=this.displayedOptions)||void 0===t?void 0:t.length)>6}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{var e;const i=Object.keys(t)[0];this.displayedOptions=t[i].map((t=>({label:t.Name,value:t.Alpha2Code}))),this.isComboBox=(null===(e=this.displayedOptions)||void 0===e?void 0:e.length)>6}))}}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.inputReference=this.vaadinCombo.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.inputReference&&(this.inputReference.value=this.value)),this.isValid=this.setValidity(),!this.isComboBox&&this.vaadinCombo&&this.vaadinCombo.addEventListener("opened-changed",(t=>{if(!0===t.detail.value)this.errorMessage="";else{const e=t.currentTarget;this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})}}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){var t;return!(null===(t=this.validation)||void 0===t?void 0:t.mandatory)||!!this.value}setErrorMessage(){var t,e,i;if((null===(e=null===(t=this.inputReference)||void 0===t?void 0:t.validity)||void 0===e?void 0:e.valueMissing)||(null===(i=this.vaadinCombo)||void 0===i?void 0:i.invalid))return Ls("requiredError",this.language)}renderTooltip(){return this.showTooltip?e("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t,i;let s="";return this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"eb6c9d7d85546159d44d06a0635f173263edd7d1",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"0fd71c528870966fdb23049b1806a267e9e6ca5c",class:"select__wrapper--flex"},e("label",{key:"44aeb4e50ab2f79df06741ff07ac03131c987447",class:"select__label",htmlFor:`${this.name}__input`},this.displayName,e("span",{key:"796a83aeadd480a571b6bae035a46138d7b10b24",class:this.validation.mandatory?"select__label--required":""})),e("div",{key:"6d7b2d785c6b0bdd05c7444f563b21cedf26ff7c",class:"select__wrapper--relative"},this.tooltip&&e("img",{key:"f33e43a9d42e8b8d1cf136374505eeaedcbede26",class:"select__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),this.isComboBox?e("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(t=this.validation)||void 0===t?void 0:t.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleComboChange,onBlur:this.handleBlur}):e("vaadin-select",{name:this.name,popover:!1,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(i=this.validation)||void 0===i?void 0:i.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleSelectChange,"no-vertical-overlap":!0,noVerticalOverlap:!0}),e("small",{key:"261b3c4abc9b360e6b937d851f8bfc810280a8c6",class:"select__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Bv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%;--_invalid-hover-highlight:transparent;--vaadin-input-field-invalid-hover-highlight:transparent}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]:not(.text__input--invalid)::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.select__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const jv=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.setPhoneValue(t.target.value),this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.isValidValue(),this.applyCustomError(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.touched=!0,this.isValid=this.isValidValue(),this.applyCustomError(),this.errorMessage=this.setErrorMessage()},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.showLabels=void 0,this.action=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.enableCustomRegexValidation=!1,this.isValid=void 0,this.errorMessage=void 0,this.showTooltip=!1,this.disablePhonePrefix=!1,this.phoneValue="",this.phoneCodesOptions=void 0}setPhoneValue(t){const e=t.replace(/[^0-9]/g,"");this.phoneValue=e,this.inputReference&&(this.inputReference.value=this.phoneValue)}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}resetValidationState(){this.lastCustomErrorKey=void 0,this.lastCustomErrorMessage=void 0,this.inputReference.setCustomValidity("")}isMissingValue(t){return this.validation.mandatory&&""===t}isFixedLength(t){const e=this.validation.minLength,i=this.validation.maxLength;return!(!e||!i||e!==i||t.length===e)}isTooShort(t){const e=this.validation.minLength;return!!(e&&t.length<e)}isTooLong(t){const e=this.validation.maxLength;return!!(e&&t.length>e)}failsPattern(t){if(!this.validationPattern)return!1;let e;try{e=new RegExp(this.validationPattern)}catch(t){return console.warn("Invalid validationPattern:",this.validationPattern,t),!1}return!e.test(t)}failsCustomRules(t){const e=(this.validation.custom||[]).filter((t=>"regex"===t.rule&&t.pattern)),[,...i]=e;for(const e of i){let i;try{i=new RegExp(e.pattern)}catch(t){console.warn("Invalid regex pattern:",e.pattern,t);continue}if(!i.test(t))return!0}return!1}connectedCallback(){var t;this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.setPhoneValue(null!==(t=this.defaultValue.phone)&&void 0!==t?t:""),this.phoneCodesOptions=[{label:this.prefixValue,value:this.prefixValue}])}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>"object"==typeof t&&t.Prefix?{label:t.Prefix,value:t.Prefix}:{label:t,value:t})),this.disablePhonePrefix=this.phoneCodesOptions.length<=1}))}}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.isValid=this.isValidValue(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}isValidValue(){var t,e;if(!this.inputReference)return!1;this.resetValidationState();const i=null!==(e=null===(t=this.phoneValue)||void 0===t?void 0:t.trim())&&void 0!==e?e:"",s=""===i;return!(this.isMissingValue(i)||!s&&(this.isFixedLength(i)||this.isTooShort(i)||this.isTooLong(i)||this.failsPattern(i)||this.failsCustomRules(i)))}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if((null===(e=null===(t=this.inputReference)||void 0===t?void 0:t.validity)||void 0===e?void 0:e.customError)||(this.lastCustomErrorKey=void 0,this.lastCustomErrorMessage=void 0),this.inputReference.validity.patternMismatch){const t=null===(i=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===s?void 0:s.errorMessage;return Ls(`${t}`,this.language)?Ls(`${t}`,this.language):e}const{minLength:r,maxLength:o}=this.validation;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong||r&&this.phoneValue&&this.phoneValue.length<r||o&&this.phoneValue&&this.phoneValue.length>o)return r===o?Ls(Os,this.language,{values:{length:r}}):Ls(Fs,this.language,{values:{minLength:r,maxLength:o}});if(this.inputReference.validity.valueMissing)return Ls(Ns,this.language);if(this.inputReference.validity.customError&&(this.lastCustomErrorKey||this.lastCustomErrorMessage)){return(this.lastCustomErrorKey?Ls(`${this.lastCustomErrorKey}`,this.language):"")||this.lastCustomErrorMessage||""}}applyCustomError(){const t=(this.validation.custom||[]).filter((t=>"regex"===t.rule&&t.pattern)),[,...e]=t;for(const t of e){let e;try{e=new RegExp(t.pattern)}catch(e){console.warn("[applyCustomError] invalid regex pattern:",t.pattern,e);continue}if(!e.test(this.phoneValue))return this.lastCustomErrorKey=t.errorKey,this.lastCustomErrorMessage=t.errorMessage,void this.inputReference.setCustomValidity("customError")}}renderTooltip(){return this.showTooltip?e("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t;let i="";return this.touched&&(i=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"82da44bb2bacec9efb3631e377978d678e766919",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"4ca8d6dde2d3f8e15e2d26d593297519e0c94053",class:"tel__wrapper--flex-label"},e("label",{key:"3b0e2736fd47537b2ecd80cf49a146992d59474e",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"1577aafc7b68128e91cdfe9ddc563bbad9d7b901",class:"tel__wrapper--relative"},this.tooltip&&e("img",{key:"cb6576e1248fc52f937c685d59d994a1d098d7cc",class:"tel__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("div",{key:"a1e9f3c68691fbb61947cd41c0ffddcd124b4bbb",class:`tel__wrapper--flex ${i}`},e("vaadin-combo-box",{key:"9aa33a487f019ee7393e29a0ce0d1836a23f5e09",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.disablePhonePrefix,onChange:t=>this.handlePrefixInput(t)}),e("input",{key:"21d69c041b9a5f5f6fb1e6d7b392945cafe99e87",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:null!==(t=this.phoneValue)&&void 0!==t?t:"",placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),e("small",{key:"76febe89ad7ee581eb5fc79658d81123da08ccdd",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};jv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden;padding-left:4px}.tel__wrapper--flex:focus-within{border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__wrapper .text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){height:100%;border-radius:0 5px 5px 0;background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emw--color-white, #FFFFFF)}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emw--registration-typography, var(--emw--color-black, #000000));background-color:var(--emw--color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emw--color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const Yv=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.postalcodelength=5,this.touched=!1,this.handleInput=t=>{const e=t.target,i=!this.enableSouthAfricanMode||this.name!==zs.FIRSTNAME_ON_DOCUMENT&&this.name!==zs.LASTNAME_ON_DOCUMENT?e.value:e.value.replace(zs.NON_LETTERS_REGEX,"");i!==e.value&&(e.value=i),this.value=i,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.updateValidationState(),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.updateValidationState()},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.haspostalcodelookup=void 0,this.enableSouthAfricanMode=void 0,this.mbSource=void 0,this.isValid=void 0,this.errorMessage="",this.showTooltip=!1,this.selectedCountryCode=""}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&this.updateValidationState()),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&this.touched&&this.updateValidationState()}handleValidationChange(t){t.detail.field===this.name&&(this.validation=t.detail.validation,this.validationPattern=this.setPattern(),this.touched&&(this.isValid=this.isValidValue(),this.errorMessage=this.setErrorMessage()))}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&["address1","address2","City"].includes(this.name)&&(this.value="",this.touched=!1,this.errorMessage="",this.isValid=!1,this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name}))}handleAddressSelection(t){const{city:e,address1:i,address2:s}=t.detail;if(!["address1","address2","City"].includes(this.name))return;let r="";"address1"===this.name?r=i:"address2"===this.name?r=s:"City"===this.name&&(r=e),this.value=r,this.touched=!0,this.updateValidationState()}connectedCallback(){this.validationPattern=this.setPattern()}handleExternalDocUpdate(t){this.name===zs.DOCUMENT_NUMBER&&(this.value=t.detail||"",this.touched=!0,this.inputReference&&(this.inputReference.value=this.value),this.sendInputValue.emit({name:this.name,value:this.value}),this.updateValidationState())}handleDocReset(){this.name===zs.DOCUMENT_NUMBER&&(this.value="",this.touched=!1,this.isValid=!1,this.errorMessage="",this.inputReference&&(this.inputReference.value=""),this.validityStateHandler({valid:!1,name:this.name}))}componentWillLoad(){this.defaultValue&&(this.value=this.defaultValue)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.haspostalcodelookup&&["address1","address2","City","PostalCode"].includes(this.name)&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.isValidValue()}validateDocument(t,e){const i=t.trim();if(e===zs.PASSPORT)return zs.PASSPORT_NUMERIC_REGEX.test(i)?{valid:!0}:{valid:!1,errorKey:"PassportLengthError"};if(e===zs.SOUTH_AFRICAN_ID){if(i.length!==zs.SOUTH_AFRICAN_ID_LENGTH)return{valid:!1,errorKey:"SAIdLengthError"};const t=(t=>{if(!zs.SA_ID_BASIC_REGEX.test(t))return!1;const e=t.split("").map((t=>parseInt(t,10)));let i=0;for(let t=0;t<12;t+=2)i+=e[t];let s="";for(let t=1;t<12;t+=2)s+=e[t];return(10-(i+(2*parseInt(s,10)).toString().split("").reduce(((t,e)=>t+parseInt(e,10)),0))%10)%10===e[12]})(i);return t?{valid:!0}:{valid:!1,errorKey:"SAIdInvalidError"}}return{valid:!0}}updateValidationState(){const t=this.isValidValue();this.isValid=t,this.errorMessage=this.touched?t?"":this.setErrorMessage():""}isValidValue(){if(!this.inputReference)return!1;if(this.enableSouthAfricanMode&&this.name===zs.DOCUMENT_NUMBER){const t=window.documentTypeValue;return this.validateDocument(this.value,t).valid}return""===this.value.trim()&&!this.validation.mandatory||this.inputReference.validity.valid&&(!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern))}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;const r=this.value.trim();if(this.enableSouthAfricanMode&&this.name===zs.DOCUMENT_NUMBER){const t=window.documentTypeValue,e=this.validateDocument(this.value,t);return e.valid?"":Ls(e.errorKey,this.language)}if(""===r&&!this.validation.mandatory)return"";if(this.inputReference.validity.valueMissing)return Ls(Ns,this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong){const{minLength:t,maxLength:e}=this.validation;return t===e?Ls(Os,this.language,{values:{length:t}}):Ls(Fs,this.language,{values:{minLength:t,maxLength:e}})}if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return Ls(`${i}`,this.language)||s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return Ls(`${t}`,this.language)?Ls(`${t}`,this.language):e}return""}renderTooltip(){return this.showTooltip?e("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),e("div",{key:"f48e592bac049022b283bac917c095772b1508f5",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},e("div",{key:"fe3626ead38dd18dfa14795ee2332e93f5f09652",class:"text__wrapper--flex"},e("label",{key:"6b2854b460e0ac7d4ae0ebccc06dbe64770581d5",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),e("div",{key:"f29d266973bd700a4270495bc4eb6e8296b6eeaf",class:"text__wrapper--relative"},this.tooltip&&e("img",{key:"68e69abbb78250e763822608e963bc16d702f099",class:"text__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),e("input",{key:"99b8eab15ab32656f86fedd3f36a09a5bbe108d3",name:this.name,id:`${this.name}__input`,value:this.value,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.enableSouthAfricanMode?"":this.validation.minLength,maxlength:this.enableSouthAfricanMode?"":this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),e("small",{key:"cc28c1c19370faa94fa1f738066042dce8d694ce",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleClientStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Yv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}';const Rv=class{constructor(e){t(this,e),this.expireTime=void 0,this.language="en",this.displayTime=void 0,this.isExpireInDay1=!1}componentWillLoad(){this.timer=setInterval((()=>this.updateDisplayTime()),1e3),this.updateDisplayTime()}disconnectedCallback(){clearInterval(this.timer)}startTimeChanged(){clearInterval(this.timer),this.timer=setInterval((()=>this.updateDisplayTime()),1e3),this.updateDisplayTime()}updateDisplayTime(){const t=x(),e=x(this.expireTime);if(!e.isValid())return this.displayTime="Invalid date",void clearInterval(this.timer);const i=x.duration(e.diff(t));if(this.isExpireInDay1=i.asDays()>1,i.asMilliseconds()<=0)return this.displayTime="00:00:00",void clearInterval(this.timer);const s=Math.floor(i.asHours());if(s>=48)this.displayTime=`${Math.floor(i.asDays())} ${u("days",this.language)}`;else if(s>=24)this.displayTime="1 day";else{const t=s,e=i.minutes(),r=i.seconds();this.displayTime=[t,e,r].map((t=>String(t).padStart(2,"0"))).join(":")}}render(){return[this.isExpireInDay1&&e("span",{key:"8432bdb52f3b5ecd2600c68179a0ee55d785c20c",class:"Label"},u("expiresIn",this.language)),e("span",{key:"6392f23c29ea2b9d02cbf3fec2cc19bfdfbb91c9",class:"TimeCountDown "+(this.isExpireInDay1?"":"Highlighted")},this.displayTime)]}static get watchers(){return{expireTime:["startTimeChanged"]}}},Gv=class{constructor(e){t(this,e),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.callBackObject={},this.subFieldsObject={},this.value="",this.handleRevealField=(t,e)=>{t.stopPropagation(),window.postMessage({type:`registration${e}Clicked`},window.location.href)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.options=void 0,this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.mbSource=void 0,this.errorMessage=void 0,this.isValid=void 0,this.showTooltip=!1,this.showFields="true"===this.defaultValue}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleClientStyling(){void 0===window.emMessageBus?this.clientStyling&&a(this.stylingContainer,this.clientStyling):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),0!==this.options.length&&this.options.forEach((t=>{this.callBackObject[t.name]=e=>{this.handleRevealField(e,t.name)},this.subFieldsObject[t.name].addEventListener("click",this.callBackObject[t.name])}))}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.valueHandler({name:this.name,value:this.checkboxReference.checked?"true":"false",type:"toggle"})}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return Ls("requiredError",this.language)}disconnectedCallback(){this.options.forEach((t=>{this.subFieldsObject[t.name].removeEventListener("click",this.callBackObject[t.name])}))}renderLabel(){return e("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},e("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?e("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return e("div",{key:"31cd24b5da24368eef2f53952714395d6d9f6285",class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},e("div",{key:"aa14784bd8a3870f7015db79d23226521706ad58",class:"togglecheckbox__wrapper--flex"},e("input",{key:"0237f06c99b8b2ed7de80433f5b93b9eae7c25f5",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),e("small",{key:"7e26bea1cfcc725d5aa5a795fd0f999d99abe39d",class:"togglecheckbox__error-message"},this.errorMessage),e("div",{key:"4256fc552545b7a1050ff5cdeb005f5ea83cc5c1",class:"togglecheckbox__wrapper--relative"},this.tooltip&&e("img",{key:"be3c3e036f0bfe46658fce870ae0ffa258229e7d",class:"togglecheckbox__tooltip-icon",src:Us,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),e("div",{key:"2d61bedaac02f21116318b10a21b361e70e0213f",class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>e("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,ref:e=>this.subFieldsObject[t.name]=e})))))}static get watchers(){return{clientStyling:["handleClientStylingChange"]}}};Gv.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';const Hv=class{constructor(e){t(this,e),this.registrationWidgetLoaded=i(this,"registrationWidgetLoaded",7),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.resendCode=i(this,"resendCode",7),this.validationPattern="",this.stylingContainer=null,this.tooltipReference=null,this.tooltipIconReference=null,this.inputRefs=[],this.containerRef=null,this.resendInterval=null,this.resendCodeHandler=()=>{this.triggerResendInterval(),this.resendCode.emit()},this.setInputRef=(t,e)=>{t&&(this.inputRefs[e]=t)},this.setContainerRef=t=>{t&&(this.containerRef=t)},this.triggerResendInterval=()=>{this.isResendButtonAvailable=!1,this.resendInterval&&clearInterval(this.resendInterval),this.resendInterval=setInterval((()=>{--this.resendIntervalSecondsLeft<=0&&(clearInterval(this.resendInterval),this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.isResendButtonAvailable=!0)}),1e3)},this.formatTime=()=>{const t=String(Math.floor(this.resendIntervalSecondsLeft/60));let e=String(this.resendIntervalSecondsLeft%60);return 1===e.length&&(e="0"+e),`${t}:${e}`},this.handleInput=(t,e)=>{const i=t.target,s=i.value.slice(-1);if(i.value=s,!s)return;this.code[e]=s,this.enableSouthAfricanMode&&(this.revealedIndexes=[e],this.revealTimeout&&clearTimeout(this.revealTimeout),this.revealTimeout=setTimeout((()=>{this.revealedIndexes=[]}),500));const r=this.inputRefs[e+1];r&&r.focus(),this.setValidity(),this.setErrorMessage()},this.name="",this.displayName="",this.placeholder="",this.validation=void 0,this.tooltip="",this.language="en",this.emitValue=!0,this.destination="",this.resendIntervalSeconds=60,this.clientStyling="",this.enableSouthAfricanMode=void 0,this.pinAttemptsExceeded=void 0,this.clientStylingUrl="",this.mbSource=void 0,this.startCountDown=!1,this.isValid=!1,this.isResendButtonAvailable=!this.startCountDown,this.showTooltip=!1,this.errorMessage="",this.code=[],this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.revealedIndexes=[]}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.code.join("")})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.code.join("")})}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!==e&&this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl)}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.validationPattern=this.setPattern(),this.code=new Array(null===(t=this.validation)||void 0===t?void 0:t.maxLength).fill("")}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.setValidity(),this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),this.startCountDown&&this.triggerResendInterval(),this.handleClientStyling()}handleKeyDown(t,e){if("Backspace"===t.key){const t=[...this.code];t[e]="",this.code=t,this.enableSouthAfricanMode&&(this.revealedIndexes=this.revealedIndexes.filter((t=>t!==e)));const i=this.inputRefs[e-1];null==i||i.focus()}this.setValidity(),this.setErrorMessage()}handlePaste(t){var e,i;t.preventDefault();const s=null===(i=null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text"))||void 0===i?void 0:i.trim();if(!s)return;const r=s.slice(0,this.validation.maxLength).split("");this.code=[...r,...new Array(this.validation.maxLength-r.length).fill("")],this.enableSouthAfricanMode&&(this.revealedIndexes=r.map(((t,e)=>e)),this.revealTimeout&&clearTimeout(this.revealTimeout),this.revealTimeout=setTimeout((()=>{this.revealedIndexes=[]}),500));const o=this.inputRefs[Math.min(r.length,this.inputRefs.length-1)];null==o||o.focus(),this.setValidity(),this.setErrorMessage(),this.enableSouthAfricanMode&&(this.valueHandler({name:this.name,value:this.code.join("")}),this.validityStateHandler({valid:this.isValid,name:this.name}))}setValidity(){var t;const e=this.code.join(""),i=e.length===(null===(t=this.validation)||void 0===t?void 0:t.maxLength),s=null!==e.match(this.validationPattern);this.isValid=i&&s}setPattern(){var t,e,i,s,r;return this.validation&&(null===(t=this.validation)||void 0===t?void 0:t.custom)&&this.validation.custom.length>0&&null!==(r=null===(s=null===(i=null===(e=this.validation)||void 0===e?void 0:e.custom)||void 0===i?void 0:i.find((t=>"regex"===t.rule)))||void 0===s?void 0:s.pattern)&&void 0!==r?r:""}setErrorMessage(){var t,e,i;if(null!==this.code.join("").match(this.validationPattern))this.errorMessage="";else{const s=null===(i=null===(e=null===(t=this.validation)||void 0===t?void 0:t.custom)||void 0===e?void 0:e.find((t=>"regex"===t.rule)))||void 0===i?void 0:i.errorKey;s&&(this.errorMessage=Ls(s,this.language))}}renderTooltip(){return this.showTooltip?e("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}getInputDisplayValue(t){const e=this.code[t];return e?this.enableSouthAfricanMode?this.revealedIndexes.includes(t)?e:"*":e:""}render(){return e("div",{key:"c2accac3362fe80b2f78ff5f7f76fe45871d63b3",class:"twofa",ref:t=>this.stylingContainer=t},e("div",{key:"8cae1d115652698e0d579de8762ad767448c7bc5",class:"twofa__error-message"},e("p",{key:"73a3a6138d131dab6ae052401e7b4b44619b2a1b"},this.errorMessage)),e("div",{key:"447cebaf6d1f21f6b25af4a2a49932446eae812f",class:"twofa__description",innerHTML:Ls("twofaDescription",this.language,{values:{destination:this.destination}})}),e("div",{key:"72732322e151bdbcecbde20a348c54b79a9a064e",class:"twofa__input-wrapper",ref:this.setContainerRef},this.code.map(((t,i)=>e("input",{key:i,ref:t=>this.setInputRef(t,i),id:`otp-input-${i}`,type:"text",maxLength:2,value:this.getInputDisplayValue(i),onInput:t=>this.handleInput(t,i),onKeyDown:t=>this.handleKeyDown(t,i),onPaste:t=>this.handlePaste(t)})))),e("div",{key:"57062c200893d084fd0328ec6363b16821413f5e",class:"twofa__button-wrapper"},e("p",{key:"dafc860bf614c3c274c1b144bfc1584a347458de",class:"twofa__resend-message"},Ls("twofaResendMessage",this.language)),e("button",{key:"6d1bc6083e98c23879070f91a29b709b0223b02c",class:"twofa__resend-button "+(this.pinAttemptsExceeded?"twofa__resend-button--disabled":""),onClick:this.resendCodeHandler,disabled:!this.isResendButtonAvailable||this.pinAttemptsExceeded},this.isResendButtonAvailable?Ls("twofaResendButton",this.language):this.formatTime())))}get host(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Hv.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.twofa{display:flex;flex-direction:column;gap:10px}.twofa__description{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center}.twofa__error-message{text-align:center;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.twofa__input-wrapper{display:flex;justify-content:center}.twofa__input-wrapper input{width:35px;height:35px;padding:10px;text-align:center;border-radius:var(--emw--border-radius-small, 5px);margin-left:5px;margin-right:5px;border:2px solid var(--emw--otp-border-color, #55525c);font-weight:var(--emw-font-weight-bold, 800);outline:none;transition:all 0.1s}.twofa__input-wrapper input:focus{border:2px solid var(--emw--color-primary, #22B04E);box-shadow:0 0 2px 2px var(--emw--color-primary, #22B04E)}.twofa__button-wrapper{justify-content:center;text-align:center}.twofa__button-wrapper button{border:none;background:none;font-weight:var(--emw-font-weight-bold, 800);color:var(--emw--color-primary, #22B04E);cursor:pointer}";const Vv=class{constructor(e){t(this,e),this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.imgLoaded=!1,this.shouldLoad=!1}handleSrc(){if(!this.shouldLoad)return;const t=new Image;t.onload=()=>{this.image&&(this.image.src=this.src,this.imgLoaded=!0,t.onload=null)},t.src=this.src}componentDidLoad(){"IntersectionObserver"in window?(this.el.__uxComponent=this,window.EMUxObserver||(window.EMUxObserver=new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){const e=t.target.__uxComponent;e&&(e.shouldLoad=!0,e.handleSrc()),window.EMUxObserver.unobserve(t.target)}}))}),{rootMargin:this.detectDistance})),window.EMUxObserver.observe(this.el)):(this.shouldLoad=!0,this.handleSrc())}render(){return e(r,{key:"f506ba73852f257ad80bf59ca177d2065a5f365e",class:"HostContainer"},!this.imgLoaded&&e("ui-skeleton",{key:"564ebfab701f827ddc2debccb7615926dbc9e876",class:"UiContainer",structure:"image",width:"100%",height:"100%"}),e("img",{key:"2188ca4494c10587f064acc5459ffc468948f497",ref:t=>this.image=t,src:this.shouldLoad?this.src:void 0,onLoad:()=>this.imgLoaded=!0,style:this.styles,class:"UiContainer "+(this.imgLoaded?"Visible":"Hidden"),alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}get el(){return s(this)}static get watchers(){return{src:["handleSrc"]}}};Vv.style=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}";const $v=class{constructor(e){t(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}handleStylingProps(t){switch(typeof t){case"number":return 0===t?0:`${t}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(t)||t.endsWith("px")||t.endsWith("%")?t:"unset"}}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return e("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return e("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((t,i)=>e("div",{key:i,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let t="";switch(this.structure){case"logo":t=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":t=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":t=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":t=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":t=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":t=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:t=""}return e(r,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},e("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},t),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};$v.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{v as bonus_elevate_powerups,Ps as bonus_elevate_powerups_history,Ds as bonus_pagination_nav,Bs as checkbox_group_input,js as checkbox_input,kn as date_input,Cn as email_input,Nv as general_input,Fv as number_input,Ov as password_input,Lv as postalcode_input,Uv as radio_input,Bv as select_input,jv as tel_input,Yv as text_input,Rv as time_count,Gv as toggle_checkbox_input,Hv as twofa_input,Vv as ui_image,$v as ui_skeleton}
|