@everymatrix/helper-filters 1.52.5 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-filters_2.cjs.entry.js +18 -14
- package/dist/collection/components/helper-filters/helper-filters.css +23 -23
- package/dist/collection/components/helper-filters/helper-filters.js +16 -12
- package/dist/esm/helper-filters_2.entry.js +18 -14
- package/dist/helper-filters/helper-filters.esm.js +1 -1
- package/dist/helper-filters/{p-372fbd31.entry.js → p-4d385172.entry.js} +49 -49
- package/dist/types/components/helper-filters/helper-filters.d.ts +3 -3
- package/package.json +1 -1
|
@@ -4,12 +4,12 @@ import{r as t,c as e,h as o}from"./p-da436b95.js";const i=["ro","en","hr"],s={en
|
|
|
4
4
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
5
5
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
6
|
*/
|
|
7
|
-
function
|
|
7
|
+
function a(t){const e=customElements.get(t.is);if(e){const o=e.version;o&&t.version&&o===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${e.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
11
11
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12
|
-
*/class
|
|
12
|
+
*/class n extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.9"}}a(n);
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2019 Google LLC
|
|
@@ -26,13 +26,13 @@ const l=window,h=l.ShadowRoot&&(void 0===l.ShadyCSS||l.ShadyCSS.nativeShadow)&&"
|
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*/
|
|
29
|
-
var C;A[k]=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},null==y||y({ReactiveElement:A}),(null!==(f=v.reactiveElementVersions)&&void 0!==f?f:v.reactiveElementVersions=[]).push("1.6.3");const z=window,D=z.trustedTypes,T=D?D.createPolicy("lit-html",{createHTML:t=>t}):void 0,S="$lit$",M=`lit$${(Math.random()+"").slice(9)}$`,
|
|
29
|
+
var C;A[k]=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},null==y||y({ReactiveElement:A}),(null!==(f=v.reactiveElementVersions)&&void 0!==f?f:v.reactiveElementVersions=[]).push("1.6.3");const z=window,D=z.trustedTypes,T=D?D.createPolicy("lit-html",{createHTML:t=>t}):void 0,S="$lit$",M=`lit$${(Math.random()+"").slice(9)}$`,P="?"+M,E=`<${P}>`,F=document,O=()=>F.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,B="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,W=/>/g,U=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,L=/"/g,q=/^(?:script|style|textarea|title)$/i,$=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),V=new WeakMap,G=F.createTreeWalker(F,129,null,!1);function J(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==T?T.createHTML(e):e}const K=(t,e)=>{const o=t.length-1,i=[];let s,r=2===e?"<svg>":"",a=j;for(let e=0;e<o;e++){const o=t[e];let n,l,h=-1,c=0;for(;c<o.length&&(a.lastIndex=c,l=a.exec(o),null!==l);)c=a.lastIndex,a===j?"!--"===l[1]?a=R:void 0!==l[1]?a=W:void 0!==l[2]?(q.test(l[2])&&(s=RegExp("</"+l[2],"g")),a=U):void 0!==l[3]&&(a=U):a===U?">"===l[0]?(a=null!=s?s:j,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?U:'"'===l[3]?L:H):a===L||a===H?a=U:a===R||a===W?a=j:(a=U,s=void 0);const u=a===U&&t[e+1].startsWith("/>")?" ":"";r+=a===j?o+E:h>=0?(i.push(n),o.slice(0,h)+S+o.slice(h)+M+u):o+M+(-2===h?(i.push(void 0),e):u)}return[J(t,r+(t[o]||"<?>")+(2===e?"</svg>":"")),i]};class Z{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,r=0;const a=t.length-1,n=this.parts,[l,h]=K(t,e);if(this.el=Z.createElement(l,o),G.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=G.nextNode())&&n.length<a;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith(S)||e.startsWith(M)){const o=h[r++];if(t.push(e),void 0!==o){const t=i.getAttribute(o.toLowerCase()+S).split(M),e=/([.?@])?(.*)/.exec(o);n.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?ot:"?"===e[1]?st:"@"===e[1]?rt:et})}else n.push({type:6,index:s})}for(const e of t)i.removeAttribute(e)}if(q.test(i.tagName)){const t=i.textContent.split(M),e=t.length-1;if(e>0){i.textContent=D?D.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],O()),G.nextNode(),n.push({type:2,index:++s});i.append(t[e],O())}}}else if(8===i.nodeType)if(i.data===P)n.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(M,t+1));)n.push({type:7,index:s}),t+=M.length-1}s++}}static createElement(t,e){const o=F.createElement("template");return o.innerHTML=t,o}}function X(t,e,o=t,i){var s,r,a,n;if(e===$)return e;let l=void 0!==i?null===(s=o._$Co)||void 0===s?void 0:s[i]:o._$Cl;const h=I(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,o,i)),void 0!==i?(null!==(a=(n=o)._$Co)&&void 0!==a?a:n._$Co=[])[i]=l:o._$Cl=l),void 0!==l&&(e=X(t,l._$AS(t,e.values),l,i)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:o},parts:i}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:F).importNode(o,!0);G.currentNode=s;let r=G.nextNode(),a=0,n=0,l=i[0];for(;void 0!==l;){if(a===l.index){let e;2===l.type?e=new tt(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new at(r,this,t)),this._$AV.push(e),l=i[++n]}a!==(null==l?void 0:l.index)&&(r=G.nextNode(),a++)}return G.currentNode=F,s}v(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class tt{constructor(t,e,o,i){var s;this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cp=null===(s=null==i?void 0:i.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=X(this,t,e),I(t)?t===Y||null==t||""===t?(this._$AH!==Y&&this._$AR(),this._$AH=Y):t!==this._$AH&&t!==$&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>N(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Y&&I(this._$AH)?this._$AA.nextSibling.data=t:this.$(F.createTextNode(t)),this._$AH=t}g(t){var e;const{values:o,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Z.createElement(J(i.h,i.h[0]),this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(o);else{const t=new Q(s,this),e=t.u(this.options);t.v(o),this.$(e),this._$AH=t}}_$AC(t){let e=V.get(t.strings);return void 0===e&&V.set(t.strings,e=new Z(t)),e}T(t){N(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new tt(this.k(O()),this.k(O()),this,this.options)):o=e[i],o._$AI(s),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class et{constructor(t,e,o,i,s){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=Y}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,o,i){const s=this.strings;let r=!1;if(void 0===s)t=X(this,t,e,0),r=!I(t)||t!==this._$AH&&t!==$,r&&(this._$AH=t);else{const i=t;let a,n;for(t=s[0],a=0;a<s.length-1;a++)n=X(this,i[o+a],e,a),n===$&&(n=this._$AH[a]),r||(r=!I(n)||n!==this._$AH[a]),n===Y?t=Y:t!==Y&&(t+=(null!=n?n:"")+s[a+1]),this._$AH[a]=n}r&&!i&&this.j(t)}j(t){t===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ot extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Y?void 0:t}}const it=D?D.emptyScript:"";class st extends et{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Y?this.element.setAttribute(this.name,it):this.element.removeAttribute(this.name)}}class rt extends et{constructor(t,e,o,i,s){super(t,e,o,i,s),this.type=5}_$AI(t,e=this){var o;if((t=null!==(o=X(this,t,e,0))&&void 0!==o?o:Y)===$)return;const i=this._$AH,s=t===Y&&i!==Y||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==Y&&(i===Y||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class at{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){X(this,t)}}const nt=z.litHtmlPolyfillSupport;
|
|
30
30
|
/**
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*/
|
|
35
|
-
var lt,ht;null==
|
|
35
|
+
var lt,ht;null==nt||nt(Z,tt),(null!==(C=z.litHtmlVersions)&&void 0!==C?C:z.litHtmlVersions=[]).push("2.8.0");class ct extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{var i,s;const r=null!==(i=null==o?void 0:o.renderBefore)&&void 0!==i?i:e;let a=r._$litPart$;if(void 0===a){const t=null!==(s=null==o?void 0:o.renderBefore)&&void 0!==s?s:null;r._$litPart$=a=new tt(e.insertBefore(O(),t),t,void 0,null!=o?o:{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return $}}ct.finalized=!0,ct._$litElement$=!0,null===(lt=globalThis.litElementHydrateSupport)||void 0===lt||lt.call(globalThis,{LitElement:ct});const ut=globalThis.litElementPolyfillSupport;null==ut||ut({LitElement:ct}),(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.3.3");
|
|
36
36
|
/**
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -600,7 +600,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
600
600
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
601
601
|
Code distributed by Google as part of the polymer project is also
|
|
602
602
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
603
|
-
*/const
|
|
603
|
+
*/const Pt=!window.ShadyDOM||!window.ShadyDOM.inUse,Et=Pt&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Ft=window.Polymer&&window.Polymer.rootPath||Mt(document.baseURI||window.location.href),Ot=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,It=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Nt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Bt=window.Polymer&&window.Polymer.legacyOptimizations||!1,jt=window.Polymer&&window.Polymer.legacyWarnings||!1,Rt=window.Polymer&&window.Polymer.syncInitialRender||!1,Wt=window.Polymer&&window.Polymer.legacyUndefined||!1,Ut=window.Polymer&&window.Polymer.orderedComputed||!1,Ht=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Lt=window.Polymer&&window.Polymer.fastDomIf||!1,qt=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,$t=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,Yt=0;const Vt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let o=Yt++;return function(i){let s=i.__mixinSet;if(s&&s[o])return i;let r=e,a=r.get(i);if(!a){a=t(i),r.set(i,a);let e=Object.create(a.__mixinSet||s||null);e[o]=!0,a.__mixinSet=e}return a}};
|
|
604
604
|
/**
|
|
605
605
|
@license
|
|
606
606
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -619,7 +619,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
619
619
|
Code distributed by Google as part of the polymer project is also
|
|
620
620
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
621
621
|
*/
|
|
622
|
-
const Qt="link[rel=import][type~=css]",te="include",ee="shady-unscoped";function oe(t){return Xt.import(t)}function ie(t){const e=St((t.body?t.body:t).textContent,t.baseURI),o=document.createElement("style");return o.textContent=e,o}function se(t){const e=t.trim().split(/\s+/),o=[];for(let t=0;t<e.length;t++)o.push(...re(e[t]));return o}function re(t){const e=oe(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...
|
|
622
|
+
const Qt="link[rel=import][type~=css]",te="include",ee="shady-unscoped";function oe(t){return Xt.import(t)}function ie(t){const e=St((t.body?t.body:t).textContent,t.baseURI),o=document.createElement("style");return o.textContent=e,o}function se(t){const e=t.trim().split(/\s+/),o=[];for(let t=0;t<e.length;t++)o.push(...re(e[t]));return o}function re(t){const e=oe(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...ne(e));const o=e.querySelector("template");o&&t.push(...ae(o,e.assetpath)),e._styles=t}return e._styles}function ae(t,e){if(!t._styles){const o=[],i=t.content.querySelectorAll("style");for(let t=0;t<i.length;t++){let s=i[t],r=s.getAttribute(te);r&&o.push(...se(r).filter((function(t,e,o){return o.indexOf(t)===e}))),e&&(s.textContent=St(s.textContent,e)),o.push(s)}t._styles=o}return t._styles}function ne(t){const e=[],o=t.querySelectorAll(Qt);for(let t=0;t<o.length;t++){let i=o[t];if(i.import){const t=i.import,o=i.hasAttribute(ee);if(o&&!t._unscopedStyle){const e=ie(t);e.setAttribute(ee,""),t._unscopedStyle=e}else t._style||(t._style=ie(t));e.push(o?t._unscopedStyle:t._style)}}return e}
|
|
623
623
|
/**
|
|
624
624
|
@license
|
|
625
625
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -655,7 +655,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
655
655
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
656
656
|
Code distributed by Google as part of the polymer project is also
|
|
657
657
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
658
|
-
*/let ke=0,Ae=0,Ce=[],ze=0,De=!1,Te=document.createTextNode("");new window.MutationObserver((function(){De=!1;const t=Ce.length;for(let e=0;e<t;e++){let t=Ce[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Ce.splice(0,t),Ae+=t})).observe(Te,{characterData:!0});const Se={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Me={run:t=>(De||(De=!0,Te.textContent=ze++),Ce.push(t),ke++),cancel(t){const e=t-Ae;if(e>=0){if(!Ce[e])throw new Error("invalid async handle: "+t);Ce[e]=null}}},
|
|
658
|
+
*/let ke=0,Ae=0,Ce=[],ze=0,De=!1,Te=document.createTextNode("");new window.MutationObserver((function(){De=!1;const t=Ce.length;for(let e=0;e<t;e++){let t=Ce[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Ce.splice(0,t),Ae+=t})).observe(Te,{characterData:!0});const Se={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Me={run:t=>(De||(De=!0,Te.textContent=ze++),Ce.push(t),ke++),cancel(t){const e=t-Ae;if(e>=0){if(!Ce[e])throw new Error("invalid async handle: "+t);Ce[e]=null}}},Pe=Me,Ee=Vt((t=>class extends t{static createProperties(t){const e=this.prototype;for(let o in t)o in e||e._createPropertyAccessor(o)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,o){let i=this.__data[t],s=this._shouldPropertyChange(t,e,i);return s&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=i),this.__data[t]=e,this.__dataPending[t]=e),s}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Pe.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,o=this.__dataOld;this._shouldPropertiesChange(t,e,o)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,o)),this.__dataCounter--}_shouldPropertiesChange(t,e,o){return Boolean(e)}_propertiesChanged(t,e,o){}_shouldPropertyChange(t,e,o){return o!==e&&(o==o||e==e)}attributeChangedCallback(t,e,o,i){e!==o&&this._attributeToProperty(t,o),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,o,i)}_attributeToProperty(t,e,o){if(!this.__serializing){const i=this.__dataAttributes,s=i&&i[t]||t;this[s]=this._deserializeValue(e,o||this.constructor.typeForProperty(s))}}_propertyToAttribute(t,e,o){this.__serializing=!0,this._valueToNodeAttribute(this,o=arguments.length<3?this[t]:o,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,o){const i=this._serializeValue(e);"class"!==o&&"name"!==o&&"slot"!==o||(t=le(t)),void 0===i?t.removeAttribute(o):t.setAttribute(o,""===i&&window.trustedTypes?window.trustedTypes.emptyScript:i)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Fe={};let Oe=HTMLElement.prototype;for(;Oe;){let t=Object.getOwnPropertyNames(Oe);for(let e=0;e<t.length;e++)Fe[t[e]]=!0;Oe=Object.getPrototypeOf(Oe)}const Ie=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Ne=Vt((t=>{const e=Ee(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(xe(t[e]))}static attributeNameForProperty(t){return _e(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(Ie(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let o;switch(e){case Object:try{o=JSON.parse(t)}catch(e){o=t}break;case Array:try{o=JSON.parse(t)}catch(e){o=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:o=isNaN(t)?String(t):Number(t),o=new Date(o);break;default:o=super._deserializeValue(t,e)}return o}_definePropertyAccessor(t,e){!function(t,e){if(!Fe[e]){let o=t[e];void 0!==o&&(t.__data?t._setPendingProperty(e,o):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=o))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),Be={"dom-if":!0,"dom-repeat":!0};let je=!1,Re=!1;const We=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,o,i)=>{const s=o.getAttribute(i);t&&i.startsWith("on-")?e.setAttribute(i,t.createScript(s,i)):e.setAttribute(i,s)}})();function Ue(t){let e=t.getAttribute("is");if(e&&Be[e]){let o=t;for(o.removeAttribute("is"),t=o.ownerDocument.createElement(e),o.parentNode.replaceChild(t,o),t.appendChild(o);o.attributes.length;){const{name:e}=o.attributes[0];We(t,o,e),o.removeAttribute(e)}}return t}function He(t,e){let o=e.parentInfo&&He(t,e.parentInfo);if(!o)return t;for(let t=o.firstChild,i=0;t;t=t.nextSibling)if(e.parentIndex===i++)return t}function Le(t,e,o,i){i.id&&(e[i.id]=o)}function qe(t,e,o){if(o.events&&o.events.length)for(let i,s=0,r=o.events;s<r.length&&(i=r[s]);s++)t._addMethodEventListenerToNode(e,i.name,i.value,t)}function $e(t,e,o,i){o.templateInfo&&(e._templateInfo=o.templateInfo,e._parentTemplateInfo=i)}const Ye=Vt((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let o=t._templateInfo={};o.nodeInfoList=[],o.nestedTemplate=Boolean(e),o.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,o,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,o){return this._parseTemplateNode(t.content,e,o)}static _parseTemplateNode(t,e,o){let i=!1,s=t;return"template"!=s.localName||s.hasAttribute("preserve-content")?"slot"===s.localName&&(e.hasInsertionPoint=!0):i=this._parseTemplateNestedTemplate(s,e,o)||i,function(t){(function(){if(!je){je=!0;const t=document.createElement("textarea");t.placeholder="a",Re=t.placeholder===t.textContent}return Re})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(s),s.firstChild&&this._parseTemplateChildNodes(s,e,o),s.hasAttributes&&s.hasAttributes()&&(i=this._parseTemplateNodeAttributes(s,e,o)||i),i||o.noted}static _parseTemplateChildNodes(t,e,o){if("script"!==t.localName&&"style"!==t.localName)for(let i,s=t.firstChild,r=0;s;s=i){if("template"==s.localName&&(s=Ue(s)),i=s.nextSibling,s.nodeType===Node.TEXT_NODE){let o=i;for(;o&&o.nodeType===Node.TEXT_NODE;)s.textContent+=o.textContent,i=o.nextSibling,t.removeChild(o),o=i;if(e.stripWhiteSpace&&!s.textContent.trim()){t.removeChild(s);continue}}let a={parentIndex:r,parentInfo:o};this._parseTemplateNode(s,e,a)&&(a.infoIndex=e.nodeInfoList.push(a)-1),s.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,o){let i=t,s=this._parseTemplate(i,e);return(s.content=i.content.ownerDocument.createDocumentFragment()).appendChild(i.content),o.templateInfo=s,!0}static _parseTemplateNodeAttributes(t,e,o){let i=!1,s=Array.from(t.attributes);for(let r,a=s.length-1;r=s[a];a--)i=this._parseTemplateNodeAttribute(t,e,o,r.name,r.value)||i;return i}static _parseTemplateNodeAttribute(t,e,o,i,s){return"on-"===i.slice(0,3)?(t.removeAttribute(i),o.events=o.events||[],o.events.push({name:i.slice(3),value:s}),!0):"id"===i&&(o.id=s,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let o=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,i=document.importNode(e.content||t.content,!0);i.__noInsertionPoint=!e.hasInsertionPoint;let s=i.nodeList=new Array(o.length);i.$={};for(let t,r=0,a=o.length;r<a&&(t=o[r]);r++){let o=s[r]=He(i,t);Le(0,i.$,o,t),$e(0,o,t,e),qe(this,o,t)}return i}_addMethodEventListenerToNode(t,e,o,i){let s=function(t,e,o){return t=t._methodHost||t,function(e){t[o]?t[o](e,e.detail):console.warn("listener method `"+o+"` not defined")}}(i=i||t,0,o);return this._addEventListenerToNode(t,e,s),s}_addEventListenerToNode(t,e,o){t.addEventListener(e,o)}_removeEventListenerFromNode(t,e,o){t.removeEventListener(e,o)}}));
|
|
659
659
|
/**
|
|
660
660
|
* @fileoverview
|
|
661
661
|
* @suppress {checkPrototypalTypes}
|
|
@@ -666,7 +666,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
666
666
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
667
667
|
* Google as part of the polymer project is also subject to an additional IP
|
|
668
668
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
669
|
-
*/let Ve=0;const Ge=[],Je={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ke="__computeInfo",Ze=/[A-Z]/;function Xe(t,e,o){let i=t[e];if(i){if(!t.hasOwnProperty(e)&&(i=t[e]=Object.create(t[e]),o))for(let t in i){let e=i[t],o=i[t]=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]}}else i=t[e]={};return i}function Qe(t,e,o,i,s,r){if(e){let n=!1;const a=Ve++;for(let l in o){let h=e[s?ce(l):l];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===a||s&&!eo(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,o,i,e.info,s,r),n=!0)}return n}return!1}function to(t,e,o,i,s,r,n,a){let l=!1,h=e[n?ce(i):i];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===o||n&&!eo(i,e.trigger)||(e.info&&(e.info.lastRun=o),e.fn(t,i,s,r,e.info,n,a),l=!0);return l}function eo(t,e){if(e){let o=e.name;return o==t||!(!e.structured||!ue(o,t))||!(!e.wildcard||!de(o,t))}return!0}function oo(t,e,o,i,s){let r="string"==typeof s.method?t[s.method]:s.method,n=s.property;r?r.call(t,t.__data[n],i[n]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function io(t,e,o){let i=ce(e);return i!==e&&(so(t,_e(i)+"-changed",o[e],e),!0)}function so(t,e,o,i){let s={value:o,queueProperty:!0};i&&(s.path=i),le(t).dispatchEvent(new CustomEvent(e,{detail:s}))}function ro(t,e,o,i,s,r){let n=(r?ce(e):e)!=e?e:null,a=n?ve(t,n):t.__data[e];n&&void 0===a&&(a=o[e]),so(t,s.eventName,a,n)}function no(t,e,o,i,s){let r=t.__data[e];Ot&&(r=Ot(r,s.attrName,"attribute",t)),t._propertyToAttribute(e,s.attrName,r)}const ao=(t,e,o)=>{let i=0,s=e.length-1,r=-1;for(;i<=s;){const n=i+s>>1,a=o.get(e[n].methodInfo)-o.get(t.methodInfo);if(a<0)i=n+1;else{if(!(a>0)){r=n;break}s=n-1}}r<0&&(r=s+1),e.splice(r,0,t)},lo=(t,e,o,i,s)=>{const r=e[s?ce(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===Ve||s&&!eo(t,n.trigger)||(n.info.lastRun=Ve,ao(n.info,o,i))}};function ho(t,e,o,i,s){let r=bo(t,e,o,0,s);if(r===Ge)return!1;let n=s.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function co(t,e,o,i,s,r,n){o.bindings=o.bindings||[];let a={kind:i,target:s,parts:r,literal:n,isCompound:1!==r.length};if(o.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||_e(s)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let o=0;o<a.parts.length;o++){let i=a.parts[o];i.compoundIndex=o,uo(t,e,a,i,l)}}function uo(t,e,o,i,s){if(!i.literal)if("attribute"===o.kind&&"-"===o.target[0])console.warn("Cannot set attribute "+o.target+' because "-" is not a valid attribute starting character');else{let r=i.dependencies,n={index:s,binding:o,part:i,evaluator:t};for(let o=0;o<r.length;o++){let i=r[o];"string"==typeof i&&(i=Ao(i),i.wildcard=!0),t._addTemplatePropertyEffect(e,i.rootProperty,{fn:po,info:n,trigger:i})}}}function po(t,e,o,i,s,r,n){let a=n[s.index],l=s.binding,h=s.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let i=o[e];e=pe(h.source,l.target,e),a._setPendingPropertyOrPath(e,i,!1,!0)&&t._enqueueClient(a)}else{let n=s.evaluator._evaluateBinding(t,h,e,o,i,r);n!==Ge&&function(t,e,o,i,s){if(s=function(t,e,o,i){if(o.isCompound){let s=t.__dataCompoundStorage[o.target];s[i.compoundIndex]=e,e=s.join("")}return"attribute"!==o.kind&&("textContent"!==o.target&&("value"!==o.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,s,o,i),Ot&&(s=Ot(s,o.target,o.kind,e)),"attribute"==o.kind)t._valueToNodeAttribute(e,s,o.target);else{let i=o.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[i]?e[Je.READ_ONLY]&&e[Je.READ_ONLY][i]||e._setPendingProperty(i,s)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,i,s)}}(t,a,l,h,n)}}function mo(t,e){if(e.isCompound){let o=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),i=e.parts,s=new Array(i.length);for(let t=0;t<i.length;t++)s[t]=i[t].literal;let r=e.target;o[r]=s,e.literal&&"property"==e.kind&&("className"===r&&(t=le(t)),t[r]=e.literal)}}function fo(t,e,o){if(o.listenerEvent){let i=o.parts[0];t.addEventListener(o.listenerEvent,(function(t){!function(t,e,o,i,s){let r,n=t.detail,a=n&&n.path;a?(i=pe(o,i,a),r=n&&n.value):r=t.currentTarget[o],r=s?!r:r,e[Je.READ_ONLY]&&e[Je.READ_ONLY][i]||!e._setPendingPropertyOrPath(i,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,o.target,i.source,i.negate)}))}}function vo(t,e,o,i,s,r){let n={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let s,r=0;r<e.args.length&&(s=e.args[r]);r++)s.literal||t._addPropertyEffect(s.rootProperty,o,{fn:i,info:n,trigger:s});return r&&t._addPropertyEffect(e.methodName,o,{fn:i,info:n}),n}function bo(t,e,o,i,s){let r=t._methodHost||t,n=r[s.methodName];if(n){let i=t._marshalArgs(s.args,e,o);return i===Ge?Ge:n.apply(r,i)}s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const go=[],yo="(?:[a-zA-Z_$][\\w.:$\\-*]*)",wo="(?:("+yo+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",xo=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+yo+"\\s*(?:\\(\\s*(?:(?:"+wo+"(?:,\\s*"+wo+")*)?)\\)\\s*)?)(?:]]|}})","g");function _o(t){let e="";for(let o=0;o<t.length;o++)e+=t[o].literal||"";return e}function ko(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:go};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let o=Ao(t);return o.literal||(e.static=!1),o}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Ao(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),o={name:e,value:"",literal:!1},i=e[0];switch("-"===i&&(i=e[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':o.value=e.slice(1,-1),o.literal=!0;break;case"#":o.value=Number(e),o.literal=!0}return o.literal||(o.rootProperty=ce(e),o.structured=he(e),o.structured&&(o.wildcard=".*"==e.slice(-2),o.wildcard&&(o.name=e.slice(0,-2)))),o}function Co(t,e,o){let i=ve(t,o);return void 0===i&&(i=e[o]),i}function zo(t,e,o,i){const s={indexSplices:i};Wt&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(o+".splices",s),t.notifyPath(o+".length",e.length),Wt&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function Do(t,e,o,i,s,r){zo(t,e,o,[{index:i,addedCount:s,removed:r,object:e,type:"splice"}])}const To=Vt((t=>{const e=Ye(Ne(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Je}_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(So.length){let t=So[So.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Je.READ_ONLY];for(let o in t)e&&e[o]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[o]=this.__dataPending[o]=t[o])}_addPropertyEffect(t,e,o){this._createPropertyAccessor(t,e==Je.READ_ONLY);let i=Xe(this,e,!0)[t];i||(i=this[e][t]=[]),i.push(o)}_removePropertyEffect(t,e,o){let i=Xe(this,e,!0)[t],s=i.indexOf(o);s>=0&&i.splice(s,1)}_hasPropertyEffect(t,e){let o=this[e];return Boolean(o&&o[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Je.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Je.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Je.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Je.COMPUTE)}_setPendingPropertyOrPath(t,e,o,i){if(i||ce(Array.isArray(t)?t[0]:t)!==t){if(!i){let o=ve(this,t);if(!(t=be(this,t,e))||!super._shouldPropertyChange(t,e,o))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,o))return function(t,e,o){let i=t.__dataLinkedPaths;if(i){let s;for(let r in i){let n=i[r];de(r,e)?(s=pe(r,n,e),t._setPendingPropertyOrPath(s,o,!0,!0)):de(n,e)&&(s=pe(n,r,e),t._setPendingPropertyOrPath(s,o,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,o);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,o){o===t[e]&&"object"!=typeof o||("className"===e&&(t=le(t)),t[e]=o)}_setPendingProperty(t,e,o){let i=this.__dataHasPaths&&he(t);return!!this._shouldPropertyChange(t,e,(i?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),i?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(i||this[Je.NOTIFY]&&this[Je.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=o),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let o=t[e];o.__dataEnabled?o.__dataPending&&o._flushProperties():o._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let o in t)!e&&this[Je.READ_ONLY]&&this[Je.READ_ONLY][o]||this._setPendingPropertyOrPath(o,t[o],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,o){let i,s=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,o,i){let s=t[Je.COMPUTE];if(s)if(Ut){Ve++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const o=t[Je.COMPUTE];let i,{counts:s,ready:r,total:n}=function(t){const e=t[Ke],o={},i=t[Je.COMPUTE],s=[];let r=0;for(let t in e){const i=e[t];r+=o[t]=i.args.filter((t=>!t.literal)).length+(i.dynamicFn?1:0)}for(let t in i)e[t]||s.push(t);return{counts:o,ready:s,total:r}}(t);for(;i=r.shift();){e.set(i,e.size);const t=o[i];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--s[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)lo(t,s,n,r,i);let a;for(;a=n.shift();)ho(t,"",e,0,a)&&lo(a.methodInfo,s,n,r,i);Object.assign(o,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;Qe(t,s,r,o,i);)Object.assign(o,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,o,s),i=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,o,s),this._flushClients(),Qe(this,this[Je.REFLECT],e,o,s),Qe(this,this[Je.OBSERVE],e,o,s),i&&function(t,e,o,i,s){let r,n,a=t[Je.NOTIFY],l=Ve++;for(let n in e)e[n]&&(a&&to(t,a,l,n,o,i,s)||s&&io(t,n,o))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,i,e,o,s),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,o){this[Je.PROPAGATE]&&Qe(this,this[Je.PROPAGATE],t,e,o),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,o)}_runEffectsForTemplate(t,e,o,i){const s=(e,i)=>{Qe(this,t.propertyEffects,e,o,i,t.nodeList);for(let s=t.firstChild;s;s=s.nextSibling)this._runEffectsForTemplate(s,e,o,i)};t.runEffects?t.runEffects(s,e,i):s(e,i)}linkPaths(t,e){t=me(t),e=me(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=me(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let o={path:""};zo(this,ve(this,t,o),o.path,e)}get(t,e){return ve(e||this,t)}set(t,e,o){o?be(o,t,e):this[Je.READ_ONLY]&&this[Je.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let o={path:""},i=ve(this,t,o),s=i.length,r=i.push(...e);return e.length&&Do(this,i,o.path,s,e.length,[]),r}pop(t){let e={path:""},o=ve(this,t,e),i=Boolean(o.length),s=o.pop();return i&&Do(this,o,e.path,o.length,0,[s]),s}splice(t,e,o,...i){let s,r={path:""},n=ve(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),s=2===arguments.length?n.splice(e):n.splice(e,o,...i),(i.length||s.length)&&Do(this,n,r.path,e,i.length,s),s}shift(t){let e={path:""},o=ve(this,t,e),i=Boolean(o.length),s=o.shift();return i&&Do(this,o,e.path,0,0,[s]),s}unshift(t,...e){let o={path:""},i=ve(this,t,o),s=i.unshift(...e);return e.length&&Do(this,i,o.path,0,e.length,[]),s}notifyPath(t,e){let o;if(1==arguments.length){let i={path:""};e=ve(this,t,i),o=i.path}else o=Array.isArray(t)?me(t):t;this._setPendingPropertyOrPath(o,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var o;this._addPropertyEffect(t,Je.READ_ONLY),e&&(this["_set"+(o=t,o[0].toUpperCase()+o.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,o){let i={property:t,method:e,dynamicFn:Boolean(o)};this._addPropertyEffect(t,Je.OBSERVE,{fn:oo,info:i,trigger:{name:t}}),o&&this._addPropertyEffect(e,Je.OBSERVE,{fn:oo,info:i,trigger:{name:e}})}_createMethodObserver(t,e){let o=ko(t);if(!o)throw new Error("Malformed observer expression '"+t+"'");vo(this,o,Je.OBSERVE,bo,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Je.NOTIFY,{fn:ro,info:{eventName:_e(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Je.REFLECT,{fn:no,info:{attrName:e}})}_createComputedProperty(t,e,o){let i=ko(e);if(!i)throw new Error("Malformed computed expression '"+e+"'");const s=vo(this,i,Je.COMPUTE,ho,t,o);Xe(this,Ke)[t]=s}_marshalArgs(t,e,o){const i=this.__data,s=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=de(n,e),s=Co(i,o,t?e:n);h={path:t?e:n,value:s,base:t?ve(i,n):s}}else h=a?Co(i,o,n):i[n];if(Wt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Ge;s[r]=h}return s}static addPropertyEffect(t,e,o){this.prototype._addPropertyEffect(t,e,o)}static createPropertyObserver(t,e,o){this.prototype._createPropertyObserver(t,e,o)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,o){this.prototype._createComputedProperty(t,e,o)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let o=this.constructor._parseTemplate(t),i=this.__preBoundTemplateInfo==o;if(!i)for(let t in o.propertyEffects)this._createPropertyAccessor(t);if(e)if(o=Object.create(o),o.wasPreBound=i,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,i=e.lastChild;o.parent=e,e.lastChild=o,o.previousSibling=i,i?i.nextSibling=o:e.firstChild=o}else this.__templateInfo=o;else this.__preBoundTemplateInfo=o;return o}static _addTemplatePropertyEffect(t,e,o){(t.hostProps=t.hostProps||{})[e]=!0;let i=t.propertyEffects=t.propertyEffects||{};(i[e]=i[e]||[]).push(o)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),So.push(this);let o=super._stampTemplate(t,e);if(So.pop(),e.nodeList=o.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=o.firstChild;e;e=e.nextSibling)t.push(e)}return o.templateInfo=e,function(t,e){let{nodeList:o,nodeInfoList:i}=e;if(i.length)for(let e=0;e<i.length;e++){let s=o[e],r=i[e].bindings;if(r)for(let e=0;e<r.length;e++){let o=r[e];mo(s,o),fo(s,t,o)}s.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),o}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:o,nextSibling:i,parent:s}=e;o?o.nextSibling=i:s&&(s.firstChild=i),i?i.previousSibling=o:s&&(s.lastChild=o),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];le(le(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,o,i){let s=e._parseTemplateNode.call(this,t,o,i);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,o);e&&(t.textContent=_o(e)||" ",co(this,o,i,"text","textContent",e),s=!0)}return s}static _parseTemplateNodeAttribute(t,o,i,s,r){let n=this._parseBindings(r,o);if(n){let e=s,r="property";Ze.test(s)?r="attribute":"$"==s[s.length-1]&&(s=s.slice(0,-1),r="attribute");let a=_o(n);return a&&"attribute"==r&&("class"==s&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(s)),t.setAttribute(s,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(s,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(s=xe(s)),co(this,o,i,r,s,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,o,i,s,r)}static _parseTemplateNestedTemplate(t,o,i){let s=e._parseTemplateNestedTemplate.call(this,t,o,i);const r=t.parentNode,n=i.templateInfo,a="dom-if"===r.localName;Ht&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(i=i.parentInfo).templateInfo=n,i.noted=!0,s=!1);let l=n.hostProps;if(Lt&&a)l&&(o.hostProps=Object.assign(o.hostProps||{},l),Ht||(i.parentInfo.noted=!0));else{let t="{";for(let e in l)co(this,o,i,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return s}static _parseBindings(t,e){let o,i=[],s=0;for(;null!==(o=xo.exec(t));){o.index>s&&i.push({literal:t.slice(s,o.index)});let r=o[1][0],n=Boolean(o[2]),a=o[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let u=ko(a),d=[];if(u){let{args:t,methodName:o}=u;for(let e=0;e<t.length;e++){let o=t[e];o.literal||d.push(o)}let i=e.dynamicFns;(i&&i[o]||u.static)&&(d.push(o),u.dynamicFn=!0)}else d.push(a);i.push({source:a,mode:r,negate:n,customEvent:l,signature:u,dependencies:d,event:h}),s=xo.lastIndex}if(s&&s<t.length){let e=t.substring(s);e&&i.push({literal:e})}return i.length?i:null}static _evaluateBinding(t,e,o,i,s,r){let n;return n=e.signature?bo(t,o,i,0,e.signature):o!=e.source?ve(t,e.source):r&&he(o)?ve(t,o):t.__data[o],e.negate&&(n=!n),n}}})),So=[],Mo=Vt((t=>{const e=Pe(t);function o(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof s?e:null}function i(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const o=t.properties;o&&(e=
|
|
669
|
+
*/let Ve=0;const Ge=[],Je={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ke="__computeInfo",Ze=/[A-Z]/;function Xe(t,e,o){let i=t[e];if(i){if(!t.hasOwnProperty(e)&&(i=t[e]=Object.create(t[e]),o))for(let t in i){let e=i[t],o=i[t]=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]}}else i=t[e]={};return i}function Qe(t,e,o,i,s,r){if(e){let a=!1;const n=Ve++;for(let l in o){let h=e[s?ce(l):l];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===n||s&&!eo(l,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,l,o,i,e.info,s,r),a=!0)}return a}return!1}function to(t,e,o,i,s,r,a,n){let l=!1,h=e[a?ce(i):i];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===o||a&&!eo(i,e.trigger)||(e.info&&(e.info.lastRun=o),e.fn(t,i,s,r,e.info,a,n),l=!0);return l}function eo(t,e){if(e){let o=e.name;return o==t||!(!e.structured||!ue(o,t))||!(!e.wildcard||!de(o,t))}return!0}function oo(t,e,o,i,s){let r="string"==typeof s.method?t[s.method]:s.method,a=s.property;r?r.call(t,t.__data[a],i[a]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function io(t,e,o){let i=ce(e);return i!==e&&(so(t,_e(i)+"-changed",o[e],e),!0)}function so(t,e,o,i){let s={value:o,queueProperty:!0};i&&(s.path=i),le(t).dispatchEvent(new CustomEvent(e,{detail:s}))}function ro(t,e,o,i,s,r){let a=(r?ce(e):e)!=e?e:null,n=a?ve(t,a):t.__data[e];a&&void 0===n&&(n=o[e]),so(t,s.eventName,n,a)}function ao(t,e,o,i,s){let r=t.__data[e];Ot&&(r=Ot(r,s.attrName,"attribute",t)),t._propertyToAttribute(e,s.attrName,r)}const no=(t,e,o)=>{let i=0,s=e.length-1,r=-1;for(;i<=s;){const a=i+s>>1,n=o.get(e[a].methodInfo)-o.get(t.methodInfo);if(n<0)i=a+1;else{if(!(n>0)){r=a;break}s=a-1}}r<0&&(r=s+1),e.splice(r,0,t)},lo=(t,e,o,i,s)=>{const r=e[s?ce(t):t];if(r)for(let e=0;e<r.length;e++){const a=r[e];a.info.lastRun===Ve||s&&!eo(t,a.trigger)||(a.info.lastRun=Ve,no(a.info,o,i))}};function ho(t,e,o,i,s){let r=bo(t,e,o,0,s);if(r===Ge)return!1;let a=s.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[a]?t._setPendingProperty(a,r,!0):(t[a]=r,!1)}function co(t,e,o,i,s,r,a){o.bindings=o.bindings||[];let n={kind:i,target:s,parts:r,literal:a,isCompound:1!==r.length};if(o.bindings.push(n),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(n)){let{event:t,negate:e}=n.parts[0];n.listenerEvent=t||_e(s)+"-changed",n.listenerNegate=e}let l=e.nodeInfoList.length;for(let o=0;o<n.parts.length;o++){let i=n.parts[o];i.compoundIndex=o,uo(t,e,n,i,l)}}function uo(t,e,o,i,s){if(!i.literal)if("attribute"===o.kind&&"-"===o.target[0])console.warn("Cannot set attribute "+o.target+' because "-" is not a valid attribute starting character');else{let r=i.dependencies,a={index:s,binding:o,part:i,evaluator:t};for(let o=0;o<r.length;o++){let i=r[o];"string"==typeof i&&(i=Ao(i),i.wildcard=!0),t._addTemplatePropertyEffect(e,i.rootProperty,{fn:po,info:a,trigger:i})}}}function po(t,e,o,i,s,r,a){let n=a[s.index],l=s.binding,h=s.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&n.__isPropertyEffectsClient&&n.__dataHasAccessor&&n.__dataHasAccessor[l.target]){let i=o[e];e=pe(h.source,l.target,e),n._setPendingPropertyOrPath(e,i,!1,!0)&&t._enqueueClient(n)}else{let a=s.evaluator._evaluateBinding(t,h,e,o,i,r);a!==Ge&&function(t,e,o,i,s){if(s=function(t,e,o,i){if(o.isCompound){let s=t.__dataCompoundStorage[o.target];s[i.compoundIndex]=e,e=s.join("")}return"attribute"!==o.kind&&("textContent"!==o.target&&("value"!==o.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,s,o,i),Ot&&(s=Ot(s,o.target,o.kind,e)),"attribute"==o.kind)t._valueToNodeAttribute(e,s,o.target);else{let i=o.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[i]?e[Je.READ_ONLY]&&e[Je.READ_ONLY][i]||e._setPendingProperty(i,s)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,i,s)}}(t,n,l,h,a)}}function mo(t,e){if(e.isCompound){let o=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),i=e.parts,s=new Array(i.length);for(let t=0;t<i.length;t++)s[t]=i[t].literal;let r=e.target;o[r]=s,e.literal&&"property"==e.kind&&("className"===r&&(t=le(t)),t[r]=e.literal)}}function fo(t,e,o){if(o.listenerEvent){let i=o.parts[0];t.addEventListener(o.listenerEvent,(function(t){!function(t,e,o,i,s){let r,a=t.detail,n=a&&a.path;n?(i=pe(o,i,n),r=a&&a.value):r=t.currentTarget[o],r=s?!r:r,e[Je.READ_ONLY]&&e[Je.READ_ONLY][i]||!e._setPendingPropertyOrPath(i,r,!0,Boolean(n))||a&&a.queueProperty||e._invalidateProperties()}(t,e,o.target,i.source,i.negate)}))}}function vo(t,e,o,i,s,r){let a={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let s,r=0;r<e.args.length&&(s=e.args[r]);r++)s.literal||t._addPropertyEffect(s.rootProperty,o,{fn:i,info:a,trigger:s});return r&&t._addPropertyEffect(e.methodName,o,{fn:i,info:a}),a}function bo(t,e,o,i,s){let r=t._methodHost||t,a=r[s.methodName];if(a){let i=t._marshalArgs(s.args,e,o);return i===Ge?Ge:a.apply(r,i)}s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const go=[],yo="(?:[a-zA-Z_$][\\w.:$\\-*]*)",wo="(?:("+yo+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",xo=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+yo+"\\s*(?:\\(\\s*(?:(?:"+wo+"(?:,\\s*"+wo+")*)?)\\)\\s*)?)(?:]]|}})","g");function _o(t){let e="";for(let o=0;o<t.length;o++)e+=t[o].literal||"";return e}function ko(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:go};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let o=Ao(t);return o.literal||(e.static=!1),o}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Ao(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),o={name:e,value:"",literal:!1},i=e[0];switch("-"===i&&(i=e[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':o.value=e.slice(1,-1),o.literal=!0;break;case"#":o.value=Number(e),o.literal=!0}return o.literal||(o.rootProperty=ce(e),o.structured=he(e),o.structured&&(o.wildcard=".*"==e.slice(-2),o.wildcard&&(o.name=e.slice(0,-2)))),o}function Co(t,e,o){let i=ve(t,o);return void 0===i&&(i=e[o]),i}function zo(t,e,o,i){const s={indexSplices:i};Wt&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(o+".splices",s),t.notifyPath(o+".length",e.length),Wt&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function Do(t,e,o,i,s,r){zo(t,e,o,[{index:i,addedCount:s,removed:r,object:e,type:"splice"}])}const To=Vt((t=>{const e=Ye(Ne(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Je}_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(So.length){let t=So[So.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Je.READ_ONLY];for(let o in t)e&&e[o]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[o]=this.__dataPending[o]=t[o])}_addPropertyEffect(t,e,o){this._createPropertyAccessor(t,e==Je.READ_ONLY);let i=Xe(this,e,!0)[t];i||(i=this[e][t]=[]),i.push(o)}_removePropertyEffect(t,e,o){let i=Xe(this,e,!0)[t],s=i.indexOf(o);s>=0&&i.splice(s,1)}_hasPropertyEffect(t,e){let o=this[e];return Boolean(o&&o[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Je.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Je.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Je.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Je.COMPUTE)}_setPendingPropertyOrPath(t,e,o,i){if(i||ce(Array.isArray(t)?t[0]:t)!==t){if(!i){let o=ve(this,t);if(!(t=be(this,t,e))||!super._shouldPropertyChange(t,e,o))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,o))return function(t,e,o){let i=t.__dataLinkedPaths;if(i){let s;for(let r in i){let a=i[r];de(r,e)?(s=pe(r,a,e),t._setPendingPropertyOrPath(s,o,!0,!0)):de(a,e)&&(s=pe(a,r,e),t._setPendingPropertyOrPath(s,o,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,o);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,o){o===t[e]&&"object"!=typeof o||("className"===e&&(t=le(t)),t[e]=o)}_setPendingProperty(t,e,o){let i=this.__dataHasPaths&&he(t);return!!this._shouldPropertyChange(t,e,(i?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),i?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(i||this[Je.NOTIFY]&&this[Je.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=o),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let o=t[e];o.__dataEnabled?o.__dataPending&&o._flushProperties():o._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let o in t)!e&&this[Je.READ_ONLY]&&this[Je.READ_ONLY][o]||this._setPendingPropertyOrPath(o,t[o],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,o){let i,s=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,o,i){let s=t[Je.COMPUTE];if(s)if(Ut){Ve++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const o=t[Je.COMPUTE];let i,{counts:s,ready:r,total:a}=function(t){const e=t[Ke],o={},i=t[Je.COMPUTE],s=[];let r=0;for(let t in e){const i=e[t];r+=o[t]=i.args.filter((t=>!t.literal)).length+(i.dynamicFn?1:0)}for(let t in i)e[t]||s.push(t);return{counts:o,ready:s,total:r}}(t);for(;i=r.shift();){e.set(i,e.size);const t=o[i];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--s[e]&&r.push(e)}))}0!==a&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),a=[];for(let t in e)lo(t,s,a,r,i);let n;for(;n=a.shift();)ho(t,"",e,0,n)&&lo(n.methodInfo,s,a,r,i);Object.assign(o,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;Qe(t,s,r,o,i);)Object.assign(o,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,o,s),i=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,o,s),this._flushClients(),Qe(this,this[Je.REFLECT],e,o,s),Qe(this,this[Je.OBSERVE],e,o,s),i&&function(t,e,o,i,s){let r,a,n=t[Je.NOTIFY],l=Ve++;for(let a in e)e[a]&&(n&&to(t,n,l,a,o,i,s)||s&&io(t,a,o))&&(r=!0);r&&(a=t.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,i,e,o,s),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,o){this[Je.PROPAGATE]&&Qe(this,this[Je.PROPAGATE],t,e,o),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,o)}_runEffectsForTemplate(t,e,o,i){const s=(e,i)=>{Qe(this,t.propertyEffects,e,o,i,t.nodeList);for(let s=t.firstChild;s;s=s.nextSibling)this._runEffectsForTemplate(s,e,o,i)};t.runEffects?t.runEffects(s,e,i):s(e,i)}linkPaths(t,e){t=me(t),e=me(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=me(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let o={path:""};zo(this,ve(this,t,o),o.path,e)}get(t,e){return ve(e||this,t)}set(t,e,o){o?be(o,t,e):this[Je.READ_ONLY]&&this[Je.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let o={path:""},i=ve(this,t,o),s=i.length,r=i.push(...e);return e.length&&Do(this,i,o.path,s,e.length,[]),r}pop(t){let e={path:""},o=ve(this,t,e),i=Boolean(o.length),s=o.pop();return i&&Do(this,o,e.path,o.length,0,[s]),s}splice(t,e,o,...i){let s,r={path:""},a=ve(this,t,r);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),s=2===arguments.length?a.splice(e):a.splice(e,o,...i),(i.length||s.length)&&Do(this,a,r.path,e,i.length,s),s}shift(t){let e={path:""},o=ve(this,t,e),i=Boolean(o.length),s=o.shift();return i&&Do(this,o,e.path,0,0,[s]),s}unshift(t,...e){let o={path:""},i=ve(this,t,o),s=i.unshift(...e);return e.length&&Do(this,i,o.path,0,e.length,[]),s}notifyPath(t,e){let o;if(1==arguments.length){let i={path:""};e=ve(this,t,i),o=i.path}else o=Array.isArray(t)?me(t):t;this._setPendingPropertyOrPath(o,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var o;this._addPropertyEffect(t,Je.READ_ONLY),e&&(this["_set"+(o=t,o[0].toUpperCase()+o.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,o){let i={property:t,method:e,dynamicFn:Boolean(o)};this._addPropertyEffect(t,Je.OBSERVE,{fn:oo,info:i,trigger:{name:t}}),o&&this._addPropertyEffect(e,Je.OBSERVE,{fn:oo,info:i,trigger:{name:e}})}_createMethodObserver(t,e){let o=ko(t);if(!o)throw new Error("Malformed observer expression '"+t+"'");vo(this,o,Je.OBSERVE,bo,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Je.NOTIFY,{fn:ro,info:{eventName:_e(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Je.REFLECT,{fn:ao,info:{attrName:e}})}_createComputedProperty(t,e,o){let i=ko(e);if(!i)throw new Error("Malformed computed expression '"+e+"'");const s=vo(this,i,Je.COMPUTE,ho,t,o);Xe(this,Ke)[t]=s}_marshalArgs(t,e,o){const i=this.__data,s=[];for(let r=0,a=t.length;r<a;r++){let{name:a,structured:n,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=de(a,e),s=Co(i,o,t?e:a);h={path:t?e:a,value:s,base:t?ve(i,a):s}}else h=n?Co(i,o,a):i[a];if(Wt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Ge;s[r]=h}return s}static addPropertyEffect(t,e,o){this.prototype._addPropertyEffect(t,e,o)}static createPropertyObserver(t,e,o){this.prototype._createPropertyObserver(t,e,o)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,o){this.prototype._createComputedProperty(t,e,o)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let o=this.constructor._parseTemplate(t),i=this.__preBoundTemplateInfo==o;if(!i)for(let t in o.propertyEffects)this._createPropertyAccessor(t);if(e)if(o=Object.create(o),o.wasPreBound=i,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,i=e.lastChild;o.parent=e,e.lastChild=o,o.previousSibling=i,i?i.nextSibling=o:e.firstChild=o}else this.__templateInfo=o;else this.__preBoundTemplateInfo=o;return o}static _addTemplatePropertyEffect(t,e,o){(t.hostProps=t.hostProps||{})[e]=!0;let i=t.propertyEffects=t.propertyEffects||{};(i[e]=i[e]||[]).push(o)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),So.push(this);let o=super._stampTemplate(t,e);if(So.pop(),e.nodeList=o.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=o.firstChild;e;e=e.nextSibling)t.push(e)}return o.templateInfo=e,function(t,e){let{nodeList:o,nodeInfoList:i}=e;if(i.length)for(let e=0;e<i.length;e++){let s=o[e],r=i[e].bindings;if(r)for(let e=0;e<r.length;e++){let o=r[e];mo(s,o),fo(s,t,o)}s.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),o}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:o,nextSibling:i,parent:s}=e;o?o.nextSibling=i:s&&(s.firstChild=i),i?i.previousSibling=o:s&&(s.lastChild=o),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];le(le(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,o,i){let s=e._parseTemplateNode.call(this,t,o,i);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,o);e&&(t.textContent=_o(e)||" ",co(this,o,i,"text","textContent",e),s=!0)}return s}static _parseTemplateNodeAttribute(t,o,i,s,r){let a=this._parseBindings(r,o);if(a){let e=s,r="property";Ze.test(s)?r="attribute":"$"==s[s.length-1]&&(s=s.slice(0,-1),r="attribute");let n=_o(a);return n&&"attribute"==r&&("class"==s&&t.hasAttribute("class")&&(n+=" "+t.getAttribute(s)),t.setAttribute(s,n)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(s,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(s=xe(s)),co(this,o,i,r,s,a,n),!0}return e._parseTemplateNodeAttribute.call(this,t,o,i,s,r)}static _parseTemplateNestedTemplate(t,o,i){let s=e._parseTemplateNestedTemplate.call(this,t,o,i);const r=t.parentNode,a=i.templateInfo,n="dom-if"===r.localName;Ht&&(n||"dom-repeat"===r.localName)&&(r.removeChild(t),(i=i.parentInfo).templateInfo=a,i.noted=!0,s=!1);let l=a.hostProps;if(Lt&&n)l&&(o.hostProps=Object.assign(o.hostProps||{},l),Ht||(i.parentInfo.noted=!0));else{let t="{";for(let e in l)co(this,o,i,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return s}static _parseBindings(t,e){let o,i=[],s=0;for(;null!==(o=xo.exec(t));){o.index>s&&i.push({literal:t.slice(s,o.index)});let r=o[1][0],a=Boolean(o[2]),n=o[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=n.indexOf("::"))>0&&(h=n.substring(c+2),n=n.substring(0,c),l=!0);let u=ko(n),d=[];if(u){let{args:t,methodName:o}=u;for(let e=0;e<t.length;e++){let o=t[e];o.literal||d.push(o)}let i=e.dynamicFns;(i&&i[o]||u.static)&&(d.push(o),u.dynamicFn=!0)}else d.push(n);i.push({source:n,mode:r,negate:a,customEvent:l,signature:u,dependencies:d,event:h}),s=xo.lastIndex}if(s&&s<t.length){let e=t.substring(s);e&&i.push({literal:e})}return i.length?i:null}static _evaluateBinding(t,e,o,i,s,r){let a;return a=e.signature?bo(t,o,i,0,e.signature):o!=e.source?ve(t,e.source):r&&he(o)?ve(t,o):t.__data[o],e.negate&&(a=!a),a}}})),So=[],Mo=Vt((t=>{const e=Ee(t);function o(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof s?e:null}function i(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const o=t.properties;o&&(e=
|
|
670
670
|
/**
|
|
671
671
|
@license
|
|
672
672
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -676,7 +676,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
676
676
|
Code distributed by Google as part of the polymer project is also
|
|
677
677
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
678
678
|
*/
|
|
679
|
-
function(t){const e={};for(let o in t){const i=t[o];e[o]="function"==typeof i?{type:i}:i}return e}(o))}t.__ownProperties=e}return t.__ownProperties}class s extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=o(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=i(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=o(this);this.__properties=Object.assign({},t&&t._properties,i(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s})),
|
|
679
|
+
function(t){const e={};for(let o in t){const i=t[o];e[o]="function"==typeof i?{type:i}:i}return e}(o))}t.__ownProperties=e}return t.__ownProperties}class s extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=o(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=i(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=o(this);this.__properties=Object.assign({},t&&t._properties,i(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s})),Po=window.ShadyCSS&&window.ShadyCSS.cssBuild,Eo=Vt((t=>{const e=Mo(To(t));function o(t,e,o,i){o.computed&&(o.readOnly=!0),o.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,o.computed,i)),o.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!o.computed):!1===o.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),o.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===o.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),o.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===o.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),o.observer&&t._createPropertyObserver(e,o.observer,i[o.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((o=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",o))||(o.__ownObservers=o.hasOwnProperty(JSCompiler_renameProperty("observers",o))?o.observers:null),o.__ownObservers);var o;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Bt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)o(this.prototype,e,t[e],t)}static createObservers(t,e){const o=this.prototype;for(let i=0;i<t.length;i++)o._createMethodObserver(t[i],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!It||Nt)&&(e=Xt.import(t,"template"),It&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Mt(t.url);else{const t=Xt.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Ft,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let o in e){let i=e[o];"value"in i&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[o]=i)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let o=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof o.value?o.value.call(this):o.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return St(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const o=this.importPath;(function(t,e,o,i){if(!Po){const s=e.content.querySelectorAll("style"),r=ae(e),a=function(t){let e=oe(t);return e?ne(e):[]}(o),n=e.content.firstElementChild;for(let o=0;o<a.length;o++){let s=a[o];s.textContent=t._processStyleText(s.textContent,i),e.content.insertBefore(s,n)}let l=0;for(let e=0;e<r.length;e++){let o=r[e],a=s[l];a!==o?(o=o.cloneNode(!0),a.parentNode.insertBefore(o,a)):l++,o.textContent=t._processStyleText(o.textContent,i)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,o),$t&&Po&&Et){const o=e.content.querySelectorAll("style");if(o){let e="";Array.from(o).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,o?Tt(o):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=le(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Rt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=Tt(this.importPath)),Tt(t,e)}static _parseTemplateContent(t,o,i){return o.dynamicFns=o.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,o,i)}static _addTemplatePropertyEffect(t,o,i){return!jt||o in this._properties||i.info.part.signature&&i.info.part.signature.static||i.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${o}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,o,i)}}})),Fo=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Oo{constructor(t,e){Bo(t,e);const o=e.reduce(((e,o,i)=>e+Io(o)+t[i+1]),t[0]);this.value=o.toString()}toString(){return this.value}}function Io(t){if(t instanceof Oo)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const No=function(t,...e){Bo(t,e);const o=document.createElement("template");let i=e.reduce(((e,o,i)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Oo)return Io(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(o)+t[i+1]),t[0]);return Fo&&(i=Fo.createHTML(i)),o.innerHTML=i,o},Bo=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},jo=Eo(HTMLElement),Ro=[];function Wo(t,e,o=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=o&&t.removeAttribute("dir")}function Uo(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Uo();Ro.forEach((e=>{Wo(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Ho=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),Wo(this,Uo(),null))}attributeChangedCallback(t,e,o){if(super.attributeChangedCallback(t,e,o),"dir"!==t)return;const i=Uo(),s=o===i&&-1===Ro.indexOf(this),r=!o&&e&&-1===Ro.indexOf(this),a=o!==i&&e===i;s||r?(this.__subscribe(),Wo(this,i,o)):a&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Ro.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,o){("dir"!==o||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,o)}_attributeToProperty(t,e,o){"dir"!==t||e?super._attributeToProperty(t,e,o):this.dir=""}__subscribe(){Ro.includes(this)||Ro.push(this)}__unsubscribe(){Ro.includes(this)&&Ro.splice(Ro.indexOf(this),1)}}
|
|
680
680
|
/**
|
|
681
681
|
* @license
|
|
682
682
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -751,13 +751,13 @@ function(t){const e={};for(let o in t){const i=t[o];e[o]="function"==typeof i?{t
|
|
|
751
751
|
<slot name="prefix"></slot>
|
|
752
752
|
<slot></slot>
|
|
753
753
|
<slot name="suffix"></slot>
|
|
754
|
-
`}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}
|
|
754
|
+
`}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}a(Lo);
|
|
755
755
|
/**
|
|
756
756
|
* @license
|
|
757
757
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
758
758
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
759
759
|
*/
|
|
760
|
-
class qo extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.5"}}
|
|
760
|
+
class qo extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.5"}}a(qo);const $o=(t,...e)=>{xt(`lumo-${t}`,e)};
|
|
761
761
|
/**
|
|
762
762
|
* @license
|
|
763
763
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -1362,7 +1362,7 @@ const Go=p`
|
|
|
1362
1362
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1363
1363
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1364
1364
|
*/
|
|
1365
|
-
class Ko extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.9"}}
|
|
1365
|
+
class Ko extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.9"}}a(Ko);const Zo=(t,...e)=>{xt(`lumo-${t}`,e)};
|
|
1366
1366
|
/**
|
|
1367
1367
|
* @license
|
|
1368
1368
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -2490,7 +2490,7 @@ try {
|
|
|
2490
2490
|
* Code distributed by Google as part of the polymer project is also
|
|
2491
2491
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2492
2492
|
*/
|
|
2493
|
-
let si=0,ri=0;const
|
|
2493
|
+
let si=0,ri=0;const ai=[];let ni=!1;const li={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},hi={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},ci={run(t){ni||(ni=!0,queueMicrotask((()=>function(){ni=!1;const t=ai.length;for(let e=0;e<t;e++){const t=ai[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ai.splice(0,t),ri+=t}()))),ai.push(t);const e=si;return si+=1,e},cancel(t){const e=t-ri;if(e>=0){if(!ai[e])throw new Error(`invalid async handle: ${t}`);ai[e]=null}}},ui=new Set;class di{static debounce(t,e,o){return t instanceof di?t._cancelAsync():t=new di,t.setConfig(e,o),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,ui.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),ui.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}let pi;
|
|
2494
2494
|
/**
|
|
2495
2495
|
* @license
|
|
2496
2496
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -2517,7 +2517,7 @@ class yi{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this.
|
|
|
2517
2517
|
* @license
|
|
2518
2518
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2519
2519
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2520
|
-
*/class _i extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${xi()}`}constructor(t,e,o,i={}){super();const{initializer:s,multiple:r,observe:
|
|
2520
|
+
*/class _i extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${xi()}`}constructor(t,e,o,i={}){super();const{initializer:s,multiple:r,observe:a,useUniqueId:n}=i;this.host=t,this.slotName=e,this.tagName=o,this.observe="boolean"!=typeof a||a,this.multiple="boolean"==typeof r&&r,this.slotInitializer=s,r&&(this.nodes=[]),n&&(this.defaultId=this.constructor.generateId(t,e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:o}=this;let i=this.defaultNode;return!i&&o&&(i=document.createElement(o),i instanceof Element&&(""!==e&&i.setAttribute("slot",e),this.node=i,this.defaultNode=i)),i&&t.appendChild(i),i}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new yi(e,(({addedNodes:t,removedNodes:e})=>{const o=this.multiple?this.nodes:[this.node],i=t.filter((t=>!function(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}(t)&&!o.includes(t)));e.length&&(this.nodes=o.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),i&&i.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...o,...i].filter((t=>t!==this.defaultNode)),i.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=i[0],this.initAddedNode(this.node)))}))}}
|
|
2521
2521
|
/**
|
|
2522
2522
|
* @license
|
|
2523
2523
|
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
|
@@ -2587,7 +2587,7 @@ class yi{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this.
|
|
|
2587
2587
|
outline-color: GrayText;
|
|
2588
2588
|
}
|
|
2589
2589
|
}
|
|
2590
|
-
`,Ci=!1,zi=t=>t,Di="string"==typeof document.head.style.touchAction,Ti="__polymerGestures",Si="__polymerGesturesHandled",Mi="__polymerGesturesTouchAction",
|
|
2590
|
+
`,Ci=!1,zi=t=>t,Di="string"==typeof document.head.style.touchAction,Ti="__polymerGestures",Si="__polymerGesturesHandled",Mi="__polymerGesturesTouchAction",Pi=["mousedown","mousemove","mouseup","click"],Ei=[0,1,4,2],Fi=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Oi(t){return Pi.indexOf(t)>-1}let Ii=!1;function Ni(t){if(!Oi(t)&&"touchend"!==t)return Di&&Ii&&Ci?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){Ii=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const Bi=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),ji={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Ri(t){const e=t.type;if(!Oi(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Fi&&(e=Ei[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const Wi={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Ui(t,e,o){t.movefn=e,t.upfn=o,document.addEventListener("mousemove",e),document.addEventListener("mouseup",o)}function Hi(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Li=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],qi={},$i=[];function Yi(t){const e=Li(t);return e.length>0?e[0]:t.target}function Vi(t){const e=t.type,o=t.currentTarget[Ti];if(!o)return;const i=o[e];if(!i)return;if(!t[Si]&&(t[Si]={},e.startsWith("touch"))){const o=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Wi.touch.id=o.identifier),Wi.touch.id!==o.identifier)return;Di||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],o=t.type;if("touchstart"===o)Wi.touch.x=e.clientX,Wi.touch.y=e.clientY,Wi.touch.scrollDecided=!1;else if("touchmove"===o){if(Wi.touch.scrollDecided)return;Wi.touch.scrollDecided=!0;const o=function(t){let e="auto";const o=Li(t);for(let t,i=0;i<o.length;i++)if(t=o[i],t[Mi]){e=t[Mi];break}return e}(t);let i=!1;const s=Math.abs(Wi.touch.x-e.clientX),r=Math.abs(Wi.touch.y-e.clientY);t.cancelable&&("none"===o?i=!0:"pan-x"===o?i=r>s:"pan-y"===o&&(i=s>r)),i?t.preventDefault():Xi("track")}}(t)}const s=t[Si];if(!s.skip){for(let e,o=0;o<$i.length;o++)e=$i[o],i[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let o,r=0;r<$i.length;r++)o=$i[r],i[o.name]&&!s[o.name]&&(s[o.name]=!0,o[e](t))}}function Gi(t,e,o){return!!qi[e]&&(function(t,e,o){const i=qi[e],s=i.deps,r=i.name;let a=t[Ti];a||(t[Ti]=a={});for(let e,o,i=0;i<s.length;i++)e=s[i],Bi&&Oi(e)&&"click"!==e||(o=a[e],o||(a[e]=o={_count:0}),0===o._count&&t.addEventListener(e,Vi,Ni(e)),o[r]=(o[r]||0)+1,o._count=(o._count||0)+1);t.addEventListener(e,o),i.touchAction&&Ki(t,i.touchAction)}(t,e,o),!0)}function Ji(t){$i.push(t),t.emits.forEach((e=>{qi[e]=t}))}function Ki(t,e){Di&&t instanceof HTMLElement&&ci.run((()=>{t.style.touchAction=e})),t[Mi]=e}function Zi(t,e,o){const i=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(i.detail=o,zi(t).dispatchEvent(i),i.defaultPrevented){const t=o.preventer||o.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Xi(t){const e=function(t){for(let e,o=0;o<$i.length;o++){e=$i[o];for(let o,i=0;i<e.emits.length;i++)if(o=e.emits[i],o===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Qi(t,e,o,i){e&&Zi(e,t,{x:o.clientX,y:o.clientY,sourceEvent:o,preventer:i,prevent:t=>Xi(t)})}function ts(t,e,o){if(t.prevent)return!1;if(t.started)return!0;const i=Math.abs(t.x-e),s=Math.abs(t.y-o);return i>=5||s>=5}function es(t,e,o){if(!e)return;const i=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1];let r,a=0;i&&(r=s.x-i.x,a=s.y-i.y),Zi(e,"track",{state:t.state,x:o.clientX,y:o.clientY,dx:s.x-t.x,dy:s.y-t.y,ddx:r,ddy:a,sourceEvent:o,hover:()=>function(t,e){let o=document.elementFromPoint(t,e),i=o;for(;i&&i.shadowRoot&&!window.ShadyDOM;){const s=i;if(i=i.shadowRoot.elementFromPoint(t,e),s===i)break;i&&(o=i)}return o}(o.clientX,o.clientY)})}function os(t,e,o){const i=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),r=Yi(o||e);!r||ji[r.localName]&&r.hasAttribute("disabled")||(isNaN(i)||isNaN(s)||i<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Yi(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const o=e.getBoundingClientRect(),i=t.pageX,s=t.pageY;return!(i>=o.left&&i<=o.right&&s>=o.top&&s<=o.bottom)}return!1}(e))&&(t.prevent||Zi(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:o}))}
|
|
2591
2591
|
/**
|
|
2592
2592
|
* @license
|
|
2593
2593
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -2602,13 +2602,13 @@ class yi{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this.
|
|
|
2602
2602
|
* @license
|
|
2603
2603
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2604
2604
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2605
|
-
*/let
|
|
2605
|
+
*/let as=!1;function ns(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function ls(t,e){const o=Math.max(t.tabIndex,0),i=Math.max(e.tabIndex,0);return 0===o||0===i?i>o:o>i}function hs(t){const e=t.length;if(e<2)return t;const o=Math.ceil(e/2);return function(t,e){const o=[];for(;t.length>0&&e.length>0;)ls(t[0],e[0])?o.push(e.shift()):o.push(t.shift());return o.concat(t,e)}(hs(t.slice(0,o)),hs(t.slice(o)))}function cs(t){return t.getRootNode().activeElement===t}function us(t,e){if(t.nodeType!==Node.ELEMENT_NODE||function(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const o=window.getComputedStyle(t);return"hidden"===o.visibility||"none"===o.display}(t))return!1;const o=t,i=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(o);let s=i>0;i>=0&&e.push(o);let r=[];return r="slot"===o.localName?o.assignedNodes({flatten:!0}):(o.shadowRoot||o).children,[...r].forEach((t=>{s=us(t,e)||s})),s}window.addEventListener("keydown",(()=>{as=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{as=!1}),{capture:!0});
|
|
2606
2606
|
/**
|
|
2607
2607
|
* @license
|
|
2608
2608
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2609
2609
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2610
2610
|
*/
|
|
2611
|
-
const ds=Vt((t=>class extends t{get _keyboardActive(){return
|
|
2611
|
+
const ds=Vt((t=>class extends t{get _keyboardActive(){return as}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),ps=t=>class extends(is(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}
|
|
2612
2612
|
/**
|
|
2613
2613
|
* @license
|
|
2614
2614
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -2645,7 +2645,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
2645
2645
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2646
2646
|
Code distributed by Google as part of the polymer project is also
|
|
2647
2647
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2648
|
-
*/)(No)}ready(){super.ready(),this._tooltipController=new ki(this),this.addController(this._tooltipController)}}
|
|
2648
|
+
*/)(No)}ready(){super.ready(),this._tooltipController=new ki(this),this.addController(this._tooltipController)}}a(fs),ft("vaadin-date-picker-year",p`
|
|
2649
2649
|
:host([current]) [part='year-number'] {
|
|
2650
2650
|
color: var(--lumo-primary-text-color);
|
|
2651
2651
|
}
|
|
@@ -3384,12 +3384,12 @@ let xs=!1,_s=[],ks=[];function As(t){const e=t[0],o=t[1],i=t[2];try{o.apply(e,i)
|
|
|
3384
3384
|
* @license
|
|
3385
3385
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3386
3386
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3387
|
-
*/const zs=t=>t.test(navigator.userAgent),Ds=t=>t.test(navigator.platform);zs(/Android/u),zs(/Chrome/u)&&/Google Inc/u.test(navigator.vendor);const Ts=zs(/Firefox/u),Ss=Ds(/^iPad/u)||Ds(/^Mac/u)&&navigator.maxTouchPoints>1,Ms=Ds(/^iPhone/u)||Ss;zs(/^((?!chrome|android).)*safari/iu);const
|
|
3387
|
+
*/const zs=t=>t.test(navigator.userAgent),Ds=t=>t.test(navigator.platform);zs(/Android/u),zs(/Chrome/u)&&/Google Inc/u.test(navigator.vendor);const Ts=zs(/Firefox/u),Ss=Ds(/^iPad/u)||Ds(/^Mac/u)&&navigator.maxTouchPoints>1,Ms=Ds(/^iPhone/u)||Ss;zs(/^((?!chrome|android).)*safari/iu);const Ps=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
|
|
3388
3388
|
/**
|
|
3389
3389
|
* @license
|
|
3390
3390
|
* Copyright (c) 2017 Anton Korzunov
|
|
3391
3391
|
* SPDX-License-Identifier: MIT
|
|
3392
|
-
*/let
|
|
3392
|
+
*/let Es=new WeakMap,Fs=new WeakMap,Os={},Is=0;const Ns=t=>t&&t.nodeType===Node.ELEMENT_NODE,Bs=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},js=(t,e=document.body,o="data-aria-hidden")=>{const i=Array.from(Array.isArray(t)?t:[t]);return e&&i.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,o,i)=>{const s=((t,e)=>Ns(t)?e.map((e=>{if(!Ns(e))return Bs(e,"is not a valid element"),null;let o=e;for(;o&&o!==t;){if(t.contains(o))return e;o=o.getRootNode().host}return Bs(e,"is not contained inside",t),null})).filter((t=>Boolean(t))):(Bs(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);Os[o]||(Os[o]=new WeakMap);const r=Os[o],a=[],n=new Set,l=new Set(s),h=t=>{if(!t||n.has(t))return;n.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};s.forEach(h);const c=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(n.has(t))c(t);else{const e=t.getAttribute(i),s=null!==e&&"false"!==e,n=(Es.get(t)||0)+1,l=(r.get(t)||0)+1;Es.set(t,n),r.set(t,l),a.push(t),1===n&&s&&Fs.set(t,!0),1===l&&t.setAttribute(o,"true"),s||t.setAttribute(i,"true")}}))};return c(e),n.clear(),Is+=1,()=>{a.forEach((t=>{const e=Es.get(t)-1,s=r.get(t)-1;Es.set(t,e),r.set(t,s),e||(Fs.has(t)?Fs.delete(t):t.removeAttribute(i)),s||t.removeAttribute(o)})),Is-=1,Is||(Es=new WeakMap,Es=new WeakMap,Fs=new WeakMap,Os={})}})(i,e,o,"aria-hidden")};
|
|
3393
3393
|
/**
|
|
3394
3394
|
* @license
|
|
3395
3395
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -3400,7 +3400,7 @@ class Rs{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t
|
|
|
3400
3400
|
* @license
|
|
3401
3401
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3402
3402
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3403
|
-
*/class Ws{saveFocus(t){this.focusNode=t||
|
|
3403
|
+
*/class Ws{saveFocus(t){this.focusNode=t||ns()}restoreFocus(){const t=this.focusNode;t&&(ns()===document.body?setTimeout((()=>t.focus())):t.focus(),this.focusNode=null)}}
|
|
3404
3404
|
/**
|
|
3405
3405
|
* @license
|
|
3406
3406
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -3410,7 +3410,7 @@ class Rs{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t
|
|
|
3410
3410
|
* @license
|
|
3411
3411
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3412
3412
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3413
|
-
*/const Ls=t=>class extends(Qo(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Rs(this),this.__focusTrapController=new Hs(this),this.__focusRestorationController=new Ws}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()&&this.__focusRestorationController.restoreFocus()}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=
|
|
3413
|
+
*/const Ls=t=>class extends(Qo(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Rs(this),this.__focusTrapController=new Hs(this),this.__focusRestorationController=new Ws}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()&&this.__focusRestorationController.restoreFocus()}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=ns();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const o=t.ownerDocument;for(;e&&e!==o&&e!==this;)e=e.parentNode||e.host;return e===this}}
|
|
3414
3414
|
/**
|
|
3415
3415
|
* @license
|
|
3416
3416
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -3420,12 +3420,12 @@ class Rs{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t
|
|
|
3420
3420
|
* @license
|
|
3421
3421
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3422
3422
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3423
|
-
*/,Ys=t=>class extends(Ls($s(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),Ms&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth,o=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&o>t?o-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,o,i){const s=this._oldOwner!==e||this._oldModel!==o;this._oldModel=o,this._oldOwner=e;const r=this._oldRenderer!==t;this._oldRenderer=t;const
|
|
3423
|
+
*/,Ys=t=>class extends(Ls($s(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),Ms&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth,o=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&o>t?o-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,o,i){const s=this._oldOwner!==e||this._oldModel!==o;this._oldModel=o,this._oldOwner=e;const r=this._oldRenderer!==t;this._oldRenderer=t;const a=this._oldOpened!==i;this._oldOpened=i,r&&(this.innerHTML="",delete this._$litPart$),i&&t&&(r||a||s)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),Cs(this,(()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const o=`__${t}Handler`,i=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",i),delete this[o])};this[o]=i,this.addEventListener("animationend",i)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
|
|
3424
3424
|
/**
|
|
3425
3425
|
* @license
|
|
3426
3426
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3427
3427
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3428
|
-
*/,Vs={start:"top",end:"bottom"},Gs={start:"left",end:"right"},Js=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),Ks=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value:0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Js.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Js.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this.setAttribute("dir",t.direction),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect(),e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const o=this.__isRTL,i=this.__shouldAlignStartHorizontally(t,o),s=!o&&i||o&&!i;this.style.alignItems=s?"flex-start":"flex-end";const r=this.getBoundingClientRect(),
|
|
3428
|
+
*/,Vs={start:"top",end:"bottom"},Gs={start:"left",end:"right"},Js=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),Ks=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value:0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Js.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Js.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this.setAttribute("dir",t.direction),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect(),e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const o=this.__isRTL,i=this.__shouldAlignStartHorizontally(t,o),s=!o&&i||o&&!i;this.style.alignItems=s?"flex-start":"flex-end";const r=this.getBoundingClientRect(),a=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,Vs,this,e),n=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Gs,this,i);Object.assign(this.style,a,n),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!s),this.toggleAttribute("start-aligned",s)}__shouldAlignStartHorizontally(t,e){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const i=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,o,i,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Gs)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,o,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,Vs)}__shouldAlignStart(t,e,o,i,s,r,a){const n=o-t[r?a.end:a.start]-i[a.end],l=t[r?a.start:a.end]-i[a.start],h=s?n:l;return s===(h>(s?l:n)||h>e)}__adjustBottomProperty(t,e,o){let i;if(t===e.end){if(e.end===Vs.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);o>t&&this.__oldViewportHeight&&(i=o-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Gs.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);o>t&&this.__oldViewportWidth&&(i=o-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return i}__calculatePositionInOneDimension(t,e,o,i,s,r){const a=r?i.start:i.end,n=r?i.end:i.start,l=parseFloat(s.style[a]||getComputedStyle(s)[a]),h=this.__adjustBottomProperty(a,i,l),c=h?`${h}px`:`${l+(e[r?i.start:i.end]-t[o===r?i.end:i.start])*(r?-1:1)}px`;return{[a]:c,[n]:""}}}
|
|
3429
3429
|
/**
|
|
3430
3430
|
* @license
|
|
3431
3431
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -3526,18 +3526,18 @@ ft("vaadin-date-picker-overlay",[p`
|
|
|
3526
3526
|
* @license
|
|
3527
3527
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3528
3528
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3529
|
-
*/
|
|
3529
|
+
*/a(Zs);const sr=document.createElement("template");sr.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class rr extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(sr.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 o=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(o)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px",Ts&&(this.$.scroller.tabIndex=-1))}forceUpdate(){this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel())}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,o=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||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=di.debounce(this._debouncerScrollFinish,li.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],t)||this._isVisible(this._buffers[1],t)||(this.position=this.position)}))}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=di.debounce(this._debouncerUpdateClones,li.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 o=0;o<this.bufferSize;o++){const o=document.createElement("div");o.style.height=`${this.itemHeight}px`,o.instance={};const i=`vaadin-infinite-scroller-item-content-${xi()}`,s=document.createElement("slot");s.setAttribute("name",i),s._itemWrapper=o,e.appendChild(s),o.setAttribute("slot",i),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((o=>{t.instance[o]=e[o]}))}_updateClones(t){this._firstIndex=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((o,i)=>{if(!o.updated){const s=this._firstIndex+this.bufferSize*i;[...o.children].forEach(((o,i)=>{const r=o._itemWrapper;t&&!this._isVisible(r,e)||this._updateElement(r.instance,s+i)})),o.updated=!0}}))}_isVisible(t,e){const o=t.getBoundingClientRect();return o.bottom>e.top&&o.top<e.bottom}}
|
|
3530
3530
|
/**
|
|
3531
3531
|
* @license
|
|
3532
3532
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3533
3533
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3534
|
-
*/const
|
|
3534
|
+
*/const ar=document.createElement("template");ar.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 270px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n }\n </style>\n",a(class extends rr{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(ar.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=or(e)}});
|
|
3535
3535
|
/**
|
|
3536
3536
|
* @license
|
|
3537
3537
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3538
3538
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3539
3539
|
*/
|
|
3540
|
-
const
|
|
3540
|
+
const nr=document.createElement("template");nr.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 80px;\n width: 50px;\n display: block;\n height: 100%;\n position: absolute;\n right: 0;\n transform: translateX(100%);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n /* Center the year scroller position. */\n --vaadin-infinite-scroller-buffer-offset: 50%;\n }\n\n :host::before {\n content: '';\n display: block;\n background: transparent;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-width: 6px;\n border-style: solid;\n border-color: transparent;\n border-left-color: #000;\n }\n </style>\n",a(class extends rr{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(nr.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,o=new Date(e);return o.setFullYear(parseInt(t)+e.getFullYear()),o.getFullYear()}});
|
|
3541
3541
|
/**
|
|
3542
3542
|
* @license
|
|
3543
3543
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
@@ -3562,7 +3562,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3562
3562
|
Code distributed by Google as part of the polymer project is also
|
|
3563
3563
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3564
3564
|
*/
|
|
3565
|
-
function hr(t,e,o,i,s){let r;s&&(r="object"==typeof o&&null!==o,r&&(i=t.__dataTemp[e]));let
|
|
3565
|
+
function hr(t,e,o,i,s){let r;s&&(r="object"==typeof o&&null!==o,r&&(i=t.__dataTemp[e]));let a=i!==o&&(i==i||o==o);return r&&a&&(t.__dataTemp[e]=o),a}a(lr);const cr=Vt((t=>class extends t{_shouldPropertyChange(t,e,o){return hr(this,t,e,o,!0)}})),ur=Vt((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,o){return hr(this,t,e,o,this.mutableData)}}));cr._mutablePropertyChange=hr;
|
|
3566
3566
|
/**
|
|
3567
3567
|
@license
|
|
3568
3568
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3572,7 +3572,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3572
3572
|
Code distributed by Google as part of the polymer project is also
|
|
3573
3573
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3574
3574
|
*/
|
|
3575
|
-
let dr=null;function pr(){return dr}pr.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:pr,writable:!0}});const mr=To(pr),fr=cr(mr),vr=To(class{});class br extends vr{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let o=this.__templatizeOptions;(t&&o.instanceProps||!o.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,o){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,o(t)}));else{let i=this.__dataHost.__dataHost;i&&i._addEventListenerToNode(t,e,o)}}_showHideChildren(t){!function(t,e){for(let o=0;o<e.length;o++){let i=e[o];if(Boolean(t)!=Boolean(i.__hideTemplateChildren__))if(i.nodeType===Node.TEXT_NODE)t?(i.__polymerTextContent__=i.textContent,i.textContent=""):i.textContent=i.__polymerTextContent__;else if("slot"===i.localName)if(t)i.__polymerReplaced__=document.createComment("hidden-slot"),le(le(i).parentNode).replaceChild(i.__polymerReplaced__,i);else{const t=i.__polymerReplaced__;t&&le(le(t).parentNode).replaceChild(i,t)}else i.style&&(t?(i.__polymerDisplay__=i.style.display,i.style.display="none"):i.style.display=i.__polymerDisplay__);i.__hideTemplateChildren__=t,i._showHideChildren&&i._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,o){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=o:super._setUnmanagedPropertyToNode(t,e,o)}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 gr=cr(br);function yr(t){let e=t.__dataHost;return e&&e._methodHost||e}function wr(t,e){return function(t,o,i){e.call(t.__templatizeOwner,o.substring(6),i[o])}}function xr(t,e){return function(t,o,i){e.call(t.__templatizeOwner,t,o,i[o])}}function _r(t,e,o){if(It&&!yr(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(o=o||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let i=(e?e.constructor:br)._parseTemplate(t),s=i.templatizeInstanceClass;s||(s=function(t,e,o){let i=o.mutableData?gr:br;_r.mixin&&(i=_r.mixin(i));let s=class extends i{};return s.prototype.__templatizeOptions=o,s.prototype._bindTemplate(t),function(t,e,o,i){let s=o.hostProps||{};for(let e in i.instanceProps){delete s[e];let o=i.notifyInstanceProp;o&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:xr(0,o)})}if(i.forwardHostProp&&e.__dataHost)for(let e in s)o.hasHostProps||(o.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,o){t.__dataHost._setPendingPropertyOrPath("_host_"+e,o[e],!0,!0)}})}(s,t,e,o),s}(t,i,o),i.templatizeInstanceClass=s);const r=yr(t);!function(t,e,o,i){let s=o.forwardHostProp;if(s&&e.hasHostProps){const r="template"==t.localName;let
|
|
3575
|
+
let dr=null;function pr(){return dr}pr.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:pr,writable:!0}});const mr=To(pr),fr=cr(mr),vr=To(class{});class br extends vr{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let o=this.__templatizeOptions;(t&&o.instanceProps||!o.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,o){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,o(t)}));else{let i=this.__dataHost.__dataHost;i&&i._addEventListenerToNode(t,e,o)}}_showHideChildren(t){!function(t,e){for(let o=0;o<e.length;o++){let i=e[o];if(Boolean(t)!=Boolean(i.__hideTemplateChildren__))if(i.nodeType===Node.TEXT_NODE)t?(i.__polymerTextContent__=i.textContent,i.textContent=""):i.textContent=i.__polymerTextContent__;else if("slot"===i.localName)if(t)i.__polymerReplaced__=document.createComment("hidden-slot"),le(le(i).parentNode).replaceChild(i.__polymerReplaced__,i);else{const t=i.__polymerReplaced__;t&&le(le(t).parentNode).replaceChild(i,t)}else i.style&&(t?(i.__polymerDisplay__=i.style.display,i.style.display="none"):i.style.display=i.__polymerDisplay__);i.__hideTemplateChildren__=t,i._showHideChildren&&i._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,o){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=o:super._setUnmanagedPropertyToNode(t,e,o)}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 gr=cr(br);function yr(t){let e=t.__dataHost;return e&&e._methodHost||e}function wr(t,e){return function(t,o,i){e.call(t.__templatizeOwner,o.substring(6),i[o])}}function xr(t,e){return function(t,o,i){e.call(t.__templatizeOwner,t,o,i[o])}}function _r(t,e,o){if(It&&!yr(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(o=o||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let i=(e?e.constructor:br)._parseTemplate(t),s=i.templatizeInstanceClass;s||(s=function(t,e,o){let i=o.mutableData?gr:br;_r.mixin&&(i=_r.mixin(i));let s=class extends i{};return s.prototype.__templatizeOptions=o,s.prototype._bindTemplate(t),function(t,e,o,i){let s=o.hostProps||{};for(let e in i.instanceProps){delete s[e];let o=i.notifyInstanceProp;o&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:xr(0,o)})}if(i.forwardHostProp&&e.__dataHost)for(let e in s)o.hasHostProps||(o.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,o){t.__dataHost._setPendingPropertyOrPath("_host_"+e,o[e],!0,!0)}})}(s,t,e,o),s}(t,i,o),i.templatizeInstanceClass=s);const r=yr(t);!function(t,e,o,i){let s=o.forwardHostProp;if(s&&e.hasHostProps){const r="template"==t.localName;let a=e.templatizeTemplateClass;if(!a){if(r){let t=o.mutableData?fr:mr;class i extends t{}a=e.templatizeTemplateClass=i}else{const o=t.constructor;class i extends o{}a=e.templatizeTemplateClass=i}let n=e.hostProps;for(let t in n)a.prototype._addPropertyEffect("_host_"+t,a.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:wr(0,s)}),a.prototype._createNotifyingProperty("_host_"+t);jt&&i&&function(t,e,o){const i=o.constructor._properties,{propertyEffects:s}=t,{instanceProps:r}=e;for(let t in s)if(!(i[t]||r&&r[t])){const e=s[t];for(let o=0;o<e.length;o++){const{part:i}=e[o].info;if(!i.signature||!i.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,o,i)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),r)!function(t,e){dr=t,Object.setPrototypeOf(t,e.prototype),new e,dr=null}(t,a),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,a.prototype);const o=e.hostProps;for(let e in o)if(e="_host_"+e,e in t){const o=t[e];delete t[e],t.__data[e]=o}}}}(t,i,o,r);let a=class extends s{};return a.prototype._methodHost=r,a.prototype.__dataHost=t,a.prototype.__templatizeOwner=e,a.prototype.__hostProps=i.hostProps,a}
|
|
3576
3576
|
/**
|
|
3577
3577
|
@license
|
|
3578
3578
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3602,7 +3602,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3602
3602
|
Code distributed by Google as part of the polymer project is also
|
|
3603
3603
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3604
3604
|
*/
|
|
3605
|
-
const Tr=ur(jo);class Sr extends Tr{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:!qt,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(Bt&&!
|
|
3605
|
+
const Tr=ur(jo);class Sr extends Tr{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:!qt,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(Bt&&!Pt){if(!Dr){Dr=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=le(le(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let o={};o[this.as]=!0,o[this.indexAs]=!0,o[this.itemsIndexAs]=!0,this.__ctor=_r(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:o,forwardHostProp:function(t,e){let o=this.__instances;for(let i,s=0;s<o.length&&(i=o[s]);s++)i.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,o){if((i=this.as)===(s=e)||ue(i,s)||de(i,s)){let i=t[this.itemsIndexAs];e==this.as&&(this.items[i]=o);let s=pe(this.as,`${JSCompiler_renameProperty("items",this)}.${i}`,e);this.notifyPath(s,o)}var i,s}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,o=this.__getMethodHost();return function(){return o[e].apply(o,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let o=0;o<e.length;o++)0===t.indexOf(e[o])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=kr.debounce(this.__renderDebouncer,e>0?Se.after(e):Me,t.bind(this)),Ar.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),zr()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),o=this.__calculateLimit(e.length);this.__updateInstances(t,o,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),qt&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let o=0;o<t.length;o++)e[o]=o;return this.__filterFn&&(e=e.filter(((e,o,i)=>this.__filterFn(t[e],o,i)))),this.__sortFn&&e.sort(((e,o)=>this.__sortFn(t[e],t[o]))),e}__calculateLimit(t){let e=t;const o=this.__instances.length;if(this.initialCount){let i;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),i=Math.max(e-o,0),this.__chunkCount=i||1):(i=Math.min(Math.max(t-o,0),this.__chunkCount),e=Math.min(o+i,t)),this.__shouldMeasureChunk=i===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,o){const i=this.__itemsIdxToInstIdx={};let s;for(s=0;s<e;s++){let e=this.__instances[s],r=o[s],a=t[r];i[r]=s,e?(e._setPendingProperty(this.as,a),e._setPendingProperty(this.indexAs,s),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(a,s,r)}for(let t=this.__instances.length-1;t>=s;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const o=le(e.root);for(let t=0;t<e.children.length;t++)o.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,o){let i={};return i[this.as]=t,i[this.indexAs]=e,i[this.itemsIndexAs]=o,new this.__ctor(i)}__insertInstance(t,e,o){const i=this.__stampInstance(t,e,o);let s=this.__instances[e+1],r=s?s.children[0]:this;return le(le(this).parentNode).insertBefore(i.root,r),this.__instances[e]=i,i}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let o=t.slice(6),i=o.indexOf("."),s=i<0?o:o.substring(0,i);if(s==parseInt(s,10)){let t=i<0?"":o.substring(i+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[s]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let o;for(;e;)if(o=e.__dataHost?e:e.__templatizeInstance){if(o.__dataHost==t)return o;e=o.__dataHost}else e=le(e).parentNode;return null}(this.template,t)}}customElements.define(Sr.is,Sr);
|
|
3606
3606
|
/**
|
|
3607
3607
|
* @license
|
|
3608
3608
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
@@ -3614,7 +3614,7 @@ const Mr=t=>class extends(ds(t)){static get properties(){return{month:{type:Obje
|
|
|
3614
3614
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3615
3615
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3616
3616
|
*/
|
|
3617
|
-
return function(t){let e=t.getDay();0===e&&(e=7);const o=4-e,i=new Date(t.getTime()+24*o*3600*1e3),s=new Date(0,0);s.setFullYear(i.getFullYear());const r=i.getTime()-s.getTime(),
|
|
3617
|
+
return function(t){let e=t.getDay();0===e&&(e=7);const o=4-e,i=new Date(t.getTime()+24*o*3600*1e3),s=new Date(0,0);s.setFullYear(i.getFullYear());const r=i.getTime()-s.getTime(),a=Math.round(r/864e5);return Math.floor(a/7+1)}(e)}__getDayAriaLabel(t){if(!t)return"";let e=`${this._getDate(t)} ${this.i18n.monthNames[t.getMonth()]} ${t.getFullYear()}, ${this.i18n.weekdays[t.getDay()]}`;return this._isToday(t)&&(e+=`, ${this.i18n.today}`),e}}
|
|
3618
3618
|
/**
|
|
3619
3619
|
* @license
|
|
3620
3620
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
@@ -3681,7 +3681,7 @@ ft("vaadin-month-calendar",p`
|
|
|
3681
3681
|
outline: 3px solid;
|
|
3682
3682
|
}
|
|
3683
3683
|
}
|
|
3684
|
-
`,{moduleId:"vaadin-month-calendar-styles"});class
|
|
3684
|
+
`,{moduleId:"vaadin-month-calendar-styles"});class Pr extends(Mr(wt(jo))){static get template(){return No`
|
|
3685
3685
|
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
|
|
3686
3686
|
<table
|
|
3687
3687
|
id="monthGrid"
|
|
@@ -3723,18 +3723,18 @@ ft("vaadin-month-calendar",p`
|
|
|
3723
3723
|
</template>
|
|
3724
3724
|
</tbody>
|
|
3725
3725
|
</table>
|
|
3726
|
-
`}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate)"},_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&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,o,i,s){const r=["date"];return this.__isDayDisabled(t,i,s)&&r.push("disabled"),this.__isDayFocused(t,e)&&r.push("focused"),this.__isDaySelected(t,o)&&r.push("selected"),this._isToday(t)&&r.push("today"),r.join(" ")}__isDayFocused(t,e){return Xs(t,e)}__isDaySelected(t,e){return Xs(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,o){return!Qs(t,e,o)}__getDayAriaDisabled(t,e,o){if(void 0!==t&&void 0!==e&&void 0!==o)return this.__isDayDisabled(t,e,o)?"true":void 0}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}
|
|
3726
|
+
`}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate)"},_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&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,o,i,s){const r=["date"];return this.__isDayDisabled(t,i,s)&&r.push("disabled"),this.__isDayFocused(t,e)&&r.push("focused"),this.__isDaySelected(t,o)&&r.push("selected"),this._isToday(t)&&r.push("today"),r.join(" ")}__isDayFocused(t,e){return Xs(t,e)}__isDaySelected(t,e){return Xs(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,o){return!Qs(t,e,o)}__getDayAriaDisabled(t,e,o){if(void 0!==t&&void 0!==e&&void 0!==o)return this.__isDayDisabled(t,e,o)?"true":void 0}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}a(Pr);
|
|
3727
3727
|
/**
|
|
3728
3728
|
* @license
|
|
3729
3729
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3730
3730
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3731
3731
|
*/
|
|
3732
|
-
class
|
|
3732
|
+
class Er{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(t){"function"==typeof this.callback&&this.callback(t.matches)}}
|
|
3733
3733
|
/**
|
|
3734
3734
|
* @license
|
|
3735
3735
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3736
3736
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3737
|
-
*/const Er=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},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)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){Ki(this.$.scrollers,"pan-y"),Gi(this.$.scrollers,"track",this._track.bind(this)),Gi(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Gi(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Gi(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Pr(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new _i(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Gi(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new _i(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Gi(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+o,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new _i(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new _i(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Gi(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,o,i){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(o,i))}__updateCalendars(t,e,o,i,s,r,n,a,l){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=o,t.maxDate=i,t.focusedDate=r,t.selectedDate=s,t.showWeekNumbers=n,t.ignoreTaps=a,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,o){t&&t.length&&t.forEach((t=>{t.selectedDate=e,o?t.setAttribute("theme",o):t.removeAttribute("theme")}))}_selectDate(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const o=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const i=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(o+i,e)}const i=this._monthScroller.position>o,s=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+s-1<o;i?this._scrollToPosition(o,e):r&&this._scrollToPosition(o-s+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let o=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(o+=1);return o/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=di.debounce(this._debouncer,li.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,o){return t&&e&&"function"==typeof e.formatDate?e.formatDate(er(t)):o}_onTodayTap(){const t=new Date;Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2);this._scrollToPosition(this._monthScroller.position+e/this._yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let o;this._targetPosition=t,this._revealPromise=new Promise((t=>{o=t}));let i=0;const s=this._monthScroller.position,r=t=>{i||(i=t);const e=t-i;if(e<this.scrollDuration){const t=((t,e,o)=>(t/=this.scrollDuration/2)<1?o/2*t*t+e:-o/2*((t-=1)*(t-2)-1)+e)(e,s,this._targetPosition-s);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this._monthScroller.position=this._targetPosition,this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return or(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){Xs(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate),this._close(),e=!0;break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&Xs(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const o=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,e||(this._focusedMonthDate=o.getDate()),await this.focusDateElement(!1)}async focusDateElement(t=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise((t=>{Cs(this,(()=>{zr(),t()}))})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(tr(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,o){this._dateAllowed(t)?this.focusDate(t,o):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+t),e&&o.setDate(this.focusedDate.getDate()+e),o}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),o=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==o&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const o=new Date(0,0);o.setFullYear(t.getFullYear()),"minDate"===e?(o.setMonth(t.getMonth()),o.setDate(1)):(o.setMonth(t.getMonth()+1),o.setDate(0)),this._dateAllowed(o)?this.focusDate(o):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,o=this.maxDate){return(!e||t>=e)&&(!o||t<=o)}_isTodayAllowed(t,e){const o=new Date,i=new Date(0,0);return i.setFullYear(o.getFullYear()),i.setMonth(o.getMonth()),i.setDate(o.getDate()),this._dateAllowed(i,t,e)}}
|
|
3737
|
+
*/const Fr=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},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)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){Ki(this.$.scrollers,"pan-y"),Gi(this.$.scrollers,"track",this._track.bind(this)),Gi(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Gi(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Gi(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Er(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new _i(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Gi(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new _i(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Gi(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+o,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new _i(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new _i(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Gi(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,o,i){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(o,i))}__updateCalendars(t,e,o,i,s,r,a,n,l){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=o,t.maxDate=i,t.focusedDate=r,t.selectedDate=s,t.showWeekNumbers=a,t.ignoreTaps=n,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,o){t&&t.length&&t.forEach((t=>{t.selectedDate=e,o?t.setAttribute("theme",o):t.removeAttribute("theme")}))}_selectDate(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const o=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const i=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(o+i,e)}const i=this._monthScroller.position>o,s=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+s-1<o;i?this._scrollToPosition(o,e):r&&this._scrollToPosition(o-s+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let o=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(o+=1);return o/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=di.debounce(this._debouncer,li.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,o){return t&&e&&"function"==typeof e.formatDate?e.formatDate(er(t)):o}_onTodayTap(){const t=new Date;Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2);this._scrollToPosition(this._monthScroller.position+e/this._yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let o;this._targetPosition=t,this._revealPromise=new Promise((t=>{o=t}));let i=0;const s=this._monthScroller.position,r=t=>{i||(i=t);const e=t-i;if(e<this.scrollDuration){const t=((t,e,o)=>(t/=this.scrollDuration/2)<1?o/2*t*t+e:-o/2*((t-=1)*(t-2)-1)+e)(e,s,this._targetPosition-s);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this._monthScroller.position=this._targetPosition,this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return or(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){Xs(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate),this._close(),e=!0;break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&Xs(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const o=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,e||(this._focusedMonthDate=o.getDate()),await this.focusDateElement(!1)}async focusDateElement(t=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise((t=>{Cs(this,(()=>{zr(),t()}))})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(tr(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,o){this._dateAllowed(t)?this.focusDate(t,o):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+t),e&&o.setDate(this.focusedDate.getDate()+e),o}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),o=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==o&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const o=new Date(0,0);o.setFullYear(t.getFullYear()),"minDate"===e?(o.setMonth(t.getMonth()),o.setDate(1)):(o.setMonth(t.getMonth()+1),o.setDate(0)),this._dateAllowed(o)?this.focusDate(o):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,o=this.maxDate){return(!e||t>=e)&&(!o||t<=o)}_isTodayAllowed(t,e){const o=new Date,i=new Date(0,0);return i.setFullYear(o.getFullYear()),i.setMonth(o.getMonth()),i.setDate(o.getDate()),this._dateAllowed(i,t,e)}}
|
|
3738
3738
|
/**
|
|
3739
3739
|
* @license
|
|
3740
3740
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
@@ -3805,7 +3805,7 @@ ft("vaadin-date-picker-overlay-content",p`
|
|
|
3805
3805
|
z-index: 2;
|
|
3806
3806
|
flex-shrink: 0;
|
|
3807
3807
|
}
|
|
3808
|
-
`,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Or extends(
|
|
3808
|
+
`,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Or extends(Fr(Qo(wt(Ho(jo))))){static get template(){return No`
|
|
3809
3809
|
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
3810
3810
|
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
3811
3811
|
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
@@ -3825,13 +3825,13 @@ ft("vaadin-date-picker-overlay-content",p`
|
|
|
3825
3825
|
<slot name="today-button"></slot>
|
|
3826
3826
|
<slot name="cancel-button"></slot>
|
|
3827
3827
|
</div>
|
|
3828
|
-
`}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}
|
|
3828
|
+
`}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}a(Or);
|
|
3829
3829
|
/**
|
|
3830
3830
|
* @license
|
|
3831
3831
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3832
3832
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3833
3833
|
*/
|
|
3834
|
-
const Ir=Vt((t=>class extends(ds(ps(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),Nr=new WeakMap,Br=Vt((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Nr.has(t)||Nr.set(t,new Set),Nr.get(t)}(t);this.slotStyles.forEach((o=>{e.has(o)||(function(t,e){const o=document.createElement("style");o.textContent=t,e===document?document.head.appendChild(o):e.insertBefore(o,e.firstChild)}(o,t),e.add(o))}))}})),jr=Vt((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),Rr=t=>class extends(jr(ss(t))){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",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),
|
|
3834
|
+
const Ir=Vt((t=>class extends(ds(ps(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),Nr=new WeakMap,Br=Vt((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Nr.has(t)||Nr.set(t,new Set),Nr.get(t)}(t);this.slotStyles.forEach((o=>{e.has(o)||(function(t,e){const o=document.createElement("style");o.textContent=t,e===document?document.head.appendChild(o):e.insertBefore(o,e.firstChild)}(o,t),e.add(o))}))}})),jr=Vt((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),Rr=t=>class extends(jr(ss(t))){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",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),Ps||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this.clear(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
|
|
3835
3835
|
/**
|
|
3836
3836
|
* @license
|
|
3837
3837
|
* Copyright (c) 2023 Vaadin Ltd.
|
|
@@ -3841,7 +3841,7 @@ const Ir=Vt((t=>class extends(ds(ps(t))){static get properties(){return{autofocu
|
|
|
3841
3841
|
* @license
|
|
3842
3842
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3843
3843
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3844
|
-
*/function Ur(t){return Wr.has(t)||Wr.set(t,new WeakMap),Wr.get(t)}function Hr(t,e){t&&t.removeAttribute(e)}function Lr(t,e){if(!t||!e)return;const o=Ur(e);if(o.has(t))return;const i=vi(t.getAttribute(e));o.set(t,new Set(i))}function qr(t,e,o={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:i,oldId:s,fromUser:r}=o,
|
|
3844
|
+
*/function Ur(t){return Wr.has(t)||Wr.set(t,new WeakMap),Wr.get(t)}function Hr(t,e){t&&t.removeAttribute(e)}function Lr(t,e){if(!t||!e)return;const o=Ur(e);if(o.has(t))return;const i=vi(t.getAttribute(e));o.set(t,new Set(i))}function qr(t,e,o={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:i,oldId:s,fromUser:r}=o,a=Ur(e),n=a.get(t);if(!r&&n)return s&&n.delete(s),void(i&&n.add(i));r&&(n?i||a.delete(t):Lr(t,e),Hr(t,e)),function(t,e,o){const i=vi(t.getAttribute(e));i.delete(o),0!==i.size?t.setAttribute(e,bi(i)):t.removeAttribute(e)}(t,e,s);const l=i||bi(n);l&&gi(t,e,l)}
|
|
3845
3845
|
/**
|
|
3846
3846
|
* @license
|
|
3847
3847
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -3877,7 +3877,7 @@ class $r{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
3877
3877
|
* @license
|
|
3878
3878
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3879
3879
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3880
|
-
*/,Qr=Vt((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,o)=>{this._delegateAttribute(e,t[o])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,o)=>{this._delegateProperty(e,t[o])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),
|
|
3880
|
+
*/,Qr=Vt((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,o)=>{this._delegateAttribute(e,t[o])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,o)=>{this._delegateProperty(e,t[o])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),ta=Vt((t=>class extends(Qr(Zr(jr(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const o=this._hasValidConstraints(e),i=this.__previousHasConstraints&&!o;(this._hasValue||this.invalid)&&o?this.validate():i&&this._setInvalid(!1),this.__previousHasConstraints=o}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),ea=t=>class extends(Br(Ir(ta(Xr(Rr(ss(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=di.debounce(this._preventInputDebouncer,li.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
|
|
3881
3881
|
/**
|
|
3882
3882
|
* @license
|
|
3883
3883
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -3887,17 +3887,17 @@ class $r{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
3887
3887
|
* @license
|
|
3888
3888
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3889
3889
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3890
|
-
*/class
|
|
3890
|
+
*/class oa extends _i{constructor(t,e){super(t,"input","input",{initializer:(t,o)=>{o.value&&(t.value=o.value),o.type&&t.setAttribute("type",o.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}
|
|
3891
3891
|
/**
|
|
3892
3892
|
* @license
|
|
3893
3893
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3894
3894
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3895
|
-
*/class
|
|
3895
|
+
*/class ia{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",(t=>{this.__initLabel(t.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)}}
|
|
3896
3896
|
/**
|
|
3897
3897
|
* @license
|
|
3898
3898
|
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
3899
3899
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3900
|
-
*/const
|
|
3900
|
+
*/const sa=[p`
|
|
3901
3901
|
:host {
|
|
3902
3902
|
display: inline-flex;
|
|
3903
3903
|
outline: none;
|
|
@@ -3967,17 +3967,17 @@ class $r{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
3967
3967
|
* @license
|
|
3968
3968
|
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
3969
3969
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3970
|
-
*/],
|
|
3970
|
+
*/],ra=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e)return;if(void 0===t)return;const{classList:o}=e;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&o.remove(...t)}const i="string"==typeof t?t.split(" "):[];i.length>0&&o.add(...i),this.__previousClasses=i}}
|
|
3971
3971
|
/**
|
|
3972
3972
|
* @license
|
|
3973
3973
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3974
3974
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3975
|
-
*/;class
|
|
3975
|
+
*/;class aa{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")}}
|
|
3976
3976
|
/**
|
|
3977
3977
|
* @license
|
|
3978
3978
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3979
3979
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3980
|
-
*/const ln=t=>class extends(nn(Qo(Ir(tn(ss(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),o=new Date;let i,s=o.getMonth(),r=o.getFullYear();if(3===e.length?(s=parseInt(e[0])-1,i=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,o=0,i=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let s=e+100*Math.floor(t.getFullYear()/100);return t<new Date(s-50,o,i)?s-=100:t>new Date(s+50,o,i)&&(s+=100),s}(this.referenceDate?ir(this.referenceDate):new Date,r,s,i))):2===e.length?(s=parseInt(e[0])-1,i=parseInt(e[1])):1===e.length&&(i=parseInt(e[0])),void 0!==i)return{day:i,month:s,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},_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:Ms},_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)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}_onFocus(t){super._onFocus(t),this._noInput&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this._selectParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Pr(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new an(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__userConfirmedDate=!0,this._selectDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__userConfirmedDate=!!t.detail.date,this._selectDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value}))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=ir(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(er(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),o=!this._selectedDate||Qs(this._selectedDate,this._minDate,this._maxDate);let i=!0;return this.inputElement&&(this.inputElement.checkValidity?i=this.inputElement.checkValidity():this.inputElement.validate&&(i=this.inputElement.validate())),e&&o&&i}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){return!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__dispatchChange(){this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_selectDate(t){const e=this.value;this._selectedDate=t,e!==this.value&&this.__dispatchChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,o,i,s,r){return!t||e&&(!r||s)||o&&s||!i.parseDate}_formatISO(t){if(!(t instanceof Date))return"";const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let o="",i="0000",s=t.getFullYear();return s<0?(s=-s,o="-",i="000000"):t.getFullYear()>=1e4&&(o="+",i="000000"),[o+e(s,i),e(t.getMonth()+1),e(t.getDate())].join("-")}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0!==t&&void 0!==e&&(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0!==t&&void 0!==e&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(t))}_valueChanged(t,e){const o=ir(t);!t||o?(t?Xs(this._selectedDate,o)||(this._selectedDate=o,void 0!==e&&this.validate()):this._selectedDate=null,this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,o,i,s,r,n,a){t&&(t.i18n=e,t.label=o,t.minDate=i,t.maxDate=s,t.focusedDate=r,t.selectedDate=n,t.showWeekNumbers=a)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._close()}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const o=t.focusedDate||e;t.scrollToDate(o),this._ignoreFocusedDateChange=!0,t.focusedDate=o,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const i=this._nativeInput;this._noInput&&i&&(i.blur(),this._overlayContent.focusDateElement()),this.__showOthers=js(this._noInput?t:[i,t])}_getInitialPosition(){const t=ir(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||Qs(e,this._minDate,this._maxDate)?e:tr(e,[this._minDate,this._maxDate])}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this._selectDate(t):(this.__keepInputValue=!0,this._selectDate(null),this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&this._selectDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this.__userConfirmedDate?this.__userConfirmedDate=!1:this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this._keyboardActive||this.validate()}_onScroll(t){t.target!==window&&this._overlayContent.contains(t.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){this.autoOpenDisabled&&!this._noInput||(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this._inputElementValue="",this.value="",this.__dispatchChange()}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){const e=this.value;this.opened?this.close():this._selectParsedOrFocusedDate(),e===this.value&&this.validate()}_onEscape(t){if(!this.opened)return this.clearButtonVisible&&this.value?(t.stopPropagation(),void this._onClearButtonClick(t)):void(this.autoOpenDisabled?(""===this.inputElement.value&&this._selectDate(null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate()))}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,Xs(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return ir(t)}}
|
|
3980
|
+
*/const na=t=>class extends(ra(Qo(Ir(ta(ss(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),o=new Date;let i,s=o.getMonth(),r=o.getFullYear();if(3===e.length?(s=parseInt(e[0])-1,i=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,o=0,i=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let s=e+100*Math.floor(t.getFullYear()/100);return t<new Date(s-50,o,i)?s-=100:t>new Date(s+50,o,i)&&(s+=100),s}(this.referenceDate?ir(this.referenceDate):new Date,r,s,i))):2===e.length?(s=parseInt(e[0])-1,i=parseInt(e[1])):1===e.length&&(i=parseInt(e[0])),void 0!==i)return{day:i,month:s,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},_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:Ms},_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)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}_onFocus(t){super._onFocus(t),this._noInput&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this._selectParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Er(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new aa(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__userConfirmedDate=!0,this._selectDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__userConfirmedDate=!!t.detail.date,this._selectDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value}))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=ir(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(er(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),o=!this._selectedDate||Qs(this._selectedDate,this._minDate,this._maxDate);let i=!0;return this.inputElement&&(this.inputElement.checkValidity?i=this.inputElement.checkValidity():this.inputElement.validate&&(i=this.inputElement.validate())),e&&o&&i}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){return!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__dispatchChange(){this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_selectDate(t){const e=this.value;this._selectedDate=t,e!==this.value&&this.__dispatchChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,o,i,s,r){return!t||e&&(!r||s)||o&&s||!i.parseDate}_formatISO(t){if(!(t instanceof Date))return"";const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let o="",i="0000",s=t.getFullYear();return s<0?(s=-s,o="-",i="000000"):t.getFullYear()>=1e4&&(o="+",i="000000"),[o+e(s,i),e(t.getMonth()+1),e(t.getDate())].join("-")}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0!==t&&void 0!==e&&(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0!==t&&void 0!==e&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(t))}_valueChanged(t,e){const o=ir(t);!t||o?(t?Xs(this._selectedDate,o)||(this._selectedDate=o,void 0!==e&&this.validate()):this._selectedDate=null,this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,o,i,s,r,a,n){t&&(t.i18n=e,t.label=o,t.minDate=i,t.maxDate=s,t.focusedDate=r,t.selectedDate=a,t.showWeekNumbers=n)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._close()}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const o=t.focusedDate||e;t.scrollToDate(o),this._ignoreFocusedDateChange=!0,t.focusedDate=o,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const i=this._nativeInput;this._noInput&&i&&(i.blur(),this._overlayContent.focusDateElement()),this.__showOthers=js(this._noInput?t:[i,t])}_getInitialPosition(){const t=ir(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||Qs(e,this._minDate,this._maxDate)?e:tr(e,[this._minDate,this._maxDate])}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this._selectDate(t):(this.__keepInputValue=!0,this._selectDate(null),this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&this._selectDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this.__userConfirmedDate?this.__userConfirmedDate=!1:this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this._keyboardActive||this.validate()}_onScroll(t){t.target!==window&&this._overlayContent.contains(t.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){this.autoOpenDisabled&&!this._noInput||(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this._inputElementValue="",this.value="",this.__dispatchChange()}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){const e=this.value;this.opened?this.close():this._selectParsedOrFocusedDate(),e===this.value&&this.validate()}_onEscape(t){if(!this.opened)return this.clearButtonVisible&&this.value?(t.stopPropagation(),void this._onClearButtonClick(t)):void(this.autoOpenDisabled?(""===this.inputElement.value&&this._selectDate(null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate()))}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,Xs(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return ir(t)}}
|
|
3981
3981
|
/**
|
|
3982
3982
|
* @license
|
|
3983
3983
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
@@ -3988,7 +3988,7 @@ class $r{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
3988
3988
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3989
3989
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3990
3990
|
*/
|
|
3991
|
-
ft("vaadin-date-picker",[
|
|
3991
|
+
ft("vaadin-date-picker",[sa,p`
|
|
3992
3992
|
:host([opened]) {
|
|
3993
3993
|
pointer-events: auto;
|
|
3994
3994
|
}
|
|
@@ -4001,7 +4001,7 @@ ft("vaadin-date-picker",[rn,p`
|
|
|
4001
4001
|
direction: rtl;
|
|
4002
4002
|
text-align: left;
|
|
4003
4003
|
}
|
|
4004
|
-
`],{moduleId:"vaadin-date-picker-styles"});class
|
|
4004
|
+
`],{moduleId:"vaadin-date-picker-styles"});class la extends(na(ea(wt(fi(jo))))){static get is(){return"vaadin-date-picker"}static get template(){return No`
|
|
4005
4005
|
<div class="vaadin-date-picker-container">
|
|
4006
4006
|
<div part="label">
|
|
4007
4007
|
<slot name="label"></slot>
|
|
@@ -4043,4 +4043,4 @@ ft("vaadin-date-picker",[rn,p`
|
|
|
4043
4043
|
></vaadin-date-picker-overlay>
|
|
4044
4044
|
|
|
4045
4045
|
<slot name="tooltip"></slot>
|
|
4046
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new on(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new sn(this.inputElement,this._labelController)),this._tooltipController=new ki(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.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}}n(hn);const cn=class{constructor(o){t(this,o),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.showFilterId=!0,this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.quickFiltersActive=!1,this.clientStyling="",this.clientStylingUrlContent="",this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={ticketDrawId:"",filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1}componentDidRender(){document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value=""),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),(this.filterData.ticketDrawId||this.filterData.filterFromCalendar||this.filterData.filterToCalendar)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){this.modalCloseEvent(),this.showClearButton=!0,this.filterSelectionHandler(this.filterData),console.log(this.showClearButton)}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.filterData={}}handleTicketDrawId(t){this.filterData.ticketDrawId=t.target.value}handleFilterFrom(t){this.filterData.filterFromCalendar=new Date(t.target.value).toISOString()}handleFilterTo(t){this.filterData.filterToCalendar=new Date(t.target.value).toISOString()}render(){return o("div",{key:"d74774bd58fa3df6b0038fd979fb4aec4262d43d",class:"HelperFilters",ref:t=>this.stylingContainer=t},o("div",{key:"0827128924ba350888ae81e67e0306e536b15047",class:"FilterButtonsWrapper"},o("button",{key:"73ae5aff5896195cd895410caf44dccfa1ac5cfc",class:"FilterOpen",onClick:()=>this.toggleFilterModal()},r("filterOpen",this.language)),console.log("in filter Open",this.showClearButton,this.quickFiltersActive),this.showClearButton||this.quickFiltersActive?o("button",{class:"FilterClear",onClick:()=>this.resetSearch()},r("filterClear",this.language)):null),o("helper-modal",{key:"add83df2714fdb69e8dfa7a0f5d1eb0d526fc2b4","title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},o("div",{key:"861b04161876b557184fe49c514867788147e4b9",class:"FilterModalHeader"},o("h3",{key:"7471430912f301ff995c401b08298d9006816216",class:"FilterModalTitle"},r(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),o("div",{key:"af6bd8e253f332c8724e1bb40100ba5e1e59838f",class:"FilterModalBody"},o("input",{key:"9edc7e14b801d40d4861625264f82b2fa213a770",id:"FilterById",type:"text",value:this.filterData.ticketDrawId,onInput:t=>this.handleTicketDrawId(t),class:"FilterModalSearch",placeholder:r(this.activateTicketSearch?"filterTicketPlaceholder":"filterDrawPlaceholder",this.language)}),o("p",{key:"9665b359f9d6da19f120eb9bb315c4b144c80ced"},r("filterOrDate",this.language)),o("div",{key:"d155c7d73a719aaedc581f51aa97cf21ec3125df",class:"FilterCalendarWrapper"},o("vaadin-date-picker",{key:"586fb38bc5c718a4afa06ebec96bec0fd46949eb",value:this.filterData.filterFromCalendar,onChange:t=>this.handleFilterFrom(t),placeholder:r("filterFromCalendar",this.language),class:"VaadinDatePicker"}),o("vaadin-date-picker",{key:"42e8965b2c740c19c53687c114faf6aa22f11de8",value:this.filterData.filterToCalendar,onChange:t=>this.handleFilterTo(t),placeholder:r("filterToCalendar",this.language),class:"VaadinDatePicker"}))),o("div",{key:"7529eef1b25d130d183a55e45862418444054d3c",class:"FilterModalFooter"},o("button",{key:"7dac7dc7b01c1c66dde7c6670a352f597b3f75fc",class:"FilterModalButton",onClick:()=>this.filterSearch()},r("filterModalButton",this.language)))))}};cn.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}';const un=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),dn=class{constructor(o){t(this,o),this.cancel=e(this,"modalCloseEvent",7),this.userAgent=window.navigator.userAgent,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.titleModal=void 0,this.visible=!0,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.visible&&o("div",{key:"ba2aed789565b37bfdbb34bdf3ccace827231653",class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:t=>this.stylingContainer=t},o("div",{key:"151ca4cd80d259ac955b92b10bf6f0df2698a937",class:"HelperModalWrapper HelperModalVisible"},o("div",{key:"804cb1dea73321c4935e4a8ddb1136e98e89a070",class:"HelperModalContent"+(un(this.userAgent)?" HelperModalMobileContent":"")},o("span",{key:"30cf7928c1e4baa53f3514fc1930823db76c874c",class:"HelperModalClose"+(un(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),o("slot",{key:"5c1323a98cdcd09669020a00affe5673856e807e"}))))}};dn.style=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px #848e97;box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:#FFF;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:#000}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:#000}";export{cn as helper_filters,dn as helper_modal}
|
|
4046
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new oa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new ia(this.inputElement,this._labelController)),this._tooltipController=new ki(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.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}}a(la);const ha=class{constructor(o){t(this,o),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.handleTicketDrawId=t=>{this.filterData.ticketDrawId=t.target.value},this.handleFilterFrom=t=>{let e=t.target.value.split("-");this.filterData.filterFromCalendar=new Date(Number(e[0]),Number(e[1])-1,Number(e[2]),0,0,0).toISOString()},this.handleFilterTo=t=>{let e=t.target.value.split("-");this.filterData.filterToCalendar=new Date(Number(e[0]),Number(e[1])-1,Number(e[2]),23,59,59).toISOString()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.showFilterId=!0,this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.quickFiltersActive=!1,this.clientStyling="",this.clientStylingUrlContent="",this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={ticketDrawId:"",filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1}componentDidRender(){document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value=""),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),(this.filterData.ticketDrawId||this.filterData.filterFromCalendar||this.filterData.filterToCalendar)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){this.modalCloseEvent(),this.showClearButton=!0,this.filterSelectionHandler(this.filterData)}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.filterData={}}render(){return o("div",{key:"285e81fe3f4ba59c4a17445e8a296408a21ac15c",class:"HelperFilters",ref:t=>this.stylingContainer=t},o("div",{key:"e1839ec68ae9f4d54a97b7e0bc81fd5bd9c6b924",class:"FilterButtonsWrapper"},o("button",{key:"5b6b2402dad6d7c1c315ffd5a2e251e898c8db5b",class:"FilterOpen",onClick:()=>this.toggleFilterModal()},r("filterOpen",this.language)),this.showClearButton||this.quickFiltersActive?o("button",{class:"FilterClear",onClick:()=>this.resetSearch()},r("filterClear",this.language)):null),o("helper-modal",{key:"c60e5024e590e3c2217c4d2698f86a5b6d33562a","title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},o("div",{key:"d0fcf27d381016db6c6460973cefbb28187cbd01",class:"FilterModalHeader"},o("h3",{key:"ab73abba95ea9654c902db1f4650b7bc004c62c5",class:"FilterModalTitle"},r(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),o("div",{key:"13dff7787135e8e35dadfb23b1acdf9ea11a995b",class:"FilterModalBody"},this.showFilterId&&o("div",{key:"6c773a1b5a5af00c6c2c69aaa24c2f2fa766356a"},o("input",{key:"f6ba11c2abaa1977358f08a923db1b7c12290ef1",id:"FilterById",type:"text",value:this.filterData.ticketDrawId,onInput:this.handleTicketDrawId,class:"FilterModalSearch",placeholder:r(this.activateTicketSearch?"filterTicketPlaceholder":"filterDrawPlaceholder",this.language)}),o("p",{key:"39fd8bfc2422a227cf118672213b0499298c73bc"},r("filterOrDate",this.language))),o("div",{key:"f86cf8390870b64ed646c94c312198a21f99f565",class:"FilterCalendarWrapper"},o("vaadin-date-picker",{key:"cddc64eda6025e2a3568f86e0e039ded55530ab1",value:this.filterData.filterFromCalendar,onChange:this.handleFilterFrom,placeholder:r("filterFromCalendar",this.language),class:"VaadinDatePicker"}),o("vaadin-date-picker",{key:"0963561d635097452964f55bccf5182cde88e0c2",value:this.filterData.filterToCalendar,onChange:this.handleFilterTo,placeholder:r("filterToCalendar",this.language),class:"VaadinDatePicker"}))),o("div",{key:"5f880497e96ba7e55fb1f46b073d8b6259feded5",class:"FilterModalFooter"},o("button",{key:"64cb6b50666e8a9879e3fc10df8ab36315357cef",class:"FilterModalButton",onClick:()=>this.filterSearch()},r("filterModalButton",this.language)))))}};ha.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:var(--emw--color-typography, #009993);text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:var(--emw--button-border-radius, 4px);background:var(--emw--color-gray-transparency-60, #e8ebef);color:var(--emw--color-secondary-variant, #263445);width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:var(--emw--color-typography, #009993)}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 60px;width:max-content;margin:5px;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}';const ca=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),ua=class{constructor(o){t(this,o),this.cancel=e(this,"modalCloseEvent",7),this.userAgent=window.navigator.userAgent,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.titleModal=void 0,this.visible=!0,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.visible&&o("div",{key:"ba2aed789565b37bfdbb34bdf3ccace827231653",class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:t=>this.stylingContainer=t},o("div",{key:"151ca4cd80d259ac955b92b10bf6f0df2698a937",class:"HelperModalWrapper HelperModalVisible"},o("div",{key:"804cb1dea73321c4935e4a8ddb1136e98e89a070",class:"HelperModalContent"+(ca(this.userAgent)?" HelperModalMobileContent":"")},o("span",{key:"30cf7928c1e4baa53f3514fc1930823db76c874c",class:"HelperModalClose"+(ca(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),o("slot",{key:"5c1323a98cdcd09669020a00affe5673856e807e"}))))}};ua.style=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px var(--emw--color-gray-transparency-40, #848e97);box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--button-text-color, #000)}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--button-text-color, #000)}";export{ha as helper_filters,ua as helper_modal}
|