@everymatrix/lottery-game-page 1.73.1 → 1.73.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-accordion_15.cjs.entry.js +388 -394
- package/dist/esm/helper-accordion_15.entry.js +388 -394
- package/dist/lottery-game-page/helper-accordion_15.entry.js +126 -131
- package/package.json +1 -1
- package/dist/collection/components/lottery-game-page/lottery-game-page.stories.js +0 -58
- package/dist/types/components/lottery-game-page/lottery-game-page.stories.d.ts +0 -5
|
@@ -193,33 +193,33 @@ const getTranslations$8 = (data) => {
|
|
|
193
193
|
});
|
|
194
194
|
};
|
|
195
195
|
|
|
196
|
-
var
|
|
196
|
+
var Sa=Object.defineProperty,ka=Object.defineProperties;var Ta=Object.getOwnPropertyDescriptors;var _o=Object.getOwnPropertySymbols;var Pa=Object.prototype.hasOwnProperty,Oa=Object.prototype.propertyIsEnumerable;var ti=(s,t,e)=>t in s?Sa(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,H=(s,t)=>{for(var e in t||(t={}))Pa.call(t,e)&&ti(s,e,t[e]);if(_o)for(var e of _o(t))Oa.call(t,e)&&ti(s,e,t[e]);return s},ze=(s,t)=>ka(s,Ta(t));var v=(s,t,e)=>(ti(s,typeof t!="symbol"?t+"":t,e),e);var Me=(s,t,e)=>new Promise((i,o)=>{var r=l=>{try{a(e.next(l));}catch(d){o(d);}},n=l=>{try{a(e.throw(l));}catch(d){o(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(s,t)).next());});/**
|
|
197
197
|
* @license
|
|
198
198
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
199
199
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
200
|
-
*/function
|
|
200
|
+
*/function x(s,t="24.5.12"){Object.defineProperty(s,"version",{get(){return t}});const e=customElements.get(s.is);if(!e)customElements.define(s.is,s);else {const i=e.version;i&&s.version&&i===s.version?console.warn(`The component ${s.is} has been loaded twice`):console.error(`Tried to define ${s.is} version ${s.version} when version ${e.version} is already in use. Something will probably break.`);}}/**
|
|
201
201
|
* @license
|
|
202
202
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
203
203
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
204
|
-
*/let
|
|
204
|
+
*/let Da=class extends HTMLElement{static get is(){return "vaadin-lumo-styles"}};x(Da);/**
|
|
205
205
|
* @license
|
|
206
206
|
* Copyright 2019 Google LLC
|
|
207
207
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
208
|
-
*/const
|
|
208
|
+
*/const bt=globalThis,us=bt.ShadowRoot&&(bt.ShadyCSS===void 0||bt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ps=Symbol(),mo=new WeakMap;let Lt=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==ps)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const e=this.t;if(us&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=mo.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&mo.set(e,t));}return t}toString(){return this.cssText}};const za=s=>new Lt(typeof s=="string"?s:s+"",void 0,ps),p=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,o,r)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[r+1],s[0]);return new Lt(e,s,ps)},_s=(s,t)=>{if(us)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),o=bt.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i);}},fo=us?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return za(e)})(s):s;/**
|
|
209
209
|
* @license
|
|
210
210
|
* Copyright 2017 Google LLC
|
|
211
211
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
212
|
-
*/const{is:
|
|
212
|
+
*/const{is:Ma,defineProperty:Na,getOwnPropertyDescriptor:La,getOwnPropertyNames:Va,getOwnPropertySymbols:Fa,getPrototypeOf:Ba}=Object,Z=globalThis,vo=Z.trustedTypes,Ra=vo?vo.emptyScript:"",ii=Z.reactiveElementPolyfillSupport,Ue=(s,t)=>s,Pi={toAttribute(s,t){switch(t){case Boolean:s=s?Ra:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s);}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s);}catch(i){e=null;}}return e}},xr=(s,t)=>!Ma(s,t),go={attribute:!0,type:String,converter:Pi,reflect:!1,useDefault:!1,hasChanged:xr};(Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(Z.litPropertyMetadata)!=null||(Z.litPropertyMetadata=new WeakMap);class be extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=go){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Na(this.prototype,t,o);}}static getPropertyDescriptor(t,e,i){var n;const{get:o,set:r}=(n=La(this.prototype,t))!=null?n:{get(){return this[e]},set(a){this[e]=a;}};return {get:o,set(a){const l=o==null?void 0:o.call(this);r==null||r.call(this,a),this.requestUpdate(t,l,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return (e=this.elementProperties.get(t))!=null?e:go}static _$Ei(){if(this.hasOwnProperty(Ue("elementProperties")))return;const t=Ba(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(Ue("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ue("properties"))){const e=this.properties,i=[...Va(e),...Fa(e)];for(const o of i)this.createProperty(o,e[o]);}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,o]of e)this.elementProperties.set(i,o);}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const o=this._$Eu(e,i);o!==void 0&&this._$Eh.set(o,e);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)e.unshift(fo(o));}else t!==void 0&&e.push(fo(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this));}addController(t){var e,i;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)==null||i.call(t));}removeController(t){var e;(e=this._$EO)==null||e.delete(t);}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){var e;const t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return _s(t,this.constructor.elementStyles),t}connectedCallback(){var e;(this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(i=>{var o;return (o=i.hostConnected)==null?void 0:o.call(i)});}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return (i=e.hostDisconnected)==null?void 0:i.call(e)});}attributeChangedCallback(t,e,i){this._$AK(t,i);}_$ET(t,e){var r;const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(o!==void 0&&i.reflect===!0){const n=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Pi).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null;}}_$AK(t,e){var r,n,a,l;const i=this.constructor,o=i._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const d=i.getPropertyOptions(o),h=typeof d.converter=="function"?{fromAttribute:d.converter}:((r=d.converter)==null?void 0:r.fromAttribute)!==void 0?d.converter:Pi;this._$Em=o,this[o]=(l=(a=h.fromAttribute(e,d.type))!=null?a:(n=this._$Ej)==null?void 0:n.get(o))!=null?l:null,this._$Em=null;}}requestUpdate(t,e,i){var o,r;if(t!==void 0){const n=this.constructor,a=this[t];if(i!=null||(i=n.getPropertyOptions(t)),!(((o=i.hasChanged)!=null?o:xr)(a,e)||i.useDefault&&i.reflect&&a===((r=this._$Ej)==null?void 0:r.get(t))&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i);}this.isUpdatePending===!1&&(this._$ES=this._$EP());}C(t,e,{useDefault:i,reflect:o,wrapped:r},n){var a,l,d;i&&!((a=this._$Ej)!=null?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(l=n!=null?n:e)!=null?l:this[t]),r!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&((d=this._$Eq)!=null?d:this._$Eq=new Set).add(t));}_$EP(){return Me(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES;}catch(e){Promise.reject(e);}const t=this.scheduleUpdate();return t!=null&&(yield t),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0;}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,a]of r){const{wrapped:l}=a,d=this[n];l!==!0||this._$AL.has(n)||d===void 0||this.C(n,void 0,a,d);}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(o=this._$EO)==null||o.forEach(r=>{var n;return (n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$EM();}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e);}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var o;return (o=i.hostUpdated)==null?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM();}updated(t){}firstUpdated(t){}}var fr;be.elementStyles=[],be.shadowRootOptions={mode:"open"},be[Ue("elementProperties")]=new Map,be[Ue("finalized")]=new Map,ii==null||ii({ReactiveElement:be}),((fr=Z.reactiveElementVersions)!=null?fr:Z.reactiveElementVersions=[]).push("2.1.0");/**
|
|
213
213
|
* @license
|
|
214
214
|
* Copyright 2017 Google LLC
|
|
215
215
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
216
|
-
*/const
|
|
217
|
-
\f\r]`,
|
|
218
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Co=/'/g,wo=/"/g,Ir=/^(?:script|style|textarea|title)$/i,
|
|
216
|
+
*/const We=globalThis,It=We.trustedTypes,bo=It?It.createPolicy("lit-html",{createHTML:s=>s}):void 0,Cr="$lit$",Q=`lit$${Math.random().toFixed(9).slice(2)}$`,wr="?"+Q,$a=`<${wr}>`,ue=document,Ye=()=>ue.createComment(""),Ge=s=>s===null||typeof s!="object"&&typeof s!="function",ms=Array.isArray,Ha=s=>ms(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",si=`[
|
|
217
|
+
\f\r]`,Ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yo=/-->/g,xo=/>/g,ae=RegExp(`>|${si}(?:([^\\s"'>=/]+)(${si}*=${si}*(?:[^
|
|
218
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Co=/'/g,wo=/"/g,Ir=/^(?:script|style|textarea|title)$/i,Ie=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),Io=new WeakMap,le=ue.createTreeWalker(ue,129);function Ar(s,t){if(!ms(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return bo!==void 0?bo.createHTML(t):t}const qa=(s,t)=>{const e=s.length-1,i=[];let o,r=t===2?"<svg>":t===3?"<math>":"",n=Ne;for(let a=0;a<e;a++){const l=s[a];let d,h,c=-1,u=0;for(;u<l.length&&(n.lastIndex=u,h=n.exec(l),h!==null);)u=n.lastIndex,n===Ne?h[1]==="!--"?n=yo:h[1]!==void 0?n=xo:h[2]!==void 0?(Ir.test(h[2])&&(o=RegExp("</"+h[2],"g")),n=ae):h[3]!==void 0&&(n=ae):n===ae?h[0]===">"?(n=o!=null?o:Ne,c=-1):h[1]===void 0?c=-2:(c=n.lastIndex-h[2].length,d=h[1],n=h[3]===void 0?ae:h[3]==='"'?wo:Co):n===wo||n===Co?n=ae:n===yo||n===xo?n=Ne:(n=ae,o=void 0);const _=n===ae&&s[a+1].startsWith("/>")?" ":"";r+=n===Ne?l+$a:c>=0?(i.push(d),l.slice(0,c)+Cr+l.slice(c)+Q+_):l+Q+(c===-2?a:_);}return [Ar(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class Ke{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,n=0;const a=t.length-1,l=this.parts,[d,h]=qa(t,e);if(this.el=Ke.createElement(d,i),le.currentNode=this.el.content,e===2||e===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes);}for(;(o=le.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const c of o.getAttributeNames())if(c.endsWith(Cr)){const u=h[n++],_=o.getAttribute(c).split(Q),m=/([.?@])?(.*)/.exec(u);l.push({type:1,index:r,name:m[2],strings:_,ctor:m[1]==="."?Wa:m[1]==="?"?ja:m[1]==="@"?Ya:Vt}),o.removeAttribute(c);}else c.startsWith(Q)&&(l.push({type:6,index:r}),o.removeAttribute(c));if(Ir.test(o.tagName)){const c=o.textContent.split(Q),u=c.length-1;if(u>0){o.textContent=It?It.emptyScript:"";for(let _=0;_<u;_++)o.append(c[_],Ye()),le.nextNode(),l.push({type:2,index:++r});o.append(c[u],Ye());}}}else if(o.nodeType===8)if(o.data===wr)l.push({type:2,index:r});else {let c=-1;for(;(c=o.data.indexOf(Q,c+1))!==-1;)l.push({type:7,index:r}),c+=Q.length-1;}r++;}}static createElement(t,e){const i=ue.createElement("template");return i.innerHTML=t,i}}function Ae(s,t,e=s,i){var n,a,l;if(t===Ie)return t;let o=i!==void 0?(n=e._$Co)==null?void 0:n[i]:e._$Cl;const r=Ge(t)?void 0:t._$litDirective$;return (o==null?void 0:o.constructor)!==r&&((a=o==null?void 0:o._$AO)==null||a.call(o,!1),r===void 0?o=void 0:(o=new r(s),o._$AT(s,e,i)),i!==void 0?((l=e._$Co)!=null?l:e._$Co=[])[i]=o:e._$Cl=o),o!==void 0&&(t=Ae(s,o._$AS(s,t.values),o,i)),t}class Ua{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var d;const{el:{content:e},parts:i}=this._$AD,o=((d=t==null?void 0:t.creationScope)!=null?d:ue).importNode(e,!0);le.currentNode=o;let r=le.nextNode(),n=0,a=0,l=i[0];for(;l!==void 0;){if(n===l.index){let h;l.type===2?h=new nt(r,r.nextSibling,this,t):l.type===1?h=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(h=new Ga(r,this,t)),this._$AV.push(h),l=i[++a];}n!==(l==null?void 0:l.index)&&(r=le.nextNode(),n++);}return le.currentNode=ue,o}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++;}}class nt{get _$AU(){var t,e;return (e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,i,o){var r;this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=(r=o==null?void 0:o.isConnected)!=null?r:!0;}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ae(this,t,e),Ge(t)?t===T||t==null||t===""?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==Ie&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ha(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==T&&Ge(this._$AH)?this._$AA.nextSibling.data=t:this.T(ue.createTextNode(t)),this._$AH=t;}$(t){var r;const{values:e,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Ke.createElement(Ar(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===o)this._$AH.p(e);else {const n=new Ua(o,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n;}}_$AC(t){let e=Io.get(t.strings);return e===void 0&&Io.set(t.strings,e=new Ke(t)),e}k(t){ms(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new nt(this.O(Ye()),this.O(Ye()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o);}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o;}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t));}}class Vt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,r){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=T;}_$AI(t,e=this,i,o){const r=this.strings;let n=!1;if(r===void 0)t=Ae(this,t,e,0),n=!Ge(t)||t!==this._$AH&&t!==Ie,n&&(this._$AH=t);else {const a=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=Ae(this,a[i+l],e,l),d===Ie&&(d=this._$AH[l]),n||(n=!Ge(d)||d!==this._$AH[l]),d===T?t=T:t!==T&&(t+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d;}n&&!o&&this.j(t);}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"");}}class Wa extends Vt{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===T?void 0:t;}}class ja extends Vt{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T);}}class Ya extends Vt{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5;}_$AI(t,e=this){var n;if((t=(n=Ae(this,t,e,0))!=null?n:T)===Ie)return;const i=this._$AH,o=t===T&&i!==T||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==T&&(i===T||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)==null?void 0:e.host)!=null?i:this.element,t):this._$AH.handleEvent(t);}}class Ga{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i;}get _$AU(){return this._$AM._$AU}_$AI(t){Ae(this,t);}}const oi=We.litHtmlPolyfillSupport;var vr;oi==null||oi(Ke,nt),((vr=We.litHtmlVersions)!=null?vr:We.litHtmlVersions=[]).push("3.3.0");const Er=(s,t,e)=>{var r,n;const i=(r=e==null?void 0:e.renderBefore)!=null?r:t;let o=i._$litPart$;if(o===void 0){const a=(n=e==null?void 0:e.renderBefore)!=null?n:null;i._$litPart$=o=new nt(t.insertBefore(Ye(),a),a,void 0,e!=null?e:{});}return o._$AI(s),o};/**
|
|
219
219
|
* @license
|
|
220
220
|
* Copyright 2017 Google LLC
|
|
221
221
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
222
|
-
*/const
|
|
222
|
+
*/const he=globalThis;class ee extends be{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var e;const t=super.createRenderRoot();return ((e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Er(e,this.renderRoot,this.renderOptions);}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0);}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1);}render(){return Ie}}var gr;ee._$litElement$=!0,ee.finalized=!0,(gr=he.litElementHydrateSupport)==null||gr.call(he,{LitElement:ee});const ri=he.litElementPolyfillSupport;ri==null||ri({LitElement:ee});var br;((br=he.litElementVersions)!=null?br:he.litElementVersions=[]).push("4.2.0");/**
|
|
223
223
|
* @license
|
|
224
224
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
225
225
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -227,17 +227,17 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
227
227
|
* @license
|
|
228
228
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
229
229
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
230
|
-
*/const kr=[],
|
|
231
|
-
`)}const
|
|
230
|
+
*/const kr=[],Oi=new Set,fs=new Set;function Tr(s){return s&&Object.prototype.hasOwnProperty.call(s,"__themes")}function Ka(s){return Tr(customElements.get(s))}function Xa(s=[]){return [s].flat(1/0).filter(t=>t instanceof Lt?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function Pr(s,t){return (s||"").split(" ").some(e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t))}function Or(s){return s.map(t=>t.cssText).join(`
|
|
231
|
+
`)}const At="vaadin-themable-mixin-style";function Ja(s,t){const e=document.createElement("style");e.id=At,e.textContent=Or(s),t.content.appendChild(e);}function Qa(s){if(!s.shadowRoot)return;const t=s.constructor;if(s instanceof ee)[...s.shadowRoot.querySelectorAll("style")].forEach(e=>e.remove()),_s(s.shadowRoot,t.elementStyles);else {const e=s.shadowRoot.getElementById(At),i=t.prototype._template;e.textContent=i.content.getElementById(At).textContent;}}function Za(s){Oi.forEach(t=>{const e=t.deref();e instanceof s?Qa(e):e||Oi.delete(t);});}function Dr(s){if(s.prototype instanceof ee)s.elementStyles=s.finalizeStyles(s.styles);else {const t=s.prototype._template;t.content.getElementById(At).textContent=Or(s.getStylesForThis());}fs.forEach(t=>{const e=customElements.get(t);e!==s&&e.prototype instanceof s&&Dr(e);});}function el(s,t){const e=s.__themes;return !e||!t?!1:e.some(i=>i.styles.some(o=>t.some(r=>r.cssText===o.cssText)))}function f(s,t,e={}){t=Xa(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(s,t,e):kr.push({themeFor:s,styles:t,include:e.include,moduleId:e.moduleId}),s&&fs.forEach(i=>{if(Pr(s,i)&&Ka(i)){const o=customElements.get(i);el(o,t)?console.warn(`Registering styles that already exist for ${i}`):(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`),Dr(o),Za(o);}});}function Di(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():kr}function tl(s=""){let t=0;return s.startsWith("lumo-")||s.startsWith("material-")?t=1:s.startsWith("vaadin-")&&(t=2),t}function zr(s){const t=[];return s.include&&[].concat(s.include).forEach(e=>{const i=Di().find(o=>o.moduleId===e);i?t.push(...zr(i),...i.styles):console.warn(`Included moduleId ${e} not found in style registry`);},s.styles),t}function il(s){const t=`${s}-default-theme`,e=Di().filter(i=>i.moduleId!==t&&Pr(i.themeFor,s)).map(i=>ze(H({},i),{styles:[...zr(i),...i.styles],includePriority:tl(i.moduleId)})).sort((i,o)=>o.includePriority-i.includePriority);return e.length>0?e:Di().filter(i=>i.moduleId===t)}const E=s=>class extends Sr(s){constructor(){super(),Oi.add(new WeakRef(this));}static finalize(){if(super.finalize(),this.is&&fs.add(this.is),this.elementStyles)return;const e=this.prototype._template;!e||Tr(this)||Ja(this.getStylesForThis(),e);}static finalizeStyles(e){const i=this.getStylesForThis();return e?[...[e].flat(1/0),...i]:i}static getStylesForThis(){const e=s.__themes||[],i=Object.getPrototypeOf(this.prototype),o=(i?i.constructor.__themes:[])||[];this.__themes=[...e,...o,...il(this.is)];const r=this.__themes.flatMap(n=>n.styles);return r.filter((n,a)=>a===r.lastIndexOf(n))}};/**
|
|
232
232
|
* @license
|
|
233
233
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
234
234
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
235
|
-
*/const
|
|
236
|
-
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},
|
|
235
|
+
*/const sl=(s,...t)=>{const e=document.createElement("style");e.id=s,e.textContent=t.map(i=>i.toString()).join(`
|
|
236
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},ke=(s,...t)=>{sl(`lumo-${s}`,t);};/**
|
|
237
237
|
* @license
|
|
238
238
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
239
239
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
240
|
-
*/const
|
|
240
|
+
*/const ol=p`
|
|
241
241
|
:host {
|
|
242
242
|
/* Base (background) */
|
|
243
243
|
--lumo-base-color: #fff;
|
|
@@ -322,7 +322,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
322
322
|
--lumo-disabled-text-color: GrayText;
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
`;
|
|
325
|
+
`;ke("color-props",ol);const rl=p`
|
|
326
326
|
[theme~='dark'] {
|
|
327
327
|
/* Base (background) */
|
|
328
328
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -440,11 +440,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
440
440
|
pre code {
|
|
441
441
|
background: transparent;
|
|
442
442
|
}
|
|
443
|
-
`;f("",
|
|
443
|
+
`;f("",rl,{moduleId:"lumo-color"});/**
|
|
444
444
|
* @license
|
|
445
445
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
446
446
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
447
|
-
*/const
|
|
447
|
+
*/const nl=p`
|
|
448
448
|
@font-face {
|
|
449
449
|
font-family: 'lumo-icons';
|
|
450
450
|
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABEgAAsAAAAAIjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuKY21hcAAAAYgAAAD4AAADrsCU8d5nbHlmAAACgAAAC2cAABeAWri7U2hlYWQAAA3oAAAAMAAAADZa/6SsaGhlYQAADhgAAAAdAAAAJAbpA35obXR4AAAOOAAAABAAAACspBAAAGxvY2EAAA5IAAAAWAAAAFh57oA4bWF4cAAADqAAAAAfAAAAIAFKAXBuYW1lAAAOwAAAATEAAAIuUUJZCHBvc3QAAA/0AAABKwAAAelm8SzVeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+yDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mIO+p/FEMUcxDANKMwIkgMABn8MLQB4nO3SWW6DMABF0UtwCEnIPM/zhLK8LqhfXRybSP14XUYtHV9hGYQwQBNIo3cUIPkhQeM7rib1ekqnXg981XuC1qvy84lzojleh3puxL0hPjGjRU473teloEefAUNGjJkwZcacBUtWrNmwZceeA0dOnLlw5cadB09elPGhGf+j0NTI/65KfXerT6JhqKnpRKtgOpuqaTrtKjPUlqHmhto21I7pL6i6hlqY3q7qGWrfUAeGOjTUkaGODXViqFNDnRnq3FAXhro01JWhrg11Y6hbQ90Z6t5QD4Z6NNSToZ4N9WKoV0O9GerdUB+G+jTUl6GWRvkL24BkEXictVh9bFvVFb/nxvbz+7Rf/N6zHcd2bCfP+Wic1Z9N0jpNHCD9SNqqoVBgbQoMjY+pjA4hNnWa2pV1rHSIif0DGkyT2k10Kmu1Cag6huj4ZpqYBHSqJsTEJgZCG3TaVBFv595nO3ZIv4RIrPPuvefe884599zzO/cRF8G/tgn6CFFImNgkR0ggX8wlspbhSSWSdrC5ozd30s2dw5afzvgtyz9/zG9t1hV4RtF1pXolowvtzc2z6L2aYUQM45jKH9WDTvd1LRDoDASYWhfTzTyvboXz6uZX4ARX5wrF39y+HM2+CJ8d0pkyqBIqoze3D12ez4DrFoYzxI8dWwMrDlZ2DMqQAR9AROsJU+2smlTPaTTco52BVxXa2a2+I8vvqd2dVHm1LoPeTn/AZPRYGthDYOeZjBjKoFsVGulR3lGU95SeCK44oHU7MhWUGUKZDT3oSUcG2GWuh+EDDfUYA/jhIhl0TOsJNYSEu7mQmi3UzfXwZKA4BsVsHLXQYGgJW95qEtpJ1VcW9HiTriZBlFEqxsDjA09yCNUoQxxwd7KWSTt2y3GTKifkqHRCoWZc3m11Wa/dKdFgXD4kSYfkeJBKd8KMz7J8dZn/cGRCcLGDnA2Ge3bKzcvlnTDNthFWLH7Xt80ua5FMjA4WKelWv5Xo16vHuYzpRbJhhdVlftuRK0VlR27D9lu5TF0DPBi60OrHNO0AfP/uRWvhn/U3LXICE+nh+3IHPUJ8JE6GyBjZQLbjGchlrSgYngF8zyrIF4NJD3atUcgWsWunGN/UHX5B5/yg7uF87Nqp4Gf52F3gH73DjEZNRoqCKAr9giQJp5rGJABpiVE2htNhW9R8nw0jqYjCYcY4LIjwYNScf4WN06IZnZCEqsI4cFaQbo4Z1TsZBx40YhXkHOecaYE5oY37IIQ+iJJ+UsDYSun5MuRSBRZRUUhlY2DqOGajOR6zrSU/5My6l2DnusH1GQgnw5BZP7iuYM/ahcfQ7Z8y51ddfutvuwNqWQ0cBYr8fj0U0vsHpwerVaB2sWhXT2NExi2r1KUE2tUuVMnkepVQrxTmpQrZTG4iu8he8iPyM3KcPE/+RP5KPoE2CEAKclCBzXATxkYOtUY/o961PWRqsj0chRrHFBbtrjP9/P0ven5pcbRdpL94vfsy33e5+izuwz3nFLFPVNayPZx/jdG1fOChflFRvYzsW6L18efgLrSWIgvcqnGJYi4skO4xREURjbDuxKke5v0T3Mrzkt2fi31uyZlLLrqIpEuXXsMlgw442Jb0GAxjS1DM20kBoCzHLXm/jEm0IltdcvU0fEW24jgiwwRjVd9u4NJHcIyoHJcwvyVqgqj5hqBJ1ZWSJryh9p56UWhX1XbhRbW2ZopuZWsQd5y8mEQ8M+C6xjRYxZbDKWf5AgY+Qq/l6wSPk16zDFjowYuu+wjx13mfkxbyDDxadYT/LijZyI0THB+6yfLaWsRcO82zo9mWTNtpO18qlorZoIVMwSN40tky5DOQ1MCIAe24mvlsuwIIxPb10+uXDQ4uWz/9m3rj+ql7p6bufZARuPVq5tXtsn6KwfP8Jy0TeWOyNhUJN6mhX5rkUTtUppQWEMNTqEdaCGKFYKJaQrCE4JtDLYOlNEKmO5kBTPGY2A0N2sY3+dVlo1N9ycBsIGtOjQ2p/tlZvzo0ur4v6cOh8NTospB7U/X40KahoU3bGIH97dnwmtHlYffVG3R1YOwKM2vNhrPhCT5zk64sG53oS4b31aYjqe/B7+kQiXBN+b6h21hNUPMq29B8CU4elINdygMPKF1B+WBTG7Z9ZshpN/xwEuuDQZR+nuoo4CDaAiiwXmLpmukMQyPf/JMclqgL1ixZQ/nnP2VbdUODFGt2fgBvL123rlLYu/6A9ckb7F3K0/CyBMEu6aQoPscroCcacVehvyQyCZAsizsWWBkoLC+WAiWnOksLKaeuQDzGuqSk42aiYTiJ4zf9afl17SrqaTO1f+XlZAfIuYcq7/IqYMaMrksOJ6vHkOCPDq943xcCnHqVD9pHFRpMqSPXrIua1WNs+tOz1U+ciTCDpPk+c4QYJIHnYhxP/kVPAq+ahFpVhPcHp8qyarhiF+HsBU9Hrl+UZa876fbKipL0KqB6OdUveErgtOI97fZ63ae9SvWU6k2w1JfwqnUbHsYcFCJFrC/W12zIMMirWYEHxMPs6LGYSdkSZ5TsNP9PCpwnWC3HKZ1lydNjWHC2Mn3l6vL0dHn1ldP3LTSrX+vKrBqv7KmMr8p0SR6P1NqF63or6XRlIyO90f7+kf7+myOhvt4tq7f09oUiTc2/dycGgqFQcCDRLYmi1NL7fk0CknVMxEg/cdfs/TnpJMNkgqwj17B8beVazSrVbU4lG67IZYOCnWrYy3yBR9cyWcChywos3LJBEdhhFoAdYjiw0rLGm0xU5OzoGm5/ZfmHjVZpNNg6SznzGKDdwv2cCtVn6Eaxo12cfxLprpVtTcZ6hVx6dow7Yq7e8LXO8PY9Jgjoze9yCtU5FNbegcKkQMdCbt9au/te4Ebe0jkc0ukUL32eYnTpNs20h0KpUOhZPYwVcfhZnfdqeCvDfXiuCbAoYWcXERPc/mDQD3/hdF+wK4i/xv3kYfprIpAuMkk2kW3kdtS0kBIKpZwp8KxmsCyfM1MFzAss9LBkDxRyThiaqTLwKYKJVTwmWTudMyz+yks09346MDh4m72yOxCKrt1XMlQ1qPVlTEVVQ1ofdK/sCWjtZu9qGwZ8YZ9PPWlo1IV3eW3+U0aXblP39zrt+JPf6UhEQ1rUjNBULN+utyuaDNW34kpAVuSOeMTyWbSNWnooFu+QFNWQ4d/Ox4IPWx41fP/fB/Rjeoz08ezPA9TysMtmnOXfGN7Ui3xIYLDALrlDLOP09qtJuY2OeL0+QZXdRnR1nxRVBF/SOyKKPpcrn9mWzH4rH9IidE+PTNU2182+hOgSItrE1slByS24vaLvJpxOqe4Pduf3HJkZ+jLqUz9rRzB7p8gKcgWZwV1L8JtUS5Z2JxZSOCuBoMTQihMzLbCPA0KqGMAljRQjONklW/wjnXKy8vxT/Elvm3/KiMUMOoV0/vnDYlhec0SMKtt3/kKMyOt33tj2bqxQLsTjSGLl+EAsNhCnTyRGktW55EgCn/A4PlnWn+Mg8bgZrWqHxTbPwMuyy1u5YeZF2SUM7JRhddwRgiRuxpmgJmxn9ZW7XpcF3ViX/ar6ptRpGJ0S9Adg4qhb9sI3vbL7qNJV/y4i07t5TZBiho1imFoMz3gED+CtjYUxvP4SOxov4bFoNPg5aR1e+G4UgDPoedJTpogyCJ7oYvRqoVS0MQAy+CoNEdTDUjok5ZHZL/WtjV7rFj3PKQE3iKp7ou+rIxN3b9LB1dGjeT4cvKo3FrnWpYpuaFd/h3dtV8UeKN1Y9hpR3dt4p0H/zKuPQq0kZQUIIpuDfoiETsnIk+gCWMJZUXHtE8V9LkUc2TE8vOMbO4ax/MACabzyaGXc7u3FBr11ThBdB8SIeMAlCntG2KThHSPsaj2Dc9KNyY2a0KZ7ODaTHoRiFkeYz+shZBpCS4X6471KKKnuHd84edfk5F37d1XO5bbkcltu2ZLNbvnPXiUVAnVvprJrP+NObryjxrllS65md6Tm6wzFHRR4dY3QUUjb7MgxaIixU8hspi98fl/Xc+IB4iU66eCVL9YfAfahiSUt4TONS8x0D8W7u8vd3fGWx6OXlM/U1IoU/s61PGhpyXRFa3eReq2qG56lvmYtXavCC1iN7lbiBpWxXHU+cSlztVLVz0tVN600fVsLxaVDknhYioeoXP3t4lqV1r79MAw0GCI1FTL1YIGzPL1MMlJ9ZsN9P7lvA2yr9ZFUzwzPrVgxN/x/SS+chwB4nGNgZGBgAOLPrYdY4vltvjJwM78AijDUqG5oRND/XzNPZboF5HIwMIFEAU/lC+J4nGNgZGBgDvqfBSRfMAAB81QGRgZUoA0AVvYDbwAAAHicY2BgYGB+MTQwAM8EJo8AAAAAAE4AmgDoAQoBLAFOAXABmgHEAe4CGgKcAugEmgS8BNYE8gUOBSoFegXQBf4GRAZmBrYHGAeQCBgIUghqCP4JRgm+CdoKBAo+CoQKugr0C1QLmgvAeJxjYGRgYNBmTGEQZQABJiDmAkIGhv9gPgMAGJQBvAB4nG2RPU7DMBiG3/QP0UoIBGJh8QILavozdmRo9w7d09RpUzlx5LgVvQMn4BAcgoEzcAgOwVvzSZVQbcnf48fvFysJgGt8IcJxROiG9TgauODuj5ukG+EW+UG4jR4ehTv0Q+EunjER7uEWmk+IWpc0d3gVbuAKb8JN+nfhFvlDuI17fAp36L+Fu1jgR7iHp+jF7Arbz1Nb1nO93pnEncSJFtrVuS3VKB6e5EyX2iVer9TyoOr9eux9pjJnCzW1pdfGWFU5u9WpjzfeV5PBIBMfp7aAwQ4FLPrIkbKWqDHn+67pDRK4s4lzbsEux5qHvcIIMb/nueSMyTKkE3jWFdNLHLjW2PPmMa1Hxn3GjGW/wjT0HtOG09JU4WxLk9LH2ISuiv9twJn9y8fh9uIXI+BknAAAAHicbY7ZboMwEEW5CVBCSLrv+76kfJRjTwHFsdGAG+Xvy5JUfehIHp0rnxmNN/D6ir3/a4YBhvARIMQOIowQY4wEE0yxiz3s4wCHOMIxTnCKM5zjApe4wjVucIs73OMBj3jCM17wije84wMzfHqJ0EVmUkmmJo77oOmrHvfIRZbXsTCZplTZldlgb3TYGVHProwFs11t1A57tcON2rErR3PBqcwF1/6ctI6k0GSU4JHMSS6WghdJQ99sTbfuN7QLJ9vQ37dNrgyktnIxlDYLJNuqitpRbYWKFNuyDT6pog6oOYKHtKakeakqKjHXpPwlGRcsC+OqxLIiJpXqoqqDMreG2l5bv9Ri3TRX+c23DZna9WFFgmXuO6Ps1Jm/w6ErW8N3FbHn/QC444j0AA==)
|
|
@@ -497,11 +497,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
497
497
|
--lumo-icons-upload: '\\ea29';
|
|
498
498
|
--lumo-icons-user: '\\ea2a';
|
|
499
499
|
}
|
|
500
|
-
`;
|
|
500
|
+
`;ke("font-icons",nl);/**
|
|
501
501
|
* @license
|
|
502
502
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
503
503
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
504
|
-
*/const
|
|
504
|
+
*/const al=p`
|
|
505
505
|
:host {
|
|
506
506
|
--lumo-size-xs: 1.625rem;
|
|
507
507
|
--lumo-size-s: 1.875rem;
|
|
@@ -516,11 +516,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
516
516
|
/* For backwards compatibility */
|
|
517
517
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
518
518
|
}
|
|
519
|
-
`;
|
|
519
|
+
`;ke("sizing-props",al);/**
|
|
520
520
|
* @license
|
|
521
521
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
522
522
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
523
|
-
*/const
|
|
523
|
+
*/const ll=p`
|
|
524
524
|
:host {
|
|
525
525
|
/* Square */
|
|
526
526
|
--lumo-space-xs: 0.25rem;
|
|
@@ -543,11 +543,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
543
543
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
544
544
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
545
545
|
}
|
|
546
|
-
`;
|
|
546
|
+
`;ke("spacing-props",ll);/**
|
|
547
547
|
* @license
|
|
548
548
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
549
549
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
550
|
-
*/const
|
|
550
|
+
*/const dl=p`
|
|
551
551
|
:host {
|
|
552
552
|
/* Border radius */
|
|
553
553
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -647,11 +647,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
647
647
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
648
648
|
--vaadin-input-field-value-font-weight: 500;
|
|
649
649
|
}
|
|
650
|
-
`;
|
|
650
|
+
`;ke("style-props",dl);/**
|
|
651
651
|
* @license
|
|
652
652
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
653
653
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
654
|
-
*/const
|
|
654
|
+
*/const hl=p`
|
|
655
655
|
:host {
|
|
656
656
|
/* prettier-ignore */
|
|
657
657
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -671,7 +671,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
671
671
|
--lumo-line-height-s: 1.375;
|
|
672
672
|
--lumo-line-height-m: 1.625;
|
|
673
673
|
}
|
|
674
|
-
`,
|
|
674
|
+
`,cl=p`
|
|
675
675
|
body,
|
|
676
676
|
:host {
|
|
677
677
|
font-family: var(--lumo-font-family);
|
|
@@ -763,7 +763,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
763
763
|
border-left: none;
|
|
764
764
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
765
765
|
}
|
|
766
|
-
`;f("",
|
|
766
|
+
`;f("",cl,{moduleId:"lumo-typography"});ke("typography-props",hl);f("vaadin-checkbox",p`
|
|
767
767
|
:host {
|
|
768
768
|
color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
|
|
769
769
|
font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
|
|
@@ -1083,7 +1083,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1083
1083
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1084
1084
|
Code distributed by Google as part of the polymer project is also
|
|
1085
1085
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1086
|
-
*/let
|
|
1086
|
+
*/let ul=/(url\()([^)]*)(\))/g,pl=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,lt,D;function je(s,t){if(s&&pl.test(s)||s==="//")return s;if(lt===void 0){lt=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",lt=e.href==="http://a/c%20d";}catch(e){}}if(t||(t=document.baseURI||window.location.href),lt)try{return new URL(s,t).href}catch(e){return s}return D||(D=document.implementation.createHTMLDocument("temp"),D.base=D.createElement("base"),D.head.appendChild(D.base),D.anchor=D.createElement("a"),D.body.appendChild(D.anchor)),D.base.href=t,D.anchor.href=s,D.anchor.href||s}function vs(s,t){return s.replace(ul,function(e,i,o,r){return i+"'"+je(o.replace(/["']/g,""),t)+"'"+r})}function gs(s){return s.substring(0,s.lastIndexOf("/")+1)}/**
|
|
1087
1087
|
@license
|
|
1088
1088
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1089
1089
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1091,7 +1091,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1091
1091
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1092
1092
|
Code distributed by Google as part of the polymer project is also
|
|
1093
1093
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1094
|
-
*/const Mr=!window.ShadyDOM||!window.ShadyDOM.inUse;const
|
|
1094
|
+
*/const Mr=!window.ShadyDOM||!window.ShadyDOM.inUse;const _l=Mr&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const s=new CSSStyleSheet;s.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[s],t.shadowRoot.adoptedStyleSheets[0]===s}catch(s){return !1}})();let ml=window.Polymer&&window.Polymer.rootPath||gs(document.baseURI||window.location.href),Et=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;let St=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,fl=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Nr=window.Polymer&&window.Polymer.legacyOptimizations||!1,Lr=window.Polymer&&window.Polymer.legacyWarnings||!1,vl=window.Polymer&&window.Polymer.syncInitialRender||!1,zi=window.Polymer&&window.Polymer.legacyUndefined||!1,gl=window.Polymer&&window.Polymer.orderedComputed||!1,Ao=window.Polymer&&window.Polymer.removeNestedTemplates||!1,bl=window.Polymer&&window.Polymer.fastDomIf||!1,Eo=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;let yl=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;/**
|
|
1095
1095
|
@license
|
|
1096
1096
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1097
1097
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1099,7 +1099,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1099
1099
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1100
1100
|
Code distributed by Google as part of the polymer project is also
|
|
1101
1101
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1102
|
-
*/let
|
|
1102
|
+
*/let xl=0;const S=function(s){let t=s.__mixinApplications;t||(t=new WeakMap,s.__mixinApplications=t);let e=xl++;function i(o){let r=o.__mixinSet;if(r&&r[e])return o;let n=t,a=n.get(o);if(!a){a=s(o),n.set(o,a);let l=Object.create(a.__mixinSet||r||null);l[e]=!0,a.__mixinSet=l;}return a}return i};/**
|
|
1103
1103
|
@license
|
|
1104
1104
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1105
1105
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1107,7 +1107,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1107
1107
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1108
1108
|
Code distributed by Google as part of the polymer project is also
|
|
1109
1109
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1110
|
-
*/let
|
|
1110
|
+
*/let bs={},Vr={};function So(s,t){bs[s]=Vr[s.toLowerCase()]=t;}function ko(s){return bs[s]||Vr[s.toLowerCase()]}function Cl(s){s.querySelector("style")&&console.warn("dom-module %s has style outside template",s.id);}class Xe extends HTMLElement{static get observedAttributes(){return ["id"]}static import(t,e){if(t){let i=ko(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,o){e!==i&&this.register();}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=je(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=gs(e);}return this.__assetpath}register(t){if(t=t||this.id,t){if(St&&ko(t)!==void 0)throw So(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,So(t,this),Cl(this);}}}Xe.prototype.modules=bs;customElements.define("dom-module",Xe);/**
|
|
1111
1111
|
@license
|
|
1112
1112
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1113
1113
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1115,7 +1115,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1115
1115
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1116
1116
|
Code distributed by Google as part of the polymer project is also
|
|
1117
1117
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1118
|
-
*/const
|
|
1118
|
+
*/const wl="link[rel=import][type~=css]",Il="include",To="shady-unscoped";function Fr(s){return Xe.import(s)}function Po(s){let t=s.body?s.body:s;const e=vs(t.textContent,s.baseURI),i=document.createElement("style");return i.textContent=e,i}function Al(s){const t=s.trim().split(/\s+/),e=[];for(let i=0;i<t.length;i++)e.push(...El(t[i]));return e}function El(s){const t=Fr(s);if(!t)return console.warn("Could not find style data in module named",s),[];if(t._styles===void 0){const e=[];e.push(...Rr(t));const i=t.querySelector("template");i&&e.push(...Br(i,t.assetpath)),t._styles=e;}return t._styles}function Br(s,t){if(!s._styles){const e=[],i=s.content.querySelectorAll("style");for(let o=0;o<i.length;o++){let r=i[o],n=r.getAttribute(Il);n&&e.push(...Al(n).filter(function(a,l,d){return d.indexOf(a)===l})),t&&(r.textContent=vs(r.textContent,t)),e.push(r);}s._styles=e;}return s._styles}function Sl(s){let t=Fr(s);return t?Rr(t):[]}function Rr(s){const t=[],e=s.querySelectorAll(wl);for(let i=0;i<e.length;i++){let o=e[i];if(o.import){const r=o.import,n=o.hasAttribute(To);if(n&&!r._unscopedStyle){const a=Po(r);a.setAttribute(To,""),r._unscopedStyle=a;}else r._style||(r._style=Po(r));t.push(n?r._unscopedStyle:r._style);}}return t}/**
|
|
1119
1119
|
@license
|
|
1120
1120
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1121
1121
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1131,7 +1131,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1131
1131
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1132
1132
|
Code distributed by Google as part of the polymer project is also
|
|
1133
1133
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1134
|
-
*/function
|
|
1134
|
+
*/function Mi(s){return s.indexOf(".")>=0}function pe(s){let t=s.indexOf(".");return t===-1?s:s.slice(0,t)}function $r(s,t){return s.indexOf(t+".")===0}function Je(s,t){return t.indexOf(s+".")===0}function Qe(s,t,e){return t+e.slice(s.length)}function kl(s,t){return s===t||$r(s,t)||Je(s,t)}function Re(s){if(Array.isArray(s)){let t=[];for(let e=0;e<s.length;e++){let i=s[e].toString().split(".");for(let o=0;o<i.length;o++)t.push(i[o]);}return t.join(".")}else return s}function Hr(s){return Array.isArray(s)?Re(s).split("."):s.toString().split(".")}function O(s,t,e){let i=s,o=Hr(t);for(let r=0;r<o.length;r++){if(!i)return;let n=o[r];i=i[n];}return e&&(e.path=o.join(".")),i}function Oo(s,t,e){let i=s,o=Hr(t),r=o[o.length-1];if(o.length>1){for(let n=0;n<o.length-1;n++){let a=o[n];if(i=i[a],!i)return}i[r]=e;}else i[t]=e;return o.join(".")}/**
|
|
1135
1135
|
@license
|
|
1136
1136
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1137
1137
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1139,7 +1139,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1139
1139
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1140
1140
|
Code distributed by Google as part of the polymer project is also
|
|
1141
1141
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1142
|
-
*/const
|
|
1142
|
+
*/const kt={},Tl=/-[a-z]/g,Pl=/([A-Z])/g;function qr(s){return kt[s]||(kt[s]=s.indexOf("-")<0?s:s.replace(Tl,t=>t[1].toUpperCase()))}function Ft(s){return kt[s]||(kt[s]=s.replace(Pl,"-$1").toLowerCase())}/**
|
|
1143
1143
|
@license
|
|
1144
1144
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1145
1145
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1147,7 +1147,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1147
1147
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1148
1148
|
Code distributed by Google as part of the polymer project is also
|
|
1149
1149
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1150
|
-
*/let
|
|
1150
|
+
*/let Ol=0,Ur=0,ye=[],Dl=0,Ni=!1,Wr=document.createTextNode("");new window.MutationObserver(zl).observe(Wr,{characterData:!0});function zl(){Ni=!1;const s=ye.length;for(let t=0;t<s;t++){let e=ye[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}ye.splice(0,s),Ur+=s;}const Ml={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},jr={run(s){return Ni||(Ni=!0,Wr.textContent=Dl++),ye.push(s),Ol++},cancel(s){const t=s-Ur;if(t>=0){if(!ye[t])throw new Error("invalid async handle: "+s);ye[t]=null;}}};/**
|
|
1151
1151
|
@license
|
|
1152
1152
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1153
1153
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1155,7 +1155,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1155
1155
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1156
1156
|
Code distributed by Google as part of the polymer project is also
|
|
1157
1157
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1158
|
-
*/const
|
|
1158
|
+
*/const Nl=jr,Yr=S(s=>{class t extends s{static createProperties(i){const o=this.prototype;for(let r in i)r in o||o._createPropertyAccessor(r);}static attributeNameForProperty(i){return i.toLowerCase()}static typeForProperty(i){}_createPropertyAccessor(i,o){this._addPropertyToAttributeMap(i),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[i]||(this.__dataHasAccessor[i]=!0,this._definePropertyAccessor(i,o));}_addPropertyToAttributeMap(i){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let o=this.__dataAttributes[i];return o||(o=this.constructor.attributeNameForProperty(i),this.__dataAttributes[o]=i),o}_definePropertyAccessor(i,o){Object.defineProperty(this,i,{get(){return this.__data[i]},set:o?function(){}:function(r){this._setPendingProperty(i,r,!0)&&this._invalidateProperties();}});}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties();}ready(){this.__dataReady=!0,this._flushProperties();}_initializeProperties(){for(let i in this.__dataHasAccessor)this.hasOwnProperty(i)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[i]=this[i],delete this[i]);}_initializeInstanceProperties(i){Object.assign(this,i);}_setProperty(i,o){this._setPendingProperty(i,o)&&this._invalidateProperties();}_getProperty(i){return this.__data[i]}_setPendingProperty(i,o,r){let n=this.__data[i],a=this._shouldPropertyChange(i,o,n);return a&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(i in this.__dataOld)&&(this.__dataOld[i]=n),this.__data[i]=o,this.__dataPending[i]=o),a}_isPropertyPending(i){return !!(this.__dataPending&&this.__dataPending.hasOwnProperty(i))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Nl.run(()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties());}));}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready());}_flushProperties(){this.__dataCounter++;const i=this.__data,o=this.__dataPending,r=this.__dataOld;this._shouldPropertiesChange(i,o,r)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(i,o,r)),this.__dataCounter--;}_shouldPropertiesChange(i,o,r){return !!o}_propertiesChanged(i,o,r){}_shouldPropertyChange(i,o,r){return r!==o&&(r===r||o===o)}attributeChangedCallback(i,o,r,n){o!==r&&this._attributeToProperty(i,r),super.attributeChangedCallback&&super.attributeChangedCallback(i,o,r,n);}_attributeToProperty(i,o,r){if(!this.__serializing){const n=this.__dataAttributes,a=n&&n[i]||i;this[a]=this._deserializeValue(o,r||this.constructor.typeForProperty(a));}}_propertyToAttribute(i,o,r){this.__serializing=!0,r=arguments.length<3?this[i]:r,this._valueToNodeAttribute(this,r,o||this.constructor.attributeNameForProperty(i)),this.__serializing=!1;}_valueToNodeAttribute(i,o,r){const n=this._serializeValue(o);(r==="class"||r==="name"||r==="slot")&&(i=P(i)),n===void 0?i.removeAttribute(r):i.setAttribute(r,n===""&&window.trustedTypes?window.trustedTypes.emptyScript:n);}_serializeValue(i){switch(typeof i){case"boolean":return i?"":void 0;default:return i!=null?i.toString():void 0}}_deserializeValue(i,o){switch(o){case Boolean:return i!==null;case Number:return Number(i);default:return i}}}return t});/**
|
|
1159
1159
|
@license
|
|
1160
1160
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1161
1161
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1163,7 +1163,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1163
1163
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1164
1164
|
Code distributed by Google as part of the polymer project is also
|
|
1165
1165
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1166
|
-
*/const Gr={};let
|
|
1166
|
+
*/const Gr={};let dt=HTMLElement.prototype;for(;dt;){let s=Object.getOwnPropertyNames(dt);for(let t=0;t<s.length;t++)Gr[s[t]]=!0;dt=Object.getPrototypeOf(dt);}const Ll=window.trustedTypes?s=>trustedTypes.isHTML(s)||trustedTypes.isScript(s)||trustedTypes.isScriptURL(s):()=>!1;function Vl(s,t){if(!Gr[t]){let e=s[t];e!==void 0&&(s.__data?s._setPendingProperty(t,e):(s.__dataProto?s.hasOwnProperty(JSCompiler_renameProperty("__dataProto",s))||(s.__dataProto=Object.create(s.__dataProto)):s.__dataProto={},s.__dataProto[t]=e));}}const Fl=S(s=>{const t=Yr(s);class e extends t{static createPropertiesForAttributes(){let o=this.observedAttributes;for(let r=0;r<o.length;r++)this.prototype._createPropertyAccessor(qr(o[r]));}static attributeNameForProperty(o){return Ft(o)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties();}_initializeProtoProperties(o){for(let r in o)this._setProperty(r,o[r]);}_ensureAttribute(o,r){const n=this;n.hasAttribute(o)||this._valueToNodeAttribute(n,r,o);}_serializeValue(o){switch(typeof o){case"object":if(o instanceof Date)return o.toString();if(o){if(Ll(o))return o;try{return JSON.stringify(o)}catch(r){return ""}}default:return super._serializeValue(o)}}_deserializeValue(o,r){let n;switch(r){case Object:try{n=JSON.parse(o);}catch(a){n=o;}break;case Array:try{n=JSON.parse(o);}catch(a){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${o}`);}break;case Date:n=isNaN(o)?String(o):Number(o),n=new Date(n);break;default:n=super._deserializeValue(o,r);break}return n}_definePropertyAccessor(o,r){Vl(this,o),super._definePropertyAccessor(o,r);}_hasAccessor(o){return this.__dataHasAccessor&&this.__dataHasAccessor[o]}_isPropertyPending(o){return !!(this.__dataPending&&o in this.__dataPending)}}return e});/**
|
|
1167
1167
|
@license
|
|
1168
1168
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1169
1169
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1171,7 +1171,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1171
1171
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1172
1172
|
Code distributed by Google as part of the polymer project is also
|
|
1173
1173
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1174
|
-
*/const
|
|
1174
|
+
*/const Bl={"dom-if":!0,"dom-repeat":!0};let Do=!1,zo=!1;function Rl(){if(!Do){Do=!0;const s=document.createElement("textarea");s.placeholder="a",zo=s.placeholder===s.textContent;}return zo}function $l(s){Rl()&&s.localName==="textarea"&&s.placeholder&&s.placeholder===s.textContent&&(s.textContent=null);}const Hl=(()=>{const s=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return (t,e,i)=>{const o=e.getAttribute(i);if(s&&i.startsWith("on-")){t.setAttribute(i,s.createScript(o,i));return}t.setAttribute(i,o);}})();function ql(s){let t=s.getAttribute("is");if(t&&Bl[t]){let e=s;for(e.removeAttribute("is"),s=e.ownerDocument.createElement(t),e.parentNode.replaceChild(s,e),s.appendChild(e);e.attributes.length;){const{name:i}=e.attributes[0];Hl(s,e,i),e.removeAttribute(i);}}return s}function Kr(s,t){let e=t.parentInfo&&Kr(s,t.parentInfo);if(e){for(let i=e.firstChild,o=0;i;i=i.nextSibling)if(t.parentIndex===o++)return i}else return s}function Ul(s,t,e,i){i.id&&(t[i.id]=e);}function Wl(s,t,e){if(e.events&&e.events.length)for(let i=0,o=e.events,r;i<o.length&&(r=o[i]);i++)s._addMethodEventListenerToNode(t,r.name,r.value,s);}function jl(s,t,e,i){e.templateInfo&&(t._templateInfo=e.templateInfo,t._parentTemplateInfo=i);}function Yl(s,t,e){return s=s._methodHost||s,function(o){s[e]?s[e](o,o.detail):console.warn("listener method `"+e+"` not defined");}}const Gl=S(s=>{class t extends s{static _parseTemplate(i,o){if(!i._templateInfo){let r=i._templateInfo={};r.nodeInfoList=[],r.nestedTemplate=!!o,r.stripWhiteSpace=o&&o.stripWhiteSpace||i.hasAttribute&&i.hasAttribute("strip-whitespace"),this._parseTemplateContent(i,r,{parent:null});}return i._templateInfo}static _parseTemplateContent(i,o,r){return this._parseTemplateNode(i.content,o,r)}static _parseTemplateNode(i,o,r){let n=!1,a=i;return a.localName=="template"&&!a.hasAttribute("preserve-content")?n=this._parseTemplateNestedTemplate(a,o,r)||n:a.localName==="slot"&&(o.hasInsertionPoint=!0),$l(a),a.firstChild&&this._parseTemplateChildNodes(a,o,r),a.hasAttributes&&a.hasAttributes()&&(n=this._parseTemplateNodeAttributes(a,o,r)||n),n||r.noted}static _parseTemplateChildNodes(i,o,r){if(!(i.localName==="script"||i.localName==="style"))for(let n=i.firstChild,a=0,l;n;n=l){if(n.localName=="template"&&(n=ql(n)),l=n.nextSibling,n.nodeType===Node.TEXT_NODE){let h=l;for(;h&&h.nodeType===Node.TEXT_NODE;)n.textContent+=h.textContent,l=h.nextSibling,i.removeChild(h),h=l;if(o.stripWhiteSpace&&!n.textContent.trim()){i.removeChild(n);continue}}let d={parentIndex:a,parentInfo:r};this._parseTemplateNode(n,o,d)&&(d.infoIndex=o.nodeInfoList.push(d)-1),n.parentNode&&a++;}}static _parseTemplateNestedTemplate(i,o,r){let n=i,a=this._parseTemplate(n,o);return (a.content=n.content.ownerDocument.createDocumentFragment()).appendChild(n.content),r.templateInfo=a,!0}static _parseTemplateNodeAttributes(i,o,r){let n=!1,a=Array.from(i.attributes);for(let l=a.length-1,d;d=a[l];l--)n=this._parseTemplateNodeAttribute(i,o,r,d.name,d.value)||n;return n}static _parseTemplateNodeAttribute(i,o,r,n,a){return n.slice(0,3)==="on-"?(i.removeAttribute(n),r.events=r.events||[],r.events.push({name:n.slice(3),value:a}),!0):n==="id"?(r.id=a,!0):!1}static _contentForTemplate(i){let o=i._templateInfo;return o&&o.content||i.content}_stampTemplate(i,o){i&&!i.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(i),o=o||this.constructor._parseTemplate(i);let r=o.nodeInfoList,n=o.content||i.content,a=document.importNode(n,!0);a.__noInsertionPoint=!o.hasInsertionPoint;let l=a.nodeList=new Array(r.length);a.$={};for(let d=0,h=r.length,c;d<h&&(c=r[d]);d++){let u=l[d]=Kr(a,c);Ul(this,a.$,u,c),jl(this,u,c,o),Wl(this,u,c);}return a=a,a}_addMethodEventListenerToNode(i,o,r,n){n=n||i;let a=Yl(n,o,r);return this._addEventListenerToNode(i,o,a),a}_addEventListenerToNode(i,o,r){i.addEventListener(o,r);}_removeEventListenerFromNode(i,o,r){i.removeEventListener(o,r);}}return t});/**
|
|
1175
1175
|
* @fileoverview
|
|
1176
1176
|
* @suppress {checkPrototypalTypes}
|
|
1177
1177
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1181,7 +1181,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1181
1181
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
1182
1182
|
* Google as part of the polymer project is also subject to an additional IP
|
|
1183
1183
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1184
|
-
*/let Qe=0;const Ze=[],g={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Xr="__computeInfo",Yl=/[A-Z]/;function ri(s,t,e){let i=s[t];if(!i)i=s[t]={};else if(!s.hasOwnProperty(t)&&(i=s[t]=Object.create(s[t]),e))for(let o in i){let r=i[o],n=i[o]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a];}return i}function Re(s,t,e,i,o,r){if(t){let n=!1;const a=Qe++;for(let l in e){let d=o?ue(l):l,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==a)&&(!o||bs(l,_.trigger))&&(_.info&&(_.info.lastRun=a),_.fn(s,l,e,i,_.info,o,r),n=!0);}return n}return !1}function Gl(s,t,e,i,o,r,n,a){let l=!1,d=n?ue(i):i,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==e)&&(!n||bs(i,_.trigger))&&(_.info&&(_.info.lastRun=e),_.fn(s,i,o,r,_.info,n,a),l=!0);return l}function bs(s,t){if(t){let e=t.name;return e==s||!!(t.structured&&$r(e,s))||!!(t.wildcard&&Xe(e,s))}else return !0}function Mo(s,t,e,i,o){let r=typeof o.method=="string"?s[o.method]:o.method,n=o.property;r?r.call(s,s.__data[n],i[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined");}function Kl(s,t,e,i,o){let r=s[g.NOTIFY],n,a=Qe++;for(let d in t)t[d]&&(r&&Gl(s,r,a,d,e,i,o)||o&&Xl(s,d,e))&&(n=!0);let l;n&&(l=s.__dataHost)&&l._invalidateProperties&&l._invalidateProperties();}function Xl(s,t,e){let i=ue(t);if(i!==t){let o=Vt(i)+"-changed";return Jr(s,o,e[t],t),!0}return !1}function Jr(s,t,e,i){let o={value:e,queueProperty:!0};i&&(o.path=i),P(s).dispatchEvent(new CustomEvent(t,{detail:o}));}function Jl(s,t,e,i,o,r){let a=(r?ue(t):t)!=t?t:null,l=a?O(s,a):s.__data[t];a&&l===void 0&&(l=e[t]),Jr(s,o.eventName,l,a);}function Ql(s,t,e,i,o){let r,n=s.detail,a=n&&n.path;a?(i=Je(e,i,a),r=n&&n.value):r=s.currentTarget[e],r=o?!r:r,(!t[g.READ_ONLY]||!t[g.READ_ONLY][i])&&t._setPendingPropertyOrPath(i,r,!0,!!a)&&(!n||!n.queueProperty)&&t._invalidateProperties();}function Zl(s,t,e,i,o){let r=s.__data[t];At&&(r=At(r,o.attrName,"attribute",s)),s._propertyToAttribute(t,o.attrName,r);}function ed(s,t,e,i){let o=s[g.COMPUTE];if(o)if(fl){Qe++;const r=id(s),n=[];for(let l in t)No(l,o,n,r,i);let a;for(;a=n.shift();)Qr(s,"",t,e,a)&&No(a.methodInfo,o,n,r,i);Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),s.__dataPending=null;}else {let r=t;for(;Re(s,o,r,e,i);)Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),r=s.__dataPending,s.__dataPending=null;}}const td=(s,t,e)=>{let i=0,o=t.length-1,r=-1;for(;i<=o;){const n=i+o>>1,a=e.get(t[n].methodInfo)-e.get(s.methodInfo);if(a<0)i=n+1;else if(a>0)o=n-1;else {r=n;break}}r<0&&(r=o+1),t.splice(r,0,s);},No=(s,t,e,i,o)=>{const r=o?ue(s):s,n=t[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==Qe&&(!o||bs(s,l.trigger))&&(l.info.lastRun=Qe,td(l.info,e,i));}};function id(s){let t=s.constructor.__orderedComputedDeps;if(!t){t=new Map;const e=s[g.COMPUTE];let{counts:i,ready:o,total:r}=sd(s),n;for(;n=o.shift();){t.set(n,t.size);const a=e[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--i[d]===0&&o.push(d);});}r!==0&&console.warn(`Computed graph for ${s.localName} incomplete; circular?`),s.constructor.__orderedComputedDeps=t;}return t}function sd(s){const t=s[Xr],e={},i=s[g.COMPUTE],o=[];let r=0;for(let n in t){const a=t[n];r+=e[n]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0);}for(let n in i)t[n]||o.push(n);return {counts:e,ready:o,total:r}}function Qr(s,t,e,i,o){let r=Ni(s,t,e,i,o);if(r===Ze)return !1;let n=o.methodInfo;return s.__dataHasAccessor&&s.__dataHasAccessor[n]?s._setPendingProperty(n,r,!0):(s[n]=r,!1)}function od(s,t,e){let i=s.__dataLinkedPaths;if(i){let o;for(let r in i){let n=i[r];Xe(r,t)?(o=Je(r,n,t),s._setPendingPropertyOrPath(o,e,!0,!0)):Xe(n,t)&&(o=Je(n,r,t),s._setPendingPropertyOrPath(o,e,!0,!0));}}}function ni(s,t,e,i,o,r,n){e.bindings=e.bindings||[];let a={kind:i,target:o,parts:r,literal:n,isCompound:r.length!==1};if(e.bindings.push(a),dd(a)){let{event:d,negate:h}=a.parts[0];a.listenerEvent=d||Vt(o)+"-changed",a.listenerNegate=h;}let l=t.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let h=a.parts[d];h.compoundIndex=d,rd(s,t,a,h,l);}}function rd(s,t,e,i,o){if(!i.literal)if(e.kind==="attribute"&&e.target[0]==="-")console.warn("Cannot set attribute "+e.target+' because "-" is not a valid attribute starting character');else {let r=i.dependencies,n={index:o,binding:e,part:i,evaluator:s};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=en(l),l.wildcard=!0),s._addTemplatePropertyEffect(t,l.rootProperty,{fn:nd,info:n,trigger:l});}}}function nd(s,t,e,i,o,r,n){let a=n[o.index],l=o.binding,d=o.part;if(r&&d.source&&t.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let h=e[t];t=Je(d.source,l.target,t),a._setPendingPropertyOrPath(t,h,!1,!0)&&s._enqueueClient(a);}else {let h=o.evaluator._evaluateBinding(s,d,t,e,i,r);h!==Ze&&ad(s,a,l,d,h);}}function ad(s,t,e,i,o){if(o=ld(t,o,e,i),At&&(o=At(o,e.target,e.kind,t)),e.kind=="attribute")s._valueToNodeAttribute(t,o,e.target);else {let r=e.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?(!t[g.READ_ONLY]||!t[g.READ_ONLY][r])&&t._setPendingProperty(r,o)&&s._enqueueClient(t):s._setUnmanagedPropertyToNode(t,r,o);}}function ld(s,t,e,i){if(e.isCompound){let o=s.__dataCompoundStorage[e.target];o[i.compoundIndex]=t,t=o.join("");}return e.kind!=="attribute"&&(e.target==="textContent"||e.target==="value"&&(s.localName==="input"||s.localName==="textarea"))&&(t=t==null?"":t),t}function dd(s){return !!s.target&&s.kind!="attribute"&&s.kind!="text"&&!s.isCompound&&s.parts[0].mode==="{"}function hd(s,t){let{nodeList:e,nodeInfoList:i}=t;if(i.length)for(let o=0;o<i.length;o++){let r=i[o],n=e[o],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];cd(n,d),ud(n,s,d);}n.__dataHost=s;}}function cd(s,t){if(t.isCompound){let e=s.__dataCompoundStorage||(s.__dataCompoundStorage={}),i=t.parts,o=new Array(i.length);for(let n=0;n<i.length;n++)o[n]=i[n].literal;let r=t.target;e[r]=o,t.literal&&t.kind=="property"&&(r==="className"&&(s=P(s)),s[r]=t.literal);}}function ud(s,t,e){if(e.listenerEvent){let i=e.parts[0];s.addEventListener(e.listenerEvent,function(o){Ql(o,t,e.target,i.source,i.negate);});}}function Lo(s,t,e,i,o,r){r=t.static||r&&(typeof r!="object"||r[t.methodName]);let n={methodName:t.methodName,args:t.args,methodInfo:o,dynamicFn:r};for(let a=0,l;a<t.args.length&&(l=t.args[a]);a++)l.literal||s._addPropertyEffect(l.rootProperty,e,{fn:i,info:n,trigger:l});return r&&s._addPropertyEffect(t.methodName,e,{fn:i,info:n}),n}function Ni(s,t,e,i,o){let r=s._methodHost||s,n=r[o.methodName];if(n){let a=s._marshalArgs(o.args,t,e);return a===Ze?Ze:n.apply(r,a)}else o.dynamicFn||console.warn("method `"+o.methodName+"` not defined");}const pd=[],Zr="(?:[a-zA-Z_$][\\w.:$\\-*]*)",_d="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",md="(?:'(?:[^'\\\\]|\\\\.)*')",fd='(?:"(?:[^"\\\\]|\\\\.)*")',vd="(?:"+md+"|"+fd+")",Vo="(?:("+Zr+"|"+_d+"|"+vd+")\\s*)",gd="(?:"+Vo+"(?:,\\s*"+Vo+")*)",bd="(?:\\(\\s*(?:"+gd+"?)\\)\\s*)",yd="("+Zr+"\\s*"+bd+"?)",xd="(\\[\\[|{{)\\s*",Cd="(?:]]|}})",wd="(?:(!)\\s*)?",Id=xd+wd+yd+Cd,Fo=new RegExp(Id,"g");function Bo(s){let t="";for(let e=0;e<s.length;e++){let i=s[e].literal;t+=i||"";}return t}function ai(s){let t=s.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let i={methodName:t[1],static:!0,args:pd};if(t[2].trim()){let o=t[2].replace(/\\,/g,",").split(",");return Ad(o,i)}else return i}return null}function Ad(s,t){return t.args=s.map(function(e){let i=en(e);return i.literal||(t.static=!1),i},this),t}function en(s){let t=s.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),e={name:t,value:"",literal:!1},i=t[0];switch(i==="-"&&(i=t[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':e.value=t.slice(1,-1),e.literal=!0;break;case"#":e.value=Number(t),e.literal=!0;break}return e.literal||(e.rootProperty=ue(t),e.structured=zi(t),e.structured&&(e.wildcard=t.slice(-2)==".*",e.wildcard&&(e.name=t.slice(0,-2)))),e}function Ro(s,t,e){let i=O(s,e);return i===void 0&&(i=t[e]),i}function tn(s,t,e,i){const o={indexSplices:i};Di&&!s._overrideLegacyUndefined&&(t.splices=o),s.notifyPath(e+".splices",o),s.notifyPath(e+".length",t.length),Di&&!s._overrideLegacyUndefined&&(o.indexSplices=[]);}function Ne(s,t,e,i,o,r){tn(s,t,e,[{index:i,addedCount:o,removed:r,object:t,type:"splice"}]);}function Ed(s){return s[0].toUpperCase()+s.substring(1)}const ys=b(s=>{const t=jl(Ll(s));class e extends t{constructor(){super(),this.__isPropertyEffectsClient=!0;}get PROPERTY_EFFECT_TYPES(){return g}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1;}_registerHost(){if(Le.length){let o=Le[Le.length-1];o._enqueueClient(this),this.__dataHost=o;}}_initializeProtoProperties(o){this.__data=Object.create(o),this.__dataPending=Object.create(o),this.__dataOld={};}_initializeInstanceProperties(o){let r=this[g.READ_ONLY];for(let n in o)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=o[n]);}_addPropertyEffect(o,r,n){this._createPropertyAccessor(o,r==g.READ_ONLY);let a=ri(this,r,!0)[o];a||(a=this[r][o]=[]),a.push(n);}_removePropertyEffect(o,r,n){let a=ri(this,r,!0)[o],l=a.indexOf(n);l>=0&&a.splice(l,1);}_hasPropertyEffect(o,r){let n=this[r];return !!(n&&n[o])}_hasReadOnlyEffect(o){return this._hasPropertyEffect(o,g.READ_ONLY)}_hasNotifyEffect(o){return this._hasPropertyEffect(o,g.NOTIFY)}_hasReflectEffect(o){return this._hasPropertyEffect(o,g.REFLECT)}_hasComputedEffect(o){return this._hasPropertyEffect(o,g.COMPUTE)}_setPendingPropertyOrPath(o,r,n,a){if(a||ue(Array.isArray(o)?o[0]:o)!==o){if(!a){let l=O(this,o);if(o=Oo(this,o,r),!o||!super._shouldPropertyChange(o,r,l))return !1}if(this.__dataHasPaths=!0,this._setPendingProperty(o,r,n))return od(this,o,r),!0}else {if(this.__dataHasAccessor&&this.__dataHasAccessor[o])return this._setPendingProperty(o,r,n);this[o]=r;}return !1}_setUnmanagedPropertyToNode(o,r,n){(n!==o[r]||typeof n=="object")&&(r==="className"&&(o=P(o)),o[r]=n);}_setPendingProperty(o,r,n){let a=this.__dataHasPaths&&zi(o),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(o,r,l[o])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),o in this.__dataOld||(this.__dataOld[o]=this.__data[o]),a?this.__dataTemp[o]=r:this.__data[o]=r,this.__dataPending[o]=r,(a||this[g.NOTIFY]&&this[g.NOTIFY][o])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[o]=n),!0):!1}_setProperty(o,r){this._setPendingProperty(o,r,!0)&&this._invalidateProperties();}_invalidateProperties(){this.__dataReady&&this._flushProperties();}_enqueueClient(o){this.__dataPendingClients=this.__dataPendingClients||[],o!==this&&this.__dataPendingClients.push(o);}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0);}__enableOrFlushClients(){let o=this.__dataPendingClients;if(o){this.__dataPendingClients=null;for(let r=0;r<o.length;r++){let n=o[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties();}}}_readyClients(){this.__enableOrFlushClients();}setProperties(o,r){for(let n in o)(r||!this[g.READ_ONLY]||!this[g.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,o[n],!0);this._invalidateProperties();}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties();}_propertiesChanged(o,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;ed(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),Re(this,this[g.REFLECT],r,n,a),Re(this,this[g.OBSERVE],r,n,a),l&&Kl(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={});}_propagatePropertyChanges(o,r,n){this[g.PROPAGATE]&&Re(this,this[g.PROPAGATE],o,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,o,r,n);}_runEffectsForTemplate(o,r,n,a){const l=(d,h)=>{Re(this,o.propertyEffects,d,n,h,o.nodeList);for(let c=o.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,h);};o.runEffects?o.runEffects(l,r,a):l(r,a);}linkPaths(o,r){o=Be(o),r=Be(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[o]=r;}unlinkPaths(o){o=Be(o),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[o];}notifySplices(o,r){let n={path:""},a=O(this,o,n);tn(this,a,n.path,r);}get(o,r){return O(r||this,o)}set(o,r,n){n?Oo(n,o,r):(!this[g.READ_ONLY]||!this[g.READ_ONLY][o])&&this._setPendingPropertyOrPath(o,r,!0)&&this._invalidateProperties();}push(o,...r){let n={path:""},a=O(this,o,n),l=a.length,d=a.push(...r);return r.length&&Ne(this,a,n.path,l,r.length,[]),d}pop(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.pop();return a&&Ne(this,n,r.path,n.length,0,[l]),l}splice(o,r,n,...a){let l={path:""},d=O(this,o,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let h;return arguments.length===2?h=d.splice(r):h=d.splice(r,n,...a),(a.length||h.length)&&Ne(this,d,l.path,r,a.length,h),h}shift(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.shift();return a&&Ne(this,n,r.path,0,0,[l]),l}unshift(o,...r){let n={path:""},a=O(this,o,n),l=a.unshift(...r);return r.length&&Ne(this,a,n.path,0,r.length,[]),l}notifyPath(o,r){let n;if(arguments.length==1){let a={path:""};r=O(this,o,a),n=a.path;}else Array.isArray(o)?n=Be(o):n=o;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties();}_createReadOnlyProperty(o,r){this._addPropertyEffect(o,g.READ_ONLY),r&&(this["_set"+Ed(o)]=function(n){this._setProperty(o,n);});}_createPropertyObserver(o,r,n){let a={property:o,method:r,dynamicFn:!!n};this._addPropertyEffect(o,g.OBSERVE,{fn:Mo,info:a,trigger:{name:o}}),n&&this._addPropertyEffect(r,g.OBSERVE,{fn:Mo,info:a,trigger:{name:r}});}_createMethodObserver(o,r){let n=ai(o);if(!n)throw new Error("Malformed observer expression '"+o+"'");Lo(this,n,g.OBSERVE,Ni,null,r);}_createNotifyingProperty(o){this._addPropertyEffect(o,g.NOTIFY,{fn:Jl,info:{eventName:Vt(o)+"-changed",property:o}});}_createReflectedProperty(o){let r=this.constructor.attributeNameForProperty(o);r[0]==="-"?console.warn("Property "+o+" cannot be reflected to attribute "+r+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(o,g.REFLECT,{fn:Zl,info:{attrName:r}});}_createComputedProperty(o,r,n){let a=ai(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Lo(this,a,g.COMPUTE,Qr,o,n);ri(this,Xr)[o]=l;}_marshalArgs(o,r,n){const a=this.__data,l=[];for(let d=0,h=o.length;d<h;d++){let{name:c,structured:u,wildcard:_,value:m,literal:E}=o[d];if(!E)if(_){const k=Xe(c,r),I=Ro(a,n,k?r:c);m={path:k?r:c,value:I,base:k?O(a,c):I};}else m=u?Ro(a,n,c):a[c];if(Di&&!this._overrideLegacyUndefined&&m===void 0&&o.length>1)return Ze;l[d]=m;}return l}static addPropertyEffect(o,r,n){this.prototype._addPropertyEffect(o,r,n);}static createPropertyObserver(o,r,n){this.prototype._createPropertyObserver(o,r,n);}static createMethodObserver(o,r){this.prototype._createMethodObserver(o,r);}static createNotifyingProperty(o){this.prototype._createNotifyingProperty(o);}static createReadOnlyProperty(o,r){this.prototype._createReadOnlyProperty(o,r);}static createReflectedProperty(o){this.prototype._createReflectedProperty(o);}static createComputedProperty(o,r,n){this.prototype._createComputedProperty(o,r,n);}static bindTemplate(o){return this.prototype._bindTemplate(o)}_bindTemplate(o,r){let n=this.constructor._parseTemplate(o),a=this.__preBoundTemplateInfo==n;if(!a)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(r)if(n=Object.create(n),n.wasPreBound=a,!this.__templateInfo)this.__templateInfo=n;else {const l=o._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n;}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(o,r,n){let a=o.hostProps=o.hostProps||{};a[r]=!0;let l=o.propertyEffects=o.propertyEffects||{};(l[r]=l[r]||[]).push(n);}_stampTemplate(o,r){r=r||this._bindTemplate(o,!0),Le.push(this);let n=super._stampTemplate(o,r);if(Le.pop(),r.nodeList=n.nodeList,!r.wasPreBound){let a=r.childNodes=[];for(let l=n.firstChild;l;l=l.nextSibling)a.push(l);}return n.templateInfo=r,hd(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(o){const r=o.templateInfo,{previousSibling:n,nextSibling:a,parent:l}=r;n?n.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=n:l&&(l.lastChild=n),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let h=0;h<d.length;h++){let c=d[h];P(P(c).parentNode).removeChild(c);}}static _parseTemplateNode(o,r,n){let a=t._parseTemplateNode.call(this,o,r,n);if(o.nodeType===Node.TEXT_NODE){let l=this._parseBindings(o.textContent,r);l&&(o.textContent=Bo(l)||" ",ni(this,r,n,"text","textContent",l),a=!0);}return a}static _parseTemplateNodeAttribute(o,r,n,a,l){let d=this._parseBindings(l,r);if(d){let h=a,c="property";Yl.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let u=Bo(d);return u&&c=="attribute"&&(a=="class"&&o.hasAttribute("class")&&(u+=" "+o.getAttribute(a)),o.setAttribute(a,u)),c=="attribute"&&h=="disable-upgrade$"&&o.setAttribute(a,""),o.localName==="input"&&h==="value"&&o.setAttribute(h,""),o.removeAttribute(h),c==="property"&&(a=Ur(a)),ni(this,r,n,c,a,d,u),!0}else return t._parseTemplateNodeAttribute.call(this,o,r,n,a,l)}static _parseTemplateNestedTemplate(o,r,n){let a=t._parseTemplateNestedTemplate.call(this,o,r,n);const l=o.parentNode,d=n.templateInfo,h=l.localName==="dom-if",c=l.localName==="dom-repeat";Ao&&(h||c)&&(l.removeChild(o),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let u=d.hostProps;if(vl&&h)u&&(r.hostProps=Object.assign(r.hostProps||{},u),Ao||(n.parentInfo.noted=!0));else {let _="{";for(let m in u){let E=[{mode:_,source:m,dependencies:[m],hostProp:!0}];ni(this,r,n,"property","_host_"+m,E);}}return a}static _parseBindings(o,r){let n=[],a=0,l;for(;(l=Fo.exec(o))!==null;){l.index>a&&n.push({literal:o.slice(a,l.index)});let d=l[1][0],h=!!l[2],c=l[3].trim(),u=!1,_="",m=-1;d=="{"&&(m=c.indexOf("::"))>0&&(_=c.substring(m+2),c=c.substring(0,m),u=!0);let E=ai(c),k=[];if(E){let{args:I,methodName:w}=E;for(let re=0;re<I.length;re++){let M=I[re];M.literal||k.push(M);}let F=r.dynamicFns;(F&&F[w]||E.static)&&(k.push(w),E.dynamicFn=!0);}else k.push(c);n.push({source:c,mode:d,negate:h,customEvent:u,signature:E,dependencies:k,event:_}),a=Fo.lastIndex;}if(a&&a<o.length){let d=o.substring(a);d&&n.push({literal:d});}return n.length?n:null}static _evaluateBinding(o,r,n,a,l,d){let h;return r.signature?h=Ni(o,n,a,l,r.signature):n!=r.source?h=O(o,r.source):d&&zi(n)?h=O(o,n):h=o.__data[n],r.negate&&(h=!h),h}}return e}),Le=[];/**
|
|
1184
|
+
*/let Ze=0;const et=[],g={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Xr="__computeInfo",Kl=/[A-Z]/;function ni(s,t,e){let i=s[t];if(!i)i=s[t]={};else if(!s.hasOwnProperty(t)&&(i=s[t]=Object.create(s[t]),e))for(let o in i){let r=i[o],n=i[o]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a];}return i}function $e(s,t,e,i,o,r){if(t){let n=!1;const a=Ze++;for(let l in e){let d=o?pe(l):l,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==a)&&(!o||ys(l,_.trigger))&&(_.info&&(_.info.lastRun=a),_.fn(s,l,e,i,_.info,o,r),n=!0);}return n}return !1}function Xl(s,t,e,i,o,r,n,a){let l=!1,d=n?pe(i):i,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==e)&&(!n||ys(i,_.trigger))&&(_.info&&(_.info.lastRun=e),_.fn(s,i,o,r,_.info,n,a),l=!0);return l}function ys(s,t){if(t){let e=t.name;return e==s||!!(t.structured&&$r(e,s))||!!(t.wildcard&&Je(e,s))}else return !0}function Mo(s,t,e,i,o){let r=typeof o.method=="string"?s[o.method]:o.method,n=o.property;r?r.call(s,s.__data[n],i[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined");}function Jl(s,t,e,i,o){let r=s[g.NOTIFY],n,a=Ze++;for(let d in t)t[d]&&(r&&Xl(s,r,a,d,e,i,o)||o&&Ql(s,d,e))&&(n=!0);let l;n&&(l=s.__dataHost)&&l._invalidateProperties&&l._invalidateProperties();}function Ql(s,t,e){let i=pe(t);if(i!==t){let o=Ft(i)+"-changed";return Jr(s,o,e[t],t),!0}return !1}function Jr(s,t,e,i){let o={value:e,queueProperty:!0};i&&(o.path=i),P(s).dispatchEvent(new CustomEvent(t,{detail:o}));}function Zl(s,t,e,i,o,r){let a=(r?pe(t):t)!=t?t:null,l=a?O(s,a):s.__data[t];a&&l===void 0&&(l=e[t]),Jr(s,o.eventName,l,a);}function ed(s,t,e,i,o){let r,n=s.detail,a=n&&n.path;a?(i=Qe(e,i,a),r=n&&n.value):r=s.currentTarget[e],r=o?!r:r,(!t[g.READ_ONLY]||!t[g.READ_ONLY][i])&&t._setPendingPropertyOrPath(i,r,!0,!!a)&&(!n||!n.queueProperty)&&t._invalidateProperties();}function td(s,t,e,i,o){let r=s.__data[t];Et&&(r=Et(r,o.attrName,"attribute",s)),s._propertyToAttribute(t,o.attrName,r);}function id(s,t,e,i){let o=s[g.COMPUTE];if(o)if(gl){Ze++;const r=od(s),n=[];for(let l in t)No(l,o,n,r,i);let a;for(;a=n.shift();)Qr(s,"",t,e,a)&&No(a.methodInfo,o,n,r,i);Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),s.__dataPending=null;}else {let r=t;for(;$e(s,o,r,e,i);)Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),r=s.__dataPending,s.__dataPending=null;}}const sd=(s,t,e)=>{let i=0,o=t.length-1,r=-1;for(;i<=o;){const n=i+o>>1,a=e.get(t[n].methodInfo)-e.get(s.methodInfo);if(a<0)i=n+1;else if(a>0)o=n-1;else {r=n;break}}r<0&&(r=o+1),t.splice(r,0,s);},No=(s,t,e,i,o)=>{const r=o?pe(s):s,n=t[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==Ze&&(!o||ys(s,l.trigger))&&(l.info.lastRun=Ze,sd(l.info,e,i));}};function od(s){let t=s.constructor.__orderedComputedDeps;if(!t){t=new Map;const e=s[g.COMPUTE];let{counts:i,ready:o,total:r}=rd(s),n;for(;n=o.shift();){t.set(n,t.size);const a=e[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--i[d]===0&&o.push(d);});}r!==0&&console.warn(`Computed graph for ${s.localName} incomplete; circular?`),s.constructor.__orderedComputedDeps=t;}return t}function rd(s){const t=s[Xr],e={},i=s[g.COMPUTE],o=[];let r=0;for(let n in t){const a=t[n];r+=e[n]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0);}for(let n in i)t[n]||o.push(n);return {counts:e,ready:o,total:r}}function Qr(s,t,e,i,o){let r=Li(s,t,e,i,o);if(r===et)return !1;let n=o.methodInfo;return s.__dataHasAccessor&&s.__dataHasAccessor[n]?s._setPendingProperty(n,r,!0):(s[n]=r,!1)}function nd(s,t,e){let i=s.__dataLinkedPaths;if(i){let o;for(let r in i){let n=i[r];Je(r,t)?(o=Qe(r,n,t),s._setPendingPropertyOrPath(o,e,!0,!0)):Je(n,t)&&(o=Qe(n,r,t),s._setPendingPropertyOrPath(o,e,!0,!0));}}}function ai(s,t,e,i,o,r,n){e.bindings=e.bindings||[];let a={kind:i,target:o,parts:r,literal:n,isCompound:r.length!==1};if(e.bindings.push(a),cd(a)){let{event:d,negate:h}=a.parts[0];a.listenerEvent=d||Ft(o)+"-changed",a.listenerNegate=h;}let l=t.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let h=a.parts[d];h.compoundIndex=d,ad(s,t,a,h,l);}}function ad(s,t,e,i,o){if(!i.literal)if(e.kind==="attribute"&&e.target[0]==="-")console.warn("Cannot set attribute "+e.target+' because "-" is not a valid attribute starting character');else {let r=i.dependencies,n={index:o,binding:e,part:i,evaluator:s};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=en(l),l.wildcard=!0),s._addTemplatePropertyEffect(t,l.rootProperty,{fn:ld,info:n,trigger:l});}}}function ld(s,t,e,i,o,r,n){let a=n[o.index],l=o.binding,d=o.part;if(r&&d.source&&t.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let h=e[t];t=Qe(d.source,l.target,t),a._setPendingPropertyOrPath(t,h,!1,!0)&&s._enqueueClient(a);}else {let h=o.evaluator._evaluateBinding(s,d,t,e,i,r);h!==et&&dd(s,a,l,d,h);}}function dd(s,t,e,i,o){if(o=hd(t,o,e,i),Et&&(o=Et(o,e.target,e.kind,t)),e.kind=="attribute")s._valueToNodeAttribute(t,o,e.target);else {let r=e.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?(!t[g.READ_ONLY]||!t[g.READ_ONLY][r])&&t._setPendingProperty(r,o)&&s._enqueueClient(t):s._setUnmanagedPropertyToNode(t,r,o);}}function hd(s,t,e,i){if(e.isCompound){let o=s.__dataCompoundStorage[e.target];o[i.compoundIndex]=t,t=o.join("");}return e.kind!=="attribute"&&(e.target==="textContent"||e.target==="value"&&(s.localName==="input"||s.localName==="textarea"))&&(t=t==null?"":t),t}function cd(s){return !!s.target&&s.kind!="attribute"&&s.kind!="text"&&!s.isCompound&&s.parts[0].mode==="{"}function ud(s,t){let{nodeList:e,nodeInfoList:i}=t;if(i.length)for(let o=0;o<i.length;o++){let r=i[o],n=e[o],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];pd(n,d),_d(n,s,d);}n.__dataHost=s;}}function pd(s,t){if(t.isCompound){let e=s.__dataCompoundStorage||(s.__dataCompoundStorage={}),i=t.parts,o=new Array(i.length);for(let n=0;n<i.length;n++)o[n]=i[n].literal;let r=t.target;e[r]=o,t.literal&&t.kind=="property"&&(r==="className"&&(s=P(s)),s[r]=t.literal);}}function _d(s,t,e){if(e.listenerEvent){let i=e.parts[0];s.addEventListener(e.listenerEvent,function(o){ed(o,t,e.target,i.source,i.negate);});}}function Lo(s,t,e,i,o,r){r=t.static||r&&(typeof r!="object"||r[t.methodName]);let n={methodName:t.methodName,args:t.args,methodInfo:o,dynamicFn:r};for(let a=0,l;a<t.args.length&&(l=t.args[a]);a++)l.literal||s._addPropertyEffect(l.rootProperty,e,{fn:i,info:n,trigger:l});return r&&s._addPropertyEffect(t.methodName,e,{fn:i,info:n}),n}function Li(s,t,e,i,o){let r=s._methodHost||s,n=r[o.methodName];if(n){let a=s._marshalArgs(o.args,t,e);return a===et?et:n.apply(r,a)}else o.dynamicFn||console.warn("method `"+o.methodName+"` not defined");}const md=[],Zr="(?:[a-zA-Z_$][\\w.:$\\-*]*)",fd="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",vd="(?:'(?:[^'\\\\]|\\\\.)*')",gd='(?:"(?:[^"\\\\]|\\\\.)*")',bd="(?:"+vd+"|"+gd+")",Vo="(?:("+Zr+"|"+fd+"|"+bd+")\\s*)",yd="(?:"+Vo+"(?:,\\s*"+Vo+")*)",xd="(?:\\(\\s*(?:"+yd+"?)\\)\\s*)",Cd="("+Zr+"\\s*"+xd+"?)",wd="(\\[\\[|{{)\\s*",Id="(?:]]|}})",Ad="(?:(!)\\s*)?",Ed=wd+Ad+Cd+Id,Fo=new RegExp(Ed,"g");function Bo(s){let t="";for(let e=0;e<s.length;e++){let i=s[e].literal;t+=i||"";}return t}function li(s){let t=s.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let i={methodName:t[1],static:!0,args:md};if(t[2].trim()){let o=t[2].replace(/\\,/g,",").split(",");return Sd(o,i)}else return i}return null}function Sd(s,t){return t.args=s.map(function(e){let i=en(e);return i.literal||(t.static=!1),i},this),t}function en(s){let t=s.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),e={name:t,value:"",literal:!1},i=t[0];switch(i==="-"&&(i=t[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':e.value=t.slice(1,-1),e.literal=!0;break;case"#":e.value=Number(t),e.literal=!0;break}return e.literal||(e.rootProperty=pe(t),e.structured=Mi(t),e.structured&&(e.wildcard=t.slice(-2)==".*",e.wildcard&&(e.name=t.slice(0,-2)))),e}function Ro(s,t,e){let i=O(s,e);return i===void 0&&(i=t[e]),i}function tn(s,t,e,i){const o={indexSplices:i};zi&&!s._overrideLegacyUndefined&&(t.splices=o),s.notifyPath(e+".splices",o),s.notifyPath(e+".length",t.length),zi&&!s._overrideLegacyUndefined&&(o.indexSplices=[]);}function Le(s,t,e,i,o,r){tn(s,t,e,[{index:i,addedCount:o,removed:r,object:t,type:"splice"}]);}function kd(s){return s[0].toUpperCase()+s.substring(1)}const xs=S(s=>{const t=Gl(Fl(s));class e extends t{constructor(){super(),this.__isPropertyEffectsClient=!0;}get PROPERTY_EFFECT_TYPES(){return g}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1;}_registerHost(){if(Ve.length){let o=Ve[Ve.length-1];o._enqueueClient(this),this.__dataHost=o;}}_initializeProtoProperties(o){this.__data=Object.create(o),this.__dataPending=Object.create(o),this.__dataOld={};}_initializeInstanceProperties(o){let r=this[g.READ_ONLY];for(let n in o)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=o[n]);}_addPropertyEffect(o,r,n){this._createPropertyAccessor(o,r==g.READ_ONLY);let a=ni(this,r,!0)[o];a||(a=this[r][o]=[]),a.push(n);}_removePropertyEffect(o,r,n){let a=ni(this,r,!0)[o],l=a.indexOf(n);l>=0&&a.splice(l,1);}_hasPropertyEffect(o,r){let n=this[r];return !!(n&&n[o])}_hasReadOnlyEffect(o){return this._hasPropertyEffect(o,g.READ_ONLY)}_hasNotifyEffect(o){return this._hasPropertyEffect(o,g.NOTIFY)}_hasReflectEffect(o){return this._hasPropertyEffect(o,g.REFLECT)}_hasComputedEffect(o){return this._hasPropertyEffect(o,g.COMPUTE)}_setPendingPropertyOrPath(o,r,n,a){if(a||pe(Array.isArray(o)?o[0]:o)!==o){if(!a){let l=O(this,o);if(o=Oo(this,o,r),!o||!super._shouldPropertyChange(o,r,l))return !1}if(this.__dataHasPaths=!0,this._setPendingProperty(o,r,n))return nd(this,o,r),!0}else {if(this.__dataHasAccessor&&this.__dataHasAccessor[o])return this._setPendingProperty(o,r,n);this[o]=r;}return !1}_setUnmanagedPropertyToNode(o,r,n){(n!==o[r]||typeof n=="object")&&(r==="className"&&(o=P(o)),o[r]=n);}_setPendingProperty(o,r,n){let a=this.__dataHasPaths&&Mi(o),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(o,r,l[o])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),o in this.__dataOld||(this.__dataOld[o]=this.__data[o]),a?this.__dataTemp[o]=r:this.__data[o]=r,this.__dataPending[o]=r,(a||this[g.NOTIFY]&&this[g.NOTIFY][o])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[o]=n),!0):!1}_setProperty(o,r){this._setPendingProperty(o,r,!0)&&this._invalidateProperties();}_invalidateProperties(){this.__dataReady&&this._flushProperties();}_enqueueClient(o){this.__dataPendingClients=this.__dataPendingClients||[],o!==this&&this.__dataPendingClients.push(o);}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0);}__enableOrFlushClients(){let o=this.__dataPendingClients;if(o){this.__dataPendingClients=null;for(let r=0;r<o.length;r++){let n=o[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties();}}}_readyClients(){this.__enableOrFlushClients();}setProperties(o,r){for(let n in o)(r||!this[g.READ_ONLY]||!this[g.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,o[n],!0);this._invalidateProperties();}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties();}_propertiesChanged(o,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;id(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),$e(this,this[g.REFLECT],r,n,a),$e(this,this[g.OBSERVE],r,n,a),l&&Jl(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={});}_propagatePropertyChanges(o,r,n){this[g.PROPAGATE]&&$e(this,this[g.PROPAGATE],o,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,o,r,n);}_runEffectsForTemplate(o,r,n,a){const l=(d,h)=>{$e(this,o.propertyEffects,d,n,h,o.nodeList);for(let c=o.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,h);};o.runEffects?o.runEffects(l,r,a):l(r,a);}linkPaths(o,r){o=Re(o),r=Re(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[o]=r;}unlinkPaths(o){o=Re(o),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[o];}notifySplices(o,r){let n={path:""},a=O(this,o,n);tn(this,a,n.path,r);}get(o,r){return O(r||this,o)}set(o,r,n){n?Oo(n,o,r):(!this[g.READ_ONLY]||!this[g.READ_ONLY][o])&&this._setPendingPropertyOrPath(o,r,!0)&&this._invalidateProperties();}push(o,...r){let n={path:""},a=O(this,o,n),l=a.length,d=a.push(...r);return r.length&&Le(this,a,n.path,l,r.length,[]),d}pop(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.pop();return a&&Le(this,n,r.path,n.length,0,[l]),l}splice(o,r,n,...a){let l={path:""},d=O(this,o,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let h;return arguments.length===2?h=d.splice(r):h=d.splice(r,n,...a),(a.length||h.length)&&Le(this,d,l.path,r,a.length,h),h}shift(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.shift();return a&&Le(this,n,r.path,0,0,[l]),l}unshift(o,...r){let n={path:""},a=O(this,o,n),l=a.unshift(...r);return r.length&&Le(this,a,n.path,0,r.length,[]),l}notifyPath(o,r){let n;if(arguments.length==1){let a={path:""};r=O(this,o,a),n=a.path;}else Array.isArray(o)?n=Re(o):n=o;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties();}_createReadOnlyProperty(o,r){this._addPropertyEffect(o,g.READ_ONLY),r&&(this["_set"+kd(o)]=function(n){this._setProperty(o,n);});}_createPropertyObserver(o,r,n){let a={property:o,method:r,dynamicFn:!!n};this._addPropertyEffect(o,g.OBSERVE,{fn:Mo,info:a,trigger:{name:o}}),n&&this._addPropertyEffect(r,g.OBSERVE,{fn:Mo,info:a,trigger:{name:r}});}_createMethodObserver(o,r){let n=li(o);if(!n)throw new Error("Malformed observer expression '"+o+"'");Lo(this,n,g.OBSERVE,Li,null,r);}_createNotifyingProperty(o){this._addPropertyEffect(o,g.NOTIFY,{fn:Zl,info:{eventName:Ft(o)+"-changed",property:o}});}_createReflectedProperty(o){let r=this.constructor.attributeNameForProperty(o);r[0]==="-"?console.warn("Property "+o+" cannot be reflected to attribute "+r+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(o,g.REFLECT,{fn:td,info:{attrName:r}});}_createComputedProperty(o,r,n){let a=li(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Lo(this,a,g.COMPUTE,Qr,o,n);ni(this,Xr)[o]=l;}_marshalArgs(o,r,n){const a=this.__data,l=[];for(let d=0,h=o.length;d<h;d++){let{name:c,structured:u,wildcard:_,value:m,literal:A}=o[d];if(!A)if(_){const k=Je(c,r),w=Ro(a,n,k?r:c);m={path:k?r:c,value:w,base:k?O(a,c):w};}else m=u?Ro(a,n,c):a[c];if(zi&&!this._overrideLegacyUndefined&&m===void 0&&o.length>1)return et;l[d]=m;}return l}static addPropertyEffect(o,r,n){this.prototype._addPropertyEffect(o,r,n);}static createPropertyObserver(o,r,n){this.prototype._createPropertyObserver(o,r,n);}static createMethodObserver(o,r){this.prototype._createMethodObserver(o,r);}static createNotifyingProperty(o){this.prototype._createNotifyingProperty(o);}static createReadOnlyProperty(o,r){this.prototype._createReadOnlyProperty(o,r);}static createReflectedProperty(o){this.prototype._createReflectedProperty(o);}static createComputedProperty(o,r,n){this.prototype._createComputedProperty(o,r,n);}static bindTemplate(o){return this.prototype._bindTemplate(o)}_bindTemplate(o,r){let n=this.constructor._parseTemplate(o),a=this.__preBoundTemplateInfo==n;if(!a)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(r)if(n=Object.create(n),n.wasPreBound=a,!this.__templateInfo)this.__templateInfo=n;else {const l=o._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n;}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(o,r,n){let a=o.hostProps=o.hostProps||{};a[r]=!0;let l=o.propertyEffects=o.propertyEffects||{};(l[r]=l[r]||[]).push(n);}_stampTemplate(o,r){r=r||this._bindTemplate(o,!0),Ve.push(this);let n=super._stampTemplate(o,r);if(Ve.pop(),r.nodeList=n.nodeList,!r.wasPreBound){let a=r.childNodes=[];for(let l=n.firstChild;l;l=l.nextSibling)a.push(l);}return n.templateInfo=r,ud(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(o){const r=o.templateInfo,{previousSibling:n,nextSibling:a,parent:l}=r;n?n.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=n:l&&(l.lastChild=n),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let h=0;h<d.length;h++){let c=d[h];P(P(c).parentNode).removeChild(c);}}static _parseTemplateNode(o,r,n){let a=t._parseTemplateNode.call(this,o,r,n);if(o.nodeType===Node.TEXT_NODE){let l=this._parseBindings(o.textContent,r);l&&(o.textContent=Bo(l)||" ",ai(this,r,n,"text","textContent",l),a=!0);}return a}static _parseTemplateNodeAttribute(o,r,n,a,l){let d=this._parseBindings(l,r);if(d){let h=a,c="property";Kl.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let u=Bo(d);return u&&c=="attribute"&&(a=="class"&&o.hasAttribute("class")&&(u+=" "+o.getAttribute(a)),o.setAttribute(a,u)),c=="attribute"&&h=="disable-upgrade$"&&o.setAttribute(a,""),o.localName==="input"&&h==="value"&&o.setAttribute(h,""),o.removeAttribute(h),c==="property"&&(a=qr(a)),ai(this,r,n,c,a,d,u),!0}else return t._parseTemplateNodeAttribute.call(this,o,r,n,a,l)}static _parseTemplateNestedTemplate(o,r,n){let a=t._parseTemplateNestedTemplate.call(this,o,r,n);const l=o.parentNode,d=n.templateInfo,h=l.localName==="dom-if",c=l.localName==="dom-repeat";Ao&&(h||c)&&(l.removeChild(o),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let u=d.hostProps;if(bl&&h)u&&(r.hostProps=Object.assign(r.hostProps||{},u),Ao||(n.parentInfo.noted=!0));else {let _="{";for(let m in u){let A=[{mode:_,source:m,dependencies:[m],hostProp:!0}];ai(this,r,n,"property","_host_"+m,A);}}return a}static _parseBindings(o,r){let n=[],a=0,l;for(;(l=Fo.exec(o))!==null;){l.index>a&&n.push({literal:o.slice(a,l.index)});let d=l[1][0],h=!!l[2],c=l[3].trim(),u=!1,_="",m=-1;d=="{"&&(m=c.indexOf("::"))>0&&(_=c.substring(m+2),c=c.substring(0,m),u=!0);let A=li(c),k=[];if(A){let{args:w,methodName:C}=A;for(let ne=0;ne<w.length;ne++){let M=w[ne];M.literal||k.push(M);}let B=r.dynamicFns;(B&&B[C]||A.static)&&(k.push(C),A.dynamicFn=!0);}else k.push(c);n.push({source:c,mode:d,negate:h,customEvent:u,signature:A,dependencies:k,event:_}),a=Fo.lastIndex;}if(a&&a<o.length){let d=o.substring(a);d&&n.push({literal:d});}return n.length?n:null}static _evaluateBinding(o,r,n,a,l,d){let h;return r.signature?h=Li(o,n,a,l,r.signature):n!=r.source?h=O(o,r.source):d&&Mi(n)?h=O(o,n):h=o.__data[n],r.negate&&(h=!h),h}}return e}),Ve=[];/**
|
|
1185
1185
|
@license
|
|
1186
1186
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1187
1187
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1197,7 +1197,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1197
1197
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1198
1198
|
Code distributed by Google as part of the polymer project is also
|
|
1199
1199
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1200
|
-
*/function
|
|
1200
|
+
*/function Td(s){const t={};for(let e in s){const i=s[e];t[e]=typeof i=="function"?{type:i}:i;}return t}const Pd=S(s=>{const t=Yr(s);function e(r){const n=Object.getPrototypeOf(r);return n.prototype instanceof o?n:null}function i(r){if(!r.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",r))){let n=null;if(r.hasOwnProperty(JSCompiler_renameProperty("properties",r))){const a=r.properties;a&&(n=Td(a));}r.__ownProperties=n;}return r.__ownProperties}class o extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const n=this._properties;this.__observedAttributes=n?Object.keys(n).map(a=>this.prototype._addPropertyToAttributeMap(a)):[];}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const n=e(this);n&&n.finalize(),this.__finalized=!0,this._finalizeClass();}}static _finalizeClass(){const n=i(this);n&&this.createProperties(n);}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const n=e(this);this.__properties=Object.assign({},n&&n._properties,i(this));}return this.__properties}static typeForProperty(n){const a=this._properties[n];return a&&a.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties();}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties();}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback();}}return o});/**
|
|
1201
1201
|
* @fileoverview
|
|
1202
1202
|
* @suppress {checkPrototypalTypes}
|
|
1203
1203
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1207,7 +1207,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1207
1207
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
1208
1208
|
* Google as part of the polymer project is also subject to an additional IP
|
|
1209
1209
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1210
|
-
*/const
|
|
1210
|
+
*/const Od="3.5.2",$o=window.ShadyCSS&&window.ShadyCSS.cssBuild,Dd=S(s=>{const t=Pd(xs(s));function e(l){if(!l.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",l))){l.__propertyDefaults=null;let d=l._properties;for(let h in d){let c=d[h];"value"in c&&(l.__propertyDefaults=l.__propertyDefaults||{},l.__propertyDefaults[h]=c);}}return l.__propertyDefaults}function i(l){return l.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",l))||(l.__ownObservers=l.hasOwnProperty(JSCompiler_renameProperty("observers",l))?l.observers:null),l.__ownObservers}function o(l,d,h,c){h.computed&&(h.readOnly=!0),h.computed&&(l._hasReadOnlyEffect(d)?console.warn(`Cannot redefine computed property '${d}'.`):l._createComputedProperty(d,h.computed,c)),h.readOnly&&!l._hasReadOnlyEffect(d)?l._createReadOnlyProperty(d,!h.computed):h.readOnly===!1&&l._hasReadOnlyEffect(d)&&console.warn(`Cannot make readOnly property '${d}' non-readOnly.`),h.reflectToAttribute&&!l._hasReflectEffect(d)?l._createReflectedProperty(d):h.reflectToAttribute===!1&&l._hasReflectEffect(d)&&console.warn(`Cannot make reflected property '${d}' non-reflected.`),h.notify&&!l._hasNotifyEffect(d)?l._createNotifyingProperty(d):h.notify===!1&&l._hasNotifyEffect(d)&&console.warn(`Cannot make notify property '${d}' non-notify.`),h.observer&&l._createPropertyObserver(d,h.observer,c[h.observer]),l._addPropertyToAttributeMap(d);}function r(l,d,h,c){if(!$o){const u=d.content.querySelectorAll("style"),_=Br(d),m=Sl(h),A=d.content.firstElementChild;for(let w=0;w<m.length;w++){let C=m[w];C.textContent=l._processStyleText(C.textContent,c),d.content.insertBefore(C,A);}let k=0;for(let w=0;w<_.length;w++){let C=_[w],B=u[k];B!==C?(C=C.cloneNode(!0),B.parentNode.insertBefore(C,B)):k++,C.textContent=l._processStyleText(C.textContent,c);}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(d,h),yl&&$o&&_l){const u=d.content.querySelectorAll("style");if(u){let _="";Array.from(u).forEach(m=>{_+=m.textContent,m.parentNode.removeChild(m);}),l._styleSheet=new CSSStyleSheet,l._styleSheet.replaceSync(_);}}}function n(l){let d=null;if(l&&(!St||fl)&&(d=Xe.import(l,"template"),St&&!d))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${l}`);return d}class a extends t{static get polymerElementVersion(){return Od}static _finalizeClass(){t._finalizeClass.call(this);const d=i(this);d&&this.createObservers(d,this._properties),this._prepareTemplate();}static _prepareTemplate(){let d=this.template;d&&(typeof d=="string"?(console.error("template getter must return HTMLTemplateElement"),d=null):Nr||(d=d.cloneNode(!0))),this.prototype._template=d;}static createProperties(d){for(let h in d)o(this.prototype,h,d[h],d);}static createObservers(d,h){const c=this.prototype;for(let u=0;u<d.length;u++)c._createMethodObserver(d[u],h);}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let d=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;typeof d=="function"&&(d=d()),this._template=d!==void 0?d:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&n(this.is)||Object.getPrototypeOf(this.prototype).constructor.template;}return this._template}static set template(d){this._template=d;}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const d=this.importMeta;if(d)this._importPath=gs(d.url);else {const h=Xe.import(this.is);this._importPath=h&&h.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath;}}return this._importPath}constructor(){super();}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=ml,this.importPath=this.constructor.importPath;let d=e(this.constructor);if(d)for(let h in d){let c=d[h];if(this._canApplyPropertyDefault(h)){let u=typeof c.value=="function"?c.value.call(this):c.value;this._hasAccessor(h)?this._setPendingProperty(h,u,!0):this[h]=u;}}}_canApplyPropertyDefault(d){return !this.hasOwnProperty(d)}static _processStyleText(d,h){return vs(d,h)}static _finalizeTemplate(d){const h=this.prototype._template;if(h&&!h.__polymerFinalized){h.__polymerFinalized=!0;const c=this.importPath,u=c?je(c):"";r(this,h,d,u),this.prototype._bindTemplate(h);}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback();}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready();}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients();}_attachDom(d){const h=P(this);if(h.attachShadow)return d?(h.shadowRoot||(h.attachShadow({mode:"open",shadyUpgradeFragment:d}),h.shadowRoot.appendChild(d),this.constructor._styleSheet&&(h.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),vl&&window.ShadyDOM&&window.ShadyDOM.flushInitial(h.shadowRoot),h.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(d){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,d);}resolveUrl(d,h){return !h&&this.importPath&&(h=je(this.importPath)),je(d,h)}static _parseTemplateContent(d,h,c){return h.dynamicFns=h.dynamicFns||this._properties,t._parseTemplateContent.call(this,d,h,c)}static _addTemplatePropertyEffect(d,h,c){return Lr&&!(h in this._properties)&&!(c.info.part.signature&&c.info.part.signature.static)&&!c.info.part.hostProp&&!d.nestedTemplate&&console.warn(`Property '${h}' used in template but not declared in 'properties'; attribute will not be observed.`),t._addTemplatePropertyEffect.call(this,d,h,c)}}return a});/**
|
|
1211
1211
|
@license
|
|
1212
1212
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1213
1213
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1215,7 +1215,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1215
1215
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1216
1216
|
Code distributed by Google as part of the polymer project is also
|
|
1217
1217
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1218
|
-
*/const Ho=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:s=>s});class sn{constructor(t,e){rn(t,e);const i=e.reduce((o,r,n)=>o+on(r)+t[n+1],t[0]);this.value=i.toString();}toString(){return this.value}}function on(s){if(s instanceof sn)return s.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${s}`)}function
|
|
1218
|
+
*/const Ho=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:s=>s});class sn{constructor(t,e){rn(t,e);const i=e.reduce((o,r,n)=>o+on(r)+t[n+1],t[0]);this.value=i.toString();}toString(){return this.value}}function on(s){if(s instanceof sn)return s.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${s}`)}function zd(s){if(s instanceof HTMLTemplateElement)return s.innerHTML;if(s instanceof sn)return on(s);throw new Error(`non-template value passed to Polymer's html function: ${s}`)}const b=function(t,...e){rn(t,e);const i=document.createElement("template");let o=e.reduce((r,n,a)=>r+zd(n)+t[a+1],t[0]);return Ho&&(o=Ho.createHTML(o)),i.innerHTML=o,i},rn=(s,t)=>{if(!Array.isArray(s)||!Array.isArray(s.raw)||t.length!==s.length-1)throw new TypeError("Invalid call to the html template tag")};/**
|
|
1219
1219
|
@license
|
|
1220
1220
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1221
1221
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1223,7 +1223,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1223
1223
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1224
1224
|
Code distributed by Google as part of the polymer project is also
|
|
1225
1225
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1226
|
-
*/const
|
|
1226
|
+
*/const y=Dd(HTMLElement),Md=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,yt=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Nd(){function s(){return !0}return nn(s)}function Ld(){try{return Vd()?!0:Fd()?yt?!Bd():!Nd():!1}catch(s){return !1}}function Vd(){return localStorage.getItem("vaadin.developmentmode.force")}function Fd(){return ["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function Bd(){return !!(yt&&Object.keys(yt).map(t=>yt[t]).filter(t=>t.productionMode).length>0)}function nn(s,t){if(typeof s!="function")return;const e=Md.exec(s.toString());if(e)try{s=new Function(e[1]);}catch(i){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",i);}return s(t)}window.Vaadin=window.Vaadin||{};const qo=function(s,t){if(window.Vaadin.developmentMode)return nn(s,t)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=Ld());function Rd(){/*! vaadin-dev-mode:start
|
|
1227
1227
|
(function () {
|
|
1228
1228
|
'use strict';
|
|
1229
1229
|
|
|
@@ -1701,7 +1701,7 @@ try {
|
|
|
1701
1701
|
|
|
1702
1702
|
}());
|
|
1703
1703
|
|
|
1704
|
-
vaadin-dev-mode:end **/}const an=function(){if(typeof
|
|
1704
|
+
vaadin-dev-mode:end **/}const an=function(){if(typeof qo=="function")return qo(Rd)};/**
|
|
1705
1705
|
* @license
|
|
1706
1706
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1707
1707
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1709,7 +1709,7 @@ try {
|
|
|
1709
1709
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1710
1710
|
* Code distributed by Google as part of the polymer project is also
|
|
1711
1711
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1712
|
-
*/let
|
|
1712
|
+
*/let Uo=0,ln=0;const xe=[];let Vi=!1;function $d(){Vi=!1;const s=xe.length;for(let t=0;t<s;t++){const e=xe[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}xe.splice(0,s),ln+=s;}const te={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},tt={run(s){return window.requestAnimationFrame(s)},cancel(s){window.cancelAnimationFrame(s);}},dn={run(s){return window.requestIdleCallback?window.requestIdleCallback(s):window.setTimeout(s,16)},cancel(s){window.cancelIdleCallback?window.cancelIdleCallback(s):window.clearTimeout(s);}},Tt={run(s){Vi||(Vi=!0,queueMicrotask(()=>$d())),xe.push(s);const t=Uo;return Uo+=1,t},cancel(s){const t=s-ln;if(t>=0){if(!xe[t])throw new Error(`invalid async handle: ${s}`);xe[t]=null;}}};/**
|
|
1713
1713
|
@license
|
|
1714
1714
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1715
1715
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1717,35 +1717,35 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1717
1717
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1718
1718
|
Code distributed by Google as part of the polymer project is also
|
|
1719
1719
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1720
|
-
*/const
|
|
1720
|
+
*/const it=new Set;let z=class Fi{static debounce(t,e,i){return t instanceof Fi?t._cancelAsync():t=new Fi,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null;}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run(()=>{this._timer=null,it.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),it.delete(this));}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null);}flush(){this.isActive()&&(this.cancel(),this._callback());}isActive(){return this._timer!=null}};function hn(s){it.add(s);}function Hd(){const s=!!it.size;return it.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s}const He=()=>{let s;do s=Hd();while(s)};/**
|
|
1721
1721
|
* @license
|
|
1722
1722
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1723
1723
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1724
|
-
*/const U=[];function
|
|
1724
|
+
*/const U=[];function Bi(s,t,e=s.getAttribute("dir")){t?s.setAttribute("dir",t):e!=null&&s.removeAttribute("dir");}function Ri(){return document.documentElement.getAttribute("dir")}function qd(){const s=Ri();U.forEach(t=>{Bi(t,s);});}const Ud=new MutationObserver(qd);Ud.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const $=s=>class extends s{static get properties(){return {dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>e===""?null:e}}}}get __isRTL(){return this.getAttribute("dir")==="rtl"}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),Bi(this,Ri(),null));}attributeChangedCallback(e,i,o){if(super.attributeChangedCallback(e,i,o),e!=="dir")return;const r=Ri(),n=o===r&&U.indexOf(this)===-1,a=!o&&i&&U.indexOf(this)===-1;n||a?(this.__subscribe(),Bi(this,r,o)):o!==r&&i===r&&this.__unsubscribe();}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=U.includes(this),this.__unsubscribe();}_valueToNodeAttribute(e,i,o){o==="dir"&&i===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,i,o);}_attributeToProperty(e,i,o){e==="dir"&&!i?this.dir="":super._attributeToProperty(e,i,o);}__subscribe(){U.includes(this)||U.push(this);}__unsubscribe(){U.includes(this)&&U.splice(U.indexOf(this),1);}};/**
|
|
1725
1725
|
* @license
|
|
1726
1726
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1727
1727
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1728
|
-
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let
|
|
1728
|
+
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let di;const Wo=new Set,X=s=>class extends $(s){static finalize(){super.finalize();const{is:e}=this;e&&!Wo.has(e)&&(window.Vaadin.registrations.push(this),Wo.add(e),window.Vaadin.developmentModeCallback&&(di=z.debounce(di,dn,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]();}),hn(di)));}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.');}};/**
|
|
1729
1729
|
* @license
|
|
1730
1730
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1731
1731
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1732
|
-
*/function
|
|
1732
|
+
*/function Wd(s){const t=[];for(;s;){if(s.nodeType===Node.DOCUMENT_NODE){t.push(s);break}if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(s),s=s.host;continue}if(s.assignedSlot){s=s.assignedSlot;continue}s=s.parentNode;}return t}function cn(s){const t=[];let e;return s.localName==="slot"?e=s.assignedElements():(t.push(s),e=[...s.children]),e.forEach(i=>t.push(...cn(i))),t}function Cs(s){return s?new Set(s.split(" ")):new Set}function Bt(s){return s?[...s].join(" "):""}function un(s,t,e){const i=Cs(s.getAttribute(t));i.add(e),s.setAttribute(t,Bt(i));}function jd(s,t,e){const i=Cs(s.getAttribute(t));if(i.delete(e),i.size===0){s.removeAttribute(t);return}s.setAttribute(t,Bt(i));}function Yd(s){return s.nodeType===Node.TEXT_NODE&&s.textContent.trim()===""}/**
|
|
1733
1733
|
* @license
|
|
1734
1734
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
1735
1735
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1736
|
-
*/let
|
|
1736
|
+
*/let ws=class{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule();},this.connect(),this._schedule();}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0;}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1;}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask(()=>{this.flush();}));}flush(){this._connected&&(this._scheduled=!1,this._processNodes());}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],o=[];t.length&&(e=t.filter(r=>!this._storedNodes.includes(r))),this._storedNodes.length&&this._storedNodes.forEach((r,n)=>{const a=t.indexOf(r);a===-1?i.push(r):a!==n&&o.push(r);}),(e.length||i.length||o.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:o,removedNodes:i}),this._storedNodes=t;}};/**
|
|
1737
1737
|
* @license
|
|
1738
1738
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1739
1739
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1740
|
-
*/let
|
|
1740
|
+
*/let Gd=0;function Rt(){return Gd++}/**
|
|
1741
1741
|
* @license
|
|
1742
1742
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1743
1743
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1744
|
-
*/let
|
|
1744
|
+
*/let G=class extends EventTarget{static generateId(t,e="default"){return `${e}-${t.localName}-${Rt()}`}constructor(t,e,i,o={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:l,uniqueIdPrefix:d}=o;this.host=t,this.slotName=e,this.tagName=i,this.observe=typeof a=="boolean"?a:!0,this.multiple=typeof n=="boolean"?n:!1,this.slotInitializer=r,n&&(this.nodes=[]),l&&(this.defaultId=this.constructor.generateId(t,d||e));}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0);}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t));}initMultiple(){const t=this.getSlotChildren();if(t.length===0){const e=this.attachDefaultNode();e&&(this.nodes=[e],this.initNode(e));}else this.nodes=t,t.forEach(e=>{this.initAddedNode(e);});}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let o=this.defaultNode;return !o&&i&&(o=document.createElement(i),o instanceof Element&&(e!==""&&o.setAttribute("slot",e),this.defaultNode=o)),o&&(this.node=o,t.appendChild(o)),o}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&t==="")}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host);}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t));}observeSlot(){const{slotName:t}=this,e=t===""?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new ws(i,({addedNodes:o,removedNodes:r})=>{const n=this.multiple?this.nodes:[this.node],a=o.filter(l=>!Yd(l)&&!n.includes(l));r.length&&(this.nodes=n.filter(l=>!r.includes(l)),r.forEach(l=>{this.teardownNode(l);})),a&&a.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...n,...a].filter(l=>l!==this.defaultNode),a.forEach(l=>{this.initAddedNode(l);})):(this.node&&this.node.remove(),this.node=a[0],this.initAddedNode(this.node)));});}};/**
|
|
1745
1745
|
* @license
|
|
1746
1746
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1747
1747
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1748
|
-
*/let
|
|
1748
|
+
*/let _e=class extends G{constructor(t){super(t,"tooltip"),this.setTarget(t);}initCustomNode(t){t.target=this.target,this.ariaTarget!==void 0&&(t.ariaTarget=this.ariaTarget),this.context!==void 0&&(t.context=this.context),this.manual!==void 0&&(t.manual=this.manual),this.opened!==void 0&&(t.opened=this.opened),this.position!==void 0&&(t._position=this.position),this.shouldShow!==void 0&&(t.shouldShow=this.shouldShow),this.__notifyChange();}teardownNode(){this.__notifyChange();}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t);}setContext(t){this.context=t;const e=this.node;e&&(e.context=t);}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t);}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t);}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t);}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t);}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t);}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}));}};/**
|
|
1749
1749
|
@license
|
|
1750
1750
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1751
1751
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1753,107 +1753,107 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1753
1753
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1754
1754
|
Code distributed by Google as part of the polymer project is also
|
|
1755
1755
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1756
|
-
*/const
|
|
1756
|
+
*/const Kd=s=>s,pn=typeof document.head.style.touchAction=="string",$i="__polymerGestures",hi="__polymerGesturesHandled",Hi="__polymerGesturesTouchAction",jo=25,Yo=5,Xd=2,Jd=["mousedown","mousemove","mouseup","click"],Qd=[0,1,4,2],Zd=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(s){return !1}}();function Is(s){return Jd.indexOf(s)>-1}(function(){try{const s=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,s),window.removeEventListener("test",null,s);}catch(s){}})();function th(s){}const ih=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),sh={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function ce(s){const t=s.type;if(!Is(t))return !1;if(t==="mousemove"){let i=s.buttons===void 0?1:s.buttons;return s instanceof window.MouseEvent&&!Zd&&(i=Qd[s.which]||0),!!(i&1)}return (s.button===void 0?0:s.button)===0}function oh(s){if(s.type==="click"){if(s.detail===0)return !0;const t=ie(s);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return !0;const e=t.getBoundingClientRect(),i=s.pageX,o=s.pageY;return !(i>=e.left&&i<=e.right&&o>=e.top&&o<=e.bottom)}return !1}const j={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function rh(s){let t="auto";const e=mn(s);for(let i=0,o;i<e.length;i++)if(o=e[i],o[Hi]){t=o[Hi];break}return t}function _n(s,t,e){s.movefn=t,s.upfn=e,document.addEventListener("mousemove",t),document.addEventListener("mouseup",e);}function Ce(s){document.removeEventListener("mousemove",s.movefn),document.removeEventListener("mouseup",s.upfn),s.movefn=null,s.upfn=null;}const mn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:s=>s.composedPath&&s.composedPath()||[],As={},de=[];function nh(s,t){let e=document.elementFromPoint(s,t),i=e;for(;i&&i.shadowRoot&&!window.ShadyDOM;){const o=i;if(i=i.shadowRoot.elementFromPoint(s,t),o===i)break;i&&(e=i);}return e}function ie(s){const t=mn(s);return t.length>0?t[0]:s.target}function ah(s){const t=s.type,i=s.currentTarget[$i];if(!i)return;const o=i[t];if(!o)return;if(!s[hi]&&(s[hi]={},t.startsWith("touch"))){const n=s.changedTouches[0];if(t==="touchstart"&&s.touches.length===1&&(j.touch.id=n.identifier),j.touch.id!==n.identifier)return;pn||(t==="touchstart"||t==="touchmove")&&lh(s);}const r=s[hi];if(!r.skip){for(let n=0,a;n<de.length;n++)a=de[n],o[a.name]&&!r[a.name]&&a.flow&&a.flow.start.indexOf(s.type)>-1&&a.reset&&a.reset();for(let n=0,a;n<de.length;n++)a=de[n],o[a.name]&&!r[a.name]&&(r[a.name]=!0,a[t](s));}}function lh(s){const t=s.changedTouches[0],e=s.type;if(e==="touchstart")j.touch.x=t.clientX,j.touch.y=t.clientY,j.touch.scrollDecided=!1;else if(e==="touchmove"){if(j.touch.scrollDecided)return;j.touch.scrollDecided=!0;const i=rh(s);let o=!1;const r=Math.abs(j.touch.x-t.clientX),n=Math.abs(j.touch.y-t.clientY);s.cancelable&&(i==="none"?o=!0:i==="pan-x"?o=n>r:i==="pan-y"&&(o=r>n)),o?s.preventDefault():Pt("track");}}function R(s,t,e){return As[t]?(dh(s,t,e),!0):!1}function dh(s,t,e){const i=As[t],o=i.deps,r=i.name;let n=s[$i];n||(s[$i]=n={});for(let a=0,l,d;a<o.length;a++)l=o[a],!(ih&&Is(l)&&l!=="click")&&(d=n[l],d||(n[l]=d={_count:0}),d._count===0&&s.addEventListener(l,ah,th()),d[r]=(d[r]||0)+1,d._count=(d._count||0)+1);s.addEventListener(t,e),i.touchAction&&fn(s,i.touchAction);}function Es(s){de.push(s),s.emits.forEach(t=>{As[t]=s;});}function hh(s){for(let t=0,e;t<de.length;t++){e=de[t];for(let i=0,o;i<e.emits.length;i++)if(o=e.emits[i],o===s)return e}return null}function fn(s,t){pn&&s instanceof HTMLElement&&Tt.run(()=>{s.style.touchAction=t;}),s[Hi]=t;}function Ss(s,t,e){const i=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(i.detail=e,Kd(s).dispatchEvent(i),i.defaultPrevented){const o=e.preventer||e.sourceEvent;o&&o.preventDefault&&o.preventDefault();}}function Pt(s){const t=hh(s);t.info&&(t.info.prevent=!0);}Es({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Ce(this.info);},mousedown(s){if(!ce(s))return;const t=ie(s),e=this,i=r=>{ce(r)||(Fe("up",t,r),Ce(e.info));},o=r=>{ce(r)&&Fe("up",t,r),Ce(e.info);};_n(this.info,i,o),Fe("down",t,s);},touchstart(s){Fe("down",ie(s),s.changedTouches[0],s);},touchend(s){Fe("up",ie(s),s.changedTouches[0],s);}});function Fe(s,t,e,i){t&&Ss(t,s,{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i,prevent(o){return Pt(o)}});}Es({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(s){this.moves.length>Xd&&this.moves.shift(),this.moves.push(s);},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Ce(this.info);},mousedown(s){if(!ce(s))return;const t=ie(s),e=this,i=r=>{const n=r.clientX,a=r.clientY;Go(e.info,n,a)&&(e.info.state=e.info.started?r.type==="mouseup"?"end":"track":"start",e.info.state==="start"&&Pt("tap"),e.info.addMove({x:n,y:a}),ce(r)||(e.info.state="end",Ce(e.info)),t&&ci(e.info,t,r),e.info.started=!0);},o=r=>{e.info.started&&i(r),Ce(e.info);};_n(this.info,i,o),this.info.x=s.clientX,this.info.y=s.clientY;},touchstart(s){const t=s.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchmove(s){const t=ie(s),e=s.changedTouches[0],i=e.clientX,o=e.clientY;Go(this.info,i,o)&&(this.info.state==="start"&&Pt("tap"),this.info.addMove({x:i,y:o}),ci(this.info,t,e),this.info.state="track",this.info.started=!0);},touchend(s){const t=ie(s),e=s.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:e.clientX,y:e.clientY}),ci(this.info,t,e));}});function Go(s,t,e){if(s.prevent)return !1;if(s.started)return !0;const i=Math.abs(s.x-t),o=Math.abs(s.y-e);return i>=Yo||o>=Yo}function ci(s,t,e){if(!t)return;const i=s.moves[s.moves.length-2],o=s.moves[s.moves.length-1],r=o.x-s.x,n=o.y-s.y;let a,l=0;i&&(a=o.x-i.x,l=o.y-i.y),Ss(t,"track",{state:s.state,x:e.clientX,y:e.clientY,dx:r,dy:n,ddx:a,ddy:l,sourceEvent:e,hover(){return nh(e.clientX,e.clientY)}});}Es({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1;},mousedown(s){ce(s)&&(this.info.x=s.clientX,this.info.y=s.clientY);},click(s){ce(s)&&Ko(this.info,s);},touchstart(s){const t=s.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchend(s){Ko(this.info,s.changedTouches[0],s);}});function Ko(s,t,e){const i=Math.abs(t.clientX-s.x),o=Math.abs(t.clientY-s.y),r=ie(e||t);!r||sh[r.localName]&&r.hasAttribute("disabled")||(isNaN(i)||isNaN(o)||i<=jo&&o<=jo||oh(t))&&(s.prevent||Ss(r,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:e}));}/**
|
|
1757
1757
|
* @license
|
|
1758
1758
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1759
1759
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1760
|
-
*/const
|
|
1760
|
+
*/const Te=S(s=>class extends s{static get properties(){return {disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(e){this._setAriaDisabled(e);}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled");}click(){this.disabled||super.click();}});/**
|
|
1761
1761
|
* @license
|
|
1762
1762
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1763
1763
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1764
|
-
*/const
|
|
1764
|
+
*/const me=S(s=>class extends s{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e);}),this.addEventListener("keyup",e=>{this._onKeyUp(e);});}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e);break}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}});/**
|
|
1765
1765
|
* @license
|
|
1766
1766
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1767
1767
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1768
|
-
*/const
|
|
1768
|
+
*/const ks=s=>class extends Te(me(s)){get _activeKeys(){return [" "]}ready(){super.ready(),R(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0);}),R(this,"up",()=>{this._setActive(!1);});}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1);}_shouldSetActive(e){return !this.disabled}_onKeyDown(e){super._onKeyDown(e),this._shouldSetActive(e)&&this._activeKeys.includes(e.key)&&(this._setActive(!0),document.addEventListener("keyup",i=>{this._activeKeys.includes(i.key)&&this._setActive(!1);},{once:!0}));}_setActive(e){this.toggleAttribute("active",e);}};/**
|
|
1769
1769
|
* @license
|
|
1770
1770
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1771
1771
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1772
|
-
*/let
|
|
1772
|
+
*/let Ts=!1;window.addEventListener("keydown",()=>{Ts=!0;},{capture:!0});window.addEventListener("mousedown",()=>{Ts=!1;},{capture:!0});function qi(){let s=document.activeElement||document.body;for(;s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;return s}function $t(){return Ts}function vn(s){const t=s.style;if(t.visibility==="hidden"||t.display==="none")return !0;const e=window.getComputedStyle(s);return e.visibility==="hidden"||e.display==="none"}function ch(s,t){const e=Math.max(s.tabIndex,0),i=Math.max(t.tabIndex,0);return e===0||i===0?i>e:e>i}function uh(s,t){const e=[];for(;s.length>0&&t.length>0;)ch(s[0],t[0])?e.push(t.shift()):e.push(s.shift());return e.concat(s,t)}function Ui(s){const t=s.length;if(t<2)return s;const e=Math.ceil(t/2),i=Ui(s.slice(0,e)),o=Ui(s.slice(e));return uh(i,o)}function Wi(s){return s.offsetParent===null&&s.clientWidth===0&&s.clientHeight===0?!0:vn(s)}function Ps(s){return s.matches('[tabindex="-1"]')?!1:s.matches("input, select, textarea, button, object")?s.matches(":not([disabled])"):s.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function Os(s){return s.getRootNode().activeElement===s}function ph(s){if(!Ps(s))return -1;const t=s.getAttribute("tabindex")||0;return Number(t)}function gn(s,t){if(s.nodeType!==Node.ELEMENT_NODE||vn(s))return !1;const e=s,i=ph(e);let o=i>0;i>=0&&t.push(e);let r=[];return e.localName==="slot"?r=e.assignedNodes({flatten:!0}):r=(e.shadowRoot||e).children,[...r].forEach(n=>{o=gn(n,t)||o;}),o}function _h(s){const t=[];return gn(s,t)?Ui(t):t}/**
|
|
1773
1773
|
* @license
|
|
1774
1774
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1775
1775
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1776
|
-
*/const
|
|
1776
|
+
*/const fe=S(s=>class extends s{get _keyboardActive(){return $t()}ready(){this.addEventListener("focusin",e=>{this._shouldSetFocus(e)&&this._setFocused(!0);}),this.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1);}),super.ready();}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1);}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive);}_shouldSetFocus(e){return !0}_shouldRemoveFocus(e){return !0}});/**
|
|
1777
1777
|
* @license
|
|
1778
1778
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1779
1779
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1780
|
-
*/const bn=s=>class extends
|
|
1780
|
+
*/const bn=s=>class extends Te(s){static get properties(){return {tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(e,i){super._disabledChanged(e,i),e?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):i&&(this.tabindex=this._lastTabIndex);}_tabindexChanged(e){this.disabled&&e!==-1&&(this._lastTabIndex=e,this.tabindex=-1);}};/**
|
|
1781
1781
|
* @license
|
|
1782
1782
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1783
1783
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1784
|
-
*/const
|
|
1784
|
+
*/const Ht=S(s=>class extends fe(bn(s)){static get properties(){return {autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this);}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame(()=>{this.focus(),this.setAttribute("focus-ring","");});}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus();}blur(){this.focusElement&&this.focusElement.blur();}click(){this.focusElement&&!this.disabled&&this.focusElement.click();}_focusElementChanged(e,i){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):i&&this._removeFocusListeners(i);}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus);}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus);}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"));}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"));}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,i){super._disabledChanged(e,i),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur();}_tabindexChanged(e){this.__forwardTabIndex(e);}__forwardTabIndex(e){e!==void 0&&this.focusElement&&(this.focusElement.tabIndex=e,e!==-1&&(this.tabindex=void 0)),this.disabled&&e&&(e!==-1&&(this._lastTabIndex=e),this.tabindex=void 0);}});/**
|
|
1785
1785
|
* @license
|
|
1786
1786
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1787
1787
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1788
|
-
*/const
|
|
1788
|
+
*/const Ds=S(s=>class extends s{static get properties(){return {stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return []}static get delegateProps(){return []}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver();}_stateTargetChanged(e){e&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated());}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`);}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`);}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach(e=>{this._delegateAttribute(e,this[e]);});}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(e=>{this._delegateProperty(e,this[e]);});}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach((i,o)=>{this._delegateAttribute(i,e[o]);});}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((i,o)=>{this._delegateProperty(i,e[o]);});}_delegateAttribute(e,i){this.stateTarget&&(e==="invalid"&&this._delegateAttribute("aria-invalid",i?"true":!1),typeof i=="boolean"?this.stateTarget.toggleAttribute(e,i):i?this.stateTarget.setAttribute(e,i):this.stateTarget.removeAttribute(e));}_delegateProperty(e,i){this.stateTarget&&(this.stateTarget[e]=i);}});/**
|
|
1789
1789
|
* @license
|
|
1790
1790
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1791
1791
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1792
|
-
*/const
|
|
1792
|
+
*/const at=S(s=>class extends s{static get properties(){return {inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this);}get _hasValue(){return this.value!=null&&this.value!==""}get _inputElementValueProperty(){return "value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e);}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue="";}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange);}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange);}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=e!=null?e:"");}_inputElementChanged(e,i){e?this._addInputListeners(e):i&&this._removeInputListeners(i);}_hasInputValueChanged(e,i){(e||i)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"));}__onInput(e){this._setHasInputValue(e),this._onInput(e);}_onInput(e){const i=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=i.value,this.__userInput=!1;}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e);}_valueChanged(e,i){this._toggleHasValue(this._hasValue),!(e===""&&i===void 0)&&(this.__userInput||this._forwardInputValue(e));}_setHasInputValue(e){const i=e.composedPath()[0];this._hasInputValue=i.value.length>0;}});/**
|
|
1793
1793
|
* @license
|
|
1794
1794
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1795
1795
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1796
|
-
*/const
|
|
1796
|
+
*/const mh=S(s=>class extends Ds(Te(at(s))){static get properties(){return {checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return [...super.delegateProps,"checked"]}_onChange(e){const i=e.target;this._toggleChecked(i.checked);}_toggleChecked(e){this.checked=e;}});/**
|
|
1797
1797
|
* @license
|
|
1798
1798
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
1799
1799
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1800
|
-
*/const
|
|
1800
|
+
*/const ui=new Map;function zs(s){return ui.has(s)||ui.set(s,new WeakMap),ui.get(s)}function yn(s,t){s&&s.removeAttribute(t);}function xn(s,t){if(!s||!t)return;const e=zs(t);if(e.has(s))return;const i=Cs(s.getAttribute(t));e.set(s,new Set(i));}function fh(s,t){if(!s||!t)return;const e=zs(t),i=e.get(s);!i||i.size===0?s.removeAttribute(t):un(s,t,Bt(i)),e.delete(s);}function xt(s,t,e={newId:null,oldId:null,fromUser:!1}){if(!s||!t)return;const{newId:i,oldId:o,fromUser:r}=e,n=zs(t),a=n.get(s);if(!r&&a){o&&a.delete(o),i&&a.add(i);return}r&&(a?i||n.delete(s):xn(s,t),yn(s,t)),jd(s,t,o);const l=i||Bt(a);l&&un(s,t,l);}function vh(s,t){xn(s,t),yn(s,t);}/**
|
|
1801
1801
|
* @license
|
|
1802
1802
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1803
1803
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1804
|
-
*/let
|
|
1804
|
+
*/let gh=class{constructor(t){this.host=t,this.__required=!1;}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),this.__labelIdFromUser!=null&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label);}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t;}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t;}setLabelId(t,e=!1){const i=e?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(t,i,e),e?this.__labelIdFromUser=t:this.__labelId=t;}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t;}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t;}__setAriaLabelToAttribute(t){this.__target&&(t?(vh(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(fh(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")));}__setLabelIdToAriaAttribute(t,e,i){xt(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i});}__setErrorIdToAriaAttribute(t,e){xt(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setHelperIdToAriaAttribute(t,e){xt(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")));}};/**
|
|
1805
1805
|
* @license
|
|
1806
1806
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1807
1807
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1808
|
-
*/const
|
|
1808
|
+
*/const oe=S(s=>typeof s.prototype.addController=="function"?s:class extends s{constructor(){super(),this.__controllers=new Set;}connectedCallback(){super.connectedCallback(),this.__controllers.forEach(e=>{e.hostConnected&&e.hostConnected();});}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach(e=>{e.hostDisconnected&&e.hostDisconnected();});}addController(e){this.__controllers.add(e),this.$!==void 0&&this.isConnected&&e.hostConnected&&e.hostConnected();}removeController(e){this.__controllers.delete(e);}});/**
|
|
1809
1809
|
* @license
|
|
1810
1810
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1811
1811
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1812
|
-
*/const
|
|
1812
|
+
*/const V=document.createElement("div");V.style.position="fixed";V.style.clip="rect(0px, 0px, 0px, 0px)";V.setAttribute("aria-live","polite");document.body.appendChild(V);let ht;function bh(s,t={}){const e=t.mode||"polite",i=t.timeout===void 0?150:t.timeout;e==="alert"?(V.removeAttribute("aria-live"),V.removeAttribute("role"),ht=z.debounce(ht,tt,()=>{V.setAttribute("role","alert");})):(ht&&ht.cancel(),V.removeAttribute("role"),V.setAttribute("aria-live",e)),V.textContent="",setTimeout(()=>{V.textContent=s;},i);}/**
|
|
1813
1813
|
* @license
|
|
1814
1814
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1815
1815
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1816
|
-
*/let
|
|
1816
|
+
*/let Ms=class extends G{constructor(t,e,i,o={}){super(t,e,i,ze(H({},o),{useUniqueId:!0}));}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t);}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node));}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t);}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(e=>{e.forEach(i=>{const o=i.target,r=o===this.node;i.type==="attributes"?r&&this.__updateNodeId(o):(r||o.parentElement===this.node)&&this.__notifyChange(this.node);});}),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0});}__hasContent(t){return t?t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&t.textContent.trim()!=="":!1}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}));}__updateNodeId(t){const e=!this.nodes||t===this.nodes[0];t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||e)&&!t.id&&(t.id=this.defaultId);}};/**
|
|
1817
1817
|
* @license
|
|
1818
1818
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1819
1819
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1820
|
-
*/let
|
|
1820
|
+
*/let yh=class extends Ms{constructor(t){super(t,"error-message","div");}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node);}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node);}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t);}initNode(t){this.updateDefaultNode(t);}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t);}restoreDefaultNode(){this.attachDefaultNode();}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,o=!!(i&&e&&e.trim()!=="");t&&(t.textContent=o?e:"",t.hidden=!o,o&&bh(e,{mode:"assertive"})),super.updateDefaultNode(t);}};/**
|
|
1821
1821
|
* @license
|
|
1822
1822
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1823
1823
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1824
|
-
*/let
|
|
1824
|
+
*/let xh=class extends Ms{constructor(t){super(t,"helper",null);}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{helperText:t}=this;if(t&&t.trim()!==""){this.tagName="div";const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}};/**
|
|
1825
1825
|
* @license
|
|
1826
1826
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1827
1827
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1828
|
-
*/let Cn=class extends
|
|
1828
|
+
*/let Cn=class extends Ms{constructor(t){super(t,"label","label");}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{label:t}=this;if(t&&t.trim()!==""){const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}};/**
|
|
1829
1829
|
* @license
|
|
1830
1830
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1831
1831
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1832
|
-
*/const
|
|
1832
|
+
*/const Ch=S(s=>class extends oe(s){static get properties(){return {label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Cn(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent);});}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController);}_labelChanged(e){this._labelController.setLabel(e);}});/**
|
|
1833
1833
|
* @license
|
|
1834
1834
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1835
1835
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1836
|
-
*/const
|
|
1836
|
+
*/const Ns=S(s=>class extends s{static get properties(){return {invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return !this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e);}_shouldSetInvalid(e){return !0}});/**
|
|
1837
1837
|
* @license
|
|
1838
1838
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1839
1839
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1840
|
-
*/const
|
|
1840
|
+
*/const qt=s=>class extends Ns(Ch(oe(s))){static get properties(){return {ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return ["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new gh(this),this._helperController=new xh(this),this._errorController=new yh(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent);}),this._labelController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.__labelChanged(i,o);}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.toggleAttribute("has-helper",i),this.__helperChanged(i,o);});}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController);}__helperChanged(e,i){e?this._fieldAriaController.setHelperId(i.id):this._fieldAriaController.setHelperId(null);}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e);}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0);}__labelChanged(e,i){e?this._fieldAriaController.setLabelId(i.id):this._fieldAriaController.setLabelId(null);}_errorMessageChanged(e){this._errorController.setErrorMessage(e);}_helperTextChanged(e){this._helperController.setHelperText(e);}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e);}_requiredChanged(e){this._fieldAriaController.setRequired(e);}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){const i=this._errorNode;this._fieldAriaController.setErrorId(i&&i.id);}else this._fieldAriaController.setErrorId(null);});}};/**
|
|
1841
1841
|
* @license
|
|
1842
1842
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1843
1843
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1844
|
-
*/let Ut=class extends
|
|
1844
|
+
*/let Ut=class extends G{constructor(t,e,i={}){const{uniqueIdPrefix:o}=i;super(t,"input","input",{initializer:(r,n)=>{n.value&&(r.value=n.value),n.type&&r.setAttribute("type",n.type),r.id=this.defaultId,typeof e=="function"&&e(r);},useUniqueId:!0,uniqueIdPrefix:o});}};/**
|
|
1845
1845
|
* @license
|
|
1846
1846
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1847
1847
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1848
|
-
*/let
|
|
1848
|
+
*/let Wt=class{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",i=>{this.__initLabel(i.detail.node);}),this.__initLabel(e.node);}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id));}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t);};this.input.addEventListener("click",t);}};/**
|
|
1849
1849
|
* @license
|
|
1850
1850
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1851
1851
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1852
|
-
*/const
|
|
1852
|
+
*/const wh=s=>class extends qt(mh(Ht(ks(s)))){static get properties(){return {indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get observers(){return ["__readonlyChanged(readonly, inputElement)"]}static get delegateProps(){return [...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return [...super.delegateAttrs,"name","invalid","required"]}constructor(){super(),this._setType("checkbox"),this._boundOnInputClick=this._onInputClick.bind(this),this.value="on";}ready(){super.ready(),this.addController(new Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new Wt(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)");}_shouldSetActive(e){return this.readonly||e.target.localName==="a"||e.target===this._helperNode||e.target===this._errorNode?!1:super._shouldSetActive(e)}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("click",this._boundOnInputClick);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("click",this._boundOnInputClick);}_onInputClick(e){this.readonly&&e.preventDefault();}__readonlyChanged(e,i){i&&(e?i.setAttribute("aria-readonly","true"):i.removeAttribute("aria-readonly"));}_toggleChecked(e){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(e);}checkValidity(){return !this.required||!!this.checked}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}_checkedChanged(e){(e||this.__oldChecked)&&this.validate(),this.__oldChecked=e;}_requiredChanged(e){super._requiredChanged(e),e===!1&&this.validate();}_onRequiredIndicatorClick(){this._labelNode.click();}};/**
|
|
1853
1853
|
* @license
|
|
1854
1854
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1855
1855
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1856
|
-
*/const
|
|
1856
|
+
*/const Ih=p`
|
|
1857
1857
|
:host {
|
|
1858
1858
|
display: inline-block;
|
|
1859
1859
|
}
|
|
@@ -1945,7 +1945,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1945
1945
|
* @license
|
|
1946
1946
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1947
1947
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1948
|
-
*/f("vaadin-checkbox",
|
|
1948
|
+
*/f("vaadin-checkbox",Ih,{moduleId:"vaadin-checkbox-styles"});class Ah extends wh(X(E(y))){static get is(){return "vaadin-checkbox"}static get template(){return b`
|
|
1949
1949
|
<div class="vaadin-checkbox-container">
|
|
1950
1950
|
<div part="checkbox" aria-hidden="true"></div>
|
|
1951
1951
|
<slot name="input"></slot>
|
|
@@ -1961,7 +1961,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1961
1961
|
</div>
|
|
1962
1962
|
</div>
|
|
1963
1963
|
<slot name="tooltip"></slot>
|
|
1964
|
-
`}ready(){super.ready(),this._tooltipController=new
|
|
1964
|
+
`}ready(){super.ready(),this._tooltipController=new _e(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}x(Ah);/**
|
|
1965
1965
|
* @license
|
|
1966
1966
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1967
1967
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -2025,7 +2025,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2025
2025
|
* @license
|
|
2026
2026
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2027
2027
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2028
|
-
*/const
|
|
2028
|
+
*/const Ls=p`
|
|
2029
2029
|
[part='label'] {
|
|
2030
2030
|
align-self: flex-start;
|
|
2031
2031
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
@@ -2137,7 +2137,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2137
2137
|
margin-left: 0;
|
|
2138
2138
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
2139
2139
|
}
|
|
2140
|
-
`;f("",
|
|
2140
|
+
`;f("",Ls,{moduleId:"lumo-required-field"});const Eh=p`
|
|
2141
2141
|
:host {
|
|
2142
2142
|
color: var(--lumo-body-text-color);
|
|
2143
2143
|
font-size: var(--lumo-font-size-m);
|
|
@@ -2180,15 +2180,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2180
2180
|
color: var(--lumo-secondary-text-color);
|
|
2181
2181
|
}
|
|
2182
2182
|
}
|
|
2183
|
-
`;f("vaadin-checkbox-group",[
|
|
2183
|
+
`;f("vaadin-checkbox-group",[Ls,wn,Eh],{moduleId:"lumo-checkbox-group"});/**
|
|
2184
2184
|
* @license
|
|
2185
2185
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
2186
2186
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2187
|
-
*/const
|
|
2187
|
+
*/const Sh=s=>class extends qt(fe(Te(s))){static get properties(){return {value:{type:Array,value:()=>[],notify:!0,sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__readonlyChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new _e(this),this._tooltipController.addEventListener("tooltip-changed",e=>{const i=e.detail.node;if(i&&i.isConnected){const o=this.__checkboxes.map(r=>r.inputElement);this._tooltipController.setAriaTarget(o);}else this._tooltipController.setAriaTarget([]);});}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new ws(e,({addedNodes:i,removedNodes:o})=>{const r=this.__filterCheckboxes(i),n=this.__filterCheckboxes(o);r.forEach(this.__registerCheckbox),n.forEach(this.__unregisterCheckbox);const a=this.__checkboxes.map(l=>l.inputElement);this._tooltipController.setAriaTarget(a),this.__warnOfCheckboxesWithoutValue(r);}),this.addController(this._tooltipController);}checkValidity(){return !this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(e){return e.filter(i=>i.nodeType===Node.ELEMENT_NODE&&i.localName==="vaadin-checkbox")}__warnOfCheckboxesWithoutValue(e){e.some(o=>{const{value:r}=o;return !o.hasAttribute("value")&&(!r||r==="on")})&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.");}__registerCheckbox(e){e.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(e.disabled=!0),this.readonly&&(e.readonly=!0),e.checked?this.__addCheckboxToValue(e.value):this.value&&this.value.includes(e.value)&&(e.checked=!0);}__unregisterCheckbox(e){e.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),e.checked&&this.__removeCheckboxFromValue(e.value);}_disabledChanged(e,i){super._disabledChanged(e,i),!(!e&&i===void 0)&&i!==e&&this.__checkboxes.forEach(o=>{o.disabled=e;});}__addCheckboxToValue(e){this.value?this.value.includes(e)||(this.value=[...this.value,e]):this.value=[e];}__removeCheckboxFromValue(e){this.value&&this.value.includes(e)&&(this.value=this.value.filter(i=>i!==e));}__onCheckboxCheckedChanged(e){const i=e.target;i.checked?this.__addCheckboxToValue(i.value):this.__removeCheckboxFromValue(i.value);}__valueChanged(e,i){e&&e.length===0&&i===void 0||(this.toggleAttribute("has-value",e&&e.length>0),this.__checkboxes.forEach(o=>{o.checked=e&&e.includes(o.value);}),i!==void 0&&this.validate());}__readonlyChanged(e,i){(e||i)&&this.__checkboxes.forEach(o=>{o.readonly=e;});}_shouldRemoveFocus(e){return !this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}};/**
|
|
2188
2188
|
* @license
|
|
2189
2189
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
2190
2190
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2191
|
-
*/const
|
|
2191
|
+
*/const kh=p`
|
|
2192
2192
|
:host {
|
|
2193
2193
|
display: inline-flex;
|
|
2194
2194
|
}
|
|
@@ -2221,7 +2221,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2221
2221
|
* @license
|
|
2222
2222
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
2223
2223
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2224
|
-
*/f("vaadin-checkbox-group",
|
|
2224
|
+
*/f("vaadin-checkbox-group",kh,{moduleId:"vaadin-checkbox-group-styles"});class Th extends Sh(X(E(y))){static get is(){return "vaadin-checkbox-group"}static get template(){return b`
|
|
2225
2225
|
<div class="vaadin-group-field-container">
|
|
2226
2226
|
<div part="label">
|
|
2227
2227
|
<slot name="label"></slot>
|
|
@@ -2242,11 +2242,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2242
2242
|
</div>
|
|
2243
2243
|
|
|
2244
2244
|
<slot name="tooltip"></slot>
|
|
2245
|
-
`}}
|
|
2245
|
+
`}}x(Th);/**
|
|
2246
2246
|
* @license
|
|
2247
2247
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2248
2248
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2249
|
-
*/const
|
|
2249
|
+
*/const Vs=p`
|
|
2250
2250
|
:host {
|
|
2251
2251
|
top: var(--lumo-space-m);
|
|
2252
2252
|
right: var(--lumo-space-m);
|
|
@@ -2311,11 +2311,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2311
2311
|
opacity: 1;
|
|
2312
2312
|
}
|
|
2313
2313
|
}
|
|
2314
|
-
`;f("",
|
|
2314
|
+
`;f("",Vs,{moduleId:"lumo-overlay"});/**
|
|
2315
2315
|
* @license
|
|
2316
2316
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2317
2317
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2318
|
-
*/const
|
|
2318
|
+
*/const Fs=p`
|
|
2319
2319
|
:host([opening]),
|
|
2320
2320
|
:host([closing]) {
|
|
2321
2321
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -2345,7 +2345,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2345
2345
|
opacity: 0;
|
|
2346
2346
|
}
|
|
2347
2347
|
}
|
|
2348
|
-
`;f("",
|
|
2348
|
+
`;f("",Fs,{moduleId:"lumo-menu-overlay-core"});const Ph=p`
|
|
2349
2349
|
/* Small viewport (bottom sheet) styles */
|
|
2350
2350
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
2351
2351
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -2407,7 +2407,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2407
2407
|
transform: translateY(150%);
|
|
2408
2408
|
}
|
|
2409
2409
|
}
|
|
2410
|
-
`,
|
|
2410
|
+
`,Bs=[Vs,Fs,Ph];f("",Bs,{moduleId:"lumo-menu-overlay"});const Oh=p`
|
|
2411
2411
|
[part='overlay'] {
|
|
2412
2412
|
/*
|
|
2413
2413
|
Width:
|
|
@@ -2452,7 +2452,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2452
2452
|
max-height: 70vh;
|
|
2453
2453
|
}
|
|
2454
2454
|
}
|
|
2455
|
-
`;f("vaadin-date-picker-overlay",[
|
|
2455
|
+
`;f("vaadin-date-picker-overlay",[Bs,Oh],{moduleId:"lumo-date-picker-overlay"});const In=p`
|
|
2456
2456
|
:host {
|
|
2457
2457
|
/* Sizing */
|
|
2458
2458
|
--lumo-button-size: var(--lumo-size-m);
|
|
@@ -3262,7 +3262,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3262
3262
|
* @license
|
|
3263
3263
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3264
3264
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3265
|
-
*/const
|
|
3265
|
+
*/const Dh=p`
|
|
3266
3266
|
:host {
|
|
3267
3267
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
3268
3268
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -3393,7 +3393,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3393
3393
|
[part='clear-button']::before {
|
|
3394
3394
|
content: var(--lumo-icons-cross);
|
|
3395
3395
|
}
|
|
3396
|
-
`,
|
|
3396
|
+
`,Pe=[Ls,An,wn,Dh];f("",Pe,{moduleId:"lumo-input-field-shared-styles"});const zh=p`
|
|
3397
3397
|
[part='toggle-button']::before {
|
|
3398
3398
|
content: var(--lumo-icons-calendar);
|
|
3399
3399
|
}
|
|
@@ -3415,15 +3415,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3415
3415
|
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
3416
3416
|
--_lumo-text-field-overflow-mask-image: none;
|
|
3417
3417
|
}
|
|
3418
|
-
`;f("vaadin-date-picker",[
|
|
3418
|
+
`;f("vaadin-date-picker",[Pe,zh],{moduleId:"lumo-date-picker"});/**
|
|
3419
3419
|
* @license
|
|
3420
3420
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3421
3421
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3422
|
-
*/const
|
|
3422
|
+
*/const Mh=s=>class extends s{static get properties(){return {disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",e=>{e.target===this&&e.preventDefault();}),this.addEventListener("click",e=>{e.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach(i=>i.focus&&i.focus());});}};/**
|
|
3423
3423
|
* @license
|
|
3424
3424
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3425
3425
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3426
|
-
*/const
|
|
3426
|
+
*/const Nh=p`
|
|
3427
3427
|
:host {
|
|
3428
3428
|
display: flex;
|
|
3429
3429
|
align-items: center;
|
|
@@ -3492,15 +3492,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3492
3492
|
* @license
|
|
3493
3493
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3494
3494
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3495
|
-
*/f("vaadin-input-container",
|
|
3495
|
+
*/f("vaadin-input-container",Nh,{moduleId:"vaadin-input-container-styles"});let Lh=class extends Mh(E($(y))){static get is(){return "vaadin-input-container"}static get template(){return b`
|
|
3496
3496
|
<slot name="prefix"></slot>
|
|
3497
3497
|
<slot></slot>
|
|
3498
3498
|
<slot name="suffix"></slot>
|
|
3499
|
-
`}};
|
|
3499
|
+
`}};x(Lh);/**
|
|
3500
3500
|
* @license
|
|
3501
3501
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3502
3502
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3503
|
-
*/const
|
|
3503
|
+
*/const Rs=p`
|
|
3504
3504
|
:host {
|
|
3505
3505
|
z-index: 200;
|
|
3506
3506
|
position: fixed;
|
|
@@ -3567,55 +3567,55 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3567
3567
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3568
3568
|
Code distributed by Google as part of the polymer project is also
|
|
3569
3569
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3570
|
-
*/let
|
|
3570
|
+
*/let ji=!1,Vh=[],En=[];function Fh(){ji=!0,requestAnimationFrame(function(){ji=!1,Bh(Vh),setTimeout(function(){Rh(En);});});}function Bh(s){for(;s.length;)Sn(s.shift());}function Rh(s){for(let t=0,e=s.length;t<e;t++)Sn(s.shift());}function Sn(s){const t=s[0],e=s[1],i=s[2];try{e.apply(t,i);}catch(o){setTimeout(()=>{throw o});}}function kn(s,t,e){ji||Fh(),En.push([s,t,e]);}/**
|
|
3571
3571
|
* @license
|
|
3572
3572
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3573
3573
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3574
|
-
*/const
|
|
3574
|
+
*/const jt=s=>s.test(navigator.userAgent),Yi=s=>s.test(navigator.platform),$h=s=>s.test(navigator.vendor);jt(/Android/u);jt(/Chrome/u)&&$h(/Google Inc/u);jt(/Firefox/u);const Hh=Yi(/^iPad/u)||Yi(/^Mac/u)&&navigator.maxTouchPoints>1,qh=Yi(/^iPhone/u),$s=qh||Hh,Uh=jt(/^((?!chrome|android).)*safari/iu),Gi=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(s){return !1}})();/**
|
|
3575
3575
|
* @license
|
|
3576
3576
|
* Copyright (c) 2017 Anton Korzunov
|
|
3577
3577
|
* SPDX-License-Identifier: MIT
|
|
3578
|
-
*/let
|
|
3578
|
+
*/let ve=new WeakMap,ct=new WeakMap,ut={},pi=0;const Xo=s=>s&&s.nodeType===Node.ELEMENT_NODE,_i=(...s)=>{console.error(`Error: ${s.join(" ")}. Skip setting aria-hidden.`);},Wh=(s,t)=>Xo(s)?t.map(e=>{if(!Xo(e))return _i(e,"is not a valid element"),null;let i=e;for(;i&&i!==s;){if(s.contains(i))return e;i=i.getRootNode().host;}return _i(e,"is not contained inside",s),null}).filter(e=>!!e):(_i(s,"is not a valid element"),[]),jh=(s,t,e,i)=>{const o=Wh(t,Array.isArray(s)?s:[s]);ut[e]||(ut[e]=new WeakMap);const r=ut[e],n=[],a=new Set,l=new Set(o),d=c=>{if(!c||a.has(c))return;a.add(c);const u=c.assignedSlot;u&&d(u),d(c.parentNode||c.host);};o.forEach(d);const h=c=>{if(!c||l.has(c))return;const u=c.shadowRoot;(u?[...c.children,...u.children]:[...c.children]).forEach(m=>{if(!["template","script","style"].includes(m.localName))if(a.has(m))h(m);else {const A=m.getAttribute(i),k=A!==null&&A!=="false",w=(ve.get(m)||0)+1,C=(r.get(m)||0)+1;ve.set(m,w),r.set(m,C),n.push(m),w===1&&k&&ct.set(m,!0),C===1&&m.setAttribute(e,"true"),k||m.setAttribute(i,"true");}});};return h(t),a.clear(),pi+=1,()=>{n.forEach(c=>{const u=ve.get(c)-1,_=r.get(c)-1;ve.set(c,u),r.set(c,_),u||(ct.has(c)?ct.delete(c):c.removeAttribute(i)),_||c.removeAttribute(e);}),pi-=1,pi||(ve=new WeakMap,ve=new WeakMap,ct=new WeakMap,ut={});}},Tn=(s,t=document.body,e="data-aria-hidden")=>{const i=Array.from(Array.isArray(s)?s:[s]);return t&&i.push(...Array.from(t.querySelectorAll("[aria-live]"))),jh(i,t,e,"aria-hidden")};/**
|
|
3579
3579
|
* @license
|
|
3580
3580
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3581
3581
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3582
|
-
*/let
|
|
3582
|
+
*/let Yh=class{constructor(t,e){this.host=t,this.callback=typeof e=="function"?e:()=>t;}showModal(){const t=this.callback();this.__showOthers=Tn(t);}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null);}};/**
|
|
3583
3583
|
* @license
|
|
3584
3584
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3585
3585
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3586
|
-
*/let
|
|
3586
|
+
*/let Gh=class{saveFocus(t){this.focusNode=t||qi();}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=t?t.preventScroll:!1;qi()===document.body?setTimeout(()=>e.focus({preventScroll:i})):e.focus({preventScroll:i}),this.focusNode=null;}};/**
|
|
3587
3587
|
* @license
|
|
3588
3588
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3589
3589
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3590
|
-
*/const
|
|
3590
|
+
*/const mi=[];let Kh=class{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this);}get __focusableElements(){return _h(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Os).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown);}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown);}trapFocus(t){if(this.__trapNode=t,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");mi.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus();}releaseFocus(){this.__trapNode=null,mi.pop();}__onKeyDown(t){if(this.__trapNode&&this===Array.from(mi).pop()&&t.key==="Tab"){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e);}}__focusNextElement(t=!1){const e=this.__focusableElements,i=t?-1:1,o=this.__focusedElementIndex,r=(e.length+o+i)%e.length,n=e[r];n.focus(),n.localName==="input"&&n.select();}};/**
|
|
3591
3591
|
* @license
|
|
3592
3592
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3593
3593
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3594
|
-
*/const
|
|
3594
|
+
*/const Xh=s=>class extends oe(s){static get properties(){return {focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Yh(this),this.__focusTrapController=new Kh(this),this.__focusRestorationController=new Gh;}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController);}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const e=!$t();this.__focusRestorationController.restoreFocus({preventScroll:e});}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode);}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay));}_shouldRestoreFocus(){const e=qi();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return !0;let i=e;const o=e.ownerDocument;for(;i&&i!==o&&i!==this;)i=i.parentNode||i.host;return i===this}};/**
|
|
3595
3595
|
* @license
|
|
3596
3596
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3597
3597
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3598
|
-
*/const
|
|
3598
|
+
*/const Pn=()=>Array.from(document.body.children).filter(s=>s instanceof HTMLElement&&s._hasOverlayStackMixin&&!s.hasAttribute("closing")).sort((s,t)=>s.__zIndex-t.__zIndex||0),Ki=()=>Pn().filter(s=>s.$.overlay),Jh=s=>s===Ki().pop(),On=s=>class extends s{constructor(){super(),this._hasOverlayStackMixin=!0;}get _last(){return Jh(this)}bringToFront(){let e="";const i=Pn().filter(o=>o!==this).pop();i&&(e=i.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex);}_enterModalState(){document.body.style.pointerEvents!=="none"&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Ki().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none");});}_exitModalState(){this._previousDocumentPointerEvents!==void 0&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=Ki();let i;for(;(i=e.pop())&&!(i!==this&&(i.$.overlay.style.removeProperty("pointer-events"),!i.modeless)););}};/**
|
|
3599
3599
|
* @license
|
|
3600
3600
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3601
3601
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3602
|
-
*/const Hs=s=>class extends
|
|
3602
|
+
*/const Hs=s=>class extends Xh(On(s)){static get properties(){return {opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return ["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),$s&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}ready(){super.ready(),this.addEventListener("click",()=>{}),this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&this.$.overlay.getAttribute("tabindex")==="0"&&this.$.overlay.focus();});}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener));}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener);}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model);}close(e){const i=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),i.defaultPrevented||(this.opened=!1);}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,o=window.innerWidth>e,r=document.documentElement.clientHeight;o&&r>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${r-e}px`):this.style.setProperty("--vaadin-overlay-viewport-bottom","0");}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0);}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0);}_rendererOrDataChanged(e,i,o,r){const n=this._oldOwner!==i||this._oldModel!==o;this._oldModel=o,this._oldOwner=i;const a=this._oldRenderer!==e,l=this._oldRenderer!==void 0;this._oldRenderer=e;const d=this._oldOpened!==r;this._oldOpened=r,a&&l&&(this.innerHTML="",delete this._$litPart$),r&&e&&(a||d||n)&&this.requestContentUpdate();}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState());}_openedChanged(e,i){e?(this._saveFocus(),this._animatedOpening(),kn(this,()=>{this._trapFocus();const o=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(o);}),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):i&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners());}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing");}_shouldAnimate(){const e=getComputedStyle(this),i=e.getPropertyValue("animation-name");return !(e.getPropertyValue("display")==="none")&&i&&i!=="none"}_enqueueAnimation(e,i){const o=`__${e}Handler`,r=n=>{n&&n.target!==this||(i(),this.removeEventListener("animationend",r),delete this[o]);};this[o]=r,this.addEventListener("animationend",r);}_flushAnimation(e){const i=`__${e}Handler`;typeof this[i]=="function"&&this[i]();}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",()=>{this._finishOpening();}):this._finishOpening();}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront();}_finishOpening(){this.removeAttribute("opening");}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"));}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",()=>{this._finishClosing();}):this._finishClosing());}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder);}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0;}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0;}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;const i=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}_keydownListener(e){if(this._last&&!(this.modeless&&!e.composedPath().includes(this.$.overlay))&&e.key==="Escape"){const i=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}}};/**
|
|
3603
3603
|
* @license
|
|
3604
3604
|
* Copyright (c) 2024 Vaadin Ltd.
|
|
3605
3605
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3606
|
-
*/function
|
|
3606
|
+
*/function Qh(s,t){let e=null;const i=document.documentElement;function o(){e&&e.disconnect(),e=null;}function r(n=!1,a=1){o();const{left:l,top:d,width:h,height:c}=s.getBoundingClientRect();if(n||t(),!h||!c)return;const u=Math.floor(d),_=Math.floor(i.clientWidth-(l+h)),m=Math.floor(i.clientHeight-(d+c)),A=Math.floor(l),w={rootMargin:`${-u}px ${-_}px ${-m}px ${-A}px`,threshold:Math.max(0,Math.min(1,a))||1};let C=!0;function B(ne){let M=ne[0].intersectionRatio;if(M!==a){if(!C)return r();M===0&&(M=1e-7),r(!1,M);}C=!1;}e=new IntersectionObserver(B,w),e.observe(s);}return r(!0),o}/**
|
|
3607
3607
|
* @license
|
|
3608
3608
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3609
3609
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3610
|
-
*/const
|
|
3610
|
+
*/const fi={start:"top",end:"bottom"},vi={start:"left",end:"right"},Jo=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(t=>{t.target.__overlay&&t.target.__overlay._updatePosition();});});}),qs=s=>class extends s{static get properties(){return {positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return ["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this);}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners();}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners();}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=Wd(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0);}),this.positionTarget&&(this.__observePositionTargetMove=Qh(this.positionTarget,()=>{this._updatePosition();}));}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0);}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null);}__overlayOpenedChanged(e,i){if(this.__removeUpdatePositionEventListeners(),i&&(i.__overlay=null,Jo.unobserve(i),e&&(this.__addUpdatePositionEventListeners(),i.__overlay=this,Jo.observe(i))),e){const o=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(r=>{this.__margins[r]=parseInt(o[r],10);})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition());}}__positionSettingsChanged(){this._updatePosition();}__onScroll(e){e.target instanceof Node&&this.contains(e.target)||this._updatePosition();}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const e=this.positionTarget.getBoundingClientRect();if(e.width===0&&e.height===0&&this.opened){this.opened=!1;return}const i=this.__shouldAlignStartVertically(e);this.style.justifyContent=i?"flex-start":"flex-end";const o=this.__isRTL,r=this.__shouldAlignStartHorizontally(e,o),n=!o&&r||o&&!r;this.style.alignItems=n?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,a,this.noVerticalOverlap,fi,this,i),d=this.__calculatePositionInOneDimension(e,a,this.noHorizontalOverlap,vi,this,r);Object.assign(this.style,l,d),this.toggleAttribute("bottom-aligned",!i),this.toggleAttribute("top-aligned",i),this.toggleAttribute("end-aligned",!n),this.toggleAttribute("start-aligned",n);}__shouldAlignStartHorizontally(e,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const r=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!i&&this.horizontalAlign==="start"||i&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,o,r,this.__margins,n,this.noHorizontalOverlap,vi)}__shouldAlignStartVertically(e){const i=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),r=this.verticalAlign==="top";return this.__shouldAlignStart(e,i,o,this.__margins,r,this.noVerticalOverlap,fi)}__shouldAlignStart(e,i,o,r,n,a,l){const d=o-e[a?l.end:l.start]-r[l.end],h=e[a?l.start:l.end]-r[l.start],c=n?d:h,_=c>(n?h:d)||c>i;return n===_}__adjustBottomProperty(e,i,o){let r;if(e===i.end){if(i.end===fi.end){const n=Math.min(window.innerHeight,document.documentElement.clientHeight);if(o>n&&this.__oldViewportHeight){const a=this.__oldViewportHeight-n;r=o-a;}this.__oldViewportHeight=n;}if(i.end===vi.end){const n=Math.min(window.innerWidth,document.documentElement.clientWidth);if(o>n&&this.__oldViewportWidth){const a=this.__oldViewportWidth-n;r=o-a;}this.__oldViewportWidth=n;}}return r}__calculatePositionInOneDimension(e,i,o,r,n,a){const l=a?r.start:r.end,d=a?r.end:r.start,h=parseFloat(n.style[l]||getComputedStyle(n)[l]),c=this.__adjustBottomProperty(l,r,h),u=i[a?r.start:r.end]-e[o===a?r.end:r.start],_=c?`${c}px`:`${h+u*(a?-1:1)}px`;return {[l]:_,[d]:""}}};/**
|
|
3611
3611
|
* @license
|
|
3612
3612
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
3613
3613
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3614
|
-
*/const
|
|
3614
|
+
*/const Zh=s=>class extends qs(Hs(s)){_shouldCloseOnOutsideClick(e){return !e.composedPath().includes(this.positionTarget)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!Ps(e.composedPath()[0])&&e.preventDefault();}};/**
|
|
3615
3615
|
* @license
|
|
3616
3616
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3617
3617
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3618
|
-
*/const
|
|
3618
|
+
*/const ec=p`
|
|
3619
3619
|
[part='overlay'] {
|
|
3620
3620
|
display: flex;
|
|
3621
3621
|
flex: auto;
|
|
@@ -3634,18 +3634,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3634
3634
|
* @license
|
|
3635
3635
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3636
3636
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3637
|
-
*/f("vaadin-date-picker-overlay",[
|
|
3637
|
+
*/f("vaadin-date-picker-overlay",[Rs,ec],{moduleId:"vaadin-date-picker-overlay-styles"});class tc extends Zh($(E(y))){static get is(){return "vaadin-date-picker-overlay"}static get template(){return b`
|
|
3638
3638
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
3639
3639
|
<div part="overlay" id="overlay">
|
|
3640
3640
|
<div part="content" id="content">
|
|
3641
3641
|
<slot></slot>
|
|
3642
3642
|
</div>
|
|
3643
3643
|
</div>
|
|
3644
|
-
`}}
|
|
3644
|
+
`}}x(tc);/**
|
|
3645
3645
|
* @license
|
|
3646
3646
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3647
3647
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3648
|
-
*/const
|
|
3648
|
+
*/const Dn=p`
|
|
3649
3649
|
:host {
|
|
3650
3650
|
display: inline-block;
|
|
3651
3651
|
position: relative;
|
|
@@ -3705,7 +3705,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3705
3705
|
outline-color: GrayText;
|
|
3706
3706
|
}
|
|
3707
3707
|
}
|
|
3708
|
-
`,
|
|
3708
|
+
`,ic=s=>s`
|
|
3709
3709
|
<div class="vaadin-button-container">
|
|
3710
3710
|
<span part="prefix" aria-hidden="true">
|
|
3711
3711
|
<slot name="prefix"></slot>
|
|
@@ -3722,15 +3722,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3722
3722
|
* @license
|
|
3723
3723
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3724
3724
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3725
|
-
*/const
|
|
3725
|
+
*/const Us=s=>class extends ks(bn(fe(s))){static get properties(){return {tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return ["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button");}_onKeyDown(e){super._onKeyDown(e),!(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)&&this._activeKeys.includes(e.key)&&(e.preventDefault(),this.click());}};/**
|
|
3726
3726
|
* @license
|
|
3727
3727
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3728
3728
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3729
|
-
*/f("vaadin-button",
|
|
3729
|
+
*/f("vaadin-button",Dn,{moduleId:"vaadin-button-styles"});class sc extends Us(X(E(oe(y)))){static get is(){return "vaadin-button"}static get template(){return ic(b)}ready(){super.ready(),this._tooltipController=new _e(this),this.addController(this._tooltipController);}}x(sc);/**
|
|
3730
3730
|
* @license
|
|
3731
3731
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3732
3732
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3733
|
-
*/function
|
|
3733
|
+
*/function oc(s){let t=s.getDay();t===0&&(t=7);const e=4-t,i=new Date(s.getTime()+e*24*3600*1e3),o=new Date(0,0);o.setFullYear(i.getFullYear());const r=i.getTime()-o.getTime(),n=Math.round(r/(24*3600*1e3));return Math.floor(n/7+1)}function Xi(s){const t=new Date(s);return t.setHours(0,0,0,0),t}function K(s,t,e=Xi){return s instanceof Date&&t instanceof Date&&e(s).getTime()===e(t).getTime()}function Ws(s){return {day:s.getDate(),month:s.getMonth(),year:s.getFullYear()}}function Ee(s,t,e,i){let o=!1;if(typeof i=="function"&&s){const r=Ws(s);o=i(r);}return (!t||s>=t)&&(!e||s<=e)&&!o}function zn(s,t){return t.filter(e=>e!==void 0).reduce((e,i)=>{if(!i)return e;if(!e)return i;const o=Math.abs(s.getTime()-i.getTime()),r=Math.abs(e.getTime()-s.getTime());return o<r?i:e})}function Mn(s){const t=new Date,e=new Date(t);return e.setDate(1),e.setMonth(parseInt(s)+t.getMonth()),e}function rc(s,t,e=0,i=1){if(t>99)throw new Error("The provided year cannot have more than 2 digits.");if(t<0)throw new Error("The provided year cannot be negative.");let o=t+Math.floor(s.getFullYear()/100)*100;return s<new Date(o-50,e,i)?o-=100:s>new Date(o+50,e,i)&&(o+=100),o}function Be(s){const t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(s);if(!t)return;const e=new Date(0,0);return e.setFullYear(parseInt(t[1],10)),e.setMonth(parseInt(t[2],10)-1),e.setDate(parseInt(t[3],10)),e}function nc(s){const t=(l,d="00")=>(d+l).substr((d+l).length-d.length);let e="",i="0000",o=s.year;o<0?(o=-o,e="-",i="000000"):s.year>=1e4&&(e="+",i="000000");const r=e+t(o,i),n=t(s.month+1),a=t(s.day);return [r,n,a].join("-")}function ac(s){return s instanceof Date?nc({year:s.getFullYear(),month:s.getMonth(),day:s.getDate()}):""}/**
|
|
3734
3734
|
@license
|
|
3735
3735
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3736
3736
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3738,7 +3738,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3738
3738
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3739
3739
|
Code distributed by Google as part of the polymer project is also
|
|
3740
3740
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3741
|
-
*/let
|
|
3741
|
+
*/let lc=class Ji{constructor(){this._asyncModule=null,this._callback=null,this._timer=null;}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run(()=>{this._timer=null,st.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),st.delete(this));}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null);}flush(){this.isActive()&&(this.cancel(),this._callback());}isActive(){return this._timer!=null}static debounce(t,e,i){return t instanceof Ji?t._cancelAsync():t=new Ji,t.setConfig(e,i),t}},st=new Set;const dc=function(s){st.add(s);},hc=function(){const s=!!st.size;return st.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s};/**
|
|
3742
3742
|
@license
|
|
3743
3743
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3744
3744
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3746,11 +3746,11 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3746
3746
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3747
3747
|
Code distributed by Google as part of the polymer project is also
|
|
3748
3748
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3749
|
-
*/const js=function(){let s,t;do s=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=
|
|
3749
|
+
*/const js=function(){let s,t;do s=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=hc();while(s||t)};/**
|
|
3750
3750
|
* @license
|
|
3751
3751
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3752
3752
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3753
|
-
*/const
|
|
3753
|
+
*/const Nn=document.createElement("template");Nn.innerHTML=`
|
|
3754
3754
|
<style>
|
|
3755
3755
|
:host {
|
|
3756
3756
|
display: block;
|
|
@@ -3800,11 +3800,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3800
3800
|
<div class="buffer"></div>
|
|
3801
3801
|
<div id="fullHeight"></div>
|
|
3802
3802
|
</div>
|
|
3803
|
-
`;class
|
|
3803
|
+
`;class Ln extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(Nn.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1;}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0);}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i);}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return (this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+this.bufferSize*2?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout(()=>{this.$.scroller.classList.remove("notouchscroll");},10));}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach(t=>{this.$[t.id]=t;}),this.$.scroller.addEventListener("scroll",()=>this._scroll()),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=`${this._initialScroll*2}px`);}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),js();}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach(t=>{[...t.children].forEach(e=>{this._ensureStampedInstance(e._itemWrapper);});}),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")));}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse();}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>this._initialScroll*2-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t>this._buffers[1].translateY+e,o=t<this._buffers[0].translateY+e;(i||o)&&(this._translateBuffer(o),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=z.debounce(this._debouncerScrollFinish,te.after(200),()=>{const r=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],r)&&!this._isVisible(this._buffers[1],r)&&(this.position=this.position);});}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach(t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`;}),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=z.debounce(this._debouncerUpdateClones,te.after(200),()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones();}),this._scrollDisabled=!1;}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach(e=>{for(let i=0;i<this.bufferSize;i++){const o=document.createElement("div");o.style.height=`${this.itemHeight}px`,o.instance={};const r=`vaadin-infinite-scroller-item-content-${Rt()}`,n=document.createElement("slot");n.setAttribute("name",r),n._itemWrapper=o,e.appendChild(n),o.setAttribute("slot",r),this.appendChild(o),this._isVisible(o,t)&&this._ensureStampedInstance(o);}}),requestAnimationFrame(()=>{this._finishInit();});}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach(i=>{t.instance[i]=e[i];});}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach((i,o)=>{if(!i.updated){const r=this._firstIndex+this.bufferSize*o;[...i.children].forEach((n,a)=>{const l=n._itemWrapper;(!t||this._isVisible(l,e))&&this._updateElement(l.instance,r+a);}),i.updated=!0;}});}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}/**
|
|
3804
3804
|
* @license
|
|
3805
3805
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3806
3806
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3807
|
-
*/const
|
|
3807
|
+
*/const Vn=document.createElement("template");Vn.innerHTML=`
|
|
3808
3808
|
<style>
|
|
3809
3809
|
:host {
|
|
3810
3810
|
--vaadin-infinite-scroller-item-height: 270px;
|
|
@@ -3816,11 +3816,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3816
3816
|
height: 100%;
|
|
3817
3817
|
}
|
|
3818
3818
|
</style>
|
|
3819
|
-
`;class
|
|
3819
|
+
`;class cc extends Ln{static get is(){return "vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(Vn.content.cloneNode(!0));}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=Mn(e);}}x(cc);/**
|
|
3820
3820
|
* @license
|
|
3821
3821
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3822
3822
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3823
|
-
*/const
|
|
3823
|
+
*/const Fn=document.createElement("template");Fn.innerHTML=`
|
|
3824
3824
|
<style>
|
|
3825
3825
|
:host {
|
|
3826
3826
|
--vaadin-infinite-scroller-item-height: 80px;
|
|
@@ -3854,15 +3854,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3854
3854
|
border-left-color: #000;
|
|
3855
3855
|
}
|
|
3856
3856
|
</style>
|
|
3857
|
-
`;class
|
|
3857
|
+
`;class uc extends Ln{static get is(){return "vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(Fn.content.cloneNode(!0));}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(t,e){t.year=this._yearAfterXYears(e);}_yearAfterXYears(t){const e=new Date,i=new Date(e);return i.setFullYear(parseInt(t)+e.getFullYear()),i.getFullYear()}}x(uc);/**
|
|
3858
3858
|
* @license
|
|
3859
3859
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3860
3860
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3861
|
-
*/const
|
|
3861
|
+
*/const pc=s=>class extends s{static get properties(){return {year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return ["__updateSelected(year, selectedDate)"]}__updateSelected(e,i){this.toggleAttribute("selected",i&&i.getFullYear()===e),this.toggleAttribute("current",e===new Date().getFullYear());}};/**
|
|
3862
3862
|
* @license
|
|
3863
3863
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3864
3864
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3865
|
-
*/class
|
|
3865
|
+
*/class _c extends E(pc(y)){static get is(){return "vaadin-date-picker-year"}static get template(){return b`
|
|
3866
3866
|
<style>
|
|
3867
3867
|
:host {
|
|
3868
3868
|
display: block;
|
|
@@ -3871,7 +3871,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3871
3871
|
</style>
|
|
3872
3872
|
<div part="year-number">[[year]]</div>
|
|
3873
3873
|
<div part="year-separator" aria-hidden="true"></div>
|
|
3874
|
-
`}}
|
|
3874
|
+
`}}x(_c);/**
|
|
3875
3875
|
@license
|
|
3876
3876
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3877
3877
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3879,7 +3879,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3879
3879
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3880
3880
|
Code distributed by Google as part of the polymer project is also
|
|
3881
3881
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3882
|
-
*/function Ys(s,t,e,i,o){let r;o&&(r=typeof e=="object"&&e!==null,r&&(i=s.__dataTemp[t]));let n=i!==e&&(i===i||e===e);return r&&n&&(s.__dataTemp[t]=e),n}const Gs=
|
|
3882
|
+
*/function Ys(s,t,e,i,o){let r;o&&(r=typeof e=="object"&&e!==null,r&&(i=s.__dataTemp[t]));let n=i!==e&&(i===i||e===e);return r&&n&&(s.__dataTemp[t]=e),n}const Gs=S(s=>{class t extends s{_shouldPropertyChange(i,o,r){return Ys(this,i,o,r,!0)}}return t}),mc=S(s=>{class t extends s{static get properties(){return {mutableData:Boolean}}_shouldPropertyChange(i,o,r){return Ys(this,i,o,r,this.mutableData)}}return t});Gs._mutablePropertyChange=Ys;/**
|
|
3883
3883
|
@license
|
|
3884
3884
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3885
3885
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3887,7 +3887,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3887
3887
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3888
3888
|
Code distributed by Google as part of the polymer project is also
|
|
3889
3889
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3890
|
-
*/let
|
|
3890
|
+
*/let Qi=null;function Zi(){return Qi}Zi.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Zi,writable:!0}});const Bn=xs(Zi),fc=Gs(Bn);function vc(s,t){Qi=s,Object.setPrototypeOf(s,t.prototype),new t,Qi=null;}const gc=xs(class{});function bc(s,t){for(let e=0;e<t.length;e++){let i=t[e];if(!!s!=!!i.__hideTemplateChildren__)if(i.nodeType===Node.TEXT_NODE)s?(i.__polymerTextContent__=i.textContent,i.textContent=""):i.textContent=i.__polymerTextContent__;else if(i.localName==="slot")if(s)i.__polymerReplaced__=document.createComment("hidden-slot"),P(P(i).parentNode).replaceChild(i.__polymerReplaced__,i);else {const o=i.__polymerReplaced__;o&&P(P(o).parentNode).replaceChild(i,o);}else i.style&&(s?(i.__polymerDisplay__=i.style.display,i.style.display="none"):i.style.display=i.__polymerDisplay__);i.__hideTemplateChildren__=s,i._showHideChildren&&i._showHideChildren(s);}}class re extends gc{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let o=this.root.firstChild;o;o=o.nextSibling)e.push(o),o.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties();}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let i in this.__hostProps)this._setPendingProperty(i,this.__dataHost["_host_"+i]);for(let i in t)this._setPendingProperty(i,t[i]);}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this);}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,o=>{o.model=this,i(o);});else {let o=this.__dataHost.__dataHost;o&&o._addEventListenerToNode(t,e,i);}}_showHideChildren(t){bc(t,this.children);}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&e=="textContent"?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i);}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do t=t.__dataHost.__dataHost;while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t;}return t}dispatchEvent(t){return !0}}const yc=Gs(re);function Qo(s){let t=s.__dataHost;return t&&t._methodHost||t}function xc(s,t,e){let i=e.mutableData?yc:re;es.mixin&&(i=es.mixin(i));let o=class extends i{};return o.prototype.__templatizeOptions=e,o.prototype._bindTemplate(s),Ic(o,s,t,e),o}function Cc(s,t,e,i){let o=e.forwardHostProp;if(o&&t.hasHostProps){const r=s.localName=="template";let n=t.templatizeTemplateClass;if(!n){if(r){let l=e.mutableData?fc:Bn;class d extends l{}n=t.templatizeTemplateClass=d;}else {const l=s.constructor;class d extends l{}n=t.templatizeTemplateClass=d;}let a=t.hostProps;for(let l in a)n.prototype._addPropertyEffect("_host_"+l,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:wc(l,o)}),n.prototype._createNotifyingProperty("_host_"+l);Lr&&i&&Sc(t,e,i);}if(s.__dataProto&&Object.assign(s.__data,s.__dataProto),r)vc(s,n),s.__dataTemp={},s.__dataPending=null,s.__dataOld=null,s._enableProperties();else {Object.setPrototypeOf(s,n.prototype);const a=t.hostProps;for(let l in a)if(l="_host_"+l,l in s){const d=s[l];delete s[l],s.__data[l]=d;}}}}function wc(s,t){return function(i,o,r){t.call(i.__templatizeOwner,o.substring(6),r[o]);}}function Ic(s,t,e,i){let o=e.hostProps||{};for(let r in i.instanceProps){delete o[r];let n=i.notifyInstanceProp;n&&s.prototype._addPropertyEffect(r,s.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Ac(r,n)});}if(i.forwardHostProp&&t.__dataHost)for(let r in o)e.hasHostProps||(e.hasHostProps=!0),s.prototype._addPropertyEffect(r,s.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Ec()});}function Ac(s,t){return function(i,o,r){t.call(i.__templatizeOwner,i,o,r[o]);}}function Ec(){return function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0);}}function es(s,t,e){if(St&&!Qo(s))throw new Error("strictTemplatePolicy: template owner not trusted");if(e=e||{},s.__templatizeOwner)throw new Error("A <template> can only be templatized once");s.__templatizeOwner=t;let o=(t?t.constructor:re)._parseTemplate(s),r=o.templatizeInstanceClass;r||(r=xc(s,o,e),o.templatizeInstanceClass=r);const n=Qo(s);Cc(s,o,e,n);let a=class extends r{};return a.prototype._methodHost=n,a.prototype.__dataHost=s,a.prototype.__templatizeOwner=t,a.prototype.__hostProps=o.hostProps,a=a,a}function Sc(s,t,e){const i=e.constructor._properties,{propertyEffects:o}=s,{instanceProps:r}=t;for(let n in o)if(!i[n]&&!(r&&r[n])){const a=o[n];for(let l=0;l<a.length;l++){const{part:d}=a[l].info;if(!(d.signature&&d.signature.static)){console.warn(`Property '${n}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}function kc(s,t){let e;for(;t;)if(e=t.__dataHost?t:t.__templatizeInstance)if(e.__dataHost!=s)t=e.__dataHost;else return e;else t=P(t).parentNode;return null}/**
|
|
3891
3891
|
@license
|
|
3892
3892
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3893
3893
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3895,7 +3895,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3895
3895
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3896
3896
|
Code distributed by Google as part of the polymer project is also
|
|
3897
3897
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3898
|
-
*/let Zo=!1;function
|
|
3898
|
+
*/let Zo=!1;function Tc(){if(Nr&&!Mr){if(!Zo){Zo=!0;const s=document.createElement("style");s.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(s);}return !0}return !1}/**
|
|
3899
3899
|
@license
|
|
3900
3900
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3901
3901
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3903,15 +3903,15 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3903
3903
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3904
3904
|
Code distributed by Google as part of the polymer project is also
|
|
3905
3905
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3906
|
-
*/const
|
|
3906
|
+
*/const Pc=mc(y);class er extends Pc{static get is(){return "dom-repeat"}static get template(){return null}static get properties(){return {items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!Eo,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return ["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null;}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId);}connectedCallback(){if(super.connectedCallback(),Tc()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=P(P(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render();}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let o=new MutationObserver(()=>{if(this.querySelector("template"))o.disconnect(),this.__render();else throw new Error("dom-repeat requires a <template> child")});return o.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=es(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(o,r){let n=this.__instances;for(let a=0,l;a<n.length&&(l=n[a]);a++)l.forwardHostProp(o,r);},notifyInstanceProp:function(o,r,n){if(kl(this.as,r)){let a=o[this.itemsIndexAs];r==this.as&&(this.items[a]=n);let l=Qe(this.as,`${JSCompiler_renameProperty("items",this)}.${a}`,r);this.notifyPath(l,n);}}});}return !0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if(typeof t=="string"){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render);}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render);}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ");}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn){if(!t)this.__debounceRender(this.__render,this.delay);else if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)t.indexOf(e[i])===0&&this.__debounceRender(this.__render,this.delay);}}}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||(t.path==="items"&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render));}__debounceRender(t,e=0){this.__renderDebouncer=lc.debounce(this.__renderDebouncer,e>0?Ml.after(e):jr,t.bind(this)),dc(this.__renderDebouncer);}render(){this.__debounceRender(this.__render),js();}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),i=this.__calculateLimit(e.length);this.__updateInstances(t,i,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame(()=>{this.__chunkingId=null,this.__continueChunking();})),this._setRenderedItemCount(this.__instances.length),(!Eo||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}));}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter((i,o,r)=>this.__filterFn(t[i],o,r))),this.__sortFn&&e.sort((i,o)=>this.__sortFn(t[i],t[o])),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let o;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),o=Math.max(e-i,0),this.__chunkCount=o||1):(o=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+o,t)),this.__shouldMeasureChunk=o===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now();}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime,e=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*e)||1;}this.__shouldContinueChunking&&this.__debounceRender(this.__render);}__updateInstances(t,e,i){const o=this.__itemsIdxToInstIdx={};let r;for(r=0;r<e;r++){let n=this.__instances[r],a=i[r],l=t[a];o[a]=r,n?(n._setPendingProperty(this.as,l),n._setPendingProperty(this.indexAs,r),n._setPendingProperty(this.itemsIndexAs,a),n._flushProperties()):this.__insertInstance(l,r,a);}for(let n=this.__instances.length-1;n>=r;n--)this.__detachAndRemoveInstance(n);}__detachInstance(t){let e=this.__instances[t];const i=P(e.root);for(let o=0;o<e.children.length;o++){let r=e.children[o];i.appendChild(r);}return e}__attachInstance(t,e){let i=this.__instances[t];e.insertBefore(i.root,this);}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1);}__stampInstance(t,e,i){let o={};return o[this.as]=t,o[this.indexAs]=e,o[this.itemsIndexAs]=i,new this.__ctor(o)}__insertInstance(t,e,i){const o=this.__stampInstance(t,e,i);let r=this.__instances[e+1],n=r?r.children[0]:this;return P(P(this).parentNode).insertBefore(o.root,n),this.__instances[e]=o,o}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t);}__handleItemPath(t,e){let i=t.slice(6),o=i.indexOf("."),r=o<0?i:i.substring(0,o);if(r==parseInt(r,10)){let n=o<0?"":i.substring(o+1);this.__handleObservedPaths(n);let a=this.__itemsIdxToInstIdx[r],l=this.__instances[a];if(l){let d=this.as+(n?"."+n:"");l._setPendingPropertyOrPath(d,e,!1,!0),l._flushProperties();}return !0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return kc(this.template,t)}}customElements.define(er.is,er);/**
|
|
3907
3907
|
* @license
|
|
3908
3908
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3909
3909
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3910
|
-
*/const
|
|
3910
|
+
*/const Oc=s=>class extends fe(s){static get properties(){return {month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return ["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return [...this.shadowRoot.querySelectorAll("[part~=date]")].find(e=>K(e.date,this.focusedDate))}ready(){super.ready(),R(this.$.monthGrid,"tap",this._handleTap.bind(this));}_isDisabled(e,i,o){const r=new Date(0,0);r.setFullYear(e.getFullYear()),r.setMonth(e.getMonth()),r.setDate(1);const n=new Date(0,0);return n.setFullYear(e.getFullYear()),n.setMonth(e.getMonth()+1),n.setDate(0),i&&o&&i.getMonth()===o.getMonth()&&i.getMonth()===e.getMonth()&&o.getDate()-i.getDate()>=0?!1:!Ee(r,i,o)&&!Ee(n,i,o)}_getTitle(e,i){if(!(e===void 0||i===void 0))return i.formatTitle(i.monthNames[e.getMonth()],e.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0;},300);}_dateAdd(e,i){e.setDate(e.getDate()+i);}_applyFirstDayOfWeek(e,i){if(!(e===void 0||i===void 0))return e.slice(i).concat(e.slice(0,i))}_getWeekDayNames(e,i){if(e===void 0||i===void 0)return [];const{weekdays:o,weekdaysShort:r,firstDayOfWeek:n}=e,a=this._applyFirstDayOfWeek(r,n);return this._applyFirstDayOfWeek(o,n).map((d,h)=>({weekDay:d,weekDayShort:a[h]})).slice(0,7)}__focusedDateChanged(e,i){Array.isArray(i)&&i.some(o=>K(o,e))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true");}_getDate(e){return e?e.getDate():""}_showWeekSeparator(e,i){return e&&i&&i.firstDayOfWeek===1}_isToday(e){return K(new Date,e)}_getDays(e,i){if(e===void 0||i===void 0)return [];const o=new Date(0,0);for(o.setFullYear(e.getFullYear()),o.setMonth(e.getMonth()),o.setDate(1);o.getDay()!==i.firstDayOfWeek;)this._dateAdd(o,-1);const r=[],n=o.getMonth(),a=e.getMonth();for(;o.getMonth()===a||o.getMonth()===n;)r.push(o.getMonth()===a?new Date(o.getTime()):null),this._dateAdd(o,1);return r}_getWeeks(e){return e.reduce((i,o,r)=>(r%7===0&&i.push([]),i[i.length-1].push(o),i),[])}_handleTap(e){!this.ignoreTaps&&!this._notTapping&&e.target.date&&!e.target.hasAttribute("disabled")&&(this.selectedDate=e.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:e.target.date},bubbles:!0,composed:!0})));}_preventDefault(e){e.preventDefault();}__getWeekNumber(e){const i=e.reduce((o,r)=>!o&&r?r:o);return oc(i)}__getDayAriaLabel(e){if(!e)return "";let i=`${this._getDate(e)} ${this.i18n.monthNames[e.getMonth()]} ${e.getFullYear()}, ${this.i18n.weekdays[e.getDay()]}`;return this._isToday(e)&&(i+=`, ${this.i18n.today}`),i}};/**
|
|
3911
3911
|
* @license
|
|
3912
3912
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3913
3913
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3914
|
-
*/const
|
|
3914
|
+
*/const Dc=p`
|
|
3915
3915
|
:host {
|
|
3916
3916
|
display: block;
|
|
3917
3917
|
}
|
|
@@ -3971,7 +3971,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3971
3971
|
* @license
|
|
3972
3972
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3973
3973
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3974
|
-
*/f("vaadin-month-calendar",
|
|
3974
|
+
*/f("vaadin-month-calendar",Dc,{moduleId:"vaadin-month-calendar-styles"});class zc extends Oc(E(y)){static get template(){return b`
|
|
3975
3975
|
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
|
|
3976
3976
|
<table
|
|
3977
3977
|
id="monthGrid"
|
|
@@ -4013,7 +4013,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4013
4013
|
</template>
|
|
4014
4014
|
</tbody>
|
|
4015
4015
|
</table>
|
|
4016
|
-
`}static get is(){return "vaadin-month-calendar"}static get properties(){return {_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return ["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&e.firstDayOfWeek===1?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers");}__getDatePart(t,e,i,o,r,n){const a=["date"],l=t>
|
|
4016
|
+
`}static get is(){return "vaadin-month-calendar"}static get properties(){return {_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return ["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&e.firstDayOfWeek===1?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers");}__getDatePart(t,e,i,o,r,n){const a=["date"],l=t>Xi(new Date),d=t<Xi(new Date);return this.__isDayDisabled(t,o,r,n)&&a.push("disabled"),this.__isDayFocused(t,e)&&a.push("focused"),this.__isDaySelected(t,i)&&a.push("selected"),this._isToday(t)&&a.push("today"),d&&a.push("past"),l&&a.push("future"),a.join(" ")}__isDayFocused(t,e){return K(t,e)}__isDaySelected(t,e){return K(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return "true"}__isDayDisabled(t,e,i,o){return !Ee(t,e,i,o)}__getDayAriaDisabled(t,e,i,o){if(!(t===void 0||e===void 0&&i===void 0&&o===void 0)&&this.__isDayDisabled(t,e,i,o))return "true"}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}x(zc);/**
|
|
4017
4017
|
* @license
|
|
4018
4018
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4019
4019
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4021,11 +4021,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4021
4021
|
* @license
|
|
4022
4022
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4023
4023
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4024
|
-
*/const Dc=s=>class extends s{static get properties(){return {scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return ["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map(e=>e.focusableDateElement).find(Boolean)}_addListeners(){fn(this.$.scrollers,"pan-y"),B(this.$.scrollers,"track",this._track.bind(this)),B(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),B(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),B(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this));}_initControllers(){this.addController(new Ks(this._desktopMediaQuery,e=>{this._desktopMode=e;})),this.addController(new Y(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onTodayButtonKeyDown(i)),B(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e;}})),this.addController(new Y(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onCancelButtonKeyDown(i)),B(e,"tap",this._cancel.bind(this)),this._cancelButton=e;}})),this.__initMonthScroller(),this.__initYearScroller();}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0);}focusCancel(){this._cancelButton.focus();}scrollToDate(e,i){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+o,i),this._monthScroller.forceUpdate();}__initMonthScroller(){this.addController(new Y(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll();}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart();}),e.addEventListener("keydown",i=>{this.__onMonthCalendarKeyDown(i);}),e.addEventListener("init-done",()=>{const i=[...this.querySelectorAll("vaadin-month-calendar")];i.forEach(o=>{o.addEventListener("selected-date-changed",r=>{this.selectedDate=r.detail.value;});}),this.calendars=i;}),this._monthScroller=e;}}));}__initYearScroller(){this.addController(new Y(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),B(e,"tap",i=>{this._onYearTap(i);}),e.addEventListener("custom-scroll",()=>{this._onYearScroll();}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart();}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")];}),this._yearScroller=e;}}));}__updateCancelButton(e,i){e&&(e.textContent=i&&i.cancel);}__updateTodayButton(e,i,o,r,n){e&&(e.textContent=i&&i.today,e.disabled=!this._isTodayAllowed(o,r,n));}__updateCalendars(e,i,o,r,n,a,l,d,h,c){e&&e.length&&e.forEach(u=>{u.i18n=i,u.minDate=o,u.maxDate=r,u.isDateDisabled=c,u.focusedDate=a,u.selectedDate=n,u.showWeekNumbers=l,u.ignoreTaps=d,h?u.setAttribute("theme",h):u.removeAttribute("theme");});}__updateYears(e,i,o){e&&e.length&&e.forEach(r=>{r.selectedDate=i,o?r.setAttribute("theme",o):r.removeAttribute("theme");});}_selectDate(e){return this._dateAllowed(e)?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0):!1}_desktopModeChanged(e){this.toggleAttribute("desktop",e);}_focusedDateChanged(e){this.revealDate(e);}revealDate(e,i=!0){if(!e)return;const o=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const d=this._calculateWeekScrollOffset(e);this._scrollToPosition(o+d,i);return}const r=this._monthScroller.position>o,a=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,l=this._monthScroller.position+a-1<o;r?this._scrollToPosition(o,i):l&&this._scrollToPosition(o-a+1,i);}_calculateWeekScrollOffset(e){const i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);let o=0;for(;i.getDate()<e.getDate();)i.setDate(i.getDate()+1),i.getDay()===this.i18n.firstDayOfWeek&&(o+=1);return o/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e);}_repositionYearScroller(){const e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+this._originDate.getMonth())/12;}_repositionMonthScroller(){this._monthScroller.position=this._yearScroller.position*12-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position);}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps();}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps();}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0;},300),this._repositionMonthScroller();}_onMonthScrollTouchStart(){this._repositionYearScroller();}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=z.debounce(this._debouncer,ee.after(300),()=>{this._ignoreTaps=!1;});}_formatDisplayed(e,i,o){return e&&i&&typeof i.formatDate=="function"?i.formatDate(Ws(e)):o}_onTodayTap(){const e=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this._selectDate(e),this._close()):this._scrollToCurrentMonth();}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0);}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){const o=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+o*12,!0);}}_scrollToPosition(e,i){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!i){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e;let o;this._revealPromise=new Promise(d=>{o=d;});const r=(d,h,c,u)=>(d/=u/2,d<1?c/2*d*d+h:(d-=1,-c/2*(d*(d-2)-1)+h));let n=0;const a=this._monthScroller.position,l=d=>{n||(n=d);const h=d-n;if(h<this.scrollDuration){const c=r(h,a,this._targetPosition-a,this.scrollDuration);this._monthScroller.position=c,window.requestAnimationFrame(l);}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:a}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1);};window.requestAnimationFrame(l);}_limit(e,i){return Math.min(i.max,Math.max(i.min,e))}_handleTrack(e){if(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)return;Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);const i=this._translateX+e.detail.ddx;this._translateX=this._limit(i,{min:0,max:this._yearScrollerWidth});}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller();break}}_toggleAnimateClass(e){e?this.classList.add("animate"):this.classList.remove("animate");}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller();}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","");}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth;}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(e){this._desktopMode||(this._monthScroller.style.transform=`translateX(${e-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${e}px)`);}_yearAfterXMonths(e){return zn(e).getFullYear()}_differenceInMonths(e,i){return (e.getFullYear()-i.getFullYear())*12-i.getMonth()+e.getMonth()}_clear(){this._selectDate("");}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}));}_cancel(){this.focusedDate=this.selectedDate,this._close();}_preventDefault(e){e.preventDefault();}__toggleDate(e){G(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e);}__onMonthCalendarKeyDown(e){let i=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),i=!0;break;case"ArrowUp":this._moveFocusByDays(-7),i=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),i=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),i=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),i=!0);break;case" ":this.__toggleDate(this.focusedDate),i=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),i=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),i=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),i=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),i=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}i&&(e.preventDefault(),e.stopPropagation());}_onTabKeyDown(e,i){switch(e.stopPropagation(),i){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput());break}}__onTodayButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"today");}__onCancelButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"cancel");}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));}__tryFocusDate(){if(this.__pendingDateFocus){const i=this.focusableDateElement;i&&G(i.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,i.focus());}}focusDate(e,i){return ze(this,null,function*(){const o=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,i||(this._focusedMonthDate=o.getDate()),yield this.focusDateElement(!1);})}focusDateElement(e=!0){return ze(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(i=>{Rs(this,()=>{js(),i();});})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate();})}_focusClosestDate(e){this.focusDate(Dn(e,[this.minDate,this.maxDate]));}_focusAllowedDate(e,i,o){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,o):this._dateAllowed(this.focusedDate)?i>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate);}_getDateDiff(e,i){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+e),i&&o.setDate(this.focusedDate.getDate()+i),o}_moveFocusByDays(e){const i=this._getDateDiff(0,e);this._focusAllowedDate(i,e,!1);}_moveFocusByMonths(e){const i=this._getDateDiff(e),o=i.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),i.setDate(this._focusedMonthDate),i.getMonth()!==o&&i.setDate(0),this._focusAllowedDate(i,e,!0);}_moveFocusInsideMonth(e,i){const o=new Date(0,0);o.setFullYear(e.getFullYear()),i==="minDate"?(o.setMonth(e.getMonth()),o.setDate(1)):(o.setMonth(e.getMonth()+1),o.setDate(0)),this._dateAllowed(o)?this.focusDate(o):this._dateAllowed(e)?this.focusDate(this[i]):this._focusClosestDate(e);}_dateAllowed(e,i=this.minDate,o=this.maxDate,r=this.isDateDisabled){return Ae(e,i,o,r)}_isTodayAllowed(e,i,o){return this._dateAllowed(this._getTodayMidnight(),e,i,o)}_getTodayMidnight(){const e=new Date,i=new Date(0,0);return i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()),i}};/**
|
|
4024
|
+
*/const Mc=s=>class extends s{static get properties(){return {scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return ["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map(e=>e.focusableDateElement).find(Boolean)}_addListeners(){fn(this.$.scrollers,"pan-y"),R(this.$.scrollers,"track",this._track.bind(this)),R(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),R(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),R(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this));}_initControllers(){this.addController(new Ks(this._desktopMediaQuery,e=>{this._desktopMode=e;})),this.addController(new G(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onTodayButtonKeyDown(i)),R(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e;}})),this.addController(new G(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onCancelButtonKeyDown(i)),R(e,"tap",this._cancel.bind(this)),this._cancelButton=e;}})),this.__initMonthScroller(),this.__initYearScroller();}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0);}focusCancel(){this._cancelButton.focus();}scrollToDate(e,i){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+o,i),this._monthScroller.forceUpdate();}__initMonthScroller(){this.addController(new G(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll();}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart();}),e.addEventListener("keydown",i=>{this.__onMonthCalendarKeyDown(i);}),e.addEventListener("init-done",()=>{const i=[...this.querySelectorAll("vaadin-month-calendar")];i.forEach(o=>{o.addEventListener("selected-date-changed",r=>{this.selectedDate=r.detail.value;});}),this.calendars=i;}),this._monthScroller=e;}}));}__initYearScroller(){this.addController(new G(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),R(e,"tap",i=>{this._onYearTap(i);}),e.addEventListener("custom-scroll",()=>{this._onYearScroll();}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart();}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")];}),this._yearScroller=e;}}));}__updateCancelButton(e,i){e&&(e.textContent=i&&i.cancel);}__updateTodayButton(e,i,o,r,n){e&&(e.textContent=i&&i.today,e.disabled=!this._isTodayAllowed(o,r,n));}__updateCalendars(e,i,o,r,n,a,l,d,h,c){e&&e.length&&e.forEach(u=>{u.i18n=i,u.minDate=o,u.maxDate=r,u.isDateDisabled=c,u.focusedDate=a,u.selectedDate=n,u.showWeekNumbers=l,u.ignoreTaps=d,h?u.setAttribute("theme",h):u.removeAttribute("theme");});}__updateYears(e,i,o){e&&e.length&&e.forEach(r=>{r.selectedDate=i,o?r.setAttribute("theme",o):r.removeAttribute("theme");});}_selectDate(e){return this._dateAllowed(e)?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0):!1}_desktopModeChanged(e){this.toggleAttribute("desktop",e);}_focusedDateChanged(e){this.revealDate(e);}revealDate(e,i=!0){if(!e)return;const o=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const d=this._calculateWeekScrollOffset(e);this._scrollToPosition(o+d,i);return}const r=this._monthScroller.position>o,a=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,l=this._monthScroller.position+a-1<o;r?this._scrollToPosition(o,i):l&&this._scrollToPosition(o-a+1,i);}_calculateWeekScrollOffset(e){const i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);let o=0;for(;i.getDate()<e.getDate();)i.setDate(i.getDate()+1),i.getDay()===this.i18n.firstDayOfWeek&&(o+=1);return o/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e);}_repositionYearScroller(){const e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+this._originDate.getMonth())/12;}_repositionMonthScroller(){this._monthScroller.position=this._yearScroller.position*12-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position);}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps();}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps();}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0;},300),this._repositionMonthScroller();}_onMonthScrollTouchStart(){this._repositionYearScroller();}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=z.debounce(this._debouncer,te.after(300),()=>{this._ignoreTaps=!1;});}_formatDisplayed(e,i,o){return e&&i&&typeof i.formatDate=="function"?i.formatDate(Ws(e)):o}_onTodayTap(){const e=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this._selectDate(e),this._close()):this._scrollToCurrentMonth();}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0);}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){const o=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+o*12,!0);}}_scrollToPosition(e,i){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!i){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e;let o;this._revealPromise=new Promise(d=>{o=d;});const r=(d,h,c,u)=>(d/=u/2,d<1?c/2*d*d+h:(d-=1,-c/2*(d*(d-2)-1)+h));let n=0;const a=this._monthScroller.position,l=d=>{n||(n=d);const h=d-n;if(h<this.scrollDuration){const c=r(h,a,this._targetPosition-a,this.scrollDuration);this._monthScroller.position=c,window.requestAnimationFrame(l);}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:a}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1);};window.requestAnimationFrame(l);}_limit(e,i){return Math.min(i.max,Math.max(i.min,e))}_handleTrack(e){if(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)return;Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);const i=this._translateX+e.detail.ddx;this._translateX=this._limit(i,{min:0,max:this._yearScrollerWidth});}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller();break}}_toggleAnimateClass(e){e?this.classList.add("animate"):this.classList.remove("animate");}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller();}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","");}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth;}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(e){this._desktopMode||(this._monthScroller.style.transform=`translateX(${e-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${e}px)`);}_yearAfterXMonths(e){return Mn(e).getFullYear()}_differenceInMonths(e,i){return (e.getFullYear()-i.getFullYear())*12-i.getMonth()+e.getMonth()}_clear(){this._selectDate("");}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}));}_cancel(){this.focusedDate=this.selectedDate,this._close();}_preventDefault(e){e.preventDefault();}__toggleDate(e){K(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e);}__onMonthCalendarKeyDown(e){let i=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),i=!0;break;case"ArrowUp":this._moveFocusByDays(-7),i=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),i=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),i=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),i=!0);break;case" ":this.__toggleDate(this.focusedDate),i=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),i=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),i=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),i=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),i=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}i&&(e.preventDefault(),e.stopPropagation());}_onTabKeyDown(e,i){switch(e.stopPropagation(),i){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput());break}}__onTodayButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"today");}__onCancelButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"cancel");}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));}__tryFocusDate(){if(this.__pendingDateFocus){const i=this.focusableDateElement;i&&K(i.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,i.focus());}}focusDate(e,i){return Me(this,null,function*(){const o=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,i||(this._focusedMonthDate=o.getDate()),yield this.focusDateElement(!1);})}focusDateElement(e=!0){return Me(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(i=>{kn(this,()=>{js(),i();});})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate();})}_focusClosestDate(e){this.focusDate(zn(e,[this.minDate,this.maxDate]));}_focusAllowedDate(e,i,o){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,o):this._dateAllowed(this.focusedDate)?i>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate);}_getDateDiff(e,i){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+e),i&&o.setDate(this.focusedDate.getDate()+i),o}_moveFocusByDays(e){const i=this._getDateDiff(0,e);this._focusAllowedDate(i,e,!1);}_moveFocusByMonths(e){const i=this._getDateDiff(e),o=i.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),i.setDate(this._focusedMonthDate),i.getMonth()!==o&&i.setDate(0),this._focusAllowedDate(i,e,!0);}_moveFocusInsideMonth(e,i){const o=new Date(0,0);o.setFullYear(e.getFullYear()),i==="minDate"?(o.setMonth(e.getMonth()),o.setDate(1)):(o.setMonth(e.getMonth()+1),o.setDate(0)),this._dateAllowed(o)?this.focusDate(o):this._dateAllowed(e)?this.focusDate(this[i]):this._focusClosestDate(e);}_dateAllowed(e,i=this.minDate,o=this.maxDate,r=this.isDateDisabled){return Ee(e,i,o,r)}_isTodayAllowed(e,i,o){return this._dateAllowed(this._getTodayMidnight(),e,i,o)}_getTodayMidnight(){const e=new Date,i=new Date(0,0);return i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()),i}};/**
|
|
4025
4025
|
* @license
|
|
4026
4026
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4027
4027
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4028
|
-
*/const
|
|
4028
|
+
*/const Nc=p`
|
|
4029
4029
|
:host {
|
|
4030
4030
|
display: flex;
|
|
4031
4031
|
flex-direction: column;
|
|
@@ -4089,7 +4089,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4089
4089
|
* @license
|
|
4090
4090
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4091
4091
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4092
|
-
*/f("vaadin-date-picker-overlay-content",
|
|
4092
|
+
*/f("vaadin-date-picker-overlay-content",Nc,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Lc extends Mc(oe(E($(y)))){static get template(){return b`
|
|
4093
4093
|
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
4094
4094
|
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
4095
4095
|
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
@@ -4109,32 +4109,32 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4109
4109
|
<slot name="today-button"></slot>
|
|
4110
4110
|
<slot name="cancel-button"></slot>
|
|
4111
4111
|
</div>
|
|
4112
|
-
`}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}
|
|
4112
|
+
`}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}x(Lc);/**
|
|
4113
4113
|
* @license
|
|
4114
4114
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4115
4115
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4116
|
-
*/const
|
|
4116
|
+
*/const gi=new WeakMap;function Vc(s){return gi.has(s)||gi.set(s,new Set),gi.get(s)}function Fc(s,t){const e=document.createElement("style");e.textContent=s,t===document?document.head.appendChild(e):t.insertBefore(e,t.firstChild);}const Rn=S(s=>class extends s{get slotStyles(){return {}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles();}__applySlotStyles(){const e=this.getRootNode(),i=Vc(e);this.slotStyles.forEach(o=>{i.has(o)||(Fc(o,e),i.add(o));});}});/**
|
|
4117
4117
|
* @license
|
|
4118
4118
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4119
4119
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4120
|
-
*/const
|
|
4120
|
+
*/const Bc=s=>class extends at(me(s)){static get properties(){return {clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",e=>this._onClearButtonMouseDown(e)),this.clearElement.addEventListener("click",e=>this._onClearButtonClick(e)));}_onClearButtonClick(e){e.preventDefault(),this._onClearAction();}_onClearButtonMouseDown(e){e.preventDefault(),Gi||this.inputElement.focus();}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}));}};/**
|
|
4121
4121
|
* @license
|
|
4122
4122
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4123
4123
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4124
|
-
*/const Xs=
|
|
4124
|
+
*/const Xs=S(s=>class extends Ds(Ns(at(s))){static get constraints(){return ["required"]}static get delegateAttrs(){return [...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver();}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map(e=>this[e]))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some(i=>this.__isValidConstraint(i))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`);}_constraintsChanged(e,...i){if(!e)return;const o=this._hasValidConstraints(i),r=this.__previousHasConstraints&&!o;(this._hasValue||this.invalid)&&o?this.validate():r&&this._setInvalid(!1),this.__previousHasConstraints=o;}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}));}__isValidConstraint(e){return !!e||e===0}});/**
|
|
4125
4125
|
* @license
|
|
4126
4126
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4127
4127
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4128
|
-
*/const Js=s=>class extends
|
|
4128
|
+
*/const Js=s=>class extends Rn(Ht(Xs(qt(Bc(me(s)))))){static get properties(){return {allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return [...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this);}get slotStyles(){return [`
|
|
4129
4129
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
4130
4130
|
font: inherit;
|
|
4131
4131
|
color: inherit;
|
|
4132
4132
|
}
|
|
4133
|
-
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select();}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}));}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput);}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented());}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=z.debounce(this._preventInputDebouncer,
|
|
4133
|
+
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select();}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}));}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput);}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented());}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=z.debounce(this._preventInputDebouncer,te.after(200),()=>{this.removeAttribute("input-prevented");});}__shouldAcceptKey(e){return e.metaKey||e.ctrlKey||!e.key||e.key.length!==1||this.__allowedCharRegExp.test(e.key)}_onPaste(e){if(this.allowedCharPattern){const i=e.clipboardData.getData("text");this.__allowedTextRegExp.test(i)||(e.preventDefault(),this._markInputPrevented());}}_onDrop(e){if(this.allowedCharPattern){const i=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(i)||(e.preventDefault(),this._markInputPrevented());}}_onBeforeInput(e){this.allowedCharPattern&&e.data&&!this.__allowedTextRegExp.test(e.data)&&(e.preventDefault(),this._markInputPrevented());}_allowedCharPatternChanged(e){if(e)try{this.__allowedCharRegExp=new RegExp(`^${e}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${e}*$`,"u");}catch(i){console.error(i);}}};/**
|
|
4134
4134
|
* @license
|
|
4135
4135
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4136
4136
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4137
|
-
*/const
|
|
4137
|
+
*/const Rc=p`
|
|
4138
4138
|
[part='clear-button'] {
|
|
4139
4139
|
display: none;
|
|
4140
4140
|
cursor: default;
|
|
@@ -4151,7 +4151,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4151
4151
|
* @license
|
|
4152
4152
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4153
4153
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4154
|
-
*/const
|
|
4154
|
+
*/const $n=p`
|
|
4155
4155
|
:host {
|
|
4156
4156
|
display: inline-flex;
|
|
4157
4157
|
outline: none;
|
|
@@ -4189,7 +4189,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4189
4189
|
* @license
|
|
4190
4190
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4191
4191
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4192
|
-
*/const
|
|
4192
|
+
*/const Hn=p`
|
|
4193
4193
|
[class$='container'] {
|
|
4194
4194
|
display: flex;
|
|
4195
4195
|
flex-direction: column;
|
|
@@ -4201,23 +4201,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4201
4201
|
* @license
|
|
4202
4202
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4203
4203
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4204
|
-
*/const Qs=[
|
|
4204
|
+
*/const Qs=[$n,Hn,Rc];/**
|
|
4205
4205
|
* @license
|
|
4206
4206
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
4207
4207
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4208
|
-
*/const
|
|
4208
|
+
*/const Yt=s=>class extends s{static get properties(){return {overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return ["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,i){if(!i||e===void 0)return;const{classList:o}=i;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const n=this.__previousClasses.filter(a=>!this.__initialClasses.has(a));n.length>0&&o.remove(...n);}const r=typeof e=="string"?e.split(" ").filter(Boolean):[];r.length>0&&o.add(...r),this.__previousClasses=r;}};/**
|
|
4209
4209
|
* @license
|
|
4210
4210
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4211
4211
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4212
|
-
*/let
|
|
4212
|
+
*/let qn=class{constructor(t){this.host=t,t.addEventListener("opened-changed",()=>{t.opened||this.__setVirtualKeyboardEnabled(!1);}),t.addEventListener("blur",()=>this.__setVirtualKeyboardEnabled(!0)),t.addEventListener("touchstart",()=>this.__setVirtualKeyboardEnabled(!0));}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none");}};/**
|
|
4213
4213
|
* @license
|
|
4214
4214
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4215
4215
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4216
|
-
*/const Bc=s=>class extends jt(se($t(Xs(_e(s))))){static get properties(){return {_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(e){const i=String(e.year).replace(/\d+/u,o=>"0000".substr(o.length)+o);return [e.month+1,e.day,i].join("/")},parseDate(e){const i=e.split("/"),o=new Date;let r,n=o.getMonth(),a=o.getFullYear();if(i.length===3){if(n=parseInt(i[0])-1,r=parseInt(i[1]),a=parseInt(i[2]),i[2].length<3&&a>=0){const l=this.referenceDate?Fe(this.referenceDate):new Date;a=sc(l,a,n,r);}}else i.length===2?(n=parseInt(i[0])-1,r=parseInt(i[1])):i.length===1&&(r=parseInt(i[0]));if(r!==void 0)return {day:r,month:n,year:a}},formatTitle:(e,i)=>`${e} ${i}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:$s},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return ["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return [...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this);}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(e){super._inputElementValue=e,this._hasInputValue=!1;}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return !this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(e){super._onFocus(e),this._noInput&&!Rt()&&e.target.blur();}_onBlur(e){super._onBlur(e),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate());}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Ks(this._fullscreenMediaQuery,i=>{this._fullscreen=i;})),this.addController(new Hn(this));const e=this.$.overlay;this._overlayElement=e,e.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",()=>this.__bringToFront()),this.addEventListener("touchstart",()=>this.__bringToFront());}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1;}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.$.overlay.close();}_overlayRenderer(e){if(e.firstChild)return;const i=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(i),this._overlayContent=i,i.addEventListener("close",()=>{this._close();}),i.addEventListener("focus-input",this._focusAndSelect.bind(this)),i.addEventListener("date-tap",o=>{this.__commitDate(o.detail.date),this._close();}),i.addEventListener("date-selected",o=>{this.__commitDate(o.detail.date);}),i.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0);}),i.addEventListener("focusout",o=>{this._shouldRemoveFocus(o)&&this._setFocused(!1);}),i.addEventListener("focused-date-changed",o=>{this._focusedDate=o.detail.value;}),i.addEventListener("click",o=>o.stopPropagation());}__parseDate(e){if(!this.i18n.parseDate)return;let i=this.i18n.parseDate(e);if(i&&(i=Fe(`${i.year}-${i.month+1}-${i.day}`)),i&&!isNaN(i.getTime()))return i}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(Ws(e))}checkValidity(){const e=this._inputElementValue,i=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),o=!this._selectedDate||Ae(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let r=!0;return this.inputElement&&(this.inputElement.checkValidity?r=this.inputElement.checkValidity():this.inputElement.validate&&(r=this.inputElement.validate())),i&&o&&r}_shouldSetFocus(e){return !this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:i}=e;return this.opened&&i!==null&&i!==document.body&&!this.contains(i)&&!this._overlayContent.contains(i)?!0:!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive;}__commitValueChange(){const e=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e;}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange();}_close(){this._focus(),this.close();}__bringToFront(){requestAnimationFrame(()=>{this.$.overlay.bringToFront();});}_isNoInput(e,i,o,r,n,a){return !e||i&&(!a||n)||o&&n||!r.parseDate}_formatISO(e){return rc(e)}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate));}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e);}_selectedDateChanged(e,i){e===void 0||i===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1);}_focusedDateChanged(e,i){e===void 0||i===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e);}_valueChanged(e,i){const o=Fe(e);if(e&&!o){this.value=i;return}e?G(this._selectedDate,o)||(this._selectedDate=o,i!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue);}__updateOverlayContent(e,i,o,r,n,a,l,d,h){e&&(e.i18n=i,e.label=o,e.minDate=r,e.maxDate=n,e.focusedDate=a,e.selectedDate=l,e.showWeekNumbers=d,e.isDateDisabled=h);}__updateOverlayContentTheme(e,i){e&&(i?e.setAttribute("theme",i):e.removeAttribute("theme"));}__updateOverlayContentFullScreen(e,i){e&&e.toggleAttribute("fullscreen",i);}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1;}_onOverlayOpened(){const e=this._overlayContent;e.reset();const i=this._getInitialPosition();e.initialPosition=i;const o=e.focusedDate||i;e.scrollToDate(o),this._ignoreFocusedDateChange=!0,e.focusedDate=o,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement());const n=this._noInput?e:[r,e];this.__showOthers=kn(n);}_getInitialPosition(){const e=Fe(this.initialPosition),i=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||Ae(i,this._minDate,this._maxDate,this.isDateDisabled)?i:this._minDate||this._maxDate?Dn(i,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",i=this.__parseDate(e);i?this.__commitDate(i):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1);}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1;}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate();}_onScroll(e){(e.target===window||!this._overlayContent.contains(e.target))&&this._overlayContent._repositionYearScroller();}_focus(){this._noInput||this.inputElement.focus();}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length);}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):"";}_setSelectionRange(e,i){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,i);}_onChange(e){e.stopPropagation();}_onClick(e){this._isClearButton(e)||this._onHostClick(e);}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open());}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null);}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&[9].indexOf(e.keyCode)===-1&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement());break}}_onEnter(e){this.opened?this.close():this.__commitParsedOrFocusedDate();}_onEscape(e){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}this.inputElement.value===""?this.__commitDate(null):this._applyInputValue(this._selectedDate);}}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,G(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1);}}__computeMinOrMaxDate(e){return Fe(e)}};/**
|
|
4216
|
+
*/const $c=s=>class extends Yt(oe(Ht(Xs(me(s))))){static get properties(){return {_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(e){const i=String(e.year).replace(/\d+/u,o=>"0000".substr(o.length)+o);return [e.month+1,e.day,i].join("/")},parseDate(e){const i=e.split("/"),o=new Date;let r,n=o.getMonth(),a=o.getFullYear();if(i.length===3){if(n=parseInt(i[0])-1,r=parseInt(i[1]),a=parseInt(i[2]),i[2].length<3&&a>=0){const l=this.referenceDate?Be(this.referenceDate):new Date;a=rc(l,a,n,r);}}else i.length===2?(n=parseInt(i[0])-1,r=parseInt(i[1])):i.length===1&&(r=parseInt(i[0]));if(r!==void 0)return {day:r,month:n,year:a}},formatTitle:(e,i)=>`${e} ${i}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:$s},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return ["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return [...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this);}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(e){super._inputElementValue=e,this._hasInputValue=!1;}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return !this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(e){super._onFocus(e),this._noInput&&!$t()&&e.target.blur();}_onBlur(e){super._onBlur(e),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate());}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Ks(this._fullscreenMediaQuery,i=>{this._fullscreen=i;})),this.addController(new qn(this));const e=this.$.overlay;this._overlayElement=e,e.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",()=>this.__bringToFront()),this.addEventListener("touchstart",()=>this.__bringToFront());}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1;}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.$.overlay.close();}_overlayRenderer(e){if(e.firstChild)return;const i=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(i),this._overlayContent=i,i.addEventListener("close",()=>{this._close();}),i.addEventListener("focus-input",this._focusAndSelect.bind(this)),i.addEventListener("date-tap",o=>{this.__commitDate(o.detail.date),this._close();}),i.addEventListener("date-selected",o=>{this.__commitDate(o.detail.date);}),i.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0);}),i.addEventListener("focusout",o=>{this._shouldRemoveFocus(o)&&this._setFocused(!1);}),i.addEventListener("focused-date-changed",o=>{this._focusedDate=o.detail.value;}),i.addEventListener("click",o=>o.stopPropagation());}__parseDate(e){if(!this.i18n.parseDate)return;let i=this.i18n.parseDate(e);if(i&&(i=Be(`${i.year}-${i.month+1}-${i.day}`)),i&&!isNaN(i.getTime()))return i}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(Ws(e))}checkValidity(){const e=this._inputElementValue,i=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),o=!this._selectedDate||Ee(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let r=!0;return this.inputElement&&(this.inputElement.checkValidity?r=this.inputElement.checkValidity():this.inputElement.validate&&(r=this.inputElement.validate())),i&&o&&r}_shouldSetFocus(e){return !this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:i}=e;return this.opened&&i!==null&&i!==document.body&&!this.contains(i)&&!this._overlayContent.contains(i)?!0:!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive;}__commitValueChange(){const e=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e;}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange();}_close(){this._focus(),this.close();}__bringToFront(){requestAnimationFrame(()=>{this.$.overlay.bringToFront();});}_isNoInput(e,i,o,r,n,a){return !e||i&&(!a||n)||o&&n||!r.parseDate}_formatISO(e){return ac(e)}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate));}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e);}_selectedDateChanged(e,i){e===void 0||i===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1);}_focusedDateChanged(e,i){e===void 0||i===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e);}_valueChanged(e,i){const o=Be(e);if(e&&!o){this.value=i;return}e?K(this._selectedDate,o)||(this._selectedDate=o,i!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue);}__updateOverlayContent(e,i,o,r,n,a,l,d,h){e&&(e.i18n=i,e.label=o,e.minDate=r,e.maxDate=n,e.focusedDate=a,e.selectedDate=l,e.showWeekNumbers=d,e.isDateDisabled=h);}__updateOverlayContentTheme(e,i){e&&(i?e.setAttribute("theme",i):e.removeAttribute("theme"));}__updateOverlayContentFullScreen(e,i){e&&e.toggleAttribute("fullscreen",i);}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1;}_onOverlayOpened(){const e=this._overlayContent;e.reset();const i=this._getInitialPosition();e.initialPosition=i;const o=e.focusedDate||i;e.scrollToDate(o),this._ignoreFocusedDateChange=!0,e.focusedDate=o,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement());const n=this._noInput?e:[r,e];this.__showOthers=Tn(n);}_getInitialPosition(){const e=Be(this.initialPosition),i=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||Ee(i,this._minDate,this._maxDate,this.isDateDisabled)?i:this._minDate||this._maxDate?zn(i,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",i=this.__parseDate(e);i?this.__commitDate(i):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1);}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1;}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate();}_onScroll(e){(e.target===window||!this._overlayContent.contains(e.target))&&this._overlayContent._repositionYearScroller();}_focus(){this._noInput||this.inputElement.focus();}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length);}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):"";}_setSelectionRange(e,i){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,i);}_onChange(e){e.stopPropagation();}_onClick(e){this._isClearButton(e)||this._onHostClick(e);}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open());}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null);}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&[9].indexOf(e.keyCode)===-1&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement());break}}_onEnter(e){this.opened?this.close():this.__commitParsedOrFocusedDate();}_onEscape(e){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}this.inputElement.value===""?this.__commitDate(null):this._applyInputValue(this._selectedDate);}}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,K(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1);}}__computeMinOrMaxDate(e){return Be(e)}};/**
|
|
4217
4217
|
* @license
|
|
4218
4218
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4219
4219
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4220
|
-
*/const
|
|
4220
|
+
*/const Hc=p`
|
|
4221
4221
|
:host([opened]) {
|
|
4222
4222
|
pointer-events: auto;
|
|
4223
4223
|
}
|
|
@@ -4234,7 +4234,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4234
4234
|
* @license
|
|
4235
4235
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4236
4236
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4237
|
-
*/f("vaadin-date-picker",[Qs,
|
|
4237
|
+
*/f("vaadin-date-picker",[Qs,Hc],{moduleId:"vaadin-date-picker-styles"});class qc extends $c(Js(E(X(y)))){static get is(){return "vaadin-date-picker"}static get template(){return b`
|
|
4238
4238
|
<div class="vaadin-date-picker-container">
|
|
4239
4239
|
<div part="label">
|
|
4240
4240
|
<slot name="label"></slot>
|
|
@@ -4276,23 +4276,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4276
4276
|
></vaadin-date-picker-overlay>
|
|
4277
4277
|
|
|
4278
4278
|
<slot name="tooltip"></slot>
|
|
4279
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;},{uniqueIdPrefix:"search-input"})),this.addController(new
|
|
4279
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;},{uniqueIdPrefix:"search-input"})),this.addController(new Wt(this.inputElement,this._labelController)),this._tooltipController=new _e(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",e=>e.preventDefault()),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this));}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault();}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open();}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0;}}x(qc);/**
|
|
4280
4280
|
* @license
|
|
4281
4281
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4282
4282
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4283
|
-
*/f("vaadin-text-field",
|
|
4283
|
+
*/f("vaadin-text-field",Pe,{moduleId:"lumo-text-field-styles"});/**
|
|
4284
4284
|
* @license
|
|
4285
4285
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4286
4286
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4287
|
-
*/const
|
|
4287
|
+
*/const Uc=s=>class extends Js(s){static get properties(){return {autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return [...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(e){this.__dataValue=e;}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.value&&e.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),e.value=""),this.value&&(e.value=this.value));}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}_onInput(e){super._onInput(e),this.invalid&&this.validate();}_valueChanged(e,i){super._valueChanged(e,i),i!==void 0&&this.invalid&&this.validate();}};/**
|
|
4288
4288
|
* @license
|
|
4289
4289
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4290
4290
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4291
|
-
*/const
|
|
4291
|
+
*/const Wc=s=>class extends Uc(s){static get properties(){return {maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return [...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return [...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text");}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new Wt(this.inputElement,this._labelController));}};/**
|
|
4292
4292
|
* @license
|
|
4293
4293
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4294
4294
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4295
|
-
*/f("vaadin-text-field",Qs,{moduleId:"vaadin-text-field-styles"});class Un extends
|
|
4295
|
+
*/f("vaadin-text-field",Qs,{moduleId:"vaadin-text-field-styles"});class Un extends Wc(E(X(y))){static get is(){return "vaadin-text-field"}static get template(){return b`
|
|
4296
4296
|
<div class="vaadin-field-container">
|
|
4297
4297
|
<div part="label">
|
|
4298
4298
|
<slot name="label"></slot>
|
|
@@ -4321,11 +4321,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4321
4321
|
</div>
|
|
4322
4322
|
</div>
|
|
4323
4323
|
<slot name="tooltip"></slot>
|
|
4324
|
-
`}static get properties(){return {maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new
|
|
4324
|
+
`}static get properties(){return {maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new _e(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}x(Un);/**
|
|
4325
4325
|
* @license
|
|
4326
4326
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4327
4327
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4328
|
-
*/const
|
|
4328
|
+
*/const jc=p`
|
|
4329
4329
|
:host {
|
|
4330
4330
|
position: absolute;
|
|
4331
4331
|
right: 0;
|
|
@@ -4338,11 +4338,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4338
4338
|
background: transparent;
|
|
4339
4339
|
outline: none;
|
|
4340
4340
|
}
|
|
4341
|
-
`;f("vaadin-password-field-button",[In,
|
|
4341
|
+
`;f("vaadin-password-field-button",[In,jc],{moduleId:"lumo-password-field-button"});/**
|
|
4342
4342
|
* @license
|
|
4343
4343
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4344
4344
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4345
|
-
*/const
|
|
4345
|
+
*/const Yc=p`
|
|
4346
4346
|
[part='reveal-button']::before {
|
|
4347
4347
|
content: var(--lumo-icons-eye);
|
|
4348
4348
|
}
|
|
@@ -4360,27 +4360,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4360
4360
|
[part='reveal-button'][hidden] {
|
|
4361
4361
|
display: none !important;
|
|
4362
4362
|
}
|
|
4363
|
-
`;f("vaadin-password-field",[
|
|
4363
|
+
`;f("vaadin-password-field",[Pe,Yc],{moduleId:"lumo-password-field"});/**
|
|
4364
4364
|
* @license
|
|
4365
4365
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4366
4366
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4367
|
-
*/f("vaadin-password-field-button",
|
|
4367
|
+
*/f("vaadin-password-field-button",Dn,{moduleId:"vaadin-password-field-button-styles"});class Gc extends Us($(E(y))){static get is(){return "vaadin-password-field-button"}static get template(){return b``}}x(Gc);/**
|
|
4368
4368
|
* @license
|
|
4369
4369
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4370
4370
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4371
|
-
*/const
|
|
4371
|
+
*/const Kc=s=>class extends Rn(Te(fe(at(s)))){static get properties(){return {revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return ["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange="";}get slotStyles(){const e=this.localName;return [...super.slotStyles,`
|
|
4372
4372
|
${e} [slot="input"]::-ms-reveal {
|
|
4373
4373
|
display: none;
|
|
4374
4374
|
}
|
|
4375
|
-
`]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new
|
|
4375
|
+
`]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new G(this,"reveal","vaadin-password-field-button",{initializer:e=>{e.disabled=this.disabled,e.addEventListener("click",this.__boundRevealButtonClick),e.addEventListener("mousedown",this.__boundRevealButtonMouseDown);}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off");}_onChange(e){super._onChange(e),this.__lastChange=this.inputElement.value;}_shouldSetFocus(e){return e.target===this.inputElement||e.target===this._revealNode}_shouldRemoveFocus(e){return !(e.relatedTarget===this._revealNode||e.relatedTarget===this.inputElement&&e.target===this._revealNode)}_setFocused(e){if(super._setFocused(e),!e)this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})));else {const i=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!i);}}__updateAriaLabel(e){e&&e.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",e.reveal);}__i18nChanged(e){this.__updateAriaLabel(e);}_revealButtonHiddenChanged(e){this._toggleRevealHidden(e);}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible);}_onRevealButtonClick(){this._togglePasswordVisibility();}_onRevealButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_toggleRevealHidden(e){this._revealNode&&(e?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")));}_updateToggleState(e){this._revealNode&&this._revealNode.setAttribute("aria-pressed",e?"true":"false");}_passwordVisibleChanged(e){this._setType(e?"text":"password"),this._updateToggleState(e);}_disabledChanged(e,i){super._disabledChanged(e,i),this._revealNode&&(this._revealNode.disabled=e);}};/**
|
|
4376
4376
|
* @license
|
|
4377
4377
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4378
4378
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4379
|
-
*/const
|
|
4379
|
+
*/const Xc=b`
|
|
4380
4380
|
<div part="reveal-button" slot="suffix">
|
|
4381
4381
|
<slot name="reveal"></slot>
|
|
4382
4382
|
</div>
|
|
4383
|
-
`;let
|
|
4383
|
+
`;let pt;class Jc extends Kc(Un){static get is(){return "vaadin-password-field"}static get template(){if(!pt){pt=super.template.cloneNode(!0);const t=Xc.content.querySelector('[part="reveal-button"]');pt.content.querySelector('[part="input-field"]').appendChild(t);}return pt}}x(Jc);const Zs=p`
|
|
4384
4384
|
:host {
|
|
4385
4385
|
display: flex;
|
|
4386
4386
|
align-items: center;
|
|
@@ -4464,7 +4464,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4464
4464
|
width: var(--lumo-icon-size-m);
|
|
4465
4465
|
height: var(--lumo-icon-size-m);
|
|
4466
4466
|
}
|
|
4467
|
-
`;f("vaadin-item",Zs,{moduleId:"lumo-item"});const
|
|
4467
|
+
`;f("vaadin-item",Zs,{moduleId:"lumo-item"});const Qc=p`
|
|
4468
4468
|
:host {
|
|
4469
4469
|
transition: background-color 100ms;
|
|
4470
4470
|
overflow: hidden;
|
|
@@ -4476,11 +4476,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4476
4476
|
:host([focused]:not([disabled])) {
|
|
4477
4477
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
4478
4478
|
}
|
|
4479
|
-
`;f("vaadin-combo-box-item",[Zs,
|
|
4479
|
+
`;f("vaadin-combo-box-item",[Zs,Qc],{moduleId:"lumo-combo-box-item"});/**
|
|
4480
4480
|
* @license
|
|
4481
4481
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
4482
4482
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4483
|
-
*/const
|
|
4483
|
+
*/const Zc=p`
|
|
4484
4484
|
[part~='loader'] {
|
|
4485
4485
|
box-sizing: border-box;
|
|
4486
4486
|
width: var(--lumo-icon-size-s);
|
|
@@ -4522,7 +4522,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4522
4522
|
transform: rotate(360deg);
|
|
4523
4523
|
}
|
|
4524
4524
|
}
|
|
4525
|
-
`,
|
|
4525
|
+
`,eu=p`
|
|
4526
4526
|
[part='content'] {
|
|
4527
4527
|
padding: 0;
|
|
4528
4528
|
}
|
|
@@ -4543,7 +4543,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4543
4543
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
4544
4544
|
margin-bottom: var(--lumo-space-xs);
|
|
4545
4545
|
}
|
|
4546
|
-
`,
|
|
4546
|
+
`,tu=p`
|
|
4547
4547
|
[part~='loader'] {
|
|
4548
4548
|
position: absolute;
|
|
4549
4549
|
z-index: 1;
|
|
@@ -4551,24 +4551,24 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4551
4551
|
top: var(--lumo-space-s);
|
|
4552
4552
|
margin-inline: auto 0;
|
|
4553
4553
|
}
|
|
4554
|
-
`;f("vaadin-combo-box-overlay",[
|
|
4554
|
+
`;f("vaadin-combo-box-overlay",[Vs,Fs,eu,Zc,tu,p`
|
|
4555
4555
|
:host {
|
|
4556
4556
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
4557
4557
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
4558
4558
|
}
|
|
4559
|
-
`],{moduleId:"lumo-combo-box-overlay"});const
|
|
4559
|
+
`],{moduleId:"lumo-combo-box-overlay"});const iu=p`
|
|
4560
4560
|
[part='toggle-button']::before {
|
|
4561
4561
|
content: var(--lumo-icons-dropdown);
|
|
4562
4562
|
}
|
|
4563
|
-
`;f("vaadin-combo-box",[
|
|
4563
|
+
`;f("vaadin-combo-box",[Pe,iu],{moduleId:"lumo-combo-box"});/**
|
|
4564
4564
|
* @license
|
|
4565
4565
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4566
4566
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4567
|
-
*/const
|
|
4567
|
+
*/const su=s=>class extends s{static get properties(){return {index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return ["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return [...super.observedAttributes,"hidden"]}attributeChangedCallback(e,i,o){e==="hidden"&&o!==null?this.index=void 0:super.attributeChangedCallback(e,i,o);}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const e=this._owner.getAttribute("dir");e&&this.setAttribute("dir",e);}requestContentUpdate(){if(!this.renderer||this.hidden)return;const e={index:this.index,item:this.item,focused:this.focused,selected:this.selected};this.renderer(this,this._owner,e);}__rendererOrItemChanged(e,i,o){o===void 0||i===void 0||(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()));}__updateLabel(e,i){i||(this.textContent=e);}};/**
|
|
4568
4568
|
* @license
|
|
4569
4569
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4570
4570
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4571
|
-
*/class
|
|
4571
|
+
*/class ou extends su(E($(y))){static get template(){return b`
|
|
4572
4572
|
<style>
|
|
4573
4573
|
:host {
|
|
4574
4574
|
display: block;
|
|
@@ -4582,15 +4582,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4582
4582
|
<div part="content">
|
|
4583
4583
|
<slot></slot>
|
|
4584
4584
|
</div>
|
|
4585
|
-
`}static get is(){return "vaadin-combo-box-item"}}
|
|
4585
|
+
`}static get is(){return "vaadin-combo-box-item"}}x(ou);/**
|
|
4586
4586
|
* @license
|
|
4587
4587
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4588
4588
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4589
|
-
*/const
|
|
4589
|
+
*/const ru=s=>class extends qs(s){static get observers(){return ["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200;}connectedCallback(){super.connectedCallback();const e=this._comboBox,i=e&&e.getAttribute("dir");i&&this.setAttribute("dir",i);}_shouldCloseOnOutsideClick(e){const i=e.composedPath();return !i.includes(this.positionTarget)&&!i.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!Ps(e.composedPath()[0])&&e.preventDefault();}_updateOverlayWidth(){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${this.positionTarget.clientWidth}px`);const i=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);i===""?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,i);}_setOverlayWidth(e,i){e&&i&&(this._updateOverlayWidth(),this._updatePosition());}};/**
|
|
4590
4590
|
* @license
|
|
4591
4591
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4592
4592
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4593
|
-
*/const
|
|
4593
|
+
*/const nu=p`
|
|
4594
4594
|
#overlay {
|
|
4595
4595
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
4596
4596
|
}
|
|
@@ -4600,17 +4600,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4600
4600
|
flex-direction: column;
|
|
4601
4601
|
height: 100%;
|
|
4602
4602
|
}
|
|
4603
|
-
`;f("vaadin-combo-box-overlay",[
|
|
4603
|
+
`;f("vaadin-combo-box-overlay",[Rs,nu],{moduleId:"vaadin-combo-box-overlay-styles"});class au extends ru(Hs($(E(y)))){static get is(){return "vaadin-combo-box-overlay"}static get template(){return b`
|
|
4604
4604
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
4605
4605
|
<div part="overlay" id="overlay">
|
|
4606
4606
|
<div part="loader"></div>
|
|
4607
4607
|
<div part="content" id="content"><slot></slot></div>
|
|
4608
4608
|
</div>
|
|
4609
|
-
`}}
|
|
4609
|
+
`}}x(au);/**
|
|
4610
4610
|
* @license
|
|
4611
4611
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
4612
4612
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4613
|
-
*/function
|
|
4613
|
+
*/function Ot(s,t){return s.split(".").reduce((e,i)=>e?e[i]:void 0,t)}/**
|
|
4614
4614
|
* @license
|
|
4615
4615
|
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
4616
4616
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4618,23 +4618,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4618
4618
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4619
4619
|
* Code distributed by Google as part of the polymer project is also
|
|
4620
4620
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4621
|
-
*/const tr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),
|
|
4621
|
+
*/const tr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),lu=tr&&tr[1]>=8,ir=3,du={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){const s=this._virtualCount;return Math.max(0,s-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(s){s=this._clamp(s,0,this._maxVirtualStart),this._virtualStartVal=s;},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(s){s%=this._physicalCount,s<0&&(s=this._physicalCount+s),this._physicalStartVal=s;},get _physicalEnd(){return (this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(s){this._physicalCountVal=s;},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return !!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let s=this._firstVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;s=this._iterateItems((e,i)=>{if(t+=this._getPhysicalSizeIncrement(e),t>this._scrollPosition)return i})||0,this._firstVisibleIndexVal=s;}return s},get lastVisibleIndex(){let s=this._lastVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;this._iterateItems((e,i)=>{t<this._scrollBottom&&(s=i),t+=this._getPhysicalSizeIncrement(e);}),this._lastVisibleIndexVal=s;}return s},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const s=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let t=s-this._scrollPosition;const e=t>=0;if(this._scrollPosition=s,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;const i=Math.round(t/this._physicalAverage);this._virtualStart+=i,this._physicalStart+=i,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update();}else if(this._physicalCount>0){const i=this._getReusables(e);e?(this._physicalTop=i.physicalTop,this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length):(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length),this._update(i.indexes,e?null:i.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),Tt);}},_getReusables(s){let t,e,i;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;const h=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(s?(t=this._physicalStart,e=c-d):(t=this._physicalEnd,e=h-u);i=this._getPhysicalSizeIncrement(t),e-=i,!(o.length>=l||e<=r);)if(s){if(a+o.length+1>=this._virtualCount||d+i>=c-this._scrollOffset)break;o.push(t),d+=i,t=(t+1)%l;}else {if(n-o.length<=0||d+this._physicalSize-i<=u)break;o.push(t),d-=i,t=t===0?l-1:t-1;}return {indexes:o,physicalTop:d-this._scrollOffset}},_update(s,t){if(!(s&&s.length===0||this._physicalCount===0)){if(this._assignModels(s),this._updateMetrics(s),t)for(;t.length;){const e=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e);}this._positionItems(),this._updateScrollerSize();}},_isClientFull(){return this._scrollBottom!==0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(s){const e=this._clamp(this._physicalCount+s,ir,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(this._physicalCount*.5);if(!(e<0)){if(e>0){const o=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let r=0;r<e;r++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-o)/e,i=Math.round(this._physicalCount*.5);}this._virtualEnd>=this._virtualCount-1||i===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),dn):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Tt));}},_render(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){const s=this._getReusables(!0);this._physicalTop=s.physicalTop,this._virtualStart+=s.indexes.length,this._physicalStart+=s.indexes.length,this._update(s.indexes),this._update(),this._increasePoolIfNeeded(0);}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(ir));},_itemsChanged(s){s.path==="items"&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,tt));},_iterateItems(s,t){let e,i,o,r;if(arguments.length===2&&t){for(r=0;r<t.length;r++)if(e=t[r],i=this._computeVidx(e),(o=s.call(this,e,i))!=null)return o}else {for(e=this._physicalStart,i=this._virtualStart;e<this._physicalCount;e++,i++)if((o=s.call(this,e,i))!=null)return o;for(e=0;e<this._physicalStart;e++,i++)if((o=s.call(this,e,i))!=null)return o}},_computeVidx(s){return s>=this._physicalStart?this._virtualStart+(s-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+s},_positionItems(){this._adjustScrollPosition();let s=this._physicalTop;this._iterateItems(t=>{this.translate3d(0,`${s}px`,0,this._physicalItems[t]),s+=this._physicalSizes[t];});},_getPhysicalSizeIncrement(s){return this._physicalSizes[s]},_adjustScrollPosition(){const s=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(s!==0){this._physicalTop-=s;const t=this._scrollPosition;!lu&&t>0&&this._resetScrollPosition(t-s);}},_resetScrollPosition(s){this.scrollTarget&&s>=0&&(this._scrollTop=s,this._scrollPosition=this._scrollTop);},_updateScrollerSize(s){const t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(s||this._scrollHeight===0||this._scrollPosition>=t-this._physicalSize||Math.abs(t-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${t}px`,this._scrollHeight=t);},scrollToIndex(s){if(typeof s!="number"||s<0||s>this.items.length-1||(He(),this._physicalCount===0))return;s=this._clamp(s,0,this._virtualCount-1),(!this._isIndexRendered(s)||s>=this._maxVirtualStart)&&(this._virtualStart=s-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,e=this._virtualStart,i=0;const o=this._hiddenContentSize;for(;e<s&&i<=o;)i+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,e+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+i),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null;},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0;},_resizeHandler(){this._debounce("_render",()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1);},tt);},_isIndexRendered(s){return s>=this._virtualStart&&s<=this._virtualEnd},_getPhysicalIndex(s){return (this._physicalStart+(s-this._virtualStart))%this._physicalCount},_clamp(s,t,e){return Math.min(e,Math.max(t,s))},_debounce(s,t,e){this._debouncers||(this._debouncers={}),this._debouncers[s]=z.debounce(this._debouncers[s],e,t.bind(this)),hn(this._debouncers[s]);}};/**
|
|
4622
4622
|
* @license
|
|
4623
4623
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4624
4624
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4625
|
-
*/const lu=1e5,gi=1e3;let qn=class{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<gi?(i=t,this._vidxOffset=0):(i=gi,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),$e(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){$e();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=z.debounce(this.__placeholderClearDebouncer,et,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),$e(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),$e(),this._debounce("_update",this._update,kt);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,lu)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=z.debounce(this.__fixInvalidItemPositioningDebouncer,ee.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=z.debounce(this.__scrollReorderDebouncer,ee.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=z.debounce(this.__debouncerWheelAnimationFrame,et,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=z.debounce(this._debouncerIgnoreNewWheel,ee.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(Hh){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=gi,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}};Object.setPrototypeOf(qn.prototype,au);let du=class{constructor(t){this.__adapter=new qn(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}};/**
|
|
4625
|
+
*/const hu=1e5,bi=1e3;let Wn=class{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<bi?(i=t,this._vidxOffset=0):(i=bi,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),He(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){He();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=z.debounce(this.__placeholderClearDebouncer,tt,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),He(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),He(),this._debounce("_update",this._update,Tt);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,hu)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=z.debounce(this.__fixInvalidItemPositioningDebouncer,te.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=z.debounce(this.__scrollReorderDebouncer,te.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=z.debounce(this.__debouncerWheelAnimationFrame,tt,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=z.debounce(this._debouncerIgnoreNewWheel,te.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(Uh){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=bi,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}};Object.setPrototypeOf(Wn.prototype,du);let cu=class{constructor(t){this.__adapter=new Wn(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}};/**
|
|
4626
4626
|
* @license
|
|
4627
4627
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4628
4628
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4629
|
-
*/const
|
|
4629
|
+
*/const Se=class{toString(){return ""}};/**
|
|
4630
4630
|
* @license
|
|
4631
4631
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4632
4632
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4633
|
-
*/const
|
|
4633
|
+
*/const uu=s=>class extends s{static get properties(){return {items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this);}get _viewportTotalPaddingBottom(){if(this._cachedViewportTotalPaddingBottom===void 0){const e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(i=>parseInt(i,10)).reduce((i,o)=>i+o);}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Rt()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling();}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update());}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;const i=this._visibleItemsCount();let o=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),o=e-i+1):e>this.__virtualizer.firstVisibleIndex&&(o=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,o));const r=[...this.children].find(d=>!d.hidden&&d.index===this.__virtualizer.lastVisibleIndex);if(!r||e!==r.index)return;const n=r.getBoundingClientRect(),a=this.getBoundingClientRect(),l=n.bottom-a.bottom+this._viewportTotalPaddingBottom;l>0&&(this.scrollTop+=l);}_isItemSelected(e,i,o){return e instanceof Se?!1:o&&e!==void 0&&i!==void 0?Ot(o,e)===Ot(o,i):e===i}__initVirtualizer(){this.__virtualizer=new cu({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0});}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate();}__loadingChanged(){this.requestContentUpdate();}__openedChanged(e){e&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate());}__selectedItemChanged(){this.requestContentUpdate();}__itemClassNameGeneratorChanged(e,i){(e||i)&&this.requestContentUpdate();}__focusedIndexChanged(e,i){e!==i&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e);}__rendererChanged(e,i){(e||i)&&this.requestContentUpdate();}__createElements(e){return [...Array(e)].map(()=>{const i=document.createElement(`${this.__hostTagName}-item`);return i.addEventListener("click",this.__boundOnItemClick),i.tabIndex="-1",i.style.width="100%",i})}_updateElement(e,i){const o=this.items[i],r=this.focusedIndex,n=this._isItemSelected(o,this.selectedItem,this.itemIdPath);e.setProperties({item:o,index:i,label:this.getItemLabel(o),selected:n,renderer:this.renderer,focused:!this.loading&&r===i}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(o):e.className!==""&&(e.className=""),e.performUpdate&&!e.hasUpdated&&e.performUpdate(),e.id=`${this.__hostTagName}-item-${i}`,e.setAttribute("role",i!==void 0?"option":!1),e.setAttribute("aria-selected",n.toString()),e.setAttribute("aria-posinset",i+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),o instanceof Se&&this.__requestItemByIndex(i);}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}));}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{const i=this.scrollTop===0,o=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(i&&e.deltaY<0||o&&e.deltaY>0)&&e.preventDefault();});}__requestItemByIndex(e){requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}));});}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}};/**
|
|
4634
4634
|
* @license
|
|
4635
4635
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4636
4636
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4637
|
-
*/class
|
|
4637
|
+
*/class pu extends uu(y){static get is(){return "vaadin-combo-box-scroller"}static get template(){return b`
|
|
4638
4638
|
<style>
|
|
4639
4639
|
:host {
|
|
4640
4640
|
display: block;
|
|
@@ -4661,27 +4661,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4661
4661
|
<div id="selector">
|
|
4662
4662
|
<slot></slot>
|
|
4663
4663
|
</div>
|
|
4664
|
-
`}}
|
|
4664
|
+
`}}x(pu);/**
|
|
4665
4665
|
* @license
|
|
4666
4666
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4667
4667
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4668
|
-
*/const
|
|
4668
|
+
*/const _u=s=>class extends Xs(s){static get properties(){return {pattern:{type:String}}}static get delegateAttrs(){return [...super.delegateAttrs,"pattern"]}static get constraints(){return [...super.constraints,"pattern"]}};/**
|
|
4669
4669
|
* @license
|
|
4670
4670
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4671
4671
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4672
|
-
*/function
|
|
4672
|
+
*/function Dt(s,t,e=0){let i=t;for(const o of s.subCaches){const r=o.parentCacheIndex;if(i<=r)break;if(i<=r+o.flatSize)return Dt(o,i-r-1,e+1);i-=o.flatSize;}return {cache:s,item:s.items[i],index:i,page:Math.floor(i/s.pageSize),level:e}}function jn({getItemId:s},t,e,i=0,o=0){for(let r=0;r<t.items.length;r++){const n=t.items[r];if(n&&s(n)===s(e))return {cache:t,level:i,item:n,index:r,page:Math.floor(r/t.pageSize),subCache:t.getSubCache(r),flatIndex:o+t.getFlatIndex(r)}}for(const r of t.subCaches){const n=o+t.getFlatIndex(r.parentCacheIndex),a=jn({getItemId:s},r,e,i+1,n+1);if(a)return a}}function Yn(s,[t,...e],i=0){t===1/0&&(t=s.size-1);const o=s.getFlatIndex(t),r=s.getSubCache(t);return r&&r.flatSize>0&&e.length?Yn(r,e,i+o+1):i+o}/**
|
|
4673
4673
|
* @license
|
|
4674
4674
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4675
4675
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4676
|
-
*/let
|
|
4676
|
+
*/let mu=class Gn{constructor(t,e,i,o,r){v(this,"context");v(this,"pageSize");v(this,"items",[]);v(this,"pendingRequests",{});v(this,"__subCacheByIndex",{});v(this,"__size",0);v(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,this.__flatSize=i||0;}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(t=>t.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var i;if(this.__size!==t){if(this.__size=t,this.context.placeholder!==void 0){this.items.length=t||0;for(let o=0;o<t;o++)(i=this.items)[o]||(i[o]=this.context.placeholder);}Object.keys(this.pendingRequests).forEach(o=>{parseInt(o)*this.pageSize>=this.size&&delete this.pendingRequests[o];});}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce((t,e)=>(e.recalculateFlatSize(),t+e.flatSize),0):0;}setPage(t,e){const i=t*this.pageSize;e.forEach((o,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=o);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new Gn(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce((i,o)=>{const r=o.parentCacheIndex;return e>r?i+o.flatSize:i},e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=Dt(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=Dt(this,t);return {cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize();}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0);}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex}};/**
|
|
4677
4677
|
* @license
|
|
4678
4678
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4679
4679
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4680
|
-
*/let
|
|
4680
|
+
*/let fu=class extends EventTarget{constructor(e,{size:i,pageSize:o,isExpanded:r,getItemId:n,isPlaceholder:a,placeholder:l,dataProvider:d,dataProviderParams:h}){super();v(this,"host");v(this,"dataProvider");v(this,"dataProviderParams");v(this,"pageSize");v(this,"isExpanded");v(this,"getItemId");v(this,"rootCache");v(this,"placeholder");v(this,"isPlaceholder");this.host=e,this.pageSize=o,this.getItemId=n,this.isExpanded=r,this.placeholder=l,this.isPlaceholder=a,this.dataProvider=d,this.dataProviderParams=h,this.rootCache=this.__createRootCache(i);}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return {isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(e){this.pageSize=e,this.clearCache();}setDataProvider(e){this.dataProvider=e,this.clearCache();}recalculateFlatSize(){this.rootCache.recalculateFlatSize();}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size);}getFlatIndexContext(e){return Dt(this.rootCache,e)}getItemContext(e){return jn({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return Yn(this.rootCache,e)}ensureFlatIndexLoaded(e){const{cache:i,page:o,item:r}=this.getFlatIndexContext(e);this.__isItemLoaded(r)||this.__loadCachePage(i,o);}ensureFlatIndexHierarchy(e){const{cache:i,item:o,index:r}=this.getFlatIndexContext(e);if(this.__isItemLoaded(o)&&this.isExpanded(o)&&!i.getSubCache(r)){const n=i.createSubCache(r);this.__loadCachePage(n,0);}}loadFirstPage(){this.__loadCachePage(this.rootCache,0);}__createRootCache(e){return new mu(this.__cacheContext,this.pageSize,e)}__loadCachePage(e,i){if(!this.dataProvider||e.pendingRequests[i])return;let o={page:i,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(o=H(H({},o),this.dataProviderParams()));const r=(n,a)=>{e.pendingRequests[i]===r&&(a!==void 0?e.size=a:o.parentItem&&(e.size=n.length),e.setPage(i,n),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[i],this.dispatchEvent(new CustomEvent("page-loaded")));};e.pendingRequests[i]=r,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(o,r);}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}};/**
|
|
4681
4681
|
* @license
|
|
4682
4682
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4683
4683
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4684
|
-
*/const
|
|
4684
|
+
*/const vu=s=>class extends s{static get properties(){return {pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return ["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new fu(this,{placeholder:new Se,isPlaceholder:e=>e instanceof Se,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this));}ready(){super.ready(),this._scroller.addEventListener("index-requested",e=>{if(!this._shouldFetchData())return;const i=e.detail.index;i!==void 0&&this.__dataProviderController.ensureFlatIndexLoaded(i);}),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState();}_dataProviderFilterChanged(e){if(this.__previousDataProviderFilter===void 0&&e===""){this.__previousDataProviderFilter=e;return}this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1);}_shouldFetchData(){return this.dataProvider?this.opened||this.filter&&this.filter.length:!1}_ensureFirstPage(e){!this._shouldFetchData()||!e||(this._forceNextRequest||this.size===void 0?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0));}__onDataProviderPageRequested(){this.loading=!0;}__onDataProviderPageLoaded(){const{rootCache:e}=this.__dataProviderController;e.items=[...e.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue();}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0);}_sizeChanged(e){const{rootCache:i}=this.__dataProviderController;i.size!==e&&(i.size=e,i.items=[...i.items],this.__synchronizeControllerState());}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:i}=this.__dataProviderController;i.items!==e&&(i.items=e,this.__synchronizeControllerState());}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading();}}_pageSizeChanged(e,i){if(Math.floor(e)!==e||e<1)throw this.pageSize=i,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache();}_dataProviderChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.dataProvider=i;}),this.__dataProviderController.setDataProvider(e),this.clearCache();}_ensureItemsOrDataProvider(e){if(this.items!==void 0&&this.dataProvider!==void 0)throw e(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(e,i){if(e&&i!==""&&(this.selectedItem===void 0||this.selectedItem===null)){const o=this.__getItemIndexByValue(this.filteredItems,i);(o<0||!this._getItemLabel(this.filteredItems[o]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`");}}};/**
|
|
4685
4685
|
* @license
|
|
4686
4686
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4687
4687
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4689,11 +4689,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4689
4689
|
* @license
|
|
4690
4690
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4691
4691
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4692
|
-
*/function sr(s){return s!=null}function or(s,t){return s.findIndex(e=>e instanceof Ee?!1:t(e))}const fu=s=>class extends jt(se(Ms(me(_e(nt(ke(s))))))){static get properties(){return {opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return ["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this);}get _tagNamePrefix(){return "vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown));}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront();});};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),eo(this),this.addController(new Hn(this));}disconnectedCallback(){super.disconnectedCallback(),this.close();}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate();}));}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.opened=!1;}_propertiesChanged(e,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.filter);}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter);}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){if(e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate();}catch(u){}}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&Ps(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!Yi&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"));}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1;}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate();}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open();}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open());}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e);}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault());}_getItemLabel(e){let i=e&&this.itemLabelPath?Pt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?Pt(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel());}else this.open();}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else {const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1);}this._prefillFocusedItemLabel();}else this.open();}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange();}}_setSelectionRange(e,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length);}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e);}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close();}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit();}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("click",()=>{Yi&&!this._isInputFocused()&&document.activeElement.blur();}));}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange();}_clearFilter(){this.filter="";}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit();}_onOpened(){this._lastCommittedValue=this.value;}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue();}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1;}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else {const e=[this.selectedItem,...this._dropdownItems||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o);}_onChange(e){e.stopPropagation();}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string");}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems);}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange();}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem);}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else {const i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(sr(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0);}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value);}_itemsChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter);}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e);}__getItemIndexByValue(e,i){return !e||!sr(i)?-1:or(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:or(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof Ee)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close());}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(Rt()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue();}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction());}};/**
|
|
4692
|
+
*/function sr(s){return s!=null}function or(s,t){return s.findIndex(e=>e instanceof Se?!1:t(e))}const gu=s=>class extends Yt(oe(Ns(fe(me(at(Te(s))))))){static get properties(){return {opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return ["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this);}get _tagNamePrefix(){return "vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown));}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront();});};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),eo(this),this.addController(new qn(this));}disconnectedCallback(){super.disconnectedCallback(),this.close();}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate();}));}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.opened=!1;}_propertiesChanged(e,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.filter);}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter);}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){if(e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate();}catch(u){}}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&Os(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!Gi&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"));}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1;}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate();}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open();}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open());}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e);}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault());}_getItemLabel(e){let i=e&&this.itemLabelPath?Ot(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?Ot(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel());}else this.open();}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else {const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1);}this._prefillFocusedItemLabel();}else this.open();}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange();}}_setSelectionRange(e,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length);}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e);}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close();}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit();}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("click",()=>{Gi&&!this._isInputFocused()&&document.activeElement.blur();}));}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange();}_clearFilter(){this.filter="";}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit();}_onOpened(){this._lastCommittedValue=this.value;}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue();}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1;}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else {const e=[this.selectedItem,...this._dropdownItems||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o);}_onChange(e){e.stopPropagation();}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string");}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems);}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange();}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem);}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else {const i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(sr(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0);}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value);}_itemsChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter);}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e);}__getItemIndexByValue(e,i){return !e||!sr(i)?-1:or(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:or(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof Se)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close());}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if($t()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue();}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction());}};/**
|
|
4693
4693
|
* @license
|
|
4694
4694
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4695
4695
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4696
|
-
*/f("vaadin-combo-box",Qs,{moduleId:"vaadin-combo-box-styles"});class
|
|
4696
|
+
*/f("vaadin-combo-box",Qs,{moduleId:"vaadin-combo-box-styles"});class bu extends vu(gu(_u(Js(E(X(y)))))){static get is(){return "vaadin-combo-box"}static get template(){return b`
|
|
4697
4697
|
<style>
|
|
4698
4698
|
:host([opened]) {
|
|
4699
4699
|
pointer-events: auto;
|
|
@@ -4738,33 +4738,37 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4738
4738
|
></vaadin-combo-box-overlay>
|
|
4739
4739
|
|
|
4740
4740
|
<slot name="tooltip"></slot>
|
|
4741
|
-
`}static get properties(){return {_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new
|
|
4741
|
+
`}static get properties(){return {_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new Wt(this.inputElement,this._labelController)),this._tooltipController=new _e(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(t=>!t.opened),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton;}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t);}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t);}}x(bu);/**
|
|
4742
4742
|
* @license
|
|
4743
4743
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4744
4744
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4745
|
-
*/window.Vaadin||(window.Vaadin={});var yr;(yr=window.Vaadin).featureFlags||(yr.featureFlags={});function
|
|
4745
|
+
*/window.Vaadin||(window.Vaadin={});var yr;(yr=window.Vaadin).featureFlags||(yr.featureFlags={});function yu(s){return s.replace(/-[a-z]/gu,t=>t[1].toUpperCase())}const q={};function J(s,t="24.8.0"){if(Object.defineProperty(s,"version",{get(){return t}}),s.experimental){const i=typeof s.experimental=="string"?s.experimental:`${yu(s.is.split("-").slice(1).join("-"))}Component`;if(!window.Vaadin.featureFlags[i]&&!q[i]){q[i]=new Set,q[i].add(s),Object.defineProperty(window.Vaadin.featureFlags,i,{get(){return q[i].size===0},set(o){o&&q[i].size>0&&(q[i].forEach(r=>{customElements.define(r.is,r);}),q[i].clear());}});return}else if(q[i]){q[i].add(s);return}}const e=customElements.get(s.is);if(!e)customElements.define(s.is,s);else {const i=e.version;i&&s.version&&i===s.version?console.warn(`The component ${s.is} has been loaded twice`):console.error(`Tried to define ${s.is} version ${s.version} when version ${e.version} is already in use. Something will probably break.`);}}/**
|
|
4746
4746
|
* @license
|
|
4747
4747
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4748
4748
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4749
|
-
*/class
|
|
4749
|
+
*/class xu extends HTMLElement{static get is(){return "vaadin-lumo-styles"}}J(xu);/**
|
|
4750
|
+
* @license
|
|
4751
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4752
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4753
|
+
*/function Cu(s){const t=s.constructor,e=s.__cssInjectorStyleSheet;return e?[...t.baseStyles,e,...t.themeStyles]:t.elementStyles}function wu(s){[...s.shadowRoot.querySelectorAll("style")].forEach(t=>t.remove()),_s(s.shadowRoot,Cu(s));}/**
|
|
4750
4754
|
* @license
|
|
4751
4755
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4752
4756
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4753
|
-
*/const
|
|
4757
|
+
*/const Iu=s=>class extends s{static get properties(){return {_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return [...super.observedAttributes,"theme"]}attributeChangedCallback(e,i,o){super.attributeChangedCallback(e,i,o),e==="theme"&&this._set_theme(o);}};/**
|
|
4754
4758
|
* @license
|
|
4755
4759
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4756
4760
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4757
|
-
*/const
|
|
4758
|
-
`)}const
|
|
4761
|
+
*/const Kn=[],ts=new Set,to=new Set;function Xn(s){return s&&Object.prototype.hasOwnProperty.call(s,"__themes")}function Au(s){return Xn(customElements.get(s))}function Eu(s=[]){return [s].flat(1/0).filter(t=>t instanceof Lt?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function Jn(s,t){return (s||"").split(" ").some(e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t))}function Qn(s){return s.map(t=>t.cssText).join(`
|
|
4762
|
+
`)}const zt="vaadin-themable-mixin-style";function Su(s,t){const e=document.createElement("style");e.id=zt,e.textContent=Qn(s),t.content.appendChild(e);}function ku(s){if(!s.shadowRoot)return;const t=s.constructor;if(s instanceof ee)wu(s);else {const e=s.shadowRoot.getElementById(zt),i=t.prototype._template;e.textContent=i.content.getElementById(zt).textContent;}}function Tu(s){ts.forEach(t=>{const e=t.deref();e instanceof s?ku(e):e||ts.delete(t);});}function Zn(s){if(s.prototype instanceof ee)s.elementStyles=s.finalizeStyles(s.styles);else {const t=s.prototype._template;t.content.getElementById(zt).textContent=Qn(s.getStylesForThis());}to.forEach(t=>{const e=customElements.get(t);e!==s&&e.prototype instanceof s&&Zn(e);});}function Pu(s,t){const e=s.__themes;return !e||!t?!1:e.some(i=>i.styles.some(o=>t.some(r=>r.cssText===o.cssText)))}function I(s,t,e={}){t=Eu(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(s,t,e):Kn.push({themeFor:s,styles:t,include:e.include,moduleId:e.moduleId}),s&&to.forEach(i=>{if(Jn(s,i)&&Au(i)){const o=customElements.get(i);Pu(o,t)?console.warn(`Registering styles that already exist for ${i}`):(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`),Zn(o),Tu(o);}});}function is(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():Kn}function Ou(s=""){let t=0;return s.startsWith("lumo-")||s.startsWith("material-")?t=1:s.startsWith("vaadin-")&&(t=2),t}function ea(s){const t=[];return s.include&&[].concat(s.include).forEach(e=>{const i=is().find(o=>o.moduleId===e);i?t.push(...ea(i),...i.styles):console.warn(`Included moduleId ${e} not found in style registry`);},s.styles),t}function Du(s){const t=`${s}-default-theme`,e=is().filter(i=>i.moduleId!==t&&Jn(i.themeFor,s)).map(i=>ze(H({},i),{styles:[...ea(i),...i.styles],includePriority:Ou(i.moduleId)})).sort((i,o)=>o.includePriority-i.includePriority);return e.length>0?e:is().filter(i=>i.moduleId===t)}const Oe=s=>class extends Iu(s){constructor(){super(),ts.add(new WeakRef(this));}static finalize(){if(super.finalize(),this.is&&to.add(this.is),this.elementStyles)return;const e=this.prototype._template;!e||Xn(this)||Su(this.getStylesForThis(),e);}static finalizeStyles(e){return this.baseStyles=e?[e].flat(1/0):[],this.themeStyles=this.getStylesForThis(),[...this.baseStyles,...this.themeStyles]}static getStylesForThis(){const e=s.__themes||[],i=Object.getPrototypeOf(this.prototype),o=(i?i.constructor.__themes:[])||[];this.__themes=[...e,...o,...Du(this.is)];const r=this.__themes.flatMap(n=>n.styles);return r.filter((n,a)=>a===r.lastIndexOf(n))}};/**
|
|
4759
4763
|
* @license
|
|
4760
4764
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4761
4765
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4762
|
-
*/const
|
|
4763
|
-
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},
|
|
4766
|
+
*/const zu=(s,...t)=>{const e=document.createElement("style");e.id=s,e.textContent=t.map(i=>i.toString()).join(`
|
|
4767
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},De=(s,...t)=>{zu(`lumo-${s}`,t);};/**
|
|
4764
4768
|
* @license
|
|
4765
4769
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4766
4770
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4767
|
-
*/const
|
|
4771
|
+
*/const Mu=p`
|
|
4768
4772
|
:host {
|
|
4769
4773
|
/* Base (background) */
|
|
4770
4774
|
--lumo-base-color: #fff;
|
|
@@ -4849,7 +4853,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4849
4853
|
--lumo-disabled-text-color: GrayText;
|
|
4850
4854
|
}
|
|
4851
4855
|
}
|
|
4852
|
-
`;
|
|
4856
|
+
`;De("color-props",Mu);const Nu=p`
|
|
4853
4857
|
[theme~='dark'] {
|
|
4854
4858
|
/* Base (background) */
|
|
4855
4859
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -4967,11 +4971,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4967
4971
|
pre code {
|
|
4968
4972
|
background: transparent;
|
|
4969
4973
|
}
|
|
4970
|
-
`;
|
|
4974
|
+
`;I("",Nu,{moduleId:"lumo-color"});/**
|
|
4971
4975
|
* @license
|
|
4972
4976
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4973
4977
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4974
|
-
*/const
|
|
4978
|
+
*/const Lu=p`
|
|
4975
4979
|
@font-face {
|
|
4976
4980
|
font-family: 'lumo-icons';
|
|
4977
4981
|
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABHAAAsAAAAAI6AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuNY21hcAAAAYgAAAD+AAADymne8hxnbHlmAAACiAAAC+gAABioIzlOlWhlYWQAAA5wAAAAMAAAADZa/6SsaGhlYQAADqAAAAAdAAAAJAbpA4BobXR4AAAOwAAAABAAAAC0q+AAAGxvY2EAAA7QAAAAXAAAAFyF7o1GbWF4cAAADywAAAAfAAAAIAFMAXBuYW1lAAAPTAAAATEAAAIuUUJZCHBvc3QAABCAAAABPQAAAgfdkltveJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+xDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mEO+p/FEMUcxDANKMwIkgMABvgMMAB4nO3SV26EMABF0UsZpjG9d6Y3FpgF5StLYxMTP16WEUvHV1gGIQzQAJKgDFKIfojQ+A6rUb2e0KnXU77qPanWq/LzCXOkOVyn9RyHvWl4YkaTFu1wX5ecHn0GDBkxZsKUGXMWLFmxZsOWHXsOFBw5cebClRt3Hjx58dZ7RRn/I9cUF39Xpb691acRG2piOtUqNZ1P1TCdeJUZatNQW4baNtSO6U+ouoaam96u6hlq31AHhjo01JGhjg11YqhTQ50Z6txQF4a6NNSVoa4NdWOoW0PdGereUA+GWhjq0VBPhno21IuhXg31Zqh3Q30Y6tNQX4b6NtTSKH8BOIRpQQAAeJy1WH1sW9UVv+fG9vPz+7Bf/N6zHcd2/J04jbP6s0lap4kDpB9JWzUUCqxNgaHxpTI6hNhUNLVr17HSISb2D2iAJrWb6FTWahNQdQxRvmHamAR0qibE1E18CG3QaVNFvJ17n+3YIf1AiMQ679x77j3v3HPPPed3H7ER/OsYpw8TmQRIiuQJ8RZK+WjO1B3xaCzla21orY10a+OQ6aHTHtP0zB31mBs1GZ6RNU2uXc7oPL+xdRS9R9X1oK4fVfijdsBqvqF6vd1eLzPrYrYZ57WteF7bPDIc5+ZcJnta+S9i2Vfhs4MaMwZNQmO0Vv7gF/MZcNsCcJp4sJFSwYyAmRuFCmTBDRBUkwGqnlViyjmVBpLqaXhNpt0J5V1JOqMkuqn8WkMHvZX+iOlImiqkBiFVYDrCqINulmkwKb8ry2fkZBBn7FcTlk4ZdfpRZ9MOesLSAakKt0N3g4p2jAL8eIEOOqom/U0lgQRXUl8LtXM7HFkojUIpF0ErVBhcZC1vtyjtpsqr83a8RVcSH+ool8LgcIMjNohmVCACuDs506BdO6WIQeXjUsh1XKZGRNpp9piv3+Givoh00OU6KEV81HUHTLtN093Q+YGlE3wLHWRtMNy9XWqdLm2HKbaNsGzhu+41eswFOjE6WKSk2/1Wpt+qHeM6phbohmVmj3GvpdcVkiy9zbXfzHVqKuDB0IR2P6ZpF+D7dy6YC/9svGmBE5hKB9+X2+hh4iYRMkhGyTqyFc9APmeGQHf043tWQKHkizmwaY5AroTNVJzJDc2SFzUu92kOLsdmKu77vByb8/IjtxmhkMFISRBFISO4XMLJlj4XgGuRXtaHw2FLyHifdSOpisIhJjgkiPBAyJh7lfXTkhEadwk1mUngrOC6MazX7mASeEAPV1FyjEumBOaEDu4DP/ogRDKkiLEV1woVyMeLLKJCEM+FwdCwL4XLcRgdbfkhbzS8BNvXDKzNQiAWgOzagTXF1Eyq+Ci6/TPm/JrNY/59p1epKN4jQFGe0fx+LTMwNVCrAU2VSqnaKYzIiGmWe2Rvp9KDJhncrjLaFce8VCUbyQ1kB9lNfkJ+To6R58mfyd/Ip9ABXohDHqqwEW7A2Mij1ehntLu+h8xMtocjUJcYwoLdtYafv/1Vjy8vjLaLtBfOt3/B931Rexa24e5zstgnyqvZHs69zuhq3vFgRpQVJyN7FuE++RLSeW4xMi+t6Zeo5sIK6S5dlGVRD2hWnGoB3j7OV3lesvNLic8tOnLRSRfRdOna63VJp/1WbYs5dFZjy1AqpGICQEWKmNI+CZNoVTJ7pNop+IZkRrBHgnEmqr3TrEsfw1Gi8LqE+S1aV0SNNwXVVVvuUoU3ld6TLwmditIpvKTU50zSzWwO1h0rL8awnulwTXMYrGDT4aQ1fb4GPkyv5vMEh5Vec6yw0AMXnfcx1l/rfVZaKLDi0W4j/HfeyGZuHOf1IUGW1udizU2leXY0OmLpVDpVKJfKpZzPRKHgEBzpXAUKWYipoIeBdl3JfLZVBizEqWun1i4ZGFiyduq3DebayXsmJ+95gBG4+Urm1a2SdpKV57lP2wZyZqI+FAlfUtO+NCmgdWhMOS1gDY+jHWnBhwjBQLMEXxmLbx6t9JXTWDLtsSxgisfErqvQMbbBoywZmeyLeWe8OWNydFDxzMx4lMGRtX0xN3YFJkeW+O0bascGNwwObtjCCOzrzAVWjSwN2K9cpyn9o5cZOXMmkAuM85EbNHnJyHhfLLCnPhxJYw9eoIMkyC3l+4ZuY5ig7lW2oYUynDgg+Xrk+++Xe3zSgRYetnyuy+KbfjiB+GAAtZ8HHXmtijZfFFgrujhmOs2qkXvuSV6WqA1WLYqhPHOfsa26rklKFqbAGL2dOIlGurB6LWFVFd/KoBBaYTFYVBs93hZRFlrG5Ex4NVFIJguJVvqnBW2kNNvFGx90YUcSEvyZSMDeZjc0xYlEYy8+hHcWx9YrZOaPPyCGepP5Q34aXnGBr8d1QhSf4yjtiebZqNJfEYl4SY6dDRb8WSguLZW9ZQtBpoW4hX0QMyB2KmsYcOh8HMQxBn288oZ6BXV0GOq/ClKsC6T8g9X3OFKZNkJrYkOx2lEk+KNDy953+wGHXuGGzhGZ+uLK8FVrQkbtKBv+9EztU2sgTCNpvXMdJjqJ4tkdw+x00dPKkZ1QR254x7GQoFmvfakSnL3gCc5nREly2mN2pyTLMacMipNT7YInGU7JzlN2p9N+yinXTirOKEvPUafSWMNDmCf9pIQYaG19DSxKGqvAQ+xg60iabEm5MheUU2n+HxO4TDDbjnw6xxK8QzfhbHXq8pWVqanKysun9s6ztdt7sivGqruqYyuyPS6Hw9XehGt6q+l0dT0jvaFMZjiTuTHo7+vdtHJTb58/2ML+IxHt9/n9vv5owiWKrrbWD+sakKxhKoYzxF5f7y9INxki42QNuYrVFDPfvqxyY83xWNMV+ZxPSMWb62W+wPSCJwkDDl1WZOGW84nAEo4A7HjB/uWmOdayRFnKjazi668u/ajJlUd87aPk048Crlu4j1Oh9gxdL3Z1inNPIt2xvKNlsU4hn54Z5Y6YbTDu9hHOvkcFAb35fU6hNovKOrtQmcvbNV9/Ntfv5xf4atDWOOTX6CSHZ08xujhPs51+f9zvf1YLIGoPPKvxVh0TSLAXzzUBFiXs7GJVB7vH5/PAXznd4+vx4a95h3qI/oYIpIdMkA1kC7kVLS3GhWI5bwj1fIaVKG/Ei5gXWOjhtcJbzFthaMQrwIcIRj0ppvO6yV95icu9j/YPDNySWp7w+kOr95R1RfGpfVlDVhS/2geJ5Umv2mn0rkxBvzvgdisndJXaVF1X5z5jdHGe2n/QnYo8+b2uaMivhowgjYcLnVqnrEpQezsieyVZ6ooETbdJO6ip+cORLpes6BL82/qg8VHbo45B/vch/YQeJX28QvEANR3sQhxh+TcMCEd4l8BKF7uID7KM05tRYlIHHXY63YIi2fXQyj5XSBbcMeewKLpttkJ2Syz33YJfDdJdSYkqHbYb3VHRJgTV8c0TAy67YHeK7htwOKWax5co7Do8Pfh1tKdx1g5j9o6TZeQyMo27FuW3vbYsbY/Op3AG06DMKionRlpgHzCEeMmLU5opRrCyS670RzppZeW5p/iT3jL3lB4O63QS6dzzh8SAtOqwGJK3bv+lGJTWbr++471wsVKMRJCEK5H+cLg/Qp+IDsdqs7HhKD7hMXyyrD/Li8RjRqimHhI7HP2vSDZn9brplySb0L9dgpURSwmSiBFhilrwB8OA9gZ29NkRO/669parW9e7XZDxwvgRu+SE7zgl+xG5p/HtRqJ3cdwSZwsbwTA1WT3jEdyPN0sWxvDGy+xovIzHosnwc9LePf9tywun0fMkWaFYZbB4oovRq8VyKYUBkMVXqVhBHSylQ0wanvla3+rQ1XbR8ZzstYOo2Mf7vjk8ftcGDWxdSdXx0cAVveHg1TZFtEOn8ntBBFs11V++vuLUQ5qz+U6d/oUjpGIdNjOQhJXNqn5YCS1Yy5PofLGEs6Js2yOKe2yyOLxtaGjbt7cNIURCEDdWfaQ6lurtRYbePCuItv1iUNxvE4Vdw2zQ0LZhdv2fxjHp5uAmdlBpopHXoJGU8e6BRc0yi+PztkaHTRRrW1m2hcfFLlEUzzD+DGczjEVCg9jEQZhFcdAL2DjD+DPiSWQzjM2I89g5RXdxfECS+CIWy1hTGmFs6EIbkv/pbtkfU3aPrZ+4c2Lizn07qufym/L5TTdtyuU2/We3HPeDsjtb3bGPSSfW31aX3LQpX/d9sL7fWYpRJPBbCJavYjrFjj0rT2GWCZjf6Ytffr8beXl/HYeyGwJiIK8FLDHbfo65xGz7YCSRqCQSkbbHI5eUU5X4sjj+zrU9aHnRlEnrd7YGptd0x2Jf/RbH9PAiovadckSnEsJ661OgPFuH9B4O6e202vIN0h9xHXSJh1wRP5Vqv1uI6Wn9Gxmrwzqrii1gqhEscJanuAlGas+s2/uzvetgS72NpHZ6aHbZstmh/wPq1seEeJxjYGRgYADi31ySEvH8Nl8ZuJlfAEUYalQ3NCLo/6+ZpzLdAnI5GJhAogAiBgraeJxjYGRgYA76nwUkXzAAAfNUBkYGVKALAFb4A3EAAAB4nGNgYGBgfjG0MAAMzihlAAAAAABOAJoA6AEKASwBTgFwAZoBxAHuAhoCnALoBJoEvATWBPIFDgUqBXoF0AX+BkQGlga4BwgHagfiCGoIpAi8CVAJmAoQCiwKVgqQCtYLGAtOC4gL6AwuDFR4nGNgZGBg0GVMYRBlAAEmIOYCQgaG/2A+AwAYygG+AHicbZE9TsMwGIbf9A/RSggEYmHxAgtq+jN2ZGj3Dt3T1GlTOXHkuBW9AyfgEByCgTNwCA7BW/NJlVBtyd/jx+8XKwmAa3whwnFE6Ib1OBq44O6Pm6Qb4Rb5QbiNHh6FO/RD4S6eMRHu4RaaT4halzR3eBVu4Apvwk36d+EW+UO4jXt8Cnfov4W7WOBHuIen6MXsCtvPU1vWc73emcSdxIkW2tW5LdUoHp7kTJfaJV6v1PKg6v167H2mMmcLNbWl18ZYVTm71amPN95Xk8EgEx+ntoDBDgUs+siRspaoMef7rukNEriziXNuwS7Hmoe9wggxv+e55IzJMqQTeNYV00scuNbY8+YxrUfGfcaMZb/CNPQe04bT0lThbEuT0sfYhK6K/23Amf3Lx+H24hcj4GScAAAAeJxtjuduwzAMhH2NnTqOk+6993TfSZFY24giGZTVon36eiRFf5SAiO/A05HBWtBXEvxfGdYwQIgIQ6wjxggJxkgxwRQb2MQWtrGDXexhHwc4xBGOcYJTnOEcF7jEFa5xg1vc4R4PeMQTnvGCV2R4C1Khy9xkkkxNnPRC03s97pHLvKgTYXJNmbKfZom9o8POEffsq0Qw28+ltcPe2uHS2rGvRjPBmSwE1+GMtI6l0GSU4JEsSM4XgudpQx9sTRf3K9rAyUr0962UryKprZwPpM0jyda5uP2qrVBjxSLPCmGUplixrdpBSKqsI2oO4gF9Udq8TJVOzDSpcEHGR4vSeJdaVsSkMl26OqoKa6jttQ0rLb6a5l3YjO2QqV01YXLlNy2XDR0JlkXojbJTb/5GDX3V+kPviIPgB9AUks0AAAA=)
|
|
@@ -5026,11 +5030,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5026
5030
|
--lumo-icons-upload: '\\ea2b';
|
|
5027
5031
|
--lumo-icons-user: '\\ea2c';
|
|
5028
5032
|
}
|
|
5029
|
-
`;
|
|
5033
|
+
`;De("font-icons",Lu);/**
|
|
5030
5034
|
* @license
|
|
5031
5035
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5032
5036
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5033
|
-
*/const
|
|
5037
|
+
*/const Vu=p`
|
|
5034
5038
|
:host {
|
|
5035
5039
|
/* Square */
|
|
5036
5040
|
--lumo-space-xs: 0.25rem;
|
|
@@ -5053,11 +5057,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5053
5057
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
5054
5058
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
5055
5059
|
}
|
|
5056
|
-
`;
|
|
5060
|
+
`;De("spacing-props",Vu);/**
|
|
5057
5061
|
* @license
|
|
5058
5062
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5059
5063
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5060
|
-
*/const
|
|
5064
|
+
*/const Fu=p`
|
|
5061
5065
|
:host {
|
|
5062
5066
|
/* Border radius */
|
|
5063
5067
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -5157,11 +5161,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5157
5161
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
5158
5162
|
--vaadin-input-field-value-font-weight: 500;
|
|
5159
5163
|
}
|
|
5160
|
-
`;
|
|
5164
|
+
`;De("style-props",Fu);/**
|
|
5161
5165
|
* @license
|
|
5162
5166
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5163
5167
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5164
|
-
*/const
|
|
5168
|
+
*/const Bu=p`
|
|
5165
5169
|
:host {
|
|
5166
5170
|
/* prettier-ignore */
|
|
5167
5171
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -5181,7 +5185,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5181
5185
|
--lumo-line-height-s: 1.375;
|
|
5182
5186
|
--lumo-line-height-m: 1.625;
|
|
5183
5187
|
}
|
|
5184
|
-
`,
|
|
5188
|
+
`,Ru=p`
|
|
5185
5189
|
body,
|
|
5186
5190
|
:host {
|
|
5187
5191
|
font-family: var(--lumo-font-family);
|
|
@@ -5273,11 +5277,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5273
5277
|
border-left: none;
|
|
5274
5278
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
5275
5279
|
}
|
|
5276
|
-
`;
|
|
5280
|
+
`;I("",Ru,{moduleId:"lumo-typography"});De("typography-props",Bu);/**
|
|
5277
5281
|
* @license
|
|
5278
5282
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5279
5283
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5280
|
-
*/const
|
|
5284
|
+
*/const $u=p`
|
|
5281
5285
|
:host {
|
|
5282
5286
|
--lumo-size-xs: 1.625rem;
|
|
5283
5287
|
--lumo-size-s: 1.875rem;
|
|
@@ -5292,7 +5296,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5292
5296
|
/* For backwards compatibility */
|
|
5293
5297
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
5294
5298
|
}
|
|
5295
|
-
`;
|
|
5299
|
+
`;De("sizing-props",$u);/**
|
|
5296
5300
|
* @license
|
|
5297
5301
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5298
5302
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -5323,11 +5327,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5323
5327
|
font-family: 'lumo-icons';
|
|
5324
5328
|
display: block;
|
|
5325
5329
|
}
|
|
5326
|
-
`;
|
|
5330
|
+
`;I("",io,{moduleId:"lumo-field-button"});/**
|
|
5327
5331
|
* @license
|
|
5328
5332
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
5329
5333
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5330
|
-
*/const
|
|
5334
|
+
*/const Hu=p`
|
|
5331
5335
|
:host {
|
|
5332
5336
|
font-size: var(--lumo-font-size-xxs);
|
|
5333
5337
|
line-height: 1;
|
|
@@ -5416,7 +5420,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5416
5420
|
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
5417
5421
|
pointer-events: none;
|
|
5418
5422
|
}
|
|
5419
|
-
`;
|
|
5423
|
+
`;I("vaadin-multi-select-combo-box-chip",[io,Hu],{moduleId:"lumo-multi-select-combo-box-chip"});I("vaadin-input-container",p`
|
|
5420
5424
|
:host {
|
|
5421
5425
|
background: var(--_background);
|
|
5422
5426
|
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
@@ -5678,7 +5682,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5678
5682
|
width: var(--lumo-icon-size-m);
|
|
5679
5683
|
height: var(--lumo-icon-size-m);
|
|
5680
5684
|
}
|
|
5681
|
-
`;
|
|
5685
|
+
`;I("vaadin-item",so,{moduleId:"lumo-item"});const ta=p`
|
|
5682
5686
|
:host {
|
|
5683
5687
|
transition: background-color 100ms;
|
|
5684
5688
|
overflow: hidden;
|
|
@@ -5690,11 +5694,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5690
5694
|
:host([focused]:not([disabled])) {
|
|
5691
5695
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
5692
5696
|
}
|
|
5693
|
-
`;
|
|
5697
|
+
`;I("vaadin-combo-box-item",[so,ta],{moduleId:"lumo-combo-box-item"});/**
|
|
5694
5698
|
* @license
|
|
5695
5699
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
5696
5700
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5697
|
-
*/const
|
|
5701
|
+
*/const ia=p`
|
|
5698
5702
|
[part~='loader'] {
|
|
5699
5703
|
box-sizing: border-box;
|
|
5700
5704
|
width: var(--lumo-icon-size-s);
|
|
@@ -5740,7 +5744,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5740
5744
|
* @license
|
|
5741
5745
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5742
5746
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5743
|
-
*/const
|
|
5747
|
+
*/const Gt=p`
|
|
5744
5748
|
:host {
|
|
5745
5749
|
top: var(--lumo-space-m);
|
|
5746
5750
|
right: var(--lumo-space-m);
|
|
@@ -5805,11 +5809,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5805
5809
|
opacity: 1;
|
|
5806
5810
|
}
|
|
5807
5811
|
}
|
|
5808
|
-
`;
|
|
5812
|
+
`;I("",Gt,{moduleId:"lumo-overlay"});/**
|
|
5809
5813
|
* @license
|
|
5810
5814
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5811
5815
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5812
|
-
*/const
|
|
5816
|
+
*/const Kt=p`
|
|
5813
5817
|
:host([opening]),
|
|
5814
5818
|
:host([closing]) {
|
|
5815
5819
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -5839,7 +5843,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5839
5843
|
opacity: 0;
|
|
5840
5844
|
}
|
|
5841
5845
|
}
|
|
5842
|
-
`;
|
|
5846
|
+
`;I("",Kt,{moduleId:"lumo-menu-overlay-core"});const qu=p`
|
|
5843
5847
|
/* Small viewport (bottom sheet) styles */
|
|
5844
5848
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
5845
5849
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -5901,7 +5905,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5901
5905
|
transform: translateY(150%);
|
|
5902
5906
|
}
|
|
5903
5907
|
}
|
|
5904
|
-
`,
|
|
5908
|
+
`,Uu=[Gt,Kt,qu];I("",Uu,{moduleId:"lumo-menu-overlay"});const sa=p`
|
|
5905
5909
|
[part='content'] {
|
|
5906
5910
|
padding: 0;
|
|
5907
5911
|
}
|
|
@@ -5922,7 +5926,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5922
5926
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
5923
5927
|
margin-bottom: var(--lumo-space-xs);
|
|
5924
5928
|
}
|
|
5925
|
-
`,
|
|
5929
|
+
`,oa=p`
|
|
5926
5930
|
[part~='loader'] {
|
|
5927
5931
|
position: absolute;
|
|
5928
5932
|
z-index: 1;
|
|
@@ -5930,7 +5934,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5930
5934
|
top: var(--lumo-space-s);
|
|
5931
5935
|
margin-inline: auto 0;
|
|
5932
5936
|
}
|
|
5933
|
-
`;
|
|
5937
|
+
`;I("vaadin-combo-box-overlay",[Gt,Kt,sa,ia,oa,p`
|
|
5934
5938
|
:host {
|
|
5935
5939
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
5936
5940
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
@@ -5939,7 +5943,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5939
5943
|
* @license
|
|
5940
5944
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5941
5945
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5942
|
-
*/const
|
|
5946
|
+
*/const Wu=p`
|
|
5943
5947
|
:host {
|
|
5944
5948
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
5945
5949
|
}
|
|
@@ -5999,16 +6003,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5999
6003
|
* @license
|
|
6000
6004
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6001
6005
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6002
|
-
*/const
|
|
6006
|
+
*/const ra=p`
|
|
6003
6007
|
[part='label'] {
|
|
6004
6008
|
align-self: flex-start;
|
|
6005
6009
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
6006
6010
|
font-weight: var(--vaadin-input-field-label-font-weight, 500);
|
|
6007
6011
|
font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
|
|
6008
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
6009
6012
|
transition: color 0.2s;
|
|
6010
6013
|
line-height: 1;
|
|
6011
|
-
padding-
|
|
6014
|
+
padding-inline-start: calc(var(--lumo-border-radius-m) / 4);
|
|
6015
|
+
padding-inline-end: 1em;
|
|
6012
6016
|
padding-bottom: 0.5em;
|
|
6013
6017
|
/* As a workaround for diacritics being cut off, add a top padding and a
|
|
6014
6018
|
negative margin to compensate */
|
|
@@ -6092,16 +6096,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6092
6096
|
|
|
6093
6097
|
/* RTL specific styles */
|
|
6094
6098
|
|
|
6095
|
-
:host([dir='rtl']) [part='label'] {
|
|
6096
|
-
margin-left: 0;
|
|
6097
|
-
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
6098
|
-
}
|
|
6099
|
-
|
|
6100
|
-
:host([dir='rtl']) [part='label'] {
|
|
6101
|
-
padding-left: 1em;
|
|
6102
|
-
padding-right: 0;
|
|
6103
|
-
}
|
|
6104
|
-
|
|
6105
6099
|
:host([dir='rtl']) [part='required-indicator']::after {
|
|
6106
6100
|
right: auto;
|
|
6107
6101
|
left: 0;
|
|
@@ -6111,11 +6105,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6111
6105
|
margin-left: 0;
|
|
6112
6106
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
6113
6107
|
}
|
|
6114
|
-
`;
|
|
6108
|
+
`;I("",ra,{moduleId:"lumo-required-field"});/**
|
|
6115
6109
|
* @license
|
|
6116
6110
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6117
6111
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6118
|
-
*/const
|
|
6112
|
+
*/const ju=p`
|
|
6119
6113
|
:host {
|
|
6120
6114
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
6121
6115
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -6263,27 +6257,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6263
6257
|
[part='clear-button']::before {
|
|
6264
6258
|
content: var(--lumo-icons-cross);
|
|
6265
6259
|
}
|
|
6266
|
-
`,
|
|
6260
|
+
`,na=[ra,io,Wu,ju];I("",na,{moduleId:"lumo-input-field-shared-styles"});/**
|
|
6267
6261
|
* @license
|
|
6268
6262
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6269
6263
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6270
|
-
*/const
|
|
6264
|
+
*/const Yu=p`
|
|
6271
6265
|
@media (any-hover: hover) {
|
|
6272
6266
|
:host(:hover[readonly]) {
|
|
6273
6267
|
background-color: transparent;
|
|
6274
6268
|
cursor: default;
|
|
6275
6269
|
}
|
|
6276
6270
|
}
|
|
6277
|
-
`;
|
|
6271
|
+
`;I("vaadin-multi-select-combo-box-item",[so,ta,Yu],{moduleId:"lumo-multi-select-combo-box-item"});I("vaadin-multi-select-combo-box-overlay",[Gt,Kt,sa,ia,oa,p`
|
|
6278
6272
|
:host {
|
|
6279
6273
|
--_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
6280
6274
|
--_vaadin-multi-select-combo-box-items-container-border-style: solid;
|
|
6281
6275
|
}
|
|
6282
|
-
`],{moduleId:"lumo-multi-select-combo-box-overlay"});
|
|
6276
|
+
`],{moduleId:"lumo-multi-select-combo-box-overlay"});I("vaadin-multi-select-combo-box-container",p`
|
|
6283
6277
|
:host([auto-expand-vertically]) {
|
|
6284
6278
|
padding-block: var(--lumo-space-xs);
|
|
6285
6279
|
}
|
|
6286
|
-
`,{moduleId:"lumo-multi-select-combo-box-container"});const
|
|
6280
|
+
`,{moduleId:"lumo-multi-select-combo-box-container"});const Gu=p`
|
|
6287
6281
|
:host([has-value]) {
|
|
6288
6282
|
padding-inline-start: 0;
|
|
6289
6283
|
}
|
|
@@ -6336,11 +6330,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6336
6330
|
color: var(--lumo-contrast-60pct);
|
|
6337
6331
|
cursor: var(--lumo-clickable-cursor);
|
|
6338
6332
|
}
|
|
6339
|
-
`;
|
|
6333
|
+
`;I("vaadin-multi-select-combo-box",[na,Gu],{moduleId:"lumo-multi-select-combo-box"});/**
|
|
6340
6334
|
* @license
|
|
6341
6335
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6342
6336
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6343
|
-
*/const
|
|
6337
|
+
*/const Ku=p`
|
|
6344
6338
|
:host {
|
|
6345
6339
|
max-width: 100%;
|
|
6346
6340
|
--input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
|
|
@@ -6379,7 +6373,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6379
6373
|
:host([auto-expand-horizontally]) [class$='container'] {
|
|
6380
6374
|
width: auto;
|
|
6381
6375
|
}
|
|
6382
|
-
`,
|
|
6376
|
+
`,Xu=p`
|
|
6383
6377
|
:host {
|
|
6384
6378
|
display: inline-flex;
|
|
6385
6379
|
align-items: center;
|
|
@@ -6408,22 +6402,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6408
6402
|
* @license
|
|
6409
6403
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6410
6404
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6411
|
-
*/
|
|
6405
|
+
*/I("vaadin-multi-select-combo-box-chip",Xu,{moduleId:"vaadin-multi-select-combo-box-chip"});class Ju extends Oe(y){static get is(){return "vaadin-multi-select-combo-box-chip"}static get properties(){return {disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},label:{type:String},item:{type:Object}}}static get template(){return b`
|
|
6412
6406
|
<div part="label">[[label]]</div>
|
|
6413
6407
|
<div part="remove-button" on-click="_onRemoveClick"></div>
|
|
6414
|
-
`}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}));}}
|
|
6408
|
+
`}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}));}}J(Ju);/**
|
|
6415
6409
|
* @license
|
|
6416
6410
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6417
6411
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6418
|
-
*/const
|
|
6412
|
+
*/const W=[];function ss(s,t,e=s.getAttribute("dir")){t?s.setAttribute("dir",t):e!=null&&s.removeAttribute("dir");}function os(){return document.documentElement.getAttribute("dir")}function Qu(){const s=os();W.forEach(t=>{ss(t,s);});}const Zu=new MutationObserver(Qu);Zu.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Xt=s=>class extends s{static get properties(){return {dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>e===""?null:e}}}}get __isRTL(){return this.getAttribute("dir")==="rtl"}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),ss(this,os(),null));}attributeChangedCallback(e,i,o){if(super.attributeChangedCallback(e,i,o),e!=="dir")return;const r=os(),n=o===r&&W.indexOf(this)===-1,a=!o&&i&&W.indexOf(this)===-1;n||a?(this.__subscribe(),ss(this,r,o)):o!==r&&i===r&&this.__unsubscribe();}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=W.includes(this),this.__unsubscribe();}_valueToNodeAttribute(e,i,o){o==="dir"&&i===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,i,o);}_attributeToProperty(e,i,o){e==="dir"&&!i?this.dir="":super._attributeToProperty(e,i,o);}__subscribe(){W.includes(this)||W.push(this);}__unsubscribe(){W.includes(this)&&W.splice(W.indexOf(this),1);}};/**
|
|
6419
6413
|
* @license
|
|
6420
6414
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6421
6415
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6422
|
-
*/const
|
|
6423
|
-
* @license
|
|
6424
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6425
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6426
|
-
*/const Ju=p`
|
|
6416
|
+
*/const ep=p`
|
|
6427
6417
|
:host {
|
|
6428
6418
|
display: flex;
|
|
6429
6419
|
align-items: center;
|
|
@@ -6493,15 +6483,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6493
6483
|
* @license
|
|
6494
6484
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6495
6485
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6496
|
-
*/
|
|
6486
|
+
*/const tp=s=>class extends s{static get properties(){return {disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",e=>{e.target===this&&e.preventDefault();}),this.addEventListener("click",e=>{e.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach(i=>i.focus&&i.focus());});}};/**
|
|
6487
|
+
* @license
|
|
6488
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6489
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6490
|
+
*/I("vaadin-input-container",ep,{moduleId:"vaadin-input-container-styles"});class aa extends tp(Oe(Xt(y))){static get is(){return "vaadin-input-container"}static get template(){return b`
|
|
6497
6491
|
<slot name="prefix"></slot>
|
|
6498
6492
|
<slot></slot>
|
|
6499
6493
|
<slot name="suffix"></slot>
|
|
6500
|
-
`}}
|
|
6494
|
+
`}}J(aa);/**
|
|
6501
6495
|
* @license
|
|
6502
6496
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6503
6497
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6504
|
-
*/
|
|
6498
|
+
*/I("vaadin-multi-select-combo-box-container",p`
|
|
6505
6499
|
#wrapper {
|
|
6506
6500
|
display: flex;
|
|
6507
6501
|
width: 100%;
|
|
@@ -6511,15 +6505,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6511
6505
|
:host([auto-expand-vertically]) #wrapper {
|
|
6512
6506
|
flex-wrap: wrap;
|
|
6513
6507
|
}
|
|
6514
|
-
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});let
|
|
6508
|
+
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});let _t;class ip extends aa{static get is(){return "vaadin-multi-select-combo-box-container"}static get template(){if(!_t){_t=super.template.cloneNode(!0);const t=_t.content,e=t.querySelectorAll("slot"),i=document.createElement("div");i.setAttribute("id","wrapper"),t.insertBefore(i,e[2]),i.appendChild(e[0]),i.appendChild(e[1]);}return _t}static get properties(){return {autoExpandVertically:{type:Boolean,reflectToAttribute:!0}}}}J(ip);/**
|
|
6515
6509
|
* @license
|
|
6516
6510
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6517
6511
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6518
|
-
*/const
|
|
6512
|
+
*/const sp=s=>class extends s{static get properties(){return {index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return ["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return [...super.observedAttributes,"hidden"]}attributeChangedCallback(e,i,o){e==="hidden"&&o!==null?this.index=void 0:super.attributeChangedCallback(e,i,o);}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const e=this._owner.getAttribute("dir");e&&this.setAttribute("dir",e);}requestContentUpdate(){if(!this.renderer||this.hidden)return;const e={index:this.index,item:this.item,focused:this.focused,selected:this.selected};this.renderer(this,this._owner,e);}__rendererOrItemChanged(e,i,o){o===void 0||i===void 0||(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()));}__updateLabel(e,i){i||(this.textContent=e);}};/**
|
|
6519
6513
|
* @license
|
|
6520
6514
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6521
6515
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6522
|
-
*/class
|
|
6516
|
+
*/class op extends sp(Oe(Xt(y))){static get is(){return "vaadin-multi-select-combo-box-item"}static get template(){return b`
|
|
6523
6517
|
<style>
|
|
6524
6518
|
:host {
|
|
6525
6519
|
display: block;
|
|
@@ -6533,67 +6527,67 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6533
6527
|
<div part="content">
|
|
6534
6528
|
<slot></slot>
|
|
6535
6529
|
</div>
|
|
6536
|
-
`}}
|
|
6530
|
+
`}}J(op);/**
|
|
6537
6531
|
* @license
|
|
6538
6532
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6539
6533
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6540
|
-
*/let oo=!1;window.addEventListener("keydown",()=>{oo=!0;},{capture:!0});window.addEventListener("mousedown",()=>{oo=!1;},{capture:!0});function
|
|
6534
|
+
*/let oo=!1;window.addEventListener("keydown",()=>{oo=!0;},{capture:!0});window.addEventListener("mousedown",()=>{oo=!1;},{capture:!0});function rs(){let s=document.activeElement||document.body;for(;s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;return s}function ro(){return oo}function rp(s){const t=s.style;if(t.visibility==="hidden"||t.display==="none")return !0;const e=window.getComputedStyle(s);return e.visibility==="hidden"||e.display==="none"}function np(s,t){const e=Math.max(s.tabIndex,0),i=Math.max(t.tabIndex,0);return e===0||i===0?i>e:e>i}function ap(s,t){const e=[];for(;s.length>0&&t.length>0;)np(s[0],t[0])?e.push(t.shift()):e.push(s.shift());return e.concat(s,t)}function ns(s){const t=s.length;if(t<2)return s;const e=Math.ceil(t/2),i=ns(s.slice(0,e)),o=ns(s.slice(e));return ap(i,o)}function la(s){return s.matches('[tabindex="-1"]')?!1:s.matches("input, select, textarea, button, object")?s.matches(":not([disabled])"):s.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function da(s){return s.getRootNode().activeElement===s}function lp(s){if(!la(s))return -1;const t=s.getAttribute("tabindex")||0;return Number(t)}function ha(s,t){if(s.nodeType!==Node.ELEMENT_NODE||rp(s))return !1;const e=s,i=lp(e);let o=i>0;i>=0&&t.push(e);let r=[];return e.localName==="slot"?r=e.assignedNodes({flatten:!0}):r=(e.shadowRoot||e).children,[...r].forEach(n=>{o=ha(n,t)||o;}),o}function dp(s){const t=[];return ha(s,t)?ns(t):t}/**
|
|
6541
6535
|
* @license
|
|
6542
6536
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6543
6537
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6544
|
-
*/function
|
|
6538
|
+
*/function hp(s){const t=[];for(;s;){if(s.nodeType===Node.DOCUMENT_NODE){t.push(s);break}if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(s),s=s.host;continue}if(s.assignedSlot){s=s.assignedSlot;continue}s=s.parentNode;}return t}function no(s){return s?new Set(s.split(" ")):new Set}function Jt(s){return s?[...s].join(" "):""}function ca(s,t,e){const i=no(s.getAttribute(t));i.add(e),s.setAttribute(t,Jt(i));}function cp(s,t,e){const i=no(s.getAttribute(t));if(i.delete(e),i.size===0){s.removeAttribute(t);return}s.setAttribute(t,Jt(i));}function up(s){return s.nodeType===Node.TEXT_NODE&&s.textContent.trim()===""}/**
|
|
6545
6539
|
* @license
|
|
6546
6540
|
* Copyright (c) 2024 - 2025 Vaadin Ltd.
|
|
6547
6541
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6548
|
-
*/function
|
|
6542
|
+
*/function pp(s,t){let e=null;const i=document.documentElement;function o(){e&&e.disconnect(),e=null;}function r(n=!1,a=1){o();const{left:l,top:d,width:h,height:c}=s.getBoundingClientRect();if(n||t(),!h||!c)return;const u=Math.floor(d),_=Math.floor(i.clientWidth-(l+h)),m=Math.floor(i.clientHeight-(d+c)),A=Math.floor(l),w={rootMargin:`${-u}px ${-_}px ${-m}px ${-A}px`,threshold:Math.max(0,Math.min(1,a))||1};let C=!0;function B(ne){let M=ne[0].intersectionRatio;if(M!==a){if(!C)return r();M===0&&(M=1e-7),r(!1,M);}C=!1;}e=new IntersectionObserver(B,w),e.observe(s);}return r(!0),o}/**
|
|
6549
6543
|
* @license
|
|
6550
6544
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6551
6545
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6552
|
-
*/const
|
|
6546
|
+
*/const yi={start:"top",end:"bottom"},xi={start:"left",end:"right"},rr=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(t=>{t.target.__overlay&&t.target.__overlay._updatePosition();});});}),_p=s=>class extends s{static get properties(){return {positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return ["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this);}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners();}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners();}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=hp(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0);}),this.positionTarget&&(this.__observePositionTargetMove=pp(this.positionTarget,()=>{this._updatePosition();}));}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0);}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null);}__overlayOpenedChanged(e,i){if(this.__removeUpdatePositionEventListeners(),i&&(i.__overlay=null,rr.unobserve(i),e&&(this.__addUpdatePositionEventListeners(),i.__overlay=this,rr.observe(i))),e){const o=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(r=>{this.__margins[r]=parseInt(o[r],10);})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition());}}__positionSettingsChanged(){this._updatePosition();}__onScroll(e){e.target instanceof Node&&this.contains(e.target)||this._updatePosition();}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const e=this.positionTarget.getBoundingClientRect();if(e.width===0&&e.height===0&&this.opened){this.opened=!1;return}const i=this.__shouldAlignStartVertically(e);this.style.justifyContent=i?"flex-start":"flex-end";const o=this.__isRTL,r=this.__shouldAlignStartHorizontally(e,o),n=!o&&r||o&&!r;this.style.alignItems=n?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,a,this.noVerticalOverlap,yi,this,i),d=this.__calculatePositionInOneDimension(e,a,this.noHorizontalOverlap,xi,this,r);Object.assign(this.style,l,d),this.toggleAttribute("bottom-aligned",!i),this.toggleAttribute("top-aligned",i),this.toggleAttribute("end-aligned",!n),this.toggleAttribute("start-aligned",n);}__shouldAlignStartHorizontally(e,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const r=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!i&&this.horizontalAlign==="start"||i&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,o,r,this.__margins,n,this.noHorizontalOverlap,xi)}__shouldAlignStartVertically(e){const i=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),r=this.verticalAlign==="top";return this.__shouldAlignStart(e,i,o,this.__margins,r,this.noVerticalOverlap,yi)}__shouldAlignStart(e,i,o,r,n,a,l){const d=o-e[a?l.end:l.start]-r[l.end],h=e[a?l.start:l.end]-r[l.start],c=n?d:h,_=c>(n?h:d)||c>i;return n===_}__adjustBottomProperty(e,i,o){let r;if(e===i.end){if(i.end===yi.end){const n=Math.min(window.innerHeight,document.documentElement.clientHeight);if(o>n&&this.__oldViewportHeight){const a=this.__oldViewportHeight-n;r=o-a;}this.__oldViewportHeight=n;}if(i.end===xi.end){const n=Math.min(window.innerWidth,document.documentElement.clientWidth);if(o>n&&this.__oldViewportWidth){const a=this.__oldViewportWidth-n;r=o-a;}this.__oldViewportWidth=n;}}return r}__calculatePositionInOneDimension(e,i,o,r,n,a){const l=a?r.start:r.end,d=a?r.end:r.start,h=parseFloat(n.style[l]||getComputedStyle(n)[l]),c=this.__adjustBottomProperty(l,r,h),u=i[a?r.start:r.end]-e[o===a?r.end:r.start],_=c?`${c}px`:`${h+u*(a?-1:1)}px`;return {[l]:_,[d]:""}}};/**
|
|
6553
6547
|
* @license
|
|
6554
6548
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6555
6549
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6556
|
-
*/const
|
|
6550
|
+
*/const mp=s=>class extends _p(s){static get observers(){return ["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200;}connectedCallback(){super.connectedCallback();const e=this._comboBox,i=e&&e.getAttribute("dir");i&&this.setAttribute("dir",i);}_shouldCloseOnOutsideClick(e){const i=e.composedPath();return !i.includes(this.positionTarget)&&!i.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!la(e.composedPath()[0])&&e.preventDefault();}_updateOverlayWidth(){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${this.positionTarget.offsetWidth}px`);const i=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);i===""?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,i);}_setOverlayWidth(e,i){e&&i&&(this._updateOverlayWidth(),this._updatePosition());}};/**
|
|
6557
6551
|
* @license
|
|
6558
6552
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6559
6553
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6560
|
-
*/const
|
|
6554
|
+
*/const Qt=s=>s.test(navigator.userAgent),as=s=>s.test(navigator.platform),fp=s=>s.test(navigator.vendor);Qt(/Android/u);Qt(/Chrome/u)&&fp(/Google Inc/u);Qt(/Firefox/u);const vp=as(/^iPad/u)||as(/^Mac/u)&&navigator.maxTouchPoints>1,gp=as(/^iPhone/u),bp=gp||vp,yp=Qt(/^((?!chrome|android).)*safari/iu),ls=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(s){return !1}})();/**
|
|
6561
6555
|
* @license
|
|
6562
6556
|
* Copyright (c) 2017 Anton Korzunov
|
|
6563
6557
|
* SPDX-License-Identifier: MIT
|
|
6564
|
-
*/let
|
|
6558
|
+
*/let ge=new WeakMap,mt=new WeakMap,ft={},Ci=0;const nr=s=>s&&s.nodeType===Node.ELEMENT_NODE,wi=(...s)=>{console.error(`Error: ${s.join(" ")}. Skip setting aria-hidden.`);},xp=(s,t)=>nr(s)?t.map(e=>{if(!nr(e))return wi(e,"is not a valid element"),null;let i=e;for(;i&&i!==s;){if(s.contains(i))return e;i=i.getRootNode().host;}return wi(e,"is not contained inside",s),null}).filter(e=>!!e):(wi(s,"is not a valid element"),[]),Cp=(s,t,e,i)=>{const o=xp(t,Array.isArray(s)?s:[s]);ft[e]||(ft[e]=new WeakMap);const r=ft[e],n=[],a=new Set,l=new Set(o),d=c=>{if(!c||a.has(c))return;a.add(c);const u=c.assignedSlot;u&&d(u),d(c.parentNode||c.host);};o.forEach(d);const h=c=>{if(!c||l.has(c))return;const u=c.shadowRoot;(u?[...c.children,...u.children]:[...c.children]).forEach(m=>{if(!["template","script","style"].includes(m.localName))if(a.has(m))h(m);else {const A=m.getAttribute(i),k=A!==null&&A!=="false",w=(ge.get(m)||0)+1,C=(r.get(m)||0)+1;ge.set(m,w),r.set(m,C),n.push(m),w===1&&k&&mt.set(m,!0),C===1&&m.setAttribute(e,"true"),k||m.setAttribute(i,"true");}});};return h(t),a.clear(),Ci+=1,()=>{n.forEach(c=>{const u=ge.get(c)-1,_=r.get(c)-1;ge.set(c,u),r.set(c,_),u||(mt.has(c)?mt.delete(c):c.removeAttribute(i)),_||c.removeAttribute(e);}),Ci-=1,Ci||(ge=new WeakMap,ge=new WeakMap,mt=new WeakMap,ft={});}},wp=(s,t=document.body,e="data-aria-hidden")=>{const i=Array.from(Array.isArray(s)?s:[s]);return t&&i.push(...Array.from(t.querySelectorAll("[aria-live]"))),Cp(i,t,e,"aria-hidden")};/**
|
|
6565
6559
|
* @license
|
|
6566
6560
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6567
6561
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6568
|
-
*/class
|
|
6562
|
+
*/class Ip{constructor(t,e){this.host=t,this.callback=typeof e=="function"?e:()=>t;}showModal(){const t=this.callback();this.__showOthers=wp(t);}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null);}}/**
|
|
6569
6563
|
* @license
|
|
6570
6564
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6571
6565
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6572
|
-
*/class
|
|
6566
|
+
*/class Ap{saveFocus(t){this.focusNode=t||rs();}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=t?t.preventScroll:!1;rs()===document.body?setTimeout(()=>e.focus({preventScroll:i})):e.focus({preventScroll:i}),this.focusNode=null;}}/**
|
|
6573
6567
|
* @license
|
|
6574
6568
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6575
6569
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6576
|
-
*/const
|
|
6570
|
+
*/const Ii=[];class Ep{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this);}get __focusableElements(){return dp(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(da).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown);}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown);}trapFocus(t){if(this.__trapNode=t,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Ii.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus();}releaseFocus(){this.__trapNode=null,Ii.pop();}__onKeyDown(t){if(this.__trapNode&&this===Array.from(Ii).pop()&&t.key==="Tab"){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e);}}__focusNextElement(t=!1){const e=this.__focusableElements,i=t?-1:1,o=this.__focusedElementIndex,r=(e.length+o+i)%e.length,n=e[r];n.focus(),n.localName==="input"&&n.select();}}const ua=new WeakMap;function Sp(s,t){let e=t;for(;e;){if(ua.get(e)===s)return !0;e=Object.getPrototypeOf(e);}return !1}function L(s){return t=>{if(Sp(s,t))return t;const e=s(t);return ua.set(e,s),e}}/**
|
|
6577
6571
|
* @license
|
|
6578
6572
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6579
6573
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6580
|
-
*/const
|
|
6574
|
+
*/const Zt=L(s=>typeof s.prototype.addController=="function"?s:class extends s{constructor(){super(),this.__controllers=new Set;}connectedCallback(){super.connectedCallback(),this.__controllers.forEach(e=>{e.hostConnected&&e.hostConnected();});}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach(e=>{e.hostDisconnected&&e.hostDisconnected();});}addController(e){this.__controllers.add(e),this.$!==void 0&&this.isConnected&&e.hostConnected&&e.hostConnected();}removeController(e){this.__controllers.delete(e);}});/**
|
|
6581
6575
|
* @license
|
|
6582
6576
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6583
6577
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6584
|
-
*/const
|
|
6578
|
+
*/const kp=s=>class extends Zt(s){static get properties(){return {focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Ip(this),this.__focusTrapController=new Ep(this),this.__focusRestorationController=new Ap;}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController);}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const e=!ro();this.__focusRestorationController.restoreFocus({preventScroll:e});}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode);}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay));}_shouldRestoreFocus(){const e=rs();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return !0;let i=e;const o=e.ownerDocument;for(;i&&i!==o&&i!==this;)i=i.parentNode||i.host;return i===this}};/**
|
|
6585
6579
|
* @license
|
|
6586
6580
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6587
6581
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6588
|
-
*/const
|
|
6582
|
+
*/const pa=()=>Array.from(document.body.children).filter(s=>s instanceof HTMLElement&&s._hasOverlayStackMixin&&!s.hasAttribute("closing")).sort((s,t)=>s.__zIndex-t.__zIndex||0),ds=()=>pa().filter(s=>s.$.overlay),Tp=(s,t=e=>!0)=>{const e=ds().filter(t);return s===e.pop()},ar=new WeakMap,Pp=s=>class extends s{constructor(){super(),this._hasOverlayStackMixin=!0;}get _last(){return Tp(this)}bringToFront(){let e="";const i=pa().filter(o=>o!==this).pop();i&&(e=i.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex),ar.has(this)&&ar.get(this).bringToFront();}_enterModalState(){document.body.style.pointerEvents!=="none"&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),ds().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none");});}_exitModalState(){this._previousDocumentPointerEvents!==void 0&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=ds();let i;for(;(i=e.pop())&&!(i!==this&&(i.$.overlay.style.removeProperty("pointer-events"),!i.modeless)););}};/**
|
|
6589
6583
|
* @license
|
|
6590
6584
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6591
6585
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6592
|
-
*/const
|
|
6586
|
+
*/const Op=s=>class extends kp(Pp(s)){static get properties(){return {opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0}}}static get observers(){return ["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),bp&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}ready(){super.ready(),this.addEventListener("click",()=>{}),this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&this.$.overlay.getAttribute("tabindex")==="0"&&this.$.overlay.focus();});}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener));}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener);}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model);}close(e){const i=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),i.defaultPrevented||(this.opened=!1);}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,o=window.innerWidth>e,r=document.documentElement.clientHeight;o&&r>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${r-e}px`):this.style.setProperty("--vaadin-overlay-viewport-bottom","0");}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0);}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0);}_rendererOrDataChanged(e,i,o,r){const n=this._oldOwner!==i||this._oldModel!==o;this._oldModel=o,this._oldOwner=i;const a=this._oldRenderer!==e,l=this._oldRenderer!==void 0;this._oldRenderer=e;const d=this._oldOpened!==r;this._oldOpened=r,a&&l&&(this.innerHTML="",delete this._$litPart$),r&&e&&(a||d||n)&&this.requestContentUpdate();}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState());}_openedChanged(e,i){e?(this._saveFocus(),this._animatedOpening(),this.__scheduledOpen=requestAnimationFrame(()=>{setTimeout(()=>{this._trapFocus(),this.dispatchEvent(new CustomEvent("vaadin-overlay-open",{bubbles:!0}));});}),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):i&&(this.__scheduledOpen&&(cancelAnimationFrame(this.__scheduledOpen),this.__scheduledOpen=null),this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners());}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing");}_shouldAnimate(){const e=getComputedStyle(this),i=e.getPropertyValue("animation-name");return !(e.getPropertyValue("display")==="none")&&i&&i!=="none"}_enqueueAnimation(e,i){const o=`__${e}Handler`,r=n=>{n&&n.target!==this||(i(),this.removeEventListener("animationend",r),delete this[o]);};this[o]=r,this.addEventListener("animationend",r);}_flushAnimation(e){const i=`__${e}Handler`;typeof this[i]=="function"&&this[i]();}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",()=>{this._finishOpening();}):this._finishOpening();}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront();}_finishOpening(){this.removeAttribute("opening");}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"));}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",()=>{this._finishClosing();}):this._finishClosing());}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder);}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0;}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0;}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;const i=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}_keydownListener(e){if(this._last&&!(this.modeless&&!e.composedPath().includes(this.$.overlay))&&e.key==="Escape"){const i=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}}};/**
|
|
6593
6587
|
* @license
|
|
6594
6588
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6595
6589
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6596
|
-
*/const
|
|
6590
|
+
*/const Dp=p`
|
|
6597
6591
|
:host {
|
|
6598
6592
|
z-index: 200;
|
|
6599
6593
|
position: fixed;
|
|
@@ -6656,7 +6650,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6656
6650
|
* @license
|
|
6657
6651
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6658
6652
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6659
|
-
*/const
|
|
6653
|
+
*/const zp=p`
|
|
6660
6654
|
#overlay {
|
|
6661
6655
|
width: var(
|
|
6662
6656
|
--vaadin-multi-select-combo-box-overlay-width,
|
|
@@ -6669,25 +6663,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6669
6663
|
flex-direction: column;
|
|
6670
6664
|
height: 100%;
|
|
6671
6665
|
}
|
|
6672
|
-
`;
|
|
6666
|
+
`;I("vaadin-multi-select-combo-box-overlay",[Dp,zp],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Mp extends mp(Op(Xt(Oe(y)))){static get is(){return "vaadin-multi-select-combo-box-overlay"}static get template(){return b`
|
|
6673
6667
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
6674
6668
|
<div part="overlay" id="overlay">
|
|
6675
6669
|
<div part="loader"></div>
|
|
6676
6670
|
<div part="content" id="content"><slot></slot></div>
|
|
6677
6671
|
</div>
|
|
6678
|
-
`}}
|
|
6672
|
+
`}}J(Mp);/**
|
|
6679
6673
|
* @license
|
|
6680
6674
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6681
6675
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6682
|
-
*/const
|
|
6676
|
+
*/const se=class{toString(){return ""}};/**
|
|
6683
6677
|
* @license
|
|
6684
6678
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
6685
6679
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6686
|
-
*/function
|
|
6680
|
+
*/function Mt(s,t){return s.split(".").reduce((e,i)=>e?e[i]:void 0,t)}/**
|
|
6687
6681
|
* @license
|
|
6688
6682
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6689
6683
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6690
|
-
*/let
|
|
6684
|
+
*/let Np=0;function _a(){return Np++}/**
|
|
6691
6685
|
* @license
|
|
6692
6686
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
6693
6687
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -6695,7 +6689,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6695
6689
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
6696
6690
|
* Code distributed by Google as part of the polymer project is also
|
|
6697
6691
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
6698
|
-
*/let lr=0,
|
|
6692
|
+
*/let lr=0,ma=0;const we=[];let hs=!1;function Lp(){hs=!1;const s=we.length;for(let t=0;t<s;t++){const e=we[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}we.splice(0,s),ma+=s;}const Ct={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},ot={run(s){return window.requestAnimationFrame(s)},cancel(s){window.cancelAnimationFrame(s);}},fa={run(s){return window.requestIdleCallback?window.requestIdleCallback(s):window.setTimeout(s,16)},cancel(s){window.cancelIdleCallback?window.cancelIdleCallback(s):window.clearTimeout(s);}},cs={run(s){hs||(hs=!0,queueMicrotask(()=>Lp())),we.push(s);const t=lr;return lr+=1,t},cancel(s){const t=s-ma;if(t>=0){if(!we[t])throw new Error(`invalid async handle: ${s}`);we[t]=null;}}};/**
|
|
6699
6693
|
@license
|
|
6700
6694
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
6701
6695
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -6703,7 +6697,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
6703
6697
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
6704
6698
|
Code distributed by Google as part of the polymer project is also
|
|
6705
6699
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
6706
|
-
*/const
|
|
6700
|
+
*/const rt=new Set;class N{static debounce(t,e,i){return t instanceof N?t._cancelAsync():t=new N,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null;}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run(()=>{this._timer=null,rt.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),rt.delete(this));}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null);}flush(){this.isActive()&&(this.cancel(),this._callback());}isActive(){return this._timer!=null}}function va(s){rt.add(s);}function Vp(){const s=!!rt.size;return rt.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s}const qe=()=>{let s;do s=Vp();while(s)};/**
|
|
6707
6701
|
* @license
|
|
6708
6702
|
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
6709
6703
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -6711,19 +6705,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6711
6705
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
6712
6706
|
* Code distributed by Google as part of the polymer project is also
|
|
6713
6707
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
6714
|
-
*/const dr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),
|
|
6708
|
+
*/const dr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),Fp=dr&&dr[1]>=8,hr=3,Bp={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){const s=this._virtualCount;return Math.max(0,s-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(s){s=this._clamp(s,0,this._maxVirtualStart),this._virtualStartVal=s;},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(s){s%=this._physicalCount,s<0&&(s=this._physicalCount+s),this._physicalStartVal=s;},get _physicalEnd(){return (this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(s){this._physicalCountVal=s;},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return !!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let s=this._firstVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;s=this._iterateItems((e,i)=>{if(t+=this._getPhysicalSizeIncrement(e),t>this._scrollPosition)return i})||0,this._firstVisibleIndexVal=s;}return s},get lastVisibleIndex(){let s=this._lastVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;this._iterateItems((e,i)=>{t<this._scrollBottom&&(s=i),t+=this._getPhysicalSizeIncrement(e);}),this._lastVisibleIndexVal=s;}return s},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const s=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let t=s-this._scrollPosition;const e=t>=0;if(this._scrollPosition=s,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;const i=Math.round(t/this._physicalAverage);this._virtualStart+=i,this._physicalStart+=i,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update();}else if(this._physicalCount>0){const i=this._getReusables(e);e?(this._physicalTop=i.physicalTop,this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length):(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length),this._update(i.indexes,e?null:i.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),cs);}},_getReusables(s){let t,e,i;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;const h=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(s?(t=this._physicalStart,e=c-d):(t=this._physicalEnd,e=h-u);i=this._getPhysicalSizeIncrement(t),e-=i,!(o.length>=l||e<=r);)if(s){if(a+o.length+1>=this._virtualCount||d+i>=c-this._scrollOffset)break;o.push(t),d+=i,t=(t+1)%l;}else {if(n-o.length<=0||d+this._physicalSize-i<=u)break;o.push(t),d-=i,t=t===0?l-1:t-1;}return {indexes:o,physicalTop:d-this._scrollOffset}},_update(s,t){if(!(s&&s.length===0||this._physicalCount===0)){if(this._assignModels(s),this._updateMetrics(s),t)for(;t.length;){const e=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e);}this._positionItems(),this._updateScrollerSize();}},_isClientFull(){return this._scrollBottom!==0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(s){const e=this._clamp(this._physicalCount+s,hr,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(this._physicalCount*.5);if(!(e<0)){if(e>0){const o=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let r=0;r<e;r++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-o)/e,i=Math.round(this._physicalCount*.5);}this._virtualEnd>=this._virtualCount-1||i===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),fa):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),cs));}},_render(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){const s=this._getReusables(!0);this._physicalTop=s.physicalTop,this._virtualStart+=s.indexes.length,this._physicalStart+=s.indexes.length,this._update(s.indexes),this._update(),this._increasePoolIfNeeded(0);}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(hr));},_itemsChanged(s){s.path==="items"&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,ot));},_iterateItems(s,t){let e,i,o,r;if(arguments.length===2&&t){for(r=0;r<t.length;r++)if(e=t[r],i=this._computeVidx(e),(o=s.call(this,e,i))!=null)return o}else {for(e=this._physicalStart,i=this._virtualStart;e<this._physicalCount;e++,i++)if((o=s.call(this,e,i))!=null)return o;for(e=0;e<this._physicalStart;e++,i++)if((o=s.call(this,e,i))!=null)return o}},_computeVidx(s){return s>=this._physicalStart?this._virtualStart+(s-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+s},_positionItems(){this._adjustScrollPosition();let s=this._physicalTop;this._iterateItems(t=>{this.translate3d(0,`${s}px`,0,this._physicalItems[t]),s+=this._physicalSizes[t];});},_getPhysicalSizeIncrement(s){return this._physicalSizes[s]},_adjustScrollPosition(){const s=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(s!==0){this._physicalTop-=s;const t=this._scrollPosition;!Fp&&t>0&&this._resetScrollPosition(t-s);}},_resetScrollPosition(s){this.scrollTarget&&s>=0&&(this._scrollTop=s,this._scrollPosition=this._scrollTop);},_updateScrollerSize(s){const t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(s||this._scrollHeight===0||this._scrollPosition>=t-this._physicalSize||Math.abs(t-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${t}px`,this._scrollHeight=t);},scrollToIndex(s){if(typeof s!="number"||s<0||s>this.items.length-1||(qe(),this._physicalCount===0))return;s=this._clamp(s,0,this._virtualCount-1),(!this._isIndexRendered(s)||s>=this._maxVirtualStart)&&(this._virtualStart=s-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,e=this._virtualStart,i=0;const o=this._hiddenContentSize;for(;e<s&&i<=o;)i+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,e+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+i),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null;},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0;},_resizeHandler(){this._debounce("_render",()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1);},ot);},_isIndexRendered(s){return s>=this._virtualStart&&s<=this._virtualEnd},_getPhysicalIndex(s){return (this._physicalStart+(s-this._virtualStart))%this._physicalCount},_clamp(s,t,e){return Math.min(e,Math.max(t,s))},_debounce(s,t,e){this._debouncers||(this._debouncers={}),this._debouncers[s]=N.debounce(this._debouncers[s],e,t.bind(this)),va(this._debouncers[s]);}};/**
|
|
6715
6709
|
* @license
|
|
6716
6710
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6717
6711
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6718
|
-
*/const Np=1e5,Ii=1e3;class fa{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<Ii?(i=t,this._vidxOffset=0):(i=Ii,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),He(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}hostConnected(){this.scrollTarget.offsetParent&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition);}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){He();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=N.debounce(this.__placeholderClearDebouncer,st,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),He(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),He(),this._debounce("_update",this._update,hs);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,Np)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=N.debounce(this.__fixInvalidItemPositioningDebouncer,xt.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=N.debounce(this.__scrollReorderDebouncer,xt.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=N.debounce(this.__debouncerWheelAnimationFrame,st,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=N.debounce(this._debouncerIgnoreNewWheel,xt.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(fp){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=Ii,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}}Object.setPrototypeOf(fa.prototype,Mp);class Lp{constructor(t){this.__adapter=new fa(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}hostConnected(){this.__adapter.hostConnected();}}/**
|
|
6712
|
+
*/const Rp=1e5,Ai=1e3;class ga{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<Ai?(i=t,this._vidxOffset=0):(i=Ai,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),qe(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}hostConnected(){this.scrollTarget.offsetParent&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition);}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){qe();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=N.debounce(this.__placeholderClearDebouncer,ot,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),qe(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),qe(),this._debounce("_update",this._update,cs);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,Rp)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=N.debounce(this.__fixInvalidItemPositioningDebouncer,Ct.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=N.debounce(this.__scrollReorderDebouncer,Ct.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=N.debounce(this.__debouncerWheelAnimationFrame,ot,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=N.debounce(this._debouncerIgnoreNewWheel,Ct.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(yp){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=Ai,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}}Object.setPrototypeOf(ga.prototype,Bp);class $p{constructor(t){this.__adapter=new ga(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}hostConnected(){this.__adapter.hostConnected();}}/**
|
|
6719
6713
|
* @license
|
|
6720
6714
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6721
6715
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6722
|
-
*/const
|
|
6716
|
+
*/const Hp=s=>class extends s{static get properties(){return {items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this);}get _viewportTotalPaddingBottom(){if(this._cachedViewportTotalPaddingBottom===void 0){const e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(i=>parseInt(i,10)).reduce((i,o)=>i+o);}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${_a()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling();}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update());}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;const i=this._visibleItemsCount();let o=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),o=e-i+1):e>this.__virtualizer.firstVisibleIndex&&(o=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,o));const r=[...this.children].find(d=>!d.hidden&&d.index===this.__virtualizer.lastVisibleIndex);if(!r||e!==r.index)return;const n=r.getBoundingClientRect(),a=this.getBoundingClientRect(),l=n.bottom-a.bottom+this._viewportTotalPaddingBottom;l>0&&(this.scrollTop+=l);}_isItemSelected(e,i,o){return e instanceof se?!1:o&&e!==void 0&&i!==void 0?Mt(o,e)===Mt(o,i):e===i}__initVirtualizer(){this.__virtualizer=new $p({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0});}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate();}__loadingChanged(){this.requestContentUpdate();}__openedChanged(e){e&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate());}__selectedItemChanged(){this.requestContentUpdate();}__itemClassNameGeneratorChanged(e,i){(e||i)&&this.requestContentUpdate();}__focusedIndexChanged(e,i){e!==i&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e);}__rendererChanged(e,i){(e||i)&&this.requestContentUpdate();}__createElements(e){return [...Array(e)].map(()=>{const i=document.createElement(`${this.__hostTagName}-item`);return i.addEventListener("click",this.__boundOnItemClick),i.tabIndex="-1",i.style.width="100%",i})}_updateElement(e,i){const o=this.items[i],r=this.focusedIndex,n=this._isItemSelected(o,this.selectedItem,this.itemIdPath);e.setProperties({item:o,index:i,label:this.getItemLabel(o),selected:n,renderer:this.renderer,focused:!this.loading&&r===i}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(o):e.className!==""&&(e.className=""),e.id=`${this.__hostTagName}-item-${i}`,e.setAttribute("role",i!==void 0?"option":!1),e.setAttribute("aria-selected",n.toString()),e.setAttribute("aria-posinset",i+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),o instanceof se&&this.__requestItemByIndex(i);}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}));}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{const i=this.scrollTop===0,o=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(i&&e.deltaY<0||o&&e.deltaY>0)&&e.preventDefault();});}__requestItemByIndex(e){requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}));});}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}};/**
|
|
6723
6717
|
* @license
|
|
6724
6718
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6725
6719
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6726
|
-
*/class
|
|
6720
|
+
*/class qp extends Hp(y){static get is(){return "vaadin-multi-select-combo-box-scroller"}static get template(){return b`
|
|
6727
6721
|
<style>
|
|
6728
6722
|
:host {
|
|
6729
6723
|
display: block;
|
|
@@ -6750,67 +6744,67 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6750
6744
|
<div id="selector">
|
|
6751
6745
|
<slot></slot>
|
|
6752
6746
|
</div>
|
|
6753
|
-
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true");}_isItemSelected(t,e,i){return t instanceof
|
|
6747
|
+
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true");}_isItemSelected(t,e,i){return t instanceof se||this.owner.readonly?!1:this.owner._findIndex(t,this.owner.selectedItems,i)>-1}_updateElement(t,e){super._updateElement(t,e),t.toggleAttribute("readonly",this.owner.readonly);}}J(qp);/**
|
|
6754
6748
|
* @license
|
|
6755
6749
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6756
6750
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6757
|
-
*/function
|
|
6751
|
+
*/function Nt(s,t,e=0){let i=t;for(const o of s.subCaches){const r=o.parentCacheIndex;if(i<=r)break;if(i<=r+o.flatSize)return Nt(o,i-r-1,e+1);i-=o.flatSize;}return {cache:s,item:s.items[i],index:i,page:Math.floor(i/s.pageSize),level:e}}function ba({getItemId:s},t,e,i=0,o=0){for(let r=0;r<t.items.length;r++){const n=t.items[r];if(n&&s(n)===s(e))return {cache:t,level:i,item:n,index:r,page:Math.floor(r/t.pageSize),subCache:t.getSubCache(r),flatIndex:o+t.getFlatIndex(r)}}for(const r of t.subCaches){const n=o+t.getFlatIndex(r.parentCacheIndex),a=ba({getItemId:s},r,e,i+1,n+1);if(a)return a}}function ya(s,[t,...e],i=0){t===1/0&&(t=s.size-1);const o=s.getFlatIndex(t),r=s.getSubCache(t);return r&&r.flatSize>0&&e.length?ya(r,e,i+o+1):i+o}/**
|
|
6758
6752
|
* @license
|
|
6759
6753
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6760
6754
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6761
|
-
*/class ao{constructor(t,e,i,o,r){v(this,"context");v(this,"pageSize");v(this,"items",[]);v(this,"pendingRequests",{});v(this,"__subCacheByIndex",{});v(this,"__size",0);v(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,this.__flatSize=i||0;}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(t=>t.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var i;if(this.__size!==t){if(this.__size=t,this.context.placeholder!==void 0){this.items.length=t||0;for(let o=0;o<t;o++)(i=this.items)[o]||(i[o]=this.context.placeholder);}Object.keys(this.pendingRequests).forEach(o=>{parseInt(o)*this.pageSize>=this.size&&delete this.pendingRequests[o];});}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce((t,e)=>(e.recalculateFlatSize(),t+e.flatSize),0):0;}setPage(t,e){const i=t*this.pageSize;e.forEach((o,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=o);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new ao(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce((i,o)=>{const r=o.parentCacheIndex;return e>r?i+o.flatSize:i},e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=
|
|
6755
|
+
*/class ao{constructor(t,e,i,o,r){v(this,"context");v(this,"pageSize");v(this,"items",[]);v(this,"pendingRequests",{});v(this,"__subCacheByIndex",{});v(this,"__size",0);v(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,this.__flatSize=i||0;}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(t=>t.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var i;if(this.__size!==t){if(this.__size=t,this.context.placeholder!==void 0){this.items.length=t||0;for(let o=0;o<t;o++)(i=this.items)[o]||(i[o]=this.context.placeholder);}Object.keys(this.pendingRequests).forEach(o=>{parseInt(o)*this.pageSize>=this.size&&delete this.pendingRequests[o];});}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce((t,e)=>(e.recalculateFlatSize(),t+e.flatSize),0):0;}setPage(t,e){const i=t*this.pageSize;e.forEach((o,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=o);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new ao(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce((i,o)=>{const r=o.parentCacheIndex;return e>r?i+o.flatSize:i},e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=Nt(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=Nt(this,t);return {cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize();}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0);}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex}}/**
|
|
6762
6756
|
* @license
|
|
6763
6757
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6764
6758
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6765
|
-
*/class
|
|
6759
|
+
*/class Up extends EventTarget{constructor(e,{size:i,pageSize:o,isExpanded:r,getItemId:n,isPlaceholder:a,placeholder:l,dataProvider:d,dataProviderParams:h}){super();v(this,"host");v(this,"dataProvider");v(this,"dataProviderParams");v(this,"pageSize");v(this,"isExpanded");v(this,"getItemId");v(this,"rootCache");v(this,"placeholder");v(this,"isPlaceholder");this.host=e,this.pageSize=o,this.getItemId=n,this.isExpanded=r,this.placeholder=l,this.isPlaceholder=a,this.dataProvider=d,this.dataProviderParams=h,this.rootCache=this.__createRootCache(i);}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return {isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(e){this.pageSize=e,this.clearCache();}setDataProvider(e){this.dataProvider=e,this.clearCache();}recalculateFlatSize(){this.rootCache.recalculateFlatSize();}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size);}getFlatIndexContext(e){return Nt(this.rootCache,e)}getItemContext(e){return ba({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return ya(this.rootCache,e)}ensureFlatIndexLoaded(e){const{cache:i,page:o,item:r}=this.getFlatIndexContext(e);this.__isItemLoaded(r)||this.__loadCachePage(i,o);}ensureFlatIndexHierarchy(e){const{cache:i,item:o,index:r}=this.getFlatIndexContext(e);if(this.__isItemLoaded(o)&&this.isExpanded(o)&&!i.getSubCache(r)){const n=i.createSubCache(r);this.__loadCachePage(n,0);}}loadFirstPage(){this.__loadCachePage(this.rootCache,0);}__createRootCache(e){return new ao(this.__cacheContext,this.pageSize,e)}__loadCachePage(e,i){if(!this.dataProvider||e.pendingRequests[i])return;let o={page:i,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(o=H(H({},o),this.dataProviderParams()));const r=(n,a)=>{e.pendingRequests[i]===r&&(a!==void 0?e.size=a:o.parentItem&&(e.size=n.length),e.setPage(i,n),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[i],this.dispatchEvent(new CustomEvent("page-loaded")));};e.pendingRequests[i]=r,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(o,r);}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}}/**
|
|
6766
6760
|
* @license
|
|
6767
6761
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6768
6762
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6769
|
-
*/const
|
|
6763
|
+
*/const Wp=s=>class extends s{static get properties(){return {pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return ["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new Up(this,{placeholder:new se,isPlaceholder:e=>e instanceof se,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this));}ready(){super.ready(),this._scroller.addEventListener("index-requested",e=>{if(!this._shouldFetchData())return;const i=e.detail.index;i!==void 0&&this.__dataProviderController.ensureFlatIndexLoaded(i);}),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState();}_dataProviderFilterChanged(e){if(this.__previousDataProviderFilter===void 0&&e===""){this.__previousDataProviderFilter=e;return}this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1);}_shouldFetchData(){return this.dataProvider?this.opened||this.filter&&this.filter.length:!1}_ensureFirstPage(e){!this._shouldFetchData()||!e||(this._forceNextRequest||this.size===void 0?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0));}__onDataProviderPageRequested(){this.loading=!0;}__onDataProviderPageLoaded(){const{rootCache:e}=this.__dataProviderController;e.items=[...e.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue();}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0);}_sizeChanged(e){const{rootCache:i}=this.__dataProviderController;i.size!==e&&(i.size=e,i.items=[...i.items],this.__synchronizeControllerState());}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:i}=this.__dataProviderController;i.items!==e&&(i.items=e,this.__synchronizeControllerState());}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading();}}_pageSizeChanged(e,i){if(Math.floor(e)!==e||e<1)throw this.pageSize=i,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache();}_dataProviderChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.dataProvider=i;}),this.__dataProviderController.setDataProvider(e),this.clearCache();}_ensureItemsOrDataProvider(e){if(this.items!==void 0&&this.dataProvider!==void 0)throw e(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(e,i){if(e&&i!==""&&(this.selectedItem===void 0||this.selectedItem===null)){const o=this.__getItemIndexByValue(this.filteredItems,i);(o<0||!this._getItemLabel(this.filteredItems[o]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`");}}};/**
|
|
6770
6764
|
* @license
|
|
6771
6765
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6772
6766
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6773
|
-
*/const
|
|
6767
|
+
*/const xa=L(s=>class extends s{static get properties(){return {disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(e){this._setAriaDisabled(e);}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled");}click(){this.disabled||super.click();}});/**
|
|
6774
6768
|
* @license
|
|
6775
6769
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6776
6770
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6777
|
-
*/const
|
|
6771
|
+
*/const Ca=L(s=>class extends s{get _keyboardActive(){return ro()}ready(){this.addEventListener("focusin",e=>{this._shouldSetFocus(e)&&this._setFocused(!0);}),this.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1);}),super.ready();}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1);}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive);}_shouldSetFocus(e){return !0}_shouldRemoveFocus(e){return !0}});/**
|
|
6778
6772
|
* @license
|
|
6779
6773
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6780
6774
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6781
|
-
*/const lo=
|
|
6775
|
+
*/const lo=L(s=>class extends s{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e);}),this.addEventListener("keyup",e=>{this._onKeyUp(e);});}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e);break}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}});/**
|
|
6782
6776
|
* @license
|
|
6783
6777
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
6784
6778
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6785
|
-
*/const
|
|
6779
|
+
*/const jp=s=>class extends s{static get properties(){return {overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return ["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,i){if(!i||e===void 0)return;const{classList:o}=i;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const n=this.__previousClasses.filter(a=>!this.__initialClasses.has(a));n.length>0&&o.remove(...n);}const r=typeof e=="string"?e.split(" ").filter(Boolean):[];r.length>0&&o.add(...r),this.__previousClasses=r;}};/**
|
|
6786
6780
|
* @license
|
|
6787
6781
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6788
6782
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6789
|
-
*/function
|
|
6783
|
+
*/function wa(s){if(window.Vaadin&&window.Vaadin.templateRendererCallback){window.Vaadin.templateRendererCallback(s);return}s.querySelector("template")&&console.warn(`WARNING: <template> inside <${s.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`);}/**
|
|
6790
6784
|
* @license
|
|
6791
6785
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6792
6786
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6793
|
-
*/const ho=
|
|
6787
|
+
*/const ho=L(s=>class extends s{static get properties(){return {inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged",sync:!0},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0}}}constructor(){super(),this._boundOnInput=this._onInput.bind(this),this._boundOnChange=this._onChange.bind(this);}get _hasValue(){return this.value!=null&&this.value!==""}get _inputElementValueProperty(){return "value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e);}clear(){this.value="",this._inputElementValue="";}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange);}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange);}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=e!=null?e:"");}_inputElementChanged(e,i){e?this._addInputListeners(e):i&&this._removeInputListeners(i);}_onInput(e){const i=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=i.value,this.__userInput=!1;}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e);}_valueChanged(e,i){this._toggleHasValue(this._hasValue),!(e===""&&i===void 0)&&(this.__userInput||this._forwardInputValue(e));}});/**
|
|
6794
6788
|
* @license
|
|
6795
6789
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6796
6790
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6797
|
-
*/const co=
|
|
6791
|
+
*/const co=L(s=>class extends s{static get properties(){return {invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1,sync:!0},manualValidation:{type:Boolean,value:!1},required:{type:Boolean,reflectToAttribute:!0,sync:!0}}}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return !this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e);}_shouldSetInvalid(e){return !0}_requestValidation(){this.manualValidation||this.validate();}});/**
|
|
6798
6792
|
* @license
|
|
6799
6793
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6800
6794
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6801
|
-
*/class
|
|
6795
|
+
*/class Yp{constructor(t){this.host=t,t.addEventListener("opened-changed",()=>{t.opened||this.__setVirtualKeyboardEnabled(!1);}),t.addEventListener("blur",()=>this.__setVirtualKeyboardEnabled(!0)),t.addEventListener("touchstart",()=>this.__setVirtualKeyboardEnabled(!0));}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none");}}/**
|
|
6802
6796
|
* @license
|
|
6803
6797
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6804
6798
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6805
|
-
*/function cr(s){return s!=null}function ur(s,t){return s.findIndex(e=>e instanceof ie?!1:t(e))}const Up=s=>class extends $p(Qt(co(ya(lo(ho(ba(s))))))){static get properties(){return {opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return ["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this);}get _tagNamePrefix(){return "vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown));}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront();});};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),xa(this),this.addController(new Hp(this));}disconnectedCallback(){super.disconnectedCallback(),this.close();}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate();}));}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.opened=!1;}_propertiesChanged(e,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.filter);}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter);}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}));}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&la(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!as&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"));}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1;}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate();}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open();}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open());}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e);}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault());}_getItemLabel(e){let i=e&&this.itemLabelPath?zt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?zt(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel());}else this.open();}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else {const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1);}this._prefillFocusedItemLabel();}else this.open();}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange();}}_setSelectionRange(e,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length);}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e);}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close();}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit();}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("click",()=>{as&&!this._isInputFocused()&&document.activeElement.blur();}));}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange();}_clearFilter(){this.filter="";}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit();}_onOpened(){this._lastCommittedValue=this.value;}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue();}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1;}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else {const e=[this.selectedItem,...this._dropdownItems||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o);}_onChange(e){e.stopPropagation();}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string");}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems);}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange();}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem);}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else {const i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(cr(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0);}_detectAndDispatchChange(){document.hasFocus()&&this._requestValidation(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value);}_itemsChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter);}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e);}__getItemIndexByValue(e,i){return !e||!cr(i)?-1:ur(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:ur(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof ie)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close());}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(ro()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue();}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction());}};/**
|
|
6799
|
+
*/function cr(s){return s!=null}function ur(s,t){return s.findIndex(e=>e instanceof se?!1:t(e))}const Gp=s=>class extends jp(Zt(co(Ca(lo(ho(xa(s))))))){static get properties(){return {opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return ["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this);}get _tagNamePrefix(){return "vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown));}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront();});};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),wa(this),this.addController(new Yp(this));}disconnectedCallback(){super.disconnectedCallback(),this.close();}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate();}));}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.opened=!1;}_propertiesChanged(e,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.filter);}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter);}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}));}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&da(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!ls&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"));}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1;}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate();}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open();}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open());}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e);}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault());}_getItemLabel(e){let i=e&&this.itemLabelPath?Mt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?Mt(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel());}else this.open();}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else {const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1);}this._prefillFocusedItemLabel();}else this.open();}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange();}}_setSelectionRange(e,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length);}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e);}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close();}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit();}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("click",()=>{ls&&!this._isInputFocused()&&document.activeElement.blur();}));}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange();}_clearFilter(){this.filter="";}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit();}_onOpened(){this._lastCommittedValue=this.value;}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue();}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1;}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else {const e=[this.selectedItem,...this._dropdownItems||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o);}_onChange(e){e.stopPropagation();}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string");}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems);}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange();}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem);}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else {const i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(cr(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0);}_detectAndDispatchChange(){document.hasFocus()&&this._requestValidation(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value);}_itemsChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter);}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e);}__getItemIndexByValue(e,i){return !e||!cr(i)?-1:ur(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:ur(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof se)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close());}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(ro()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue();}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction());}};/**
|
|
6806
6800
|
* @license
|
|
6807
6801
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6808
6802
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6809
|
-
*/const
|
|
6803
|
+
*/const Kp=s=>class extends Wp(Gp(s)){static get properties(){return {filteredItems:{type:Array,notify:!0,sync:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0,sync:!0},size:{type:Number,notify:!0,observer:"_sizeChanged",sync:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1,sync:!0},lastFilter:{type:String,notify:!0,sync:!0},topGroup:{type:Array,observer:"_topGroupChanged",sync:!0},_target:{type:Object}}}static get observers(){return ["_readonlyChanged(readonly)"]}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return "vaadin-multi-select-combo-box"}constructor(){super(),this.addEventListener("custom-value-set",this.__onCustomValueSet.bind(this));}open(){!this.disabled&&!(this.readonly&&this.selectedItems.length===0)&&(this.opened=!0);}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button");}_updateOverlayWidth(){this.$.overlay._updateOverlayWidth();}_readonlyChanged(){this._setDropdownItems(this.filteredItems);}_setDropdownItems(e){if(this.readonly){super._setDropdownItems(this.selectedItems);return}if(this.filter||!this.selectedItemsOnTop){super._setDropdownItems(e);return}if(e&&e.length&&this.topGroup&&this.topGroup.length){const i=e.filter(o=>this._comboBox._findIndex(o,this.topGroup,this.itemIdPath)===-1);super._setDropdownItems(this.topGroup.concat(i));return}super._setDropdownItems(e);}_topGroupChanged(e){e&&this._setDropdownItems(this.filteredItems);}_initScroller(){const e=this.getRootNode().host;this._comboBox=e,super._initScroller(e);}_onEnter(e){if(this.opened){if(e.preventDefault(),e.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const i=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(i);}return}super._onEnter(e);}_onEscape(e){if(this.readonly){e.stopPropagation(),this.opened&&this.close();return}super._onEscape(e);}_clearFilter(){(!this.keepFilter||!this.opened)&&super._clearFilter();}_revertInputValueToValue(){super._revertInputValueToValue(),this.filter="";}_commitValue(){this.lastFilter=this.filter,super._commitValue();}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown();}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp();}_setFocused(e){e||(this._ignoreCommitValue=!0),super._setFocused(e),!e&&this.readonly&&!this._closeOnBlurIsPrevented&&this.close();}_onClosed(){this._ignoreCommitValue=!0,super._onClosed();}_detectAndDispatchChange(){if(this._ignoreCommitValue){this._ignoreCommitValue=!1,this.clear(),this._inputElementValue="";return}super._detectAndDispatchChange();}_overlaySelectedItemChanged(e){e.stopPropagation(),!this.readonly&&(e.detail.item instanceof se||this.opened&&(this.lastFilter=this.filter,this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:e.detail.item}}))));}_shouldFetchData(){return this.readonly?!1:super._shouldFetchData()}clearCache(){this.readonly||super.clearCache();}__onCustomValueSet(e){this._ignoreCommitValue&&e.stopImmediatePropagation();}};/**
|
|
6810
6804
|
* @license
|
|
6811
6805
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6812
6806
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6813
|
-
*/class
|
|
6807
|
+
*/class Xp extends Kp(Oe(y)){static get is(){return "vaadin-multi-select-combo-box-internal"}static get template(){return b`
|
|
6814
6808
|
<style>
|
|
6815
6809
|
:host([opened]) {
|
|
6816
6810
|
pointer-events: auto;
|
|
@@ -6828,15 +6822,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6828
6822
|
no-vertical-overlap
|
|
6829
6823
|
restore-focus-node="[[inputElement]]"
|
|
6830
6824
|
></vaadin-multi-select-combo-box-overlay>
|
|
6831
|
-
`}}
|
|
6825
|
+
`}}J(Xp);/**
|
|
6832
6826
|
* @license
|
|
6833
6827
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6834
6828
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6835
|
-
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let
|
|
6829
|
+
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let Ei;const pr=new Set,Jp=s=>class extends Xt(s){static finalize(){super.finalize();const{is:e}=this;e&&!pr.has(e)&&(window.Vaadin.registrations.push(this),pr.add(e),window.Vaadin.developmentModeCallback&&(Ei=N.debounce(Ei,fa,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]();}),va(Ei)));}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.');}};/**
|
|
6836
6830
|
* @license
|
|
6837
6831
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6838
6832
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6839
|
-
*/const
|
|
6833
|
+
*/const Qp=p`
|
|
6840
6834
|
[part='clear-button'] {
|
|
6841
6835
|
display: none;
|
|
6842
6836
|
cursor: default;
|
|
@@ -6853,7 +6847,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6853
6847
|
* @license
|
|
6854
6848
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6855
6849
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6856
|
-
*/const
|
|
6850
|
+
*/const Zp=p`
|
|
6851
|
+
[class$='container'] {
|
|
6852
|
+
display: flex;
|
|
6853
|
+
flex-direction: column;
|
|
6854
|
+
min-width: 100%;
|
|
6855
|
+
max-width: 100%;
|
|
6856
|
+
width: var(--vaadin-field-default-width, 12em);
|
|
6857
|
+
}
|
|
6858
|
+
`;/**
|
|
6859
|
+
* @license
|
|
6860
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6861
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6862
|
+
*/const e_=p`
|
|
6857
6863
|
:host {
|
|
6858
6864
|
display: inline-flex;
|
|
6859
6865
|
outline: none;
|
|
@@ -6891,125 +6897,113 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6891
6897
|
* @license
|
|
6892
6898
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6893
6899
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6894
|
-
*/const
|
|
6895
|
-
[class$='container'] {
|
|
6896
|
-
display: flex;
|
|
6897
|
-
flex-direction: column;
|
|
6898
|
-
min-width: 100%;
|
|
6899
|
-
max-width: 100%;
|
|
6900
|
-
width: var(--vaadin-field-default-width, 12em);
|
|
6901
|
-
}
|
|
6902
|
-
`;/**
|
|
6903
|
-
* @license
|
|
6904
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6905
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6906
|
-
*/const Xp=[Gp,Kp,Yp];/**
|
|
6900
|
+
*/const t_=[e_,Zp,Qp];/**
|
|
6907
6901
|
* @license
|
|
6908
6902
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
6909
6903
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6910
|
-
*/const
|
|
6904
|
+
*/const F=document.createElement("div");F.style.position="fixed";F.style.clip="rect(0px, 0px, 0px, 0px)";F.setAttribute("aria-live","polite");document.body.appendChild(F);let vt;function wt(s,t={}){const e=t.mode||"polite",i=t.timeout===void 0?150:t.timeout;e==="alert"?(F.removeAttribute("aria-live"),F.removeAttribute("role"),vt=N.debounce(vt,ot,()=>{F.setAttribute("role","alert");})):(vt&&vt.cancel(),F.removeAttribute("role"),F.setAttribute("aria-live",e)),F.textContent="",setTimeout(()=>{F.textContent=s;},i);}/**
|
|
6911
6905
|
* @license
|
|
6912
6906
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6913
6907
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6914
|
-
*/const
|
|
6908
|
+
*/const gt=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(t=>{t.target.isConnected&&(t.target.resizables?t.target.resizables.forEach(e=>{e._onResize(t.contentRect);}):t.target._onResize(t.contentRect));});});}),i_=L(s=>class extends s{get _observeParent(){return !1}connectedCallback(){if(super.connectedCallback(),gt.observe(this),this._observeParent){const e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;e.resizables||(e.resizables=new Set,gt.observe(e)),e.resizables.add(this),this.__parent=e;}}disconnectedCallback(){super.disconnectedCallback(),gt.unobserve(this);const e=this.__parent;if(this._observeParent&&e){const i=e.resizables;i&&(i.delete(this),i.size===0&>.unobserve(e)),this.__parent=null;}}_onResize(e){}});/**
|
|
6915
6909
|
* @license
|
|
6916
6910
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
6917
6911
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6918
|
-
*/class
|
|
6912
|
+
*/class s_{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule();},this.connect(),this._schedule();}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0;}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1;}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask(()=>{this.flush();}));}flush(){this._connected&&(this._scheduled=!1,this._processNodes());}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],o=[];t.length&&(e=t.filter(r=>!this._storedNodes.includes(r))),this._storedNodes.length&&this._storedNodes.forEach((r,n)=>{const a=t.indexOf(r);a===-1?i.push(r):a!==n&&o.push(r);}),(e.length||i.length||o.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:o,removedNodes:i}),this._storedNodes=t;}}/**
|
|
6919
6913
|
* @license
|
|
6920
6914
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6921
6915
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6922
|
-
*/class
|
|
6916
|
+
*/class ei extends EventTarget{static generateId(t,e="default"){return `${e}-${t.localName}-${_a()}`}constructor(t,e,i,o={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:l,uniqueIdPrefix:d}=o;this.host=t,this.slotName=e,this.tagName=i,this.observe=typeof a=="boolean"?a:!0,this.multiple=typeof n=="boolean"?n:!1,this.slotInitializer=r,n&&(this.nodes=[]),l&&(this.defaultId=this.constructor.generateId(t,d||e));}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0);}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t));}initMultiple(){const t=this.getSlotChildren();if(t.length===0){const e=this.attachDefaultNode();e&&(this.nodes=[e],this.initNode(e));}else this.nodes=t,t.forEach(e=>{this.initAddedNode(e);});}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let o=this.defaultNode;return !o&&i&&(o=document.createElement(i),o instanceof Element&&(e!==""&&o.setAttribute("slot",e),this.defaultNode=o)),o&&(this.node=o,t.appendChild(o)),o}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&t==="")}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host);}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t));}observeSlot(){const{slotName:t}=this,e=t===""?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new s_(i,({addedNodes:o,removedNodes:r})=>{const n=this.multiple?this.nodes:[this.node],a=o.filter(l=>!up(l)&&!n.includes(l));r.length&&(this.nodes=n.filter(l=>!r.includes(l)),r.forEach(l=>{this.teardownNode(l);})),a&&a.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...n,...a].filter(l=>l!==this.defaultNode),a.forEach(l=>{this.initAddedNode(l);})):(this.node&&this.node.remove(),this.node=a[0],this.initAddedNode(this.node)));});}}/**
|
|
6923
6917
|
* @license
|
|
6924
6918
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
6925
6919
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6926
|
-
*/class
|
|
6920
|
+
*/class o_ extends ei{constructor(t){super(t,"tooltip"),this.setTarget(t);}initCustomNode(t){t.target=this.target,this.ariaTarget!==void 0&&(t.ariaTarget=this.ariaTarget),this.context!==void 0&&(t.context=this.context),this.manual!==void 0&&(t.manual=this.manual),this.opened!==void 0&&(t.opened=this.opened),this.position!==void 0&&(t._position=this.position),this.shouldShow!==void 0&&(t.shouldShow=this.shouldShow),this.__notifyChange();}teardownNode(){this.__notifyChange();}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t);}setContext(t){this.context=t;const e=this.node;e&&(e.context=t);}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t);}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t);}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t);}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t);}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t);}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}));}}/**
|
|
6927
6921
|
* @license
|
|
6928
6922
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6929
6923
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6930
|
-
*/const
|
|
6924
|
+
*/const r_=s=>class extends xa(s){static get properties(){return {tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged",sync:!0},_lastTabIndex:{type:Number}}}_disabledChanged(e,i){super._disabledChanged(e,i),!this.__shouldAllowFocusWhenDisabled()&&(e?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.setAttribute("tabindex","-1")):i&&(this._lastTabIndex!==void 0?this.setAttribute("tabindex",this._lastTabIndex):this.tabindex=void 0));}_tabindexChanged(e){this.__shouldAllowFocusWhenDisabled()||this.disabled&&e!==-1&&(this._lastTabIndex=e,this.setAttribute("tabindex","-1"));}focus(){(!this.disabled||this.__shouldAllowFocusWhenDisabled())&&super.focus();}__shouldAllowFocusWhenDisabled(){return !1}};/**
|
|
6931
6925
|
* @license
|
|
6932
6926
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6933
6927
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6934
|
-
*/const
|
|
6928
|
+
*/const n_=L(s=>class extends Ca(r_(s)){static get properties(){return {autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged",sync:!0},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this);}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame(()=>{this.focus(),this.setAttribute("focus-ring","");});}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus();}blur(){this.focusElement&&this.focusElement.blur();}click(){this.focusElement&&!this.disabled&&this.focusElement.click();}_focusElementChanged(e,i){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):i&&this._removeFocusListeners(i);}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus);}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus);}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"));}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"));}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,i){super._disabledChanged(e,i),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur();}_tabindexChanged(e){this.__forwardTabIndex(e);}__forwardTabIndex(e){e!==void 0&&this.focusElement&&(this.focusElement.tabIndex=e,e!==-1&&(this.tabindex=void 0)),this.disabled&&e&&(e!==-1&&(this._lastTabIndex=e),this.tabindex=void 0),e===void 0&&this.hasAttribute("tabindex")&&this.removeAttribute("tabindex");}});/**
|
|
6935
6929
|
* @license
|
|
6936
6930
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6937
6931
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6938
|
-
*/const
|
|
6932
|
+
*/const Si=new WeakMap;function a_(s){return Si.has(s)||Si.set(s,new Set),Si.get(s)}function l_(s,t){const e=document.createElement("style");e.textContent=s,t===document?document.head.appendChild(e):t.insertBefore(e,t.firstChild);}const d_=L(s=>class extends s{get slotStyles(){return []}connectedCallback(){super.connectedCallback(),this.__applySlotStyles();}__applySlotStyles(){const e=this.getRootNode(),i=a_(e);this.slotStyles.forEach(o=>{i.has(o)||(l_(o,e),i.add(o));});}});/**
|
|
6939
6933
|
* @license
|
|
6940
6934
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6941
6935
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6942
|
-
*/const
|
|
6936
|
+
*/const h_=s=>class extends ho(lo(s)){static get properties(){return {clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",e=>this._onClearButtonMouseDown(e)),this.clearElement.addEventListener("click",e=>this._onClearButtonClick(e)));}_onClearButtonClick(e){e.preventDefault(),this._onClearAction();}_onClearButtonMouseDown(e){e.preventDefault(),ls||this.inputElement.focus();}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}));}};/**
|
|
6943
6937
|
* @license
|
|
6944
6938
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
6945
6939
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6946
|
-
*/const
|
|
6940
|
+
*/const ki=new Map;function uo(s){return ki.has(s)||ki.set(s,new WeakMap),ki.get(s)}function Ia(s,t){s&&s.removeAttribute(t);}function Aa(s,t){if(!s||!t)return;const e=uo(t);if(e.has(s))return;const i=no(s.getAttribute(t));e.set(s,new Set(i));}function c_(s,t){if(!s||!t)return;const e=uo(t),i=e.get(s);!i||i.size===0?s.removeAttribute(t):ca(s,t,Jt(i)),e.delete(s);}function Ti(s,t,e={newId:null,oldId:null,fromUser:!1}){if(!s||!t)return;const{newId:i,oldId:o,fromUser:r}=e,n=uo(t),a=n.get(s);if(!r&&a){o&&a.delete(o),i&&a.add(i);return}r&&(a?i||n.delete(s):Aa(s,t),Ia(s,t)),cp(s,t,o);const l=i||Jt(a);l&&ca(s,t,l);}function u_(s,t){Aa(s,t),Ia(s,t);}/**
|
|
6947
6941
|
* @license
|
|
6948
6942
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6949
6943
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6950
|
-
*/class
|
|
6944
|
+
*/class p_{constructor(t){this.host=t,this.__required=!1;}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),this.__labelIdFromUser!=null&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label);}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t;}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t;}setLabelId(t,e=!1){const i=e?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(t,i,e),e?this.__labelIdFromUser=t:this.__labelId=t;}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t;}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t;}__setAriaLabelToAttribute(t){this.__target&&(t?(u_(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(c_(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")));}__setLabelIdToAriaAttribute(t,e,i){Ti(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i});}__setErrorIdToAriaAttribute(t,e){Ti(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setHelperIdToAriaAttribute(t,e){Ti(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")));}}/**
|
|
6951
6945
|
* @license
|
|
6952
6946
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
6953
6947
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6954
|
-
*/class po extends
|
|
6948
|
+
*/class po extends ei{constructor(t,e,i,o={}){super(t,e,i,ze(H({},o),{useUniqueId:!0}));}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t);}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node));}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t);}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(e=>{e.forEach(i=>{const o=i.target,r=o===this.node;i.type==="attributes"?r&&this.__updateNodeId(o):(r||o.parentElement===this.node)&&this.__notifyChange(this.node);});}),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0});}__hasContent(t){return t?t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&t.textContent.trim()!=="":!1}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}));}__updateNodeId(t){const e=!this.nodes||t===this.nodes[0];t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||e)&&!t.id&&(t.id=this.defaultId);}}/**
|
|
6955
6949
|
* @license
|
|
6956
6950
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6957
6951
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6958
|
-
*/class
|
|
6952
|
+
*/class __ extends po{constructor(t){super(t,"error-message","div");}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node);}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node);}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t);}initNode(t){this.updateDefaultNode(t);}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t);}restoreDefaultNode(){this.attachDefaultNode();}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,o=!!(i&&e&&e.trim()!=="");t&&(t.textContent=o?e:"",t.hidden=!o,o&&wt(e,{mode:"assertive"})),super.updateDefaultNode(t);}}/**
|
|
6959
6953
|
* @license
|
|
6960
6954
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6961
6955
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6962
|
-
*/class
|
|
6956
|
+
*/class m_ extends po{constructor(t){super(t,"helper",null);}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{helperText:t}=this;if(t&&t.trim()!==""){this.tagName="div";const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}}/**
|
|
6963
6957
|
* @license
|
|
6964
6958
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6965
6959
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6966
|
-
*/class
|
|
6960
|
+
*/class f_ extends po{constructor(t){super(t,"label","label");}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{label:t}=this;if(t&&t.trim()!==""){const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}}/**
|
|
6967
6961
|
* @license
|
|
6968
6962
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6969
6963
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6970
|
-
*/const
|
|
6964
|
+
*/const v_=L(s=>class extends Zt(s){static get properties(){return {label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new f_(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent);});}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController);}_labelChanged(e){this._labelController.setLabel(e);}});/**
|
|
6971
6965
|
* @license
|
|
6972
6966
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6973
6967
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6974
|
-
*/const
|
|
6968
|
+
*/const g_=s=>class extends co(v_(Zt(s))){static get properties(){return {ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return ["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new p_(this),this._helperController=new m_(this),this._errorController=new __(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent);}),this._labelController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.__labelChanged(i,o);}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.toggleAttribute("has-helper",i),this.__helperChanged(i,o);});}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController);}__helperChanged(e,i){e?this._fieldAriaController.setHelperId(i.id):this._fieldAriaController.setHelperId(null);}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e);}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0);}__labelChanged(e,i){e?this._fieldAriaController.setLabelId(i.id):this._fieldAriaController.setLabelId(null);}_errorMessageChanged(e){this._errorController.setErrorMessage(e);}_helperTextChanged(e){this._helperController.setHelperText(e);}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e);}_requiredChanged(e){this._fieldAriaController.setRequired(e);}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){const i=this._errorNode;this._fieldAriaController.setErrorId(i&&i.id);}else this._fieldAriaController.setErrorId(null);});}};/**
|
|
6975
6969
|
* @license
|
|
6976
6970
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6977
6971
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6978
|
-
*/const
|
|
6972
|
+
*/const b_=L(s=>class extends s{static get properties(){return {stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return []}static get delegateProps(){return []}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver();}_stateTargetChanged(e){e&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated());}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`);}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`);}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach(e=>{this._delegateAttribute(e,this[e]);});}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(e=>{this._delegateProperty(e,this[e]);});}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach((i,o)=>{this._delegateAttribute(i,e[o]);});}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((i,o)=>{this._delegateProperty(i,e[o]);});}_delegateAttribute(e,i){this.stateTarget&&(e==="invalid"&&this._delegateAttribute("aria-invalid",i?"true":!1),typeof i=="boolean"?this.stateTarget.toggleAttribute(e,i):i?this.stateTarget.setAttribute(e,i):this.stateTarget.removeAttribute(e));}_delegateProperty(e,i){this.stateTarget&&(this.stateTarget[e]=i);}});/**
|
|
6979
6973
|
* @license
|
|
6980
6974
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6981
6975
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6982
|
-
*/const
|
|
6976
|
+
*/const y_=L(s=>class extends b_(co(ho(s))){static get constraints(){return ["required"]}static get delegateAttrs(){return [...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver();}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map(e=>this[e]))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some(i=>this.__isValidConstraint(i))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`);}_constraintsChanged(e,...i){if(!e)return;const o=this._hasValidConstraints(i),r=this.__previousHasConstraints&&!o;(this._hasValue||this.invalid)&&o?this._requestValidation():r&&!this.manualValidation&&this._setInvalid(!1),this.__previousHasConstraints=o;}_onChange(e){e.stopPropagation(),this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}));}__isValidConstraint(e){return !!e||e===0}});/**
|
|
6983
6977
|
* @license
|
|
6984
6978
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6985
6979
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6986
|
-
*/const
|
|
6980
|
+
*/const x_=s=>class extends d_(n_(y_(g_(h_(lo(s)))))){static get properties(){return {allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return [...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this);}get slotStyles(){return [`
|
|
6987
6981
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
6988
6982
|
font: inherit;
|
|
6989
6983
|
color: inherit;
|
|
6990
6984
|
}
|
|
6991
|
-
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select();}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput);}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented());}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=N.debounce(this._preventInputDebouncer,
|
|
6985
|
+
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select();}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput);}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented());}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=N.debounce(this._preventInputDebouncer,Ct.after(200),()=>{this.removeAttribute("input-prevented");});}__shouldAcceptKey(e){return e.metaKey||e.ctrlKey||!e.key||e.key.length!==1||this.__allowedCharRegExp.test(e.key)}_onPaste(e){if(this.allowedCharPattern){const i=e.clipboardData.getData("text");this.__allowedTextRegExp.test(i)||(e.preventDefault(),this._markInputPrevented());}}_onDrop(e){if(this.allowedCharPattern){const i=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(i)||(e.preventDefault(),this._markInputPrevented());}}_onBeforeInput(e){this.allowedCharPattern&&e.data&&!this.__allowedTextRegExp.test(e.data)&&(e.preventDefault(),this._markInputPrevented());}_allowedCharPatternChanged(e){if(e)try{this.__allowedCharRegExp=new RegExp(`^${e}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${e}*$`,"u");}catch(i){console.error(i);}}};/**
|
|
6992
6986
|
* @license
|
|
6993
6987
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6994
6988
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6995
|
-
*/class
|
|
6989
|
+
*/class C_ extends ei{constructor(t,e,i={}){const{uniqueIdPrefix:o}=i;super(t,"input","input",{initializer:(r,n)=>{n.value&&(r.value=n.value),n.type&&r.setAttribute("type",n.type),r.id=this.defaultId,typeof e=="function"&&e(r);},useUniqueId:!0,uniqueIdPrefix:o});}}/**
|
|
6996
6990
|
* @license
|
|
6997
6991
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6998
6992
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6999
|
-
*/class
|
|
6993
|
+
*/class w_{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",i=>{this.__initLabel(i.detail.node);}),this.__initLabel(e.node);}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id));}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t);};this.input.addEventListener("click",t);}}/**
|
|
7000
6994
|
* @license
|
|
7001
6995
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7002
6996
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7003
|
-
*/const
|
|
6997
|
+
*/const I_=s=>class extends x_(i_(s)){static get properties(){return {autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged",sync:!0},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged",sync:!0},autoOpenDisabled:{type:Boolean,sync:!0},clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1,sync:!0},items:{type:Array,sync:!0},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged",sync:!0},itemLabelPath:{type:String,value:"label",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},overlayClass:{type:String,sync:!0},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0,sync:!0},selectedItems:{type:Array,value:()=>[],notify:!0,sync:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0},size:{type:Number,sync:!0},pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},dataProvider:{type:Object,sync:!0},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged",sync:!0},renderer:{type:Function,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},filteredItems:{type:Array,sync:!0},selectedItemsOnTop:{type:Boolean,value:!1,sync:!0},value:{type:String},_overflowItems:{type:Array,value:()=>[],sync:!0},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String,sync:!0},_topGroup:{type:Array}}}static get observers(){return ["_selectedItemsChanged(selectedItems)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){const e=this.localName;return [...super.slotStyles,`
|
|
7004
6998
|
${e}[has-value] input::placeholder {
|
|
7005
6999
|
color: transparent !important;
|
|
7006
7000
|
forced-color-adjust: none;
|
|
7007
7001
|
}
|
|
7008
|
-
`]}get clearElement(){return this.$.clearButton}get _chips(){return [...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new
|
|
7002
|
+
`]}get clearElement(){return this.$.clearButton}get _chips(){return [...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new C_(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new w_(this.inputElement,this._labelController)),this._tooltipController=new o_(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new ei(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:e=>{e.addEventListener("mousedown",i=>this._preventBlur(i)),this._overflow=e;}}),this.addController(this._overflowController),this.__updateChips(),wa(this);}checkValidity(){return this.required&&!this.readonly?this._hasValue:!0}clear(){this.__updateSelection([]),wt(this.i18n.cleared);}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache();}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate();}_disabledChanged(e,i){super._disabledChanged(e,i),(e||i)&&this.__updateChips();}_inputElementChanged(e){super._inputElementChanged(e),e&&this.$.comboBox._setInputElement(e);}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&(this._focusedChipIndex=-1,this._requestValidation());}_onResize(){this.__updateChips();}_delegateAttribute(e,i){if(this.stateTarget){if(e==="required"){this._delegateAttribute("aria-required",i?"true":!1);return}super._delegateAttribute(e,i);}}_autoExpandHorizontallyChanged(e,i){(e||i)&&this.__updateChips();}_autoExpandVerticallyChanged(e,i){(e||i)&&this.__updateChips();}_clearButtonVisibleChanged(e,i){(e||i)&&this.__updateChips();}_onFilteredItemsChanged(e){const{value:i}=e.detail;(Array.isArray(i)||i==null)&&(this.filteredItems=i);}_readonlyChanged(e,i){(e||i)&&this.__updateChips(),this.dataProvider&&this.clearCache();}__itemClassNameGeneratorChanged(e,i){(e||i)&&this.__updateChips();}_pageSizeChanged(e,i){(Math.floor(e)!==e||e<=0)&&(this.pageSize=i,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize;}_placeholderChanged(e){const i=this.__tmpA11yPlaceholder;i!==e&&(this.__savedPlaceholder=e,i&&(this.placeholder=i));}_selectedItemsChanged(e){if(this._toggleHasValue(this._hasValue),this._hasValue){const i=this._mergeItemLabels(e);this.__tmpA11yPlaceholder===void 0&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=i,this.placeholder=i;}else this.__tmpA11yPlaceholder!==void 0&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox._updateOverlayWidth();}_getItemLabel(e){return this.$.comboBox._getItemLabel(e)}_mergeItemLabels(e){return e.map(i=>this._getItemLabel(i)).join(", ")}_findIndex(e,i,o){if(o&&e){for(let r=0;r<i.length;r++)if(i[r]&&i[r][o]===e[o])return r;return -1}return i.indexOf(e)}__clearInternalValue(e=!1){!this.keepFilter||e?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter);}__announceItem(e,i,o){const r=i?"selected":"deselected",n=this.i18n.total.replace("{count}",o||0);wt(`${e} ${this.i18n[r]} ${n}`);}__removeItem(e){const i=[...this.selectedItems];i.splice(i.indexOf(e),1),this.__updateSelection(i);const o=this._getItemLabel(e);this.__announceItem(o,!1,i.length);}__selectItem(e){const i=[...this.selectedItems],o=this._findIndex(e,i,this.itemIdPath),r=this._getItemLabel(e);let n=!1;if(o!==-1){const a=this._lastFilter;if(a&&a.toLowerCase()===r.toLowerCase()){this.__clearInternalValue();return}i.splice(o,1);}else i.push(e),n=!0;this.__updateSelection(i),this.__clearInternalValue(),this.__announceItem(r,n,i.length);}__updateSelection(e){this.selectedItems=e,this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}));}__updateTopGroup(e,i,o){e?(!o||this.__needToSyncTopGroup())&&(this._topGroup=[...i]):this._topGroup=[];}__needToSyncTopGroup(){return this.itemIdPath?this._topGroup&&this._topGroup.some(e=>{const i=this.selectedItems[this._findIndex(e,this.selectedItems,this.itemIdPath)];return i&&e!==i}):!1}__createChip(e){const i=document.createElement("vaadin-multi-select-combo-box-chip");i.setAttribute("slot","chip"),i.item=e,i.disabled=this.disabled,i.readonly=this.readonly;const o=this._getItemLabel(e);return i.label=o,i.setAttribute("title",o),typeof this.itemClassNameGenerator=="function"&&(i.className=this.itemClassNameGenerator(e)),i.addEventListener("item-removed",r=>this._onItemRemoved(r)),i.addEventListener("mousedown",r=>this._preventBlur(r)),i}__getOverflowWidth(){const e=this._overflow;e.style.visibility="hidden",e.removeAttribute("hidden");const i=e.getAttribute("count");e.setAttribute("count","99");const o=getComputedStyle(e),r=e.clientWidth+parseInt(o.marginInlineStart);return e.setAttribute("count",i),e.setAttribute("hidden",""),e.style.visibility="",r}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach(a=>{a.remove();});const e=[...this.selectedItems],i=this._inputField.$.wrapper.clientWidth,o=parseInt(getComputedStyle(this.inputElement).flexBasis);let r=i-o;e.length>1&&(r-=this.__getOverflowWidth());const n=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const a=[];for(let h=e.length-1,c=null;h>=0;h--){const u=this.__createChip(e[h]);this.insertBefore(u,c),c=u,a.unshift(u);}const l=[],d=this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth;if(!this.autoExpandVertically&&d<o){for(;a.length>1;){a.pop().remove(),l.unshift(e.pop());const c=l.length>0?o+this.__getOverflowWidth():o;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=c)break}a.length===1&&(a[0].style.maxWidth=`${Math.max(n,r)}px`);}this._overflowItems=l;return}for(let a=e.length-1,l=null;a>=0;a--){const d=this.__createChip(e[a]);if(this.insertBefore(d,l),!this.autoExpandVertically){if(this.$.chips.clientWidth>r&&(r<n||l!==null)){d.remove();break}d.style.maxWidth=`${r}px`;}e.pop(),l=d;}this._overflowItems=e;}__updateOverflowChip(e,i,o,r){if(e){const n=i.length;e.label=`${n}`,e.setAttribute("count",`${n}`),e.setAttribute("title",this._mergeItemLabels(i)),e.toggleAttribute("hidden",n===0),e.disabled=o,e.readonly=r;}}_onClearButtonTouchend(e){e.preventDefault(),e.stopPropagation(),this.clear();}_onClearButtonClick(e){e.stopPropagation(),this.clear();}_onChange(e){e.stopPropagation();}_onEscape(e){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(e.stopPropagation(),this.selectedItems=[]);}_onKeyDown(e){super._onKeyDown(e);const i=this._chips;if(!this.readonly&&i.length>0)switch(e.key){case"Backspace":this._onBackSpace(i);break;case"ArrowLeft":this._onArrowLeft(i,e);break;case"ArrowRight":this._onArrowRight(i,e);break;default:this._focusedChipIndex=-1;break}}_onArrowLeft(e,i){if(this.inputElement.selectionStart!==0)return;const o=this._focusedChipIndex;o!==-1&&i.preventDefault();let r;this.__isRTL?o===e.length-1?r=-1:o>-1&&(r=o+1):o===-1?r=e.length-1:o>0&&(r=o-1),r!==void 0&&(this._focusedChipIndex=r);}_onArrowRight(e,i){if(this.inputElement.selectionStart!==0)return;const o=this._focusedChipIndex;o!==-1&&i.preventDefault();let r;this.__isRTL?o===-1?r=e.length-1:o>0&&(r=o-1):o===e.length-1?r=-1:o>-1&&(r=o+1),r!==void 0&&(this._focusedChipIndex=r);}_onBackSpace(e){if(this.inputElement.selectionStart!==0)return;const i=this._focusedChipIndex;i===-1?this._focusedChipIndex=e.length-1:(this.__removeItem(e[i].item),this._focusedChipIndex=-1);}_focusedChipIndexChanged(e,i){if(e>-1||i>-1){const o=this._chips;if(o.forEach((r,n)=>{r.toggleAttribute("focused",n===e);}),e>-1){const r=o[e].item,n=this._getItemLabel(r);wt(`${n} ${this.i18n.focused}`);}}}_onComboBoxChange(){const e=this.$.comboBox.selectedItem;e&&this.__selectItem(e);}_onComboBoxItemSelected(e){this.__selectItem(e.detail.item);}_onCustomValueSet(e){e.preventDefault(),e.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:e.detail,composed:!0,bubbles:!0}));}_onItemRemoved(e){this.__removeItem(e.detail.item);}_preventBlur(e){e.preventDefault();}};/**
|
|
7009
7003
|
* @license
|
|
7010
7004
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7011
7005
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7012
|
-
*/
|
|
7006
|
+
*/I("vaadin-multi-select-combo-box",[t_,Ku],{moduleId:"vaadin-multi-select-combo-box-styles"});class A_ extends I_(Oe(Jp(y))){static get is(){return "vaadin-multi-select-combo-box"}static get template(){return b`
|
|
7013
7007
|
<div class="vaadin-multi-select-combo-box-container">
|
|
7014
7008
|
<div part="label">
|
|
7015
7009
|
<slot name="label"></slot>
|
|
@@ -7080,7 +7074,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7080
7074
|
</div>
|
|
7081
7075
|
|
|
7082
7076
|
<slot name="tooltip"></slot>
|
|
7083
|
-
`}}
|
|
7077
|
+
`}}J(A_);f("vaadin-notification-card",p`
|
|
7084
7078
|
:host {
|
|
7085
7079
|
position: relative;
|
|
7086
7080
|
margin: var(--lumo-space-s);
|
|
@@ -7298,11 +7292,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7298
7292
|
* @license
|
|
7299
7293
|
* Copyright 2020 Google LLC
|
|
7300
7294
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
7301
|
-
*/const
|
|
7295
|
+
*/const E_=(s,t)=>(s==null?void 0:s._$litType$)!==void 0;/**
|
|
7302
7296
|
* @license
|
|
7303
7297
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7304
7298
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7305
|
-
*/class
|
|
7299
|
+
*/class S_ extends On(E(X(y))){static get template(){return b`
|
|
7306
7300
|
<style>
|
|
7307
7301
|
:host {
|
|
7308
7302
|
position: fixed;
|
|
@@ -7369,7 +7363,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7369
7363
|
<div region="bottom-end"><slot name="bottom-end"></slot></div>
|
|
7370
7364
|
</div>
|
|
7371
7365
|
<div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
|
|
7372
|
-
`}static get is(){return "vaadin-notification-container"}static get properties(){return {opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),$s&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener));}_detectIosNavbar(){const t=window.innerHeight,i=window.innerWidth>t,o=document.documentElement.clientHeight;i&&o>t?this.style.bottom=`${o-t}px`:this.style.bottom="0";}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault();}}class
|
|
7366
|
+
`}static get is(){return "vaadin-notification-container"}static get properties(){return {opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),$s&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener));}_detectIosNavbar(){const t=window.innerHeight,i=window.innerWidth>t,o=document.documentElement.clientHeight;i&&o>t?this.style.bottom=`${o-t}px`:this.style.bottom="0";}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault();}}class k_ extends E(y){static get template(){return b`
|
|
7373
7367
|
<style>
|
|
7374
7368
|
:host {
|
|
7375
7369
|
display: block;
|
|
@@ -7391,14 +7385,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7391
7385
|
<slot></slot>
|
|
7392
7386
|
</div>
|
|
7393
7387
|
</div>
|
|
7394
|
-
`}static get is(){return "vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite");}}class
|
|
7388
|
+
`}static get is(){return "vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite");}}class Y extends Yt(Sr(X(y))){static get template(){return b`
|
|
7395
7389
|
<style>
|
|
7396
7390
|
:host {
|
|
7397
7391
|
display: none !important;
|
|
7398
7392
|
}
|
|
7399
7393
|
</style>
|
|
7400
7394
|
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
7401
|
-
`}static get is(){return "vaadin-notification"}static get properties(){return {duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return ["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return
|
|
7395
|
+
`}static get is(){return "vaadin-notification"}static get properties(){return {duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return ["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return E_(t)?Y._createAndShowNotification(i=>{Er(t,i);},e):Y._createAndShowNotification(i=>{i.innerText=t;},e)}static _createAndShowNotification(t,e){const i=document.createElement(Y.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",o=>{o.detail.value||i.remove();}),i}get _container(){return Y._container||(Y._container=document.createElement("vaadin-notification-container"),document.body.appendChild(Y._container)),Y._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),eo(this);}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected||(this.opened=!1);});}requestContentUpdate(){this.renderer&&this.renderer(this._card,this);}_rendererChanged(t,e,i){if(!i)return;const o=this._oldRenderer!==t;this._oldRenderer=t,o&&(i.innerHTML="",delete i._$litPart$),e&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate());}open(){this.opened=!0;}close(){this.opened=!1;}_openedChanged(t){t?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard();}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener);}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1;}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)){console.warn(`Invalid alignment parameter provided: position=${this.position}`);return}this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card);}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"));}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard();}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");t&&t!=="none"?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState();},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard();}_positionChanged(){this.opened&&this._animatedAppendNotificationCard();}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout(()=>this.close(),t)));}}x(S_);x(k_);x(Y);const Ea=p`
|
|
7402
7396
|
:host {
|
|
7403
7397
|
-webkit-tap-highlight-color: transparent;
|
|
7404
7398
|
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
@@ -7412,11 +7406,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7412
7406
|
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
7413
7407
|
background-color: var(--lumo-contrast-10pct);
|
|
7414
7408
|
}
|
|
7415
|
-
`;f("vaadin-list-box",
|
|
7409
|
+
`;f("vaadin-list-box",Ea,{moduleId:"lumo-list-box"});/**
|
|
7416
7410
|
* @license
|
|
7417
7411
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7418
7412
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7419
|
-
*/f("vaadin-select-item",Zs,{moduleId:"lumo-select-item"});f("vaadin-select-list-box",
|
|
7413
|
+
*/f("vaadin-select-item",Zs,{moduleId:"lumo-select-item"});f("vaadin-select-list-box",Ea,{moduleId:"lumo-select-list-box"});const T_=p`
|
|
7420
7414
|
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
7421
7415
|
text-align: start;
|
|
7422
7416
|
}
|
|
@@ -7459,7 +7453,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7459
7453
|
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
7460
7454
|
--_lumo-selected-item-padding: 0;
|
|
7461
7455
|
}
|
|
7462
|
-
`;f("vaadin-select",[
|
|
7456
|
+
`;f("vaadin-select",[Pe,T_],{moduleId:"lumo-select"});f("vaadin-select-value-button",p`
|
|
7463
7457
|
:host {
|
|
7464
7458
|
font-family: var(--lumo-font-family);
|
|
7465
7459
|
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
@@ -7478,7 +7472,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7478
7472
|
::slotted(*:hover) {
|
|
7479
7473
|
background-color: transparent;
|
|
7480
7474
|
}
|
|
7481
|
-
`,{moduleId:"lumo-select-value-button"});const
|
|
7475
|
+
`,{moduleId:"lumo-select-value-button"});const P_=p`
|
|
7482
7476
|
:host {
|
|
7483
7477
|
--_lumo-item-selected-icon-display: block;
|
|
7484
7478
|
}
|
|
@@ -7514,15 +7508,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7514
7508
|
:host([theme~='align-center']) {
|
|
7515
7509
|
text-align: center;
|
|
7516
7510
|
}
|
|
7517
|
-
`;f("vaadin-select-overlay",[
|
|
7511
|
+
`;f("vaadin-select-overlay",[Bs,P_],{moduleId:"lumo-select-overlay"});/**
|
|
7518
7512
|
* @license
|
|
7519
7513
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7520
7514
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7521
|
-
*/const
|
|
7515
|
+
*/const O_=s=>class extends ks(fe(s)){static get properties(){return {_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return ["Enter"," "]}get value(){return this._value!==void 0?this._value:this.textContent.trim()}set value(e){this._value=e;}ready(){super.ready();const e=this.getAttribute("value");e!==null&&(this.value=e);}focus(){this.disabled||(super.focus(),this._setFocused(!0));}_shouldSetActive(e){return !this.disabled&&!(e.type==="keydown"&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e);}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.blur());}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click());}};/**
|
|
7522
7516
|
* @license
|
|
7523
7517
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7524
7518
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7525
|
-
*/class
|
|
7519
|
+
*/class D_ extends O_(E($(y))){static get is(){return "vaadin-select-item"}static get template(){return b`
|
|
7526
7520
|
<style>
|
|
7527
7521
|
:host {
|
|
7528
7522
|
display: inline-block;
|
|
@@ -7536,23 +7530,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7536
7530
|
<div part="content">
|
|
7537
7531
|
<slot></slot>
|
|
7538
7532
|
</div>
|
|
7539
|
-
`}ready(){super.ready(),this.setAttribute("role","option");}}
|
|
7533
|
+
`}ready(){super.ready(),this.setAttribute("role","option");}}x(D_);/**
|
|
7540
7534
|
* @license
|
|
7541
7535
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7542
7536
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7543
|
-
*/function
|
|
7537
|
+
*/function z_(s,t){const{scrollLeft:e}=s;return t!=="rtl"?e:s.scrollWidth-s.clientWidth+e}function M_(s,t,e){t!=="rtl"?s.scrollLeft=e:s.scrollLeft=s.clientWidth-s.scrollWidth+e;}/**
|
|
7544
7538
|
* @license
|
|
7545
7539
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
7546
7540
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7547
|
-
*/const
|
|
7541
|
+
*/const N_=s=>class extends me(s){get focused(){return (this._getItems()||[]).find(Os)}get _vertical(){return !0}focus(){const e=this._getItems();if(Array.isArray(e)){const i=this._getAvailableIndex(e,0,null,o=>!Wi(o));i>=0&&this._focus(i);}}_getItems(){return Array.from(this.children)}_onKeyDown(e){if(super._onKeyDown(e),e.metaKey||e.ctrlKey)return;const{key:i}=e,o=this._getItems()||[],r=o.indexOf(this.focused);let n,a;const d=!this._vertical&&this.getAttribute("dir")==="rtl"?-1:1;this.__isPrevKey(i)?(a=-d,n=r-d):this.__isNextKey(i)?(a=d,n=r+d):i==="Home"?(a=1,n=0):i==="End"&&(a=-1,n=o.length-1),n=this._getAvailableIndex(o,n,a,h=>!Wi(h)),n>=0&&(e.preventDefault(),this._focus(n,!0));}__isPrevKey(e){return this._vertical?e==="ArrowUp":e==="ArrowLeft"}__isNextKey(e){return this._vertical?e==="ArrowDown":e==="ArrowRight"}_focus(e,i=!1){const o=this._getItems();this._focusItem(o[e],i);}_focusItem(e){e&&(e.focus(),e.setAttribute("focus-ring",""));}_getAvailableIndex(e,i,o,r){const n=e.length;let a=i;for(let l=0;typeof a=="number"&&l<n;l+=1,a+=o||1){a<0?a=n-1:a>=n&&(a=0);const d=e[a];if(!d.hasAttribute("disabled")&&this.__isMatchingItem(d,r))return a}return -1}__isMatchingItem(e,i){return typeof i=="function"?i(e):!0}};/**
|
|
7548
7542
|
* @license
|
|
7549
7543
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7550
7544
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7551
|
-
*/const
|
|
7545
|
+
*/const L_=s=>class extends N_(s){static get properties(){return {disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return ["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return !this._vertical&&this.getAttribute("dir")==="rtl"}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return this.orientation!=="horizontal"}focus(){this._observer&&this._observer.flush();const e=Array.isArray(this.items)?this.items:[],i=this._getAvailableIndex(e,0,null,o=>o.tabIndex===0&&!Wi(o));i>=0?this._focus(i):super.focus();}ready(){super.ready(),this.addEventListener("click",i=>this._onClick(i));const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new ws(e,()=>{this._setItems(this._filterItems(cn(this)));});}_getItems(){return this.items}_enhanceItems(e,i,o,r){if(!r&&e){this.setAttribute("aria-orientation",i||"vertical"),e.forEach(a=>{i?a.setAttribute("orientation",i):a.removeAttribute("orientation");}),this._setFocusable(o<0||!o?0:o);const n=e[o];e.forEach(a=>{a.selected=a===n;}),n&&!n.disabled&&this._scrollToItem(o);}}_filterItems(e){return e.filter(i=>i._hasVaadinItemMixin)}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const i=this._filterItems(e.composedPath())[0];let o;i&&!i.disabled&&(o=this.items.indexOf(i))>=0&&(this.selected=o);}_searchKey(e,i){this._searchReset=z.debounce(this._searchReset,te.after(500),()=>{this._searchBuf="";}),this._searchBuf+=i.toLowerCase(),this.items.some(r=>this.__isMatchingKey(r))||(this._searchBuf=i.toLowerCase());const o=this._searchBuf.length===1?e+1:e;return this._getAvailableIndex(this.items,o,1,r=>this.__isMatchingKey(r)&&getComputedStyle(r).display!=="none")}__isMatchingKey(e){return e.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(e){if(e.metaKey||e.ctrlKey)return;const i=e.key,o=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(i)&&i.length===1){const r=this._searchKey(o,i);r>=0&&this._focus(r);return}super._onKeyDown(e);}_isItemHidden(e){return getComputedStyle(e).display==="none"}_setFocusable(e){e=this._getAvailableIndex(this.items,e,1);const i=this.items[e];this.items.forEach(o=>{o.tabIndex=o===i?0:-1;});}_focus(e){this.items.forEach((i,o)=>{i.focused=o===e;}),this._setFocusable(e),this._scrollToItem(e),super._focus(e);}_scrollToItem(e){const i=this.items[e];if(!i)return;const o=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],r=this._scrollerElement.getBoundingClientRect(),n=(this.items[e+1]||i).getBoundingClientRect(),a=(this.items[e-1]||i).getBoundingClientRect();let l=0;!this._isRTL&&n[o[1]]>=r[o[1]]||this._isRTL&&n[o[1]]<=r[o[1]]?l=n[o[1]]-r[o[1]]:(!this._isRTL&&a[o[0]]<=r[o[0]]||this._isRTL&&a[o[0]]>=r[o[0]])&&(l=a[o[0]]-r[o[0]]),this._scroll(l);}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else {const i=this.getAttribute("dir")||"ltr",o=z_(this._scrollerElement,i)+e;M_(this._scrollerElement,i,o);}}};/**
|
|
7552
7546
|
* @license
|
|
7553
7547
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7554
7548
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7555
|
-
*/class
|
|
7549
|
+
*/class V_ extends L_(E($(oe(y)))){static get is(){return "vaadin-select-list-box"}static get template(){return b`
|
|
7556
7550
|
<style>
|
|
7557
7551
|
:host {
|
|
7558
7552
|
display: flex;
|
|
@@ -7572,15 +7566,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7572
7566
|
<div part="items">
|
|
7573
7567
|
<slot></slot>
|
|
7574
7568
|
</div>
|
|
7575
|
-
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}
|
|
7569
|
+
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}x(V_);/**
|
|
7576
7570
|
* @license
|
|
7577
7571
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7578
7572
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7579
|
-
*/const
|
|
7573
|
+
*/const F_=s=>class extends qs(Hs($(s))){static get observers(){return ["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0;}_getMenuElement(){return Array.from(this.children).find(e=>e.localName!=="style")}_updateOverlayWidth(e,i){if(e&&i){const o="--vaadin-select-overlay-width",r=getComputedStyle(i).getPropertyValue(o);r===""?this.style.removeProperty(o):this.style.setProperty(o,r);}}};/**
|
|
7580
7574
|
* @license
|
|
7581
7575
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7582
7576
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7583
|
-
*/const
|
|
7577
|
+
*/const B_=p`
|
|
7584
7578
|
:host {
|
|
7585
7579
|
align-items: flex-start;
|
|
7586
7580
|
justify-content: flex-start;
|
|
@@ -7595,18 +7589,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7595
7589
|
outline: 3px solid;
|
|
7596
7590
|
}
|
|
7597
7591
|
}
|
|
7598
|
-
`;f("vaadin-select-overlay",[
|
|
7592
|
+
`;f("vaadin-select-overlay",[Rs,B_],{moduleId:"vaadin-select-overlay-styles"});class R_ extends F_(E(y)){static get is(){return "vaadin-select-overlay"}static get template(){return b`
|
|
7599
7593
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
7600
7594
|
<div part="overlay" id="overlay" tabindex="0">
|
|
7601
7595
|
<div part="content" id="content">
|
|
7602
7596
|
<slot></slot>
|
|
7603
7597
|
</div>
|
|
7604
7598
|
</div>
|
|
7605
|
-
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this;}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t);}}}
|
|
7599
|
+
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this;}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t);}}}x(R_);/**
|
|
7606
7600
|
* @license
|
|
7607
7601
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7608
7602
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7609
|
-
*/const
|
|
7603
|
+
*/const $_=p`
|
|
7610
7604
|
:host {
|
|
7611
7605
|
display: inline-block;
|
|
7612
7606
|
position: relative;
|
|
@@ -7652,17 +7646,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7652
7646
|
* @license
|
|
7653
7647
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7654
7648
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7655
|
-
*/f("vaadin-select-value-button",
|
|
7649
|
+
*/f("vaadin-select-value-button",$_,{moduleId:"vaadin-select-value-button-styles"});class H_ extends Us(E(y)){static get is(){return "vaadin-select-value-button"}static get template(){return b`
|
|
7656
7650
|
<div class="vaadin-button-container">
|
|
7657
7651
|
<span part="label">
|
|
7658
7652
|
<slot></slot>
|
|
7659
7653
|
</span>
|
|
7660
7654
|
</div>
|
|
7661
|
-
`}}
|
|
7655
|
+
`}}x(H_);/**
|
|
7662
7656
|
* @license
|
|
7663
7657
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
7664
7658
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7665
|
-
*/const
|
|
7659
|
+
*/const q_=p`
|
|
7666
7660
|
.sr-only {
|
|
7667
7661
|
border: 0 !important;
|
|
7668
7662
|
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
@@ -7680,15 +7674,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7680
7674
|
* @license
|
|
7681
7675
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
7682
7676
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7683
|
-
*/class
|
|
7677
|
+
*/class U_ extends G{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(e,i)=>{i._setFocusElement(e),i.ariaTarget=e,i.stateTarget=e,e.setAttribute("aria-haspopup","listbox");}});}}/**
|
|
7684
7678
|
* @license
|
|
7685
7679
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7686
7680
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7687
|
-
*/const
|
|
7681
|
+
*/const W_=s=>class extends Yt(Ht(Ds(me(qt(s))))){static get properties(){return {items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return [...super.delegateAttrs,"invalid"]}static get observers(){return ["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${Rt()}`,this._srLabelController=new Cn(this),this._srLabelController.slotName="sr-label";}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1;}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new U_(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Ks(this._phoneMediaQuery,e=>{this._phone=e;})),this._tooltipController=new _e(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController);}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items));}_requiredChanged(e){super._requiredChanged(e),e===!1&&this.validate();}__itemsChanged(e,i){(e||i)&&this.requestContentUpdate();}_assignMenuElement(e){e&&e!==this.__lastMenuElement&&(this._menuElement=e,this.__initMenuItems(e),e.addEventListener("items-changed",()=>{this.__initMenuItems(e);}),e.addEventListener("selected-changed",()=>this.__updateValueButton()),e.addEventListener("keydown",i=>this._onKeyDownInside(i),!0),e.addEventListener("click",i=>{const o=i.composedPath().find(r=>r._hasVaadinItemMixin);this.__dispatchChangePending=!!(o&&o.value!==void 0&&o.value!==this.value),this.opened=!1;},!0),this.__lastMenuElement=e);}__initMenuItems(e){e.items&&(this._items=e.items);}_valueChanged(e,i){this.toggleAttribute("has-value",!!e),i!==void 0&&!this.__dispatchChangePending&&this.validate();}_onClick(e){this.disabled||(e.preventDefault(),this.opened=!this.readonly);}_onToggleMouseDown(e){e.preventDefault();}_onKeyDown(e){if(e.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(e.key))e.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(e.key)&&e.key.length===1){const i=this._menuElement.selected,o=i!==void 0?i:-1,r=this._menuElement._searchKey(o,e.key);r>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=r);}}}_onKeyDownInside(e){/^(Tab)$/u.test(e.key)&&(this.opened=!1);}_openedChanged(e,i,o){if(!(!i||!o)){if(e){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1),i.style.setProperty("--vaadin-select-text-field-width",`${o.offsetWidth}px`);const r=this.hasAttribute("focus-ring");this._openedWithFocusRing=r,r&&this.removeAttribute("focus-ring");}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=e;}}_updateAriaExpanded(e,i){i&&i.setAttribute("aria-expanded",e?"true":"false");}_updateAriaLive(e){this.focusElement&&(e?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"));}__attachSelectedItem(e){let i;const o=e.getAttribute("label");o?i=this.__createItemElement({label:o}):i=e.cloneNode(!0),i._sourceItem=e,this.__appendValueItemElement(i,this.focusElement),i.selected=!0;}__createItemElement(e){const i=document.createElement(e.component||"vaadin-select-item");return e.label&&(i.textContent=e.label),e.value&&(i.value=e.value),e.disabled&&(i.disabled=e.disabled),e.className&&(i.className=e.className),i}__appendValueItemElement(e,i){i.appendChild(e),e.removeAttribute("tabindex"),e.removeAttribute("aria-selected"),e.removeAttribute("role"),e.removeAttribute("focused"),e.removeAttribute("focus-ring"),e.removeAttribute("active"),e.setAttribute("id",this._itemId);}_accessibleNameChanged(e){this._srLabelController.setLabel(e),this._setCustomAriaLabelledBy(e?this._srLabelController.defaultId:null);}_accessibleNameRefChanged(e){this._setCustomAriaLabelledBy(e);}_setCustomAriaLabelledBy(e){const i=this._getLabelIdWithItemId(e);this._fieldAriaController.setLabelId(i,!0);}_getLabelIdWithItemId(e){const o=(this._items?this._items[this._menuElement.selected]:!1)||this.placeholder?this._itemId:"";return e?`${e} ${o}`.trim():null}__updateValueButton(){const e=this.focusElement;if(!e)return;e.innerHTML="";const i=this._items[this._menuElement.selected];if(e.removeAttribute("placeholder"),this._hasContent(i))this.__attachSelectedItem(i);else if(this.placeholder){const r=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(r,e),e.setAttribute("placeholder","");}!this._valueChanging&&i&&(this._selectedChanging=!0,this.value=i.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging);const o=i||this.placeholder?{newId:this._itemId}:{oldId:this._itemId};xt(e,"aria-labelledby",o),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId);}_hasContent(e){if(!e)return !1;const i=!!(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()),o=e.childElementCount>0;return i||o}_updateSelectedItem(e,i){if(i){const o=e==null?e:e.toString();this._menuElement.selected=i.reduce((r,n,a)=>r===void 0&&n.value===o?a:r,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging);}}_shouldRemoveFocus(){return !this.opened}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}checkValidity(){return !this.required||this.readonly||!!this.value}__defaultRenderer(e,i){if(!this.items||this.items.length===0){e.textContent="";return}let o=e.firstElementChild;o||(o=document.createElement("vaadin-select-list-box"),e.appendChild(o)),o.textContent="",this.items.forEach(r=>{o.appendChild(this.__createItemElement(r));});}__dispatchChange(){return Me(this,null,function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1;})}};/**
|
|
7688
7682
|
* @license
|
|
7689
7683
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7690
7684
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7691
|
-
*/f("vaadin-select",[
|
|
7685
|
+
*/f("vaadin-select",[$n,Hn,q_],{moduleId:"vaadin-select-styles"});class j_ extends W_(X(E(y))){static get is(){return "vaadin-select"}static get template(){return b`
|
|
7692
7686
|
<style>
|
|
7693
7687
|
:host {
|
|
7694
7688
|
position: relative;
|
|
@@ -7741,7 +7735,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7741
7735
|
<div class="sr-only">
|
|
7742
7736
|
<slot name="sr-label"></slot>
|
|
7743
7737
|
</div>
|
|
7744
|
-
`}static get observers(){return ["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),eo(this);}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate());}_onOverlayOpen(){this._menuElement&&this._menuElement.focus();}}
|
|
7738
|
+
`}static get observers(){return ["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),eo(this);}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate());}_onOverlayOpen(){this._menuElement&&this._menuElement.focus();}}x(j_);
|
|
7745
7739
|
|
|
7746
7740
|
function _typeof(o) {
|
|
7747
7741
|
"@babel/helpers - typeof";
|