diff --git a/hooks/pre-commit b/hooks/pre-commit index ff9e2bf..fa20836 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -1,35 +1,35 @@ -#!/bin/sh - -echo "Pre-commit Hook" - -# should work -# Store the list of staged files -staged_files=$(git diff --cached --name-only) - -# Apply code formatting using spotless -./mvnw spotless:apply -status=$? - -echo "This is status : $status" - -#if [ "$status" = 0 ]; then -# ./gradlew checkstyleMain -# status=$? +##!/bin/sh +# +#echo "Pre-commit Hook" +# +## should work +## Store the list of staged files +#staged_files=$(git diff --cached --name-only) +# +## Apply code formatting using spotless +#./mvnw spotless:apply +#status=$? +# +#echo "This is status : $status" +# +##if [ "$status" = 0 ]; then +## ./gradlew checkstyleMain +## status=$? +##fi +# +# +#if [ "$status" -eq 0 ]; then +# ./mvnw test +# status=$? #fi - - -if [ "$status" -eq 0 ]; then - ./mvnw test - status=$? -fi - -# If code formatting succeeded, bring stashed changes back to staged area -if [ "$status" -eq 0 ]; then - # Add only the files that were previously staged - git add $staged_files - # Proceed with commit- - exit $status -fi - -#fail commit if above didnt work -exit 1 \ No newline at end of file +# +## If code formatting succeeded, bring stashed changes back to staged area +#if [ "$status" -eq 0 ]; then +# # Add only the files that were previously staged +# git add $staged_files +# # Proceed with commit- +# exit $status +#fi +# +##fail commit if above didnt work +#exit 1 \ No newline at end of file diff --git a/pom.xml b/pom.xml index d2f70fb..18a315c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.example.application @@ -170,27 +171,14 @@ ${spotless.version} - - true4 + + + true + 4 + - diff --git a/src/main/dev-bundle/assets/themes/samic/components/logo_samic.svg b/src/main/dev-bundle/assets/themes/samic/components/logo_samic.svg new file mode 100644 index 0000000..27a5aeb --- /dev/null +++ b/src/main/dev-bundle/assets/themes/samic/components/logo_samic.svg @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/dev-bundle/config/stats.json b/src/main/dev-bundle/config/stats.json index 4adc1f2..27aa278 100644 --- a/src/main/dev-bundle/config/stats.json +++ b/src/main/dev-bundle/config/stats.json @@ -266,9 +266,11 @@ "Frontend/generated/jar-resources/virtualListConnector.js" ], "frontendHashes": { + "themes/samic/components/vaadin-vertical-layout.css": "44860b4c53033254a1aae77a932d6c914fc7c6b5bcef33b9f567fa229f551f84", "themes/samic/components/vaadin-text-field.css": "0a7d91732f86b30fef5de7bcdb0f83539fea9a0e7d84c7e623f8f0f73afbfd8c", "themes/samic/components/vaadin-text-area.css": "0a7d91732f86b30fef5de7bcdb0f83539fea9a0e7d84c7e623f8f0f73afbfd8c", "themes/samic/components/vaadin-password-field.css": "0a7d91732f86b30fef5de7bcdb0f83539fea9a0e7d84c7e623f8f0f73afbfd8c", + "themes/samic/components/vaadin-login-overlay-wrapper.css": "fe0aa9cfd99e7a2723fcedd64078e9c4e535e408907a66da9229549026f254d1", "buttonFunctions.js": "c852123f9b2c44eb75e555119d3e05a7dbe78b91d0ab616feb9df1654474707d", "comboBoxConnector.js": "1d004c3dae9c76f8bcc68678abe1b8f7bdc8b456f5c9c4c7f190df8ed25d66cd", "contextMenuConnector.js": "8960e00884b9a8b62e24be63e03fe7045dcb9b6844a8a238eb4619d5595e2cfc", @@ -294,7 +296,7 @@ "samic": "{\n \"lumoImports\" : [ \"typography\", \"color\", \"spacing\", \"badge\", \"utility\" ],\n \"assets\" : {\n \"@fontsource/inter\" : {\n \"*.css\" : \"@fontsource/inter\",\n \"files/*\" : \"@fontsource/inter/files\"\n }\n }\n}" }, "entryScripts": [ - "VAADIN/build/indexhtml-6a469b1f.js" + "VAADIN/build/indexhtml-add66a7c.js" ], "webComponents": [], "cvdlModules": { @@ -329,6 +331,6 @@ }, "packageJsonHash": "c53327dfce5f86a113960cf3231a5725b0a784dcc0fde787af5857ca1bb7a0db", "indexHtmlGenerated": [ - " " + " " ] } \ No newline at end of file diff --git a/src/main/dev-bundle/webapp/VAADIN/build/generated-flow-imports-20d69db2.js b/src/main/dev-bundle/webapp/VAADIN/build/generated-flow-imports-8d18f8ad.js similarity index 99% rename from src/main/dev-bundle/webapp/VAADIN/build/generated-flow-imports-20d69db2.js rename to src/main/dev-bundle/webapp/VAADIN/build/generated-flow-imports-8d18f8ad.js index d9674f1..8479164 100644 --- a/src/main/dev-bundle/webapp/VAADIN/build/generated-flow-imports-20d69db2.js +++ b/src/main/dev-bundle/webapp/VAADIN/build/generated-flow-imports-8d18f8ad.js @@ -1,4 +1,4 @@ -import{t as themeRegistry,u as unsafeCSS,r as registerStyles$1,c as css$e,T as ThemableMixin,d as defineCustomElement,a as addLumoGlobalStyles,b as ThemePropertyMixin,e as render$1,h as html$1,D as Directive,P as PartType,f as directive,n as noChange,_ as __vitePreload,g as nothing,s as svg$6,i as color$h,j as typography,L as LitElement}from"./indexhtml-6a469b1f.js";/** +import{t as themeRegistry,u as unsafeCSS,r as registerStyles$1,c as css$e,d as defineCustomElement,T as ThemableMixin,a as addLumoGlobalStyles,b as ThemePropertyMixin,e as render$1,h as html$1,D as Directive,P as PartType,f as directive,n as noChange,_ as __vitePreload,g as nothing,s as svg$6,i as color$h,j as typography,L as LitElement}from"./indexhtml-add66a7c.js";/** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt @@ -48,79 +48,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN ${a?``:""} - `,o.register(r)}function getModuleStyles(n){return stylesFromTemplate(n.querySelector("template")).map(i=>unsafeCSS(i.textContent))}function getAllThemes(){const i=DomModule.prototype.modules;return Object.keys(i).map(t=>{const r=i[t],o=r.getAttribute("theme-for");return r.__allStyles||(r.__allStyles=getModuleStyles(r).concat(r.__partialStyles||[])),{themeFor:o,moduleId:t,styles:r.__allStyles}})}window.Vaadin||(window.Vaadin={});window.Vaadin.styleModules={getAllThemes,registerStyles};themeRegistry&&themeRegistry.length>0&&(themeRegistry.forEach(n=>{registerStyles(n.themeFor,n.styles,{moduleId:n.moduleId,include:n.include})}),themeRegistry.length=0);registerStyles$1("vaadin-app-layout",css$e` - [part='navbar'], - [part='drawer'] { - background-color: var(--lumo-base-color); - background-clip: padding-box; - } - - [part='navbar'] { - min-height: var(--lumo-size-xl); - border-bottom: 1px solid var(--lumo-contrast-10pct); - } - - [part='navbar'][bottom] { - border-bottom: none; - border-top: 1px solid var(--lumo-contrast-10pct); - } - - [part='drawer'] { - border-inline-end: 1px solid var(--lumo-contrast-10pct); - } - - :host([overlay]) [part='drawer'] { - border-inline-end: none; - box-shadow: var(--lumo-box-shadow-s); - } - - :host([primary-section='navbar']) [part='navbar'] { - border: none; - background-image: linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct)); - } - - :host([primary-section='drawer']:not([overlay])) [part='drawer'] { - background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct)); - } - - [part='backdrop'] { - background-color: var(--lumo-shade-20pct); - opacity: 1; - } - - [part] ::slotted(h2), - [part] ::slotted(h3), - [part] ::slotted(h4) { - margin-top: var(--lumo-space-xs) !important; - margin-bottom: var(--lumo-space-xs) !important; - } - `,{moduleId:"lumo-app-layout"});/** - * @license - * Copyright (c) 2021 - 2023 Vaadin Ltd. - * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ - */const testUserAgent=n=>n.test(navigator.userAgent),testPlatform=n=>n.test(navigator.platform),testVendor=n=>n.test(navigator.vendor),isAndroid=testUserAgent(/Android/u),isChrome=testUserAgent(/Chrome/u)&&testVendor(/Google Inc/u),isFirefox$4=testUserAgent(/Firefox/u),isIPad=testPlatform(/^iPad/u)||testPlatform(/^Mac/u)&&navigator.maxTouchPoints>1,isIPhone=testPlatform(/^iPhone/u),isIOS=isIPhone||isIPad,isSafari=testUserAgent(/^((?!chrome|android).)*safari/iu),isTouch=(()=>{try{return document.createEvent("TouchEvent"),!0}catch{return!1}})();/** - * @license - * Copyright (c) 2018 - 2023 Vaadin Ltd. - * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ - */function _detectIosNavbar(){if(isIOS){const n=window.innerHeight,t=window.innerWidth>n,r=document.documentElement.clientHeight;t&&r>n?document.documentElement.style.setProperty("--vaadin-viewport-offset-bottom",`${r-n}px`):document.documentElement.style.setProperty("--vaadin-viewport-offset-bottom","")}}_detectIosNavbar();window.addEventListener("resize",_detectIosNavbar);const template$a=document.createElement("template");template$a.innerHTML=` - -`;document.head.appendChild(template$a.content);/** -@license -Copyright (c) 2017 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt -Code distributed by Google as part of the polymer project is also -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt -*/let scheduled=!1,beforeRenderQueue=[],afterRenderQueue=[];function schedule(){scheduled=!0,requestAnimationFrame(function(){scheduled=!1,flushQueue(beforeRenderQueue),setTimeout(function(){runQueue(afterRenderQueue)})})}function flushQueue(n){for(;n.length;)callMethod(n.shift())}function runQueue(n){for(let i=0,t=n.length;i{throw o})}}function beforeNextRender(n,i,t){scheduled||schedule(),beforeRenderQueue.push([n,i,t])}function afterNextRender(n,i,t){scheduled||schedule(),afterRenderQueue.push([n,i,t])}/** + `,{moduleId:"lumo-form-layout"});/** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt @@ -236,27 +168,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt -*/const PolymerElement=ElementMixin$1(HTMLElement);/** - * @license - * Copyright (c) 2017 Anton Korzunov - * SPDX-License-Identifier: MIT - */let counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0;const isElement=n=>n&&n.nodeType===Node.ELEMENT_NODE,logError=(...n)=>{console.error(`Error: ${n.join(" ")}. Skip setting aria-hidden.`)},correctTargets=(n,i)=>isElement(n)?i.map(t=>{if(!isElement(t))return logError(t,"is not a valid element"),null;let r=t;for(;r&&r!==n;){if(n.contains(r))return t;r=r.getRootNode().host}return logError(t,"is not contained inside",n),null}).filter(t=>!!t):(logError(n,"is not a valid element"),[]),applyAttributeToOthers=(n,i,t,r)=>{const o=correctTargets(i,Array.isArray(n)?n:[n]);markerMap[t]||(markerMap[t]=new WeakMap);const a=markerMap[t],s=[],l=new Set,h=new Set(o),c=u=>{if(!u||l.has(u))return;l.add(u);const p=u.assignedSlot;p&&c(p),c(u.parentNode||u.host)};o.forEach(c);const d=u=>{if(!u||h.has(u))return;const p=u.shadowRoot;(p?[...u.children,...p.children]:[...u.children]).forEach(v=>{if(!["template","script","style"].includes(v.localName))if(l.has(v))d(v);else{const g=v.getAttribute(r),m=g!==null&&g!=="false",_=(counterMap.get(v)||0)+1,y=(a.get(v)||0)+1;counterMap.set(v,_),a.set(v,y),s.push(v),_===1&&m&&uncontrolledNodes.set(v,!0),y===1&&v.setAttribute(t,"true"),m||v.setAttribute(r,"true")}})};return d(i),l.clear(),lockCount+=1,()=>{s.forEach(u=>{const p=counterMap.get(u)-1,f=a.get(u)-1;counterMap.set(u,p),a.set(u,f),p||(uncontrolledNodes.has(u)?uncontrolledNodes.delete(u):u.removeAttribute(r)),f||u.removeAttribute(t)}),lockCount-=1,lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=(n,i=document.body,t="data-aria-hidden")=>{const r=Array.from(Array.isArray(n)?n:[n]);return i&&r.push(...Array.from(i.querySelectorAll("[aria-live]"))),applyAttributeToOthers(r,i,t,"aria-hidden")};/** - * @license - * Copyright (c) 2021 - 2023 Vaadin Ltd. - * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ - */class AriaModalController{constructor(i,t){this.host=i,this.callback=typeof t=="function"?t:()=>i}showModal(){const i=this.callback();this.__showOthers=hideOthers(i)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}/** - * @license - * Copyright (c) 2021 - 2023 Vaadin Ltd. - * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ - */let keyboardActive=!1;window.addEventListener("keydown",()=>{keyboardActive=!0},{capture:!0});window.addEventListener("mousedown",()=>{keyboardActive=!1},{capture:!0});function getDeepActiveElement(){let n=document.activeElement||document.body;for(;n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function isKeyboardActive(){return keyboardActive}function isElementHiddenDirectly(n){const i=n.style;if(i.visibility==="hidden"||i.display==="none")return!0;const t=window.getComputedStyle(n);return t.visibility==="hidden"||t.display==="none"}function hasLowerTabOrder(n,i){const t=Math.max(n.tabIndex,0),r=Math.max(i.tabIndex,0);return t===0||r===0?r>t:t>r}function mergeSortByTabIndex(n,i){const t=[];for(;n.length>0&&i.length>0;)hasLowerTabOrder(n[0],i[0])?t.push(i.shift()):t.push(n.shift());return t.concat(n,i)}function sortElementsByTabIndex(n){const i=n.length;if(i<2)return n;const t=Math.ceil(i/2),r=sortElementsByTabIndex(n.slice(0,t)),o=sortElementsByTabIndex(n.slice(t));return mergeSortByTabIndex(r,o)}function isElementHidden(n){return n.offsetParent===null&&n.clientWidth===0&&n.clientHeight===0?!0:isElementHiddenDirectly(n)}function isElementFocusable(n){return n.matches('[tabindex="-1"]')?!1:n.matches("input, select, textarea, button, object")?n.matches(":not([disabled])"):n.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function isElementFocused(n){return n.getRootNode().activeElement===n}function normalizeTabIndex(n){if(!isElementFocusable(n))return-1;const i=n.getAttribute("tabindex")||0;return Number(i)}function collectFocusableNodes(n,i){if(n.nodeType!==Node.ELEMENT_NODE||isElementHiddenDirectly(n))return!1;const t=n,r=normalizeTabIndex(t);let o=r>0;r>=0&&i.push(t);let a=[];return t.localName==="slot"?a=t.assignedNodes({flatten:!0}):a=(t.shadowRoot||t).children,[...a].forEach(s=>{o=collectFocusableNodes(s,i)||o}),o}function getFocusableElements(n){const i=[];return collectFocusableNodes(n,i)?sortElementsByTabIndex(i):i}/** - * @license - * Copyright (c) 2021 - 2023 Vaadin Ltd. - * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ - */const instances=[];class FocusTrapController{constructor(i){this.host=i,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return getFocusableElements(this.__trapNode)}get __focusedElementIndex(){const i=this.__focusableElements;return i.indexOf(i.filter(isElementFocused).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(i){if(this.__trapNode=i,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");instances.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,instances.pop()}__onKeyDown(i){if(this.__trapNode&&this===Array.from(instances).pop()&&i.key==="Tab"){i.preventDefault();const t=i.shiftKey;this.__focusNextElement(t)}}__focusNextElement(i=!1){const t=this.__focusableElements,r=i?-1:1,o=this.__focusedElementIndex,a=(t.length+o+r)%t.length,s=t[a];s.focus(),s.localName==="input"&&s.select()}}/** - * @license - * Copyright (c) 2021 - 2023 Vaadin Ltd. - * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ - */const ControllerMixin=dedupingMixin(n=>typeof n.prototype.addController=="function"?n:class extends n{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach(t=>{t.hostConnected&&t.hostConnected()})}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach(t=>{t.hostDisconnected&&t.hostDisconnected()})}addController(t){this.__controllers.add(t),this.$!==void 0&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}}),DEV_MODE_CODE_REGEXP=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,FlowClients=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function isMinified(){function n(){return!0}return uncommentAndRun(n)}function isDevelopmentMode(){try{return isForcedDevelopmentMode()?!0:isLocalhost()?FlowClients?!isFlowProductionMode():!isMinified():!1}catch{return!1}}function isForcedDevelopmentMode(){return localStorage.getItem("vaadin.developmentmode.force")}function isLocalhost(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function isFlowProductionMode(){return!!(FlowClients&&Object.keys(FlowClients).map(i=>FlowClients[i]).filter(i=>i.productionMode).length>0)}function uncommentAndRun(n,i){if(typeof n!="function")return;const t=DEV_MODE_CODE_REGEXP.exec(n.toString());if(t)try{n=new Function(t[1])}catch(r){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",r)}return n(i)}window.Vaadin=window.Vaadin||{};const runIfDevelopmentMode=function(n,i){if(window.Vaadin.developmentMode)return uncommentAndRun(n,i)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=isDevelopmentMode());function maybeGatherAndSendStats(){/*! vaadin-dev-mode:start +*/const PolymerElement=ElementMixin$1(HTMLElement),DEV_MODE_CODE_REGEXP=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,FlowClients=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function isMinified(){function n(){return!0}return uncommentAndRun(n)}function isDevelopmentMode(){try{return isForcedDevelopmentMode()?!0:isLocalhost()?FlowClients?!isFlowProductionMode():!isMinified():!1}catch{return!1}}function isForcedDevelopmentMode(){return localStorage.getItem("vaadin.developmentmode.force")}function isLocalhost(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function isFlowProductionMode(){return!!(FlowClients&&Object.keys(FlowClients).map(i=>FlowClients[i]).filter(i=>i.productionMode).length>0)}function uncommentAndRun(n,i){if(typeof n!="function")return;const t=DEV_MODE_CODE_REGEXP.exec(n.toString());if(t)try{n=new Function(t[1])}catch(r){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",r)}return n(i)}window.Vaadin=window.Vaadin||{};const runIfDevelopmentMode=function(n,i){if(window.Vaadin.developmentMode)return uncommentAndRun(n,i)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=isDevelopmentMode());function maybeGatherAndSendStats(){/*! vaadin-dev-mode:start (function () { 'use strict'; @@ -760,6 +672,155 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ */window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){usageStatistics()};let statsJob;const registered=new Set,ElementMixin=n=>class extends DirMixin(n){static get version(){return"24.2.0"}static finalize(){super.finalize();const{is:t}=this;t&&!registered.has(t)&&(window.Vaadin.registrations.push(this),registered.add(t),window.Vaadin.developmentModeCallback&&(statsJob=Debouncer$1.debounce(statsJob,idlePeriod,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}),enqueueDebouncer$1(statsJob)))}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add to the HTML document.')}};/** * @license + * Copyright (c) 2021 - 2023 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */const observer=new ResizeObserver(n=>{setTimeout(()=>{n.forEach(i=>{i.target.resizables?i.target.resizables.forEach(t=>{t._onResize(i.contentRect)}):i.target._onResize(i.contentRect)})})}),ResizeMixin=dedupingMixin(n=>class extends n{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),observer.observe(this),this._observeParent){const t=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;t.resizables||(t.resizables=new Set,observer.observe(t)),t.resizables.add(this),this.__parent=t}}disconnectedCallback(){super.disconnectedCallback(),observer.unobserve(this);const t=this.__parent;if(this._observeParent&&t){const r=t.resizables;r&&(r.delete(this),r.size===0&&observer.unobserve(t)),this.__parent=null}}_onResize(t){}});/** + * @license + * Copyright (c) 2017 - 2023 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class FormLayout extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement))){static get template(){return html` + +
+ +
+ `}static get is(){return"vaadin-form-layout"}static get properties(){return{responsiveSteps:{type:Array,value(){return[{minWidth:0,columns:1,labelsPosition:"top"},{minWidth:"20em",columns:1},{minWidth:"40em",columns:2}]},observer:"_responsiveStepsChanged"},_columnCount:{type:Number},_labelsOnTop:{type:Boolean}}}static get observers(){return["_invokeUpdateLayout(_columnCount, _labelsOnTop)"]}ready(){this._styleElement=document.createElement("style"),this.appendChild(this._styleElement),this._styleElement.textContent=" ",super.ready(),this.addEventListener("animationend",this.__onAnimationEnd)}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>this._selectResponsiveStep()),requestAnimationFrame(()=>this._updateLayout()),this._observeChildrenColspanChange()}disconnectedCallback(){super.disconnectedCallback(),this.__mutationObserver.disconnect(),this.__childObserver.disconnect()}_observeChildrenColspanChange(){const i={attributes:!0};this.__mutationObserver=new MutationObserver(t=>{t.forEach(r=>{r.type==="attributes"&&(r.attributeName==="colspan"||r.attributeName==="hidden")&&this._updateLayout()})}),[...this.children].forEach(t=>{this.__mutationObserver.observe(t,i)}),this.__childObserver=new MutationObserver(t=>{const r=[],o=[];t.forEach(a=>{r.push(...this._getObservableNodes(a.addedNodes)),o.push(...this._getObservableNodes(a.removedNodes))}),r.forEach(a=>{this.__mutationObserver.observe(a,i)}),(r.length>0||o.length>0)&&this._updateLayout()}),this.__childObserver.observe(this,{childList:!0})}_getObservableNodes(i){const t=["template","style","dom-repeat","dom-if"];return Array.from(i).filter(r=>r.nodeType===Node.ELEMENT_NODE&&t.indexOf(r.localName.toLowerCase())===-1)}_naturalNumberOrOne(i){return typeof i=="number"&&i>=1&&i<1/0?Math.floor(i):1}_isValidCSSLength(i){return i==="inherit"||i==="normal"?!1:(this._styleElement.firstChild.nodeValue=`#styleElement { word-spacing: ${i}; }`,this._styleElement.sheet?["",null].indexOf(this._styleElement.sheet.cssRules[0].style.getPropertyValue("word-spacing"))<0:!0)}_responsiveStepsChanged(i,t){try{if(!Array.isArray(i))throw new Error('Invalid "responsiveSteps" type, an Array is required.');if(i.length<1)throw new Error('Invalid empty "responsiveSteps" array, at least one item is required.');i.forEach(r=>{if(this._naturalNumberOrOne(r.columns)!==r.columns)throw new Error(`Invalid 'columns' value of ${r.columns}, a natural number is required.`);if(r.minWidth!==void 0&&!this._isValidCSSLength(r.minWidth))throw new Error(`Invalid 'minWidth' value of ${r.minWidth}, a valid CSS length required.`);if(r.labelsPosition!==void 0&&["aside","top"].indexOf(r.labelsPosition)===-1)throw new Error(`Invalid 'labelsPosition' value of ${r.labelsPosition}, 'aside' or 'top' string is required.`)})}catch(r){t&&t!==i?(console.warn(`${r.message} Using previously set 'responsiveSteps' instead.`),this.responsiveSteps=t):(console.warn(`${r.message} Using default 'responsiveSteps' instead.`),this.responsiveSteps=[{minWidth:0,columns:1,labelsPosition:"top"},{minWidth:"20em",columns:1},{minWidth:"40em",columns:2}])}this._selectResponsiveStep()}__onAnimationEnd(i){i.animationName.indexOf("vaadin-form-layout-appear")===0&&this._selectResponsiveStep()}_selectResponsiveStep(){let i;const t="background-position";this.responsiveSteps.forEach(r=>{this.$.layout.style.setProperty(t,r.minWidth),parseFloat(getComputedStyle(this.$.layout).getPropertyValue(t))<=this.offsetWidth&&(i=r)}),this.$.layout.style.removeProperty(t),i&&(this._columnCount=i.columns,this._labelsOnTop=i.labelsPosition==="top")}_invokeUpdateLayout(){this._updateLayout()}_updateLayout(){const i=getComputedStyle(this),t=i.getPropertyValue("--vaadin-form-layout-column-spacing"),r=i.direction,o=`margin-${r==="ltr"?"left":"right"}`,a=`margin-${r==="ltr"?"right":"left"}`,s=this.offsetWidth;let l=0;Array.from(this.children).filter(h=>h.localName==="br"||getComputedStyle(h).display!=="none").forEach((h,c,d)=>{if(h.localName==="br"){l=0;return}let u;u=this._naturalNumberOrOne(parseFloat(h.getAttribute("colspan"))),u=Math.min(u,this._columnCount);const p=u/this._columnCount;h.style.width=`calc(${p*99.9}% - ${1-p} * ${t})`,l+u>this._columnCount&&(l=0),l===0?h.style.setProperty(o,"0px"):h.style.removeProperty(o);const f=c+1,v=fn.test(navigator.userAgent),testPlatform=n=>n.test(navigator.platform),testVendor=n=>n.test(navigator.vendor),isAndroid=testUserAgent(/Android/u),isChrome=testUserAgent(/Chrome/u)&&testVendor(/Google Inc/u),isFirefox$4=testUserAgent(/Firefox/u),isIPad=testPlatform(/^iPad/u)||testPlatform(/^Mac/u)&&navigator.maxTouchPoints>1,isIPhone=testPlatform(/^iPhone/u),isIOS=isIPhone||isIPad,isSafari=testUserAgent(/^((?!chrome|android).)*safari/iu),isTouch=(()=>{try{return document.createEvent("TouchEvent"),!0}catch{return!1}})();/** + * @license + * Copyright (c) 2018 - 2023 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */function _detectIosNavbar(){if(isIOS){const n=window.innerHeight,t=window.innerWidth>n,r=document.documentElement.clientHeight;t&&r>n?document.documentElement.style.setProperty("--vaadin-viewport-offset-bottom",`${r-n}px`):document.documentElement.style.setProperty("--vaadin-viewport-offset-bottom","")}}_detectIosNavbar();window.addEventListener("resize",_detectIosNavbar);const template$a=document.createElement("template");template$a.innerHTML=` + +`;document.head.appendChild(template$a.content);/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/let scheduled=!1,beforeRenderQueue=[],afterRenderQueue=[];function schedule(){scheduled=!0,requestAnimationFrame(function(){scheduled=!1,flushQueue(beforeRenderQueue),setTimeout(function(){runQueue(afterRenderQueue)})})}function flushQueue(n){for(;n.length;)callMethod(n.shift())}function runQueue(n){for(let i=0,t=n.length;i{throw o})}}function beforeNextRender(n,i,t){scheduled||schedule(),beforeRenderQueue.push([n,i,t])}function afterNextRender(n,i,t){scheduled||schedule(),afterRenderQueue.push([n,i,t])}/** + * @license + * Copyright (c) 2017 Anton Korzunov + * SPDX-License-Identifier: MIT + */let counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0;const isElement=n=>n&&n.nodeType===Node.ELEMENT_NODE,logError=(...n)=>{console.error(`Error: ${n.join(" ")}. Skip setting aria-hidden.`)},correctTargets=(n,i)=>isElement(n)?i.map(t=>{if(!isElement(t))return logError(t,"is not a valid element"),null;let r=t;for(;r&&r!==n;){if(n.contains(r))return t;r=r.getRootNode().host}return logError(t,"is not contained inside",n),null}).filter(t=>!!t):(logError(n,"is not a valid element"),[]),applyAttributeToOthers=(n,i,t,r)=>{const o=correctTargets(i,Array.isArray(n)?n:[n]);markerMap[t]||(markerMap[t]=new WeakMap);const a=markerMap[t],s=[],l=new Set,h=new Set(o),c=u=>{if(!u||l.has(u))return;l.add(u);const p=u.assignedSlot;p&&c(p),c(u.parentNode||u.host)};o.forEach(c);const d=u=>{if(!u||h.has(u))return;const p=u.shadowRoot;(p?[...u.children,...p.children]:[...u.children]).forEach(v=>{if(!["template","script","style"].includes(v.localName))if(l.has(v))d(v);else{const g=v.getAttribute(r),m=g!==null&&g!=="false",_=(counterMap.get(v)||0)+1,y=(a.get(v)||0)+1;counterMap.set(v,_),a.set(v,y),s.push(v),_===1&&m&&uncontrolledNodes.set(v,!0),y===1&&v.setAttribute(t,"true"),m||v.setAttribute(r,"true")}})};return d(i),l.clear(),lockCount+=1,()=>{s.forEach(u=>{const p=counterMap.get(u)-1,f=a.get(u)-1;counterMap.set(u,p),a.set(u,f),p||(uncontrolledNodes.has(u)?uncontrolledNodes.delete(u):u.removeAttribute(r)),f||u.removeAttribute(t)}),lockCount-=1,lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=(n,i=document.body,t="data-aria-hidden")=>{const r=Array.from(Array.isArray(n)?n:[n]);return i&&r.push(...Array.from(i.querySelectorAll("[aria-live]"))),applyAttributeToOthers(r,i,t,"aria-hidden")};/** + * @license + * Copyright (c) 2021 - 2023 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class AriaModalController{constructor(i,t){this.host=i,this.callback=typeof t=="function"?t:()=>i}showModal(){const i=this.callback();this.__showOthers=hideOthers(i)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}/** + * @license + * Copyright (c) 2021 - 2023 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */let keyboardActive=!1;window.addEventListener("keydown",()=>{keyboardActive=!0},{capture:!0});window.addEventListener("mousedown",()=>{keyboardActive=!1},{capture:!0});function getDeepActiveElement(){let n=document.activeElement||document.body;for(;n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function isKeyboardActive(){return keyboardActive}function isElementHiddenDirectly(n){const i=n.style;if(i.visibility==="hidden"||i.display==="none")return!0;const t=window.getComputedStyle(n);return t.visibility==="hidden"||t.display==="none"}function hasLowerTabOrder(n,i){const t=Math.max(n.tabIndex,0),r=Math.max(i.tabIndex,0);return t===0||r===0?r>t:t>r}function mergeSortByTabIndex(n,i){const t=[];for(;n.length>0&&i.length>0;)hasLowerTabOrder(n[0],i[0])?t.push(i.shift()):t.push(n.shift());return t.concat(n,i)}function sortElementsByTabIndex(n){const i=n.length;if(i<2)return n;const t=Math.ceil(i/2),r=sortElementsByTabIndex(n.slice(0,t)),o=sortElementsByTabIndex(n.slice(t));return mergeSortByTabIndex(r,o)}function isElementHidden(n){return n.offsetParent===null&&n.clientWidth===0&&n.clientHeight===0?!0:isElementHiddenDirectly(n)}function isElementFocusable(n){return n.matches('[tabindex="-1"]')?!1:n.matches("input, select, textarea, button, object")?n.matches(":not([disabled])"):n.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function isElementFocused(n){return n.getRootNode().activeElement===n}function normalizeTabIndex(n){if(!isElementFocusable(n))return-1;const i=n.getAttribute("tabindex")||0;return Number(i)}function collectFocusableNodes(n,i){if(n.nodeType!==Node.ELEMENT_NODE||isElementHiddenDirectly(n))return!1;const t=n,r=normalizeTabIndex(t);let o=r>0;r>=0&&i.push(t);let a=[];return t.localName==="slot"?a=t.assignedNodes({flatten:!0}):a=(t.shadowRoot||t).children,[...a].forEach(s=>{o=collectFocusableNodes(s,i)||o}),o}function getFocusableElements(n){const i=[];return collectFocusableNodes(n,i)?sortElementsByTabIndex(i):i}/** + * @license + * Copyright (c) 2021 - 2023 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */const instances=[];class FocusTrapController{constructor(i){this.host=i,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return getFocusableElements(this.__trapNode)}get __focusedElementIndex(){const i=this.__focusableElements;return i.indexOf(i.filter(isElementFocused).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(i){if(this.__trapNode=i,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");instances.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,instances.pop()}__onKeyDown(i){if(this.__trapNode&&this===Array.from(instances).pop()&&i.key==="Tab"){i.preventDefault();const t=i.shiftKey;this.__focusNextElement(t)}}__focusNextElement(i=!1){const t=this.__focusableElements,r=i?-1:1,o=this.__focusedElementIndex,a=(t.length+o+r)%t.length,s=t[a];s.focus(),s.localName==="input"&&s.select()}}/** + * @license + * Copyright (c) 2021 - 2023 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */const ControllerMixin=dedupingMixin(n=>typeof n.prototype.addController=="function"?n:class extends n{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach(t=>{t.hostConnected&&t.hostConnected()})}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach(t=>{t.hostDisconnected&&t.hostDisconnected()})}addController(t){this.__controllers.add(t),this.$!==void 0&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}});/** + * @license * Copyright (c) 2018 - 2023 Vaadin Ltd. * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ */class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElement))){static get template(){return html` @@ -998,65 +1059,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - `}static get is(){return"vaadin-vertical-layout"}}defineCustomElement(VerticalLayout);const horizontalLayout=css$e` - :host([theme~='margin']) { - margin: var(--lumo-space-m); - } - - :host([theme~='padding']) { - padding: var(--lumo-space-m); - } - - :host([theme~='spacing-xs']) { - gap: var(--lumo-space-xs); - } - - :host([theme~='spacing-s']) { - gap: var(--lumo-space-s); - } - - :host([theme~='spacing']) { - gap: var(--lumo-space-m); - } - - :host([theme~='spacing-l']) { - gap: var(--lumo-space-l); - } - - :host([theme~='spacing-xl']) { - gap: var(--lumo-space-xl); - } -`;registerStyles$1("vaadin-horizontal-layout",horizontalLayout,{moduleId:"lumo-horizontal-layout"});/** - * @license - * Copyright (c) 2017 - 2023 Vaadin Ltd. - * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ - */class HorizontalLayout extends ElementMixin(ThemableMixin(PolymerElement)){static get template(){return html` - - - - `}static get is(){return"vaadin-horizontal-layout"}}defineCustomElement(HorizontalLayout);/** + `}static get is(){return"vaadin-vertical-layout"}}defineCustomElement(VerticalLayout);/** * @license * Copyright (c) 2017 - 2023 Vaadin Ltd. * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ @@ -2934,10 +2937,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN `}}defineCustomElement(AvatarGroupOverlay);/** * @license - * Copyright (c) 2021 - 2023 Vaadin Ltd. - * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ - */const observer=new ResizeObserver(n=>{setTimeout(()=>{n.forEach(i=>{i.target.resizables?i.target.resizables.forEach(t=>{t._onResize(i.contentRect)}):i.target._onResize(i.contentRect)})})}),ResizeMixin=dedupingMixin(n=>class extends n{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),observer.observe(this),this._observeParent){const t=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;t.resizables||(t.resizables=new Set,observer.observe(t)),t.resizables.add(this),this.__parent=t}}disconnectedCallback(){super.disconnectedCallback(),observer.unobserve(this);const t=this.__parent;if(this._observeParent&&t){const r=t.resizables;r&&(r.delete(this),r.size===0&&observer.unobserve(t)),this.__parent=null}}_onResize(t){}});/** - * @license * Copyright (c) 2020 - 2023 Vaadin Ltd. * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ */const MINIMUM_DISPLAYED_AVATARS=2;class AvatarGroup extends ResizeMixin(OverlayClassMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement))))){static get template(){return html` @@ -6771,64 +6770,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN * * See for the full * license. - */(function(){function n(t){const r=t._getPopup();r&&(r.className=t.className)}const i=new MutationObserver(t=>{t.forEach(r=>{r.type==="attributes"&&r.attributeName==="class"&&n(r.target)})});window.Vaadin.Flow.cookieConsentConnector={initLazy:function(t){t.$connector||(t.$connector={},i.observe(t,{attributes:!0,attributeFilter:["class"]}),n(t))}}})();registerStyles$1("vaadin-form-layout",css$e` - :host { - --vaadin-form-layout-column-spacing: var(--lumo-space-l); - } - `,{moduleId:"lumo-form-layout"});/** - * @license - * Copyright (c) 2017 - 2023 Vaadin Ltd. - * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ - */class FormLayout extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement))){static get template(){return html` - -
- -
- `}static get is(){return"vaadin-form-layout"}static get properties(){return{responsiveSteps:{type:Array,value(){return[{minWidth:0,columns:1,labelsPosition:"top"},{minWidth:"20em",columns:1},{minWidth:"40em",columns:2}]},observer:"_responsiveStepsChanged"},_columnCount:{type:Number},_labelsOnTop:{type:Boolean}}}static get observers(){return["_invokeUpdateLayout(_columnCount, _labelsOnTop)"]}ready(){this._styleElement=document.createElement("style"),this.appendChild(this._styleElement),this._styleElement.textContent=" ",super.ready(),this.addEventListener("animationend",this.__onAnimationEnd)}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>this._selectResponsiveStep()),requestAnimationFrame(()=>this._updateLayout()),this._observeChildrenColspanChange()}disconnectedCallback(){super.disconnectedCallback(),this.__mutationObserver.disconnect(),this.__childObserver.disconnect()}_observeChildrenColspanChange(){const i={attributes:!0};this.__mutationObserver=new MutationObserver(t=>{t.forEach(r=>{r.type==="attributes"&&(r.attributeName==="colspan"||r.attributeName==="hidden")&&this._updateLayout()})}),[...this.children].forEach(t=>{this.__mutationObserver.observe(t,i)}),this.__childObserver=new MutationObserver(t=>{const r=[],o=[];t.forEach(a=>{r.push(...this._getObservableNodes(a.addedNodes)),o.push(...this._getObservableNodes(a.removedNodes))}),r.forEach(a=>{this.__mutationObserver.observe(a,i)}),(r.length>0||o.length>0)&&this._updateLayout()}),this.__childObserver.observe(this,{childList:!0})}_getObservableNodes(i){const t=["template","style","dom-repeat","dom-if"];return Array.from(i).filter(r=>r.nodeType===Node.ELEMENT_NODE&&t.indexOf(r.localName.toLowerCase())===-1)}_naturalNumberOrOne(i){return typeof i=="number"&&i>=1&&i<1/0?Math.floor(i):1}_isValidCSSLength(i){return i==="inherit"||i==="normal"?!1:(this._styleElement.firstChild.nodeValue=`#styleElement { word-spacing: ${i}; }`,this._styleElement.sheet?["",null].indexOf(this._styleElement.sheet.cssRules[0].style.getPropertyValue("word-spacing"))<0:!0)}_responsiveStepsChanged(i,t){try{if(!Array.isArray(i))throw new Error('Invalid "responsiveSteps" type, an Array is required.');if(i.length<1)throw new Error('Invalid empty "responsiveSteps" array, at least one item is required.');i.forEach(r=>{if(this._naturalNumberOrOne(r.columns)!==r.columns)throw new Error(`Invalid 'columns' value of ${r.columns}, a natural number is required.`);if(r.minWidth!==void 0&&!this._isValidCSSLength(r.minWidth))throw new Error(`Invalid 'minWidth' value of ${r.minWidth}, a valid CSS length required.`);if(r.labelsPosition!==void 0&&["aside","top"].indexOf(r.labelsPosition)===-1)throw new Error(`Invalid 'labelsPosition' value of ${r.labelsPosition}, 'aside' or 'top' string is required.`)})}catch(r){t&&t!==i?(console.warn(`${r.message} Using previously set 'responsiveSteps' instead.`),this.responsiveSteps=t):(console.warn(`${r.message} Using default 'responsiveSteps' instead.`),this.responsiveSteps=[{minWidth:0,columns:1,labelsPosition:"top"},{minWidth:"20em",columns:1},{minWidth:"40em",columns:2}])}this._selectResponsiveStep()}__onAnimationEnd(i){i.animationName.indexOf("vaadin-form-layout-appear")===0&&this._selectResponsiveStep()}_selectResponsiveStep(){let i;const t="background-position";this.responsiveSteps.forEach(r=>{this.$.layout.style.setProperty(t,r.minWidth),parseFloat(getComputedStyle(this.$.layout).getPropertyValue(t))<=this.offsetWidth&&(i=r)}),this.$.layout.style.removeProperty(t),i&&(this._columnCount=i.columns,this._labelsOnTop=i.labelsPosition==="top")}_invokeUpdateLayout(){this._updateLayout()}_updateLayout(){const i=getComputedStyle(this),t=i.getPropertyValue("--vaadin-form-layout-column-spacing"),r=i.direction,o=`margin-${r==="ltr"?"left":"right"}`,a=`margin-${r==="ltr"?"right":"left"}`,s=this.offsetWidth;let l=0;Array.from(this.children).filter(h=>h.localName==="br"||getComputedStyle(h).display!=="none").forEach((h,c,d)=>{if(h.localName==="br"){l=0;return}let u;u=this._naturalNumberOrOne(parseFloat(h.getAttribute("colspan"))),u=Math.min(u,this._columnCount);const p=u/this._columnCount;h.style.width=`calc(${p*99.9}% - ${1-p} * ${t})`,l+u>this._columnCount&&(l=0),l===0?h.style.setProperty(o,"0px"):h.style.removeProperty(o);const f=c+1,v=f{t.forEach(r=>{r.type==="attributes"&&r.attributeName==="class"&&n(r.target)})});window.Vaadin.Flow.cookieConsentConnector={initLazy:function(t){t.$connector||(t.$connector={},i.observe(t,{attributes:!0,attributeFilter:["class"]}),n(t))}}})();registerStyles$1("vaadin-grid",css$e` :host { font-family: var(--lumo-font-family); font-size: var(--lumo-font-size-m); @@ -12767,7 +12709,65 @@ northing meters`+n;var p=u/2,f=0,v=0,g,m,_,y,b;return p>0&&(g=1e5/Math.pow(10,p) } - `}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(i,t){return isTemplateResult(i)?Notification._createAndShowNotification(r=>{render$1(i,r)},t):Notification._createAndShowNotification(r=>{r.innerText=i},t)}static _createAndShowNotification(i,t){const r=document.createElement(Notification.is);return t&&Number.isFinite(t.duration)&&(r.duration=t.duration),t&&t.position&&(r.position=t.position),t&&t.theme&&r.setAttribute("theme",t.theme),r.renderer=i,document.body.appendChild(r),r.opened=!0,r.addEventListener("opened-changed",o=>{o.detail.value||r.remove()}),r}get _container(){return Notification._container||(Notification._container=document.createElement("vaadin-notification-container"),document.body.appendChild(Notification._container)),Notification._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),processTemplates(this)}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected||(this.opened=!1)})}requestContentUpdate(){this.renderer&&this.renderer(this._card,this)}_rendererChanged(i,t,r){if(!r)return;const o=this._oldRenderer!==i;this._oldRenderer=i,o&&(r.innerHTML="",delete r._$litPart$),t&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate())}open(){this.opened=!0}close(){this.opened=!1}_openedChanged(i){i?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard()}_animatedAppendNotificationCard(){if(this._card){this._card.setAttribute("opening",""),this._appendNotificationCard();const i=()=>{this._card.removeEventListener("animationend",i),this._card.removeAttribute("opening")};this._card.addEventListener("animationend",i),this._didAnimateNotificationAppend=!0}else this._didAnimateNotificationAppend=!1}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)){console.warn(`Invalid alignment parameter provided: position=${this.position}`);return}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}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this._card.setAttribute("closing","");const i=getComputedStyle(this._card).getPropertyValue("animation-name");if(i&&i!=="none"){const t=()=>{this._removeNotificationCard(),this._card.removeEventListener("animationend",t)};this._card.addEventListener("animationend",t)}else this._removeNotificationCard()}_positionChanged(){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(i,t){t&&(clearTimeout(this._durationTimeoutId),i>0&&(this._durationTimeoutId=setTimeout(()=>this.close(),i)))}}defineCustomElement(NotificationContainer);defineCustomElement(NotificationCard);defineCustomElement(Notification);const scroller=css$e` + `}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(i,t){return isTemplateResult(i)?Notification._createAndShowNotification(r=>{render$1(i,r)},t):Notification._createAndShowNotification(r=>{r.innerText=i},t)}static _createAndShowNotification(i,t){const r=document.createElement(Notification.is);return t&&Number.isFinite(t.duration)&&(r.duration=t.duration),t&&t.position&&(r.position=t.position),t&&t.theme&&r.setAttribute("theme",t.theme),r.renderer=i,document.body.appendChild(r),r.opened=!0,r.addEventListener("opened-changed",o=>{o.detail.value||r.remove()}),r}get _container(){return Notification._container||(Notification._container=document.createElement("vaadin-notification-container"),document.body.appendChild(Notification._container)),Notification._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),processTemplates(this)}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected||(this.opened=!1)})}requestContentUpdate(){this.renderer&&this.renderer(this._card,this)}_rendererChanged(i,t,r){if(!r)return;const o=this._oldRenderer!==i;this._oldRenderer=i,o&&(r.innerHTML="",delete r._$litPart$),t&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate())}open(){this.opened=!0}close(){this.opened=!1}_openedChanged(i){i?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard()}_animatedAppendNotificationCard(){if(this._card){this._card.setAttribute("opening",""),this._appendNotificationCard();const i=()=>{this._card.removeEventListener("animationend",i),this._card.removeAttribute("opening")};this._card.addEventListener("animationend",i),this._didAnimateNotificationAppend=!0}else this._didAnimateNotificationAppend=!1}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)){console.warn(`Invalid alignment parameter provided: position=${this.position}`);return}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}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this._card.setAttribute("closing","");const i=getComputedStyle(this._card).getPropertyValue("animation-name");if(i&&i!=="none"){const t=()=>{this._removeNotificationCard(),this._card.removeEventListener("animationend",t)};this._card.addEventListener("animationend",t)}else this._removeNotificationCard()}_positionChanged(){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(i,t){t&&(clearTimeout(this._durationTimeoutId),i>0&&(this._durationTimeoutId=setTimeout(()=>this.close(),i)))}}defineCustomElement(NotificationContainer);defineCustomElement(NotificationCard);defineCustomElement(Notification);const horizontalLayout=css$e` + :host([theme~='margin']) { + margin: var(--lumo-space-m); + } + + :host([theme~='padding']) { + padding: var(--lumo-space-m); + } + + :host([theme~='spacing-xs']) { + gap: var(--lumo-space-xs); + } + + :host([theme~='spacing-s']) { + gap: var(--lumo-space-s); + } + + :host([theme~='spacing']) { + gap: var(--lumo-space-m); + } + + :host([theme~='spacing-l']) { + gap: var(--lumo-space-l); + } + + :host([theme~='spacing-xl']) { + gap: var(--lumo-space-xl); + } +`;registerStyles$1("vaadin-horizontal-layout",horizontalLayout,{moduleId:"lumo-horizontal-layout"});/** + * @license + * Copyright (c) 2017 - 2023 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class HorizontalLayout extends ElementMixin(ThemableMixin(PolymerElement)){static get template(){return html` + + + + `}static get is(){return"vaadin-horizontal-layout"}}defineCustomElement(HorizontalLayout);const scroller=css$e` :host { outline: none; } diff --git a/src/main/dev-bundle/webapp/VAADIN/build/indexhtml-6a469b1f.js b/src/main/dev-bundle/webapp/VAADIN/build/indexhtml-add66a7c.js similarity index 88% rename from src/main/dev-bundle/webapp/VAADIN/build/indexhtml-6a469b1f.js rename to src/main/dev-bundle/webapp/VAADIN/build/indexhtml-add66a7c.js index 19e03ab..43c4da6 100644 --- a/src/main/dev-bundle/webapp/VAADIN/build/indexhtml-6a469b1f.js +++ b/src/main/dev-bundle/webapp/VAADIN/build/indexhtml-add66a7c.js @@ -1,19 +1,19 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function o(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=o(n);fetch(n.href,r)}})();window.Vaadin=window.Vaadin||{};window.Vaadin.featureFlags=window.Vaadin.featureFlags||{};window.Vaadin.featureFlags.exampleFeatureFlag=!1;window.Vaadin.featureFlags.collaborationEngineBackend=!1;window.Vaadin.featureFlags.webPush=!1;window.Vaadin.featureFlags.formFillerAddon=!1;const Dn="modulepreload",jn=function(t,e){return new URL(t,e).href},ri={},f=function(e,o,i){if(!o||o.length===0)return e();const n=document.getElementsByTagName("link");return Promise.all(o.map(r=>{if(r=jn(r,i),r in ri)return;ri[r]=!0;const s=r.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!i)for(let c=n.length-1;c>=0;c--){const m=n[c];if(m.href===r&&(!s||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":Dn,s||(d.as="script",d.crossOrigin=""),d.href=r,document.head.appendChild(d),s)return new Promise((c,m)=>{d.addEventListener("load",c),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>e()).catch(r=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=r,window.dispatchEvent(s),!s.defaultPrevented)throw r})};function St(t){return t=t||[],Array.isArray(t)?t:[t]}function Q(t){return`[Vaadin.Router] ${t}`}function Un(t){if(typeof t!="object")return String(t);const e=Object.prototype.toString.call(t).match(/ (.*)\]$/)[1];return e==="Object"||e==="Array"?`${e} ${JSON.stringify(t)}`:e}const Ct="module",kt="nomodule",wo=[Ct,kt];function si(t){if(!t.match(/.+\.[m]?js$/))throw new Error(Q(`Unsupported type for bundle "${t}": .js or .mjs expected.`))}function on(t){if(!t||!Y(t.path))throw new Error(Q('Expected route config to be an object with a "path" string property, or an array of such objects'));const e=t.bundle,o=["component","redirect","bundle"];if(!Se(t.action)&&!Array.isArray(t.children)&&!Se(t.children)&&!Tt(e)&&!o.some(i=>Y(t[i])))throw new Error(Q(`Expected route config "${t.path}" to include either "${o.join('", "')}" or "action" function but none found.`));if(e)if(Y(e))si(e);else if(wo.some(i=>i in e))wo.forEach(i=>i in e&&si(e[i]));else throw new Error(Q('Expected route bundle to include either "'+kt+'" or "'+Ct+'" keys, or both'));t.redirect&&["bundle","component"].forEach(i=>{i in t&&console.warn(Q(`Route config "${t.path}" has both "redirect" and "${i}" properties, and "redirect" will always override the latter. Did you mean to only use "${i}"?`))})}function ai(t){St(t).forEach(e=>on(e))}function li(t,e){let o=document.head.querySelector('script[src="'+t+'"][async]');return o||(o=document.createElement("script"),o.setAttribute("src",t),e===Ct?o.setAttribute("type",Ct):e===kt&&o.setAttribute(kt,""),o.async=!0),new Promise((i,n)=>{o.onreadystatechange=o.onload=r=>{o.__dynamicImportLoaded=!0,i(r)},o.onerror=r=>{o.parentNode&&o.parentNode.removeChild(o),n(r)},o.parentNode===null?document.head.appendChild(o):o.__dynamicImportLoaded&&i()})}function Fn(t){return Y(t)?li(t):Promise.race(wo.filter(e=>e in t).map(e=>li(t[e],e)))}function Ke(t,e){return!window.dispatchEvent(new CustomEvent(`vaadin-router-${t}`,{cancelable:t==="go",detail:e}))}function Tt(t){return typeof t=="object"&&!!t}function Se(t){return typeof t=="function"}function Y(t){return typeof t=="string"}function nn(t){const e=new Error(Q(`Page not found (${t.pathname})`));return e.context=t,e.code=404,e}const Le=new class{};function Bn(t){const e=t.port,o=t.protocol,r=o==="http:"&&e==="80"||o==="https:"&&e==="443"?t.hostname:t.host;return`${o}//${r}`}function di(t){if(t.defaultPrevented||t.button!==0||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey)return;let e=t.target;const o=t.composedPath?t.composedPath():t.path||[];for(let l=0;l-1&&(y=r[ee],r=r.slice(0,ee))}r&&(o.push(r),r="",a=!1);var $e=y!==""&&ce!==void 0&&ce!==y,Ae=H==="+"||H==="*",Bt=H==="?"||H==="*",re=y||s,lt=ne||Ft;o.push({name:he||i++,prefix:y,delimiter:re,optional:Bt,repeat:Ae,partial:$e,pattern:lt?Zn(lt):"[^"+ue(re)+"]+?"})}return(r||n-1;else{var y=h.repeat?"(?:"+h.pattern+")(?:"+ue(h.delimiter)+"(?:"+h.pattern+"))*":h.pattern;e&&e.push(h),h.optional?h.partial?d+=ue(h.prefix)+"("+y+")?":d+="(?:"+ue(h.prefix)+"("+y+"))?":d+=ue(h.prefix)+"("+y+")"}}return r?(i||(d+="(?:"+s+")?"),d+=a==="$"?"$":"(?="+a+")"):(i||(d+="(?:"+s+"(?="+a+"))?"),c||(d+="(?="+s+"|"+a+")")),new RegExp(d,ln(o))}function cn(t,e,o){return t instanceof RegExp?er(t,e):Array.isArray(t)?tr(t,e,o):or(t,e,o)}He.parse=Gn;He.compile=Kn;He.tokensToFunction=Jn;He.tokensToRegExp=Yn;const{hasOwnProperty:ir}=Object.prototype,Eo=new Map;Eo.set("|false",{keys:[],pattern:/(?:)/});function hi(t){try{return decodeURIComponent(t)}catch{return t}}function nr(t,e,o,i,n){o=!!o;const r=`${t}|${o}`;let s=Eo.get(r);if(!s){const d=[];s={keys:d,pattern:He(t,d,{end:o,strict:t===""})},Eo.set(r,s)}const l=s.pattern.exec(e);if(!l)return null;const a=Object.assign({},n);for(let d=1;d0&&e.charAt(y)==="/"&&(y+=1),s=hn(h,e.substr(y),o,r.keys,r.params)}const m=s.next(d);if(!m.done)return{done:!1,value:m.value};s=null,l++}return{done:!0}}}}function rr(t){if(Se(t.route.action))return t.route.action(t)}function sr(t,e){let o=e;for(;o;)if(o=o.parent,o===t)return!0;return!1}function ar(t){let e=`Path '${t.pathname}' is not properly resolved due to an error.`;const o=(t.route||{}).path;return o&&(e+=` Resolution had failed on route: '${o}'`),e}function lr(t,e){const{route:o,path:i}=e;if(o&&!o.__synthetic){const n={path:i,route:o};if(!t.chain)t.chain=[];else if(o.parent){let r=t.chain.length;for(;r--&&t.chain[r].route&&t.chain[r].route!==o.parent;)t.chain.pop()}t.chain.push(n)}}class Xe{constructor(e,o={}){if(Object(e)!==e)throw new TypeError("Invalid routes");this.baseUrl=o.baseUrl||"",this.errorHandler=o.errorHandler,this.resolveRoute=o.resolveRoute||rr,this.context=Object.assign({resolver:this},o.context),this.root=Array.isArray(e)?{path:"",__children:e,parent:null,__synthetic:!0}:e,this.root.parent=null}getRoutes(){return[...this.root.__children]}setRoutes(e){ai(e);const o=[...St(e)];this.root.__children=o}addRoutes(e){return ai(e),this.root.__children.push(...St(e)),this.getRoutes()}removeRoutes(){this.setRoutes([])}resolve(e){const o=Object.assign({},this.context,Y(e)?{pathname:e}:e),i=hn(this.root,this.__normalizePathname(o.pathname),this.baseUrl),n=this.resolveRoute;let r=null,s=null,l=o;function a(d,c=r.value.route,m){const h=m===null&&r.value.route;return r=s||i.next(h),s=null,!d&&(r.done||!sr(c,r.value.route))?(s=r,Promise.resolve(Le)):r.done?Promise.reject(nn(o)):(l=Object.assign(l?{chain:l.chain?l.chain.slice(0):[]}:{},o,r.value),lr(l,r.value),Promise.resolve(n(l)).then(y=>y!=null&&y!==Le?(l.result=y.result||y,l):a(d,c,y)))}return o.next=a,Promise.resolve().then(()=>a(!0,this.root)).catch(d=>{const c=ar(l);if(d?console.warn(c):d=new Error(c),d.context=d.context||l,d instanceof DOMException||(d.code=d.code||500),this.errorHandler)return l.result=this.errorHandler(d),l;throw d})}static __createUrl(e,o){return new URL(e,o)}get __effectiveBaseUrl(){return this.baseUrl?this.constructor.__createUrl(this.baseUrl,document.baseURI||document.URL).href.replace(/[^\/]*$/,""):""}__normalizePathname(e){if(!this.baseUrl)return e;const o=this.__effectiveBaseUrl,i=this.constructor.__createUrl(e,o).href;if(i.slice(0,o.length)===o)return i.slice(o.length)}}Xe.pathToRegexp=He;const{pathToRegexp:ui}=Xe,pi=new Map;function un(t,e,o){const i=e.name||e.component;if(i&&(t.has(i)?t.get(i).push(e):t.set(i,[e])),Array.isArray(o))for(let n=0;n1)throw new Error(`Duplicate route with name "${e}". Try seting unique 'name' route properties.`);return o&&o[0]}function vi(t){let e=t.path;return e=Array.isArray(e)?e[0]:e,e!==void 0?e:""}function dr(t,e={}){if(!(t instanceof Xe))throw new TypeError("An instance of Resolver is expected");const o=new Map;return(i,n)=>{let r=mi(o,i);if(!r&&(o.clear(),un(o,t.root,t.root.__children),r=mi(o,i),!r))throw new Error(`Route "${i}" not found`);let s=pi.get(r.fullPath);if(!s){let a=vi(r),d=r.parent;for(;d;){const y=vi(d);y&&(a=y.replace(/\/$/,"")+"/"+a.replace(/^\//,"")),d=d.parent}const c=ui.parse(a),m=ui.tokensToFunction(c),h=Object.create(null);for(let y=0;ye.inactivate()),t.forEach(e=>e.activate()),gi=t}const hr=t=>{const e=getComputedStyle(t).getPropertyValue("animation-name");return e&&e!=="none"},ur=(t,e)=>{const o=()=>{t.removeEventListener("animationend",o),e()};t.addEventListener("animationend",o)};function fi(t,e){return t.classList.add(e),new Promise(o=>{if(hr(t)){const i=t.getBoundingClientRect(),n=`height: ${i.bottom-i.top}px; width: ${i.right-i.left}px`;t.setAttribute("style",`position: absolute; ${n}`),ur(t,()=>{t.classList.remove(e),t.removeAttribute("style"),o()})}else t.classList.remove(e),o()})}const pr=256;function Gt(t){return t!=null}function mr(t){const e=Object.assign({},t);return delete e.next,e}function G({pathname:t="",search:e="",hash:o="",chain:i=[],params:n={},redirectFrom:r,resolver:s},l){const a=i.map(d=>d.route);return{baseUrl:s&&s.baseUrl||"",pathname:t,search:e,hash:o,routes:a,route:l||a.length&&a[a.length-1]||null,params:n,redirectFrom:r,getUrl:(d={})=>bt(pe.pathToRegexp.compile(pn(a))(Object.assign({},n,d)),s)}}function yi(t,e){const o=Object.assign({},t.params);return{redirect:{pathname:e,from:t.pathname,params:o}}}function vr(t,e){e.location=G(t);const o=t.chain.map(i=>i.route).indexOf(t.route);return t.chain[o].element=e,e}function yt(t,e,o){if(Se(t))return t.apply(o,e)}function bi(t,e,o){return i=>{if(i&&(i.cancel||i.redirect))return i;if(o)return yt(o[t],e,o)}}function gr(t,e){if(!Array.isArray(t)&&!Tt(t))throw new Error(Q(`Incorrect "children" value for the route ${e.path}: expected array or object, but got ${t}`));e.__children=[];const o=St(t);for(let i=0;ie.path).reduce((e,o)=>o.length?e.replace(/\/$/,"")+"/"+o.replace(/^\//,""):e,"")}class pe extends Xe{constructor(e,o){const i=document.head.querySelector("base"),n=i&&i.getAttribute("href");super([],Object.assign({baseUrl:n&&Xe.__createUrl(n,document.URL).pathname.replace(/[^\/]*$/,"")},o)),this.resolveRoute=s=>this.__resolveRoute(s);const r=pe.NavigationTrigger;pe.setTriggers.apply(pe,Object.keys(r).map(s=>r[s])),this.baseUrl,this.ready,this.ready=Promise.resolve(e),this.location,this.location=G({resolver:this}),this.__lastStartedRenderId=0,this.__navigationEventHandler=this.__onNavigationEvent.bind(this),this.setOutlet(e),this.subscribe(),this.__createdByRouter=new WeakMap,this.__addedByRouter=new WeakMap}__resolveRoute(e){const o=e.route;let i=Promise.resolve();Se(o.children)&&(i=i.then(()=>o.children(mr(e))).then(r=>{!Gt(r)&&!Se(o.children)&&(r=o.children),gr(r,o)}));const n={redirect:r=>yi(e,r),component:r=>{const s=document.createElement(r);return this.__createdByRouter.set(s,!0),s}};return i.then(()=>{if(this.__isLatestRender(e))return yt(o.action,[e,n],o)}).then(r=>{if(Gt(r)&&(r instanceof HTMLElement||r.redirect||r===Le))return r;if(Y(o.redirect))return n.redirect(o.redirect);if(o.bundle)return Fn(o.bundle).then(()=>{},()=>{throw new Error(Q(`Bundle not found: ${o.bundle}. Check if the file name is correct`))})}).then(r=>{if(Gt(r))return r;if(Y(o.component))return n.component(o.component)})}setOutlet(e){e&&this.__ensureOutlet(e),this.__outlet=e}getOutlet(){return this.__outlet}setRoutes(e,o=!1){return this.__previousContext=void 0,this.__urlForName=void 0,super.setRoutes(e),o||this.__onNavigationEvent(),this.ready}render(e,o){const i=++this.__lastStartedRenderId,n=Object.assign({search:"",hash:""},Y(e)?{pathname:e}:e,{__renderId:i});return this.ready=this.resolve(n).then(r=>this.__fullyResolveChain(r)).then(r=>{if(this.__isLatestRender(r)){const s=this.__previousContext;if(r===s)return this.__updateBrowserHistory(s,!0),this.location;if(this.location=G(r),o&&this.__updateBrowserHistory(r,i===1),Ke("location-changed",{router:this,location:this.location}),r.__skipAttach)return this.__copyUnchangedElements(r,s),this.__previousContext=r,this.location;this.__addAppearingContent(r,s);const l=this.__animateIfNeeded(r);return this.__runOnAfterEnterCallbacks(r),this.__runOnAfterLeaveCallbacks(r,s),l.then(()=>{if(this.__isLatestRender(r))return this.__removeDisappearingContent(),this.__previousContext=r,this.location})}}).catch(r=>{if(i===this.__lastStartedRenderId)throw o&&this.__updateBrowserHistory(n),pt(this.__outlet&&this.__outlet.children),this.location=G(Object.assign(n,{resolver:this})),Ke("error",Object.assign({router:this,error:r},n)),r}),this.ready}__fullyResolveChain(e,o=e){return this.__findComponentContextAfterAllRedirects(o).then(i=>{const r=i!==o?i:e,l=bt(pn(i.chain),i.resolver)===i.pathname,a=(d,c=d.route,m)=>d.next(void 0,c,m).then(h=>h===null||h===Le?l?d:c.parent!==null?a(d,c.parent,h):h:h);return a(i).then(d=>{if(d===null||d===Le)throw nn(r);return d&&d!==Le&&d!==i?this.__fullyResolveChain(r,d):this.__amendWithOnBeforeCallbacks(i)})})}__findComponentContextAfterAllRedirects(e){const o=e.result;return o instanceof HTMLElement?(vr(e,o),Promise.resolve(e)):o.redirect?this.__redirect(o.redirect,e.__redirectCount,e.__renderId).then(i=>this.__findComponentContextAfterAllRedirects(i)):o instanceof Error?Promise.reject(o):Promise.reject(new Error(Q(`Invalid route resolution result for path "${e.pathname}". Expected redirect object or HTML element, but got: "${Un(o)}". Double check the action return value for the route.`)))}__amendWithOnBeforeCallbacks(e){return this.__runOnBeforeCallbacks(e).then(o=>o===this.__previousContext||o===e?o:this.__fullyResolveChain(o))}__runOnBeforeCallbacks(e){const o=this.__previousContext||{},i=o.chain||[],n=e.chain;let r=Promise.resolve();const s=()=>({cancel:!0}),l=a=>yi(e,a);if(e.__divergedChainIndex=0,e.__skipAttach=!1,i.length){for(let a=0;a=0;a--)r=this.__runOnBeforeLeaveCallbacks(r,e,{prevent:s},i[a]);for(let a=0;a=e.__divergedChainIndex;a--)r=this.__runOnBeforeLeaveCallbacks(r,e,{prevent:s},i[a])}if(!e.__skipAttach)for(let a=0;a{if(a){if(a.cancel)return this.__previousContext.__renderId=e.__renderId,this.__previousContext;if(a.redirect)return this.__redirect(a.redirect,e.__redirectCount,e.__renderId)}return e})}__runOnBeforeLeaveCallbacks(e,o,i,n){const r=G(o);return e.then(s=>{if(this.__isLatestRender(o))return bi("onBeforeLeave",[r,i,this],n.element)(s)}).then(s=>{if(!(s||{}).redirect)return s})}__runOnBeforeEnterCallbacks(e,o,i,n){const r=G(o,n.route);return e.then(s=>{if(this.__isLatestRender(o))return bi("onBeforeEnter",[r,i,this],n.element)(s)})}__isReusableElement(e,o){return e&&o?this.__createdByRouter.get(e)&&this.__createdByRouter.get(o)?e.localName===o.localName:e===o:!1}__isLatestRender(e){return e.__renderId===this.__lastStartedRenderId}__redirect(e,o,i){if(o>pr)throw new Error(Q(`Too many redirects when rendering ${e.from}`));return this.resolve({pathname:this.urlForPath(e.pathname,e.params),redirectFrom:e.from,__redirectCount:(o||0)+1,__renderId:i})}__ensureOutlet(e=this.__outlet){if(!(e instanceof Node))throw new TypeError(Q(`Expected router outlet to be a valid DOM Node (but got ${e})`))}__updateBrowserHistory({pathname:e,search:o="",hash:i=""},n){if(window.location.pathname!==e||window.location.search!==o||window.location.hash!==i){const r=n?"replaceState":"pushState";window.history[r](null,document.title,e+o+i),window.dispatchEvent(new PopStateEvent("popstate",{state:"vaadin-router-ignore"}))}}__copyUnchangedElements(e,o){let i=this.__outlet;for(let n=0;nthis.__addedByRouter.get(r)&&r!==e.result);let n=i;for(let r=e.__divergedChainIndex;r=e.__divergedChainIndex&&this.__isLatestRender(e);i--){const n=o.chain[i].element;if(n)try{const r=G(e);yt(n.onAfterLeave,[r,{},o.resolver],n)}finally{this.__disappearingContent.indexOf(n)>-1&&pt(n.children)}}}__runOnAfterEnterCallbacks(e){for(let o=e.__divergedChainIndex;o0;l--)if(r[l-1].route.animate){s=r[l-1].route.animate;break}if(o&&i&&s){const l=Tt(s)&&s.leave||"leaving",a=Tt(s)&&s.enter||"entering";n.push(fi(o,l)),n.push(fi(i,a))}return Promise.all(n).then(()=>e)}subscribe(){window.addEventListener("vaadin-router-go",this.__navigationEventHandler)}unsubscribe(){window.removeEventListener("vaadin-router-go",this.__navigationEventHandler)}__onNavigationEvent(e){const{pathname:o,search:i,hash:n}=e?e.detail:window.location;Y(this.__normalizePathname(o))&&(e&&e.preventDefault&&e.preventDefault(),this.render({pathname:o,search:i,hash:n},!0))}static setTriggers(...e){cr(e)}urlForName(e,o){return this.__urlForName||(this.__urlForName=dr(this)),bt(this.__urlForName(e,o),this)}urlForPath(e,o){return bt(pe.pathToRegexp.compile(e)(o),this)}static go(e){const{pathname:o,search:i,hash:n}=Y(e)?this.__createUrl(e,"http://a"):e;return Ke("go",{pathname:o,search:i,hash:n})}}const fr=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,xt=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function yr(){function t(){return!0}return mn(t)}function br(){try{return xr()?!0:_r()?xt?!wr():!yr():!1}catch{return!1}}function xr(){return localStorage.getItem("vaadin.developmentmode.force")}function _r(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function wr(){return!!(xt&&Object.keys(xt).map(e=>xt[e]).filter(e=>e.productionMode).length>0)}function mn(t,e){if(typeof t!="function")return;const o=fr.exec(t.toString());if(o)try{t=new Function(o[1])}catch(i){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",i)}return t(e)}window.Vaadin=window.Vaadin||{};const xi=function(t,e){if(window.Vaadin.developmentMode)return mn(t,e)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=br());function Er(){}const Sr=function(){if(typeof xi=="function")return xi(Er)};window.Vaadin=window.Vaadin||{};window.Vaadin.registrations=window.Vaadin.registrations||[];window.Vaadin.registrations.push({is:"@vaadin/router",version:"1.7.4"});Sr();pe.NavigationTrigger={POPSTATE:Wn,CLICK:Hn};var Kt,R;(function(t){t.CONNECTED="connected",t.LOADING="loading",t.RECONNECTING="reconnecting",t.CONNECTION_LOST="connection-lost"})(R||(R={}));class Cr{constructor(e){this.stateChangeListeners=new Set,this.loadingCount=0,this.connectionState=e,this.serviceWorkerMessageListener=this.serviceWorkerMessageListener.bind(this),navigator.serviceWorker&&(navigator.serviceWorker.addEventListener("message",this.serviceWorkerMessageListener),navigator.serviceWorker.ready.then(o=>{var i;(i=o==null?void 0:o.active)===null||i===void 0||i.postMessage({method:"Vaadin.ServiceWorker.isConnectionLost",id:"Vaadin.ServiceWorker.isConnectionLost"})}))}addStateChangeListener(e){this.stateChangeListeners.add(e)}removeStateChangeListener(e){this.stateChangeListeners.delete(e)}loadingStarted(){this.state=R.LOADING,this.loadingCount+=1}loadingFinished(){this.decreaseLoadingCount(R.CONNECTED)}loadingFailed(){this.decreaseLoadingCount(R.CONNECTION_LOST)}decreaseLoadingCount(e){this.loadingCount>0&&(this.loadingCount-=1,this.loadingCount===0&&(this.state=e))}get state(){return this.connectionState}set state(e){if(e!==this.connectionState){const o=this.connectionState;this.connectionState=e,this.loadingCount=0;for(const i of this.stateChangeListeners)i(o,this.connectionState)}}get online(){return this.connectionState===R.CONNECTED||this.connectionState===R.LOADING}get offline(){return!this.online}serviceWorkerMessageListener(e){typeof e.data=="object"&&e.data.id==="Vaadin.ServiceWorker.isConnectionLost"&&(e.data.result===!0&&(this.state=R.CONNECTION_LOST),navigator.serviceWorker.removeEventListener("message",this.serviceWorkerMessageListener))}}const kr=t=>!!(t==="localhost"||t==="[::1]"||t.match(/^127\.\d+\.\d+\.\d+$/)),mt=window;if(!(!((Kt=mt.Vaadin)===null||Kt===void 0)&&Kt.connectionState)){let t;kr(window.location.hostname)?t=!0:t=navigator.onLine,mt.Vaadin=mt.Vaadin||{},mt.Vaadin.connectionState=new Cr(t?R.CONNECTED:R.CONNECTION_LOST)}function B(t,e,o,i){var n=arguments.length,r=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,o,r):s(e,o))||r);return n>3&&r&&Object.defineProperty(e,o,r),r}/** +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function o(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=o(n);fetch(n.href,r)}})();window.Vaadin=window.Vaadin||{};window.Vaadin.featureFlags=window.Vaadin.featureFlags||{};window.Vaadin.featureFlags.exampleFeatureFlag=!1;window.Vaadin.featureFlags.collaborationEngineBackend=!1;window.Vaadin.featureFlags.webPush=!1;window.Vaadin.featureFlags.formFillerAddon=!1;const Dn="modulepreload",jn=function(t,e){return new URL(t,e).href},ri={},f=function(e,o,i){if(!o||o.length===0)return e();const n=document.getElementsByTagName("link");return Promise.all(o.map(r=>{if(r=jn(r,i),r in ri)return;ri[r]=!0;const s=r.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!i)for(let c=n.length-1;c>=0;c--){const m=n[c];if(m.href===r&&(!s||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":Dn,s||(d.as="script",d.crossOrigin=""),d.href=r,document.head.appendChild(d),s)return new Promise((c,m)=>{d.addEventListener("load",c),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>e()).catch(r=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=r,window.dispatchEvent(s),!s.defaultPrevented)throw r})};function St(t){return t=t||[],Array.isArray(t)?t:[t]}function Q(t){return`[Vaadin.Router] ${t}`}function Un(t){if(typeof t!="object")return String(t);const e=Object.prototype.toString.call(t).match(/ (.*)\]$/)[1];return e==="Object"||e==="Array"?`${e} ${JSON.stringify(t)}`:e}const Ct="module",kt="nomodule",wo=[Ct,kt];function si(t){if(!t.match(/.+\.[m]?js$/))throw new Error(Q(`Unsupported type for bundle "${t}": .js or .mjs expected.`))}function on(t){if(!t||!Y(t.path))throw new Error(Q('Expected route config to be an object with a "path" string property, or an array of such objects'));const e=t.bundle,o=["component","redirect","bundle"];if(!Ce(t.action)&&!Array.isArray(t.children)&&!Ce(t.children)&&!Tt(e)&&!o.some(i=>Y(t[i])))throw new Error(Q(`Expected route config "${t.path}" to include either "${o.join('", "')}" or "action" function but none found.`));if(e)if(Y(e))si(e);else if(wo.some(i=>i in e))wo.forEach(i=>i in e&&si(e[i]));else throw new Error(Q('Expected route bundle to include either "'+kt+'" or "'+Ct+'" keys, or both'));t.redirect&&["bundle","component"].forEach(i=>{i in t&&console.warn(Q(`Route config "${t.path}" has both "redirect" and "${i}" properties, and "redirect" will always override the latter. Did you mean to only use "${i}"?`))})}function ai(t){St(t).forEach(e=>on(e))}function li(t,e){let o=document.head.querySelector('script[src="'+t+'"][async]');return o||(o=document.createElement("script"),o.setAttribute("src",t),e===Ct?o.setAttribute("type",Ct):e===kt&&o.setAttribute(kt,""),o.async=!0),new Promise((i,n)=>{o.onreadystatechange=o.onload=r=>{o.__dynamicImportLoaded=!0,i(r)},o.onerror=r=>{o.parentNode&&o.parentNode.removeChild(o),n(r)},o.parentNode===null?document.head.appendChild(o):o.__dynamicImportLoaded&&i()})}function Fn(t){return Y(t)?li(t):Promise.race(wo.filter(e=>e in t).map(e=>li(t[e],e)))}function Je(t,e){return!window.dispatchEvent(new CustomEvent(`vaadin-router-${t}`,{cancelable:t==="go",detail:e}))}function Tt(t){return typeof t=="object"&&!!t}function Ce(t){return typeof t=="function"}function Y(t){return typeof t=="string"}function nn(t){const e=new Error(Q(`Page not found (${t.pathname})`));return e.context=t,e.code=404,e}const ze=new class{};function Bn(t){const e=t.port,o=t.protocol,r=o==="http:"&&e==="80"||o==="https:"&&e==="443"?t.hostname:t.host;return`${o}//${r}`}function di(t){if(t.defaultPrevented||t.button!==0||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey)return;let e=t.target;const o=t.composedPath?t.composedPath():t.path||[];for(let l=0;l-1&&(y=r[ee],r=r.slice(0,ee))}r&&(o.push(r),r="",a=!1);var Ae=y!==""&&he!==void 0&&he!==y,Re=H==="+"||H==="*",Bt=H==="?"||H==="*",re=y||s,lt=ne||Ft;o.push({name:ue||i++,prefix:y,delimiter:re,optional:Bt,repeat:Re,partial:Ae,pattern:lt?Zn(lt):"[^"+pe(re)+"]+?"})}return(r||n-1;else{var y=h.repeat?"(?:"+h.pattern+")(?:"+pe(h.delimiter)+"(?:"+h.pattern+"))*":h.pattern;e&&e.push(h),h.optional?h.partial?d+=pe(h.prefix)+"("+y+")?":d+="(?:"+pe(h.prefix)+"("+y+"))?":d+=pe(h.prefix)+"("+y+")"}}return r?(i||(d+="(?:"+s+")?"),d+=a==="$"?"$":"(?="+a+")"):(i||(d+="(?:"+s+"(?="+a+"))?"),c||(d+="(?="+s+"|"+a+")")),new RegExp(d,ln(o))}function cn(t,e,o){return t instanceof RegExp?er(t,e):Array.isArray(t)?tr(t,e,o):or(t,e,o)}We.parse=Gn;We.compile=Kn;We.tokensToFunction=Jn;We.tokensToRegExp=Yn;const{hasOwnProperty:ir}=Object.prototype,Eo=new Map;Eo.set("|false",{keys:[],pattern:/(?:)/});function hi(t){try{return decodeURIComponent(t)}catch{return t}}function nr(t,e,o,i,n){o=!!o;const r=`${t}|${o}`;let s=Eo.get(r);if(!s){const d=[];s={keys:d,pattern:We(t,d,{end:o,strict:t===""})},Eo.set(r,s)}const l=s.pattern.exec(e);if(!l)return null;const a=Object.assign({},n);for(let d=1;d0&&e.charAt(y)==="/"&&(y+=1),s=hn(h,e.substr(y),o,r.keys,r.params)}const m=s.next(d);if(!m.done)return{done:!1,value:m.value};s=null,l++}return{done:!0}}}}function rr(t){if(Ce(t.route.action))return t.route.action(t)}function sr(t,e){let o=e;for(;o;)if(o=o.parent,o===t)return!0;return!1}function ar(t){let e=`Path '${t.pathname}' is not properly resolved due to an error.`;const o=(t.route||{}).path;return o&&(e+=` Resolution had failed on route: '${o}'`),e}function lr(t,e){const{route:o,path:i}=e;if(o&&!o.__synthetic){const n={path:i,route:o};if(!t.chain)t.chain=[];else if(o.parent){let r=t.chain.length;for(;r--&&t.chain[r].route&&t.chain[r].route!==o.parent;)t.chain.pop()}t.chain.push(n)}}class Xe{constructor(e,o={}){if(Object(e)!==e)throw new TypeError("Invalid routes");this.baseUrl=o.baseUrl||"",this.errorHandler=o.errorHandler,this.resolveRoute=o.resolveRoute||rr,this.context=Object.assign({resolver:this},o.context),this.root=Array.isArray(e)?{path:"",__children:e,parent:null,__synthetic:!0}:e,this.root.parent=null}getRoutes(){return[...this.root.__children]}setRoutes(e){ai(e);const o=[...St(e)];this.root.__children=o}addRoutes(e){return ai(e),this.root.__children.push(...St(e)),this.getRoutes()}removeRoutes(){this.setRoutes([])}resolve(e){const o=Object.assign({},this.context,Y(e)?{pathname:e}:e),i=hn(this.root,this.__normalizePathname(o.pathname),this.baseUrl),n=this.resolveRoute;let r=null,s=null,l=o;function a(d,c=r.value.route,m){const h=m===null&&r.value.route;return r=s||i.next(h),s=null,!d&&(r.done||!sr(c,r.value.route))?(s=r,Promise.resolve(ze)):r.done?Promise.reject(nn(o)):(l=Object.assign(l?{chain:l.chain?l.chain.slice(0):[]}:{},o,r.value),lr(l,r.value),Promise.resolve(n(l)).then(y=>y!=null&&y!==ze?(l.result=y.result||y,l):a(d,c,y)))}return o.next=a,Promise.resolve().then(()=>a(!0,this.root)).catch(d=>{const c=ar(l);if(d?console.warn(c):d=new Error(c),d.context=d.context||l,d instanceof DOMException||(d.code=d.code||500),this.errorHandler)return l.result=this.errorHandler(d),l;throw d})}static __createUrl(e,o){return new URL(e,o)}get __effectiveBaseUrl(){return this.baseUrl?this.constructor.__createUrl(this.baseUrl,document.baseURI||document.URL).href.replace(/[^\/]*$/,""):""}__normalizePathname(e){if(!this.baseUrl)return e;const o=this.__effectiveBaseUrl,i=this.constructor.__createUrl(e,o).href;if(i.slice(0,o.length)===o)return i.slice(o.length)}}Xe.pathToRegexp=We;const{pathToRegexp:ui}=Xe,pi=new Map;function un(t,e,o){const i=e.name||e.component;if(i&&(t.has(i)?t.get(i).push(e):t.set(i,[e])),Array.isArray(o))for(let n=0;n1)throw new Error(`Duplicate route with name "${e}". Try seting unique 'name' route properties.`);return o&&o[0]}function vi(t){let e=t.path;return e=Array.isArray(e)?e[0]:e,e!==void 0?e:""}function dr(t,e={}){if(!(t instanceof Xe))throw new TypeError("An instance of Resolver is expected");const o=new Map;return(i,n)=>{let r=mi(o,i);if(!r&&(o.clear(),un(o,t.root,t.root.__children),r=mi(o,i),!r))throw new Error(`Route "${i}" not found`);let s=pi.get(r.fullPath);if(!s){let a=vi(r),d=r.parent;for(;d;){const y=vi(d);y&&(a=y.replace(/\/$/,"")+"/"+a.replace(/^\//,"")),d=d.parent}const c=ui.parse(a),m=ui.tokensToFunction(c),h=Object.create(null);for(let y=0;ye.inactivate()),t.forEach(e=>e.activate()),gi=t}const hr=t=>{const e=getComputedStyle(t).getPropertyValue("animation-name");return e&&e!=="none"},ur=(t,e)=>{const o=()=>{t.removeEventListener("animationend",o),e()};t.addEventListener("animationend",o)};function fi(t,e){return t.classList.add(e),new Promise(o=>{if(hr(t)){const i=t.getBoundingClientRect(),n=`height: ${i.bottom-i.top}px; width: ${i.right-i.left}px`;t.setAttribute("style",`position: absolute; ${n}`),ur(t,()=>{t.classList.remove(e),t.removeAttribute("style"),o()})}else t.classList.remove(e),o()})}const pr=256;function Gt(t){return t!=null}function mr(t){const e=Object.assign({},t);return delete e.next,e}function G({pathname:t="",search:e="",hash:o="",chain:i=[],params:n={},redirectFrom:r,resolver:s},l){const a=i.map(d=>d.route);return{baseUrl:s&&s.baseUrl||"",pathname:t,search:e,hash:o,routes:a,route:l||a.length&&a[a.length-1]||null,params:n,redirectFrom:r,getUrl:(d={})=>bt(ve.pathToRegexp.compile(pn(a))(Object.assign({},n,d)),s)}}function yi(t,e){const o=Object.assign({},t.params);return{redirect:{pathname:e,from:t.pathname,params:o}}}function vr(t,e){e.location=G(t);const o=t.chain.map(i=>i.route).indexOf(t.route);return t.chain[o].element=e,e}function yt(t,e,o){if(Ce(t))return t.apply(o,e)}function bi(t,e,o){return i=>{if(i&&(i.cancel||i.redirect))return i;if(o)return yt(o[t],e,o)}}function gr(t,e){if(!Array.isArray(t)&&!Tt(t))throw new Error(Q(`Incorrect "children" value for the route ${e.path}: expected array or object, but got ${t}`));e.__children=[];const o=St(t);for(let i=0;ie.path).reduce((e,o)=>o.length?e.replace(/\/$/,"")+"/"+o.replace(/^\//,""):e,"")}class ve extends Xe{constructor(e,o){const i=document.head.querySelector("base"),n=i&&i.getAttribute("href");super([],Object.assign({baseUrl:n&&Xe.__createUrl(n,document.URL).pathname.replace(/[^\/]*$/,"")},o)),this.resolveRoute=s=>this.__resolveRoute(s);const r=ve.NavigationTrigger;ve.setTriggers.apply(ve,Object.keys(r).map(s=>r[s])),this.baseUrl,this.ready,this.ready=Promise.resolve(e),this.location,this.location=G({resolver:this}),this.__lastStartedRenderId=0,this.__navigationEventHandler=this.__onNavigationEvent.bind(this),this.setOutlet(e),this.subscribe(),this.__createdByRouter=new WeakMap,this.__addedByRouter=new WeakMap}__resolveRoute(e){const o=e.route;let i=Promise.resolve();Ce(o.children)&&(i=i.then(()=>o.children(mr(e))).then(r=>{!Gt(r)&&!Ce(o.children)&&(r=o.children),gr(r,o)}));const n={redirect:r=>yi(e,r),component:r=>{const s=document.createElement(r);return this.__createdByRouter.set(s,!0),s}};return i.then(()=>{if(this.__isLatestRender(e))return yt(o.action,[e,n],o)}).then(r=>{if(Gt(r)&&(r instanceof HTMLElement||r.redirect||r===ze))return r;if(Y(o.redirect))return n.redirect(o.redirect);if(o.bundle)return Fn(o.bundle).then(()=>{},()=>{throw new Error(Q(`Bundle not found: ${o.bundle}. Check if the file name is correct`))})}).then(r=>{if(Gt(r))return r;if(Y(o.component))return n.component(o.component)})}setOutlet(e){e&&this.__ensureOutlet(e),this.__outlet=e}getOutlet(){return this.__outlet}setRoutes(e,o=!1){return this.__previousContext=void 0,this.__urlForName=void 0,super.setRoutes(e),o||this.__onNavigationEvent(),this.ready}render(e,o){const i=++this.__lastStartedRenderId,n=Object.assign({search:"",hash:""},Y(e)?{pathname:e}:e,{__renderId:i});return this.ready=this.resolve(n).then(r=>this.__fullyResolveChain(r)).then(r=>{if(this.__isLatestRender(r)){const s=this.__previousContext;if(r===s)return this.__updateBrowserHistory(s,!0),this.location;if(this.location=G(r),o&&this.__updateBrowserHistory(r,i===1),Je("location-changed",{router:this,location:this.location}),r.__skipAttach)return this.__copyUnchangedElements(r,s),this.__previousContext=r,this.location;this.__addAppearingContent(r,s);const l=this.__animateIfNeeded(r);return this.__runOnAfterEnterCallbacks(r),this.__runOnAfterLeaveCallbacks(r,s),l.then(()=>{if(this.__isLatestRender(r))return this.__removeDisappearingContent(),this.__previousContext=r,this.location})}}).catch(r=>{if(i===this.__lastStartedRenderId)throw o&&this.__updateBrowserHistory(n),pt(this.__outlet&&this.__outlet.children),this.location=G(Object.assign(n,{resolver:this})),Je("error",Object.assign({router:this,error:r},n)),r}),this.ready}__fullyResolveChain(e,o=e){return this.__findComponentContextAfterAllRedirects(o).then(i=>{const r=i!==o?i:e,l=bt(pn(i.chain),i.resolver)===i.pathname,a=(d,c=d.route,m)=>d.next(void 0,c,m).then(h=>h===null||h===ze?l?d:c.parent!==null?a(d,c.parent,h):h:h);return a(i).then(d=>{if(d===null||d===ze)throw nn(r);return d&&d!==ze&&d!==i?this.__fullyResolveChain(r,d):this.__amendWithOnBeforeCallbacks(i)})})}__findComponentContextAfterAllRedirects(e){const o=e.result;return o instanceof HTMLElement?(vr(e,o),Promise.resolve(e)):o.redirect?this.__redirect(o.redirect,e.__redirectCount,e.__renderId).then(i=>this.__findComponentContextAfterAllRedirects(i)):o instanceof Error?Promise.reject(o):Promise.reject(new Error(Q(`Invalid route resolution result for path "${e.pathname}". Expected redirect object or HTML element, but got: "${Un(o)}". Double check the action return value for the route.`)))}__amendWithOnBeforeCallbacks(e){return this.__runOnBeforeCallbacks(e).then(o=>o===this.__previousContext||o===e?o:this.__fullyResolveChain(o))}__runOnBeforeCallbacks(e){const o=this.__previousContext||{},i=o.chain||[],n=e.chain;let r=Promise.resolve();const s=()=>({cancel:!0}),l=a=>yi(e,a);if(e.__divergedChainIndex=0,e.__skipAttach=!1,i.length){for(let a=0;a=0;a--)r=this.__runOnBeforeLeaveCallbacks(r,e,{prevent:s},i[a]);for(let a=0;a=e.__divergedChainIndex;a--)r=this.__runOnBeforeLeaveCallbacks(r,e,{prevent:s},i[a])}if(!e.__skipAttach)for(let a=0;a{if(a){if(a.cancel)return this.__previousContext.__renderId=e.__renderId,this.__previousContext;if(a.redirect)return this.__redirect(a.redirect,e.__redirectCount,e.__renderId)}return e})}__runOnBeforeLeaveCallbacks(e,o,i,n){const r=G(o);return e.then(s=>{if(this.__isLatestRender(o))return bi("onBeforeLeave",[r,i,this],n.element)(s)}).then(s=>{if(!(s||{}).redirect)return s})}__runOnBeforeEnterCallbacks(e,o,i,n){const r=G(o,n.route);return e.then(s=>{if(this.__isLatestRender(o))return bi("onBeforeEnter",[r,i,this],n.element)(s)})}__isReusableElement(e,o){return e&&o?this.__createdByRouter.get(e)&&this.__createdByRouter.get(o)?e.localName===o.localName:e===o:!1}__isLatestRender(e){return e.__renderId===this.__lastStartedRenderId}__redirect(e,o,i){if(o>pr)throw new Error(Q(`Too many redirects when rendering ${e.from}`));return this.resolve({pathname:this.urlForPath(e.pathname,e.params),redirectFrom:e.from,__redirectCount:(o||0)+1,__renderId:i})}__ensureOutlet(e=this.__outlet){if(!(e instanceof Node))throw new TypeError(Q(`Expected router outlet to be a valid DOM Node (but got ${e})`))}__updateBrowserHistory({pathname:e,search:o="",hash:i=""},n){if(window.location.pathname!==e||window.location.search!==o||window.location.hash!==i){const r=n?"replaceState":"pushState";window.history[r](null,document.title,e+o+i),window.dispatchEvent(new PopStateEvent("popstate",{state:"vaadin-router-ignore"}))}}__copyUnchangedElements(e,o){let i=this.__outlet;for(let n=0;nthis.__addedByRouter.get(r)&&r!==e.result);let n=i;for(let r=e.__divergedChainIndex;r=e.__divergedChainIndex&&this.__isLatestRender(e);i--){const n=o.chain[i].element;if(n)try{const r=G(e);yt(n.onAfterLeave,[r,{},o.resolver],n)}finally{this.__disappearingContent.indexOf(n)>-1&&pt(n.children)}}}__runOnAfterEnterCallbacks(e){for(let o=e.__divergedChainIndex;o0;l--)if(r[l-1].route.animate){s=r[l-1].route.animate;break}if(o&&i&&s){const l=Tt(s)&&s.leave||"leaving",a=Tt(s)&&s.enter||"entering";n.push(fi(o,l)),n.push(fi(i,a))}return Promise.all(n).then(()=>e)}subscribe(){window.addEventListener("vaadin-router-go",this.__navigationEventHandler)}unsubscribe(){window.removeEventListener("vaadin-router-go",this.__navigationEventHandler)}__onNavigationEvent(e){const{pathname:o,search:i,hash:n}=e?e.detail:window.location;Y(this.__normalizePathname(o))&&(e&&e.preventDefault&&e.preventDefault(),this.render({pathname:o,search:i,hash:n},!0))}static setTriggers(...e){cr(e)}urlForName(e,o){return this.__urlForName||(this.__urlForName=dr(this)),bt(this.__urlForName(e,o),this)}urlForPath(e,o){return bt(ve.pathToRegexp.compile(e)(o),this)}static go(e){const{pathname:o,search:i,hash:n}=Y(e)?this.__createUrl(e,"http://a"):e;return Je("go",{pathname:o,search:i,hash:n})}}const fr=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,xt=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function yr(){function t(){return!0}return mn(t)}function br(){try{return xr()?!0:_r()?xt?!wr():!yr():!1}catch{return!1}}function xr(){return localStorage.getItem("vaadin.developmentmode.force")}function _r(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function wr(){return!!(xt&&Object.keys(xt).map(e=>xt[e]).filter(e=>e.productionMode).length>0)}function mn(t,e){if(typeof t!="function")return;const o=fr.exec(t.toString());if(o)try{t=new Function(o[1])}catch(i){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",i)}return t(e)}window.Vaadin=window.Vaadin||{};const xi=function(t,e){if(window.Vaadin.developmentMode)return mn(t,e)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=br());function Er(){}const Sr=function(){if(typeof xi=="function")return xi(Er)};window.Vaadin=window.Vaadin||{};window.Vaadin.registrations=window.Vaadin.registrations||[];window.Vaadin.registrations.push({is:"@vaadin/router",version:"1.7.4"});Sr();ve.NavigationTrigger={POPSTATE:qn,CLICK:Hn};var Kt,R;(function(t){t.CONNECTED="connected",t.LOADING="loading",t.RECONNECTING="reconnecting",t.CONNECTION_LOST="connection-lost"})(R||(R={}));class Cr{constructor(e){this.stateChangeListeners=new Set,this.loadingCount=0,this.connectionState=e,this.serviceWorkerMessageListener=this.serviceWorkerMessageListener.bind(this),navigator.serviceWorker&&(navigator.serviceWorker.addEventListener("message",this.serviceWorkerMessageListener),navigator.serviceWorker.ready.then(o=>{var i;(i=o==null?void 0:o.active)===null||i===void 0||i.postMessage({method:"Vaadin.ServiceWorker.isConnectionLost",id:"Vaadin.ServiceWorker.isConnectionLost"})}))}addStateChangeListener(e){this.stateChangeListeners.add(e)}removeStateChangeListener(e){this.stateChangeListeners.delete(e)}loadingStarted(){this.state=R.LOADING,this.loadingCount+=1}loadingFinished(){this.decreaseLoadingCount(R.CONNECTED)}loadingFailed(){this.decreaseLoadingCount(R.CONNECTION_LOST)}decreaseLoadingCount(e){this.loadingCount>0&&(this.loadingCount-=1,this.loadingCount===0&&(this.state=e))}get state(){return this.connectionState}set state(e){if(e!==this.connectionState){const o=this.connectionState;this.connectionState=e,this.loadingCount=0;for(const i of this.stateChangeListeners)i(o,this.connectionState)}}get online(){return this.connectionState===R.CONNECTED||this.connectionState===R.LOADING}get offline(){return!this.online}serviceWorkerMessageListener(e){typeof e.data=="object"&&e.data.id==="Vaadin.ServiceWorker.isConnectionLost"&&(e.data.result===!0&&(this.state=R.CONNECTION_LOST),navigator.serviceWorker.removeEventListener("message",this.serviceWorkerMessageListener))}}const kr=t=>!!(t==="localhost"||t==="[::1]"||t.match(/^127\.\d+\.\d+\.\d+$/)),mt=window;if(!(!((Kt=mt.Vaadin)===null||Kt===void 0)&&Kt.connectionState)){let t;kr(window.location.hostname)?t=!0:t=navigator.onLine,mt.Vaadin=mt.Vaadin||{},mt.Vaadin.connectionState=new Cr(t?R.CONNECTED:R.CONNECTION_LOST)}function B(t,e,o,i){var n=arguments.length,r=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,o,r):s(e,o))||r);return n>3&&r&&Object.defineProperty(e,o,r),r}/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Tr=!1,_t=window,zo=_t.ShadowRoot&&(_t.ShadyCSS===void 0||_t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Mo=Symbol(),_i=new WeakMap;class Vo{constructor(e,o,i){if(this._$cssResult$=!0,i!==Mo)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=o}get styleSheet(){let e=this._styleSheet;const o=this._strings;if(zo&&e===void 0){const i=o!==void 0&&o.length===1;i&&(e=_i.get(o)),e===void 0&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),i&&_i.set(o,e))}return e}toString(){return this.cssText}}const $r=t=>{if(t._$cssResult$===!0)return t.cssText;if(typeof t=="number")return t;throw new 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.`)},Je=t=>new Vo(typeof t=="string"?t:String(t),void 0,Mo),E=(t,...e)=>{const o=t.length===1?t[0]:e.reduce((i,n,r)=>i+$r(n)+t[r+1],t[0]);return new Vo(o,t,Mo)},Ar=(t,e)=>{zo?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{const i=document.createElement("style"),n=_t.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=o.cssText,t.appendChild(i)})},Rr=t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return Je(e)},wi=zo||Tr?t=>t:t=>t instanceof CSSStyleSheet?Rr(t):t;/** + */const Tr=!1,_t=window,zo=_t.ShadowRoot&&(_t.ShadyCSS===void 0||_t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Mo=Symbol(),_i=new WeakMap;class Vo{constructor(e,o,i){if(this._$cssResult$=!0,i!==Mo)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=o}get styleSheet(){let e=this._styleSheet;const o=this._strings;if(zo&&e===void 0){const i=o!==void 0&&o.length===1;i&&(e=_i.get(o)),e===void 0&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),i&&_i.set(o,e))}return e}toString(){return this.cssText}}const $r=t=>{if(t._$cssResult$===!0)return t.cssText;if(typeof t=="number")return t;throw new 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.`)},me=t=>new Vo(typeof t=="string"?t:String(t),void 0,Mo),_=(t,...e)=>{const o=t.length===1?t[0]:e.reduce((i,n,r)=>i+$r(n)+t[r+1],t[0]);return new Vo(o,t,Mo)},Ar=(t,e)=>{zo?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{const i=document.createElement("style"),n=_t.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=o.cssText,t.appendChild(i)})},Rr=t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return me(e)},wi=zo||Tr?t=>t:t=>t instanceof CSSStyleSheet?Rr(t):t;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var Jt,Yt,Xt,vn;const oe=window;let gn,me;const Ei=oe.trustedTypes,Nr=Ei?Ei.emptyScript:"",wt=oe.reactiveElementPolyfillSupportDevMode;{const t=(Jt=oe.litIssuedWarnings)!==null&&Jt!==void 0?Jt:oe.litIssuedWarnings=new Set;me=(e,o)=>{o+=` See https://lit.dev/msg/${e} for more information.`,t.has(o)||(console.warn(o),t.add(o))},me("dev-mode","Lit is in dev mode. Not recommended for production!"),!((Yt=oe.ShadyDOM)===null||Yt===void 0)&&Yt.inUse&&wt===void 0&&me("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded."),gn=e=>({then:(o,i)=>{me("request-update-promise",`The \`requestUpdate\` method should no longer return a Promise but does so on \`${e}\`. Use \`updateComplete\` instead.`),o!==void 0&&o(!1)}})}const Qt=t=>{oe.emitLitDebugLogEvents&&oe.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))},fn=(t,e)=>t,So={toAttribute(t,e){switch(e){case Boolean:t=t?Nr:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t);break}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=t!==null;break;case Number:o=t===null?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch{o=null}break}return o}},yn=(t,e)=>e!==t&&(e===e||t===t),Zt={attribute:!0,type:String,converter:So,reflect:!1,hasChanged:yn},Co="finalized";class ie extends HTMLElement{constructor(){super(),this.__instanceProperties=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}static addInitializer(e){var o;this.finalize(),((o=this._initializers)!==null&&o!==void 0?o:this._initializers=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((o,i)=>{const n=this.__attributeNameForProperty(i,o);n!==void 0&&(this.__attributeToPropertyMap.set(n,i),e.push(n))}),e}static createProperty(e,o=Zt){var i;if(o.state&&(o.attribute=!1),this.finalize(),this.elementProperties.set(e,o),!o.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():`__${e}`,r=this.getPropertyDescriptor(e,n,o);r!==void 0&&(Object.defineProperty(this.prototype,e,r),this.hasOwnProperty("__reactivePropertyKeys")||(this.__reactivePropertyKeys=new Set((i=this.__reactivePropertyKeys)!==null&&i!==void 0?i:[])),this.__reactivePropertyKeys.add(e))}}static getPropertyDescriptor(e,o,i){return{get(){return this[o]},set(n){const r=this[e];this[o]=n,this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Zt}static finalize(){if(this.hasOwnProperty(Co))return!1;this[Co]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e._initializers!==void 0&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties),this.__attributeToPropertyMap=new Map,this.hasOwnProperty(fn("properties"))){const o=this.properties,i=[...Object.getOwnPropertyNames(o),...Object.getOwnPropertySymbols(o)];for(const n of i)this.createProperty(n,o[n])}this.elementStyles=this.finalizeStyles(this.styles);{const o=(i,n=!1)=>{this.prototype.hasOwnProperty(i)&&me(n?"renamed-api":"removed-api",`\`${i}\` is implemented on class ${this.name}. It has been ${n?"renamed":"removed"} in this version of LitElement.`)};o("initialize"),o("requestUpdateInternal"),o("_getUpdateComplete",!0)}return!0}static finalizeStyles(e){const o=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const n of i)o.unshift(wi(n))}else e!==void 0&&o.push(wi(e));return o}static __attributeNameForProperty(e,o){const i=o.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}__initialize(){var e;this.__updatePromise=new Promise(o=>this.enableUpdating=o),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),(e=this.constructor._initializers)===null||e===void 0||e.forEach(o=>o(this))}addController(e){var o,i;((o=this.__controllers)!==null&&o!==void 0?o:this.__controllers=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var o;(o=this.__controllers)===null||o===void 0||o.splice(this.__controllers.indexOf(e)>>>0,1)}__saveInstanceProperties(){this.constructor.elementProperties.forEach((e,o)=>{this.hasOwnProperty(o)&&(this.__instanceProperties.set(o,this[o]),delete this[o])})}createRenderRoot(){var e;const o=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Ar(o,this.constructor.elementStyles),o}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this.__controllers)===null||e===void 0||e.forEach(o=>{var i;return(i=o.hostConnected)===null||i===void 0?void 0:i.call(o)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this.__controllers)===null||e===void 0||e.forEach(o=>{var i;return(i=o.hostDisconnected)===null||i===void 0?void 0:i.call(o)})}attributeChangedCallback(e,o,i){this._$attributeToProperty(e,i)}__propertyToAttribute(e,o,i=Zt){var n;const r=this.constructor.__attributeNameForProperty(e,i);if(r!==void 0&&i.reflect===!0){const l=(((n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?i.converter:So).toAttribute(o,i.type);this.constructor.enabledWarnings.indexOf("migration")>=0&&l===void 0&&me("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,l==null?this.removeAttribute(r):this.setAttribute(r,l),this.__reflectingProperty=null}}_$attributeToProperty(e,o){var i;const n=this.constructor,r=n.__attributeToPropertyMap.get(e);if(r!==void 0&&this.__reflectingProperty!==r){const s=n.getPropertyOptions(r),l=typeof s.converter=="function"?{fromAttribute:s.converter}:((i=s.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?s.converter:So;this.__reflectingProperty=r,this[r]=l.fromAttribute(o,s.type),this.__reflectingProperty=null}}requestUpdate(e,o,i){let n=!0;return e!==void 0&&(i=i||this.constructor.getPropertyOptions(e),(i.hasChanged||yn)(this[e],o)?(this._$changedProperties.has(e)||this._$changedProperties.set(e,o),i.reflect===!0&&this.__reflectingProperty!==e&&(this.__reflectingProperties===void 0&&(this.__reflectingProperties=new Map),this.__reflectingProperties.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this.__updatePromise=this.__enqueueUpdate()),gn(this.localName)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(o){Promise.reject(o)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e,o;if(!this.isUpdatePending)return;if(Qt==null||Qt({kind:"update"}),!this.hasUpdated){const r=[];if((e=this.constructor.__reactivePropertyKeys)===null||e===void 0||e.forEach(s=>{var l;this.hasOwnProperty(s)&&!(!((l=this.__instanceProperties)===null||l===void 0)&&l.has(s))&&r.push(s)}),r.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${r.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}this.__instanceProperties&&(this.__instanceProperties.forEach((r,s)=>this[s]=r),this.__instanceProperties=void 0);let i=!1;const n=this._$changedProperties;try{i=this.shouldUpdate(n),i?(this.willUpdate(n),(o=this.__controllers)===null||o===void 0||o.forEach(r=>{var s;return(s=r.hostUpdate)===null||s===void 0?void 0:s.call(r)}),this.update(n)):this.__markUpdated()}catch(r){throw i=!1,this.__markUpdated(),r}i&&this._$didUpdate(n)}willUpdate(e){}_$didUpdate(e){var o;(o=this.__controllers)===null||o===void 0||o.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e),this.isUpdatePending&&this.constructor.enabledWarnings.indexOf("change-in-update")>=0&&me("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties!==void 0&&(this.__reflectingProperties.forEach((o,i)=>this.__propertyToAttribute(i,this[i],o)),this.__reflectingProperties=void 0),this.__markUpdated()}updated(e){}firstUpdated(e){}}vn=Co;ie[vn]=!0;ie.elementProperties=new Map;ie.elementStyles=[];ie.shadowRootOptions={mode:"open"};wt==null||wt({ReactiveElement:ie});{ie.enabledWarnings=["change-in-update"];const t=function(e){e.hasOwnProperty(fn("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};ie.enableWarning=function(e){t(this),this.enabledWarnings.indexOf(e)<0&&this.enabledWarnings.push(e)},ie.disableWarning=function(e){t(this);const o=this.enabledWarnings.indexOf(e);o>=0&&this.enabledWarnings.splice(o,1)}}((Xt=oe.reactiveElementVersions)!==null&&Xt!==void 0?Xt:oe.reactiveElementVersions=[]).push("1.6.3");oe.reactiveElementVersions.length>1&&me("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");/** + */var Jt,Yt,Xt,vn;const oe=window;let gn,ge;const Ei=oe.trustedTypes,Nr=Ei?Ei.emptyScript:"",wt=oe.reactiveElementPolyfillSupportDevMode;{const t=(Jt=oe.litIssuedWarnings)!==null&&Jt!==void 0?Jt:oe.litIssuedWarnings=new Set;ge=(e,o)=>{o+=` See https://lit.dev/msg/${e} for more information.`,t.has(o)||(console.warn(o),t.add(o))},ge("dev-mode","Lit is in dev mode. Not recommended for production!"),!((Yt=oe.ShadyDOM)===null||Yt===void 0)&&Yt.inUse&&wt===void 0&&ge("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded."),gn=e=>({then:(o,i)=>{ge("request-update-promise",`The \`requestUpdate\` method should no longer return a Promise but does so on \`${e}\`. Use \`updateComplete\` instead.`),o!==void 0&&o(!1)}})}const Qt=t=>{oe.emitLitDebugLogEvents&&oe.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))},fn=(t,e)=>t,So={toAttribute(t,e){switch(e){case Boolean:t=t?Nr:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t);break}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=t!==null;break;case Number:o=t===null?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch{o=null}break}return o}},yn=(t,e)=>e!==t&&(e===e||t===t),Zt={attribute:!0,type:String,converter:So,reflect:!1,hasChanged:yn},Co="finalized";class ie extends HTMLElement{constructor(){super(),this.__instanceProperties=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}static addInitializer(e){var o;this.finalize(),((o=this._initializers)!==null&&o!==void 0?o:this._initializers=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((o,i)=>{const n=this.__attributeNameForProperty(i,o);n!==void 0&&(this.__attributeToPropertyMap.set(n,i),e.push(n))}),e}static createProperty(e,o=Zt){var i;if(o.state&&(o.attribute=!1),this.finalize(),this.elementProperties.set(e,o),!o.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():`__${e}`,r=this.getPropertyDescriptor(e,n,o);r!==void 0&&(Object.defineProperty(this.prototype,e,r),this.hasOwnProperty("__reactivePropertyKeys")||(this.__reactivePropertyKeys=new Set((i=this.__reactivePropertyKeys)!==null&&i!==void 0?i:[])),this.__reactivePropertyKeys.add(e))}}static getPropertyDescriptor(e,o,i){return{get(){return this[o]},set(n){const r=this[e];this[o]=n,this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Zt}static finalize(){if(this.hasOwnProperty(Co))return!1;this[Co]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e._initializers!==void 0&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties),this.__attributeToPropertyMap=new Map,this.hasOwnProperty(fn("properties"))){const o=this.properties,i=[...Object.getOwnPropertyNames(o),...Object.getOwnPropertySymbols(o)];for(const n of i)this.createProperty(n,o[n])}this.elementStyles=this.finalizeStyles(this.styles);{const o=(i,n=!1)=>{this.prototype.hasOwnProperty(i)&&ge(n?"renamed-api":"removed-api",`\`${i}\` is implemented on class ${this.name}. It has been ${n?"renamed":"removed"} in this version of LitElement.`)};o("initialize"),o("requestUpdateInternal"),o("_getUpdateComplete",!0)}return!0}static finalizeStyles(e){const o=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const n of i)o.unshift(wi(n))}else e!==void 0&&o.push(wi(e));return o}static __attributeNameForProperty(e,o){const i=o.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}__initialize(){var e;this.__updatePromise=new Promise(o=>this.enableUpdating=o),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),(e=this.constructor._initializers)===null||e===void 0||e.forEach(o=>o(this))}addController(e){var o,i;((o=this.__controllers)!==null&&o!==void 0?o:this.__controllers=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var o;(o=this.__controllers)===null||o===void 0||o.splice(this.__controllers.indexOf(e)>>>0,1)}__saveInstanceProperties(){this.constructor.elementProperties.forEach((e,o)=>{this.hasOwnProperty(o)&&(this.__instanceProperties.set(o,this[o]),delete this[o])})}createRenderRoot(){var e;const o=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Ar(o,this.constructor.elementStyles),o}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this.__controllers)===null||e===void 0||e.forEach(o=>{var i;return(i=o.hostConnected)===null||i===void 0?void 0:i.call(o)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this.__controllers)===null||e===void 0||e.forEach(o=>{var i;return(i=o.hostDisconnected)===null||i===void 0?void 0:i.call(o)})}attributeChangedCallback(e,o,i){this._$attributeToProperty(e,i)}__propertyToAttribute(e,o,i=Zt){var n;const r=this.constructor.__attributeNameForProperty(e,i);if(r!==void 0&&i.reflect===!0){const l=(((n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?i.converter:So).toAttribute(o,i.type);this.constructor.enabledWarnings.indexOf("migration")>=0&&l===void 0&&ge("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,l==null?this.removeAttribute(r):this.setAttribute(r,l),this.__reflectingProperty=null}}_$attributeToProperty(e,o){var i;const n=this.constructor,r=n.__attributeToPropertyMap.get(e);if(r!==void 0&&this.__reflectingProperty!==r){const s=n.getPropertyOptions(r),l=typeof s.converter=="function"?{fromAttribute:s.converter}:((i=s.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?s.converter:So;this.__reflectingProperty=r,this[r]=l.fromAttribute(o,s.type),this.__reflectingProperty=null}}requestUpdate(e,o,i){let n=!0;return e!==void 0&&(i=i||this.constructor.getPropertyOptions(e),(i.hasChanged||yn)(this[e],o)?(this._$changedProperties.has(e)||this._$changedProperties.set(e,o),i.reflect===!0&&this.__reflectingProperty!==e&&(this.__reflectingProperties===void 0&&(this.__reflectingProperties=new Map),this.__reflectingProperties.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this.__updatePromise=this.__enqueueUpdate()),gn(this.localName)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(o){Promise.reject(o)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e,o;if(!this.isUpdatePending)return;if(Qt==null||Qt({kind:"update"}),!this.hasUpdated){const r=[];if((e=this.constructor.__reactivePropertyKeys)===null||e===void 0||e.forEach(s=>{var l;this.hasOwnProperty(s)&&!(!((l=this.__instanceProperties)===null||l===void 0)&&l.has(s))&&r.push(s)}),r.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${r.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}this.__instanceProperties&&(this.__instanceProperties.forEach((r,s)=>this[s]=r),this.__instanceProperties=void 0);let i=!1;const n=this._$changedProperties;try{i=this.shouldUpdate(n),i?(this.willUpdate(n),(o=this.__controllers)===null||o===void 0||o.forEach(r=>{var s;return(s=r.hostUpdate)===null||s===void 0?void 0:s.call(r)}),this.update(n)):this.__markUpdated()}catch(r){throw i=!1,this.__markUpdated(),r}i&&this._$didUpdate(n)}willUpdate(e){}_$didUpdate(e){var o;(o=this.__controllers)===null||o===void 0||o.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e),this.isUpdatePending&&this.constructor.enabledWarnings.indexOf("change-in-update")>=0&&ge("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties!==void 0&&(this.__reflectingProperties.forEach((o,i)=>this.__propertyToAttribute(i,this[i],o)),this.__reflectingProperties=void 0),this.__markUpdated()}updated(e){}firstUpdated(e){}}vn=Co;ie[vn]=!0;ie.elementProperties=new Map;ie.elementStyles=[];ie.shadowRootOptions={mode:"open"};wt==null||wt({ReactiveElement:ie});{ie.enabledWarnings=["change-in-update"];const t=function(e){e.hasOwnProperty(fn("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};ie.enableWarning=function(e){t(this),this.enabledWarnings.indexOf(e)<0&&this.enabledWarnings.push(e)},ie.disableWarning=function(e){t(this);const o=this.enabledWarnings.indexOf(e);o>=0&&this.enabledWarnings.splice(o,1)}}((Xt=oe.reactiveElementVersions)!==null&&Xt!==void 0?Xt:oe.reactiveElementVersions=[]).push("1.6.3");oe.reactiveElementVersions.length>1&&ge("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var eo,to,oo,io;const F=window,x=t=>{F.emitLitDebugLogEvents&&F.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))};let Ir=0,$t;(eo=F.litIssuedWarnings)!==null&&eo!==void 0||(F.litIssuedWarnings=new Set),$t=(t,e)=>{e+=t?` See https://lit.dev/msg/${t} for more information.`:"",F.litIssuedWarnings.has(e)||(console.warn(e),F.litIssuedWarnings.add(e))},$t("dev-mode","Lit is in dev mode. Not recommended for production!");const q=!((to=F.ShadyDOM)===null||to===void 0)&&to.inUse&&((oo=F.ShadyDOM)===null||oo===void 0?void 0:oo.noPatch)===!0?F.ShadyDOM.wrap:t=>t,Ve=F.trustedTypes,Si=Ve?Ve.createPolicy("lit-html",{createHTML:t=>t}):void 0,Pr=t=>t,jt=(t,e,o)=>Pr,Or=t=>{if(Te!==jt)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");Te=t},Lr=()=>{Te=jt},ko=(t,e,o)=>Te(t,e,o),To="$lit$",se=`lit$${String(Math.random()).slice(9)}$`,bn="?"+se,zr=`<${bn}>`,Ce=document,Qe=()=>Ce.createComment(""),Ze=t=>t===null||typeof t!="object"&&typeof t!="function",xn=Array.isArray,Mr=t=>xn(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",no=`[ + */var eo,to,oo,io;const F=window,x=t=>{F.emitLitDebugLogEvents&&F.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))};let Ir=0,$t;(eo=F.litIssuedWarnings)!==null&&eo!==void 0||(F.litIssuedWarnings=new Set),$t=(t,e)=>{e+=t?` See https://lit.dev/msg/${t} for more information.`:"",F.litIssuedWarnings.has(e)||(console.warn(e),F.litIssuedWarnings.add(e))},$t("dev-mode","Lit is in dev mode. Not recommended for production!");const W=!((to=F.ShadyDOM)===null||to===void 0)&&to.inUse&&((oo=F.ShadyDOM)===null||oo===void 0?void 0:oo.noPatch)===!0?F.ShadyDOM.wrap:t=>t,De=F.trustedTypes,Si=De?De.createPolicy("lit-html",{createHTML:t=>t}):void 0,Pr=t=>t,jt=(t,e,o)=>Pr,Or=t=>{if($e!==jt)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");$e=t},Lr=()=>{$e=jt},ko=(t,e,o)=>$e(t,e,o),To="$lit$",se=`lit$${String(Math.random()).slice(9)}$`,bn="?"+se,zr=`<${bn}>`,ke=document,Qe=()=>ke.createComment(""),Ze=t=>t===null||typeof t!="object"&&typeof t!="function",xn=Array.isArray,Mr=t=>xn(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",no=`[ \f\r]`,Vr=`[^ -\f\r"'\`<>=]`,Dr=`[^\\s"'>=/]`,qe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ci=1,ro=2,jr=3,ki=/-->/g,Ti=/>/g,ye=new RegExp(`>|${no}(?:(${Dr}+)(${no}*=${no}*(?:${Vr}|("|')|))|$)`,"g"),Ur=0,$i=1,Fr=2,Ai=3,so=/'/g,ao=/"/g,_n=/^(?:script|style|textarea|title)$/i,Br=1,At=2,Do=1,Rt=2,Hr=3,qr=4,Wr=5,jo=6,Gr=7,wn=t=>(e,...o)=>(e.some(i=>i===void 0)&&console.warn(`Some template strings are undefined. -This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strings:e,values:o}),b=wn(Br),Oe=wn(At),ke=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),Ri=new WeakMap,_e=Ce.createTreeWalker(Ce,129,null,!1);let Te=jt;function En(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw")){let o="invalid template strings array";throw o=` +\f\r"'\`<>=]`,Dr=`[^\\s"'>=/]`,qe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ci=1,ro=2,jr=3,ki=/-->/g,Ti=/>/g,xe=new RegExp(`>|${no}(?:(${Dr}+)(${no}*=${no}*(?:${Vr}|("|')|))|$)`,"g"),Ur=0,$i=1,Fr=2,Ai=3,so=/'/g,ao=/"/g,_n=/^(?:script|style|textarea|title)$/i,Br=1,At=2,Do=1,Rt=2,Hr=3,Wr=4,qr=5,jo=6,Gr=7,wn=t=>(e,...o)=>(e.some(i=>i===void 0)&&console.warn(`Some template strings are undefined. +This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strings:e,values:o}),b=wn(Br),Le=wn(At),Te=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),Ri=new WeakMap,Ee=ke.createTreeWalker(ke,129,null,!1);let $e=jt;function En(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw")){let o="invalid template strings array";throw o=` Internal Error: expected template strings to be an array with a 'raw' field. Faking a template strings array by calling html or svg like an ordinary function is effectively @@ -24,11 +24,11 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin https://github.com/lit/lit/issues/new?template=bug_report.md and include information about your build tooling, if any. `.trim().replace(/\n */g,` -`),new Error(o)}return Si!==void 0?Si.createHTML(e):e}const Kr=(t,e)=>{const o=t.length-1,i=[];let n=e===At?"":"",r,s=qe;for(let a=0;a"?(s=r??qe,c=-1):y[$i]===void 0?c=-2:(c=s.lastIndex-y[Fr].length,m=y[$i],s=y[Ai]===void 0?ye:y[Ai]==='"'?ao:so):s===ao||s===so?s=ye:s===ki||s===Ti?s=qe:(s=ye,r=void 0);console.assert(c===-1||s===ye||s===so||s===ao,"unexpected parse state B");const ce=s===ye&&t[a+1].startsWith("/>")?" ":"";n+=s===qe?d+zr:c>=0?(i.push(m),d.slice(0,c)+To+d.slice(c)+se+ce):d+se+(c===-2?(i.push(void 0),a):ce)}const l=n+(t[o]||"")+(e===At?"":"");return[En(t,l),i]};class et{constructor({strings:e,["_$litType$"]:o},i){this.parts=[];let n,r=0,s=0;const l=e.length-1,a=this.parts,[d,c]=Kr(e,o);if(this.el=et.createElement(d,i),_e.currentNode=this.el.content,o===At){const m=this.el.content,h=m.firstChild;h.remove(),m.append(...h.childNodes)}for(;(n=_e.nextNode())!==null&&a.length0){n.textContent=Ve?Ve.emptyScript:"";for(let y=0;ys, and by mutating the DOM rather than stylesheets.":n="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(n)}}x==null||x({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==$&&Ze(this._$committedValue)){const o=q(this._$startNode).nextSibling;this._textSanitizer===void 0&&(this._textSanitizer=ko(o,"data","property")),e=this._textSanitizer(e),x==null||x({kind:"commit text",node:o,value:e,options:this.options}),o.data=e}else{const o=Ce.createTextNode("");this._commitNode(o),this._textSanitizer===void 0&&(this._textSanitizer=ko(o,"data","property")),e=this._textSanitizer(e),x==null||x({kind:"commit text",node:o,value:e,options:this.options}),o.data=e}this._$committedValue=e}_commitTemplateResult(e){var o;const{values:i,["_$litType$"]:n}=e,r=typeof n=="number"?this._$getTemplate(e):(n.el===void 0&&(n.el=et.createElement(En(n.h,n.h[0]),this.options)),n);if(((o=this._$committedValue)===null||o===void 0?void 0:o._$template)===r)x==null||x({kind:"template updating",template:r,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:i}),this._$committedValue._update(i);else{const s=new Jr(r,this),l=s._clone(this.options);x==null||x({kind:"template instantiated",template:r,instance:s,parts:s._$parts,options:this.options,fragment:l,values:i}),s._update(i),x==null||x({kind:"template instantiated and updated",template:r,instance:s,parts:s._$parts,options:this.options,fragment:l,values:i}),this._commitNode(l),this._$committedValue=s}}_$getTemplate(e){let o=Ri.get(e.strings);return o===void 0&&Ri.set(e.strings,o=new et(e)),o}_commitIterable(e){xn(this._$committedValue)||(this._$committedValue=[],this._$clear());const o=this._$committedValue;let i=0,n;for(const r of e)i===o.length?o.push(n=new st(this._insert(Qe()),this._insert(Qe()),this,this.options)):n=o[i],n._$setValue(r),i++;i2||i[0]!==""||i[1]!==""?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=$,this._sanitizer=void 0}get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e,o=this,i,n){const r=this.strings;let s=!1;if(r===void 0)e=De(this,e,o,0),s=!Ze(e)||e!==this._$committedValue&&e!==ke,s&&(this._$committedValue=e);else{const l=e;e=r[0];let a,d;for(a=0;a\` has a \`@${o}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,o=this){var i;if(e=(i=De(this,e,o,0))!==null&&i!==void 0?i:$,e===ke)return;const n=this._$committedValue,r=e===$&&n!==$||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==$&&(n===$||r);x==null||x({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:r,addListener:s,oldListener:n}),r&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){var o,i;typeof this._$committedValue=="function"?this._$committedValue.call((i=(o=this.options)===null||o===void 0?void 0:o.host)!==null&&i!==void 0?i:this.element,e):this._$committedValue.handleEvent(e)}}class es{constructor(e,o,i){this.element=e,this.type=jo,this._$disconnectableChildren=void 0,this._$parent=o,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){x==null||x({kind:"commit to element binding",element:this.element,value:e,options:this.options}),De(this,e)}}const lo=F.litHtmlPolyfillSupportDevMode;lo==null||lo(et,st);((io=F.litHtmlVersions)!==null&&io!==void 0?io:F.litHtmlVersions=[]).push("2.8.0");F.litHtmlVersions.length>1&&$t("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const we=(t,e,o)=>{var i,n;if(e==null)throw new TypeError(`The container to render into may not be ${e}`);const r=Ir++,s=(i=o==null?void 0:o.renderBefore)!==null&&i!==void 0?i:e;let l=s._$litPart$;if(x==null||x({kind:"begin render",id:r,value:t,container:e,options:o,part:l}),l===void 0){const a=(n=o==null?void 0:o.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=l=new st(e.insertBefore(Qe(),a),a,void 0,o??{})}return l._$setValue(t),x==null||x({kind:"end render",id:r,value:t,container:e,options:o,part:l}),l};we.setSanitizer=Or,we.createSanitizer=ko,we._testOnlyClearSanitizerFactoryDoNotCallOrElse=Lr;/** +`),new Error(o)}return Si!==void 0?Si.createHTML(e):e}const Kr=(t,e)=>{const o=t.length-1,i=[];let n=e===At?"":"",r,s=qe;for(let a=0;a"?(s=r??qe,c=-1):y[$i]===void 0?c=-2:(c=s.lastIndex-y[Fr].length,m=y[$i],s=y[Ai]===void 0?xe:y[Ai]==='"'?ao:so):s===ao||s===so?s=xe:s===ki||s===Ti?s=qe:(s=xe,r=void 0);console.assert(c===-1||s===xe||s===so||s===ao,"unexpected parse state B");const he=s===xe&&t[a+1].startsWith("/>")?" ":"";n+=s===qe?d+zr:c>=0?(i.push(m),d.slice(0,c)+To+d.slice(c)+se+he):d+se+(c===-2?(i.push(void 0),a):he)}const l=n+(t[o]||"")+(e===At?"":"");return[En(t,l),i]};class et{constructor({strings:e,["_$litType$"]:o},i){this.parts=[];let n,r=0,s=0;const l=e.length-1,a=this.parts,[d,c]=Kr(e,o);if(this.el=et.createElement(d,i),Ee.currentNode=this.el.content,o===At){const m=this.el.content,h=m.firstChild;h.remove(),m.append(...h.childNodes)}for(;(n=Ee.nextNode())!==null&&a.length0){n.textContent=De?De.emptyScript:"";for(let y=0;ys, and by mutating the DOM rather than stylesheets.":n="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(n)}}x==null||x({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==$&&Ze(this._$committedValue)){const o=W(this._$startNode).nextSibling;this._textSanitizer===void 0&&(this._textSanitizer=ko(o,"data","property")),e=this._textSanitizer(e),x==null||x({kind:"commit text",node:o,value:e,options:this.options}),o.data=e}else{const o=ke.createTextNode("");this._commitNode(o),this._textSanitizer===void 0&&(this._textSanitizer=ko(o,"data","property")),e=this._textSanitizer(e),x==null||x({kind:"commit text",node:o,value:e,options:this.options}),o.data=e}this._$committedValue=e}_commitTemplateResult(e){var o;const{values:i,["_$litType$"]:n}=e,r=typeof n=="number"?this._$getTemplate(e):(n.el===void 0&&(n.el=et.createElement(En(n.h,n.h[0]),this.options)),n);if(((o=this._$committedValue)===null||o===void 0?void 0:o._$template)===r)x==null||x({kind:"template updating",template:r,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:i}),this._$committedValue._update(i);else{const s=new Jr(r,this),l=s._clone(this.options);x==null||x({kind:"template instantiated",template:r,instance:s,parts:s._$parts,options:this.options,fragment:l,values:i}),s._update(i),x==null||x({kind:"template instantiated and updated",template:r,instance:s,parts:s._$parts,options:this.options,fragment:l,values:i}),this._commitNode(l),this._$committedValue=s}}_$getTemplate(e){let o=Ri.get(e.strings);return o===void 0&&Ri.set(e.strings,o=new et(e)),o}_commitIterable(e){xn(this._$committedValue)||(this._$committedValue=[],this._$clear());const o=this._$committedValue;let i=0,n;for(const r of e)i===o.length?o.push(n=new st(this._insert(Qe()),this._insert(Qe()),this,this.options)):n=o[i],n._$setValue(r),i++;i2||i[0]!==""||i[1]!==""?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=$,this._sanitizer=void 0}get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e,o=this,i,n){const r=this.strings;let s=!1;if(r===void 0)e=je(this,e,o,0),s=!Ze(e)||e!==this._$committedValue&&e!==Te,s&&(this._$committedValue=e);else{const l=e;e=r[0];let a,d;for(a=0;a\` has a \`@${o}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,o=this){var i;if(e=(i=je(this,e,o,0))!==null&&i!==void 0?i:$,e===Te)return;const n=this._$committedValue,r=e===$&&n!==$||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==$&&(n===$||r);x==null||x({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:r,addListener:s,oldListener:n}),r&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){var o,i;typeof this._$committedValue=="function"?this._$committedValue.call((i=(o=this.options)===null||o===void 0?void 0:o.host)!==null&&i!==void 0?i:this.element,e):this._$committedValue.handleEvent(e)}}class es{constructor(e,o,i){this.element=e,this.type=jo,this._$disconnectableChildren=void 0,this._$parent=o,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){x==null||x({kind:"commit to element binding",element:this.element,value:e,options:this.options}),je(this,e)}}const lo=F.litHtmlPolyfillSupportDevMode;lo==null||lo(et,st);((io=F.litHtmlVersions)!==null&&io!==void 0?io:F.litHtmlVersions=[]).push("2.8.0");F.litHtmlVersions.length>1&&$t("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const Se=(t,e,o)=>{var i,n;if(e==null)throw new TypeError(`The container to render into may not be ${e}`);const r=Ir++,s=(i=o==null?void 0:o.renderBefore)!==null&&i!==void 0?i:e;let l=s._$litPart$;if(x==null||x({kind:"begin render",id:r,value:t,container:e,options:o,part:l}),l===void 0){const a=(n=o==null?void 0:o.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=l=new st(e.insertBefore(Qe(),a),a,void 0,o??{})}return l._$setValue(t),x==null||x({kind:"end render",id:r,value:t,container:e,options:o,part:l}),l};Se.setSanitizer=Or,Se.createSanitizer=ko,Se._testOnlyClearSanitizerFactoryDoNotCallOrElse=Lr;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var co,ho,uo;let Uo;{const t=(co=globalThis.litIssuedWarnings)!==null&&co!==void 0?co:globalThis.litIssuedWarnings=new Set;Uo=(e,o)=>{o+=` See https://lit.dev/msg/${e} for more information.`,t.has(o)||(console.warn(o),t.add(o))}}class A extends ie{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){var e,o;const i=super.createRenderRoot();return(e=(o=this.renderOptions).renderBefore)!==null&&e!==void 0||(o.renderBefore=i.firstChild),i}update(e){const o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.__childPart=we(o,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this.__childPart)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.__childPart)===null||e===void 0||e.setConnected(!1)}render(){return ke}}A.finalized=!0;A._$litElement$=!0;(ho=globalThis.litElementHydrateSupport)===null||ho===void 0||ho.call(globalThis,{LitElement:A});const po=globalThis.litElementPolyfillSupportDevMode;po==null||po({LitElement:A});A.finalize=function(){if(!ie.finalize.call(this))return!1;const e=(o,i,n=!1)=>{if(o.hasOwnProperty(i)){const r=(typeof o=="function"?o:o.constructor).name;Uo(n?"renamed-api":"removed-api",`\`${i}\` is implemented on class ${r}. It has been ${n?"renamed":"removed"} in this version of LitElement.`)}};return e(this,"render"),e(this,"getStyles",!0),e(this.prototype,"adoptStyles"),!0};((uo=globalThis.litElementVersions)!==null&&uo!==void 0?uo:globalThis.litElementVersions=[]).push("3.3.3");globalThis.litElementVersions.length>1&&Uo("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");/** + */var co,ho,uo;let Uo;{const t=(co=globalThis.litIssuedWarnings)!==null&&co!==void 0?co:globalThis.litIssuedWarnings=new Set;Uo=(e,o)=>{o+=` See https://lit.dev/msg/${e} for more information.`,t.has(o)||(console.warn(o),t.add(o))}}class A extends ie{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){var e,o;const i=super.createRenderRoot();return(e=(o=this.renderOptions).renderBefore)!==null&&e!==void 0||(o.renderBefore=i.firstChild),i}update(e){const o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.__childPart=Se(o,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this.__childPart)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.__childPart)===null||e===void 0||e.setConnected(!1)}render(){return Te}}A.finalized=!0;A._$litElement$=!0;(ho=globalThis.litElementHydrateSupport)===null||ho===void 0||ho.call(globalThis,{LitElement:A});const po=globalThis.litElementPolyfillSupportDevMode;po==null||po({LitElement:A});A.finalize=function(){if(!ie.finalize.call(this))return!1;const e=(o,i,n=!1)=>{if(o.hasOwnProperty(i)){const r=(typeof o=="function"?o:o.constructor).name;Uo(n?"renamed-api":"removed-api",`\`${i}\` is implemented on class ${r}. It has been ${n?"renamed":"removed"} in this version of LitElement.`)}};return e(this,"render"),e(this,"getStyles",!0),e(this.prototype,"adoptStyles"),!0};((uo=globalThis.litElementVersions)!==null&&uo!==void 0?uo:globalThis.litElementVersions=[]).push("3.3.3");globalThis.litElementVersions.length>1&&Uo("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause @@ -36,11 +36,11 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const is=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(o){o.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(o){o.createProperty(e.key,t)}},ns=(t,e,o)=>{e.constructor.createProperty(o,t)};function _(t){return(e,o)=>o!==void 0?ns(t,e,o):is(t,e)}/** + */const is=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(o){o.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(o){o.createProperty(e.key,t)}},ns=(t,e,o)=>{e.constructor.createProperty(o,t)};function w(t){return(e,o)=>o!==void 0?ns(t,e,o):is(t,e)}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function I(t){return _({...t,state:!0})}/** + */function I(t){return w({...t,state:!0})}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause @@ -60,7 +60,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */class cs extends ds{constructor(e){var o;if(super(e),e.type!==as.ATTRIBUTE||e.name!=="class"||((o=e.strings)===null||o===void 0?void 0:o.length)>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(o=>e[o]).join(" ")+" "}update(e,[o]){var i,n;if(this._previousClasses===void 0){this._previousClasses=new Set,e.strings!==void 0&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in o)o[s]&&!(!((i=this._staticClasses)===null||i===void 0)&&i.has(s))&&this._previousClasses.add(s);return this.render(o)}const r=e.element.classList;this._previousClasses.forEach(s=>{s in o||(r.remove(s),this._previousClasses.delete(s))});for(const s in o){const l=!!o[s];l!==this._previousClasses.has(s)&&!(!((n=this._staticClasses)===null||n===void 0)&&n.has(s))&&(l?(r.add(s),this._previousClasses.add(s)):(r.remove(s),this._previousClasses.delete(s)))}return ke}}const Fo=ls(cs),vo="css-loading-indicator";var K;(function(t){t.IDLE="",t.FIRST="first",t.SECOND="second",t.THIRD="third"})(K||(K={}));class O extends A{constructor(){super(),this.firstDelay=450,this.secondDelay=1500,this.thirdDelay=5e3,this.expandedDuration=2e3,this.onlineText="Online",this.offlineText="Connection lost",this.reconnectingText="Connection lost, trying to reconnect...",this.offline=!1,this.reconnecting=!1,this.expanded=!1,this.loading=!1,this.loadingBarState=K.IDLE,this.applyDefaultThemeState=!0,this.firstTimeout=0,this.secondTimeout=0,this.thirdTimeout=0,this.expandedTimeout=0,this.lastMessageState=R.CONNECTED,this.connectionStateListener=()=>{this.expanded=this.updateConnectionState(),this.expandedTimeout=this.timeoutFor(this.expandedTimeout,this.expanded,()=>{this.expanded=!1},this.expandedDuration)}}static create(){var e,o;const i=window;return!((e=i.Vaadin)===null||e===void 0)&&e.connectionIndicator||(i.Vaadin=i.Vaadin||{},i.Vaadin.connectionIndicator=document.createElement("vaadin-connection-indicator"),document.body.appendChild(i.Vaadin.connectionIndicator)),(o=i.Vaadin)===null||o===void 0?void 0:o.connectionIndicator}render(){return b` + */class cs extends ds{constructor(e){var o;if(super(e),e.type!==as.ATTRIBUTE||e.name!=="class"||((o=e.strings)===null||o===void 0?void 0:o.length)>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(o=>e[o]).join(" ")+" "}update(e,[o]){var i,n;if(this._previousClasses===void 0){this._previousClasses=new Set,e.strings!==void 0&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in o)o[s]&&!(!((i=this._staticClasses)===null||i===void 0)&&i.has(s))&&this._previousClasses.add(s);return this.render(o)}const r=e.element.classList;this._previousClasses.forEach(s=>{s in o||(r.remove(s),this._previousClasses.delete(s))});for(const s in o){const l=!!o[s];l!==this._previousClasses.has(s)&&!(!((n=this._staticClasses)===null||n===void 0)&&n.has(s))&&(l?(r.add(s),this._previousClasses.add(s)):(r.remove(s),this._previousClasses.delete(s)))}return Te}}const Fo=ls(cs),vo="css-loading-indicator";var K;(function(t){t.IDLE="",t.FIRST="first",t.SECOND="second",t.THIRD="third"})(K||(K={}));class O extends A{constructor(){super(),this.firstDelay=450,this.secondDelay=1500,this.thirdDelay=5e3,this.expandedDuration=2e3,this.onlineText="Online",this.offlineText="Connection lost",this.reconnectingText="Connection lost, trying to reconnect...",this.offline=!1,this.reconnecting=!1,this.expanded=!1,this.loading=!1,this.loadingBarState=K.IDLE,this.applyDefaultThemeState=!0,this.firstTimeout=0,this.secondTimeout=0,this.thirdTimeout=0,this.expandedTimeout=0,this.lastMessageState=R.CONNECTED,this.connectionStateListener=()=>{this.expanded=this.updateConnectionState(),this.expandedTimeout=this.timeoutFor(this.expandedTimeout,this.expanded,()=>{this.expanded=!1},this.expandedDuration)}}static create(){var e,o;const i=window;return!((e=i.Vaadin)===null||e===void 0)&&e.connectionIndicator||(i.Vaadin=i.Vaadin||{},i.Vaadin.connectionIndicator=document.createElement("vaadin-connection-indicator"),document.body.appendChild(i.Vaadin.connectionIndicator)),(o=i.Vaadin)===null||o===void 0?void 0:o.connectionIndicator}render(){return b`
this.isActive}};const o=document.head.querySelector("base");this.baseRegex=new RegExp(`^${(document.baseURI||o&&o.href||"/").replace(/^https?:\/\/[^/]+/i,"")}`),this.appShellTitle=document.title,this.addConnectionIndicator()}get serverSideRoutes(){return[{path:"(.*)",action:this.action}]}loadingStarted(){this.isActive=!0,k.Vaadin.connectionState.loadingStarted()}loadingFinished(){this.isActive=!1,k.Vaadin.connectionState.loadingFinished(),!k.Vaadin.listener&&(k.Vaadin.listener={},document.addEventListener("click",e=>{e.target&&(e.target.hasAttribute("router-link")?this.navigation="link":e.composedPath().some(o=>o.nodeName==="A")&&(this.navigation="client"))},{capture:!0}))}get action(){return async e=>{if(this.pathname=e.pathname,k.Vaadin.connectionState.online)try{await this.flowInit()}catch(o){if(o instanceof Ni)return k.Vaadin.connectionState.state=R.CONNECTION_LOST,this.offlineStubAction();throw o}else return this.offlineStubAction();return this.container.onBeforeEnter=(o,i)=>this.flowNavigate(o,i),this.container.onBeforeLeave=(o,i)=>this.flowLeave(o,i),this.container}}async flowLeave(e,o){const{connectionState:i}=k.Vaadin;return this.pathname===e.pathname||!this.isFlowClientLoaded()||i.offline?Promise.resolve({}):new Promise(n=>{this.loadingStarted(),this.container.serverConnected=r=>{n(o&&r?o.prevent():{}),this.loadingFinished()},We.$server.leaveNavigation(this.getFlowRoutePath(e),this.getFlowRouteQuery(e))})}async flowNavigate(e,o){return this.response?new Promise(i=>{this.loadingStarted(),this.container.serverConnected=(n,r)=>{o&&n?i(o.prevent()):o&&o.redirect&&r?i(o.redirect(r.pathname)):(this.container.style.display="",i(this.container)),this.loadingFinished()},this.container.serverPaused=()=>{this.loadingFinished()},We.$server.connectClient(this.getFlowRoutePath(e),this.getFlowRouteQuery(e),this.appShellTitle,history.state,this.navigation),this.navigation="history"}):Promise.resolve(this.container)}getFlowRoutePath(e){return decodeURIComponent(e.pathname).replace(this.baseRegex,"")}getFlowRouteQuery(e){return e.search&&e.search.substring(1)||""}async flowInit(){if(!this.isFlowClientLoaded()){this.loadingStarted(),this.response=await this.flowInitUi();const{pushScript:e,appConfig:o}=this.response;typeof e=="string"&&await this.loadScript(e);const{appId:i}=o;await(await f(()=>import("./FlowBootstrap-feff2646.js"),[],import.meta.url)).init(this.response),typeof this.config.imports=="function"&&(this.injectAppIdScript(i),await this.config.imports());const r=`flow-container-${i.toLowerCase()}`,s=document.querySelector(r);s?this.container=s:(this.container=document.createElement(r),this.container.id=i),We.$[i]=this.container;const l=await f(()=>import("./FlowClient-341d667e.js"),[],import.meta.url);await this.flowInitClient(l),this.loadingFinished()}return this.container&&!this.container.isConnected&&(this.container.style.display="none",document.body.appendChild(this.container)),this.response}async loadScript(e){return new Promise((o,i)=>{const n=document.createElement("script");n.onload=()=>o(),n.onerror=i,n.src=e,document.body.appendChild(n)})}injectAppIdScript(e){const o=e.substring(0,e.lastIndexOf("-")),i=document.createElement("script");i.type="module",i.setAttribute("data-app-id",o),document.body.append(i)}async flowInitClient(e){return e.init(),new Promise(o=>{const i=setInterval(()=>{Object.keys(k.Vaadin.Flow.clients).filter(r=>r!=="TypeScript").reduce((r,s)=>r||k.Vaadin.Flow.clients[s].isActive(),!1)||(clearInterval(i),o())},5)})}async flowInitUi(){const e=k.Vaadin&&k.Vaadin.TypeScript&&k.Vaadin.TypeScript.initial;return e?(k.Vaadin.TypeScript.initial=void 0,Promise.resolve(e)):new Promise((o,i)=>{const r=new XMLHttpRequest,s=`?v-r=init&location=${encodeURIComponent(this.getFlowRoutePath(location))}&query=${encodeURIComponent(this.getFlowRouteQuery(location))}`;r.open("GET",s),r.onerror=()=>i(new Ni(`Invalid server response when initializing Flow UI. + `}getLoadingBarStyle(){switch(this.loadingBarState){case K.IDLE:return"display: none";case K.FIRST:case K.SECOND:case K.THIRD:return"display: block";default:return""}}timeoutFor(e,o,i,n){return e!==0&&window.clearTimeout(e),o?window.setTimeout(i,n):0}static get instance(){return O.create()}}B([w({type:Number})],O.prototype,"firstDelay",void 0);B([w({type:Number})],O.prototype,"secondDelay",void 0);B([w({type:Number})],O.prototype,"thirdDelay",void 0);B([w({type:Number})],O.prototype,"expandedDuration",void 0);B([w({type:String})],O.prototype,"onlineText",void 0);B([w({type:String})],O.prototype,"offlineText",void 0);B([w({type:String})],O.prototype,"reconnectingText",void 0);B([w({type:Boolean,reflect:!0})],O.prototype,"offline",void 0);B([w({type:Boolean,reflect:!0})],O.prototype,"reconnecting",void 0);B([w({type:Boolean,reflect:!0})],O.prototype,"expanded",void 0);B([w({type:Boolean,reflect:!0})],O.prototype,"loading",void 0);B([w({type:String})],O.prototype,"loadingBarState",void 0);B([w({type:Boolean})],O.prototype,"applyDefaultTheme",null);customElements.get("vaadin-connection-indicator")===void 0&&customElements.define("vaadin-connection-indicator",O);O.instance;const tt=window;tt.Vaadin=tt.Vaadin||{};tt.Vaadin.registrations=tt.Vaadin.registrations||[];tt.Vaadin.registrations.push({is:"@vaadin/common-frontend",version:"0.0.18"});class Ni extends Error{}const Ge=window.document.body,k=window;class hs{constructor(e){this.response=void 0,this.pathname="",this.isActive=!1,this.baseRegex=/^\//,this.navigation="",Ge.$=Ge.$||[],this.config=e||{},k.Vaadin=k.Vaadin||{},k.Vaadin.Flow=k.Vaadin.Flow||{},k.Vaadin.Flow.clients={TypeScript:{isActive:()=>this.isActive}};const o=document.head.querySelector("base");this.baseRegex=new RegExp(`^${(document.baseURI||o&&o.href||"/").replace(/^https?:\/\/[^/]+/i,"")}`),this.appShellTitle=document.title,this.addConnectionIndicator()}get serverSideRoutes(){return[{path:"(.*)",action:this.action}]}loadingStarted(){this.isActive=!0,k.Vaadin.connectionState.loadingStarted()}loadingFinished(){this.isActive=!1,k.Vaadin.connectionState.loadingFinished(),!k.Vaadin.listener&&(k.Vaadin.listener={},document.addEventListener("click",e=>{e.target&&(e.target.hasAttribute("router-link")?this.navigation="link":e.composedPath().some(o=>o.nodeName==="A")&&(this.navigation="client"))},{capture:!0}))}get action(){return async e=>{if(this.pathname=e.pathname,k.Vaadin.connectionState.online)try{await this.flowInit()}catch(o){if(o instanceof Ni)return k.Vaadin.connectionState.state=R.CONNECTION_LOST,this.offlineStubAction();throw o}else return this.offlineStubAction();return this.container.onBeforeEnter=(o,i)=>this.flowNavigate(o,i),this.container.onBeforeLeave=(o,i)=>this.flowLeave(o,i),this.container}}async flowLeave(e,o){const{connectionState:i}=k.Vaadin;return this.pathname===e.pathname||!this.isFlowClientLoaded()||i.offline?Promise.resolve({}):new Promise(n=>{this.loadingStarted(),this.container.serverConnected=r=>{n(o&&r?o.prevent():{}),this.loadingFinished()},Ge.$server.leaveNavigation(this.getFlowRoutePath(e),this.getFlowRouteQuery(e))})}async flowNavigate(e,o){return this.response?new Promise(i=>{this.loadingStarted(),this.container.serverConnected=(n,r)=>{o&&n?i(o.prevent()):o&&o.redirect&&r?i(o.redirect(r.pathname)):(this.container.style.display="",i(this.container)),this.loadingFinished()},this.container.serverPaused=()=>{this.loadingFinished()},Ge.$server.connectClient(this.getFlowRoutePath(e),this.getFlowRouteQuery(e),this.appShellTitle,history.state,this.navigation),this.navigation="history"}):Promise.resolve(this.container)}getFlowRoutePath(e){return decodeURIComponent(e.pathname).replace(this.baseRegex,"")}getFlowRouteQuery(e){return e.search&&e.search.substring(1)||""}async flowInit(){if(!this.isFlowClientLoaded()){this.loadingStarted(),this.response=await this.flowInitUi();const{pushScript:e,appConfig:o}=this.response;typeof e=="string"&&await this.loadScript(e);const{appId:i}=o;await(await f(()=>import("./FlowBootstrap-feff2646.js"),[],import.meta.url)).init(this.response),typeof this.config.imports=="function"&&(this.injectAppIdScript(i),await this.config.imports());const r=`flow-container-${i.toLowerCase()}`,s=document.querySelector(r);s?this.container=s:(this.container=document.createElement(r),this.container.id=i),Ge.$[i]=this.container;const l=await f(()=>import("./FlowClient-341d667e.js"),[],import.meta.url);await this.flowInitClient(l),this.loadingFinished()}return this.container&&!this.container.isConnected&&(this.container.style.display="none",document.body.appendChild(this.container)),this.response}async loadScript(e){return new Promise((o,i)=>{const n=document.createElement("script");n.onload=()=>o(),n.onerror=i,n.src=e,document.body.appendChild(n)})}injectAppIdScript(e){const o=e.substring(0,e.lastIndexOf("-")),i=document.createElement("script");i.type="module",i.setAttribute("data-app-id",o),document.body.append(i)}async flowInitClient(e){return e.init(),new Promise(o=>{const i=setInterval(()=>{Object.keys(k.Vaadin.Flow.clients).filter(r=>r!=="TypeScript").reduce((r,s)=>r||k.Vaadin.Flow.clients[s].isActive(),!1)||(clearInterval(i),o())},5)})}async flowInitUi(){const e=k.Vaadin&&k.Vaadin.TypeScript&&k.Vaadin.TypeScript.initial;return e?(k.Vaadin.TypeScript.initial=void 0,Promise.resolve(e)):new Promise((o,i)=>{const r=new XMLHttpRequest,s=`?v-r=init&location=${encodeURIComponent(this.getFlowRoutePath(location))}&query=${encodeURIComponent(this.getFlowRouteQuery(location))}`;r.open("GET",s),r.onerror=()=>i(new Ni(`Invalid server response when initializing Flow UI. ${r.status} - ${r.responseText}`)),r.onload=()=>{const l=r.getResponseHeader("content-type");l&&l.indexOf("application/json")!==-1?o(JSON.parse(r.responseText)):r.onerror()},r.send()})}addConnectionIndicator(){O.create(),k.addEventListener("online",()=>{if(!this.isFlowClientLoaded()){k.Vaadin.connectionState.state=R.RECONNECTING;const e=new XMLHttpRequest;e.open("HEAD","sw.js"),e.onload=()=>{k.Vaadin.connectionState.state=R.CONNECTED},e.onerror=()=>{k.Vaadin.connectionState.state=R.CONNECTION_LOST},setTimeout(()=>e.send(),50)}}),k.addEventListener("offline",()=>{this.isFlowClientLoaded()||(k.Vaadin.connectionState.state=R.CONNECTION_LOST)})}async offlineStubAction(){const e=document.createElement("iframe"),o="./offline-stub.html";e.setAttribute("src",o),e.setAttribute("style","width: 100%; height: 100%; border: 0"),this.response=void 0;let i;const n=()=>{i!==void 0&&(k.Vaadin.connectionState.removeStateChangeListener(i),i=void 0)};return e.onBeforeEnter=(r,s,l)=>{i=()=>{k.Vaadin.connectionState.online&&(n(),l.render(r,!1))},k.Vaadin.connectionState.addStateChangeListener(i)},e.onBeforeLeave=(r,s,l)=>{n()},e}isFlowClientLoaded(){return this.response!==void 0}}const{serverSideRoutes:us}=new hs({imports:()=>f(()=>import("./generated-flow-imports-20d69db2.js"),[],import.meta.url)}),ps=[...us],ms=new pe(document.querySelector("#outlet"));ms.setRoutes(ps);(function(){if(typeof document>"u"||"adoptedStyleSheets"in document)return;var t="ShadyCSS"in window&&!ShadyCSS.nativeShadow,e=document.implementation.createHTMLDocument(""),o=new WeakMap,i=typeof DOMException=="object"?Error:DOMException,n=Object.defineProperty,r=Array.prototype.forEach,s=/@import.+?;?$/gm;function l(u){var p=u.replace(s,"");return p!==u&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),p.trim()}function a(u){return"isConnected"in u?u.isConnected:document.contains(u)}function d(u){return u.filter(function(p,w){return u.indexOf(p)===w})}function c(u,p){return u.filter(function(w){return p.indexOf(w)===-1})}function m(u){u.parentNode.removeChild(u)}function h(u){return u.shadowRoot||o.get(u)}var y=["addRule","deleteRule","insertRule","removeRule"],ce=CSSStyleSheet,he=ce.prototype;he.replace=function(){return Promise.reject(new i("Can't call replace on non-constructed CSSStyleSheets."))},he.replaceSync=function(){throw new i("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};function ne(u){return typeof u=="object"?Re.isPrototypeOf(u)||he.isPrototypeOf(u):!1}function Ft(u){return typeof u=="object"?he.isPrototypeOf(u):!1}var H=new WeakMap,ee=new WeakMap,$e=new WeakMap,Ae=new WeakMap;function Bt(u,p){var w=document.createElement("style");return $e.get(u).set(p,w),ee.get(u).push(p),w}function re(u,p){return $e.get(u).get(p)}function lt(u,p){$e.get(u).delete(p),ee.set(u,ee.get(u).filter(function(w){return w!==p}))}function Qo(u,p){requestAnimationFrame(function(){p.textContent=H.get(u).textContent,Ae.get(u).forEach(function(w){return p.sheet[w.method].apply(p.sheet,w.args)})})}function dt(u){if(!H.has(u))throw new TypeError("Illegal invocation")}function Ht(){var u=this,p=document.createElement("style");e.body.appendChild(p),H.set(u,p),ee.set(u,[]),$e.set(u,new WeakMap),Ae.set(u,[])}var Re=Ht.prototype;Re.replace=function(p){try{return this.replaceSync(p),Promise.resolve(this)}catch(w){return Promise.reject(w)}},Re.replaceSync=function(p){if(dt(this),typeof p=="string"){var w=this;H.get(w).textContent=l(p),Ae.set(w,[]),ee.get(w).forEach(function(V){V.isConnected()&&Qo(w,re(w,V))})}},n(Re,"cssRules",{configurable:!0,enumerable:!0,get:function(){return dt(this),H.get(this).sheet.cssRules}}),n(Re,"media",{configurable:!0,enumerable:!0,get:function(){return dt(this),H.get(this).sheet.media}}),y.forEach(function(u){Re[u]=function(){var p=this;dt(p);var w=arguments;Ae.get(p).push({method:u,args:w}),ee.get(p).forEach(function(j){if(j.isConnected()){var L=re(p,j).sheet;L[u].apply(L,w)}});var V=H.get(p).sheet;return V[u].apply(V,w)}}),n(Ht,Symbol.hasInstance,{configurable:!0,value:ne});var Zo={childList:!0,subtree:!0},ei=new WeakMap;function Ne(u){var p=ei.get(u);return p||(p=new ii(u),ei.set(u,p)),p}function ti(u){n(u.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return Ne(this).sheets},set:function(p){Ne(this).update(p)}})}function qt(u,p){for(var w=document.createNodeIterator(u,NodeFilter.SHOW_ELEMENT,function(j){return h(j)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},null,!1),V=void 0;V=w.nextNode();)p(h(V))}var ct=new WeakMap,Ie=new WeakMap,ht=new WeakMap;function Mn(u,p){return p instanceof HTMLStyleElement&&Ie.get(u).some(function(w){return re(w,u)})}function oi(u){var p=ct.get(u);return p instanceof Document?p.body:p}function Wt(u){var p=document.createDocumentFragment(),w=Ie.get(u),V=ht.get(u),j=oi(u);V.disconnect(),w.forEach(function(L){p.appendChild(re(L,u)||Bt(L,u))}),j.insertBefore(p,null),V.observe(j,Zo),w.forEach(function(L){Qo(L,re(L,u))})}function ii(u){var p=this;p.sheets=[],ct.set(p,u),Ie.set(p,[]),ht.set(p,new MutationObserver(function(w,V){if(!document){V.disconnect();return}w.forEach(function(j){t||r.call(j.addedNodes,function(L){L instanceof Element&&qt(L,function(Pe){Ne(Pe).connect()})}),r.call(j.removedNodes,function(L){L instanceof Element&&(Mn(p,L)&&Wt(p),t||qt(L,function(Pe){Ne(Pe).disconnect()}))})})}))}if(ii.prototype={isConnected:function(){var u=ct.get(this);return u instanceof Document?u.readyState!=="loading":a(u.host)},connect:function(){var u=oi(this);ht.get(this).observe(u,Zo),Ie.get(this).length>0&&Wt(this),qt(u,function(p){Ne(p).connect()})},disconnect:function(){ht.get(this).disconnect()},update:function(u){var p=this,w=ct.get(p)===document?"Document":"ShadowRoot";if(!Array.isArray(u))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+w+": Iterator getter is not callable.");if(!u.every(ne))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+w+": Failed to convert value to 'CSSStyleSheet'");if(u.some(Ft))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+w+": Can't adopt non-constructed stylesheets");p.sheets=u;var V=Ie.get(p),j=d(u),L=c(V,j);L.forEach(function(Pe){m(re(Pe,p)),lt(Pe,p)}),Ie.set(p,j),p.isConnected()&&j.length>0&&Wt(p)}},window.CSSStyleSheet=Ht,ti(Document),"ShadowRoot"in window){ti(ShadowRoot);var ni=Element.prototype,Vn=ni.attachShadow;ni.attachShadow=function(p){var w=Vn.call(this,p);return p.mode==="closed"&&o.set(this,w),w}}var ut=Ne(document);ut.isConnected()?ut.connect():document.addEventListener("DOMContentLoaded",ut.connect.bind(ut))})();/** + ${r.responseText}`)),r.onload=()=>{const l=r.getResponseHeader("content-type");l&&l.indexOf("application/json")!==-1?o(JSON.parse(r.responseText)):r.onerror()},r.send()})}addConnectionIndicator(){O.create(),k.addEventListener("online",()=>{if(!this.isFlowClientLoaded()){k.Vaadin.connectionState.state=R.RECONNECTING;const e=new XMLHttpRequest;e.open("HEAD","sw.js"),e.onload=()=>{k.Vaadin.connectionState.state=R.CONNECTED},e.onerror=()=>{k.Vaadin.connectionState.state=R.CONNECTION_LOST},setTimeout(()=>e.send(),50)}}),k.addEventListener("offline",()=>{this.isFlowClientLoaded()||(k.Vaadin.connectionState.state=R.CONNECTION_LOST)})}async offlineStubAction(){const e=document.createElement("iframe"),o="./offline-stub.html";e.setAttribute("src",o),e.setAttribute("style","width: 100%; height: 100%; border: 0"),this.response=void 0;let i;const n=()=>{i!==void 0&&(k.Vaadin.connectionState.removeStateChangeListener(i),i=void 0)};return e.onBeforeEnter=(r,s,l)=>{i=()=>{k.Vaadin.connectionState.online&&(n(),l.render(r,!1))},k.Vaadin.connectionState.addStateChangeListener(i)},e.onBeforeLeave=(r,s,l)=>{n()},e}isFlowClientLoaded(){return this.response!==void 0}}const{serverSideRoutes:us}=new hs({imports:()=>f(()=>import("./generated-flow-imports-8d18f8ad.js"),[],import.meta.url)}),ps=[...us],ms=new ve(document.querySelector("#outlet"));ms.setRoutes(ps);(function(){if(typeof document>"u"||"adoptedStyleSheets"in document)return;var t="ShadyCSS"in window&&!ShadyCSS.nativeShadow,e=document.implementation.createHTMLDocument(""),o=new WeakMap,i=typeof DOMException=="object"?Error:DOMException,n=Object.defineProperty,r=Array.prototype.forEach,s=/@import.+?;?$/gm;function l(u){var p=u.replace(s,"");return p!==u&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),p.trim()}function a(u){return"isConnected"in u?u.isConnected:document.contains(u)}function d(u){return u.filter(function(p,E){return u.indexOf(p)===E})}function c(u,p){return u.filter(function(E){return p.indexOf(E)===-1})}function m(u){u.parentNode.removeChild(u)}function h(u){return u.shadowRoot||o.get(u)}var y=["addRule","deleteRule","insertRule","removeRule"],he=CSSStyleSheet,ue=he.prototype;ue.replace=function(){return Promise.reject(new i("Can't call replace on non-constructed CSSStyleSheets."))},ue.replaceSync=function(){throw new i("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};function ne(u){return typeof u=="object"?Ne.isPrototypeOf(u)||ue.isPrototypeOf(u):!1}function Ft(u){return typeof u=="object"?ue.isPrototypeOf(u):!1}var H=new WeakMap,ee=new WeakMap,Ae=new WeakMap,Re=new WeakMap;function Bt(u,p){var E=document.createElement("style");return Ae.get(u).set(p,E),ee.get(u).push(p),E}function re(u,p){return Ae.get(u).get(p)}function lt(u,p){Ae.get(u).delete(p),ee.set(u,ee.get(u).filter(function(E){return E!==p}))}function Qo(u,p){requestAnimationFrame(function(){p.textContent=H.get(u).textContent,Re.get(u).forEach(function(E){return p.sheet[E.method].apply(p.sheet,E.args)})})}function dt(u){if(!H.has(u))throw new TypeError("Illegal invocation")}function Ht(){var u=this,p=document.createElement("style");e.body.appendChild(p),H.set(u,p),ee.set(u,[]),Ae.set(u,new WeakMap),Re.set(u,[])}var Ne=Ht.prototype;Ne.replace=function(p){try{return this.replaceSync(p),Promise.resolve(this)}catch(E){return Promise.reject(E)}},Ne.replaceSync=function(p){if(dt(this),typeof p=="string"){var E=this;H.get(E).textContent=l(p),Re.set(E,[]),ee.get(E).forEach(function(V){V.isConnected()&&Qo(E,re(E,V))})}},n(Ne,"cssRules",{configurable:!0,enumerable:!0,get:function(){return dt(this),H.get(this).sheet.cssRules}}),n(Ne,"media",{configurable:!0,enumerable:!0,get:function(){return dt(this),H.get(this).sheet.media}}),y.forEach(function(u){Ne[u]=function(){var p=this;dt(p);var E=arguments;Re.get(p).push({method:u,args:E}),ee.get(p).forEach(function(j){if(j.isConnected()){var L=re(p,j).sheet;L[u].apply(L,E)}});var V=H.get(p).sheet;return V[u].apply(V,E)}}),n(Ht,Symbol.hasInstance,{configurable:!0,value:ne});var Zo={childList:!0,subtree:!0},ei=new WeakMap;function Ie(u){var p=ei.get(u);return p||(p=new ii(u),ei.set(u,p)),p}function ti(u){n(u.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return Ie(this).sheets},set:function(p){Ie(this).update(p)}})}function Wt(u,p){for(var E=document.createNodeIterator(u,NodeFilter.SHOW_ELEMENT,function(j){return h(j)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},null,!1),V=void 0;V=E.nextNode();)p(h(V))}var ct=new WeakMap,Pe=new WeakMap,ht=new WeakMap;function Mn(u,p){return p instanceof HTMLStyleElement&&Pe.get(u).some(function(E){return re(E,u)})}function oi(u){var p=ct.get(u);return p instanceof Document?p.body:p}function qt(u){var p=document.createDocumentFragment(),E=Pe.get(u),V=ht.get(u),j=oi(u);V.disconnect(),E.forEach(function(L){p.appendChild(re(L,u)||Bt(L,u))}),j.insertBefore(p,null),V.observe(j,Zo),E.forEach(function(L){Qo(L,re(L,u))})}function ii(u){var p=this;p.sheets=[],ct.set(p,u),Pe.set(p,[]),ht.set(p,new MutationObserver(function(E,V){if(!document){V.disconnect();return}E.forEach(function(j){t||r.call(j.addedNodes,function(L){L instanceof Element&&Wt(L,function(Oe){Ie(Oe).connect()})}),r.call(j.removedNodes,function(L){L instanceof Element&&(Mn(p,L)&&qt(p),t||Wt(L,function(Oe){Ie(Oe).disconnect()}))})})}))}if(ii.prototype={isConnected:function(){var u=ct.get(this);return u instanceof Document?u.readyState!=="loading":a(u.host)},connect:function(){var u=oi(this);ht.get(this).observe(u,Zo),Pe.get(this).length>0&&qt(this),Wt(u,function(p){Ie(p).connect()})},disconnect:function(){ht.get(this).disconnect()},update:function(u){var p=this,E=ct.get(p)===document?"Document":"ShadowRoot";if(!Array.isArray(u))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+E+": Iterator getter is not callable.");if(!u.every(ne))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+E+": Failed to convert value to 'CSSStyleSheet'");if(u.some(Ft))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+E+": Can't adopt non-constructed stylesheets");p.sheets=u;var V=Pe.get(p),j=d(u),L=c(V,j);L.forEach(function(Oe){m(re(Oe,p)),lt(Oe,p)}),Pe.set(p,j),p.isConnected()&&j.length>0&&qt(p)}},window.CSSStyleSheet=Ht,ti(Document),"ShadowRoot"in window){ti(ShadowRoot);var ni=Element.prototype,Vn=ni.attachShadow;ni.attachShadow=function(p){var E=Vn.call(this,p);return p.mode==="closed"&&o.set(this,E),E}}var ut=Ie(document);ut.isConnected()?ut.connect():document.addEventListener("DOMContentLoaded",ut.connect.bind(ut))})();/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Sn=Symbol.for(""),vs=t=>{if((t==null?void 0:t.r)===Sn)return t==null?void 0:t._$litStatic$},gs=t=>{if(t._$litStatic$!==void 0)return t._$litStatic$;throw new Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but - take care to ensure page security.`)},vt=(t,...e)=>({_$litStatic$:e.reduce((o,i,n)=>o+gs(i)+t[n+1],t[0]),r:Sn}),Ii=new Map,fs=t=>(e,...o)=>{const i=o.length;let n,r;const s=[],l=[];let a=0,d=!1,c;for(;a{if(n=xs(n),n in Pi)return;Pi[n]=!0;const r=n.endsWith(".css"),s=r?'[rel="stylesheet"]':"";if(o)for(let a=i.length-1;a>=0;a--){const d=i[a];if(d.href===n&&(!r||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${s}`))return;const l=document.createElement("link");if(l.rel=r?"stylesheet":bs,r||(l.as="script",l.crossOrigin=""),l.href=n,document.head.appendChild(l),r)return new Promise((a,d)=>{l.addEventListener("load",a),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t()).catch(n=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=n,window.dispatchEvent(r),!r.defaultPrevented)throw n})};function v(t,e,o,i){var n=arguments.length,r=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,o,r):s(e,o))||r);return n>3&&r&&Object.defineProperty(e,o,r),r}function _s(t){var e;const o=[];for(;t&&t.parentNode;){const i=$o(t);if(i.nodeId!==-1){if((e=i.element)!=null&&e.tagName.startsWith("FLOW-CONTAINER-"))break;o.push(i)}t=t.parentElement?t.parentElement:t.parentNode.host}return o.reverse()}function $o(t){const e=window.Vaadin;if(e&&e.Flow){const{clients:o}=e.Flow,i=Object.keys(o);for(const n of i){const r=o[n];if(r.getNodeId){const s=r.getNodeId(t);if(s>=0)return{nodeId:s,uiId:r.getUIId(),element:t}}}}return{nodeId:-1,uiId:-1,element:void 0}}function ws(t,e){if(t.contains(e))return!0;let o=e;const i=e.ownerDocument;for(;o&&o!==i&&o!==t;)o=o.parentNode||(o instanceof ShadowRoot?o.host:null);return o===t}const Es=(t,e)=>{const o=t[e];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((i,n)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})};var N;(function(t){t.text="text",t.checkbox="checkbox",t.range="range",t.color="color"})(N||(N={}));const Z={lumoSize:["--lumo-size-xs","--lumo-size-s","--lumo-size-m","--lumo-size-l","--lumo-size-xl"],lumoSpace:["--lumo-space-xs","--lumo-space-s","--lumo-space-m","--lumo-space-l","--lumo-space-xl"],lumoBorderRadius:["0","--lumo-border-radius-m","--lumo-border-radius-l"],lumoFontSize:["--lumo-font-size-xxs","--lumo-font-size-xs","--lumo-font-size-s","--lumo-font-size-m","--lumo-font-size-l","--lumo-font-size-xl","--lumo-font-size-xxl","--lumo-font-size-xxxl"],lumoTextColor:["--lumo-header-text-color","--lumo-body-text-color","--lumo-secondary-text-color","--lumo-tertiary-text-color","--lumo-disabled-text-color","--lumo-primary-text-color","--lumo-error-text-color","--lumo-success-text-color"],basicBorderSize:["0px","1px","2px","3px"]},Ss=Object.freeze(Object.defineProperty({__proto__:null,presets:Z},Symbol.toStringTag,{value:"Module"})),ae={textColor:{propertyName:"color",displayName:"Text color",editorType:N.color,presets:Z.lumoTextColor},fontSize:{propertyName:"font-size",displayName:"Font size",editorType:N.range,presets:Z.lumoFontSize,icon:"font"},fontWeight:{propertyName:"font-weight",displayName:"Bold",editorType:N.checkbox,checkedValue:"bold"},fontStyle:{propertyName:"font-style",displayName:"Italic",editorType:N.checkbox,checkedValue:"italic"}},X={backgroundColor:{propertyName:"background-color",displayName:"Background color",editorType:N.color},borderColor:{propertyName:"border-color",displayName:"Border color",editorType:N.color},borderWidth:{propertyName:"border-width",displayName:"Border width",editorType:N.range,presets:Z.basicBorderSize,icon:"square"},borderRadius:{propertyName:"border-radius",displayName:"Border radius",editorType:N.range,presets:Z.lumoBorderRadius,icon:"square"},padding:{propertyName:"padding",displayName:"Padding",editorType:N.range,presets:Z.lumoSpace,icon:"square"},gap:{propertyName:"gap",displayName:"Spacing",editorType:N.range,presets:Z.lumoSpace,icon:"square"}},Cs={height:{propertyName:"height",displayName:"Size",editorType:N.range,presets:Z.lumoSize,icon:"square"},paddingInline:{propertyName:"padding-inline",displayName:"Padding",editorType:N.range,presets:Z.lumoSpace,icon:"square"}},Ao={iconColor:{propertyName:"color",displayName:"Icon color",editorType:N.color,presets:Z.lumoTextColor},iconSize:{propertyName:"font-size",displayName:"Icon size",editorType:N.range,presets:Z.lumoFontSize,icon:"font"}},ks=[X.backgroundColor,X.borderColor,X.borderWidth,X.borderRadius,X.padding],Ts=[ae.textColor,ae.fontSize,ae.fontWeight,ae.fontStyle],$s=[Ao.iconColor,Ao.iconSize],As=Object.freeze(Object.defineProperty({__proto__:null,fieldProperties:Cs,iconProperties:Ao,shapeProperties:X,standardIconProperties:$s,standardShapeProperties:ks,standardTextProperties:Ts,textProperties:ae},Symbol.toStringTag,{value:"Module"}));function Cn(t){const e=t.charAt(0).toUpperCase()+t.slice(1);return{tagName:t,displayName:e,elements:[{selector:t,displayName:"Element",properties:[X.backgroundColor,X.borderColor,X.borderWidth,X.borderRadius,X.padding,ae.textColor,ae.fontSize,ae.fontWeight,ae.fontStyle]}]}}const Rs=Object.freeze(Object.defineProperty({__proto__:null,createGenericMetadata:Cn},Symbol.toStringTag,{value:"Module"})),Ns=t=>Es(Object.assign({"./components/defaults.ts":()=>g(()=>Promise.resolve().then(()=>As),void 0),"./components/generic.ts":()=>g(()=>Promise.resolve().then(()=>Rs),void 0),"./components/presets.ts":()=>g(()=>Promise.resolve().then(()=>Ss),void 0),"./components/vaadin-accordion-heading.ts":()=>g(()=>f(()=>import("./vaadin-accordion-heading-c0acdd6d-b469b1e6.js"),[],import.meta.url),[]),"./components/vaadin-accordion-panel.ts":()=>g(()=>f(()=>import("./vaadin-accordion-panel-616e55d6-c928438e.js"),[],import.meta.url),[]),"./components/vaadin-accordion.ts":()=>g(()=>f(()=>import("./vaadin-accordion-eed3b794-8d831d5e.js"),[],import.meta.url),[]),"./components/vaadin-app-layout.ts":()=>g(()=>f(()=>import("./vaadin-app-layout-e56de2e9-8ac1327c.js"),[],import.meta.url),[]),"./components/vaadin-avatar.ts":()=>g(()=>f(()=>import("./vaadin-avatar-7599297d-220b12fc.js"),[],import.meta.url),[]),"./components/vaadin-big-decimal-field.ts":()=>g(()=>f(()=>import("./vaadin-big-decimal-field-e51def24-0aa50e8d.js"),["./vaadin-big-decimal-field-e51def24-0aa50e8d.js","./vaadin-text-field-0b3db014-4c055feb.js","./vaadin-button-2511ad84-951378ab.js"],import.meta.url),["assets/vaadin-big-decimal-field-e51def24.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-board-row.ts":()=>g(()=>f(()=>import("./vaadin-board-row-c70d0c55-f8cb7868.js"),[],import.meta.url),[]),"./components/vaadin-board.ts":()=>g(()=>f(()=>import("./vaadin-board-828ebdea-3c33a685.js"),[],import.meta.url),[]),"./components/vaadin-button.ts":()=>g(()=>f(()=>import("./vaadin-button-2511ad84-951378ab.js"),[],import.meta.url),[]),"./components/vaadin-chart.ts":()=>g(()=>f(()=>import("./vaadin-chart-5192dc15-3e8d715b.js"),[],import.meta.url),[]),"./components/vaadin-checkbox-group.ts":()=>g(()=>f(()=>import("./vaadin-checkbox-group-a7c65bf2-92e25469.js"),["./vaadin-checkbox-group-a7c65bf2-92e25469.js","./vaadin-text-field-0b3db014-4c055feb.js","./vaadin-checkbox-4e68df64-c0a69b81.js"],import.meta.url),["assets/vaadin-checkbox-group-a7c65bf2.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-checkbox-4e68df64.js"]),"./components/vaadin-checkbox.ts":()=>g(()=>f(()=>import("./vaadin-checkbox-4e68df64-c0a69b81.js"),[],import.meta.url),[]),"./components/vaadin-combo-box.ts":()=>g(()=>f(()=>import("./vaadin-combo-box-96451ddd-6f8f9b93.js"),["./vaadin-combo-box-96451ddd-6f8f9b93.js","./vaadin-text-field-0b3db014-4c055feb.js"],import.meta.url),["assets/vaadin-combo-box-96451ddd.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-confirm-dialog.ts":()=>g(()=>f(()=>import("./vaadin-confirm-dialog-4d718829-1ec91ccc.js"),["./vaadin-confirm-dialog-4d718829-1ec91ccc.js","./vaadin-button-2511ad84-951378ab.js"],import.meta.url),["assets/vaadin-confirm-dialog-4d718829.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-cookie-consent.ts":()=>g(()=>f(()=>import("./vaadin-cookie-consent-46c09f8b-8a8b1128.js"),[],import.meta.url),[]),"./components/vaadin-crud.ts":()=>g(()=>f(()=>import("./vaadin-crud-8d161a22-43752c43.js"),[],import.meta.url),[]),"./components/vaadin-custom-field.ts":()=>g(()=>f(()=>import("./vaadin-custom-field-42c85b9e-3b6f1fa3.js"),["./vaadin-custom-field-42c85b9e-3b6f1fa3.js","./vaadin-text-field-0b3db014-4c055feb.js"],import.meta.url),["assets/vaadin-custom-field-42c85b9e.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-date-picker.ts":()=>g(()=>f(()=>import("./vaadin-date-picker-f2001167-3c3b66e6.js"),["./vaadin-date-picker-f2001167-3c3b66e6.js","./vaadin-text-field-0b3db014-4c055feb.js"],import.meta.url),["assets/vaadin-date-picker-f2001167.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-date-time-picker.ts":()=>g(()=>f(()=>import("./vaadin-date-time-picker-c8c047a7-0dcd3ee4.js"),["./vaadin-date-time-picker-c8c047a7-0dcd3ee4.js","./vaadin-text-field-0b3db014-4c055feb.js"],import.meta.url),["assets/vaadin-date-time-picker-c8c047a7.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-details-summary.ts":()=>g(()=>f(()=>import("./vaadin-details-summary-351a1448-1b4d8829.js"),[],import.meta.url),[]),"./components/vaadin-details.ts":()=>g(()=>f(()=>import("./vaadin-details-bf336660-b6581d5d.js"),[],import.meta.url),[]),"./components/vaadin-dialog.ts":()=>g(()=>f(()=>import("./vaadin-dialog-53253a08-afd48915.js"),[],import.meta.url),[]),"./components/vaadin-email-field.ts":()=>g(()=>f(()=>import("./vaadin-email-field-d7a35f04-db8e3218.js"),["./vaadin-email-field-d7a35f04-db8e3218.js","./vaadin-text-field-0b3db014-4c055feb.js","./vaadin-button-2511ad84-951378ab.js"],import.meta.url),["assets/vaadin-email-field-d7a35f04.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-form-layout.ts":()=>g(()=>f(()=>import("./vaadin-form-layout-47744b1d-5a14c9ce.js"),[],import.meta.url),[]),"./components/vaadin-grid-pro.ts":()=>g(()=>f(()=>import("./vaadin-grid-pro-ff415555-0979dc47.js"),["./vaadin-grid-pro-ff415555-0979dc47.js","./vaadin-checkbox-4e68df64-c0a69b81.js","./vaadin-grid-0a4791c2-324d45cb.js","./vaadin-text-field-0b3db014-4c055feb.js"],import.meta.url),["assets/vaadin-grid-pro-ff415555.js","assets/vaadin-checkbox-4e68df64.js","assets/vaadin-grid-0a4791c2.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-grid.ts":()=>g(()=>f(()=>import("./vaadin-grid-0a4791c2-324d45cb.js"),["./vaadin-grid-0a4791c2-324d45cb.js","./vaadin-checkbox-4e68df64-c0a69b81.js"],import.meta.url),["assets/vaadin-grid-0a4791c2.js","assets/vaadin-checkbox-4e68df64.js"]),"./components/vaadin-horizontal-layout.ts":()=>g(()=>f(()=>import("./vaadin-horizontal-layout-3193943f-9f2e0f51.js"),[],import.meta.url),[]),"./components/vaadin-icon.ts":()=>g(()=>f(()=>import("./vaadin-icon-601f36ed-14508dda.js"),[],import.meta.url),[]),"./components/vaadin-integer-field.ts":()=>g(()=>f(()=>import("./vaadin-integer-field-85078932-87202f83.js"),["./vaadin-integer-field-85078932-87202f83.js","./vaadin-text-field-0b3db014-4c055feb.js","./vaadin-button-2511ad84-951378ab.js"],import.meta.url),["assets/vaadin-integer-field-85078932.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-list-box.ts":()=>g(()=>f(()=>import("./vaadin-list-box-d7a8433b-29f397a3.js"),[],import.meta.url),[]),"./components/vaadin-login-form.ts":()=>g(()=>f(()=>import("./vaadin-login-form-638996c6-195d4f5e.js"),["./vaadin-login-form-638996c6-195d4f5e.js","./vaadin-text-field-0b3db014-4c055feb.js","./vaadin-button-2511ad84-951378ab.js"],import.meta.url),["assets/vaadin-login-form-638996c6.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-login-overlay.ts":()=>g(()=>f(()=>import("./vaadin-login-overlay-f8a5db8a-3b1784eb.js"),["./vaadin-login-overlay-f8a5db8a-3b1784eb.js","./vaadin-text-field-0b3db014-4c055feb.js","./vaadin-button-2511ad84-951378ab.js"],import.meta.url),["assets/vaadin-login-overlay-f8a5db8a.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-map.ts":()=>g(()=>f(()=>import("./vaadin-map-d40a0116-d24bbf8f.js"),[],import.meta.url),[]),"./components/vaadin-menu-bar.ts":()=>g(()=>f(()=>import("./vaadin-menu-bar-3f5ab096-168c1213.js"),[],import.meta.url),[]),"./components/vaadin-message-input.ts":()=>g(()=>f(()=>import("./vaadin-message-input-996ac37c-d64352ed.js"),["./vaadin-message-input-996ac37c-d64352ed.js","./vaadin-text-field-0b3db014-4c055feb.js"],import.meta.url),["assets/vaadin-message-input-996ac37c.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-message-list.ts":()=>g(()=>f(()=>import("./vaadin-message-list-70a435ba-5b7eb1eb.js"),[],import.meta.url),[]),"./components/vaadin-multi-select-combo-box.ts":()=>g(()=>f(()=>import("./vaadin-multi-select-combo-box-a3373557-bb27537b.js"),["./vaadin-multi-select-combo-box-a3373557-bb27537b.js","./vaadin-text-field-0b3db014-4c055feb.js"],import.meta.url),["assets/vaadin-multi-select-combo-box-a3373557.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-notification.ts":()=>g(()=>f(()=>import("./vaadin-notification-bd6eb776-8067b604.js"),[],import.meta.url),[]),"./components/vaadin-number-field.ts":()=>g(()=>f(()=>import("./vaadin-number-field-cb3ee8b2-7fcfd180.js"),["./vaadin-number-field-cb3ee8b2-7fcfd180.js","./vaadin-text-field-0b3db014-4c055feb.js","./vaadin-button-2511ad84-951378ab.js"],import.meta.url),["assets/vaadin-number-field-cb3ee8b2.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-password-field.ts":()=>g(()=>f(()=>import("./vaadin-password-field-d289cb18-a7b6417b.js"),["./vaadin-password-field-d289cb18-a7b6417b.js","./vaadin-text-field-0b3db014-4c055feb.js","./vaadin-button-2511ad84-951378ab.js"],import.meta.url),["assets/vaadin-password-field-d289cb18.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-progress-bar.ts":()=>g(()=>f(()=>import("./vaadin-progress-bar-309ecf1f-a7fc8eca.js"),[],import.meta.url),[]),"./components/vaadin-radio-group.ts":()=>g(()=>f(()=>import("./vaadin-radio-group-88b5afd8-c26ce527.js"),["./vaadin-radio-group-88b5afd8-c26ce527.js","./vaadin-text-field-0b3db014-4c055feb.js"],import.meta.url),["assets/vaadin-radio-group-88b5afd8.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-rich-text-editor.ts":()=>g(()=>f(()=>import("./vaadin-rich-text-editor-8cd892f2-e2b2a09d.js"),[],import.meta.url),[]),"./components/vaadin-scroller.ts":()=>g(()=>f(()=>import("./vaadin-scroller-35e68818-aaae1dcf.js"),[],import.meta.url),[]),"./components/vaadin-select.ts":()=>g(()=>f(()=>import("./vaadin-select-df6e9947-18f2c49a.js"),["./vaadin-select-df6e9947-18f2c49a.js","./vaadin-text-field-0b3db014-4c055feb.js"],import.meta.url),["assets/vaadin-select-df6e9947.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-side-nav-item.ts":()=>g(()=>f(()=>import("./vaadin-side-nav-item-34918f92-cf7e324f.js"),[],import.meta.url),[]),"./components/vaadin-side-nav.ts":()=>g(()=>f(()=>import("./vaadin-side-nav-ba80d91d-0a417162.js"),[],import.meta.url),[]),"./components/vaadin-split-layout.ts":()=>g(()=>f(()=>import("./vaadin-split-layout-80c92131-9eea0b0a.js"),[],import.meta.url),[]),"./components/vaadin-spreadsheet.ts":()=>g(()=>f(()=>import("./vaadin-spreadsheet-59d8c5ef-bbf2e0c9.js"),[],import.meta.url),[]),"./components/vaadin-tab.ts":()=>g(()=>f(()=>import("./vaadin-tab-aaf32809-88d15db0.js"),[],import.meta.url),[]),"./components/vaadin-tabs.ts":()=>g(()=>f(()=>import("./vaadin-tabs-d9a5e24e-71e106ed.js"),[],import.meta.url),[]),"./components/vaadin-tabsheet.ts":()=>g(()=>f(()=>import("./vaadin-tabsheet-dd99ed9a-c209671e.js"),[],import.meta.url),[]),"./components/vaadin-text-area.ts":()=>g(()=>f(()=>import("./vaadin-text-area-83627ebc-823c45b8.js"),["./vaadin-text-area-83627ebc-823c45b8.js","./vaadin-text-field-0b3db014-4c055feb.js","./vaadin-button-2511ad84-951378ab.js"],import.meta.url),["assets/vaadin-text-area-83627ebc.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-text-field.ts":()=>g(()=>f(()=>import("./vaadin-text-field-0b3db014-4c055feb.js"),[],import.meta.url),[]),"./components/vaadin-time-picker.ts":()=>g(()=>f(()=>import("./vaadin-time-picker-715ec415-1872f06d.js"),["./vaadin-time-picker-715ec415-1872f06d.js","./vaadin-text-field-0b3db014-4c055feb.js"],import.meta.url),["assets/vaadin-time-picker-715ec415.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-upload.ts":()=>g(()=>f(()=>import("./vaadin-upload-d3c162ed-7a1c244f.js"),["./vaadin-upload-d3c162ed-7a1c244f.js","./vaadin-button-2511ad84-951378ab.js"],import.meta.url),["assets/vaadin-upload-d3c162ed.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-vertical-layout.ts":()=>g(()=>f(()=>import("./vaadin-vertical-layout-ad4174c4-f4fee1e8.js"),[],import.meta.url),[]),"./components/vaadin-virtual-list.ts":()=>g(()=>f(()=>import("./vaadin-virtual-list-96896203-1c7b54ed.js"),[],import.meta.url),[])}),`./components/${t}.ts`);class Is{constructor(e=Ns){this.loader=e,this.metadata={}}async getMetadata(e){var o;const i=(o=e.element)==null?void 0:o.localName;if(!i)return null;if(!i.startsWith("vaadin-"))return Cn(i);let n=this.metadata[i];if(n)return n;try{n=(await this.loader(i)).default,this.metadata[i]=n}catch{console.warn(`Failed to load metadata for component: ${i}`)}return n||null}}const Ps=new Is,Et={crosshair:Oe` + take care to ensure page security.`)},vt=(t,...e)=>({_$litStatic$:e.reduce((o,i,n)=>o+gs(i)+t[n+1],t[0]),r:Sn}),Ii=new Map,fs=t=>(e,...o)=>{const i=o.length;let n,r;const s=[],l=[];let a=0,d=!1,c;for(;a{if(n=xs(n),n in Pi)return;Pi[n]=!0;const r=n.endsWith(".css"),s=r?'[rel="stylesheet"]':"";if(o)for(let a=i.length-1;a>=0;a--){const d=i[a];if(d.href===n&&(!r||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${s}`))return;const l=document.createElement("link");if(l.rel=r?"stylesheet":bs,r||(l.as="script",l.crossOrigin=""),l.href=n,document.head.appendChild(l),r)return new Promise((a,d)=>{l.addEventListener("load",a),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t()).catch(n=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=n,window.dispatchEvent(r),!r.defaultPrevented)throw n})};function v(t,e,o,i){var n=arguments.length,r=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,o,r):s(e,o))||r);return n>3&&r&&Object.defineProperty(e,o,r),r}function _s(t){var e;const o=[];for(;t&&t.parentNode;){const i=$o(t);if(i.nodeId!==-1){if((e=i.element)!=null&&e.tagName.startsWith("FLOW-CONTAINER-"))break;o.push(i)}t=t.parentElement?t.parentElement:t.parentNode.host}return o.reverse()}function $o(t){const e=window.Vaadin;if(e&&e.Flow){const{clients:o}=e.Flow,i=Object.keys(o);for(const n of i){const r=o[n];if(r.getNodeId){const s=r.getNodeId(t);if(s>=0)return{nodeId:s,uiId:r.getUIId(),element:t}}}}return{nodeId:-1,uiId:-1,element:void 0}}function ws(t,e){if(t.contains(e))return!0;let o=e;const i=e.ownerDocument;for(;o&&o!==i&&o!==t;)o=o.parentNode||(o instanceof ShadowRoot?o.host:null);return o===t}const Es=(t,e)=>{const o=t[e];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((i,n)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})};var N;(function(t){t.text="text",t.checkbox="checkbox",t.range="range",t.color="color"})(N||(N={}));const Z={lumoSize:["--lumo-size-xs","--lumo-size-s","--lumo-size-m","--lumo-size-l","--lumo-size-xl"],lumoSpace:["--lumo-space-xs","--lumo-space-s","--lumo-space-m","--lumo-space-l","--lumo-space-xl"],lumoBorderRadius:["0","--lumo-border-radius-m","--lumo-border-radius-l"],lumoFontSize:["--lumo-font-size-xxs","--lumo-font-size-xs","--lumo-font-size-s","--lumo-font-size-m","--lumo-font-size-l","--lumo-font-size-xl","--lumo-font-size-xxl","--lumo-font-size-xxxl"],lumoTextColor:["--lumo-header-text-color","--lumo-body-text-color","--lumo-secondary-text-color","--lumo-tertiary-text-color","--lumo-disabled-text-color","--lumo-primary-text-color","--lumo-error-text-color","--lumo-success-text-color"],basicBorderSize:["0px","1px","2px","3px"]},Ss=Object.freeze(Object.defineProperty({__proto__:null,presets:Z},Symbol.toStringTag,{value:"Module"})),le={textColor:{propertyName:"color",displayName:"Text color",editorType:N.color,presets:Z.lumoTextColor},fontSize:{propertyName:"font-size",displayName:"Font size",editorType:N.range,presets:Z.lumoFontSize,icon:"font"},fontWeight:{propertyName:"font-weight",displayName:"Bold",editorType:N.checkbox,checkedValue:"bold"},fontStyle:{propertyName:"font-style",displayName:"Italic",editorType:N.checkbox,checkedValue:"italic"}},X={backgroundColor:{propertyName:"background-color",displayName:"Background color",editorType:N.color},borderColor:{propertyName:"border-color",displayName:"Border color",editorType:N.color},borderWidth:{propertyName:"border-width",displayName:"Border width",editorType:N.range,presets:Z.basicBorderSize,icon:"square"},borderRadius:{propertyName:"border-radius",displayName:"Border radius",editorType:N.range,presets:Z.lumoBorderRadius,icon:"square"},padding:{propertyName:"padding",displayName:"Padding",editorType:N.range,presets:Z.lumoSpace,icon:"square"},gap:{propertyName:"gap",displayName:"Spacing",editorType:N.range,presets:Z.lumoSpace,icon:"square"}},Cs={height:{propertyName:"height",displayName:"Size",editorType:N.range,presets:Z.lumoSize,icon:"square"},paddingInline:{propertyName:"padding-inline",displayName:"Padding",editorType:N.range,presets:Z.lumoSpace,icon:"square"}},Ao={iconColor:{propertyName:"color",displayName:"Icon color",editorType:N.color,presets:Z.lumoTextColor},iconSize:{propertyName:"font-size",displayName:"Icon size",editorType:N.range,presets:Z.lumoFontSize,icon:"font"}},ks=[X.backgroundColor,X.borderColor,X.borderWidth,X.borderRadius,X.padding],Ts=[le.textColor,le.fontSize,le.fontWeight,le.fontStyle],$s=[Ao.iconColor,Ao.iconSize],As=Object.freeze(Object.defineProperty({__proto__:null,fieldProperties:Cs,iconProperties:Ao,shapeProperties:X,standardIconProperties:$s,standardShapeProperties:ks,standardTextProperties:Ts,textProperties:le},Symbol.toStringTag,{value:"Module"}));function Cn(t){const e=t.charAt(0).toUpperCase()+t.slice(1);return{tagName:t,displayName:e,elements:[{selector:t,displayName:"Element",properties:[X.backgroundColor,X.borderColor,X.borderWidth,X.borderRadius,X.padding,le.textColor,le.fontSize,le.fontWeight,le.fontStyle]}]}}const Rs=Object.freeze(Object.defineProperty({__proto__:null,createGenericMetadata:Cn},Symbol.toStringTag,{value:"Module"})),Ns=t=>Es(Object.assign({"./components/defaults.ts":()=>g(()=>Promise.resolve().then(()=>As),void 0),"./components/generic.ts":()=>g(()=>Promise.resolve().then(()=>Rs),void 0),"./components/presets.ts":()=>g(()=>Promise.resolve().then(()=>Ss),void 0),"./components/vaadin-accordion-heading.ts":()=>g(()=>f(()=>import("./vaadin-accordion-heading-c0acdd6d-23020673.js"),[],import.meta.url),[]),"./components/vaadin-accordion-panel.ts":()=>g(()=>f(()=>import("./vaadin-accordion-panel-616e55d6-833cced1.js"),[],import.meta.url),[]),"./components/vaadin-accordion.ts":()=>g(()=>f(()=>import("./vaadin-accordion-eed3b794-60e3495b.js"),[],import.meta.url),[]),"./components/vaadin-app-layout.ts":()=>g(()=>f(()=>import("./vaadin-app-layout-e56de2e9-2bad70c4.js"),[],import.meta.url),[]),"./components/vaadin-avatar.ts":()=>g(()=>f(()=>import("./vaadin-avatar-7599297d-771e5ece.js"),[],import.meta.url),[]),"./components/vaadin-big-decimal-field.ts":()=>g(()=>f(()=>import("./vaadin-big-decimal-field-e51def24-6e51626d.js"),["./vaadin-big-decimal-field-e51def24-6e51626d.js","./vaadin-text-field-0b3db014-5c0ab71a.js","./vaadin-button-2511ad84-17c7ae7e.js"],import.meta.url),["assets/vaadin-big-decimal-field-e51def24.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-board-row.ts":()=>g(()=>f(()=>import("./vaadin-board-row-c70d0c55-baa88c98.js"),[],import.meta.url),[]),"./components/vaadin-board.ts":()=>g(()=>f(()=>import("./vaadin-board-828ebdea-914746ec.js"),[],import.meta.url),[]),"./components/vaadin-button.ts":()=>g(()=>f(()=>import("./vaadin-button-2511ad84-17c7ae7e.js"),[],import.meta.url),[]),"./components/vaadin-chart.ts":()=>g(()=>f(()=>import("./vaadin-chart-5192dc15-c29f0f3d.js"),[],import.meta.url),[]),"./components/vaadin-checkbox-group.ts":()=>g(()=>f(()=>import("./vaadin-checkbox-group-a7c65bf2-1b4e1cf0.js"),["./vaadin-checkbox-group-a7c65bf2-1b4e1cf0.js","./vaadin-text-field-0b3db014-5c0ab71a.js","./vaadin-checkbox-4e68df64-62dbd047.js"],import.meta.url),["assets/vaadin-checkbox-group-a7c65bf2.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-checkbox-4e68df64.js"]),"./components/vaadin-checkbox.ts":()=>g(()=>f(()=>import("./vaadin-checkbox-4e68df64-62dbd047.js"),[],import.meta.url),[]),"./components/vaadin-combo-box.ts":()=>g(()=>f(()=>import("./vaadin-combo-box-96451ddd-aae5d394.js"),["./vaadin-combo-box-96451ddd-aae5d394.js","./vaadin-text-field-0b3db014-5c0ab71a.js"],import.meta.url),["assets/vaadin-combo-box-96451ddd.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-confirm-dialog.ts":()=>g(()=>f(()=>import("./vaadin-confirm-dialog-4d718829-44e72cfc.js"),["./vaadin-confirm-dialog-4d718829-44e72cfc.js","./vaadin-button-2511ad84-17c7ae7e.js"],import.meta.url),["assets/vaadin-confirm-dialog-4d718829.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-cookie-consent.ts":()=>g(()=>f(()=>import("./vaadin-cookie-consent-46c09f8b-440df461.js"),[],import.meta.url),[]),"./components/vaadin-crud.ts":()=>g(()=>f(()=>import("./vaadin-crud-8d161a22-9c82f3af.js"),[],import.meta.url),[]),"./components/vaadin-custom-field.ts":()=>g(()=>f(()=>import("./vaadin-custom-field-42c85b9e-098ed63f.js"),["./vaadin-custom-field-42c85b9e-098ed63f.js","./vaadin-text-field-0b3db014-5c0ab71a.js"],import.meta.url),["assets/vaadin-custom-field-42c85b9e.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-date-picker.ts":()=>g(()=>f(()=>import("./vaadin-date-picker-f2001167-74adf3dc.js"),["./vaadin-date-picker-f2001167-74adf3dc.js","./vaadin-text-field-0b3db014-5c0ab71a.js"],import.meta.url),["assets/vaadin-date-picker-f2001167.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-date-time-picker.ts":()=>g(()=>f(()=>import("./vaadin-date-time-picker-c8c047a7-44975dfb.js"),["./vaadin-date-time-picker-c8c047a7-44975dfb.js","./vaadin-text-field-0b3db014-5c0ab71a.js"],import.meta.url),["assets/vaadin-date-time-picker-c8c047a7.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-details-summary.ts":()=>g(()=>f(()=>import("./vaadin-details-summary-351a1448-59fb33ec.js"),[],import.meta.url),[]),"./components/vaadin-details.ts":()=>g(()=>f(()=>import("./vaadin-details-bf336660-f0d8694a.js"),[],import.meta.url),[]),"./components/vaadin-dialog.ts":()=>g(()=>f(()=>import("./vaadin-dialog-53253a08-1955fa55.js"),[],import.meta.url),[]),"./components/vaadin-email-field.ts":()=>g(()=>f(()=>import("./vaadin-email-field-d7a35f04-93c1ff39.js"),["./vaadin-email-field-d7a35f04-93c1ff39.js","./vaadin-text-field-0b3db014-5c0ab71a.js","./vaadin-button-2511ad84-17c7ae7e.js"],import.meta.url),["assets/vaadin-email-field-d7a35f04.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-form-layout.ts":()=>g(()=>f(()=>import("./vaadin-form-layout-47744b1d-c2a591c9.js"),[],import.meta.url),[]),"./components/vaadin-grid-pro.ts":()=>g(()=>f(()=>import("./vaadin-grid-pro-ff415555-01030973.js"),["./vaadin-grid-pro-ff415555-01030973.js","./vaadin-checkbox-4e68df64-62dbd047.js","./vaadin-grid-0a4791c2-95d23e28.js","./vaadin-text-field-0b3db014-5c0ab71a.js"],import.meta.url),["assets/vaadin-grid-pro-ff415555.js","assets/vaadin-checkbox-4e68df64.js","assets/vaadin-grid-0a4791c2.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-grid.ts":()=>g(()=>f(()=>import("./vaadin-grid-0a4791c2-95d23e28.js"),["./vaadin-grid-0a4791c2-95d23e28.js","./vaadin-checkbox-4e68df64-62dbd047.js"],import.meta.url),["assets/vaadin-grid-0a4791c2.js","assets/vaadin-checkbox-4e68df64.js"]),"./components/vaadin-horizontal-layout.ts":()=>g(()=>f(()=>import("./vaadin-horizontal-layout-3193943f-ff06dc5f.js"),[],import.meta.url),[]),"./components/vaadin-icon.ts":()=>g(()=>f(()=>import("./vaadin-icon-601f36ed-31be09a5.js"),[],import.meta.url),[]),"./components/vaadin-integer-field.ts":()=>g(()=>f(()=>import("./vaadin-integer-field-85078932-9005eb87.js"),["./vaadin-integer-field-85078932-9005eb87.js","./vaadin-text-field-0b3db014-5c0ab71a.js","./vaadin-button-2511ad84-17c7ae7e.js"],import.meta.url),["assets/vaadin-integer-field-85078932.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-list-box.ts":()=>g(()=>f(()=>import("./vaadin-list-box-d7a8433b-fb206965.js"),[],import.meta.url),[]),"./components/vaadin-login-form.ts":()=>g(()=>f(()=>import("./vaadin-login-form-638996c6-9fbfe4ee.js"),["./vaadin-login-form-638996c6-9fbfe4ee.js","./vaadin-text-field-0b3db014-5c0ab71a.js","./vaadin-button-2511ad84-17c7ae7e.js"],import.meta.url),["assets/vaadin-login-form-638996c6.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-login-overlay.ts":()=>g(()=>f(()=>import("./vaadin-login-overlay-f8a5db8a-0bf2001e.js"),["./vaadin-login-overlay-f8a5db8a-0bf2001e.js","./vaadin-text-field-0b3db014-5c0ab71a.js","./vaadin-button-2511ad84-17c7ae7e.js"],import.meta.url),["assets/vaadin-login-overlay-f8a5db8a.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-map.ts":()=>g(()=>f(()=>import("./vaadin-map-d40a0116-3c17184b.js"),[],import.meta.url),[]),"./components/vaadin-menu-bar.ts":()=>g(()=>f(()=>import("./vaadin-menu-bar-3f5ab096-8f96e1a5.js"),[],import.meta.url),[]),"./components/vaadin-message-input.ts":()=>g(()=>f(()=>import("./vaadin-message-input-996ac37c-a67d8ffc.js"),["./vaadin-message-input-996ac37c-a67d8ffc.js","./vaadin-text-field-0b3db014-5c0ab71a.js"],import.meta.url),["assets/vaadin-message-input-996ac37c.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-message-list.ts":()=>g(()=>f(()=>import("./vaadin-message-list-70a435ba-a5c82da0.js"),[],import.meta.url),[]),"./components/vaadin-multi-select-combo-box.ts":()=>g(()=>f(()=>import("./vaadin-multi-select-combo-box-a3373557-e635a58f.js"),["./vaadin-multi-select-combo-box-a3373557-e635a58f.js","./vaadin-text-field-0b3db014-5c0ab71a.js"],import.meta.url),["assets/vaadin-multi-select-combo-box-a3373557.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-notification.ts":()=>g(()=>f(()=>import("./vaadin-notification-bd6eb776-3ab05126.js"),[],import.meta.url),[]),"./components/vaadin-number-field.ts":()=>g(()=>f(()=>import("./vaadin-number-field-cb3ee8b2-46538cf4.js"),["./vaadin-number-field-cb3ee8b2-46538cf4.js","./vaadin-text-field-0b3db014-5c0ab71a.js","./vaadin-button-2511ad84-17c7ae7e.js"],import.meta.url),["assets/vaadin-number-field-cb3ee8b2.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-password-field.ts":()=>g(()=>f(()=>import("./vaadin-password-field-d289cb18-b639dacc.js"),["./vaadin-password-field-d289cb18-b639dacc.js","./vaadin-text-field-0b3db014-5c0ab71a.js","./vaadin-button-2511ad84-17c7ae7e.js"],import.meta.url),["assets/vaadin-password-field-d289cb18.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-progress-bar.ts":()=>g(()=>f(()=>import("./vaadin-progress-bar-309ecf1f-0bac8814.js"),[],import.meta.url),[]),"./components/vaadin-radio-group.ts":()=>g(()=>f(()=>import("./vaadin-radio-group-88b5afd8-ab17235e.js"),["./vaadin-radio-group-88b5afd8-ab17235e.js","./vaadin-text-field-0b3db014-5c0ab71a.js"],import.meta.url),["assets/vaadin-radio-group-88b5afd8.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-rich-text-editor.ts":()=>g(()=>f(()=>import("./vaadin-rich-text-editor-8cd892f2-1bae690c.js"),[],import.meta.url),[]),"./components/vaadin-scroller.ts":()=>g(()=>f(()=>import("./vaadin-scroller-35e68818-64866bff.js"),[],import.meta.url),[]),"./components/vaadin-select.ts":()=>g(()=>f(()=>import("./vaadin-select-df6e9947-43db0814.js"),["./vaadin-select-df6e9947-43db0814.js","./vaadin-text-field-0b3db014-5c0ab71a.js"],import.meta.url),["assets/vaadin-select-df6e9947.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-side-nav-item.ts":()=>g(()=>f(()=>import("./vaadin-side-nav-item-34918f92-7c83b23a.js"),[],import.meta.url),[]),"./components/vaadin-side-nav.ts":()=>g(()=>f(()=>import("./vaadin-side-nav-ba80d91d-15c01297.js"),[],import.meta.url),[]),"./components/vaadin-split-layout.ts":()=>g(()=>f(()=>import("./vaadin-split-layout-80c92131-4a6033ee.js"),[],import.meta.url),[]),"./components/vaadin-spreadsheet.ts":()=>g(()=>f(()=>import("./vaadin-spreadsheet-59d8c5ef-0e86fd53.js"),[],import.meta.url),[]),"./components/vaadin-tab.ts":()=>g(()=>f(()=>import("./vaadin-tab-aaf32809-1a4a374f.js"),[],import.meta.url),[]),"./components/vaadin-tabs.ts":()=>g(()=>f(()=>import("./vaadin-tabs-d9a5e24e-49604e0b.js"),[],import.meta.url),[]),"./components/vaadin-tabsheet.ts":()=>g(()=>f(()=>import("./vaadin-tabsheet-dd99ed9a-a394af98.js"),[],import.meta.url),[]),"./components/vaadin-text-area.ts":()=>g(()=>f(()=>import("./vaadin-text-area-83627ebc-0282df9d.js"),["./vaadin-text-area-83627ebc-0282df9d.js","./vaadin-text-field-0b3db014-5c0ab71a.js","./vaadin-button-2511ad84-17c7ae7e.js"],import.meta.url),["assets/vaadin-text-area-83627ebc.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-text-field.ts":()=>g(()=>f(()=>import("./vaadin-text-field-0b3db014-5c0ab71a.js"),[],import.meta.url),[]),"./components/vaadin-time-picker.ts":()=>g(()=>f(()=>import("./vaadin-time-picker-715ec415-9ffae628.js"),["./vaadin-time-picker-715ec415-9ffae628.js","./vaadin-text-field-0b3db014-5c0ab71a.js"],import.meta.url),["assets/vaadin-time-picker-715ec415.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-upload.ts":()=>g(()=>f(()=>import("./vaadin-upload-d3c162ed-201bbd64.js"),["./vaadin-upload-d3c162ed-201bbd64.js","./vaadin-button-2511ad84-17c7ae7e.js"],import.meta.url),["assets/vaadin-upload-d3c162ed.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-vertical-layout.ts":()=>g(()=>f(()=>import("./vaadin-vertical-layout-ad4174c4-1076a721.js"),[],import.meta.url),[]),"./components/vaadin-virtual-list.ts":()=>g(()=>f(()=>import("./vaadin-virtual-list-96896203-05cad462.js"),[],import.meta.url),[])}),`./components/${t}.ts`);class Is{constructor(e=Ns){this.loader=e,this.metadata={}}async getMetadata(e){var o;const i=(o=e.element)==null?void 0:o.localName;if(!i)return null;if(!i.startsWith("vaadin-"))return Cn(i);let n=this.metadata[i];if(n)return n;try{n=(await this.loader(i)).default,this.metadata[i]=n}catch{console.warn(`Failed to load metadata for component: ${i}`)}return n||null}}const Ps=new Is,Et={crosshair:Le` @@ -239,27 +239,27 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin -`,square:Oe` +`,square:Le` -`,font:Oe` +`,font:Le` -`,undo:Oe` +`,undo:Le` -`,redo:Oe` +`,redo:Le` -`,cross:Oe` +`,cross:Le` -`};var je;(function(t){t.disabled="disabled",t.enabled="enabled",t.missing_theme="missing_theme"})(je||(je={}));var P;(function(t){t.local="local",t.global="global"})(P||(P={}));function go(t,e){return`${t}|${e}`}class ve{constructor(e){this._properties={},this._metadata=e}get metadata(){return this._metadata}get properties(){return Object.values(this._properties)}getPropertyValue(e,o){return this._properties[go(e,o)]||null}updatePropertyValue(e,o,i,n){if(!i){delete this._properties[go(e,o)];return}let r=this.getPropertyValue(e,o);r?(r.value=i,r.modified=n||!1):(r={elementSelector:e,propertyName:o,value:i,modified:n||!1},this._properties[go(e,o)]=r)}addPropertyValues(e){e.forEach(o=>{this.updatePropertyValue(o.elementSelector,o.propertyName,o.value,o.modified)})}getPropertyValuesForElement(e){return this.properties.filter(o=>o.elementSelector===e)}static combine(...e){if(e.length<2)throw new Error("Must provide at least two themes");const o=new ve(e[0].metadata);return e.forEach(i=>o.addPropertyValues(i.properties)),o}static fromServerRules(e,o,i){const n=new ve(e);return e.elements.forEach(r=>{const s=Ue(r,o),l=i.find(a=>a.selector===s.replace(/ > /g,">"));l&&r.properties.forEach(a=>{const d=l.properties[a.propertyName];d&&n.updatePropertyValue(r.selector,a.propertyName,d,!0)})}),n}}function Ue(t,e){const o=t.selector;if(e.themeScope===P.global)return o;if(!e.localClassName)throw new Error("Can not build local scoped selector without instance class name");const i=o.match(/^[\w\d-_]+/),n=i&&i[0];if(!n)throw new Error(`Selector does not start with a tag name: ${o}`);return`${n}.${e.localClassName}${o.substring(n.length,o.length)}`}function Os(t,e,o,i){const n=Ue(t,e),r={[o]:i};return o==="border-width"&&(parseInt(i)>0?r["border-style"]="solid":r["border-style"]=""),{selector:n,properties:r}}function Ls(t){const e=Object.entries(t.properties).map(([o,i])=>`${o}: ${i};`).join(" ");return`${t.selector} { ${e} }`}let gt,Oi="";function Bo(t){gt||(gt=new CSSStyleSheet,document.adoptedStyleSheets=[...document.adoptedStyleSheets,gt]),Oi+=t.cssText,gt.replaceSync(Oi)}const kn=E` +`};var Ue;(function(t){t.disabled="disabled",t.enabled="enabled",t.missing_theme="missing_theme"})(Ue||(Ue={}));var P;(function(t){t.local="local",t.global="global"})(P||(P={}));function go(t,e){return`${t}|${e}`}class fe{constructor(e){this._properties={},this._metadata=e}get metadata(){return this._metadata}get properties(){return Object.values(this._properties)}getPropertyValue(e,o){return this._properties[go(e,o)]||null}updatePropertyValue(e,o,i,n){if(!i){delete this._properties[go(e,o)];return}let r=this.getPropertyValue(e,o);r?(r.value=i,r.modified=n||!1):(r={elementSelector:e,propertyName:o,value:i,modified:n||!1},this._properties[go(e,o)]=r)}addPropertyValues(e){e.forEach(o=>{this.updatePropertyValue(o.elementSelector,o.propertyName,o.value,o.modified)})}getPropertyValuesForElement(e){return this.properties.filter(o=>o.elementSelector===e)}static combine(...e){if(e.length<2)throw new Error("Must provide at least two themes");const o=new fe(e[0].metadata);return e.forEach(i=>o.addPropertyValues(i.properties)),o}static fromServerRules(e,o,i){const n=new fe(e);return e.elements.forEach(r=>{const s=Fe(r,o),l=i.find(a=>a.selector===s.replace(/ > /g,">"));l&&r.properties.forEach(a=>{const d=l.properties[a.propertyName];d&&n.updatePropertyValue(r.selector,a.propertyName,d,!0)})}),n}}function Fe(t,e){const o=t.selector;if(e.themeScope===P.global)return o;if(!e.localClassName)throw new Error("Can not build local scoped selector without instance class name");const i=o.match(/^[\w\d-_]+/),n=i&&i[0];if(!n)throw new Error(`Selector does not start with a tag name: ${o}`);return`${n}.${e.localClassName}${o.substring(n.length,o.length)}`}function Os(t,e,o,i){const n=Fe(t,e),r={[o]:i};return o==="border-width"&&(parseInt(i)>0?r["border-style"]="solid":r["border-style"]=""),{selector:n,properties:r}}function Ls(t){const e=Object.entries(t.properties).map(([o,i])=>`${o}: ${i};`).join(" ");return`${t.selector} { ${e} }`}let gt,Oi="";function Bo(t){gt||(gt=new CSSStyleSheet,document.adoptedStyleSheets=[...document.adoptedStyleSheets,gt]),Oi+=t.cssText,gt.replaceSync(Oi)}const kn=_` .editor-row { display: flex; align-items: baseline; @@ -275,14 +275,14 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin .editor-row > .editor { flex: 1 1 0; } -`,Li="__vaadin-theme-editor-measure-element",zi=/((::before)|(::after))$/,Mi=/::part\(([\w\d_-]+)\)$/;Bo(E` +`,Li="__vaadin-theme-editor-measure-element",zi=/((::before)|(::after))$/,Mi=/::part\(([\w\d_-]+)\)$/;Bo(_` .__vaadin-theme-editor-measure-element { position: absolute; top: 0; left: 0; visibility: hidden; } -`);async function zs(t){const e=new ve(t),o=document.createElement(t.tagName);o.classList.add(Li),document.body.append(o),t.setupElement&&await t.setupElement(o);const i={themeScope:P.local,localClassName:Li};try{t.elements.forEach(n=>{Vi(o,n,i,!0);let r=Ue(n,i);const s=r.match(zi);r=r.replace(zi,"");const l=r.match(Mi),a=r.replace(Mi,"");let d=document.querySelector(a);if(d&&l){const h=`[part~="${l[1]}"]`;d=d.shadowRoot.querySelector(h)}if(!d)return;d.style.transition="none";const c=s?s[1]:null,m=getComputedStyle(d,c);n.properties.forEach(h=>{const y=m.getPropertyValue(h.propertyName)||h.defaultValue||"";e.updatePropertyValue(n.selector,h.propertyName,y)}),Vi(o,n,i,!1)})}finally{try{t.cleanupElement&&await t.cleanupElement(o)}finally{o.remove()}}return e}function Vi(t,e,o,i){if(e.stateAttribute){if(e.stateElementSelector){const n=Ue({...e,selector:e.stateElementSelector},o);t=document.querySelector(n)}t&&(i?t.setAttribute(e.stateAttribute,""):t.removeAttribute(e.stateAttribute))}}function Di(t){return t.trim()}function Ms(t){const e=t.element;if(!e)return null;const o=e.querySelector("label");if(o&&o.textContent)return Di(o.textContent);const i=e.textContent;return i?Di(i):null}class Vs{constructor(){this._localClassNameMap=new Map}get stylesheet(){return this.ensureStylesheet(),this._stylesheet}add(e){this.ensureStylesheet(),this._stylesheet.replaceSync(e)}clear(){this.ensureStylesheet(),this._stylesheet.replaceSync("")}previewLocalClassName(e,o){if(!e)return;const i=this._localClassNameMap.get(e);i&&(e.classList.remove(i),e.overlayClass=null),o?(e.classList.add(o),e.overlayClass=o,this._localClassNameMap.set(e,o)):this._localClassNameMap.delete(e)}ensureStylesheet(){this._stylesheet||(this._stylesheet=new CSSStyleSheet,this._stylesheet.replaceSync(""),document.adoptedStyleSheets=[...document.adoptedStyleSheets,this._stylesheet])}}const be=new Vs;var J;(function(t){t.response="themeEditorResponse",t.loadComponentMetadata="themeEditorComponentMetadata",t.setLocalClassName="themeEditorLocalClassName",t.setCssRules="themeEditorRules",t.loadRules="themeEditorLoadRules",t.history="themeEditorHistory",t.openCss="themeEditorOpenCss",t.markAsUsed="themeEditorMarkAsUsed"})(J||(J={}));var Ro;(function(t){t.ok="ok",t.error="error"})(Ro||(Ro={}));class Ds{constructor(e){this.pendingRequests={},this.requestCounter=0,this.wrappedConnection=e;const o=this.wrappedConnection.onMessage;this.wrappedConnection.onMessage=i=>{i.command===J.response?this.handleResponse(i.data):o.call(this.wrappedConnection,i)}}sendRequest(e,o){const i=(this.requestCounter++).toString(),n=o.uiId??this.getGlobalUiId();return new Promise((r,s)=>{this.wrappedConnection.send(e,{...o,requestId:i,uiId:n}),this.pendingRequests[i]={resolve:r,reject:s}})}handleResponse(e){const o=this.pendingRequests[e.requestId];if(!o){console.warn("Received response for unknown request");return}delete this.pendingRequests[e.requestId],e.code===Ro.ok?o.resolve(e):o.reject(e)}loadComponentMetadata(e){return this.sendRequest(J.loadComponentMetadata,{nodeId:e.nodeId})}setLocalClassName(e,o){return this.sendRequest(J.setLocalClassName,{nodeId:e.nodeId,className:o})}setCssRules(e){return this.sendRequest(J.setCssRules,{rules:e})}loadRules(e){return this.sendRequest(J.loadRules,{selectors:e})}markAsUsed(){return this.sendRequest(J.markAsUsed,{})}undo(e){return this.sendRequest(J.history,{undo:e})}redo(e){return this.sendRequest(J.history,{redo:e})}openCss(e){return this.sendRequest(J.openCss,{selector:e})}getGlobalUiId(){if(this.globalUiId===void 0){const e=window.Vaadin;if(e&&e.Flow){const{clients:o}=e.Flow,i=Object.keys(o);for(const n of i){const r=o[n];if(r.getNodeId){this.globalUiId=r.getUIId();break}}}}return this.globalUiId??-1}}const z={index:-1,entries:[]};class js{constructor(e){this.api=e}get allowUndo(){return z.index>=0}get allowRedo(){return z.index{Vi(o,n,i,!0);let r=Fe(n,i);const s=r.match(zi);r=r.replace(zi,"");const l=r.match(Mi),a=r.replace(Mi,"");let d=document.querySelector(a);if(d&&l){const h=`[part~="${l[1]}"]`;d=d.shadowRoot.querySelector(h)}if(!d)return;d.style.transition="none";const c=s?s[1]:null,m=getComputedStyle(d,c);n.properties.forEach(h=>{const y=m.getPropertyValue(h.propertyName)||h.defaultValue||"";e.updatePropertyValue(n.selector,h.propertyName,y)}),Vi(o,n,i,!1)})}finally{try{t.cleanupElement&&await t.cleanupElement(o)}finally{o.remove()}}return e}function Vi(t,e,o,i){if(e.stateAttribute){if(e.stateElementSelector){const n=Fe({...e,selector:e.stateElementSelector},o);t=document.querySelector(n)}t&&(i?t.setAttribute(e.stateAttribute,""):t.removeAttribute(e.stateAttribute))}}function Di(t){return t.trim()}function Ms(t){const e=t.element;if(!e)return null;const o=e.querySelector("label");if(o&&o.textContent)return Di(o.textContent);const i=e.textContent;return i?Di(i):null}class Vs{constructor(){this._localClassNameMap=new Map}get stylesheet(){return this.ensureStylesheet(),this._stylesheet}add(e){this.ensureStylesheet(),this._stylesheet.replaceSync(e)}clear(){this.ensureStylesheet(),this._stylesheet.replaceSync("")}previewLocalClassName(e,o){if(!e)return;const i=this._localClassNameMap.get(e);i&&(e.classList.remove(i),e.overlayClass=null),o?(e.classList.add(o),e.overlayClass=o,this._localClassNameMap.set(e,o)):this._localClassNameMap.delete(e)}ensureStylesheet(){this._stylesheet||(this._stylesheet=new CSSStyleSheet,this._stylesheet.replaceSync(""),document.adoptedStyleSheets=[...document.adoptedStyleSheets,this._stylesheet])}}const _e=new Vs;var J;(function(t){t.response="themeEditorResponse",t.loadComponentMetadata="themeEditorComponentMetadata",t.setLocalClassName="themeEditorLocalClassName",t.setCssRules="themeEditorRules",t.loadRules="themeEditorLoadRules",t.history="themeEditorHistory",t.openCss="themeEditorOpenCss",t.markAsUsed="themeEditorMarkAsUsed"})(J||(J={}));var Ro;(function(t){t.ok="ok",t.error="error"})(Ro||(Ro={}));class Ds{constructor(e){this.pendingRequests={},this.requestCounter=0,this.wrappedConnection=e;const o=this.wrappedConnection.onMessage;this.wrappedConnection.onMessage=i=>{i.command===J.response?this.handleResponse(i.data):o.call(this.wrappedConnection,i)}}sendRequest(e,o){const i=(this.requestCounter++).toString(),n=o.uiId??this.getGlobalUiId();return new Promise((r,s)=>{this.wrappedConnection.send(e,{...o,requestId:i,uiId:n}),this.pendingRequests[i]={resolve:r,reject:s}})}handleResponse(e){const o=this.pendingRequests[e.requestId];if(!o){console.warn("Received response for unknown request");return}delete this.pendingRequests[e.requestId],e.code===Ro.ok?o.resolve(e):o.reject(e)}loadComponentMetadata(e){return this.sendRequest(J.loadComponentMetadata,{nodeId:e.nodeId})}setLocalClassName(e,o){return this.sendRequest(J.setLocalClassName,{nodeId:e.nodeId,className:o})}setCssRules(e){return this.sendRequest(J.setCssRules,{rules:e})}loadRules(e){return this.sendRequest(J.loadRules,{selectors:e})}markAsUsed(){return this.sendRequest(J.markAsUsed,{})}undo(e){return this.sendRequest(J.history,{undo:e})}redo(e){return this.sendRequest(J.history,{redo:e})}openCss(e){return this.sendRequest(J.openCss,{selector:e})}getGlobalUiId(){if(this.globalUiId===void 0){const e=window.Vaadin;if(e&&e.Flow){const{clients:o}=e.Flow,i=Object.keys(o);for(const n of i){const r=o[n];if(r.getNodeId){this.globalUiId=r.getUIId();break}}}}return this.globalUiId??-1}}const z={index:-1,entries:[]};class js{constructor(e){this.api=e}get allowUndo(){return z.index>=0}get allowRedo(){return z.index
${this.renderEditor()}
- `}updateValueFromTheme(){var e;this.propertyValue=this.theme.getPropertyValue(this.elementMetadata.selector,this.propertyMetadata.propertyName),this.value=((e=this.propertyValue)==null?void 0:e.value)||""}dispatchChange(e){this.dispatchEvent(new Us(this.elementMetadata,this.propertyMetadata,e))}}v([_({})],W.prototype,"elementMetadata",void 0);v([_({})],W.prototype,"propertyMetadata",void 0);v([_({})],W.prototype,"theme",void 0);v([I()],W.prototype,"propertyValue",void 0);v([I()],W.prototype,"value",void 0);class Nt{get values(){return this._values}get rawValues(){return this._rawValues}constructor(e){if(this._values=[],this._rawValues={},e){const o=e.propertyName,i=e.presets??[];this._values=(i||[]).map(r=>r.startsWith("--")?`var(${r})`:r);const n=document.createElement("div");n.style.borderStyle="solid",n.style.visibility="hidden",document.body.append(n);try{this._values.forEach(r=>{n.style.setProperty(o,r);const s=getComputedStyle(n);this._rawValues[r]=s.getPropertyValue(o).trim()})}finally{n.remove()}}}tryMapToRawValue(e){return this._rawValues[e]??e}tryMapToPreset(e){return this.findPreset(e)??e}findPreset(e){const o=e&&e.trim();return this.values.find(i=>this._rawValues[i]===o)}}class ji extends CustomEvent{constructor(e){super("change",{detail:{value:e}})}}let It=class extends A{constructor(){super(...arguments),this.value="",this.showClearButton=!1}static get styles(){return E` + `}updateValueFromTheme(){var e;this.propertyValue=this.theme.getPropertyValue(this.elementMetadata.selector,this.propertyMetadata.propertyName),this.value=((e=this.propertyValue)==null?void 0:e.value)||""}dispatchChange(e){this.dispatchEvent(new Us(this.elementMetadata,this.propertyMetadata,e))}}v([w({})],q.prototype,"elementMetadata",void 0);v([w({})],q.prototype,"propertyMetadata",void 0);v([w({})],q.prototype,"theme",void 0);v([I()],q.prototype,"propertyValue",void 0);v([I()],q.prototype,"value",void 0);class Nt{get values(){return this._values}get rawValues(){return this._rawValues}constructor(e){if(this._values=[],this._rawValues={},e){const o=e.propertyName,i=e.presets??[];this._values=(i||[]).map(r=>r.startsWith("--")?`var(${r})`:r);const n=document.createElement("div");n.style.borderStyle="solid",n.style.visibility="hidden",document.body.append(n);try{this._values.forEach(r=>{n.style.setProperty(o,r);const s=getComputedStyle(n);this._rawValues[r]=s.getPropertyValue(o).trim()})}finally{n.remove()}}}tryMapToRawValue(e){return this._rawValues[e]??e}tryMapToPreset(e){return this.findPreset(e)??e}findPreset(e){const o=e&&e.trim();return this.values.find(i=>this._rawValues[i]===o)}}class ji extends CustomEvent{constructor(e){super("change",{detail:{value:e}})}}let It=class extends A{constructor(){super(...arguments),this.value="",this.showClearButton=!1}static get styles(){return _` :host { display: inline-block; width: 100%; @@ -351,7 +351,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin `}update(t){super.update(t),t.has("showClearButton")&&(this.showClearButton?this.classList.add("show-clear-button"):this.classList.remove("show-clear-button"))}render(){return b` - `}handleInputChange(t){const e=t.target;this.dispatchEvent(new ji(e.value))}handleClearClick(){this.dispatchEvent(new ji(""))}};v([_({})],It.prototype,"value",void 0);v([_({})],It.prototype,"showClearButton",void 0);It=v([M("vaadin-dev-tools-theme-text-input")],It);class Fs extends CustomEvent{constructor(e){super("class-name-change",{detail:{value:e}})}}let ot=class extends A{constructor(){super(...arguments),this.editedClassName="",this.invalid=!1}static get styles(){return[kn,E` + `}handleInputChange(t){const e=t.target;this.dispatchEvent(new ji(e.value))}handleClearClick(){this.dispatchEvent(new ji(""))}};v([w({})],It.prototype,"value",void 0);v([w({})],It.prototype,"showClearButton",void 0);It=v([M("vaadin-dev-tools-theme-text-input")],It);class Fs extends CustomEvent{constructor(e){super("class-name-change",{detail:{value:e}})}}let ot=class extends A{constructor(){super(...arguments),this.editedClassName="",this.invalid=!1}static get styles(){return[kn,_` .editor-row { padding-top: 0; } @@ -371,7 +371,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin > ${this.invalid?b`
Please enter a valid CSS class name`:null} - `}handleInputChange(t){this.editedClassName=t.detail.value;const e=/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/;this.invalid=!this.editedClassName.match(e),!this.invalid&&this.editedClassName!==this.className&&this.dispatchEvent(new Fs(this.editedClassName))}};v([_({})],ot.prototype,"className",void 0);v([I()],ot.prototype,"editedClassName",void 0);v([I()],ot.prototype,"invalid",void 0);ot=v([M("vaadin-dev-tools-theme-class-name-editor")],ot);class Bs extends CustomEvent{constructor(e){super("scope-change",{detail:{value:e}})}}Bo(E` + `}handleInputChange(t){this.editedClassName=t.detail.value;const e=/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/;this.invalid=!this.editedClassName.match(e),!this.invalid&&this.editedClassName!==this.className&&this.dispatchEvent(new Fs(this.editedClassName))}};v([w({})],ot.prototype,"className",void 0);v([I()],ot.prototype,"editedClassName",void 0);v([I()],ot.prototype,"invalid",void 0);ot=v([M("vaadin-dev-tools-theme-class-name-editor")],ot);class Bs extends CustomEvent{constructor(e){super("scope-change",{detail:{value:e}})}}Bo(_` vaadin-select-overlay[theme~='vaadin-dev-tools-theme-scope-selector'] { --lumo-primary-color-50pct: rgba(255, 255, 255, 0.5); z-index: 100000 !important; @@ -405,7 +405,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin vaadin-select-overlay[theme~='vaadin-dev-tools-theme-scope-selector'] vaadin-item:hover { background: rgba(255, 255, 255, 0.1); } -`);let it=class extends A{constructor(){super(...arguments),this.value=P.local}static get styles(){return E` +`);let it=class extends A{constructor(){super(...arguments),this.value=P.local}static get styles(){return _` vaadin-select { --lumo-primary-color-50pct: rgba(255, 255, 255, 0.5); width: 100px; @@ -433,7 +433,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin .value=${this.value} .renderer=${this.selectRenderer.bind(this)} @value-changed=${this.handleValueChange} - >`}selectRenderer(t){var e;const o=((e=this.metadata)==null?void 0:e.displayName)||"Component",i=`${o}s`;we(b` + >`}selectRenderer(t){var e;const o=((e=this.metadata)==null?void 0:e.displayName)||"Component",i=`${o}s`;Se(b` Local @@ -446,17 +446,17 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin Edit styles for all ${i} - `,t)}handleValueChange(t){const e=t.detail.value;e!==this.value&&this.dispatchEvent(new Bs(e))}};v([_({})],it.prototype,"value",void 0);v([_({})],it.prototype,"metadata",void 0);v([at("vaadin-select")],it.prototype,"select",void 0);it=v([M("vaadin-dev-tools-theme-scope-selector")],it);let Ui=class extends W{static get styles(){return[W.styles,E` + `,t)}handleValueChange(t){const e=t.detail.value;e!==this.value&&this.dispatchEvent(new Bs(e))}};v([w({})],it.prototype,"value",void 0);v([w({})],it.prototype,"metadata",void 0);v([at("vaadin-select")],it.prototype,"select",void 0);it=v([M("vaadin-dev-tools-theme-scope-selector")],it);let Ui=class extends q{static get styles(){return[q.styles,_` .editor-row { align-items: center; } - `]}handleInputChange(t){const e=t.target.checked?this.propertyMetadata.checkedValue:"";this.dispatchChange(e||"")}renderEditor(){const t=this.value===this.propertyMetadata.checkedValue;return b` `}};Ui=v([M("vaadin-dev-tools-theme-checkbox-property-editor")],Ui);let Fi=class extends W{handleInputChange(t){this.dispatchChange(t.detail.value)}renderEditor(){var t;return b` + `]}handleInputChange(t){const e=t.target.checked?this.propertyMetadata.checkedValue:"";this.dispatchChange(e||"")}renderEditor(){const t=this.value===this.propertyMetadata.checkedValue;return b` `}};Ui=v([M("vaadin-dev-tools-theme-checkbox-property-editor")],Ui);let Fi=class extends q{handleInputChange(t){this.dispatchChange(t.detail.value)}renderEditor(){var t;return b` - `}};Fi=v([M("vaadin-dev-tools-theme-text-property-editor")],Fi);let Pt=class extends W{constructor(){super(...arguments),this.selectedPresetIndex=-1,this.presets=new Nt}static get styles(){return[W.styles,E` + `}};Fi=v([M("vaadin-dev-tools-theme-text-property-editor")],Fi);let Pt=class extends q{constructor(){super(...arguments),this.selectedPresetIndex=-1,this.presets=new Nt}static get styles(){return[q.styles,_` :host { --preset-count: 3; --slider-bg: #fff; @@ -578,11 +578,11 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin .showClearButton=${((t=this.propertyValue)==null?void 0:t.modified)||!1} @change=${this.handleValueChange} > - `}handleSliderInput(t){const e=t.target,o=parseInt(e.value),i=this.presets.values[o];this.selectedPresetIndex=o,this.value=this.presets.rawValues[i]}handleSliderChange(){this.dispatchChange(this.value)}handleValueChange(t){this.value=t.detail.value,this.updateSliderValue(),this.dispatchChange(this.value)}dispatchChange(t){const e=this.presets.tryMapToPreset(t);super.dispatchChange(e)}updateValueFromTheme(){var t;super.updateValueFromTheme(),this.value=this.presets.tryMapToRawValue(((t=this.propertyValue)==null?void 0:t.value)||""),this.updateSliderValue()}updateSliderValue(){const t=this.presets.findPreset(this.value);this.selectedPresetIndex=t?this.presets.values.indexOf(t):-1}};v([I()],Pt.prototype,"selectedPresetIndex",void 0);v([I()],Pt.prototype,"presets",void 0);Pt=v([M("vaadin-dev-tools-theme-range-property-editor")],Pt);const Fe=(t,e=0,o=1)=>t>o?o:tMath.round(o*t)/o,Tn=({h:t,s:e,v:o,a:i})=>{const n=(200-e)*o/100;return{h:D(t),s:D(n>0&&n<200?e*o/100/(n<=100?n:200-n)*100:0),l:D(n/2),a:D(i,2)}},No=t=>{const{h:e,s:o,l:i}=Tn(t);return`hsl(${e}, ${o}%, ${i}%)`},fo=t=>{const{h:e,s:o,l:i,a:n}=Tn(t);return`hsla(${e}, ${o}%, ${i}%, ${n})`},Hs=({h:t,s:e,v:o,a:i})=>{t=t/360*6,e=e/100,o=o/100;const n=Math.floor(t),r=o*(1-e),s=o*(1-(t-n)*e),l=o*(1-(1-t+n)*e),a=n%6;return{r:D([o,s,r,r,l,o][a]*255),g:D([l,o,o,s,r,r][a]*255),b:D([r,r,l,o,o,s][a]*255),a:D(i,2)}},qs=t=>{const{r:e,g:o,b:i,a:n}=Hs(t);return`rgba(${e}, ${o}, ${i}, ${n})`},Ws=t=>{const e=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(t);return e?Gs({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):{h:0,s:0,v:0,a:1}},Gs=({r:t,g:e,b:o,a:i})=>{const n=Math.max(t,e,o),r=n-Math.min(t,e,o),s=r?n===t?(e-o)/r:n===e?2+(o-t)/r:4+(t-e)/r:0;return{h:D(60*(s<0?s+6:s)),s:D(n?r/n*100:0),v:D(n/255*100),a:i}},Ks=(t,e)=>{if(t===e)return!0;for(const o in t)if(t[o]!==e[o])return!1;return!0},Js=(t,e)=>t.replace(/\s/g,"")===e.replace(/\s/g,""),Bi={},$n=t=>{let e=Bi[t];return e||(e=document.createElement("template"),e.innerHTML=t,Bi[t]=e),e},Ho=(t,e,o)=>{t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:o}))};let ze=!1;const Io=t=>"touches"in t,Ys=t=>ze&&!Io(t)?!1:(ze||(ze=Io(t)),!0),Hi=(t,e)=>{const o=Io(e)?e.touches[0]:e,i=t.el.getBoundingClientRect();Ho(t.el,"move",t.getMove({x:Fe((o.pageX-(i.left+window.pageXOffset))/i.width),y:Fe((o.pageY-(i.top+window.pageYOffset))/i.height)}))},Xs=(t,e)=>{const o=e.keyCode;o>40||t.xy&&o<37||o<33||(e.preventDefault(),Ho(t.el,"move",t.getMove({x:o===39?.01:o===37?-.01:o===34?.05:o===33?-.05:o===35?1:o===36?-1:0,y:o===40?.01:o===38?-.01:0},!0)))};class qo{constructor(e,o,i,n){const r=$n(`
`);e.appendChild(r.content.cloneNode(!0));const s=e.querySelector(`[part=${o}]`);s.addEventListener("mousedown",this),s.addEventListener("touchstart",this),s.addEventListener("keydown",this),this.el=s,this.xy=n,this.nodes=[s.firstChild,s]}set dragging(e){const o=e?document.addEventListener:document.removeEventListener;o(ze?"touchmove":"mousemove",this),o(ze?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!Ys(e)||!ze&&e.button!=0)return;this.el.focus(),Hi(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),Hi(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":Xs(this,e);break}}style(e){e.forEach((o,i)=>{for(const n in o)this.nodes[i].style.setProperty(n,o[n])})}}class Qs extends qo{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:`${e/360*100}%`,color:No({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${D(e)}`)}getMove(e,o){return{h:o?Fe(this.h+e.x*360,0,360):360*e.x}}}class Zs extends qo{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:`${100-e.v}%`,left:`${e.s}%`,color:No(e)},{"background-color":No({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${D(e.s)}%, Brightness ${D(e.v)}%`)}getMove(e,o){return{s:o?Fe(this.hsva.s+e.x*100,0,100):e.x*100,v:o?Fe(this.hsva.v-e.y*100,0,100):Math.round(100-e.y*100)}}}const ea=':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',ta="[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}",oa="[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}",ft=Symbol("same"),yo=Symbol("color"),qi=Symbol("hsva"),bo=Symbol("update"),Wi=Symbol("parts"),Ot=Symbol("css"),Lt=Symbol("sliders");let ia=class extends HTMLElement{static get observedAttributes(){return["color"]}get[Ot](){return[ea,ta,oa]}get[Lt](){return[Zs,Qs]}get color(){return this[yo]}set color(t){if(!this[ft](t)){const e=this.colorModel.toHsva(t);this[bo](e),this[yo]=t}}constructor(){super();const t=$n(``),e=this.attachShadow({mode:"open"});e.appendChild(t.content.cloneNode(!0)),e.addEventListener("move",this),this[Wi]=this[Lt].map(o=>new o(e))}connectedCallback(){if(this.hasOwnProperty("color")){const t=this.color;delete this.color,this.color=t}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(t,e,o){const i=this.colorModel.fromAttr(o);this[ft](i)||(this.color=i)}handleEvent(t){const e=this[qi],o={...e,...t.detail};this[bo](o);let i;!Ks(o,e)&&!this[ft](i=this.colorModel.fromHsva(o))&&(this[yo]=i,Ho(this,"color-changed",{value:i}))}[ft](t){return this.color&&this.colorModel.equal(t,this.color)}[bo](t){this[qi]=t,this[Wi].forEach(e=>e.update(t))}};class na extends qo{constructor(e){super(e,"alpha",'aria-label="Alpha" aria-valuemin="0" aria-valuemax="1"',!1)}update(e){this.hsva=e;const o=fo({...e,a:0}),i=fo({...e,a:1}),n=e.a*100;this.style([{left:`${n}%`,color:fo(e)},{"--gradient":`linear-gradient(90deg, ${o}, ${i}`}]);const r=D(n);this.el.setAttribute("aria-valuenow",`${r}`),this.el.setAttribute("aria-valuetext",`${r}%`)}getMove(e,o){return{a:o?Fe(this.hsva.a+e.x):e.x}}}const ra=`[part=alpha]{flex:0 0 24px}[part=alpha]::after{display:block;content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-radius:inherit;background-image:var(--gradient);box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part^=alpha]{background-color:#fff;background-image:url('data:image/svg+xml,')}[part=alpha-pointer]{top:50%}`;class sa extends ia{get[Ot](){return[...super[Ot],ra]}get[Lt](){return[...super[Lt],na]}}const aa={defaultColor:"rgba(0, 0, 0, 1)",toHsva:Ws,fromHsva:qs,equal:Js,fromAttr:t=>t};class la extends sa{get colorModel(){return aa}}/** + `}handleSliderInput(t){const e=t.target,o=parseInt(e.value),i=this.presets.values[o];this.selectedPresetIndex=o,this.value=this.presets.rawValues[i]}handleSliderChange(){this.dispatchChange(this.value)}handleValueChange(t){this.value=t.detail.value,this.updateSliderValue(),this.dispatchChange(this.value)}dispatchChange(t){const e=this.presets.tryMapToPreset(t);super.dispatchChange(e)}updateValueFromTheme(){var t;super.updateValueFromTheme(),this.value=this.presets.tryMapToRawValue(((t=this.propertyValue)==null?void 0:t.value)||""),this.updateSliderValue()}updateSliderValue(){const t=this.presets.findPreset(this.value);this.selectedPresetIndex=t?this.presets.values.indexOf(t):-1}};v([I()],Pt.prototype,"selectedPresetIndex",void 0);v([I()],Pt.prototype,"presets",void 0);Pt=v([M("vaadin-dev-tools-theme-range-property-editor")],Pt);const Be=(t,e=0,o=1)=>t>o?o:tMath.round(o*t)/o,Tn=({h:t,s:e,v:o,a:i})=>{const n=(200-e)*o/100;return{h:D(t),s:D(n>0&&n<200?e*o/100/(n<=100?n:200-n)*100:0),l:D(n/2),a:D(i,2)}},No=t=>{const{h:e,s:o,l:i}=Tn(t);return`hsl(${e}, ${o}%, ${i}%)`},fo=t=>{const{h:e,s:o,l:i,a:n}=Tn(t);return`hsla(${e}, ${o}%, ${i}%, ${n})`},Hs=({h:t,s:e,v:o,a:i})=>{t=t/360*6,e=e/100,o=o/100;const n=Math.floor(t),r=o*(1-e),s=o*(1-(t-n)*e),l=o*(1-(1-t+n)*e),a=n%6;return{r:D([o,s,r,r,l,o][a]*255),g:D([l,o,o,s,r,r][a]*255),b:D([r,r,l,o,o,s][a]*255),a:D(i,2)}},Ws=t=>{const{r:e,g:o,b:i,a:n}=Hs(t);return`rgba(${e}, ${o}, ${i}, ${n})`},qs=t=>{const e=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(t);return e?Gs({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):{h:0,s:0,v:0,a:1}},Gs=({r:t,g:e,b:o,a:i})=>{const n=Math.max(t,e,o),r=n-Math.min(t,e,o),s=r?n===t?(e-o)/r:n===e?2+(o-t)/r:4+(t-e)/r:0;return{h:D(60*(s<0?s+6:s)),s:D(n?r/n*100:0),v:D(n/255*100),a:i}},Ks=(t,e)=>{if(t===e)return!0;for(const o in t)if(t[o]!==e[o])return!1;return!0},Js=(t,e)=>t.replace(/\s/g,"")===e.replace(/\s/g,""),Bi={},$n=t=>{let e=Bi[t];return e||(e=document.createElement("template"),e.innerHTML=t,Bi[t]=e),e},Ho=(t,e,o)=>{t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:o}))};let Me=!1;const Io=t=>"touches"in t,Ys=t=>Me&&!Io(t)?!1:(Me||(Me=Io(t)),!0),Hi=(t,e)=>{const o=Io(e)?e.touches[0]:e,i=t.el.getBoundingClientRect();Ho(t.el,"move",t.getMove({x:Be((o.pageX-(i.left+window.pageXOffset))/i.width),y:Be((o.pageY-(i.top+window.pageYOffset))/i.height)}))},Xs=(t,e)=>{const o=e.keyCode;o>40||t.xy&&o<37||o<33||(e.preventDefault(),Ho(t.el,"move",t.getMove({x:o===39?.01:o===37?-.01:o===34?.05:o===33?-.05:o===35?1:o===36?-1:0,y:o===40?.01:o===38?-.01:0},!0)))};class Wo{constructor(e,o,i,n){const r=$n(`
`);e.appendChild(r.content.cloneNode(!0));const s=e.querySelector(`[part=${o}]`);s.addEventListener("mousedown",this),s.addEventListener("touchstart",this),s.addEventListener("keydown",this),this.el=s,this.xy=n,this.nodes=[s.firstChild,s]}set dragging(e){const o=e?document.addEventListener:document.removeEventListener;o(Me?"touchmove":"mousemove",this),o(Me?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!Ys(e)||!Me&&e.button!=0)return;this.el.focus(),Hi(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),Hi(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":Xs(this,e);break}}style(e){e.forEach((o,i)=>{for(const n in o)this.nodes[i].style.setProperty(n,o[n])})}}class Qs extends Wo{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:`${e/360*100}%`,color:No({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${D(e)}`)}getMove(e,o){return{h:o?Be(this.h+e.x*360,0,360):360*e.x}}}class Zs extends Wo{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:`${100-e.v}%`,left:`${e.s}%`,color:No(e)},{"background-color":No({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${D(e.s)}%, Brightness ${D(e.v)}%`)}getMove(e,o){return{s:o?Be(this.hsva.s+e.x*100,0,100):e.x*100,v:o?Be(this.hsva.v-e.y*100,0,100):Math.round(100-e.y*100)}}}const ea=':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',ta="[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}",oa="[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}",ft=Symbol("same"),yo=Symbol("color"),Wi=Symbol("hsva"),bo=Symbol("update"),qi=Symbol("parts"),Ot=Symbol("css"),Lt=Symbol("sliders");let ia=class extends HTMLElement{static get observedAttributes(){return["color"]}get[Ot](){return[ea,ta,oa]}get[Lt](){return[Zs,Qs]}get color(){return this[yo]}set color(t){if(!this[ft](t)){const e=this.colorModel.toHsva(t);this[bo](e),this[yo]=t}}constructor(){super();const t=$n(``),e=this.attachShadow({mode:"open"});e.appendChild(t.content.cloneNode(!0)),e.addEventListener("move",this),this[qi]=this[Lt].map(o=>new o(e))}connectedCallback(){if(this.hasOwnProperty("color")){const t=this.color;delete this.color,this.color=t}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(t,e,o){const i=this.colorModel.fromAttr(o);this[ft](i)||(this.color=i)}handleEvent(t){const e=this[Wi],o={...e,...t.detail};this[bo](o);let i;!Ks(o,e)&&!this[ft](i=this.colorModel.fromHsva(o))&&(this[yo]=i,Ho(this,"color-changed",{value:i}))}[ft](t){return this.color&&this.colorModel.equal(t,this.color)}[bo](t){this[Wi]=t,this[qi].forEach(e=>e.update(t))}};class na extends Wo{constructor(e){super(e,"alpha",'aria-label="Alpha" aria-valuemin="0" aria-valuemax="1"',!1)}update(e){this.hsva=e;const o=fo({...e,a:0}),i=fo({...e,a:1}),n=e.a*100;this.style([{left:`${n}%`,color:fo(e)},{"--gradient":`linear-gradient(90deg, ${o}, ${i}`}]);const r=D(n);this.el.setAttribute("aria-valuenow",`${r}`),this.el.setAttribute("aria-valuetext",`${r}%`)}getMove(e,o){return{a:o?Be(this.hsva.a+e.x):e.x}}}const ra=`[part=alpha]{flex:0 0 24px}[part=alpha]::after{display:block;content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-radius:inherit;background-image:var(--gradient);box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part^=alpha]{background-color:#fff;background-image:url('data:image/svg+xml,')}[part=alpha-pointer]{top:50%}`;class sa extends ia{get[Ot](){return[...super[Ot],ra]}get[Lt](){return[...super[Lt],na]}}const aa={defaultColor:"rgba(0, 0, 0, 1)",toHsva:qs,fromHsva:Ws,equal:Js,fromAttr:t=>t};class la extends sa{get colorModel(){return aa}}/** * @license * Copyright (c) 2017 - 2023 Vaadin Ltd. * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ -*/function da(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){e.push(t),t=t.host;continue}if(t.assignedSlot){t=t.assignedSlot;continue}t=t.parentNode}return e}const xo={start:"top",end:"bottom"},_o={start:"left",end:"right"},Gi=new ResizeObserver(t=>{setTimeout(()=>{t.forEach(e=>{e.target.__overlay&&e.target.__overlay._updatePosition()})})}),ca=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value:0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=da(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0)})}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(e,o){if(this.__removeUpdatePositionEventListeners(),o&&(o.__overlay=null,Gi.unobserve(o),e&&(this.__addUpdatePositionEventListeners(),o.__overlay=this,Gi.observe(o))),e){const i=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(n=>{this.__margins[n]=parseInt(i[n],10)})),this.setAttribute("dir",i.direction),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__positionSettingsChanged(){this._updatePosition()}__onScroll(e){this.contains(e.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const e=this.positionTarget.getBoundingClientRect(),o=this.__shouldAlignStartVertically(e);this.style.justifyContent=o?"flex-start":"flex-end";const i=this.__isRTL,n=this.__shouldAlignStartHorizontally(e,i),r=!i&&n||i&&!n;this.style.alignItems=r?"flex-start":"flex-end";const s=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,s,this.noVerticalOverlap,xo,this,o),a=this.__calculatePositionInOneDimension(e,s,this.noHorizontalOverlap,_o,this,n);Object.assign(this.style,l,a),this.toggleAttribute("bottom-aligned",!o),this.toggleAttribute("top-aligned",o),this.toggleAttribute("end-aligned",!r),this.toggleAttribute("start-aligned",r)}__shouldAlignStartHorizontally(e,o){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const n=Math.min(window.innerWidth,document.documentElement.clientWidth),r=!o&&this.horizontalAlign==="start"||o&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,i,n,this.__margins,r,this.noHorizontalOverlap,_o)}__shouldAlignStartVertically(e){const o=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight),n=this.verticalAlign==="top";return this.__shouldAlignStart(e,o,i,this.__margins,n,this.noVerticalOverlap,xo)}__shouldAlignStart(e,o,i,n,r,s,l){const a=i-e[s?l.end:l.start]-n[l.end],d=e[s?l.start:l.end]-n[l.start],c=r?a:d,m=c>(r?d:a)||c>o;return r===m}__adjustBottomProperty(e,o,i){let n;if(e===o.end){if(o.end===xo.end){const r=Math.min(window.innerHeight,document.documentElement.clientHeight);if(i>r&&this.__oldViewportHeight){const s=this.__oldViewportHeight-r;n=i-s}this.__oldViewportHeight=r}if(o.end===_o.end){const r=Math.min(window.innerWidth,document.documentElement.clientWidth);if(i>r&&this.__oldViewportWidth){const s=this.__oldViewportWidth-r;n=i-s}this.__oldViewportWidth=r}}return n}__calculatePositionInOneDimension(e,o,i,n,r,s){const l=s?n.start:n.end,a=s?n.end:n.start,d=parseFloat(r.style[l]||getComputedStyle(r)[l]),c=this.__adjustBottomProperty(l,n,d),m=o[s?n.start:n.end]-e[i===s?n.end:n.start],h=c?`${c}px`:`${d+m*(s?-1:1)}px`;return{[l]:h,[a]:""}}};class ha extends CustomEvent{constructor(e){super("color-picker-change",{detail:{value:e}})}}const An=E` +*/function da(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){e.push(t),t=t.host;continue}if(t.assignedSlot){t=t.assignedSlot;continue}t=t.parentNode}return e}const xo={start:"top",end:"bottom"},_o={start:"left",end:"right"},Gi=new ResizeObserver(t=>{setTimeout(()=>{t.forEach(e=>{e.target.__overlay&&e.target.__overlay._updatePosition()})})}),ca=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value:0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=da(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0)})}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(e,o){if(this.__removeUpdatePositionEventListeners(),o&&(o.__overlay=null,Gi.unobserve(o),e&&(this.__addUpdatePositionEventListeners(),o.__overlay=this,Gi.observe(o))),e){const i=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(n=>{this.__margins[n]=parseInt(i[n],10)})),this.setAttribute("dir",i.direction),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__positionSettingsChanged(){this._updatePosition()}__onScroll(e){this.contains(e.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const e=this.positionTarget.getBoundingClientRect(),o=this.__shouldAlignStartVertically(e);this.style.justifyContent=o?"flex-start":"flex-end";const i=this.__isRTL,n=this.__shouldAlignStartHorizontally(e,i),r=!i&&n||i&&!n;this.style.alignItems=r?"flex-start":"flex-end";const s=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,s,this.noVerticalOverlap,xo,this,o),a=this.__calculatePositionInOneDimension(e,s,this.noHorizontalOverlap,_o,this,n);Object.assign(this.style,l,a),this.toggleAttribute("bottom-aligned",!o),this.toggleAttribute("top-aligned",o),this.toggleAttribute("end-aligned",!r),this.toggleAttribute("start-aligned",r)}__shouldAlignStartHorizontally(e,o){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const n=Math.min(window.innerWidth,document.documentElement.clientWidth),r=!o&&this.horizontalAlign==="start"||o&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,i,n,this.__margins,r,this.noHorizontalOverlap,_o)}__shouldAlignStartVertically(e){const o=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight),n=this.verticalAlign==="top";return this.__shouldAlignStart(e,o,i,this.__margins,n,this.noVerticalOverlap,xo)}__shouldAlignStart(e,o,i,n,r,s,l){const a=i-e[s?l.end:l.start]-n[l.end],d=e[s?l.start:l.end]-n[l.start],c=r?a:d,m=c>(r?d:a)||c>o;return r===m}__adjustBottomProperty(e,o,i){let n;if(e===o.end){if(o.end===xo.end){const r=Math.min(window.innerHeight,document.documentElement.clientHeight);if(i>r&&this.__oldViewportHeight){const s=this.__oldViewportHeight-r;n=i-s}this.__oldViewportHeight=r}if(o.end===_o.end){const r=Math.min(window.innerWidth,document.documentElement.clientWidth);if(i>r&&this.__oldViewportWidth){const s=this.__oldViewportWidth-r;n=i-s}this.__oldViewportWidth=r}}return n}__calculatePositionInOneDimension(e,o,i,n,r,s){const l=s?n.start:n.end,a=s?n.end:n.start,d=parseFloat(r.style[l]||getComputedStyle(r)[l]),c=this.__adjustBottomProperty(l,n,d),m=o[s?n.start:n.end]-e[i===s?n.end:n.start],h=c?`${c}px`:`${d+m*(s?-1:1)}px`;return{[l]:h,[a]:""}}};class ha extends CustomEvent{constructor(e){super("color-picker-change",{detail:{value:e}})}}const An=_` :host { --preview-size: 24px; --preview-color: rgba(0, 0, 0, 0); @@ -627,7 +627,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin content: ''; background-color: var(--preview-color); } -`;let nt=class extends A{constructor(){super(...arguments),this.commitValue=!1}static get styles(){return[An,E` +`;let nt=class extends A{constructor(){super(...arguments),this.commitValue=!1}static get styles(){return[An,_` #toggle { display: block; } @@ -636,13 +636,13 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin class="preview" style="--preview-color: ${t}" @click=${this.open} - >`}open(){this.commitValue=!1,this.overlay.opened=!0,this.overlay.style.zIndex="1000000";const t=this.overlay.shadowRoot.querySelector('[part="overlay"]');t.style.background="#333"}renderOverlayContent(t){const e=getComputedStyle(this.toggle,"::after").getPropertyValue("background-color");we(b`
+ >`}open(){this.commitValue=!1,this.overlay.opened=!0,this.overlay.style.zIndex="1000000";const t=this.overlay.shadowRoot.querySelector('[part="overlay"]');t.style.background="#333"}renderOverlayContent(t){const e=getComputedStyle(this.toggle,"::after").getPropertyValue("background-color");Se(b`
-
`,t)}handleColorChange(t){this.commitValue=!0,this.dispatchEvent(new ha(t.detail.value)),t.detail.close&&(this.overlay.opened=!1,this.handleOverlayClose())}handleOverlayEscape(){this.commitValue=!1}handleOverlayClose(){const t=this.commitValue?"color-picker-commit":"color-picker-cancel";this.dispatchEvent(new CustomEvent(t))}};v([_({})],nt.prototype,"value",void 0);v([_({})],nt.prototype,"presets",void 0);v([at("#toggle")],nt.prototype,"toggle",void 0);nt=v([M("vaadin-dev-tools-color-picker")],nt);let zt=class extends A{static get styles(){return[An,E` +
`,t)}handleColorChange(t){this.commitValue=!0,this.dispatchEvent(new ha(t.detail.value)),t.detail.close&&(this.overlay.opened=!1,this.handleOverlayClose())}handleOverlayEscape(){this.commitValue=!1}handleOverlayClose(){const t=this.commitValue?"color-picker-commit":"color-picker-cancel";this.dispatchEvent(new CustomEvent(t))}};v([w({})],nt.prototype,"value",void 0);v([w({})],nt.prototype,"presets",void 0);v([at("#toggle")],nt.prototype,"toggle",void 0);nt=v([M("vaadin-dev-tools-color-picker")],nt);let zt=class extends A{static get styles(){return[An,_` :host { display: block; padding: 12px; @@ -689,7 +689,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin class="preview" style="--preview-color: ${e}" @click=${()=>this.selectPreset(e)} - >`);return b`
${t}
`}handlePickerChange(t){this.dispatchEvent(new CustomEvent("color-changed",{detail:{value:t.detail.value}}))}selectPreset(t){this.dispatchEvent(new CustomEvent("color-changed",{detail:{value:t,close:!0}}))}};v([_({})],zt.prototype,"value",void 0);v([_({})],zt.prototype,"presets",void 0);zt=v([M("vaadin-dev-tools-color-picker-overlay-content")],zt);customElements.whenDefined("vaadin-overlay").then(()=>{const t=customElements.get("vaadin-overlay");class e extends ca(t){}customElements.define("vaadin-dev-tools-color-picker-overlay",e)});customElements.define("vaadin-dev-tools-rgba-string-color-picker",la);let Ki=class extends W{constructor(){super(...arguments),this.presets=new Nt}static get styles(){return[W.styles,E` + >`);return b`
${t}
`}handlePickerChange(t){this.dispatchEvent(new CustomEvent("color-changed",{detail:{value:t.detail.value}}))}selectPreset(t){this.dispatchEvent(new CustomEvent("color-changed",{detail:{value:t,close:!0}}))}};v([w({})],zt.prototype,"value",void 0);v([w({})],zt.prototype,"presets",void 0);zt=v([M("vaadin-dev-tools-color-picker-overlay-content")],zt);customElements.whenDefined("vaadin-overlay").then(()=>{const t=customElements.get("vaadin-overlay");class e extends ca(t){}customElements.define("vaadin-dev-tools-color-picker-overlay",e)});customElements.define("vaadin-dev-tools-rgba-string-color-picker",la);let Ki=class extends q{constructor(){super(...arguments),this.presets=new Nt}static get styles(){return[q.styles,_` .editor-row { align-items: center; } @@ -712,7 +712,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin .showClearButton=${((t=this.propertyValue)==null?void 0:t.modified)||!1} @change=${this.handleInputChange} > - `}handleInputChange(t){this.value=t.detail.value,this.dispatchChange(this.value)}handleColorPickerChange(t){this.value=t.detail.value}handleColorPickerCommit(){this.dispatchChange(this.value)}handleColorPickerCancel(){this.updateValueFromTheme()}dispatchChange(t){const e=this.presets.tryMapToPreset(t);super.dispatchChange(e)}updateValueFromTheme(){var t;super.updateValueFromTheme(),this.value=this.presets.tryMapToRawValue(((t=this.propertyValue)==null?void 0:t.value)||"")}};Ki=v([M("vaadin-dev-tools-theme-color-property-editor")],Ki);class ua extends CustomEvent{constructor(e){super("open-css",{detail:{element:e}})}}let Mt=class extends A{static get styles(){return E` + `}handleInputChange(t){this.value=t.detail.value,this.dispatchChange(this.value)}handleColorPickerChange(t){this.value=t.detail.value}handleColorPickerCommit(){this.dispatchChange(this.value)}handleColorPickerCancel(){this.updateValueFromTheme()}dispatchChange(t){const e=this.presets.tryMapToPreset(t);super.dispatchChange(e)}updateValueFromTheme(){var t;super.updateValueFromTheme(),this.value=this.presets.tryMapToRawValue(((t=this.propertyValue)==null?void 0:t.value)||"")}};Ki=v([M("vaadin-dev-tools-theme-color-property-editor")],Ki);class ua extends CustomEvent{constructor(e){super("open-css",{detail:{element:e}})}}let Mt=class extends A{static get styles(){return _` .section .header { display: flex; align-items: baseline; @@ -757,12 +757,12 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin .theme=${this.theme} data-testid=${e.propertyName} > - `}};v([_({})],Mt.prototype,"metadata",void 0);v([_({})],Mt.prototype,"theme",void 0);Mt=v([M("vaadin-dev-tools-theme-property-list")],Mt);let Vt=class extends A{render(){return b`
`}};v([w({})],Mt.prototype,"metadata",void 0);v([w({})],Mt.prototype,"theme",void 0);Mt=v([M("vaadin-dev-tools-theme-property-list")],Mt);let Vt=class extends A{render(){return b`
`}onClick(t){const e=this.getTargetElement(t);this.dispatchEvent(new CustomEvent("shim-click",{detail:{target:e}}))}onMouseMove(t){const e=this.getTargetElement(t);this.dispatchEvent(new CustomEvent("shim-mousemove",{detail:{target:e}}))}onKeyDown(t){this.dispatchEvent(new CustomEvent("shim-keydown",{detail:{originalEvent:t}}))}getTargetElement(t){this.style.display="none";const e=document.elementFromPoint(t.clientX,t.clientY);return this.style.display="",e}};Vt.shadowRootOptions={...A.shadowRootOptions,delegatesFocus:!0};Vt.styles=[E` + >
`}onClick(t){const e=this.getTargetElement(t);this.dispatchEvent(new CustomEvent("shim-click",{detail:{target:e}}))}onMouseMove(t){const e=this.getTargetElement(t);this.dispatchEvent(new CustomEvent("shim-mousemove",{detail:{target:e}}))}onKeyDown(t){this.dispatchEvent(new CustomEvent("shim-keydown",{detail:{originalEvent:t}}))}getTargetElement(t){this.style.display="none";const e=document.elementFromPoint(t.clientX,t.clientY);return this.style.display="",e}};Vt.shadowRootOptions={...A.shadowRootOptions,delegatesFocus:!0};Vt.styles=[_` div { pointer-events: auto; background: rgba(255, 255, 255, 0); @@ -770,7 +770,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin inset: 0px; z-index: 1000000; } - `];Vt=v([M("vaadin-dev-tools-shim")],Vt);const Rn=E` + `];Vt=v([M("vaadin-dev-tools-shim")],Vt);const Rn=_` .popup { width: auto; position: fixed; @@ -794,7 +794,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin box-shadow: var(--dev-tools-box-shadow); outline: none; } -`,pa={resolve:t=>de(e=>e.classList.contains("cc-banner"),t)?document.querySelector("vaadin-cookie-consent"):void 0},ma={resolve:t=>{const e=de(o=>o.localName==="vaadin-login-overlay-wrapper",t);return e?e.__dataHost:void 0}},va={resolve:t=>t.localName==="vaadin-dialog-overlay"?t.__dataHost:void 0},ga={resolve:t=>{const e=de(o=>o.localName==="vaadin-confirm-dialog-overlay",t);return e?e.__dataHost:void 0}},fa={resolve:t=>{const e=de(o=>o.localName==="vaadin-notification-card",t);return e?e.__dataHost:void 0}},ya={resolve:t=>t.localName!=="vaadin-menu-bar-item"?void 0:de(e=>e.localName==="vaadin-menu-bar",t)},Ji=[pa,ma,va,ga,fa,ya],ba={resolve:t=>de(e=>e.classList.contains("cc-banner"),t)},xa={resolve:t=>{var e;const o=de(i=>{var n;return((n=i.shadowRoot)==null?void 0:n.querySelector("[part=overlay]"))!=null},t);return(e=o==null?void 0:o.shadowRoot)==null?void 0:e.querySelector("[part=overlay]")}},_a={resolve:t=>{var e;const o=de(i=>i.localName==="vaadin-login-overlay-wrapper",t);return(e=o==null?void 0:o.shadowRoot)==null?void 0:e.querySelector("[part=card]")}},Yi=[_a,ba,xa],de=function(t,e){return t(e)?e:e.parentNode&&e.parentNode instanceof HTMLElement?de(t,e.parentNode):void 0};class wa{resolveElement(e){for(const o in Ji){let i=e;if((i=Ji[o].resolve(e))!==void 0)return i}return e}}class Ea{resolveElement(e){for(const o in Yi){let i=e;if((i=Yi[o].resolve(e))!==void 0)return i}return e}}const Sa=new wa,Ca=new Ea;let ge=class extends A{constructor(){super(),this.active=!1,this.components=[],this.selected=0,this.mouseMoveEvent=this.mouseMoveEvent.bind(this)}connectedCallback(){super.connectedCallback();const t=new CSSStyleSheet;t.replaceSync(` +`,pa={resolve:t=>ce(e=>e.classList.contains("cc-banner"),t)?document.querySelector("vaadin-cookie-consent"):void 0},ma={resolve:t=>{const e=ce(o=>o.localName==="vaadin-login-overlay-wrapper",t);return e?e.__dataHost:void 0}},va={resolve:t=>t.localName==="vaadin-dialog-overlay"?t.__dataHost:void 0},ga={resolve:t=>{const e=ce(o=>o.localName==="vaadin-confirm-dialog-overlay",t);return e?e.__dataHost:void 0}},fa={resolve:t=>{const e=ce(o=>o.localName==="vaadin-notification-card",t);return e?e.__dataHost:void 0}},ya={resolve:t=>t.localName!=="vaadin-menu-bar-item"?void 0:ce(e=>e.localName==="vaadin-menu-bar",t)},Ji=[pa,ma,va,ga,fa,ya],ba={resolve:t=>ce(e=>e.classList.contains("cc-banner"),t)},xa={resolve:t=>{var e;const o=ce(i=>{var n;return((n=i.shadowRoot)==null?void 0:n.querySelector("[part=overlay]"))!=null},t);return(e=o==null?void 0:o.shadowRoot)==null?void 0:e.querySelector("[part=overlay]")}},_a={resolve:t=>{var e;const o=ce(i=>i.localName==="vaadin-login-overlay-wrapper",t);return(e=o==null?void 0:o.shadowRoot)==null?void 0:e.querySelector("[part=card]")}},Yi=[_a,ba,xa],ce=function(t,e){return t(e)?e:e.parentNode&&e.parentNode instanceof HTMLElement?ce(t,e.parentNode):void 0};class wa{resolveElement(e){for(const o in Ji){let i=e;if((i=Ji[o].resolve(e))!==void 0)return i}return e}}class Ea{resolveElement(e){for(const o in Yi){let i=e;if((i=Yi[o].resolve(e))!==void 0)return i}return e}}const Sa=new wa,Ca=new Ea;let ye=class extends A{constructor(){super(),this.active=!1,this.components=[],this.selected=0,this.mouseMoveEvent=this.mouseMoveEvent.bind(this)}connectedCallback(){super.connectedCallback();const t=new CSSStyleSheet;t.replaceSync(` .vaadin-dev-tools-highlight-overlay { pointer-events: none; position: absolute; @@ -814,7 +814,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin `)} - `):(this.style.display="none",null)}open(t){this.options=t,this.active=!0,this.dispatchEvent(new CustomEvent("component-picker-opened",{}))}close(){this.active=!1,this.dispatchEvent(new CustomEvent("component-picker-closed",{}))}update(t){if(super.update(t),(t.has("selected")||t.has("components"))&&this.highlight(this.components[this.selected]),t.has("active")){const e=t.get("active"),o=this.active;!e&&o?requestAnimationFrame(()=>this.shim.focus()):e&&!o&&this.highlight(void 0)}}mouseMoveEvent(t){var e;if(!this.active){this.style.display="none";return}const o=(e=this.shadowRoot)==null?void 0:e.querySelector(".component-picker-info");if(o){const i=o.getBoundingClientRect();t.x>i.x&&t.xi.y&&t.y<=i.y+i.height?o.style.opacity="0.05":o.style.opacity="1.0"}}shimKeydown(t){const e=t.detail.originalEvent;if(e.key==="Escape")this.close(),t.stopPropagation(),t.preventDefault();else if(e.key==="ArrowUp"){let o=this.selected-1;o<0&&(o=this.components.length-1),this.selected=o}else e.key==="ArrowDown"?this.selected=(this.selected+1)%this.components.length:e.key==="Enter"&&(this.pickSelectedComponent(),t.stopPropagation(),t.preventDefault())}shimMove(t){const e=Sa.resolveElement(t.detail.target);this.components=_s(e),this.selected=this.components.length-1,this.components[this.selected].highlightElement=Ca.resolveElement(t.detail.target)}shimClick(t){this.pickSelectedComponent()}pickSelectedComponent(){const t=this.components[this.selected];if(t&&this.options)try{this.options.pickCallback(t)}catch(e){console.error("Pick callback failed",e)}this.close()}highlight(t){let e=(t==null?void 0:t.highlightElement)??(t==null?void 0:t.element);if(this.highlighted!==e)if(e){const o=e.getBoundingClientRect(),i=getComputedStyle(e);this.overlayElement.style.top=`${o.top}px`,this.overlayElement.style.left=`${o.left}px`,this.overlayElement.style.width=`${o.width}px`,this.overlayElement.style.height=`${o.height}px`,this.overlayElement.style.borderRadius=i.borderRadius,document.body.append(this.overlayElement)}else this.overlayElement.remove();this.highlighted=e}};ge.styles=[Rn,E` + `):(this.style.display="none",null)}open(t){this.options=t,this.active=!0,this.dispatchEvent(new CustomEvent("component-picker-opened",{}))}close(){this.active=!1,this.dispatchEvent(new CustomEvent("component-picker-closed",{}))}update(t){if(super.update(t),(t.has("selected")||t.has("components"))&&this.highlight(this.components[this.selected]),t.has("active")){const e=t.get("active"),o=this.active;!e&&o?requestAnimationFrame(()=>this.shim.focus()):e&&!o&&this.highlight(void 0)}}mouseMoveEvent(t){var e;if(!this.active){this.style.display="none";return}const o=(e=this.shadowRoot)==null?void 0:e.querySelector(".component-picker-info");if(o){const i=o.getBoundingClientRect();t.x>i.x&&t.xi.y&&t.y<=i.y+i.height?o.style.opacity="0.05":o.style.opacity="1.0"}}shimKeydown(t){const e=t.detail.originalEvent;if(e.key==="Escape")this.close(),t.stopPropagation(),t.preventDefault();else if(e.key==="ArrowUp"){let o=this.selected-1;o<0&&(o=this.components.length-1),this.selected=o}else e.key==="ArrowDown"?this.selected=(this.selected+1)%this.components.length:e.key==="Enter"&&(this.pickSelectedComponent(),t.stopPropagation(),t.preventDefault())}shimMove(t){const e=Sa.resolveElement(t.detail.target);this.components=_s(e),this.selected=this.components.length-1,this.components[this.selected].highlightElement=Ca.resolveElement(t.detail.target)}shimClick(t){this.pickSelectedComponent()}pickSelectedComponent(){const t=this.components[this.selected];if(t&&this.options)try{this.options.pickCallback(t)}catch(e){console.error("Pick callback failed",e)}this.close()}highlight(t){let e=(t==null?void 0:t.highlightElement)??(t==null?void 0:t.element);if(this.highlighted!==e)if(e){const o=e.getBoundingClientRect(),i=getComputedStyle(e);this.overlayElement.style.top=`${o.top}px`,this.overlayElement.style.left=`${o.left}px`,this.overlayElement.style.width=`${o.width}px`,this.overlayElement.style.height=`${o.height}px`,this.overlayElement.style.borderRadius=i.borderRadius,document.body.append(this.overlayElement)}else this.overlayElement.remove();this.highlighted=e}};ye.styles=[Rn,_` .component-picker-info { left: 1em; bottom: 1em; @@ -828,12 +828,12 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin .component-picker-components-info .selected { font-weight: bold; } - `];v([I()],ge.prototype,"active",void 0);v([I()],ge.prototype,"components",void 0);v([I()],ge.prototype,"selected",void 0);v([at("vaadin-dev-tools-shim")],ge.prototype,"shim",void 0);ge=v([M("vaadin-dev-tools-component-picker")],ge);const ka=Object.freeze(Object.defineProperty({__proto__:null,get ComponentPicker(){return ge}},Symbol.toStringTag,{value:"Module"}));class Ta{constructor(){this.currentActiveComponent=null,this.currentActiveComponentMetaData=null,this.componentPicked=async(e,o)=>{await this.hideOverlay(),this.currentActiveComponent=e,this.currentActiveComponentMetaData=o},this.showOverlay=()=>{!this.currentActiveComponent||!this.currentActiveComponentMetaData||this.currentActiveComponentMetaData.openOverlay&&this.currentActiveComponentMetaData.openOverlay(this.currentActiveComponent)},this.hideOverlay=()=>{!this.currentActiveComponent||!this.currentActiveComponentMetaData||this.currentActiveComponentMetaData.hideOverlay&&this.currentActiveComponentMetaData.hideOverlay(this.currentActiveComponent)},this.reset=()=>{this.currentActiveComponent=null,this.currentActiveComponentMetaData=null}}}const xe=new Ta,El=t=>{const e=t.element.$.comboBox,o=e.$.overlay;$a(t.element,e,o)},Sl=t=>{const e=t.element,o=e.$.comboBox,i=o.$.overlay;Aa(e,o,i)},$a=(t,e,o)=>{t.opened=!0,o._storedModeless=o.modeless,o.modeless=!0,document._themeEditorDocClickListener=Ra(t,e),document.addEventListener("click",document._themeEditorDocClickListener),e.removeEventListener("focusout",e._boundOnFocusout)},Aa=(t,e,o)=>{t.opened=!1,!(!e||!o)&&(o.modeless=o._storedModeless,delete o._storedModeless,e.addEventListener("focusout",e._boundOnFocusout),document.removeEventListener("click",document._themeEditorDocClickListener),delete document._themeEditorDocClickListener)},Ra=(t,e)=>o=>{const i=o.target;i!=null&&(e.opened=!Na(i,t))};function Na(t,e){if(!t||!t.tagName)return!0;if(t.tagName.startsWith("VAADIN-DEV"))return!1;let o=t,i={nodeId:-1,uiId:-1,element:void 0};for(;o&&o.parentNode&&(i=$o(o),i.nodeId===-1);)o=o.parentElement?o.parentElement:o.parentNode.host;const n=$o(e);return!(i.nodeId!==-1&&n.nodeId===i.nodeId)}Bo(E` + `];v([I()],ye.prototype,"active",void 0);v([I()],ye.prototype,"components",void 0);v([I()],ye.prototype,"selected",void 0);v([at("vaadin-dev-tools-shim")],ye.prototype,"shim",void 0);ye=v([M("vaadin-dev-tools-component-picker")],ye);const ka=Object.freeze(Object.defineProperty({__proto__:null,get ComponentPicker(){return ye}},Symbol.toStringTag,{value:"Module"}));class Ta{constructor(){this.currentActiveComponent=null,this.currentActiveComponentMetaData=null,this.componentPicked=async(e,o)=>{await this.hideOverlay(),this.currentActiveComponent=e,this.currentActiveComponentMetaData=o},this.showOverlay=()=>{!this.currentActiveComponent||!this.currentActiveComponentMetaData||this.currentActiveComponentMetaData.openOverlay&&this.currentActiveComponentMetaData.openOverlay(this.currentActiveComponent)},this.hideOverlay=()=>{!this.currentActiveComponent||!this.currentActiveComponentMetaData||this.currentActiveComponentMetaData.hideOverlay&&this.currentActiveComponentMetaData.hideOverlay(this.currentActiveComponent)},this.reset=()=>{this.currentActiveComponent=null,this.currentActiveComponentMetaData=null}}}const we=new Ta,Cl=t=>{const e=t.element.$.comboBox,o=e.$.overlay;$a(t.element,e,o)},kl=t=>{const e=t.element,o=e.$.comboBox,i=o.$.overlay;Aa(e,o,i)},$a=(t,e,o)=>{t.opened=!0,o._storedModeless=o.modeless,o.modeless=!0,document._themeEditorDocClickListener=Ra(t,e),document.addEventListener("click",document._themeEditorDocClickListener),e.removeEventListener("focusout",e._boundOnFocusout)},Aa=(t,e,o)=>{t.opened=!1,!(!e||!o)&&(o.modeless=o._storedModeless,delete o._storedModeless,e.addEventListener("focusout",e._boundOnFocusout),document.removeEventListener("click",document._themeEditorDocClickListener),delete document._themeEditorDocClickListener)},Ra=(t,e)=>o=>{const i=o.target;i!=null&&(e.opened=!Na(i,t))};function Na(t,e){if(!t||!t.tagName)return!0;if(t.tagName.startsWith("VAADIN-DEV"))return!1;let o=t,i={nodeId:-1,uiId:-1,element:void 0};for(;o&&o.parentNode&&(i=$o(o),i.nodeId===-1);)o=o.parentElement?o.parentElement:o.parentNode.host;const n=$o(e);return!(i.nodeId!==-1&&n.nodeId===i.nodeId)}Bo(_` .vaadin-theme-editor-highlight { outline: solid 2px #9e2cc6; outline-offset: 3px; } -`);let le=class extends A{constructor(){super(...arguments),this.expanded=!1,this.themeEditorState=je.enabled,this.context=null,this.baseTheme=null,this.editedTheme=null,this.effectiveTheme=null}static get styles(){return E` +`);let de=class extends A{constructor(){super(...arguments),this.expanded=!1,this.themeEditorState=Ue.enabled,this.context=null,this.baseTheme=null,this.editedTheme=null,this.effectiveTheme=null}static get styles(){return _` :host { animation: fade-in var(--dev-tools-transition-duration) ease-in; --theme-editor-section-horizontal-padding: 0.75rem; @@ -959,7 +959,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin .icon-button:not(:disabled):hover { color: var(--dev-tools-text-color-emphasis); } - `}firstUpdated(){this.api=new Ds(this.connection),this.history=new js(this.api),this.historyActions=this.history.allowedActions,this.api.markAsUsed(),this.undoRedoListener=t=>{var e,o;const i=t.key==="Z"||t.key==="z";i&&(t.ctrlKey||t.metaKey)&&t.shiftKey?(e=this.historyActions)!=null&&e.allowRedo&&this.handleRedo():i&&(t.ctrlKey||t.metaKey)&&(o=this.historyActions)!=null&&o.allowUndo&&this.handleUndo()},document.addEventListener("vaadin-theme-updated",()=>{be.clear(),this.refreshTheme()}),document.addEventListener("keydown",this.undoRedoListener),this.dispatchEvent(new CustomEvent("before-open"))}update(t){var e,o;super.update(t),t.has("expanded")&&(this.expanded?(this.highlightElement((e=this.context)==null?void 0:e.component.element),xe.showOverlay()):(xe.hideOverlay(),this.removeElementHighlight((o=this.context)==null?void 0:o.component.element)))}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeElementHighlight((t=this.context)==null?void 0:t.component.element),xe.hideOverlay(),xe.reset(),document.removeEventListener("keydown",this.undoRedoListener),this.dispatchEvent(new CustomEvent("after-close"))}render(){var t,e,o;return this.themeEditorState===je.missing_theme?this.renderMissingThemeNotice():b` + `}firstUpdated(){this.api=new Ds(this.connection),this.history=new js(this.api),this.historyActions=this.history.allowedActions,this.api.markAsUsed(),this.undoRedoListener=t=>{var e,o;const i=t.key==="Z"||t.key==="z";i&&(t.ctrlKey||t.metaKey)&&t.shiftKey?(e=this.historyActions)!=null&&e.allowRedo&&this.handleRedo():i&&(t.ctrlKey||t.metaKey)&&(o=this.historyActions)!=null&&o.allowUndo&&this.handleUndo()},document.addEventListener("vaadin-theme-updated",()=>{_e.clear(),this.refreshTheme()}),document.addEventListener("keydown",this.undoRedoListener),this.dispatchEvent(new CustomEvent("before-open"))}update(t){var e,o;super.update(t),t.has("expanded")&&(this.expanded?(this.highlightElement((e=this.context)==null?void 0:e.component.element),we.showOverlay()):(we.hideOverlay(),this.removeElementHighlight((o=this.context)==null?void 0:o.component.element)))}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeElementHighlight((t=this.context)==null?void 0:t.component.element),we.hideOverlay(),we.reset(),document.removeEventListener("keydown",this.undoRedoListener),this.dispatchEvent(new CustomEvent("after-close"))}render(){var t,e,o;return this.themeEditorState===Ue.missing_theme?this.renderMissingThemeNotice():b`
${this.renderPicker()} @@ -1023,7 +1023,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin .theme=${this.effectiveTheme} @theme-property-value-change=${this.handlePropertyChange} @open-css=${this.handleOpenCss} - >`}handleShowComponent(){if(!this.context)return;const t=this.context.component,e={nodeId:t.nodeId,uiId:t.uiId};this.connection.sendShowComponentCreateLocation(e)}async handleOpenCss(t){if(!this.context)return;await this.ensureLocalClassName();const e={themeScope:this.context.scope,localClassName:this.context.localClassName},o=Ue(t.detail.element,e);await this.api.openCss(o)}renderPicker(){var t;let e;if((t=this.context)!=null&&t.metadata){const o=this.context.scope===P.local?this.context.metadata.displayName:`All ${this.context.metadata.displayName}s`,i=b`${o}`,n=this.context.scope===P.local?Ms(this.context.component):null,r=n?b` "${n}`}handleShowComponent(){if(!this.context)return;const t=this.context.component,e={nodeId:t.nodeId,uiId:t.uiId};this.connection.sendShowComponentCreateLocation(e)}async handleOpenCss(t){if(!this.context)return;await this.ensureLocalClassName();const e={themeScope:this.context.scope,localClassName:this.context.localClassName},o=Fe(t.detail.element,e);await this.api.openCss(o)}renderPicker(){var t;let e;if((t=this.context)!=null&&t.metadata){const o=this.context.scope===P.local?this.context.metadata.displayName:`All ${this.context.metadata.displayName}s`,i=b`${o}`,n=this.context.scope===P.local?Ms(this.context.component):null,r=n?b` "${n}"`:null;e=b`${i} ${r}`}else e=b`Pick an element to get started`;return b`
@@ -1032,16 +1032,16 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin .className=${o} @class-name-change=${this.handleClassNameChange} > - `}async handleClassNameChange(t){if(!this.context)return;const e=this.context.localClassName,o=t.detail.value;if(e){const i=this.context.component.element;this.context.localClassName=o;const n=await this.api.setLocalClassName(this.context.component,o);this.historyActions=this.history.push(n.requestId,()=>be.previewLocalClassName(i,o),()=>be.previewLocalClassName(i,e))}else this.context={...this.context,suggestedClassName:o}}async pickComponent(){var t;xe.hideOverlay(),this.removeElementHighlight((t=this.context)==null?void 0:t.component.element),this.pickerProvider().open({infoTemplate:b` + `}async handleClassNameChange(t){if(!this.context)return;const e=this.context.localClassName,o=t.detail.value;if(e){const i=this.context.component.element;this.context.localClassName=o;const n=await this.api.setLocalClassName(this.context.component,o);this.historyActions=this.history.push(n.requestId,()=>_e.previewLocalClassName(i,o),()=>_e.previewLocalClassName(i,e))}else this.context={...this.context,suggestedClassName:o}}async pickComponent(){var t;we.hideOverlay(),this.removeElementHighlight((t=this.context)==null?void 0:t.component.element),this.pickerProvider().open({infoTemplate:b`

Locate the component to style

Use the mouse cursor to highlight components in the UI.

Use arrow down/up to cycle through and highlight specific components under the cursor.

Click the primary mouse button to select the component.

- `,pickCallback:async e=>{var o;const i=await Ps.getMetadata(e);if(!i){this.context={component:e,scope:((o=this.context)==null?void 0:o.scope)||P.local},this.baseTheme=null,this.editedTheme=null,this.effectiveTheme=null;return}await xe.componentPicked(e,i),this.highlightElement(e.element),this.refreshComponentAndTheme(e,i),xe.showOverlay()}})}handleScopeChange(t){this.context&&this.refreshTheme({...this.context,scope:t.detail.value})}async handlePropertyChange(t){if(!this.context||!this.baseTheme||!this.editedTheme)return;const{element:e,property:o,value:i}=t.detail;this.editedTheme.updatePropertyValue(e.selector,o.propertyName,i,!0),this.effectiveTheme=ve.combine(this.baseTheme,this.editedTheme),await this.ensureLocalClassName();const n={themeScope:this.context.scope,localClassName:this.context.localClassName},r=Os(e,n,o.propertyName,i);try{const s=await this.api.setCssRules([r]);this.historyActions=this.history.push(s.requestId);const l=Ls(r);be.add(l)}catch(s){console.error("Failed to update property value",s)}}async handleUndo(){this.historyActions=await this.history.undo(),await this.refreshComponentAndTheme()}async handleRedo(){this.historyActions=await this.history.redo(),await this.refreshComponentAndTheme()}async ensureLocalClassName(){if(!this.context||this.context.scope===P.global||this.context.localClassName)return;if(!this.context.localClassName&&!this.context.suggestedClassName)throw new Error("Cannot assign local class name for the component because it does not have a suggested class name");const t=this.context.component.element,e=this.context.suggestedClassName;this.context.localClassName=e;const o=await this.api.setLocalClassName(this.context.component,e);this.historyActions=this.history.push(o.requestId,()=>be.previewLocalClassName(t,e),()=>be.previewLocalClassName(t))}async refreshComponentAndTheme(t,e){var o,i,n;if(t=t||((o=this.context)==null?void 0:o.component),e=e||((i=this.context)==null?void 0:i.metadata),!t||!e)return;const r=await this.api.loadComponentMetadata(t);be.previewLocalClassName(t.element,r.className),await this.refreshTheme({scope:((n=this.context)==null?void 0:n.scope)||P.local,metadata:e,component:t,localClassName:r.className,suggestedClassName:r.suggestedClassName,accessible:r.accessible})}async refreshTheme(t){const e=t||this.context;if(!e||!e.metadata)return;if(e.scope===P.local&&!e.accessible){this.context=e,this.baseTheme=null,this.editedTheme=null,this.effectiveTheme=null;return}let o=new ve(e.metadata);if(!(e.scope===P.local&&!e.localClassName)){const n={themeScope:e.scope,localClassName:e.localClassName},r=e.metadata.elements.map(l=>Ue(l,n)),s=await this.api.loadRules(r);o=ve.fromServerRules(e.metadata,n,s.rules)}const i=await zs(e.metadata);this.context=e,this.baseTheme=i,this.editedTheme=o,this.effectiveTheme=ve.combine(i,this.editedTheme)}highlightElement(t){t&&t.classList.add("vaadin-theme-editor-highlight")}removeElementHighlight(t){t&&t.classList.remove("vaadin-theme-editor-highlight")}};v([_({})],le.prototype,"expanded",void 0);v([_({})],le.prototype,"themeEditorState",void 0);v([_({})],le.prototype,"pickerProvider",void 0);v([_({})],le.prototype,"connection",void 0);v([I()],le.prototype,"historyActions",void 0);v([I()],le.prototype,"context",void 0);v([I()],le.prototype,"effectiveTheme",void 0);le=v([M("vaadin-dev-tools-theme-editor")],le);const Wo=1e3,Go=(t,e)=>{const o=Array.from(t.querySelectorAll(e.join(", "))),i=Array.from(t.querySelectorAll("*")).filter(n=>n.shadowRoot).flatMap(n=>Go(n.shadowRoot,e));return[...o,...i]};let Xi=!1;const rt=(t,e)=>{Xi||(window.addEventListener("message",n=>{n.data==="validate-license"&&window.location.reload()},!1),Xi=!0);const o=t._overlayElement;if(o){if(o.shadowRoot){const n=o.shadowRoot.querySelector("slot:not([name])");if(n&&n.assignedElements().length>0){rt(n.assignedElements()[0],e);return}}rt(o,e);return}const i=e.messageHtml?e.messageHtml:`${e.message}

Component: ${e.product.name} ${e.product.version}

`.replace(/https:([^ ]*)/g,"https:$1");t.isConnected&&(t.outerHTML=`
${i}
`)},Ye={},Qi={},Be={},Nn={},te=t=>`${t.name}_${t.version}`,Zi=t=>{const{cvdlName:e,version:o}=t.constructor,i={name:e,version:o},n=t.tagName.toLowerCase();Ye[e]=Ye[e]??[],Ye[e].push(n);const r=Be[te(i)];r&&setTimeout(()=>rt(t,r),Wo),Be[te(i)]||Nn[te(i)]||Qi[te(i)]||(Qi[te(i)]=!0,window.Vaadin.devTools.checkLicense(i))},Ia=t=>{Nn[te(t)]=!0,console.debug("License check ok for",t)},In=t=>{const e=t.product.name;Be[te(t.product)]=t,console.error("License check failed for",e);const o=Ye[e];(o==null?void 0:o.length)>0&&Go(document,o).forEach(i=>{setTimeout(()=>rt(i,Be[te(t.product)]),Wo)})},Pa=t=>{const e=t.message,o=t.product.name;t.messageHtml=`No license found. Go here to start a trial or retrieve your license.`,Be[te(t.product)]=t,console.error("No license found when checking",o);const i=Ye[o];(i==null?void 0:i.length)>0&&Go(document,i).forEach(n=>{setTimeout(()=>rt(n,Be[te(t.product)]),Wo)})},Oa=()=>{window.Vaadin.devTools.createdCvdlElements.forEach(t=>{Zi(t)}),window.Vaadin.devTools.createdCvdlElements={push:t=>{Zi(t)}}};var C;(function(t){t.ACTIVE="active",t.INACTIVE="inactive",t.UNAVAILABLE="unavailable",t.ERROR="error"})(C||(C={}));class Me extends Object{constructor(e){super(),this.status=C.UNAVAILABLE,e&&(this.webSocket=new WebSocket(e),this.webSocket.onmessage=o=>this.handleMessage(o),this.webSocket.onerror=o=>this.handleError(o),this.webSocket.onclose=o=>{this.status!==C.ERROR&&this.setStatus(C.UNAVAILABLE),this.webSocket=void 0}),setInterval(()=>{this.webSocket&&self.status!==C.ERROR&&this.status!==C.UNAVAILABLE&&this.webSocket.send("")},Me.HEARTBEAT_INTERVAL)}onHandshake(){}onReload(){}onUpdate(e,o){}onConnectionError(e){}onStatusChange(e){}onMessage(e){console.error("Unknown message received from the live reload server:",e)}handleMessage(e){let o;try{o=JSON.parse(e.data)}catch(i){this.handleError(`[${i.name}: ${i.message}`);return}o.command==="hello"?(this.setStatus(C.ACTIVE),this.onHandshake()):o.command==="reload"?this.status===C.ACTIVE&&this.onReload():o.command==="update"?this.status===C.ACTIVE&&this.onUpdate(o.path,o.content):o.command==="license-check-ok"?Ia(o.data):o.command==="license-check-failed"?In(o.data):o.command==="license-check-nokey"?Pa(o.data):this.onMessage(o)}handleError(e){console.error(e),this.setStatus(C.ERROR),e instanceof Event&&this.webSocket?this.onConnectionError(`Error in WebSocket connection to ${this.webSocket.url}`):this.onConnectionError(e)}setActive(e){!e&&this.status===C.ACTIVE?this.setStatus(C.INACTIVE):e&&this.status===C.INACTIVE&&this.setStatus(C.ACTIVE)}setStatus(e){this.status!==e&&(this.status=e,this.onStatusChange(e))}send(e,o){const i=JSON.stringify({command:e,data:o});this.webSocket?this.webSocket.readyState!==WebSocket.OPEN?this.webSocket.addEventListener("open",()=>this.webSocket.send(i)):this.webSocket.send(i):console.error(`Unable to send message ${e}. No websocket is available`)}setFeature(e,o){this.send("setFeature",{featureId:e,enabled:o})}sendTelemetry(e){this.send("reportTelemetry",{browserData:e})}sendLicenseCheck(e){this.send("checkLicense",e)}sendShowComponentCreateLocation(e){this.send("showComponentCreateLocation",e)}sendShowComponentAttachLocation(e){this.send("showComponentAttachLocation",e)}}Me.HEARTBEAT_INTERVAL=18e4;let Po=class extends A{createRenderRoot(){return this}activate(){this._devTools.unreadErrors=!1,this.updateComplete.then(()=>{const t=this.renderRoot.querySelector(".message-tray .message:last-child");t&&t.scrollIntoView()})}render(){return b`
+ `,pickCallback:async e=>{var o;const i=await Ps.getMetadata(e);if(!i){this.context={component:e,scope:((o=this.context)==null?void 0:o.scope)||P.local},this.baseTheme=null,this.editedTheme=null,this.effectiveTheme=null;return}await we.componentPicked(e,i),this.highlightElement(e.element),this.refreshComponentAndTheme(e,i),we.showOverlay()}})}handleScopeChange(t){this.context&&this.refreshTheme({...this.context,scope:t.detail.value})}async handlePropertyChange(t){if(!this.context||!this.baseTheme||!this.editedTheme)return;const{element:e,property:o,value:i}=t.detail;this.editedTheme.updatePropertyValue(e.selector,o.propertyName,i,!0),this.effectiveTheme=fe.combine(this.baseTheme,this.editedTheme),await this.ensureLocalClassName();const n={themeScope:this.context.scope,localClassName:this.context.localClassName},r=Os(e,n,o.propertyName,i);try{const s=await this.api.setCssRules([r]);this.historyActions=this.history.push(s.requestId);const l=Ls(r);_e.add(l)}catch(s){console.error("Failed to update property value",s)}}async handleUndo(){this.historyActions=await this.history.undo(),await this.refreshComponentAndTheme()}async handleRedo(){this.historyActions=await this.history.redo(),await this.refreshComponentAndTheme()}async ensureLocalClassName(){if(!this.context||this.context.scope===P.global||this.context.localClassName)return;if(!this.context.localClassName&&!this.context.suggestedClassName)throw new Error("Cannot assign local class name for the component because it does not have a suggested class name");const t=this.context.component.element,e=this.context.suggestedClassName;this.context.localClassName=e;const o=await this.api.setLocalClassName(this.context.component,e);this.historyActions=this.history.push(o.requestId,()=>_e.previewLocalClassName(t,e),()=>_e.previewLocalClassName(t))}async refreshComponentAndTheme(t,e){var o,i,n;if(t=t||((o=this.context)==null?void 0:o.component),e=e||((i=this.context)==null?void 0:i.metadata),!t||!e)return;const r=await this.api.loadComponentMetadata(t);_e.previewLocalClassName(t.element,r.className),await this.refreshTheme({scope:((n=this.context)==null?void 0:n.scope)||P.local,metadata:e,component:t,localClassName:r.className,suggestedClassName:r.suggestedClassName,accessible:r.accessible})}async refreshTheme(t){const e=t||this.context;if(!e||!e.metadata)return;if(e.scope===P.local&&!e.accessible){this.context=e,this.baseTheme=null,this.editedTheme=null,this.effectiveTheme=null;return}let o=new fe(e.metadata);if(!(e.scope===P.local&&!e.localClassName)){const n={themeScope:e.scope,localClassName:e.localClassName},r=e.metadata.elements.map(l=>Fe(l,n)),s=await this.api.loadRules(r);o=fe.fromServerRules(e.metadata,n,s.rules)}const i=await zs(e.metadata);this.context=e,this.baseTheme=i,this.editedTheme=o,this.effectiveTheme=fe.combine(i,this.editedTheme)}highlightElement(t){t&&t.classList.add("vaadin-theme-editor-highlight")}removeElementHighlight(t){t&&t.classList.remove("vaadin-theme-editor-highlight")}};v([w({})],de.prototype,"expanded",void 0);v([w({})],de.prototype,"themeEditorState",void 0);v([w({})],de.prototype,"pickerProvider",void 0);v([w({})],de.prototype,"connection",void 0);v([I()],de.prototype,"historyActions",void 0);v([I()],de.prototype,"context",void 0);v([I()],de.prototype,"effectiveTheme",void 0);de=v([M("vaadin-dev-tools-theme-editor")],de);const qo=1e3,Go=(t,e)=>{const o=Array.from(t.querySelectorAll(e.join(", "))),i=Array.from(t.querySelectorAll("*")).filter(n=>n.shadowRoot).flatMap(n=>Go(n.shadowRoot,e));return[...o,...i]};let Xi=!1;const rt=(t,e)=>{Xi||(window.addEventListener("message",n=>{n.data==="validate-license"&&window.location.reload()},!1),Xi=!0);const o=t._overlayElement;if(o){if(o.shadowRoot){const n=o.shadowRoot.querySelector("slot:not([name])");if(n&&n.assignedElements().length>0){rt(n.assignedElements()[0],e);return}}rt(o,e);return}const i=e.messageHtml?e.messageHtml:`${e.message}

Component: ${e.product.name} ${e.product.version}

`.replace(/https:([^ ]*)/g,"https:$1");t.isConnected&&(t.outerHTML=`
${i}
`)},Ye={},Qi={},He={},Nn={},te=t=>`${t.name}_${t.version}`,Zi=t=>{const{cvdlName:e,version:o}=t.constructor,i={name:e,version:o},n=t.tagName.toLowerCase();Ye[e]=Ye[e]??[],Ye[e].push(n);const r=He[te(i)];r&&setTimeout(()=>rt(t,r),qo),He[te(i)]||Nn[te(i)]||Qi[te(i)]||(Qi[te(i)]=!0,window.Vaadin.devTools.checkLicense(i))},Ia=t=>{Nn[te(t)]=!0,console.debug("License check ok for",t)},In=t=>{const e=t.product.name;He[te(t.product)]=t,console.error("License check failed for",e);const o=Ye[e];(o==null?void 0:o.length)>0&&Go(document,o).forEach(i=>{setTimeout(()=>rt(i,He[te(t.product)]),qo)})},Pa=t=>{const e=t.message,o=t.product.name;t.messageHtml=`No license found. Go here to start a trial or retrieve your license.`,He[te(t.product)]=t,console.error("No license found when checking",o);const i=Ye[o];(i==null?void 0:i.length)>0&&Go(document,i).forEach(n=>{setTimeout(()=>rt(n,He[te(t.product)]),qo)})},Oa=()=>{window.Vaadin.devTools.createdCvdlElements.forEach(t=>{Zi(t)}),window.Vaadin.devTools.createdCvdlElements={push:t=>{Zi(t)}}};var C;(function(t){t.ACTIVE="active",t.INACTIVE="inactive",t.UNAVAILABLE="unavailable",t.ERROR="error"})(C||(C={}));class Ve extends Object{constructor(e){super(),this.status=C.UNAVAILABLE,e&&(this.webSocket=new WebSocket(e),this.webSocket.onmessage=o=>this.handleMessage(o),this.webSocket.onerror=o=>this.handleError(o),this.webSocket.onclose=o=>{this.status!==C.ERROR&&this.setStatus(C.UNAVAILABLE),this.webSocket=void 0}),setInterval(()=>{this.webSocket&&self.status!==C.ERROR&&this.status!==C.UNAVAILABLE&&this.webSocket.send("")},Ve.HEARTBEAT_INTERVAL)}onHandshake(){}onReload(){}onUpdate(e,o){}onConnectionError(e){}onStatusChange(e){}onMessage(e){console.error("Unknown message received from the live reload server:",e)}handleMessage(e){let o;try{o=JSON.parse(e.data)}catch(i){this.handleError(`[${i.name}: ${i.message}`);return}o.command==="hello"?(this.setStatus(C.ACTIVE),this.onHandshake()):o.command==="reload"?this.status===C.ACTIVE&&this.onReload():o.command==="update"?this.status===C.ACTIVE&&this.onUpdate(o.path,o.content):o.command==="license-check-ok"?Ia(o.data):o.command==="license-check-failed"?In(o.data):o.command==="license-check-nokey"?Pa(o.data):this.onMessage(o)}handleError(e){console.error(e),this.setStatus(C.ERROR),e instanceof Event&&this.webSocket?this.onConnectionError(`Error in WebSocket connection to ${this.webSocket.url}`):this.onConnectionError(e)}setActive(e){!e&&this.status===C.ACTIVE?this.setStatus(C.INACTIVE):e&&this.status===C.INACTIVE&&this.setStatus(C.ACTIVE)}setStatus(e){this.status!==e&&(this.status=e,this.onStatusChange(e))}send(e,o){const i=JSON.stringify({command:e,data:o});this.webSocket?this.webSocket.readyState!==WebSocket.OPEN?this.webSocket.addEventListener("open",()=>this.webSocket.send(i)):this.webSocket.send(i):console.error(`Unable to send message ${e}. No websocket is available`)}setFeature(e,o){this.send("setFeature",{featureId:e,enabled:o})}sendTelemetry(e){this.send("reportTelemetry",{browserData:e})}sendLicenseCheck(e){this.send("checkLicense",e)}sendShowComponentCreateLocation(e){this.send("showComponentCreateLocation",e)}sendShowComponentAttachLocation(e){this.send("showComponentAttachLocation",e)}}Ve.HEARTBEAT_INTERVAL=18e4;let Po=class extends A{createRenderRoot(){return this}activate(){this._devTools.unreadErrors=!1,this.updateComplete.then(()=>{const t=this.renderRoot.querySelector(".message-tray .message:last-child");t&&t.scrollIntoView()})}render(){return b`
${this._devTools.messages.map(t=>this._devTools.renderMessage(t))} -
`}};v([_({type:Object})],Po.prototype,"_devTools",void 0);Po=v([M("vaadin-dev-tools-log")],Po);var La=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,o=[],i=0;i"u"){o&&console.warn("unable to use e.clipboardData"),o&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var m=en[e.format]||en.default;window.clipboardData.setData(m,t)}else c.clipboardData.clearData(),c.clipboardData.setData(e.format,t);e.onCopy&&(c.preventDefault(),e.onCopy(c.clipboardData))}),document.body.appendChild(l),r.selectNodeContents(l),s.addRange(r);var d=document.execCommand("copy");if(!d)throw new Error("copy command was unsuccessful");a=!0}catch(c){o&&console.error("unable to copy using execCommand: ",c),o&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),a=!0}catch(m){o&&console.error("unable to copy using clipboardData: ",m),o&&console.error("falling back to prompt"),i=Ma("message"in e?e.message:za),window.prompt(i,t)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(r):s.removeAllRanges()),l&&document.body.removeChild(l),n()}return a}let Dt=class extends A{constructor(){super(...arguments),this.serverInfo={flowVersion:"",vaadinVersion:"",javaVersion:"",osVersion:"",productName:""}}createRenderRoot(){return this}render(){return b`
+
`}};v([w({type:Object})],Po.prototype,"_devTools",void 0);Po=v([M("vaadin-dev-tools-log")],Po);var La=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,o=[],i=0;i"u"){o&&console.warn("unable to use e.clipboardData"),o&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var m=en[e.format]||en.default;window.clipboardData.setData(m,t)}else c.clipboardData.clearData(),c.clipboardData.setData(e.format,t);e.onCopy&&(c.preventDefault(),e.onCopy(c.clipboardData))}),document.body.appendChild(l),r.selectNodeContents(l),s.addRange(r);var d=document.execCommand("copy");if(!d)throw new Error("copy command was unsuccessful");a=!0}catch(c){o&&console.error("unable to copy using execCommand: ",c),o&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),a=!0}catch(m){o&&console.error("unable to copy using clipboardData: ",m),o&&console.error("falling back to prompt"),i=Ma("message"in e?e.message:za),window.prompt(i,t)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(r):s.removeAllRanges()),l&&document.body.removeChild(l),n()}return a}let Dt=class extends A{constructor(){super(...arguments),this.serverInfo={flowVersion:"",vaadinVersion:"",javaVersion:"",osVersion:"",productName:""}}createRenderRoot(){return this}render(){return b`
${this.serverInfo.productName}
@@ -1082,7 +1082,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin
`}handleMessage(t){return(t==null?void 0:t.command)==="serverInfo"?(this.serverInfo=t.data,!0):!1}copyInfoToClipboard(){const t=this.renderRoot.querySelectorAll(".info-tray dt, .info-tray dd"),e=Array.from(t).map(o=>(o.localName==="dd"?": ":` -`)+o.textContent.trim()).join("").replace(/^\n/,"");Va(e),this._devTools.showNotification(U.INFORMATION,"Environment information copied to clipboard",void 0,void 0,"versionInfoCopied")}};v([_({type:Object})],Dt.prototype,"_devTools",void 0);v([I()],Dt.prototype,"serverInfo",void 0);Dt=v([M("vaadin-dev-tools-info")],Dt);var T,U;(function(t){t.LOG="log",t.INFORMATION="information",t.WARNING="warning",t.ERROR="error"})(U||(U={}));let S=T=class extends A{static get styles(){return[E` +`)+o.textContent.trim()).join("").replace(/^\n/,"");Va(e),this._devTools.showNotification(U.INFORMATION,"Environment information copied to clipboard",void 0,void 0,"versionInfoCopied")}};v([w({type:Object})],Dt.prototype,"_devTools",void 0);v([I()],Dt.prototype,"serverInfo",void 0);Dt=v([M("vaadin-dev-tools-info")],Dt);var T,U;(function(t){t.LOG="log",t.INFORMATION="information",t.WARNING="warning",t.ERROR="error"})(U||(U={}));let S=T=class extends A{static get styles(){return[_` :host { --dev-tools-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif; @@ -1763,7 +1763,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin background-color: var(--dev-tools-background-color-active-blurred); } } - `,Rn]}static get isActive(){const t=window.sessionStorage.getItem(T.ACTIVE_KEY_IN_SESSION_STORAGE);return t===null||t!=="false"}static notificationDismissed(t){const e=window.localStorage.getItem(T.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE);return e!==null&&e.includes(t)}elementTelemetry(){let t={};try{const e=localStorage.getItem("vaadin.statistics.basket");if(!e)return;t=JSON.parse(e)}catch{return}this.frontendConnection&&this.frontendConnection.sendTelemetry(t)}openWebSocketConnection(){this.frontendStatus=C.UNAVAILABLE,this.javaStatus=C.UNAVAILABLE;const t=l=>this.log(U.ERROR,l),e=()=>{this.showSplashMessage("Reloading…");const l=window.sessionStorage.getItem(T.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE),a=l?parseInt(l,10)+1:1;window.sessionStorage.setItem(T.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE,a.toString()),window.sessionStorage.setItem(T.TRIGGERED_KEY_IN_SESSION_STORAGE,"true"),window.location.reload()},o=(l,a)=>{let d=document.head.querySelector(`style[data-file-path='${l}']`);d?(this.log(U.INFORMATION,"Hot update of "+l),d.textContent=a,document.dispatchEvent(new CustomEvent("vaadin-theme-updated"))):e()},i=new Me(this.getDedicatedWebSocketUrl());i.onHandshake=()=>{this.log(U.LOG,"Vaadin development mode initialized"),T.isActive||i.setActive(!1),this.elementTelemetry()},i.onConnectionError=t,i.onReload=e,i.onUpdate=o,i.onStatusChange=l=>{this.frontendStatus=l},i.onMessage=l=>this.handleFrontendMessage(l),this.frontendConnection=i;let n;this.backend===T.SPRING_BOOT_DEVTOOLS&&this.springBootLiveReloadPort?(n=new Me(this.getSpringBootWebSocketUrl(window.location)),n.onHandshake=()=>{T.isActive||n.setActive(!1)},n.onReload=e,n.onConnectionError=t):this.backend===T.JREBEL||this.backend===T.HOTSWAP_AGENT?n=i:n=new Me(void 0);const r=n.onStatusChange;n.onStatusChange=l=>{r(l),this.javaStatus=l};const s=n.onHandshake;n.onHandshake=()=>{s(),this.backend&&this.log(U.INFORMATION,`Java live reload available: ${T.BACKEND_DISPLAY_NAME[this.backend]}`)},this.javaConnection=n,this.backend||this.showNotification(U.WARNING,"Java live reload unavailable","Live reload for Java changes is currently not set up. Find out how to make use of this functionality to boost your workflow.","https://vaadin.com/docs/latest/flow/configuration/live-reload","liveReloadUnavailable")}tabHandleMessage(t,e){const o=t;return o.handleMessage&&o.handleMessage.call(t,e)}handleFrontendMessage(t){for(const e of this.tabs)if(e.element&&this.tabHandleMessage(e.element,t))return;if((t==null?void 0:t.command)==="featureFlags")this.features=t.data.features;else if((t==null?void 0:t.command)==="themeEditorState"){const e=!!window.Vaadin.Flow;this.themeEditorState=t.data,e&&this.themeEditorState!==je.disabled&&(this.tabs.push({id:"theme-editor",title:"Theme Editor (Preview)",render:()=>this.renderThemeEditor()}),this.requestUpdate())}else this.unhandledMessages.push(t)}getDedicatedWebSocketUrl(){function t(o){const i=document.createElement("div");return i.innerHTML=``,i.firstChild.href}if(this.url===void 0)return;const e=t(this.url);if(!e.startsWith("http://")&&!e.startsWith("https://")){console.error("The protocol of the url should be http or https for live reload to work.");return}return`${e.replace(/^http/,"ws")}?v-r=push&debug_window`}getSpringBootWebSocketUrl(t){const{hostname:e}=t,o=t.protocol==="https:"?"wss":"ws";if(e.endsWith("gitpod.io")){const i=e.replace(/.*?-/,"");return`${o}://${this.springBootLiveReloadPort}-${i}`}else return`${o}://${e}:${this.springBootLiveReloadPort}`}constructor(){super(),this.unhandledMessages=[],this.expanded=!1,this.messages=[],this.notifications=[],this.frontendStatus=C.UNAVAILABLE,this.javaStatus=C.UNAVAILABLE,this.tabs=[{id:"log",title:"Log",render:"vaadin-dev-tools-log"},{id:"info",title:"Info",render:"vaadin-dev-tools-info"},{id:"features",title:"Feature Flags",render:()=>this.renderFeatures()}],this.activeTab="log",this.features=[],this.unreadErrors=!1,this.componentPickActive=!1,this.themeEditorState=je.disabled,this.nextMessageId=1,this.transitionDuration=0,window.Vaadin.Flow&&this.tabs.push({id:"code",title:"Code",render:()=>this.renderCode()})}connectedCallback(){if(super.connectedCallback(),this.catchErrors(),this.disableEventListener=o=>this.demoteSplashMessage(),document.body.addEventListener("focus",this.disableEventListener),document.body.addEventListener("click",this.disableEventListener),window.sessionStorage.getItem(T.TRIGGERED_KEY_IN_SESSION_STORAGE)){const o=new Date,i=`${`0${o.getHours()}`.slice(-2)}:${`0${o.getMinutes()}`.slice(-2)}:${`0${o.getSeconds()}`.slice(-2)}`;this.showSplashMessage(`Page reloaded at ${i}`),window.sessionStorage.removeItem(T.TRIGGERED_KEY_IN_SESSION_STORAGE)}this.transitionDuration=parseInt(window.getComputedStyle(this).getPropertyValue("--dev-tools-transition-duration"),10);const t=window;t.Vaadin=t.Vaadin||{},t.Vaadin.devTools=Object.assign(this,t.Vaadin.devTools),document.documentElement.addEventListener("vaadin-overlay-outside-click",o=>{const i=o,n=i.target.owner;n&&ws(this,n)||i.detail.sourceEvent.composedPath().includes(this)&&o.preventDefault()});const e=window.Vaadin;e.devToolsPlugins&&(Array.from(e.devToolsPlugins).forEach(o=>this.initPlugin(o)),e.devToolsPlugins={push:o=>this.initPlugin(o)}),this.openWebSocketConnection(),Oa()}async initPlugin(t){const e=this;t.init({addTab:(o,i)=>{e.tabs.push({id:o,title:o,render:i})},send:function(o,i){e.frontendConnection.send(o,i)}})}format(t){return t.toString()}catchErrors(){const t=window.Vaadin.ConsoleErrors;t&&t.forEach(e=>{this.log(U.ERROR,e.map(o=>this.format(o)).join(" "))}),window.Vaadin.ConsoleErrors={push:e=>{this.log(U.ERROR,e.map(o=>this.format(o)).join(" "))}}}disconnectedCallback(){this.disableEventListener&&(document.body.removeEventListener("focus",this.disableEventListener),document.body.removeEventListener("click",this.disableEventListener)),super.disconnectedCallback()}toggleExpanded(){this.notifications.slice().forEach(t=>this.dismissNotification(t.id)),this.expanded=!this.expanded,this.expanded&&this.root.focus()}showSplashMessage(t){this.splashMessage=t,this.splashMessage&&(this.expanded?this.demoteSplashMessage():setTimeout(()=>{this.demoteSplashMessage()},T.AUTO_DEMOTE_NOTIFICATION_DELAY))}demoteSplashMessage(){this.splashMessage&&this.log(U.LOG,this.splashMessage),this.showSplashMessage(void 0)}checkLicense(t){this.frontendConnection?this.frontendConnection.sendLicenseCheck(t):In({message:"Internal error: no connection",product:t})}log(t,e,o,i){const n=this.nextMessageId;for(this.nextMessageId+=1,this.messages.push({id:n,type:t,message:e,details:o,link:i,dontShowAgain:!1,deleted:!1});this.messages.length>T.MAX_LOG_ROWS;)this.messages.shift();this.requestUpdate(),this.updateComplete.then(()=>{const r=this.renderRoot.querySelector(".message-tray .message:last-child");this.expanded&&r?(setTimeout(()=>r.scrollIntoView({behavior:"smooth"}),this.transitionDuration),this.unreadErrors=!1):t===U.ERROR&&(this.unreadErrors=!0)})}showNotification(t,e,o,i,n){if(n===void 0||!T.notificationDismissed(n)){if(this.notifications.filter(s=>s.persistentId===n).filter(s=>!s.deleted).length>0)return;const r=this.nextMessageId;this.nextMessageId+=1,this.notifications.push({id:r,type:t,message:e,details:o,link:i,persistentId:n,dontShowAgain:!1,deleted:!1}),i===void 0&&setTimeout(()=>{this.dismissNotification(r)},T.AUTO_DEMOTE_NOTIFICATION_DELAY),this.requestUpdate()}else this.log(t,e,o,i)}dismissNotification(t){const e=this.findNotificationIndex(t);if(e!==-1&&!this.notifications[e].deleted){const o=this.notifications[e];if(o.dontShowAgain&&o.persistentId&&!T.notificationDismissed(o.persistentId)){let i=window.localStorage.getItem(T.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE);i=i===null?o.persistentId:`${i},${o.persistentId}`,window.localStorage.setItem(T.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE,i)}o.deleted=!0,this.log(o.type,o.message,o.details,o.link),setTimeout(()=>{const i=this.findNotificationIndex(t);i!==-1&&(this.notifications.splice(i,1),this.requestUpdate())},this.transitionDuration)}}findNotificationIndex(t){let e=-1;return this.notifications.some((o,i)=>o.id===t?(e=i,!0):!1),e}toggleDontShowAgain(t){const e=this.findNotificationIndex(t);if(e!==-1&&!this.notifications[e].deleted){const o=this.notifications[e];o.dontShowAgain=!o.dontShowAgain,this.requestUpdate()}}setActive(t){var e,o;(e=this.frontendConnection)==null||e.setActive(t),(o=this.javaConnection)==null||o.setActive(t),window.sessionStorage.setItem(T.ACTIVE_KEY_IN_SESSION_STORAGE,t?"true":"false")}getStatusColor(t){return t===C.ACTIVE?"var(--dev-tools-green-color)":t===C.INACTIVE?"var(--dev-tools-grey-color)":t===C.UNAVAILABLE?"var(--dev-tools-yellow-hsl)":t===C.ERROR?"var(--dev-tools-red-color)":"none"}renderMessage(t){return b` + `,Rn]}static get isActive(){const t=window.sessionStorage.getItem(T.ACTIVE_KEY_IN_SESSION_STORAGE);return t===null||t!=="false"}static notificationDismissed(t){const e=window.localStorage.getItem(T.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE);return e!==null&&e.includes(t)}elementTelemetry(){let t={};try{const e=localStorage.getItem("vaadin.statistics.basket");if(!e)return;t=JSON.parse(e)}catch{return}this.frontendConnection&&this.frontendConnection.sendTelemetry(t)}openWebSocketConnection(){this.frontendStatus=C.UNAVAILABLE,this.javaStatus=C.UNAVAILABLE;const t=l=>this.log(U.ERROR,l),e=()=>{this.showSplashMessage("Reloading…");const l=window.sessionStorage.getItem(T.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE),a=l?parseInt(l,10)+1:1;window.sessionStorage.setItem(T.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE,a.toString()),window.sessionStorage.setItem(T.TRIGGERED_KEY_IN_SESSION_STORAGE,"true"),window.location.reload()},o=(l,a)=>{let d=document.head.querySelector(`style[data-file-path='${l}']`);d?(this.log(U.INFORMATION,"Hot update of "+l),d.textContent=a,document.dispatchEvent(new CustomEvent("vaadin-theme-updated"))):e()},i=new Ve(this.getDedicatedWebSocketUrl());i.onHandshake=()=>{this.log(U.LOG,"Vaadin development mode initialized"),T.isActive||i.setActive(!1),this.elementTelemetry()},i.onConnectionError=t,i.onReload=e,i.onUpdate=o,i.onStatusChange=l=>{this.frontendStatus=l},i.onMessage=l=>this.handleFrontendMessage(l),this.frontendConnection=i;let n;this.backend===T.SPRING_BOOT_DEVTOOLS&&this.springBootLiveReloadPort?(n=new Ve(this.getSpringBootWebSocketUrl(window.location)),n.onHandshake=()=>{T.isActive||n.setActive(!1)},n.onReload=e,n.onConnectionError=t):this.backend===T.JREBEL||this.backend===T.HOTSWAP_AGENT?n=i:n=new Ve(void 0);const r=n.onStatusChange;n.onStatusChange=l=>{r(l),this.javaStatus=l};const s=n.onHandshake;n.onHandshake=()=>{s(),this.backend&&this.log(U.INFORMATION,`Java live reload available: ${T.BACKEND_DISPLAY_NAME[this.backend]}`)},this.javaConnection=n,this.backend||this.showNotification(U.WARNING,"Java live reload unavailable","Live reload for Java changes is currently not set up. Find out how to make use of this functionality to boost your workflow.","https://vaadin.com/docs/latest/flow/configuration/live-reload","liveReloadUnavailable")}tabHandleMessage(t,e){const o=t;return o.handleMessage&&o.handleMessage.call(t,e)}handleFrontendMessage(t){for(const e of this.tabs)if(e.element&&this.tabHandleMessage(e.element,t))return;if((t==null?void 0:t.command)==="featureFlags")this.features=t.data.features;else if((t==null?void 0:t.command)==="themeEditorState"){const e=!!window.Vaadin.Flow;this.themeEditorState=t.data,e&&this.themeEditorState!==Ue.disabled&&(this.tabs.push({id:"theme-editor",title:"Theme Editor (Preview)",render:()=>this.renderThemeEditor()}),this.requestUpdate())}else this.unhandledMessages.push(t)}getDedicatedWebSocketUrl(){function t(o){const i=document.createElement("div");return i.innerHTML=``,i.firstChild.href}if(this.url===void 0)return;const e=t(this.url);if(!e.startsWith("http://")&&!e.startsWith("https://")){console.error("The protocol of the url should be http or https for live reload to work.");return}return`${e.replace(/^http/,"ws")}?v-r=push&debug_window`}getSpringBootWebSocketUrl(t){const{hostname:e}=t,o=t.protocol==="https:"?"wss":"ws";if(e.endsWith("gitpod.io")){const i=e.replace(/.*?-/,"");return`${o}://${this.springBootLiveReloadPort}-${i}`}else return`${o}://${e}:${this.springBootLiveReloadPort}`}constructor(){super(),this.unhandledMessages=[],this.expanded=!1,this.messages=[],this.notifications=[],this.frontendStatus=C.UNAVAILABLE,this.javaStatus=C.UNAVAILABLE,this.tabs=[{id:"log",title:"Log",render:"vaadin-dev-tools-log"},{id:"info",title:"Info",render:"vaadin-dev-tools-info"},{id:"features",title:"Feature Flags",render:()=>this.renderFeatures()}],this.activeTab="log",this.features=[],this.unreadErrors=!1,this.componentPickActive=!1,this.themeEditorState=Ue.disabled,this.nextMessageId=1,this.transitionDuration=0,window.Vaadin.Flow&&this.tabs.push({id:"code",title:"Code",render:()=>this.renderCode()})}connectedCallback(){if(super.connectedCallback(),this.catchErrors(),this.disableEventListener=o=>this.demoteSplashMessage(),document.body.addEventListener("focus",this.disableEventListener),document.body.addEventListener("click",this.disableEventListener),window.sessionStorage.getItem(T.TRIGGERED_KEY_IN_SESSION_STORAGE)){const o=new Date,i=`${`0${o.getHours()}`.slice(-2)}:${`0${o.getMinutes()}`.slice(-2)}:${`0${o.getSeconds()}`.slice(-2)}`;this.showSplashMessage(`Page reloaded at ${i}`),window.sessionStorage.removeItem(T.TRIGGERED_KEY_IN_SESSION_STORAGE)}this.transitionDuration=parseInt(window.getComputedStyle(this).getPropertyValue("--dev-tools-transition-duration"),10);const t=window;t.Vaadin=t.Vaadin||{},t.Vaadin.devTools=Object.assign(this,t.Vaadin.devTools),document.documentElement.addEventListener("vaadin-overlay-outside-click",o=>{const i=o,n=i.target.owner;n&&ws(this,n)||i.detail.sourceEvent.composedPath().includes(this)&&o.preventDefault()});const e=window.Vaadin;e.devToolsPlugins&&(Array.from(e.devToolsPlugins).forEach(o=>this.initPlugin(o)),e.devToolsPlugins={push:o=>this.initPlugin(o)}),this.openWebSocketConnection(),Oa()}async initPlugin(t){const e=this;t.init({addTab:(o,i)=>{e.tabs.push({id:o,title:o,render:i})},send:function(o,i){e.frontendConnection.send(o,i)}})}format(t){return t.toString()}catchErrors(){const t=window.Vaadin.ConsoleErrors;t&&t.forEach(e=>{this.log(U.ERROR,e.map(o=>this.format(o)).join(" "))}),window.Vaadin.ConsoleErrors={push:e=>{this.log(U.ERROR,e.map(o=>this.format(o)).join(" "))}}}disconnectedCallback(){this.disableEventListener&&(document.body.removeEventListener("focus",this.disableEventListener),document.body.removeEventListener("click",this.disableEventListener)),super.disconnectedCallback()}toggleExpanded(){this.notifications.slice().forEach(t=>this.dismissNotification(t.id)),this.expanded=!this.expanded,this.expanded&&this.root.focus()}showSplashMessage(t){this.splashMessage=t,this.splashMessage&&(this.expanded?this.demoteSplashMessage():setTimeout(()=>{this.demoteSplashMessage()},T.AUTO_DEMOTE_NOTIFICATION_DELAY))}demoteSplashMessage(){this.splashMessage&&this.log(U.LOG,this.splashMessage),this.showSplashMessage(void 0)}checkLicense(t){this.frontendConnection?this.frontendConnection.sendLicenseCheck(t):In({message:"Internal error: no connection",product:t})}log(t,e,o,i){const n=this.nextMessageId;for(this.nextMessageId+=1,this.messages.push({id:n,type:t,message:e,details:o,link:i,dontShowAgain:!1,deleted:!1});this.messages.length>T.MAX_LOG_ROWS;)this.messages.shift();this.requestUpdate(),this.updateComplete.then(()=>{const r=this.renderRoot.querySelector(".message-tray .message:last-child");this.expanded&&r?(setTimeout(()=>r.scrollIntoView({behavior:"smooth"}),this.transitionDuration),this.unreadErrors=!1):t===U.ERROR&&(this.unreadErrors=!0)})}showNotification(t,e,o,i,n){if(n===void 0||!T.notificationDismissed(n)){if(this.notifications.filter(s=>s.persistentId===n).filter(s=>!s.deleted).length>0)return;const r=this.nextMessageId;this.nextMessageId+=1,this.notifications.push({id:r,type:t,message:e,details:o,link:i,persistentId:n,dontShowAgain:!1,deleted:!1}),i===void 0&&setTimeout(()=>{this.dismissNotification(r)},T.AUTO_DEMOTE_NOTIFICATION_DELAY),this.requestUpdate()}else this.log(t,e,o,i)}dismissNotification(t){const e=this.findNotificationIndex(t);if(e!==-1&&!this.notifications[e].deleted){const o=this.notifications[e];if(o.dontShowAgain&&o.persistentId&&!T.notificationDismissed(o.persistentId)){let i=window.localStorage.getItem(T.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE);i=i===null?o.persistentId:`${i},${o.persistentId}`,window.localStorage.setItem(T.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE,i)}o.deleted=!0,this.log(o.type,o.message,o.details,o.link),setTimeout(()=>{const i=this.findNotificationIndex(t);i!==-1&&(this.notifications.splice(i,1),this.requestUpdate())},this.transitionDuration)}}findNotificationIndex(t){let e=-1;return this.notifications.some((o,i)=>o.id===t?(e=i,!0):!1),e}toggleDontShowAgain(t){const e=this.findNotificationIndex(t);if(e!==-1&&!this.notifications[e].deleted){const o=this.notifications[e];o.dontShowAgain=!o.dontShowAgain,this.requestUpdate()}}setActive(t){var e,o;(e=this.frontendConnection)==null||e.setActive(t),(o=this.javaConnection)==null||o.setActive(t),window.sessionStorage.setItem(T.ACTIVE_KEY_IN_SESSION_STORAGE,t?"true":"false")}getStatusColor(t){return t===C.ACTIVE?"var(--dev-tools-green-color)":t===C.INACTIVE?"var(--dev-tools-grey-color)":t===C.UNAVAILABLE?"var(--dev-tools-yellow-hsl)":t===C.ERROR?"var(--dev-tools-red-color)":"none"}renderMessage(t){return b`
@@ -1864,7 +1864,7 @@ This is probably caused by illegal octal escape sequences.`),{_$litType$:t,strin style="background: linear-gradient(to right, ${this.getStatusColor(this.frontendStatus)} 50%, ${this.getStatusColor(this.javaStatus)} 50%)" > ${this.splashMessage?b`${this.splashMessage}
`:$} -
`}updated(t){var e;super.updated(t);const o=this.renderRoot.querySelector("#tabContainer"),i=[];if(this.tabs.forEach(r=>{r.element||(typeof r.render=="function"?r.element=document.createElement("div"):(r.element=document.createElement(r.render),r.element._devTools=this),i.push(r.element))}),(o==null?void 0:o.childElementCount)!==this.tabs.length){for(let r=0;rr&&o.children[r]===s.element||o.insertBefore(s.element,o.children[r])}for(;(o==null?void 0:o.childElementCount)>this.tabs.length;)(e=o.lastElementChild)==null||e.remove()}for(const r of this.tabs){typeof r.render=="function"?we(r.render(),r.element):r.element.requestUpdate&&r.element.requestUpdate();const s=r.id===this.activeTab;r.element.hidden=!s}for(const r of i)for(var n=0;n +
`}updated(t){var e;super.updated(t);const o=this.renderRoot.querySelector("#tabContainer"),i=[];if(this.tabs.forEach(r=>{r.element||(typeof r.render=="function"?r.element=document.createElement("div"):(r.element=document.createElement(r.render),r.element._devTools=this),i.push(r.element))}),(o==null?void 0:o.childElementCount)!==this.tabs.length){for(let r=0;rr&&o.children[r]===s.element||o.insertBefore(s.element,o.children[r])}for(;(o==null?void 0:o.childElementCount)>this.tabs.length;)(e=o.lastElementChild)==null||e.remove()}for(const r of this.tabs){typeof r.render=="function"?Se(r.render(),r.element):r.element.requestUpdate&&r.element.requestUpdate();const s=r.id===this.activeTab;r.element.hidden=!s}for(const r of i)for(var n=0;n