@fluid-topics/ft-search-bar 0.1.17 → 0.2.1
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/build/ft-search-bar.d.ts +2 -2
- package/build/ft-search-bar.inline-styles.js +2459 -0
- package/build/ft-search-bar.js +12 -20
- package/build/ft-search-bar.light.js +1207 -1299
- package/build/ft-search-bar.min.js +1242 -1335
- package/build/index.d.ts +2 -0
- package/build/index.js +5 -0
- package/build/inline-styles.d.ts +2 -0
- package/build/inline-styles.js +4 -0
- package/package.json +15 -16
|
@@ -1,190 +1,197 @@
|
|
|
1
1
|
!function(t){
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
|
-
* Copyright
|
|
5
|
-
*
|
|
4
|
+
* Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
5
|
+
* This code may only be used under the BSD style license found at
|
|
6
|
+
* http://polymer.github.io/LICENSE.txt
|
|
7
|
+
* The complete set of authors may be found at
|
|
8
|
+
* http://polymer.github.io/AUTHORS.txt
|
|
9
|
+
* The complete set of contributors may be found at
|
|
10
|
+
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
11
|
+
* Code distributed by Google as part of the polymer project is also
|
|
12
|
+
* subject to an additional IP rights grant found at
|
|
13
|
+
* http://polymer.github.io/PATENTS.txt
|
|
14
|
+
*
|
|
15
|
+
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
6
16
|
*/
|
|
7
|
-
const
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const c={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(s,c);let h=i.call(o,t);h||(h=p(t),e.call(o,t,h)),this===window.customElements&&(r.set(s,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)n.delete(t),u(t,c,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):n.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,s),i.call(this,n,t,s)}else o.call(this,n,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=b.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(ai){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
8
18
|
/**
|
|
9
19
|
* @license
|
|
10
20
|
* Copyright 2017 Google LLC
|
|
11
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
|
|
22
|
+
*/const i=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function o(t){return(e,o)=>void 0!==o?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,o):i(t,e)
|
|
13
23
|
/**
|
|
14
24
|
* @license
|
|
15
25
|
* Copyright 2017 Google LLC
|
|
16
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/
|
|
18
|
-
var v;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==p||p({ReactiveElement:b}),(null!==(l=globalThis.reactiveElementVersions)&&void 0!==l?l:globalThis.reactiveElementVersions=[]).push("1.2.2");const g=globalThis.trustedTypes,x=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,y=`lit$${(Math.random()+"").slice(9)}$`,k="?"+y,w=`<${k}>`,$=document,_=(t="")=>$.createComment(t),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,z=t=>{var e;return O(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,E=/-->/g,R=/>/g,B=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,F=/'/g,T=/"/g,N=/^(?:script|style|textarea|title)$/i,A=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),j=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),L=new WeakMap,D=$.createTreeWalker($,129,null,!1),I=(t,e)=>{const i=t.length-1,r=[];let o,n=2===e?"<svg>":"",a=C;for(let e=0;e<i;e++){const i=t[e];let c,s,l=-1,d=0;for(;d<i.length&&(a.lastIndex=d,s=a.exec(i),null!==s);)d=a.lastIndex,a===C?"!--"===s[1]?a=E:void 0!==s[1]?a=R:void 0!==s[2]?(N.test(s[2])&&(o=RegExp("</"+s[2],"g")),a=B):void 0!==s[3]&&(a=B):a===B?">"===s[0]?(a=null!=o?o:C,l=-1):void 0===s[1]?l=-2:(l=a.lastIndex-s[2].length,c=s[1],a=void 0===s[3]?B:'"'===s[3]?T:F):a===T||a===F?a=B:a===E||a===R?a=C:(a=B,o=void 0);const h=a===B&&t[e+1].startsWith("/>")?" ":"";n+=a===C?i+w:l>=0?(r.push(c),i.slice(0,l)+"$lit$"+i.slice(l)+y+h):i+y+(-2===l?(r.push(void 0),e):h)}const c=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==x?x.createHTML(c):c,r]};class U{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,n=0;const a=t.length-1,c=this.parts,[s,l]=I(t,e);if(this.el=U.createElement(s,i),D.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=D.nextNode())&&c.length<a;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(y)){const i=l[n++];if(t.push(e),void 0!==i){const t=r.getAttribute(i.toLowerCase()+"$lit$").split(y),e=/([.?@])?(.*)/.exec(i);c.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?W:"?"===e[1]?q:"@"===e[1]?G:Z})}else c.push({type:6,index:o})}for(const e of t)r.removeAttribute(e)}if(N.test(r.tagName)){const t=r.textContent.split(y),e=t.length-1;if(e>0){r.textContent=g?g.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],_()),D.nextNode(),c.push({type:2,index:++o});r.append(t[e],_())}}}else if(8===r.nodeType)if(r.data===k)c.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(y,t+1));)c.push({type:7,index:o}),t+=y.length-1}o++}}static createElement(t,e){const i=$.createElement("template");return i.innerHTML=t,i}}function P(t,e,i=t,r){var o,n,a,c;if(e===j)return e;let s=void 0!==r?null===(o=i._$Cl)||void 0===o?void 0:o[r]:i._$Cu;const l=S(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==l&&(null===(n=null==s?void 0:s._$AO)||void 0===n||n.call(s,!1),void 0===l?s=void 0:(s=new l(t),s._$AT(t,i,r)),void 0!==r?(null!==(a=(c=i)._$Cl)&&void 0!==a?a:c._$Cl=[])[r]=s:i._$Cu=s),void 0!==s&&(e=P(t,s._$AS(t,e.values),s,r)),e}class H{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:r}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:$).importNode(i,!0);D.currentNode=o;let n=D.nextNode(),a=0,c=0,s=r[0];for(;void 0!==s;){if(a===s.index){let e;2===s.type?e=new V(n,n.nextSibling,this,t):1===s.type?e=new s.ctor(n,s.name,s.strings,this,t):6===s.type&&(e=new X(n,this,t)),this.v.push(e),s=r[++c]}a!==(null==s?void 0:s.index)&&(n=D.nextNode(),a++)}return o}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class V{constructor(t,e,i,r){var o;this.type=2,this._$AH=M,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cg=null===(o=null==r?void 0:r.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=P(this,t,e),S(t)?t===M||null==t||""===t?(this._$AH!==M&&this._$AR(),this._$AH=M):t!==this._$AH&&t!==j&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):z(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==M&&S(this._$AH)?this._$AA.nextSibling.data=t:this.S($.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:r}=t,o="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=U.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new H(o,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=L.get(t.strings);return void 0===e&&L.set(t.strings,e=new U(t)),e}A(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new V(this.M(_()),this.M(_()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.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._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Z{constructor(t,e,i,r,o){this.type=1,this._$AH=M,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=M}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const o=this.strings;let n=!1;if(void 0===o)t=P(this,t,e,0),n=!S(t)||t!==this._$AH&&t!==j,n&&(this._$AH=t);else{const r=t;let a,c;for(t=o[0],a=0;a<o.length-1;a++)c=P(this,r[i+a],e,a),c===j&&(c=this._$AH[a]),n||(n=!S(c)||c!==this._$AH[a]),c===M?t=M:t!==M&&(t+=(null!=c?c:"")+o[a+1]),this._$AH[a]=c}n&&!r&&this.k(t)}k(t){t===M?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class W extends Z{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===M?void 0:t}}const K=g?g.emptyScript:"";class q extends Z{constructor(){super(...arguments),this.type=4}k(t){t&&t!==M?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}class G extends Z{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=P(this,t,e,0))&&void 0!==i?i:M)===j)return;const r=this._$AH,o=t===M&&r!==M||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==M&&(r===M||o);o&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class X{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}}const J={P:"$lit$",V:y,L:k,I:1,N:I,R:H,D:z,j:P,H:V,O:Z,F:q,B:G,W,Z:X},Y=window.litHtmlPolyfillSupport;
|
|
27
|
+
*/}function s(t){return o({...t,state:!0})}
|
|
19
28
|
/**
|
|
20
29
|
* @license
|
|
21
30
|
* Copyright 2017 Google LLC
|
|
22
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/
|
|
24
|
-
var Q,tt;null==Y||Y(U,V),(null!==(v=globalThis.litHtmlVersions)&&void 0!==v?v:globalThis.litHtmlVersions=[]).push("2.1.3");class et extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var r,o;const n=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:e;let a=n._$litPart$;if(void 0===a){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;n._$litPart$=a=new V(e.insertBefore(_(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return j}}et.finalized=!0,et._$litElement$=!0,null===(Q=globalThis.litElementHydrateSupport)||void 0===Q||Q.call(globalThis,{LitElement:et});const it=globalThis.litElementPolyfillSupport;null==it||it({LitElement:et}),(null!==(tt=globalThis.litElementVersions)&&void 0!==tt?tt:globalThis.litElementVersions=[]).push("3.1.2");
|
|
32
|
+
*/const n=({finisher:t,descriptor:e})=>(i,o)=>{var s;if(void 0===o){const o=null!==(s=i.originalKey)&&void 0!==s?s:i.key,n=null!=e?{kind:"method",placement:"prototype",key:o,descriptor:e(i.key)}:{...i,key:o};return null!=t&&(n.finisher=function(e){t(e,o)}),n}{const s=i.constructor;void 0!==e&&Object.defineProperty(i,o,e(o)),null==t||t(s,o)}}
|
|
25
33
|
/**
|
|
26
34
|
* @license
|
|
27
35
|
* Copyright 2017 Google LLC
|
|
28
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
|
|
30
|
-
const rt=t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:r}=e;return{kind:i,elements:r,finisher(e){window.customElements.define(t,e)}}})(t,e)
|
|
37
|
+
*/;function r(t,e){return n({descriptor:i=>{const o={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;o.get=function(){var i,o;return void 0===this[e]&&(this[e]=null!==(o=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==o?o:null),this[e]}}return o}})}
|
|
31
38
|
/**
|
|
32
39
|
* @license
|
|
33
40
|
* Copyright 2017 Google LLC
|
|
34
41
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
|
|
42
|
+
*/
|
|
36
43
|
/**
|
|
37
44
|
* @license
|
|
38
|
-
* Copyright
|
|
45
|
+
* Copyright 2021 Google LLC
|
|
39
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
|
-
*/
|
|
47
|
+
*/
|
|
48
|
+
var l;const a=null!=(null===(l=window.HTMLSlotElement)||void 0===l?void 0:l.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function c(t){const{slot:e,selector:i}=null!=t?t:{};return n({descriptor:o=>({get(){var o;const s="slot"+(e?`[name=${e}]`:":not([name])"),n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(s),r=null!=n?a(n,t):[];return i?r.filter((t=>t.matches(i))):r},enumerable:!0,configurable:!0})})}
|
|
41
49
|
/**
|
|
42
50
|
* @license
|
|
43
51
|
* Copyright 2017 Google LLC
|
|
44
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/const
|
|
53
|
+
*/const h=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function p(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}
|
|
46
54
|
/**
|
|
47
55
|
* @license
|
|
48
|
-
* Copyright
|
|
56
|
+
* Copyright 2019 Google LLC
|
|
49
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
50
|
-
|
|
58
|
+
*/const d=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,f=Symbol(),u=new Map;class b{constructor(t,e){if(this._$cssResult$=!0,e!==f)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=u.get(this.cssText);return d&&void 0===t&&(u.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const v=t=>new b("string"==typeof t?t:t+"",f),g=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new b(i,f)},x=(t,e)=>{d?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=window.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},y=d?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return v(e)})(t):t
|
|
51
59
|
/**
|
|
52
60
|
* @license
|
|
53
61
|
* Copyright 2017 Google LLC
|
|
54
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
-
|
|
63
|
+
*/;var m;const $=window.trustedTypes,w=$?$.emptyScript:"",k=window.reactiveElementPolyfillSupport,S={toAttribute(t,e){switch(e){case Boolean:t=t?w:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},O=(t,e)=>e!==t&&(e==e||t==t),C={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:O};class z extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Eh(i,e);void 0!==o&&(this._$Eu.set(o,i),t.push(o))})),t}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const s=this[t];this[e]=o,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||C}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(y(t))}else void 0!==t&&e.push(y(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return x(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=C){var o,s;const n=this.constructor._$Eh(t,i);if(void 0!==n&&!0===i.reflect){const r=(null!==(s=null===(o=i.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==s?s:S.toAttribute)(e,i.type);this._$Ei=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Ei=null}}_$AK(t,e){var i,o,s;const n=this.constructor,r=n._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=n.getPropertyOptions(r),l=t.converter,a=null!==(s=null!==(o=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==o?o:"function"==typeof l?l:null)&&void 0!==s?s:S.fromAttribute;this._$Ei=r,this[r]=a(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||O)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
|
|
56
64
|
/**
|
|
57
65
|
* @license
|
|
58
66
|
* Copyright 2017 Google LLC
|
|
59
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
60
68
|
*/
|
|
69
|
+
var E;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:z}),(null!==(m=globalThis.reactiveElementVersions)&&void 0!==m?m:globalThis.reactiveElementVersions=[]).push("1.2.2");const B=globalThis.trustedTypes,N=B?B.createPolicy("lit-html",{createHTML:t=>t}):void 0,F=`lit$${(Math.random()+"").slice(9)}$`,R="?"+F,M=`<${R}>`,L=document,D=(t="")=>L.createComment(t),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,U=t=>{var e;return I(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,P=/>/g,_=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,H=/'/g,Z=/"/g,K=/^(?:script|style|textarea|title)$/i,W=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),V=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),J=new WeakMap,X=L.createTreeWalker(L,129,null,!1),Y=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=T;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(r.lastIndex=h,a=r.exec(i),null!==a);)h=r.lastIndex,r===T?"!--"===a[1]?r=A:void 0!==a[1]?r=P:void 0!==a[2]?(K.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=_):void 0!==a[3]&&(r=_):r===_?">"===a[0]?(r=null!=s?s:T,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?_:'"'===a[3]?Z:H):r===Z||r===H?r=_:r===A||r===P?r=T:(r=_,s=void 0);const p=r===_&&t[e+1].startsWith("/>")?" ":"";n+=r===T?i+M:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+F+p):i+F+(-2===c?(o.push(void 0),e):p)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==N?N.createHTML(l):l,o]};class Q{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,c]=Y(t,e);if(this.el=Q.createElement(a,i),X.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=X.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(F)){const i=c[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(F),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?ot:"?"===e[1]?nt:"@"===e[1]?rt:it})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(K.test(o.tagName)){const t=o.textContent.split(F),e=t.length-1;if(e>0){o.textContent=B?B.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],D()),X.nextNode(),l.push({type:2,index:++s});o.append(t[e],D())}}}else if(8===o.nodeType)if(o.data===R)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(F,t+1));)l.push({type:7,index:s}),t+=F.length-1}s++}}static createElement(t,e){const i=L.createElement("template");return i.innerHTML=t,i}}function G(t,e,i=t,o){var s,n,r,l;if(e===V)return e;let a=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const c=j(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=G(t,a._$AS(t,e.values),a,o)),e}class tt{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:L).importNode(i,!0);X.currentNode=s;let n=X.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new et(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new lt(n,this,t)),this.v.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=X.nextNode(),r++)}return s}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class et{constructor(t,e,i,o){var s;this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=null===(s=null==o?void 0:o.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._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=G(this,t,e),j(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==V&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):U(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==q&&j(this._$AH)?this._$AA.nextSibling.data=t:this.S(L.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Q.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new tt(s,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=J.get(t.strings);return void 0===e&&J.set(t.strings,e=new Q(t)),e}A(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new et(this.M(D()),this.M(D()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.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._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class it{constructor(t,e,i,o,s){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=G(this,t,e,0),n=!j(t)||t!==this._$AH&&t!==V,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=G(this,o[i+r],e,r),l===V&&(l=this._$AH[r]),n||(n=!j(l)||l!==this._$AH[r]),l===q?t=q:t!==q&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.k(t)}k(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ot extends it{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===q?void 0:t}}const st=B?B.emptyScript:"";class nt extends it{constructor(){super(...arguments),this.type=4}k(t){t&&t!==q?this.element.setAttribute(this.name,st):this.element.removeAttribute(this.name)}}class rt extends it{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=G(this,t,e,0))&&void 0!==i?i:q)===V)return;const o=this._$AH,s=t===q&&o!==q||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==q&&(o===q||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class lt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const at={P:"$lit$",V:F,L:R,I:1,N:Y,R:tt,D:U,j:G,H:et,O:it,F:nt,B:rt,W:ot,Z:lt},ct=window.litHtmlPolyfillSupport;
|
|
61
70
|
/**
|
|
62
71
|
* @license
|
|
63
72
|
* Copyright 2017 Google LLC
|
|
64
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
74
|
*/
|
|
66
|
-
|
|
75
|
+
var ht,pt;null==ct||ct(Q,et),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?E:globalThis.litHtmlVersions=[]).push("2.1.3");class dt extends z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var o,s;const n=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let r=n._$litPart$;if(void 0===r){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;n._$litPart$=r=new et(e.insertBefore(D(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return V}}dt.finalized=!0,dt._$litElement$=!0,null===(ht=globalThis.litElementHydrateSupport)||void 0===ht||ht.call(globalThis,{LitElement:dt});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:dt}),(null!==(pt=globalThis.litElementVersions)&&void 0!==pt?pt:globalThis.litElementVersions=[]).push("3.1.2");class ut{constructor(t,e,i,o,s){this.name=t,this.category=e,this.fallbackVariable=i,this.defaultValue=o,this.context=s,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,e,i){return new ut(t,e,void 0,i)}static extend(t,e,i){return new ut(t,e.category,e,i)}static external(t,e){return new ut(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return g`var(${v(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):v(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,e;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(e=this.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}function bt(t,e){return v(`${t.name}: ${e}`)}const vt={colorPrimary:ut.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:ut.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:ut.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:ut.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:ut.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:ut.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:ut.create("--ft-color-error","COLOR","#B00020"),colorOutline:ut.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:ut.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:ut.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:ut.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:ut.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:ut.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:ut.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:ut.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:ut.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:ut.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:ut.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:ut.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:ut.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:ut.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:ut.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:ut.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:ut.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:ut.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:ut.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:ut.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:ut.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:ut.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:ut.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:ut.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:ut.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:ut.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:ut.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:ut.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:ut.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:ut.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:ut.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:ut.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:ut.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:ut.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:ut.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:ut.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:ut.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:ut.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:ut.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:ut.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:ut.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:ut.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:ut.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:ut.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:ut.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:ut.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:ut.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:ut.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:ut.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:ut.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:ut.create("--ft-border-radius-XL","SIZE","16px"),titleFont:ut.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:ut.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:ut.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:ut.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
67
76
|
/**
|
|
68
77
|
* @license
|
|
69
78
|
* Copyright 2021 Google LLC
|
|
70
79
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
*/class gt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const s=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return x(s,this.constructor.elementStyles),s}}}(dt)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),W`
|
|
81
|
+
${t.map((t=>W`
|
|
82
|
+
<style>${t}</style>
|
|
83
|
+
`))}
|
|
84
|
+
${this.getTemplate()}
|
|
85
|
+
`}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const xt=g`
|
|
86
|
+
.ft-no-text-select {
|
|
87
|
+
-webkit-touch-callout: none;
|
|
88
|
+
-webkit-user-select: none;
|
|
89
|
+
-khtml-user-select: none;
|
|
90
|
+
-moz-user-select: none;
|
|
91
|
+
-ms-user-select: none;
|
|
92
|
+
user-select: none;
|
|
93
|
+
}
|
|
94
|
+
`;class yt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;let s=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>s=s.replace(new RegExp(`\\{${e}\\}`,"g"),t))),s}}var mt,$t,wt;const kt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(wt=null===($t=null===(mt=window.safari)||void 0===mt?void 0:mt.pushNotification)||void 0===$t?void 0:$t.toString())&&void 0!==wt?wt:""),St=1,Ot=2,Ct=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
78
95
|
/**
|
|
79
96
|
* @license
|
|
80
97
|
* Copyright 2017 Google LLC
|
|
81
98
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
82
|
-
*/
|
|
99
|
+
*/class zt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
83
100
|
/**
|
|
84
101
|
* @license
|
|
85
102
|
* Copyright 2020 Google LLC
|
|
86
103
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
87
|
-
*/const{H:
|
|
104
|
+
*/const{H:Et}=at,Bt=()=>document.createComment(""),Nt=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Bt(),n),o=s.insertBefore(Bt(),n);i=new Et(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},Ft=(t,e,i=t)=>(t._$AI(e,i),t),Rt={},Mt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},Lt=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Dt=Ct(class extends zt{constructor(t){if(super(t),t.type!==Ot)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],n=[];let r=0;for(const e of t)s[r]=o?o(e,r):r,n[r]=i(e,r),r++;return{values:n,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const n=(t=>t._$AH)(t),{values:r,keys:l}=this.dt(e,i,o);if(!Array.isArray(n))return this.at=l,r;const a=null!==(s=this.at)&&void 0!==s?s:this.at=[],c=[];let h,p,d=0,f=n.length-1,u=0,b=r.length-1;for(;d<=f&&u<=b;)if(null===n[d])d++;else if(null===n[f])f--;else if(a[d]===l[u])c[u]=Ft(n[d],r[u]),d++,u++;else if(a[f]===l[b])c[b]=Ft(n[f],r[b]),f--,b--;else if(a[d]===l[b])c[b]=Ft(n[d],r[b]),Nt(t,c[b+1],n[d]),d++,b--;else if(a[f]===l[u])c[u]=Ft(n[f],r[u]),Nt(t,n[d],n[f]),f--,u++;else if(void 0===h&&(h=Lt(l,u,b),p=Lt(a,d,f)),h.has(a[d]))if(h.has(a[f])){const e=p.get(l[u]),i=void 0!==e?n[e]:null;if(null===i){const e=Nt(t,n[d]);Ft(e,r[u]),c[u]=e}else c[u]=Ft(i,r[u]),Nt(t,n[d],i),n[e]=null;u++}else Mt(n[f]),f--;else Mt(n[d]),d++;for(;u<=b;){const e=Nt(t,c[b+1]);Ft(e,r[u]),c[u++]=e}for(;d<=f;){const t=n[d++];null!==t&&Mt(t)}return this.at=l,((t,e=Rt)=>{t._$AH=e})(t,c),V}}),jt=Ct(class extends zt{constructor(t){var e;if(super(t),t.type!==St||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.et)||void 0===i?void 0:i.has(t))&&this.st.add(t);return this.render(e)}const s=t.element.classList;this.st.forEach((t=>{t in e||(s.remove(t),this.st.delete(t))}));for(const t in e){const i=!!e[t];i===this.st.has(t)||(null===(o=this.et)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.st.add(t)):(s.remove(t),this.st.delete(t)))}return V}});
|
|
88
105
|
/**
|
|
89
106
|
* @license
|
|
90
107
|
* Copyright 2017 Google LLC
|
|
91
108
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
92
|
-
*/(function(){function t(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}function e(e){var i="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return i?i.call(e):{next:t(e)}}function i(t){if(!(t instanceof Array)){t=e(t);for(var i,r=[];!(i=t.next()).done;)r.push(i.value);t=r}return t}var r="function"==typeof Object.create?Object.create:function(t){function e(){}return e.prototype=t,new e};var o,n=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var e=0;e<t.length;++e){var i=t[e];if(i&&i.Math==Math)return i}throw Error("Cannot find global object")}(this),a=function(){if("undefined"!=typeof Reflect&&Reflect.construct){if(function(){function t(){}return Reflect.construct(t,[],(function(){})),new t instanceof t}())return Reflect.construct;var t=Reflect.construct;return function(e,i,r){return e=t(e,i),r&&Reflect.setPrototypeOf(e,r.prototype),e}}return function(t,e,i){return void 0===i&&(i=t),i=r(i.prototype||Object.prototype),Function.prototype.apply.call(t,i,e)||i}}();if("function"==typeof Object.setPrototypeOf)o=Object.setPrototypeOf;else{var c;t:{var s={};try{s.__proto__={a:!0},c=s.a;break t}catch(t){}c=!1}o=c?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var l=o;if(!ShadowRoot.prototype.createElement){var d,h=window.HTMLElement,p=window.customElements.define,f=window.customElements.get,u=window.customElements,m=new WeakMap,b=new WeakMap,v=new WeakMap,g=new WeakMap;window.CustomElementRegistry=function(){this.l=new Map,this.o=new Map,this.i=new Map,this.h=new Map},window.CustomElementRegistry.prototype.define=function(t,i){if(t=t.toLowerCase(),void 0!==this.j(t))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': the name \""+t+'" has already been used with this registry');if(void 0!==this.o.get(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");var r=i.prototype.attributeChangedCallback,o=new Set(i.observedAttributes||[]);if(y(i,o,r),r={g:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:r,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:o},this.l.set(t,r),this.o.set(i,r),(o=f.call(u,t))||(o=x(t),p.call(u,t,o)),this===window.customElements&&(v.set(i,r),r.s=o),o=this.h.get(t)){this.h.delete(t);for(var n=(o=e(o)).next();!n.done;n=o.next())n=n.value,b.delete(n),w(n,r,!0)}return void 0!==(r=this.i.get(t))&&(r.resolve(i),this.i.delete(t)),i},window.CustomElementRegistry.prototype.upgrade=function(){_.push(this),u.upgrade.apply(u,arguments),_.pop()},window.CustomElementRegistry.prototype.get=function(t){var e;return null==(e=this.l.get(t))?void 0:e.g},window.CustomElementRegistry.prototype.j=function(t){return this.l.get(t)},window.CustomElementRegistry.prototype.whenDefined=function(t){var e=this.j(t);if(void 0!==e)return Promise.resolve(e.g);var i=this.i.get(t);return void 0===i&&((i={}).promise=new Promise((function(t){return i.resolve=t})),this.i.set(t,i)),i.promise},window.CustomElementRegistry.prototype.m=function(t,e,i){var r=this.h.get(e);r||this.h.set(e,r=new Set),i?r.add(t):r.delete(t)},window.HTMLElement=function(){var t=d;if(t)return d=void 0,t;var e=v.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return t=Reflect.construct(h,[],e.s),Object.setPrototypeOf(t,this.constructor.prototype),m.set(t,e),t},window.HTMLElement.prototype=h.prototype;var x=function(t){function e(){var e=Reflect.construct(h,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);t:{var i=e.getRootNode();if(!(i===document||i instanceof ShadowRoot)){if((i=_[_.length-1])instanceof CustomElementRegistry){var r=i;break t}(i=i.getRootNode())===document||i instanceof ShadowRoot||(i=(null==(r=g.get(i))?void 0:r.getRootNode())||document)}r=i.customElements}return(i=(r=r||window.customElements).j(t))?w(e,i):b.set(e,r),e}return n.Object.defineProperty(e,"formAssociated",{configurable:!0,enumerable:!0,get:function(){return!0}}),e.prototype.connectedCallback=function(){var e=m.get(this);e?e.connectedCallback&&e.connectedCallback.apply(this,arguments):b.get(this).m(this,t,!0)},e.prototype.disconnectedCallback=function(){var e=m.get(this);e?e.disconnectedCallback&&e.disconnectedCallback.apply(this,arguments):b.get(this).m(this,t,!1)},e.prototype.adoptedCallback=function(){var t,e;null==(t=m.get(this))||null==(e=t.adoptedCallback)||e.apply(this,arguments)},e.prototype.formAssociatedCallback=function(){var t,e=m.get(this);e&&e.formAssociated&&(null==e||null==(t=e.formAssociatedCallback)||t.apply(this,arguments))},e.prototype.formDisabledCallback=function(){var t,e=m.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formDisabledCallback)||t.apply(this,arguments))},e.prototype.formResetCallback=function(){var t,e=m.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formResetCallback)||t.apply(this,arguments))},e.prototype.formStateRestoreCallback=function(){var t,e=m.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formStateRestoreCallback)||t.apply(this,arguments))},e},y=function(t,e,i){if(0!==e.size&&void 0!==i){var r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,o){if(t=t.toLowerCase(),e.has(t)){var n=this.getAttribute(t);r.call(this,t,o),i.call(this,t,n,o)}else r.call(this,t,o)});var o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){if(t=t.toLowerCase(),e.has(t)){var r=this.getAttribute(t);o.call(this,t),i.call(this,t,r,null)}else o.call(this,t)})}},k=function(t){var e=Object.getPrototypeOf(t);if(e!==window.HTMLElement)return e===h?Object.setPrototypeOf(t,window.HTMLElement):k(e)},w=function(t,e,i){i=void 0!==i&&i,Object.setPrototypeOf(t,e.g.prototype),m.set(t,e),d=t;try{new e.g}catch(t){k(e.g),new e.g}e.observedAttributes.forEach((function(i){t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},$=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){var e=$.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};var _=[document],S=function(t,e,i){var r=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){_.push(this);var t=r.apply(i||this,arguments);return void 0!==t&&g.set(t,this),_.pop(),t}};S(ShadowRoot,"createElement",document),S(ShadowRoot,"importNode",document),S(Element,"insertAdjacentHTML");var O=function(t){var e=Object.getOwnPropertyDescriptor(t.prototype,"innerHTML");Object.defineProperty(t.prototype,"innerHTML",Object.assign({},e,{set:function(t){_.push(this),e.set.call(this,t),_.pop()}}))};if(O(Element),O(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var z=new WeakMap,C=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(t){for(var e=[],r=0;r<arguments.length;++r)e[r]=arguments[r];return e=C.call.apply(C,[this].concat(i(e))),z.set(e,this),e},["setFormValue","setValidity","checkValidity","reportValidity"].forEach((function(t){var e=window.ElementInternals.prototype,r=e[t];e[t]=function(t){for(var e=[],o=0;o<arguments.length;++o)e[o]=arguments[o];if(o=z.get(this),!0!==m.get(o).formAssociated)throw new DOMException("Failed to execute "+r+" on 'ElementInternals': The target element is not a form-associated custom element.");null==r||r.call.apply(r,[this].concat(i(e)))}}));var E=function(t){var e=a(Array,[].concat(i(t)),this.constructor);return e.h=t,e},R=E,B=Array;if(R.prototype=r(B.prototype),R.prototype.constructor=R,l)l(R,B);else for(var F in B)if("prototype"!=F)if(Object.defineProperties){var T=Object.getOwnPropertyDescriptor(B,F);T&&Object.defineProperty(R,F,T)}else R[F]=B[F];R.u=B.prototype,n.Object.defineProperty(E.prototype,"value",{configurable:!0,enumerable:!0,get:function(){var t;return(null==(t=this.h.find((function(t){return!0===t.checked})))?void 0:t.value)||""}});var N=function(t){var e=this,i=new Map;t.forEach((function(t,r){var o=t.getAttribute("name"),n=i.get(o)||[];e[+r]=t,n.push(t),i.set(o,n)})),this.length=t.length,i.forEach((function(t,i){t&&(e[i]=1===t.length?t[0]:new E(t))}))};N.prototype.namedItem=function(t){return this[t]};var A=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){for(var t=A.get.call(this,[]),i=[],r=(t=e(t)).next();!r.done;r=t.next()){r=r.value;var o=m.get(r);o&&!0!==o.formAssociated||i.push(r)}return new N(i)}})}}}).call("object"==typeof globalThis?globalThis:window);try{window.customElements.define("custom-element",null)}catch(Nr){const t=window.customElements.define;window.customElements.define=(e,i,r)=>{try{t.bind(window.customElements)(e,i,r)}catch(t){console.warn(e,i,r,t)}}}class zt{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}const Ct=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Et(t,e){const i=()=>JSON.parse(JSON.stringify(t));return nt({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}class Rt{constructor(t,e,i,r,o){this.name=t,this.category=e,this.fallbackVariable=i,this.defaultValue=r,this.context=o,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,e,i){return new Rt(t,e,void 0,i)}static extend(t,e,i){return new Rt(t,e.category,e,i)}static external(t,e){return new Rt(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return a`var(${n(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):n(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,e;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(e=this.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}function Bt(t,e){return n(`${t.name}: ${e}`)}const Ft={colorPrimary:Rt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:Rt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:Rt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:Rt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:Rt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:Rt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:Rt.create("--ft-color-error","COLOR","#B00020"),colorOutline:Rt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:Rt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:Rt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:Rt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:Rt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:Rt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:Rt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:Rt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:Rt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:Rt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:Rt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:Rt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:Rt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:Rt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:Rt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:Rt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:Rt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:Rt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:Rt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:Rt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:Rt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:Rt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:Rt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:Rt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:Rt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:Rt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:Rt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:Rt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:Rt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:Rt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:Rt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:Rt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:Rt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:Rt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:Rt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:Rt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:Rt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:Rt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:Rt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:Rt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:Rt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:Rt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:Rt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:Rt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:Rt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:Rt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:Rt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:Rt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:Rt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:Rt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:Rt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:Rt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:Rt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:Rt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:Rt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
93
|
-
/**
|
|
94
|
-
* @license
|
|
95
|
-
* Copyright 2021 Google LLC
|
|
96
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
97
|
-
*/class Tt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:r}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const o=this.renderOptions.creationScope=this.attachShadow({...r,customElements:t.registry});return c(o,this.constructor.elementStyles),o}}}(et)){constructor(){super(),this.constructorName=this.constructor.name,this.proto=this.constructor.prototype}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),A`
|
|
98
|
-
${t.map((t=>A`
|
|
99
|
-
<style>${t}</style>
|
|
100
|
-
`))}
|
|
101
|
-
${this.getTemplate()}
|
|
102
|
-
`}adoptedCallback(){Object.getPrototypeOf(this)!==this.constructorName&&Object.setPrototypeOf(this,this.proto)}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const Nt=a`
|
|
103
|
-
.ft-no-text-select {
|
|
104
|
-
-webkit-touch-callout: none;
|
|
105
|
-
-webkit-user-select: none;
|
|
106
|
-
-khtml-user-select: none;
|
|
107
|
-
-moz-user-select: none;
|
|
108
|
-
-ms-user-select: none;
|
|
109
|
-
user-select: none;
|
|
110
|
-
}
|
|
111
|
-
`;class At{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,r;let o=null!==(r=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>o=o.replace(new RegExp(`\\{${e}\\}`,"g"),t))),o}}var jt,Mt,Lt;const Dt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Lt=null===(Mt=null===(jt=window.safari)||void 0===jt?void 0:jt.pushNotification)||void 0===Mt?void 0:Mt.toString())&&void 0!==Lt?Lt:"");var It,Ut=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(It||(It={}));class Pt extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}let Ht=class extends Tt{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=It.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new zt}getStyles(){return a`
|
|
112
|
-
.ft-size-watcher--pixel {
|
|
113
|
-
width: 0;
|
|
114
|
-
height: 0;
|
|
115
|
-
overflow: hidden;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
119
|
-
width: 100%;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.ft-size-watcher--watcher {
|
|
123
|
-
height: 1px;
|
|
124
|
-
width: 100vw;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
128
|
-
width: 100%;
|
|
129
|
-
}
|
|
130
|
-
`}getTemplate(){return A`
|
|
109
|
+
*/var It,Ut=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(It||(It={}));class Tt extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class At extends gt{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=It.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e}render(){return W`
|
|
131
110
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
132
111
|
<div class="ft-size-watcher--watcher"></div>
|
|
133
112
|
</div>
|
|
134
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=It.S:this.size<976?this.category=It.M:this.size<1024?this.category=It.L:this.size<1440?this.category=It.XL:this.category=It.XXL,this.dispatchEvent(new
|
|
113
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=It.S:this.size<976?this.category=It.M:this.size<1024?this.category=It.L:this.size<1440?this.category=It.XL:this.category=It.XXL,this.dispatchEvent(new Tt(this.size,this.category)))}),this.debounceTimeout)}}At.elementDefinitions={},At.styles=g`
|
|
114
|
+
.ft-size-watcher--pixel {
|
|
115
|
+
width: 0;
|
|
116
|
+
height: 0;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
121
|
+
width: 100%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.ft-size-watcher--watcher {
|
|
125
|
+
height: 1px;
|
|
126
|
+
width: 100vw;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
130
|
+
width: 100%;
|
|
131
|
+
}
|
|
132
|
+
`,Ut([o({type:Number})],At.prototype,"debounceTimeout",void 0),Ut([o({type:Boolean})],At.prototype,"local",void 0),Ut([o({type:Number,reflect:!0})],At.prototype,"size",void 0),Ut([o({type:String,reflect:!0})],At.prototype,"category",void 0),Ut([r(".ft-size-watcher--watcher")],At.prototype,"watcher",void 0),h("ft-size-watcher")(At);
|
|
135
133
|
/**
|
|
136
134
|
* @license
|
|
137
135
|
* Copyright 2020 Google LLC
|
|
138
136
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
139
137
|
*/
|
|
140
|
-
const
|
|
138
|
+
const Pt=t=>({_$litStatic$:t}),_t=new Map,Ht=(t=>(e,...i)=>{var o;const s=i.length;let n,r;const l=[],a=[];let c,h=0,p=!1;for(;h<s;){for(c=e[h];h<s&&void 0!==(r=i[h],n=null===(o=r)||void 0===o?void 0:o._$litStatic$);)c+=n+e[++h],p=!0;a.push(r),l.push(c),h++}if(h===s&&l.push(e[s]),p){const t=l.join("$$lit$$");void 0===(e=_t.get(t))&&(l.raw=l,_t.set(t,e=l)),i=a}return t(e,...i)})(W);var Zt,Kt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Zt||(Zt={}));const Wt=ut.extend("--ft-typography-font-family",vt.titleFont),Vt=ut.extend("--ft-typography-font-family",vt.contentFont),qt={fontFamily:Vt,fontSize:ut.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ut.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ut.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ut.create("--ft-typography-line-height","SIZE","24px"),textTransform:ut.create("--ft-typography-text-transform","UNKNOWN","inherit")},Jt=ut.extend("--ft-typography-title-font-family",Wt),Xt=ut.extend("--ft-typography-title-font-size",qt.fontSize,"20px"),Yt=ut.extend("--ft-typography-title-font-weight",qt.fontWeight,"normal"),Qt=ut.extend("--ft-typography-title-letter-spacing",qt.letterSpacing,"0.15px"),Gt=ut.extend("--ft-typography-title-line-height",qt.lineHeight,"24px"),te=ut.extend("--ft-typography-title-text-transform",qt.textTransform,"inherit"),ee=ut.extend("--ft-typography-title-dense-font-family",Wt),ie=ut.extend("--ft-typography-title-dense-font-size",qt.fontSize,"14px"),oe=ut.extend("--ft-typography-title-dense-font-weight",qt.fontWeight,"normal"),se=ut.extend("--ft-typography-title-dense-letter-spacing",qt.letterSpacing,"0.105px"),ne=ut.extend("--ft-typography-title-dense-line-height",qt.lineHeight,"24px"),re=ut.extend("--ft-typography-title-dense-text-transform",qt.textTransform,"inherit"),le=ut.extend("--ft-typography-subtitle1-font-family",Vt),ae=ut.extend("--ft-typography-subtitle1-font-size",qt.fontSize,"16px"),ce=ut.extend("--ft-typography-subtitle1-font-weight",qt.fontWeight,"600"),he=ut.extend("--ft-typography-subtitle1-letter-spacing",qt.letterSpacing,"0.144px"),pe=ut.extend("--ft-typography-subtitle1-line-height",qt.lineHeight,"24px"),de=ut.extend("--ft-typography-subtitle1-text-transform",qt.textTransform,"inherit"),fe=ut.extend("--ft-typography-subtitle2-font-family",Vt),ue=ut.extend("--ft-typography-subtitle2-font-size",qt.fontSize,"14px"),be=ut.extend("--ft-typography-subtitle2-font-weight",qt.fontWeight,"normal"),ve=ut.extend("--ft-typography-subtitle2-letter-spacing",qt.letterSpacing,"0.098px"),ge=ut.extend("--ft-typography-subtitle2-line-height",qt.lineHeight,"24px"),xe=ut.extend("--ft-typography-subtitle2-text-transform",qt.textTransform,"inherit"),ye={fontFamily:ut.extend("--ft-typography-body1-font-family",Vt),fontSize:ut.extend("--ft-typography-body1-font-size",qt.fontSize,"16px"),fontWeight:ut.extend("--ft-typography-body1-font-weight",qt.fontWeight,"normal"),letterSpacing:ut.extend("--ft-typography-body1-letter-spacing",qt.letterSpacing,"0.496px"),lineHeight:ut.extend("--ft-typography-body1-line-height",qt.lineHeight,"24px"),textTransform:ut.extend("--ft-typography-body1-text-transform",qt.textTransform,"inherit")},me={fontFamily:ut.extend("--ft-typography-body2-font-family",Vt),fontSize:ut.extend("--ft-typography-body2-font-size",qt.fontSize,"14px"),fontWeight:ut.extend("--ft-typography-body2-font-weight",qt.fontWeight,"normal"),letterSpacing:ut.extend("--ft-typography-body2-letter-spacing",qt.letterSpacing,"0.252px"),lineHeight:ut.extend("--ft-typography-body2-line-height",qt.lineHeight,"20px"),textTransform:ut.extend("--ft-typography-body2-text-transform",qt.textTransform,"inherit")},$e={fontFamily:ut.extend("--ft-typography-caption-font-family",Vt),fontSize:ut.extend("--ft-typography-caption-font-size",qt.fontSize,"12px"),fontWeight:ut.extend("--ft-typography-caption-font-weight",qt.fontWeight,"normal"),letterSpacing:ut.extend("--ft-typography-caption-letter-spacing",qt.letterSpacing,"0.396px"),lineHeight:ut.extend("--ft-typography-caption-line-height",qt.lineHeight,"16px"),textTransform:ut.extend("--ft-typography-caption-text-transform",qt.textTransform,"inherit")},we=ut.extend("--ft-typography-breadcrumb-font-family",Vt),ke=ut.extend("--ft-typography-breadcrumb-font-size",qt.fontSize,"10px"),Se=ut.extend("--ft-typography-breadcrumb-font-weight",qt.fontWeight,"normal"),Oe=ut.extend("--ft-typography-breadcrumb-letter-spacing",qt.letterSpacing,"0.33px"),Ce=ut.extend("--ft-typography-breadcrumb-line-height",qt.lineHeight,"16px"),ze=ut.extend("--ft-typography-breadcrumb-text-transform",qt.textTransform,"inherit"),Ee=ut.extend("--ft-typography-overline-font-family",Vt),Be=ut.extend("--ft-typography-overline-font-size",qt.fontSize,"10px"),Ne=ut.extend("--ft-typography-overline-font-weight",qt.fontWeight,"normal"),Fe=ut.extend("--ft-typography-overline-letter-spacing",qt.letterSpacing,"1.5px"),Re=ut.extend("--ft-typography-overline-line-height",qt.lineHeight,"16px"),Me=ut.extend("--ft-typography-overline-text-transform",qt.textTransform,"uppercase"),Le={fontFamily:ut.extend("--ft-typography-button-font-family",Vt),fontSize:ut.extend("--ft-typography-button-font-size",qt.fontSize,"14px"),fontWeight:ut.extend("--ft-typography-button-font-weight",qt.fontWeight,"600"),letterSpacing:ut.extend("--ft-typography-button-letter-spacing",qt.letterSpacing,"1.246px"),lineHeight:ut.extend("--ft-typography-button-line-height",qt.lineHeight,"16px"),textTransform:ut.extend("--ft-typography-button-text-transform",qt.textTransform,"uppercase")},De=g`
|
|
141
139
|
.ft-typography--title {
|
|
142
|
-
font-family: ${
|
|
143
|
-
font-size: ${
|
|
144
|
-
font-weight: ${
|
|
145
|
-
letter-spacing: ${
|
|
146
|
-
line-height: ${
|
|
140
|
+
font-family: ${Jt};
|
|
141
|
+
font-size: ${Xt};
|
|
142
|
+
font-weight: ${Yt};
|
|
143
|
+
letter-spacing: ${Qt};
|
|
144
|
+
line-height: ${Gt};
|
|
145
|
+
text-transform: ${te};
|
|
146
|
+
}
|
|
147
|
+
`,je=g`
|
|
148
|
+
.ft-typography--title-dense {
|
|
149
|
+
font-family: ${ee};
|
|
150
|
+
font-size: ${ie};
|
|
151
|
+
font-weight: ${oe};
|
|
152
|
+
letter-spacing: ${se};
|
|
153
|
+
line-height: ${ne};
|
|
147
154
|
text-transform: ${re};
|
|
148
155
|
}
|
|
149
|
-
`,
|
|
150
|
-
.ft-typography--title-dense {
|
|
151
|
-
font-family: ${oe};
|
|
152
|
-
font-size: ${ne};
|
|
153
|
-
font-weight: ${ae};
|
|
154
|
-
letter-spacing: ${ce};
|
|
155
|
-
line-height: ${se};
|
|
156
|
-
text-transform: ${le};
|
|
157
|
-
}
|
|
158
|
-
`,Ie=a`
|
|
156
|
+
`,Ie=g`
|
|
159
157
|
.ft-typography--subtitle1 {
|
|
160
|
-
font-family: ${
|
|
161
|
-
font-size: ${
|
|
162
|
-
font-weight: ${
|
|
163
|
-
letter-spacing: ${
|
|
164
|
-
line-height: ${
|
|
165
|
-
text-transform: ${
|
|
166
|
-
}
|
|
167
|
-
`,Ue=
|
|
158
|
+
font-family: ${le};
|
|
159
|
+
font-size: ${ae};
|
|
160
|
+
font-weight: ${ce};
|
|
161
|
+
letter-spacing: ${he};
|
|
162
|
+
line-height: ${pe};
|
|
163
|
+
text-transform: ${de};
|
|
164
|
+
}
|
|
165
|
+
`,Ue=g`
|
|
168
166
|
.ft-typography--subtitle2 {
|
|
169
|
-
font-family: ${
|
|
170
|
-
font-size: ${
|
|
171
|
-
font-weight: ${
|
|
172
|
-
letter-spacing: ${
|
|
173
|
-
line-height: ${
|
|
174
|
-
text-transform: ${
|
|
167
|
+
font-family: ${fe};
|
|
168
|
+
font-size: ${ue};
|
|
169
|
+
font-weight: ${be};
|
|
170
|
+
letter-spacing: ${ve};
|
|
171
|
+
line-height: ${ge};
|
|
172
|
+
text-transform: ${xe};
|
|
175
173
|
}
|
|
176
174
|
|
|
177
|
-
`,
|
|
175
|
+
`,Te=g`
|
|
178
176
|
.ft-typography--body1 {
|
|
179
|
-
font-family: ${
|
|
180
|
-
font-size: ${
|
|
181
|
-
font-weight: ${
|
|
182
|
-
letter-spacing: ${
|
|
183
|
-
line-height: ${
|
|
184
|
-
text-transform: ${
|
|
185
|
-
}
|
|
186
|
-
`,
|
|
177
|
+
font-family: ${ye.fontFamily};
|
|
178
|
+
font-size: ${ye.fontSize};
|
|
179
|
+
font-weight: ${ye.fontWeight};
|
|
180
|
+
letter-spacing: ${ye.letterSpacing};
|
|
181
|
+
line-height: ${ye.lineHeight};
|
|
182
|
+
text-transform: ${ye.textTransform};
|
|
183
|
+
}
|
|
184
|
+
`,Ae=g`
|
|
187
185
|
.ft-typography--body2 {
|
|
186
|
+
font-family: ${me.fontFamily};
|
|
187
|
+
font-size: ${me.fontSize};
|
|
188
|
+
font-weight: ${me.fontWeight};
|
|
189
|
+
letter-spacing: ${me.letterSpacing};
|
|
190
|
+
line-height: ${me.lineHeight};
|
|
191
|
+
text-transform: ${me.textTransform};
|
|
192
|
+
}
|
|
193
|
+
`,Pe=g`
|
|
194
|
+
.ft-typography--caption {
|
|
188
195
|
font-family: ${$e.fontFamily};
|
|
189
196
|
font-size: ${$e.fontSize};
|
|
190
197
|
font-weight: ${$e.fontWeight};
|
|
@@ -192,337 +199,137 @@ const Vt=t=>({_$litStatic$:t}),Zt=new Map,Wt=(t=>(e,...i)=>{var r;const o=i.leng
|
|
|
192
199
|
line-height: ${$e.lineHeight};
|
|
193
200
|
text-transform: ${$e.textTransform};
|
|
194
201
|
}
|
|
195
|
-
`,
|
|
196
|
-
.ft-typography--caption {
|
|
197
|
-
font-family: ${_e.fontFamily};
|
|
198
|
-
font-size: ${_e.fontSize};
|
|
199
|
-
font-weight: ${_e.fontWeight};
|
|
200
|
-
letter-spacing: ${_e.letterSpacing};
|
|
201
|
-
line-height: ${_e.lineHeight};
|
|
202
|
-
text-transform: ${_e.textTransform};
|
|
203
|
-
}
|
|
204
|
-
`,Ze=a`
|
|
202
|
+
`,_e=g`
|
|
205
203
|
.ft-typography--breadcrumb {
|
|
206
|
-
font-family: ${
|
|
207
|
-
font-size: ${
|
|
208
|
-
font-weight: ${
|
|
209
|
-
letter-spacing: ${
|
|
210
|
-
line-height: ${
|
|
211
|
-
text-transform: ${
|
|
212
|
-
}
|
|
213
|
-
`,
|
|
204
|
+
font-family: ${we};
|
|
205
|
+
font-size: ${ke};
|
|
206
|
+
font-weight: ${Se};
|
|
207
|
+
letter-spacing: ${Oe};
|
|
208
|
+
line-height: ${Ce};
|
|
209
|
+
text-transform: ${ze};
|
|
210
|
+
}
|
|
211
|
+
`,He=g`
|
|
214
212
|
.ft-typography--overline {
|
|
215
|
-
font-family: ${
|
|
216
|
-
font-size: ${
|
|
217
|
-
font-weight: ${
|
|
218
|
-
letter-spacing: ${
|
|
219
|
-
line-height: ${
|
|
220
|
-
text-transform: ${
|
|
221
|
-
}
|
|
222
|
-
`,
|
|
213
|
+
font-family: ${Ee};
|
|
214
|
+
font-size: ${Be};
|
|
215
|
+
font-weight: ${Ne};
|
|
216
|
+
letter-spacing: ${Fe};
|
|
217
|
+
line-height: ${Re};
|
|
218
|
+
text-transform: ${Me};
|
|
219
|
+
}
|
|
220
|
+
`,Ze=g`
|
|
223
221
|
.ft-typography--button {
|
|
224
|
-
font-family: ${
|
|
225
|
-
font-size: ${
|
|
226
|
-
font-weight: ${
|
|
227
|
-
letter-spacing: ${
|
|
228
|
-
line-height: ${
|
|
229
|
-
text-transform: ${
|
|
230
|
-
}
|
|
231
|
-
`;
|
|
232
|
-
.
|
|
233
|
-
vertical-align: inherit;
|
|
234
|
-
}
|
|
235
|
-
`]}getTemplate(){return this.element?Wt`
|
|
236
|
-
<${Vt(this.element)}
|
|
222
|
+
font-family: ${Le.fontFamily};
|
|
223
|
+
font-size: ${Le.fontSize};
|
|
224
|
+
font-weight: ${Le.fontWeight};
|
|
225
|
+
letter-spacing: ${Le.letterSpacing};
|
|
226
|
+
line-height: ${Le.lineHeight};
|
|
227
|
+
text-transform: ${Le.textTransform};
|
|
228
|
+
}
|
|
229
|
+
`;class Ke extends gt{constructor(){super(...arguments),this.variant=Zt.body1}render(){return this.element?Ht`
|
|
230
|
+
<${Pt(this.element)}
|
|
237
231
|
class="ft-typography ft-typography--${this.variant}">
|
|
238
232
|
<slot></slot>
|
|
239
|
-
</${
|
|
240
|
-
`:
|
|
233
|
+
</${Pt(this.element)}>
|
|
234
|
+
`:Ht`
|
|
241
235
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
242
|
-
`}}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
247
|
-
purpose with or without fee is hereby granted.
|
|
248
|
-
|
|
249
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
250
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
251
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
252
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
253
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
254
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
255
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
256
|
-
***************************************************************************** */
|
|
257
|
-
var Qe=function(t,e){return Qe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},Qe(t,e)};function ti(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Qe(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var ei=function(){return ei=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ei.apply(this,arguments)};function ii(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}function ri(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],r=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}
|
|
258
|
-
/**
|
|
259
|
-
* @license
|
|
260
|
-
* Copyright 2018 Google Inc.
|
|
261
|
-
*
|
|
262
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
263
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
264
|
-
* in the Software without restriction, including without limitation the rights
|
|
265
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
266
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
267
|
-
* furnished to do so, subject to the following conditions:
|
|
268
|
-
*
|
|
269
|
-
* The above copyright notice and this permission notice shall be included in
|
|
270
|
-
* all copies or substantial portions of the Software.
|
|
271
|
-
*
|
|
272
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
273
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
274
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
275
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
276
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
277
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
278
|
-
* THE SOFTWARE.
|
|
279
|
-
*/const oi=()=>{},ni={get passive(){return!1}};document.addEventListener("x",oi,ni),document.removeEventListener("x",oi);
|
|
280
|
-
/**
|
|
281
|
-
* @license
|
|
282
|
-
* Copyright 2018 Google LLC
|
|
283
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
284
|
-
*/
|
|
285
|
-
class ai extends et{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}
|
|
286
|
-
/**
|
|
287
|
-
* @license
|
|
288
|
-
* Copyright 2016 Google Inc.
|
|
289
|
-
*
|
|
290
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
291
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
292
|
-
* in the Software without restriction, including without limitation the rights
|
|
293
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
294
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
295
|
-
* furnished to do so, subject to the following conditions:
|
|
296
|
-
*
|
|
297
|
-
* The above copyright notice and this permission notice shall be included in
|
|
298
|
-
* all copies or substantial portions of the Software.
|
|
299
|
-
*
|
|
300
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
301
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
302
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
303
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
304
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
305
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
306
|
-
* THE SOFTWARE.
|
|
307
|
-
*/var ci=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),si={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},li={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},di={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
|
|
308
|
-
/**
|
|
309
|
-
* @license
|
|
310
|
-
* Copyright 2016 Google Inc.
|
|
311
|
-
*
|
|
312
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
313
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
314
|
-
* in the Software without restriction, including without limitation the rights
|
|
315
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
316
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
317
|
-
* furnished to do so, subject to the following conditions:
|
|
318
|
-
*
|
|
319
|
-
* The above copyright notice and this permission notice shall be included in
|
|
320
|
-
* all copies or substantial portions of the Software.
|
|
321
|
-
*
|
|
322
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
323
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
324
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
325
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
326
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
327
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
328
|
-
* THE SOFTWARE.
|
|
329
|
-
*/
|
|
330
|
-
/**
|
|
331
|
-
* @license
|
|
332
|
-
* Copyright 2016 Google Inc.
|
|
333
|
-
*
|
|
334
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
335
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
336
|
-
* in the Software without restriction, including without limitation the rights
|
|
337
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
338
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
339
|
-
* furnished to do so, subject to the following conditions:
|
|
340
|
-
*
|
|
341
|
-
* The above copyright notice and this permission notice shall be included in
|
|
342
|
-
* all copies or substantial portions of the Software.
|
|
343
|
-
*
|
|
344
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
345
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
346
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
347
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
348
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
349
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
350
|
-
* THE SOFTWARE.
|
|
351
|
-
*/
|
|
352
|
-
var hi=["touchstart","pointerdown","mousedown","keydown"],pi=["touchend","pointerup","mouseup","contextmenu"],fi=[],ui=function(t){function e(i){var r=t.call(this,ei(ei({},e.defaultAdapter),i))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(t){r.activateImpl(t)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return ti(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return si},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return li},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return di},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var r=e.cssClasses,o=r.ROOT,n=r.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(o),t.adapter.isUnbounded()&&(t.adapter.addClass(n),t.layoutInternal())}))}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var i=e.cssClasses,r=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(r),t.adapter.removeClass(o),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},e.prototype.setUnbounded=function(t){var i=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var e,i;if(t){try{for(var r=ri(hi),o=r.next();!o.done;o=r.next()){var n=o.value;this.adapter.registerInteractionHandler(n,this.activateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var e,i;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var r=ri(pi),o=r.next();!o.done;o=r.next()){var n=o.value;this.adapter.registerDocumentInteractionHandler(n,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}},e.prototype.deregisterRootHandlers=function(){var t,e;try{for(var i=ri(hi),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,e;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=ri(pi),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,i=e.strings;Object.keys(i).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter.updateCssVariable(i[e],null)}))},e.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var r=this.previousActivationEvent;if(!(r&&void 0!==t&&r.type!==t.type))i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type)),void 0!==t&&fi.length>0&&fi.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(fi.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){fi=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=e.checkElementMadeActive(t),i.wasElementMadeActive&&e.animateActivation()),i.wasElementMadeActive||(e.activationState=e.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,i=e.strings,r=i.VAR_FG_TRANSLATE_START,o=i.VAR_FG_TRANSLATE_END,n=e.cssClasses,a=n.FG_DEACTIVATION,c=n.FG_ACTIVATION,s=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var l="",d="";if(!this.adapter.isUnbounded()){var h=this.getFgTranslationCoordinates(),p=h.startPoint,f=h.endPoint;l=p.x+"px, "+p.y+"px",d=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(r,l),this.adapter.updateCssVariable(o,d),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(c),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),s)},e.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,i=e.activationEvent;return t=e.wasActivatedByPointer?function(t,e,i){if(!t)return{x:0,y:0};var r,o,n=e.x,a=e.y,c=n+i.left,s=a+i.top;if("touchstart"===t.type){var l=t;r=l.changedTouches[0].pageX-c,o=l.changedTouches[0].pageY-s}else{var d=t;r=d.pageX-c,o=d.pageY-s}return{x:r,y:o}}(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2},{startPoint:t={x:t.x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,i=e.cssClasses.FG_DEACTIVATION,r=this.activationState,o=r.hasDeactivationUXRun,n=r.isActivated;(o||!n)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(i)}),di.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var i=ei({},e);e.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(i)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()})))}},e.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,i=t.wasElementMadeActive;(e||i)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var i=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?i:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var r=Math.floor(i*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&r%2!=0?this.initialSize=r-1:this.initialSize=r,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,i=t.VAR_FG_SIZE,r=t.VAR_LEFT,o=t.VAR_TOP,n=t.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize+"px"),this.adapter.updateCssVariable(n,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(r,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords.top+"px"))},e}(ci),mi=ui;
|
|
353
|
-
/**
|
|
354
|
-
* @license
|
|
355
|
-
* Copyright 2018 Google LLC
|
|
356
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
357
|
-
*/
|
|
358
|
-
const bi=bt(class extends vt{constructor(t){var e;if(super(t),t.type!==ut||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const r=t[i];return null==r?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ct){this.ct=new Set;for(const t in e)this.ct.add(t);return this.render(e)}this.ct.forEach((t=>{null==e[t]&&(this.ct.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const r=e[t];null!=r&&(this.ct.add(t),t.includes("-")?i.setProperty(t,r):i[t]=r)}return j}});
|
|
359
|
-
/**
|
|
360
|
-
* @license
|
|
361
|
-
* Copyright 2018 Google LLC
|
|
362
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
363
|
-
*/class vi extends ai{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=mi}get isActive(){return t=this.parentElement||this,e=":active",(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e);var t,e;
|
|
364
|
-
/**
|
|
365
|
-
* @license
|
|
366
|
-
* Copyright 2018 Google LLC
|
|
367
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
368
|
-
*/}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(t,e)=>{switch(t){case"--mdc-ripple-fg-scale":this.fgScale=e;break;case"--mdc-ripple-fg-size":this.fgSize=e;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=e;break;case"--mdc-ripple-fg-translate-start":this.translateStart=e;break;case"--mdc-ripple-left":this.leftPos=e;break;case"--mdc-ripple-top":this.topPos=e}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(t){this.waitForFoundation((()=>{this.mdcFoundation.activate(t)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(t){this.mdcFoundation?t():this.updateComplete.then(t)}update(t){t.has("disabled")&&this.disabled&&this.endHover(),super.update(t)}render(){const t=this.activated&&(this.primary||!this.accent),e=this.selected&&(this.primary||!this.accent),i={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":t,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":e,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return A`
|
|
369
|
-
<div class="mdc-ripple-surface mdc-ripple-upgraded ${Ot(i)}"
|
|
370
|
-
style="${bi({"--mdc-ripple-fg-scale":this.fgScale,"--mdc-ripple-fg-size":this.fgSize,"--mdc-ripple-fg-translate-end":this.translateEnd,"--mdc-ripple-fg-translate-start":this.translateStart,"--mdc-ripple-left":this.leftPos,"--mdc-ripple-top":this.topPos})}"></div>`}}ii([lt(".mdc-ripple-surface")],vi.prototype,"mdcRoot",void 0),ii([nt({type:Boolean})],vi.prototype,"primary",void 0),ii([nt({type:Boolean})],vi.prototype,"accent",void 0),ii([nt({type:Boolean})],vi.prototype,"unbounded",void 0),ii([nt({type:Boolean})],vi.prototype,"disabled",void 0),ii([nt({type:Boolean})],vi.prototype,"activated",void 0),ii([nt({type:Boolean})],vi.prototype,"selected",void 0),ii([nt({type:Boolean})],vi.prototype,"internalUseStateLayerCustomProperties",void 0),ii([at()],vi.prototype,"hovering",void 0),ii([at()],vi.prototype,"bgFocused",void 0),ii([at()],vi.prototype,"fgActivation",void 0),ii([at()],vi.prototype,"fgDeactivation",void 0),ii([at()],vi.prototype,"fgScale",void 0),ii([at()],vi.prototype,"fgSize",void 0),ii([at()],vi.prototype,"translateStart",void 0),ii([at()],vi.prototype,"translateEnd",void 0),ii([at()],vi.prototype,"leftPos",void 0),ii([at()],vi.prototype,"topPos",void 0);
|
|
371
|
-
/**
|
|
372
|
-
* @license
|
|
373
|
-
* Copyright 2021 Google LLC
|
|
374
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
375
|
-
*/
|
|
376
|
-
const gi=a`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`
|
|
377
|
-
/**
|
|
378
|
-
* @license
|
|
379
|
-
* Copyright 2018 Google LLC
|
|
380
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
381
|
-
*/;let xi=class extends vi{};function yi(t,e,i){if(void 0!==e)
|
|
382
|
-
/**
|
|
383
|
-
* @license
|
|
384
|
-
* Copyright 2021 Google LLC
|
|
385
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
386
|
-
*/
|
|
387
|
-
return function(t,e,i){const r=t.constructor;if(!i){const t=`__${e}`;if(!(i=r.getPropertyDescriptor(e,t)))throw new Error("@ariaProperty must be used after a @property decorator")}const o=i;let n="";if(!o.set)throw new Error(`@ariaProperty requires a setter for ${e}`);if(t.dispatchWizEvent)return i;const a={configurable:!0,enumerable:!0,set(t){if(""===n){const t=r.getPropertyOptions(e);n="string"==typeof t.attribute?t.attribute:e}this.hasAttribute(n)&&this.removeAttribute(n),o.set.call(this,t)}};return o.get&&(a.get=function(){return o.get.call(this)}),a}(t,e,i);throw new Error("@ariaProperty only supports TypeScript Decorators")}
|
|
388
|
-
/**
|
|
389
|
-
* @license
|
|
390
|
-
* Copyright 2018 Google LLC
|
|
391
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
392
|
-
*/var ki,wi;xi.styles=[gi],xi=ii([rt("mwc-ripple")],xi);const $i=null!==(wi=null===(ki=window.ShadyDOM)||void 0===ki?void 0:ki.inUse)&&void 0!==wi&&wi;class _i extends ai{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}findFormElement(){if(!this.shadowRoot||$i)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(t=>{this.dispatchEvent(new Event("change",t))}))}}_i.shadowRootOptions={mode:"open",delegatesFocus:!0},ii([nt({type:Boolean})],_i.prototype,"disabled",void 0);
|
|
393
|
-
/**
|
|
394
|
-
* @license
|
|
395
|
-
* Copyright 2020 Google LLC
|
|
396
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
397
|
-
*/
|
|
398
|
-
class Si{constructor(t){this.startPress=e=>{t().then((t=>{t&&t.startPress(e)}))},this.endPress=()=>{t().then((t=>{t&&t.endPress()}))},this.startFocus=()=>{t().then((t=>{t&&t.startFocus()}))},this.endFocus=()=>{t().then((t=>{t&&t.endFocus()}))},this.startHover=()=>{t().then((t=>{t&&t.startHover()}))},this.endHover=()=>{t().then((t=>{t&&t.endHover()}))}}}
|
|
399
|
-
/**
|
|
400
|
-
* @license
|
|
401
|
-
* Copyright 2018 Google LLC
|
|
402
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
403
|
-
*/const Oi=t=>null!=t?t:M
|
|
404
|
-
/**
|
|
405
|
-
* @license
|
|
406
|
-
* Copyright 2019 Google LLC
|
|
407
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
408
|
-
*/;class zi extends _i{constructor(){super(...arguments),this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.name="",this.value="on",this.reducedTouchTarget=!1,this.animationClass="",this.shouldRenderRipple=!1,this.focused=!1,this.mdcFoundationClass=void 0,this.mdcFoundation=void 0,this.rippleElement=null,this.rippleHandlers=new Si((()=>(this.shouldRenderRipple=!0,this.ripple.then((t=>this.rippleElement=t)),this.ripple)))}createAdapter(){return{}}update(t){const e=t.get("indeterminate"),i=t.get("checked"),r=t.get("disabled");if(void 0!==e||void 0!==i||void 0!==r){const t=this.calculateAnimationStateName(!!i,!!e,!!r),o=this.calculateAnimationStateName(this.checked,this.indeterminate,this.disabled);this.animationClass=`${t}-${o}`}super.update(t)}calculateAnimationStateName(t,e,i){return i?"disabled":e?"indeterminate":t?"checked":"unchecked"}renderRipple(){return this.shouldRenderRipple?this.renderRippleTemplate():""}renderRippleTemplate(){return A`<mwc-ripple
|
|
409
|
-
.disabled="${this.disabled}"
|
|
410
|
-
unbounded></mwc-ripple>`}render(){const t=this.indeterminate||this.checked,e={"mdc-checkbox--disabled":this.disabled,"mdc-checkbox--selected":t,"mdc-checkbox--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-checkbox--anim-checked-indeterminate":"checked-indeterminate"==this.animationClass,"mdc-checkbox--anim-checked-unchecked":"checked-unchecked"==this.animationClass,"mdc-checkbox--anim-indeterminate-checked":"indeterminate-checked"==this.animationClass,"mdc-checkbox--anim-indeterminate-unchecked":"indeterminate-unchecked"==this.animationClass,"mdc-checkbox--anim-unchecked-checked":"unchecked-checked"==this.animationClass,"mdc-checkbox--anim-unchecked-indeterminate":"unchecked-indeterminate"==this.animationClass},i=this.indeterminate?"mixed":void 0;return A`
|
|
411
|
-
<div class="mdc-checkbox mdc-checkbox--upgraded ${Ot(e)}">
|
|
412
|
-
<input type="checkbox"
|
|
413
|
-
class="mdc-checkbox__native-control"
|
|
414
|
-
name="${Oi(this.name)}"
|
|
415
|
-
aria-checked="${Oi(i)}"
|
|
416
|
-
aria-label="${Oi(this.ariaLabel)}"
|
|
417
|
-
aria-labelledby="${Oi(this.ariaLabelledBy)}"
|
|
418
|
-
aria-describedby="${Oi(this.ariaDescribedBy)}"
|
|
419
|
-
data-indeterminate="${this.indeterminate?"true":"false"}"
|
|
420
|
-
?disabled="${this.disabled}"
|
|
421
|
-
.indeterminate="${this.indeterminate}"
|
|
422
|
-
.checked="${this.checked}"
|
|
423
|
-
.value="${this.value}"
|
|
424
|
-
@change="${this.handleChange}"
|
|
425
|
-
@focus="${this.handleFocus}"
|
|
426
|
-
@blur="${this.handleBlur}"
|
|
427
|
-
@mousedown="${this.handleRippleMouseDown}"
|
|
428
|
-
@mouseenter="${this.handleRippleMouseEnter}"
|
|
429
|
-
@mouseleave="${this.handleRippleMouseLeave}"
|
|
430
|
-
@touchstart="${this.handleRippleTouchStart}"
|
|
431
|
-
@touchend="${this.handleRippleDeactivate}"
|
|
432
|
-
@touchcancel="${this.handleRippleDeactivate}">
|
|
433
|
-
<div class="mdc-checkbox__background"
|
|
434
|
-
@animationend="${this.resetAnimationClass}">
|
|
435
|
-
<svg class="mdc-checkbox__checkmark"
|
|
436
|
-
viewBox="0 0 24 24">
|
|
437
|
-
<path class="mdc-checkbox__checkmark-path"
|
|
438
|
-
fill="none"
|
|
439
|
-
d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
|
|
440
|
-
</svg>
|
|
441
|
-
<div class="mdc-checkbox__mixedmark"></div>
|
|
442
|
-
</div>
|
|
443
|
-
${this.renderRipple()}
|
|
444
|
-
</div>`}setFormData(t){this.name&&this.checked&&t.append(this.name,this.value)}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleBlur(){this.focused=!1,this.handleRippleBlur()}handleRippleMouseDown(t){const e=()=>{window.removeEventListener("mouseup",e),this.handleRippleDeactivate()};window.addEventListener("mouseup",e),this.rippleHandlers.startPress(t)}handleRippleTouchStart(t){this.rippleHandlers.startPress(t)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleChange(){this.checked=this.formElement.checked,this.indeterminate=this.formElement.indeterminate}resetAnimationClass(){this.animationClass=""}get isRippleActive(){var t;return(null===(t=this.rippleElement)||void 0===t?void 0:t.isActive)||!1}}ii([lt(".mdc-checkbox")],zi.prototype,"mdcRoot",void 0),ii([lt("input")],zi.prototype,"formElement",void 0),ii([nt({type:Boolean,reflect:!0})],zi.prototype,"checked",void 0),ii([nt({type:Boolean})],zi.prototype,"indeterminate",void 0),ii([nt({type:Boolean,reflect:!0})],zi.prototype,"disabled",void 0),ii([nt({type:String,reflect:!0})],zi.prototype,"name",void 0),ii([nt({type:String})],zi.prototype,"value",void 0),ii([yi,nt({type:String,attribute:"aria-label"})],zi.prototype,"ariaLabel",void 0),ii([yi,nt({type:String,attribute:"aria-labelledby"})],zi.prototype,"ariaLabelledBy",void 0),ii([yi,nt({type:String,attribute:"aria-describedby"})],zi.prototype,"ariaDescribedBy",void 0),ii([nt({type:Boolean})],zi.prototype,"reducedTouchTarget",void 0),ii([at()],zi.prototype,"animationClass",void 0),ii([at()],zi.prototype,"shouldRenderRipple",void 0),ii([at()],zi.prototype,"focused",void 0),ii([dt("mwc-ripple")],zi.prototype,"ripple",void 0),ii([st({passive:!0})],zi.prototype,"handleRippleTouchStart",null);
|
|
445
|
-
/**
|
|
446
|
-
* @license
|
|
447
|
-
* Copyright 2021 Google LLC
|
|
448
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
449
|
-
*/
|
|
450
|
-
const Ci=a`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-checkbox:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-touch-target-size, 40px);height:40px;height:var(--mdc-checkbox-touch-target-size, 40px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:GrayText;border-color:var(--mdc-checkbox-disabled-color, GrayText);background-color:transparent}.mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:GrayText;background-color:transparent;background-color:var(--mdc-checkbox-disabled-color, transparent)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:GrayText;color:var(--mdc-checkbox-ink-color, GrayText)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:GrayText;border-color:var(--mdc-checkbox-ink-color, GrayText)}.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:transparent;pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((48px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((40px - 48px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((40px - 48px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((40px - 48px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:48px;width:var(--mdc-checkbox-state-layer-size, 48px);height:48px;height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}:host{outline:none;display:inline-flex;-webkit-tap-highlight-color:transparent}:host([checked]),:host([indeterminate]){--mdc-ripple-color:var(--mdc-theme-secondary, #018786)}.mdc-checkbox .mdc-checkbox__background::before{content:none}`
|
|
451
|
-
/**
|
|
452
|
-
* @license
|
|
453
|
-
* Copyright 2018 Google LLC
|
|
454
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
455
|
-
*/;let Ei=class extends zi{};Ei.styles=[Ci],Ei=ii([rt("mwc-checkbox")],Ei);var Ri=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Bi={color:Rt.extend("--ft-ripple-color",Ft.colorContent),primaryColor:Rt.extend("--ft-ripple-primary-color",Rt.extend("--ft-ripple-color",Ft.colorPrimary)),secondaryColor:Rt.extend("--ft-ripple-secondary-color",Rt.extend("--ft-ripple-color",Ft.colorSecondary)),opacityContentOnSurfacePressed:Rt.external(Ft.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:Rt.external(Ft.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:Rt.external(Ft.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:Rt.external(Ft.opacityContentOnSurfaceSelected,"Design system"),opacityContentOnSurfaceDragged:Rt.external(Ft.opacityContentOnSurfaceDragged,"Design system")};let Fi=class extends Tt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return a`
|
|
456
|
-
:host {
|
|
457
|
-
display: contents;
|
|
458
|
-
|
|
459
|
-
--mdc-ripple-color: ${Bi.color};
|
|
460
|
-
--mdc-ripple-press-opacity: ${Bi.opacityContentOnSurfacePressed};
|
|
461
|
-
--mdc-ripple-hover-opacity: ${Bi.opacityContentOnSurfaceHover};
|
|
462
|
-
--mdc-ripple-focus-opacity: ${Bi.opacityContentOnSurfaceFocused};
|
|
463
|
-
--mdc-ripple-selected-opacity: ${Bi.opacityContentOnSurfaceSelected};
|
|
464
|
-
--mdc-ripple-activated-opacity: ${Bi.opacityContentOnSurfaceDragged};
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
mwc-ripple.ft-ripple--secondary {
|
|
468
|
-
--mdc-ripple-color: ${Bi.secondaryColor};
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
mwc-ripple.ft-ripple--primary {
|
|
472
|
-
--mdc-ripple-color: ${Bi.primaryColor};
|
|
473
|
-
}
|
|
474
|
-
`}getTemplate(){return A`
|
|
475
|
-
<mwc-ripple
|
|
476
|
-
class="${this.primary?"ft-ripple--primary":this.secondary?"ft-ripple--secondary":""}"
|
|
477
|
-
?unbounded=${this.unbounded}
|
|
478
|
-
?activated=${this.activated}
|
|
479
|
-
?selected=${this.selected}
|
|
480
|
-
?disabled=${this.disabled}
|
|
481
|
-
></mwc-ripple>
|
|
482
|
-
`}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple()}endRipple(){var t,e,i;null===(t=this.rippleHandlers)||void 0===t||t.endHover(),null===(e=this.rippleHandlers)||void 0===e||e.endFocus(),null===(i=this.rippleHandlers)||void 0===i||i.endPress()}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentNode;if(e){const t=new Si((async()=>this.mwcRipple)),i=(...e)=>i=>{e.forEach((e=>window.addEventListener(e,t.endPress,{once:!0}))),t.startPress(i)},r=i("mouseup"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")()};e.addEventListener("mouseenter",t.startHover),e.addEventListener("mouseleave",t.endHover),e.addEventListener("mousedown",r),e.addEventListener("touchstart",o),e.addEventListener("keydown",n),e.addEventListener("focus",t.startFocus),e.addEventListener("blur",t.endFocus),this.onDisconnect=()=>{e.removeEventListener("mouseenter",t.startHover),e.removeEventListener("mouseleave",t.endHover),e.removeEventListener("mousedown",r),e.removeEventListener("touchstart",o),e.removeEventListener("keydown",n),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};Fi.elementDefinitions={"mwc-ripple":xi},Ri([nt({type:Boolean})],Fi.prototype,"primary",void 0),Ri([nt({type:Boolean})],Fi.prototype,"secondary",void 0),Ri([nt({type:Boolean})],Fi.prototype,"unbounded",void 0),Ri([nt({type:Boolean})],Fi.prototype,"activated",void 0),Ri([nt({type:Boolean})],Fi.prototype,"selected",void 0),Ri([nt({type:Boolean})],Fi.prototype,"disabled",void 0),Ri([lt("mwc-ripple")],Fi.prototype,"mwcRipple",void 0),Fi=Ri([Ct("ft-ripple")],Fi);
|
|
483
|
-
/**
|
|
484
|
-
* @license
|
|
485
|
-
* Copyright 2021 Google LLC
|
|
486
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
487
|
-
*/
|
|
488
|
-
const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
|
|
489
|
-
/**
|
|
490
|
-
* @license
|
|
491
|
-
* Copyright 2018 Google LLC
|
|
492
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
493
|
-
*/;let Ni=class extends et{render(){return A`<span><slot></slot></span>`}};Ni.styles=[Ti],Ni=ii([rt("mwc-icon")],Ni);var Ai=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const ji=Rt.create("--ft-tooltip-distance","SIZE","4px"),Mi=Rt.create("--ft-tooltip-color","COLOR","#FFFFFF"),Li=Rt.create("--ft-tooltip-background-color","COLOR","#666666"),Di=Rt.create("--ft-tooltip-z-index","NUMBER","1"),Ii=Rt.external(Ft.borderRadiusS,"Design system");let Ui=class extends Tt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new zt,this.revealDebouncer=new zt}getStyles(){return a`
|
|
494
|
-
.ft-tooltip--container {
|
|
495
|
-
display: block;
|
|
496
|
-
position: relative;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
.ft-tooltip--inline {
|
|
500
|
-
display: inline-block;
|
|
501
|
-
max-width: 100%;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
.ft-tooltip {
|
|
505
|
-
position: absolute;
|
|
506
|
-
box-sizing: border-box;
|
|
507
|
-
overflow: hidden;
|
|
508
|
-
width: max-content;
|
|
509
|
-
max-width: 150px;
|
|
510
|
-
text-align: center;
|
|
511
|
-
padding: ${ji};
|
|
512
|
-
z-index: ${Di};
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
.ft-tooltip--content {
|
|
516
|
-
padding: 4px 8px;
|
|
517
|
-
border-radius: ${Ii};
|
|
518
|
-
background-color: ${Li};
|
|
519
|
-
color: ${Mi};
|
|
520
|
-
top: -500px;
|
|
521
|
-
left: -500px;
|
|
522
|
-
position: relative;
|
|
523
|
-
word-break: break-word;
|
|
236
|
+
`}}function We(t,e){return t.flatMap((t=>[t,...We(e(t),e)]))}function Ve(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function qe(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>qe(e,t.selected))),value:t.value}}function Je(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>qe(t,!1)))}}Ke.styles=[De,je,Ie,Ue,Te,Ae,Pe,_e,He,Ze,g`
|
|
237
|
+
.ft-typography {
|
|
238
|
+
vertical-align: inherit;
|
|
524
239
|
}
|
|
525
|
-
`}
|
|
240
|
+
`],Kt([o()],Ke.prototype,"element",void 0),Kt([o()],Ke.prototype,"variant",void 0),h("ft-typography")(Ke);var Xe=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ye={color:ut.extend("--ft-ripple-color",vt.colorContent),primaryColor:ut.extend("--ft-ripple-primary-color",ut.extend("--ft-ripple-color",vt.colorPrimary)),secondaryColor:ut.extend("--ft-ripple-secondary-color",ut.extend("--ft-ripple-color",vt.colorSecondary)),opacityContentOnSurfacePressed:ut.external(vt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ut.external(vt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ut.external(vt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ut.external(vt.opacityContentOnSurfaceSelected,"Design system")};class Qe extends gt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return W`
|
|
241
|
+
<style>
|
|
242
|
+
.ft-ripple .ft-ripple--effect,
|
|
243
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
244
|
+
width: ${this.rippleSize}px;
|
|
245
|
+
height: ${this.rippleSize}px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.ft-ripple .ft-ripple--effect {
|
|
249
|
+
left: ${this.originX}px;
|
|
250
|
+
top: ${this.originY}px;
|
|
251
|
+
}
|
|
252
|
+
</style>
|
|
253
|
+
<div class="${jt(t)}">
|
|
254
|
+
<div class="ft-ripple--background"></div>
|
|
255
|
+
<div class="ft-ripple--effect"></div>
|
|
256
|
+
</div>
|
|
257
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Qe.elementDefinitions={},Qe.styles=g`
|
|
258
|
+
:host {
|
|
259
|
+
display: contents;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.ft-ripple {
|
|
263
|
+
position: absolute;
|
|
264
|
+
inset: 0;
|
|
265
|
+
pointer-events: none;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
269
|
+
overflow: hidden;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.ft-ripple .ft-ripple--background,
|
|
273
|
+
.ft-ripple .ft-ripple--effect {
|
|
274
|
+
position: absolute;
|
|
275
|
+
opacity: 0;
|
|
276
|
+
background-color: ${Ye.color};
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background,
|
|
280
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
281
|
+
background-color: ${Ye.secondaryColor};
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
285
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
286
|
+
background-color: ${Ye.primaryColor};
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.ft-ripple .ft-ripple--background {
|
|
290
|
+
top: 0;
|
|
291
|
+
left: 0;
|
|
292
|
+
height: 100%;
|
|
293
|
+
width: 100%;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.ft-ripple .ft-ripple--effect,
|
|
297
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
298
|
+
border-radius: 50%;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.ft-ripple .ft-ripple--effect {
|
|
302
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
303
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
307
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
308
|
+
left: 50%;
|
|
309
|
+
top: 50%;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
313
|
+
transform: translate(-50%, -50%);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
317
|
+
opacity: ${Ye.opacityContentOnSurfaceHover};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
321
|
+
opacity: ${Ye.opacityContentOnSurfaceSelected};
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
325
|
+
opacity: ${Ye.opacityContentOnSurfaceFocused};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
329
|
+
opacity: ${Ye.opacityContentOnSurfacePressed};
|
|
330
|
+
transform: translate(-50%, -50%) scale(1);
|
|
331
|
+
}
|
|
332
|
+
`,Xe([o({type:Boolean})],Qe.prototype,"primary",void 0),Xe([o({type:Boolean})],Qe.prototype,"secondary",void 0),Xe([o({type:Boolean})],Qe.prototype,"unbounded",void 0),Xe([o({type:Boolean})],Qe.prototype,"activated",void 0),Xe([o({type:Boolean})],Qe.prototype,"selected",void 0),Xe([o({type:Boolean})],Qe.prototype,"disabled",void 0),Xe([s()],Qe.prototype,"hovered",void 0),Xe([s()],Qe.prototype,"focused",void 0),Xe([s()],Qe.prototype,"pressed",void 0),Xe([s()],Qe.prototype,"rippling",void 0),Xe([s()],Qe.prototype,"rippleSize",void 0),Xe([s()],Qe.prototype,"originX",void 0),Xe([s()],Qe.prototype,"originY",void 0),Xe([r(".ft-ripple")],Qe.prototype,"ripple",void 0),Xe([r(".ft-ripple--effect")],Qe.prototype,"rippleEffect",void 0),h("ft-ripple")(Qe);var Ge=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ti=ut.create("--ft-tooltip-distance","SIZE","4px"),ei=ut.create("--ft-tooltip-color","COLOR","#FFFFFF"),ii=ut.create("--ft-tooltip-background-color","COLOR","#666666"),oi=ut.create("--ft-tooltip-z-index","NUMBER","1"),si=ut.external(vt.borderRadiusS,"Design system");class ni extends gt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e,this.revealDebouncer=new e}render(){return W`
|
|
526
333
|
<div part="container"
|
|
527
334
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
528
335
|
@mouseenter=${this.onHover}
|
|
@@ -537,7 +344,39 @@ const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
|
537
344
|
</div>
|
|
538
345
|
<slot></slot>
|
|
539
346
|
</div>
|
|
540
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,
|
|
347
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.maxWidth=Math.max(e.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}ni.elementDefinitions={"ft-typography":Ke},ni.styles=g`
|
|
348
|
+
.ft-tooltip--container {
|
|
349
|
+
display: block;
|
|
350
|
+
position: relative;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.ft-tooltip--inline {
|
|
354
|
+
display: inline-block;
|
|
355
|
+
max-width: 100%;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.ft-tooltip {
|
|
359
|
+
position: absolute;
|
|
360
|
+
box-sizing: border-box;
|
|
361
|
+
overflow: hidden;
|
|
362
|
+
width: max-content;
|
|
363
|
+
max-width: 150px;
|
|
364
|
+
text-align: center;
|
|
365
|
+
padding: ${ti};
|
|
366
|
+
z-index: ${oi};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.ft-tooltip--content {
|
|
370
|
+
padding: 4px 8px;
|
|
371
|
+
border-radius: ${si};
|
|
372
|
+
background-color: ${ii};
|
|
373
|
+
color: ${ei};
|
|
374
|
+
top: -500px;
|
|
375
|
+
left: -500px;
|
|
376
|
+
position: relative;
|
|
377
|
+
word-break: break-word;
|
|
378
|
+
}
|
|
379
|
+
`,Ge([o()],ni.prototype,"text",void 0),Ge([o({type:Boolean})],ni.prototype,"manual",void 0),Ge([o({type:Boolean})],ni.prototype,"inline",void 0),Ge([o({type:Number})],ni.prototype,"delay",void 0),Ge([o()],ni.prototype,"position",void 0),Ge([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?c({slot:s,flatten:e,selector:i}):n({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==n?void 0:n.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],ni.prototype,"slotNodes",void 0),Ge([r(".ft-tooltip--container")],ni.prototype,"container",void 0),Ge([r("slot")],ni.prototype,"target",void 0),Ge([r(".ft-tooltip")],ni.prototype,"tooltip",void 0),Ge([r(".ft-tooltip--content")],ni.prototype,"tooltipContent",void 0),Ge([s()],ni.prototype,"visible",void 0),h("ft-tooltip")(ni);const ri={color:ut.extend("--ft-loader-color",vt.colorPrimary),size:ut.create("--ft-loader-size","SIZE","80px")};class li extends gt{static get styles(){return g`
|
|
541
380
|
:host {
|
|
542
381
|
line-height: 0;
|
|
543
382
|
}
|
|
@@ -546,8 +385,8 @@ const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
|
546
385
|
display: inline-block;
|
|
547
386
|
position: relative;
|
|
548
387
|
|
|
549
|
-
width: ${
|
|
550
|
-
height: ${
|
|
388
|
+
width: ${ri.size};
|
|
389
|
+
height: ${ri.size};
|
|
551
390
|
}
|
|
552
391
|
|
|
553
392
|
.ft-loader div {
|
|
@@ -556,7 +395,7 @@ const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
|
556
395
|
width: 25%;
|
|
557
396
|
height: 25%;
|
|
558
397
|
border-radius: 50%;
|
|
559
|
-
background: ${
|
|
398
|
+
background: ${ri.color};
|
|
560
399
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
561
400
|
}
|
|
562
401
|
|
|
@@ -603,20 +442,65 @@ const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
|
603
442
|
transform: translate(0, 0);
|
|
604
443
|
}
|
|
605
444
|
100% {
|
|
606
|
-
transform: translate(calc(0.35 * ${
|
|
445
|
+
transform: translate(calc(0.35 * ${ri.size}), 0);
|
|
607
446
|
}
|
|
608
447
|
}
|
|
609
|
-
`}
|
|
448
|
+
`}render(){return W`
|
|
610
449
|
<div class="ft-loader">
|
|
611
450
|
<div></div>
|
|
612
451
|
<div></div>
|
|
613
452
|
<div></div>
|
|
614
453
|
<div></div>
|
|
615
454
|
</div>
|
|
616
|
-
`}}
|
|
455
|
+
`}}h("ft-loader")(li);
|
|
456
|
+
/**
|
|
457
|
+
* @license
|
|
458
|
+
* Copyright 2017 Google LLC
|
|
459
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
460
|
+
*/
|
|
461
|
+
class ai extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===q||null==t)return this.vt=void 0,this.it=t;if(t===V)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.vt;this.it=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}ai.directiveName="unsafeHTML",ai.resultType=1;const ci=Ct(ai);var hi,pi;!function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(hi||(hi={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(pi||(pi={}));const di=new Map([...["abw"].map((t=>[t,pi.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,pi.AUDIO])),...["avi"].map((t=>[t,pi.AVI])),...["chm","xhs"].map((t=>[t,pi.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,pi.CODE])),...["csv"].map((t=>[t,pi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,pi.DITA])),...["epub"].map((t=>[t,pi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,pi.EXCEL])),...["flac"].map((t=>[t,pi.FLAC])),...["gif"].map((t=>[t,pi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,pi.GZIP])),...["html","htm","xhtml"].map((t=>[t,pi.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,pi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,pi.JPEG])),...["json"].map((t=>[t,pi.JSON])),...["m4a","m4p"].map((t=>[t,pi.M4A])),...["mov","qt"].map((t=>[t,pi.MOV])),...["mp3"].map((t=>[t,pi.MP3])),...["mp4","m4v"].map((t=>[t,pi.MP4])),...["ogg","oga"].map((t=>[t,pi.OGG])),...["pdf","ps"].map((t=>[t,pi.PDF])),...["png"].map((t=>[t,pi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,pi.POWERPOINT])),...["rar"].map((t=>[t,pi.RAR])),...["stp"].map((t=>[t,pi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,pi.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,pi.VIDEO])),...["wav"].map((t=>[t,pi.WAV])),...["wma"].map((t=>[t,pi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,pi.WORD])),...["xml","xsl","rdf"].map((t=>[t,pi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,pi.YAML])),...["zip"].map((t=>[t,pi.ZIP]))]),fi=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);var ui,bi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ui||(ui={}));const vi={size:ut.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ut.extend("--ft-icon-fluid-topics-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ut.extend("--ft-icon-file-format-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ut.extend("--ft-icon-material-font-family",ut.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class gi extends gt{constructor(){super(...arguments),this.variant=ui.fluid_topics}render(){return W`
|
|
462
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
463
|
+
${ci(this.getIcon())}
|
|
464
|
+
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
465
|
+
</i>
|
|
466
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let i=this.textContent;return this.variant===ui.file_format?null!==(t=pi[i.toUpperCase()])&&void 0!==t?t:i:this.variant===ui.fluid_topics?null!==(e=hi[i.toUpperCase()])&&void 0!==e?e:i:q}}gi.elementDefinitions={},gi.styles=g`
|
|
467
|
+
:host, i.ft-icon {
|
|
468
|
+
display: inline-block;
|
|
469
|
+
width: ${vi.size};
|
|
470
|
+
height: ${vi.size};
|
|
471
|
+
text-align: center;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
i.ft-icon {
|
|
475
|
+
font-size: ${vi.size};
|
|
476
|
+
line-height: 1;
|
|
477
|
+
font-weight: normal;
|
|
478
|
+
text-transform: none;
|
|
479
|
+
font-style: normal;
|
|
480
|
+
font-variant: normal;
|
|
481
|
+
speak: none;
|
|
482
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
483
|
+
text-rendering: auto;
|
|
484
|
+
-webkit-font-smoothing: antialiased;
|
|
485
|
+
-moz-osx-font-smoothing: grayscale;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.ft-icon--fluid-topics {
|
|
489
|
+
font-family: ${vi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.ft-icon--file-format {
|
|
493
|
+
font-family: ${vi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.ft-icon--material {
|
|
497
|
+
font-family: ${vi.materialFontFamily}, "Material Icons", sans-serif;
|
|
498
|
+
}
|
|
499
|
+
`,bi([o()],gi.prototype,"variant",void 0),bi([r("slot")],gi.prototype,"slottedContent",void 0),h("ft-icon")(gi);var xi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const yi=ut.extend("--ft-button-color",vt.colorPrimary),mi={backgroundColor:ut.extend("--ft-button-background-color",vt.colorSurface),borderRadius:ut.extend("--ft-button-border-radius",vt.borderRadiusL),color:yi,fontSize:ut.extend("--ft-button-font-size",Le.fontSize),iconSize:ut.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ut.extend("--ft-button-ripple-color",yi),opacityDisabled:ut.external(vt.colorOpacityDisabled,"Design system")},$i=ut.extend("--ft-button-primary-color",ut.extend("--ft-button-color",vt.colorOnPrimary)),wi={backgroundColor:ut.extend("--ft-button-primary-background-color",ut.extend("--ft-button-background-color",vt.colorPrimary)),color:$i,rippleColor:ut.extend("--ft-button-primary-ripple-color",$i)},ki=ut.extend("--ft-button-dense-border-radius",ut.extend("--ft-button-border-radius",vt.borderRadiusM));class Si extends gt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[xt,g`
|
|
617
500
|
:host {
|
|
618
501
|
display: inline-block;
|
|
619
502
|
max-width: 100%;
|
|
503
|
+
pointer-events: none;
|
|
620
504
|
}
|
|
621
505
|
|
|
622
506
|
button {
|
|
@@ -649,19 +533,20 @@ const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
|
649
533
|
overflow: hidden;
|
|
650
534
|
box-sizing: border-box;
|
|
651
535
|
border: none;
|
|
536
|
+
pointer-events: auto;
|
|
652
537
|
|
|
653
|
-
--ft-button-internal-font-size: ${
|
|
538
|
+
--ft-button-internal-font-size: ${mi.fontSize};
|
|
654
539
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
655
|
-
--ft-button-internal-color: ${
|
|
656
|
-
|
|
540
|
+
--ft-button-internal-color: ${mi.color};
|
|
541
|
+
${bt(vi.size,mi.iconSize)};
|
|
657
542
|
--ft-button-internal-vertical-padding: 6px;
|
|
658
543
|
--ft-button-internal-horizontal-padding: 8px;
|
|
659
|
-
${
|
|
660
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height),
|
|
544
|
+
${bt(Ye.color,mi.rippleColor)};
|
|
545
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${mi.iconSize});
|
|
661
546
|
|
|
662
|
-
border-radius: ${
|
|
547
|
+
border-radius: ${mi.borderRadius};
|
|
663
548
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
664
|
-
background-color: ${
|
|
549
|
+
background-color: ${mi.backgroundColor};
|
|
665
550
|
color: var(--ft-button-internal-color);
|
|
666
551
|
-webkit-mask-image: radial-gradient(white, black);
|
|
667
552
|
}
|
|
@@ -673,7 +558,7 @@ const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
|
673
558
|
.ft-button--dense {
|
|
674
559
|
--ft-button-internal-vertical-padding: 2px;
|
|
675
560
|
--ft-button-internal-horizontal-padding: 4px;
|
|
676
|
-
border-radius: ${
|
|
561
|
+
border-radius: ${ki};
|
|
677
562
|
}
|
|
678
563
|
|
|
679
564
|
.ft-button--round {
|
|
@@ -682,12 +567,13 @@ const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
|
682
567
|
|
|
683
568
|
.ft-button[disabled] {
|
|
684
569
|
filter: grayscale(1);
|
|
685
|
-
opacity: ${
|
|
570
|
+
opacity: ${mi.opacityDisabled};
|
|
686
571
|
}
|
|
687
572
|
|
|
688
573
|
.ft-button.ft-button--primary {
|
|
689
|
-
background-color: ${
|
|
690
|
-
--ft-button-internal-color: ${
|
|
574
|
+
background-color: ${wi.backgroundColor};
|
|
575
|
+
--ft-button-internal-color: ${wi.color};
|
|
576
|
+
${bt(Ye.color,wi.rippleColor)};
|
|
691
577
|
}
|
|
692
578
|
|
|
693
579
|
.ft-button.ft-button--outlined {
|
|
@@ -705,8 +591,8 @@ const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
|
705
591
|
text-overflow: ellipsis;
|
|
706
592
|
display: block;
|
|
707
593
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
708
|
-
${
|
|
709
|
-
${
|
|
594
|
+
${bt(Le.fontSize,"var(--ft-button-internal-font-size)")};
|
|
595
|
+
${bt(Le.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
710
596
|
}
|
|
711
597
|
|
|
712
598
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -723,28 +609,27 @@ const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
|
723
609
|
display: none;
|
|
724
610
|
}
|
|
725
611
|
|
|
726
|
-
|
|
612
|
+
ft-icon {
|
|
727
613
|
flex-shrink: 0;
|
|
728
|
-
width: var(--mdc-icon-size);
|
|
729
614
|
}
|
|
730
615
|
|
|
731
|
-
.ft-button--label[hidden] +
|
|
616
|
+
.ft-button--label[hidden] + ft-icon {
|
|
732
617
|
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
733
618
|
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
734
619
|
}
|
|
735
620
|
|
|
736
|
-
.ft-button:not(.ft-button--trailing-icon)
|
|
621
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
737
622
|
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
738
623
|
order: -1;
|
|
739
624
|
}
|
|
740
625
|
|
|
741
626
|
ft-loader {
|
|
742
|
-
${
|
|
743
|
-
${
|
|
627
|
+
${bt(ri.size,mi.iconSize)};
|
|
628
|
+
${bt(ri.color,"var(--ft-button-internal-color)")};
|
|
744
629
|
}
|
|
745
|
-
`]}
|
|
630
|
+
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":kt,"ft-no-text-select":!0};return this.addTooltip(W`
|
|
746
631
|
<button part="button"
|
|
747
|
-
class="${
|
|
632
|
+
class="${jt(t)}"
|
|
748
633
|
aria-label="${this.getLabel()}"
|
|
749
634
|
?disabled=${this.isDisabled()}>
|
|
750
635
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -756,239 +641,246 @@ const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
|
756
641
|
</ft-typography>
|
|
757
642
|
${this.resolveIcon()}
|
|
758
643
|
</button>
|
|
759
|
-
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:
|
|
644
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:W`
|
|
760
645
|
<ft-tooltip part="tooltip"
|
|
761
646
|
text="${this.getLabel()}"
|
|
762
647
|
position="${this.tooltipPosition}">
|
|
763
648
|
${t}
|
|
764
649
|
</ft-tooltip>
|
|
765
|
-
`}resolveIcon(){return this.loading?
|
|
766
|
-
<ft-loader></ft-loader> `:this.icon?
|
|
767
|
-
<
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
.
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
650
|
+
`}resolveIcon(){return this.loading?W`
|
|
651
|
+
<ft-loader></ft-loader> `:this.icon?W`
|
|
652
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:q}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Si.elementDefinitions={"ft-ripple":Qe,"ft-tooltip":ni,"ft-typography":Ke,"ft-icon":gi,"ft-loader":li},xi([o({type:Boolean})],Si.prototype,"primary",void 0),xi([o({type:Boolean})],Si.prototype,"outlined",void 0),xi([o({type:Boolean})],Si.prototype,"disabled",void 0),xi([o({type:Boolean})],Si.prototype,"dense",void 0),xi([o({type:Boolean})],Si.prototype,"round",void 0),xi([o({type:String})],Si.prototype,"label",void 0),xi([o({type:String})],Si.prototype,"icon",void 0),xi([o({type:Boolean})],Si.prototype,"trailingIcon",void 0),xi([o({type:Boolean})],Si.prototype,"loading",void 0),xi([o({type:String})],Si.prototype,"tooltipPosition",void 0),xi([r(".ft-button")],Si.prototype,"button",void 0),xi([r(".ft-button--label slot")],Si.prototype,"slottedContent",void 0),h("ft-button")(Si);var Oi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ci=ut.extend("--ft-checkbox-text-color",vt.colorOnSurfaceHigh),zi=ut.external(vt.colorPrimary,"Design system"),Ei=ut.external(vt.colorOnPrimary,"Design system"),Bi=ut.extend("--ft-checkbox-border-color",vt.colorOnSurfaceMedium),Ni=ut.external(vt.colorOnSurfaceDisabled,"Design system");class Fi extends gt{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return W`
|
|
653
|
+
<label class="${jt(t)}">
|
|
654
|
+
<div class="ft-checkbox--box-container">
|
|
655
|
+
<input type="checkbox"
|
|
656
|
+
name=${this.name}
|
|
657
|
+
.checked=${this.checked}
|
|
658
|
+
.disabled=${this.disabled}
|
|
659
|
+
@change=${this.onChange}
|
|
660
|
+
>
|
|
661
|
+
<ft-ripple
|
|
662
|
+
?disabled=${this.disabled}
|
|
663
|
+
?primary=${this.checked||this.indeterminate}
|
|
664
|
+
unbounded>
|
|
665
|
+
</ft-ripple>
|
|
666
|
+
<div class="ft-checkbox--box">
|
|
667
|
+
<svg class="ft-checkbox--checkmark" viewBox="0 0 24 24">
|
|
668
|
+
<path class="ft-checkbox--checkmark-path" fill="none"
|
|
669
|
+
d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
|
|
670
|
+
</svg>
|
|
671
|
+
</div>
|
|
672
|
+
</div>
|
|
673
|
+
<ft-typography variant="body2">
|
|
674
|
+
<slot></slot>
|
|
675
|
+
</ft-typography>
|
|
676
|
+
</label>
|
|
677
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}Fi.elementDefinitions={"ft-ripple":Qe,"ft-typography":Ke},Fi.styles=g`
|
|
678
|
+
* {
|
|
679
|
+
box-sizing: border-box;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.ft-checkbox {
|
|
683
|
+
box-sizing: border-box;
|
|
684
|
+
color: ${Ci};
|
|
685
|
+
|
|
686
|
+
display: inline-flex;
|
|
687
|
+
align-items: center;
|
|
688
|
+
gap: 4px;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.ft-checkbox--disabled {
|
|
692
|
+
color: ${Ni};
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
input {
|
|
696
|
+
opacity: 0;
|
|
697
|
+
position: absolute;
|
|
698
|
+
width: 40px;
|
|
699
|
+
height: 40px;
|
|
700
|
+
margin: 0;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.ft-checkbox--box-container {
|
|
704
|
+
position: relative;
|
|
705
|
+
width: 40px;
|
|
706
|
+
height: 40px;
|
|
707
|
+
|
|
708
|
+
display: flex;
|
|
709
|
+
justify-content: center;
|
|
710
|
+
align-items: center;
|
|
711
|
+
flex-shrink: 0;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.ft-checkbox--box {
|
|
715
|
+
border: 2px solid ${Bi};
|
|
716
|
+
border-radius: 2px;
|
|
717
|
+
|
|
718
|
+
width: 18px;
|
|
719
|
+
height: 18px;
|
|
720
|
+
|
|
721
|
+
color: ${Ei};
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
.ft-checkbox--checked .ft-checkbox--box,
|
|
726
|
+
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
727
|
+
border-color: ${zi};
|
|
728
|
+
background-color: ${zi};
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.ft-checkbox--disabled .ft-checkbox--box {
|
|
732
|
+
border-color: ${Ni};
|
|
733
|
+
background-color: transparent;
|
|
734
|
+
color: ${Ni};
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.ft-checkbox--checkmark {
|
|
738
|
+
transition: opacity 180ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 180ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
739
|
+
opacity: 0;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.ft-checkbox--checkmark-path {
|
|
743
|
+
stroke-dashoffset: 0;
|
|
744
|
+
stroke: currentcolor;
|
|
745
|
+
stroke-width: 3px;
|
|
746
|
+
stroke-dasharray: 30;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.ft-checkbox--checked .ft-checkbox--checkmark,
|
|
750
|
+
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
751
|
+
opacity: 1;
|
|
752
|
+
}
|
|
753
|
+
`,Oi([o()],Fi.prototype,"name",void 0),Oi([o({type:Boolean})],Fi.prototype,"checked",void 0),Oi([o({type:Boolean})],Fi.prototype,"indeterminate",void 0),Oi([o({type:Boolean})],Fi.prototype,"disabled",void 0),Oi([r(".ft-checkbox")],Fi.prototype,"container",void 0),Oi([r("ft-ripple")],Fi.prototype,"ripple",void 0),h("ft-checkbox")(Fi);var Ri=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Mi=ut.extend("--ft-radio-text-color",vt.colorOnSurfaceHigh),Li=ut.external(vt.colorPrimary,"Design system"),Di=(ut.external(vt.colorOnPrimary,"Design system"),ut.extend("--ft-radio-border-color",vt.colorOnSurfaceMedium)),ji=ut.external(vt.colorOnSurfaceDisabled,"Design system");class Ii extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Ui extends gt{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return W`
|
|
754
|
+
<div class="${jt(t)}">
|
|
755
|
+
<div class="ft-radio--box-container">
|
|
756
|
+
<input id="radio-button"
|
|
757
|
+
type="radio"
|
|
758
|
+
name="${this.name}"
|
|
759
|
+
value="${this.value}"
|
|
760
|
+
.checked=${this.checked}
|
|
761
|
+
.disabled=${this.disabled}
|
|
762
|
+
@change=${this.onChange}
|
|
763
|
+
>
|
|
764
|
+
<ft-ripple
|
|
765
|
+
?disabled=${this.disabled}
|
|
766
|
+
?primary=${this.checked}
|
|
767
|
+
unbounded>
|
|
768
|
+
</ft-ripple>
|
|
769
|
+
<div class="ft-radio--box">
|
|
770
|
+
</div>
|
|
771
|
+
</div>
|
|
772
|
+
<label for="radio-button" @click=${t=>t.stopPropagation()}>
|
|
773
|
+
<ft-typography variant="body2">
|
|
774
|
+
<slot></slot>
|
|
775
|
+
</ft-typography>
|
|
776
|
+
</label>
|
|
777
|
+
</div>
|
|
778
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Ii(this.value,this.checked))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new Ii(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Ui.elementDefinitions={"ft-ripple":Qe,"ft-typography":Ke},Ui.styles=g`
|
|
779
|
+
* {
|
|
780
|
+
box-sizing: border-box;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.ft-radio {
|
|
784
|
+
box-sizing: border-box;
|
|
785
|
+
color: ${Mi};
|
|
786
|
+
|
|
787
|
+
display: inline-flex;
|
|
788
|
+
align-items: center;
|
|
789
|
+
gap: 4px;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.ft-radio--disabled {
|
|
793
|
+
color: ${ji};
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
input {
|
|
797
|
+
opacity: 0;
|
|
798
|
+
position: absolute;
|
|
799
|
+
width: 40px;
|
|
800
|
+
height: 40px;
|
|
801
|
+
margin: 0;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
.ft-radio--box-container {
|
|
805
|
+
position: relative;
|
|
806
|
+
width: 40px;
|
|
807
|
+
height: 40px;
|
|
808
|
+
|
|
809
|
+
display: flex;
|
|
810
|
+
justify-content: center;
|
|
811
|
+
align-items: center;
|
|
812
|
+
flex-shrink: 0;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.ft-radio--box {
|
|
816
|
+
border: 2px solid ${Di};
|
|
817
|
+
border-radius: 50%;
|
|
818
|
+
|
|
819
|
+
display: flex;
|
|
820
|
+
justify-content: center;
|
|
821
|
+
align-items: center;
|
|
822
|
+
|
|
823
|
+
width: 20px;
|
|
824
|
+
height: 20px;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.ft-radio--box:after {
|
|
828
|
+
content: " ";
|
|
829
|
+
background-color: ${Li};
|
|
830
|
+
|
|
831
|
+
border-radius: 50%;
|
|
832
|
+
|
|
833
|
+
width: 12px;
|
|
834
|
+
height: 12px;
|
|
835
|
+
|
|
836
|
+
transform: scale(0);
|
|
837
|
+
transition: transform 100ms ease;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
.ft-radio--checked .ft-radio--box {
|
|
841
|
+
border-color: ${Li};
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
.ft-radio--checked .ft-radio--box:after {
|
|
846
|
+
transform: scale(1);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.ft-radio--disabled .ft-radio--box {
|
|
850
|
+
border-color: ${ji};
|
|
851
|
+
background-color: transparent;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
.ft-radio--disabled .ft-radio--box:after {
|
|
855
|
+
background-color: ${ji};
|
|
856
|
+
}
|
|
857
|
+
`,Ri([o()],Ui.prototype,"value",void 0),Ri([o()],Ui.prototype,"name",void 0),Ri([o({type:Boolean})],Ui.prototype,"checked",void 0),Ri([o({type:Boolean})],Ui.prototype,"disabled",void 0),Ri([r(".ft-radio")],Ui.prototype,"container",void 0),Ri([r("ft-ripple")],Ui.prototype,"ripple",void 0),Ri([r("input")],Ui.prototype,"input",void 0);var Ti=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ai extends gt{constructor(){super(...arguments),this.name=""}render(){return W`
|
|
858
|
+
<slot @slotchange=${this.onSlotChange}
|
|
859
|
+
@change=${this.onChange}
|
|
860
|
+
@keydown=${this.onKeyDown}
|
|
861
|
+
@focusin=${this.onFocusIn}
|
|
862
|
+
></slot>
|
|
863
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value}))}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Ai.elementDefinitions={},Ai.styles=g`
|
|
864
|
+
:host {
|
|
865
|
+
display: contents;
|
|
866
|
+
}
|
|
867
|
+
`,Ti([o()],Ai.prototype,"name",void 0),Ti([c()],Ai.prototype,"radioButtons",void 0),h("ft-radio")(Ui),h("ft-radio-group")(Ai);var Pi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const _i={borderRadiusM:ut.external(vt.borderRadiusM,"Design system"),colorOutline:ut.external(vt.colorOutline,"Design system"),colorOnSurface:ut.external(vt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ut.external(vt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:ut.external(vt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ut.external(vt.colorPrimary,"Design system"),colorOnPrimary:ut.external(vt.colorOnPrimary,"Design system"),fontFamily:ut.external(me.fontFamily,"Body2 typography"),fontSize:ut.external(me.fontSize,"Body2 typography"),fontWeight:ut.external(me.fontWeight,"Body2 typography"),letterSpacing:ut.external(me.letterSpacing,"Body2 typography"),lineHeight:ut.external(me.lineHeight,"Body2 typography"),textTransform:ut.external(me.textTransform,"Body2 typography")};class Hi extends gt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return W`
|
|
976
868
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
977
|
-
${null==this.parent?null:
|
|
869
|
+
${null==this.parent?null:W`
|
|
978
870
|
<div tabindex="0"
|
|
979
871
|
class="ft-filter-level--go-back"
|
|
980
872
|
?disabled=${this.disabled}
|
|
981
873
|
@keyup=${this.goBackOnKeyPress}
|
|
982
874
|
@click=${this.goBackOnClick}>
|
|
983
875
|
<ft-ripple></ft-ripple>
|
|
984
|
-
<
|
|
876
|
+
<ft-icon variant="material">chevron_left</ft-icon>
|
|
985
877
|
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
986
878
|
</div>
|
|
987
879
|
`}
|
|
988
|
-
${
|
|
880
|
+
${Dt(e,(t=>t.value),(t=>{var e;return W`
|
|
989
881
|
<div class="ft-filter-level--option" part="options">
|
|
990
882
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
991
|
-
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?
|
|
883
|
+
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?q:W`
|
|
992
884
|
<ft-button icon="chevron_right"
|
|
993
885
|
label="${t.label}"
|
|
994
886
|
?disabled=${this.disabled}
|
|
@@ -997,7 +889,7 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
997
889
|
`}
|
|
998
890
|
</div>
|
|
999
891
|
`}))}
|
|
1000
|
-
${e.length<t.length?
|
|
892
|
+
${e.length<t.length?W`
|
|
1001
893
|
<ft-button
|
|
1002
894
|
class="ft-filter-level--display-more"
|
|
1003
895
|
icon="expand_more"
|
|
@@ -1005,154 +897,88 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
1005
897
|
@click=${this.displayMore}>
|
|
1006
898
|
${this.moreValuesButtonLabel}
|
|
1007
899
|
</ft-button>
|
|
1008
|
-
`:
|
|
900
|
+
`:q}
|
|
1009
901
|
</div>
|
|
1010
|
-
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return
|
|
1011
|
-
<
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
?checked=${t.selected}
|
|
1026
|
-
?disabled=${this.disabled}
|
|
1027
|
-
@click=${e=>this.optionsChanged(e,t)}
|
|
1028
|
-
></mwc-radio>
|
|
1029
|
-
</mwc-formfield>
|
|
1030
|
-
`}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}};vr.elementDefinitions={"ft-button":Yi,"ft-ripple":Fi,"ft-typography":qe,"mwc-checkbox":Ei,"mwc-formfield":nr,"mwc-icon":Ni,"mwc-radio":ur},mr([nt({type:String})],vr.prototype,"id",void 0),mr([nt({type:Object})],vr.prototype,"parent",void 0),mr([nt({type:Array})],vr.prototype,"options",void 0),mr([nt({type:Boolean})],vr.prototype,"multivalued",void 0),mr([nt({type:Boolean})],vr.prototype,"disabled",void 0),mr([nt({type:Boolean})],vr.prototype,"hideSelectedOptions",void 0),mr([nt({type:Boolean})],vr.prototype,"preventNavigation",void 0),mr([nt({type:String})],vr.prototype,"filter",void 0),mr([nt({type:String})],vr.prototype,"moreValuesButtonLabel",void 0),mr([nt({type:Number})],vr.prototype,"displayedValuesLimit",void 0),mr([lt(".ft-filter-level--container")],vr.prototype,"container",void 0),mr([at()],vr.prototype,"displayedPages",void 0),vr=mr([Ct("ft-filter-level")],vr);var gr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const xr={buttonsColor:Rt.extend("--ft-snap-scroll-buttons-color",Ft.colorPrimary),buttonsZIndex:Rt.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:Rt.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:Rt.external(Ft.colorSurface,"Design system")};class yr extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}let kr=class extends Tt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new zt(200),this.updateScrollDebouncer=new zt(100)}getStyles(){return a`
|
|
1031
|
-
.ft-snap-scroll {
|
|
1032
|
-
box-sizing: border-box;
|
|
1033
|
-
position: relative;
|
|
1034
|
-
display: flex;
|
|
902
|
+
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return W`
|
|
903
|
+
<ft-checkbox name="${this.id}"
|
|
904
|
+
.checked=${t.selected}
|
|
905
|
+
.disabled=${this.disabled}
|
|
906
|
+
.indeterminate=${We(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
907
|
+
@change=${e=>this.optionsChanged(e,t)}>
|
|
908
|
+
${t.label}
|
|
909
|
+
</ft-checkbox>
|
|
910
|
+
`}buildMonoValuedOption(t){return W`
|
|
911
|
+
<ft-radio name="${this.id+Math.round(1e6*Math.random())}"
|
|
912
|
+
.checked=${t.selected}
|
|
913
|
+
?disabled=${this.disabled}
|
|
914
|
+
@click=${e=>this.optionsChanged(e,t)}
|
|
915
|
+
@keyup=${e=>this.onRadioKeyUp(e,t)}
|
|
916
|
+
@change=${t=>t.stopPropagation()}>
|
|
1035
917
|
|
|
1036
|
-
|
|
918
|
+
${t.label}
|
|
919
|
+
</ft-radio>
|
|
920
|
+
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Hi.elementDefinitions={"ft-button":Si,"ft-ripple":Qe,"ft-typography":Ke,"ft-checkbox":Fi,"ft-icon":gi,"ft-radio":Ui},Hi.styles=[g`
|
|
921
|
+
.ft-filter-level--container {
|
|
922
|
+
display: flex;
|
|
923
|
+
flex-direction: column;
|
|
1037
924
|
}
|
|
1038
925
|
|
|
1039
|
-
.ft-
|
|
1040
|
-
|
|
1041
|
-
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
1042
|
-
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
926
|
+
.ft-filter-level--container > * {
|
|
927
|
+
padding: 0 10px;
|
|
1043
928
|
}
|
|
1044
929
|
|
|
1045
|
-
.ft-
|
|
1046
|
-
|
|
930
|
+
.ft-filter-level--go-back {
|
|
931
|
+
flex-shrink: 0;
|
|
932
|
+
text-decoration: none;
|
|
933
|
+
position: relative;
|
|
934
|
+
border-radius: ${_i.borderRadiusM};
|
|
1047
935
|
overflow: hidden;
|
|
936
|
+
display: flex;
|
|
937
|
+
align-items: center;
|
|
938
|
+
padding: 4px 4px;
|
|
939
|
+
gap: 4px;
|
|
940
|
+
cursor: pointer;
|
|
941
|
+
color: ${_i.colorOnSurface};
|
|
1048
942
|
}
|
|
1049
943
|
|
|
1050
|
-
.ft-
|
|
1051
|
-
|
|
1052
|
-
width: 100%;
|
|
1053
|
-
height: 100%;
|
|
944
|
+
.ft-filter-level--go-back:focus {
|
|
945
|
+
outline: none;
|
|
1054
946
|
}
|
|
1055
947
|
|
|
1056
|
-
.ft-
|
|
1057
|
-
flex-
|
|
1058
|
-
flex-shrink: 1;
|
|
1059
|
-
box-sizing: border-box;
|
|
1060
|
-
scroll-snap-align: start;
|
|
1061
|
-
display: flex;
|
|
1062
|
-
flex-wrap: nowrap;
|
|
1063
|
-
align-items: flex-start;
|
|
1064
|
-
justify-content: flex-start;
|
|
1065
|
-
gap: ${xr.gap};
|
|
948
|
+
.ft-filter-level--go-back ft-icon {
|
|
949
|
+
flex-shrink: 0;
|
|
1066
950
|
}
|
|
1067
951
|
|
|
1068
|
-
.ft-
|
|
1069
|
-
display:
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
1073
|
-
-ms-overflow-style: none;
|
|
1074
|
-
scrollbar-width: none;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
.ft-snap-scroll--content::slotted(*) {
|
|
1078
|
-
flex-shrink: 0;
|
|
952
|
+
.ft-filter-level--go-back ft-typography {
|
|
953
|
+
display: block;
|
|
1079
954
|
flex-grow: 1;
|
|
1080
|
-
|
|
1081
|
-
max-width: 100%;
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
.ft-snap-scroll--horizontal,
|
|
1085
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1086
|
-
width: 100%;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
.ft-snap-scroll--vertical,
|
|
1090
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1091
|
-
height: 100%;
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1095
|
-
flex-direction: row;
|
|
1096
|
-
overflow-x: auto;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1100
|
-
flex-direction: column;
|
|
1101
|
-
overflow-y: auto;
|
|
955
|
+
flex-shrink: 0;
|
|
1102
956
|
}
|
|
1103
957
|
|
|
1104
|
-
.ft-
|
|
1105
|
-
.ft-snap-scroll--next {
|
|
1106
|
-
position: absolute;
|
|
958
|
+
.ft-filter-level--option {
|
|
1107
959
|
display: flex;
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1111
|
-
${Bt(Ki.backgroundColor,"transparent")};
|
|
1112
|
-
${Bt(Ki.color,xr.buttonsColor)};
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
.ft-snap-scroll--previous[hidden],
|
|
1116
|
-
.ft-snap-scroll--next[hidden] {
|
|
1117
|
-
z-index: -1;
|
|
1118
|
-
opacity: 0;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
1122
|
-
top: 0;
|
|
1123
|
-
left: -1px;
|
|
1124
|
-
bottom: 0;
|
|
1125
|
-
background: linear-gradient(to right, ${xr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1129
|
-
top: -1px;
|
|
1130
|
-
left: 0;
|
|
1131
|
-
right: 0;
|
|
1132
|
-
background: linear-gradient(to bottom, ${xr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
960
|
+
align-items: center;
|
|
961
|
+
max-width: 100%;
|
|
1133
962
|
}
|
|
1134
963
|
|
|
1135
|
-
.ft-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
bottom: 0;
|
|
1139
|
-
background: linear-gradient(to left, ${xr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
964
|
+
.ft-filter-level--option ft-button {
|
|
965
|
+
margin-right: -10px;
|
|
966
|
+
flex-shrink: 0;
|
|
1140
967
|
}
|
|
1141
968
|
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
right: 0;
|
|
1145
|
-
bottom: -1px;
|
|
1146
|
-
background: linear-gradient(to top, ${xr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
969
|
+
ft-button {
|
|
970
|
+
${bt(mi.color,_i.colorOnSurface)};
|
|
1147
971
|
}
|
|
1148
972
|
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
973
|
+
ft-radio, ft-checkbox {
|
|
974
|
+
flex-shrink: 1;
|
|
975
|
+
flex-grow: 1;
|
|
976
|
+
display: block;
|
|
977
|
+
max-width: calc(100% + 10px);
|
|
978
|
+
margin-left: -10px;
|
|
979
|
+
word-break: break-word;
|
|
1154
980
|
}
|
|
1155
|
-
`}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}
|
|
981
|
+
`],Pi([o({type:String})],Hi.prototype,"id",void 0),Pi([o({type:Object})],Hi.prototype,"parent",void 0),Pi([o({type:Array})],Hi.prototype,"options",void 0),Pi([o({type:Boolean})],Hi.prototype,"multivalued",void 0),Pi([o({type:Boolean})],Hi.prototype,"disabled",void 0),Pi([o({type:Boolean})],Hi.prototype,"hideSelectedOptions",void 0),Pi([o({type:Boolean})],Hi.prototype,"preventNavigation",void 0),Pi([o({type:String})],Hi.prototype,"filter",void 0),Pi([o({type:String})],Hi.prototype,"moreValuesButtonLabel",void 0),Pi([o({type:Number})],Hi.prototype,"displayedValuesLimit",void 0),Pi([r(".ft-filter-level--container")],Hi.prototype,"container",void 0),Pi([s()],Hi.prototype,"displayedPages",void 0);var Zi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ki={buttonsColor:ut.extend("--ft-snap-scroll-buttons-color",vt.colorPrimary),buttonsZIndex:ut.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:ut.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:ut.external(vt.colorSurface,"Design system")};class Wi extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class Vi extends gt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e(200),this.updateScrollDebouncer=new e(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=jt({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":kt}),e=this.controls&&this.withScroll;return W`
|
|
1156
982
|
<div part="container" class="${t}">
|
|
1157
983
|
<ft-button
|
|
1158
984
|
class="ft-snap-scroll--previous"
|
|
@@ -1176,132 +1002,150 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
1176
1002
|
@click=${this.next}
|
|
1177
1003
|
></ft-button>
|
|
1178
1004
|
</div>
|
|
1179
|
-
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1005
|
+
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new Wi(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}Vi.elementDefinitions={"ft-button":Si},Vi.styles=g`
|
|
1006
|
+
.ft-snap-scroll {
|
|
1007
|
+
box-sizing: border-box;
|
|
1008
|
+
position: relative;
|
|
1009
|
+
display: flex;
|
|
1010
|
+
|
|
1011
|
+
--ft-snap-scroll-transparent-color: transparent;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
.ft-snap-scroll.ft-snap-scroll--safari-fix {
|
|
1015
|
+
/* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
|
|
1016
|
+
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
1017
|
+
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.ft-snap-scroll,
|
|
1021
|
+
.ft-snap-scroll--content {
|
|
1022
|
+
overflow: hidden;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.ft-snap-scroll--limit-size,
|
|
1026
|
+
.ft-snap-scroll--limit-size .ft-snap-scroll--content {
|
|
1027
|
+
width: 100%;
|
|
1028
|
+
height: 100%;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
.ft-snap-scroll--content {
|
|
1032
|
+
flex-grow: 1;
|
|
1033
|
+
flex-shrink: 1;
|
|
1034
|
+
box-sizing: border-box;
|
|
1035
|
+
scroll-snap-align: start;
|
|
1036
|
+
display: flex;
|
|
1037
|
+
flex-wrap: nowrap;
|
|
1038
|
+
align-items: flex-start;
|
|
1039
|
+
justify-content: flex-start;
|
|
1040
|
+
gap: ${Ki.gap};
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
1044
|
+
display: none;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
1048
|
+
-ms-overflow-style: none;
|
|
1049
|
+
scrollbar-width: none;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
.ft-snap-scroll--content::slotted(*) {
|
|
1053
|
+
flex-shrink: 0;
|
|
1054
|
+
flex-grow: 1;
|
|
1055
|
+
max-height: 100%;
|
|
1056
|
+
max-width: 100%;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.ft-snap-scroll--horizontal,
|
|
1060
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1061
|
+
width: 100%;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
.ft-snap-scroll--vertical,
|
|
1065
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1066
|
+
height: 100%;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1070
|
+
flex-direction: row;
|
|
1071
|
+
overflow-x: auto;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1075
|
+
flex-direction: column;
|
|
1076
|
+
overflow-y: auto;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.ft-snap-scroll--previous,
|
|
1080
|
+
.ft-snap-scroll--next {
|
|
1081
|
+
position: absolute;
|
|
1082
|
+
display: flex;
|
|
1083
|
+
z-index: ${Ki.buttonsZIndex};
|
|
1084
|
+
opacity: 1;
|
|
1085
|
+
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1086
|
+
${bt(mi.backgroundColor,"transparent")};
|
|
1087
|
+
${bt(mi.color,Ki.buttonsColor)};
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
.ft-snap-scroll--previous[hidden],
|
|
1091
|
+
.ft-snap-scroll--next[hidden] {
|
|
1092
|
+
z-index: -1;
|
|
1093
|
+
opacity: 0;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
1097
|
+
top: 0;
|
|
1098
|
+
left: -1px;
|
|
1099
|
+
bottom: 0;
|
|
1100
|
+
background: linear-gradient(to right, ${Ki.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1104
|
+
top: -1px;
|
|
1105
|
+
left: 0;
|
|
1106
|
+
right: 0;
|
|
1107
|
+
background: linear-gradient(to bottom, ${Ki.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1111
|
+
top: 0;
|
|
1112
|
+
right: -1px;
|
|
1113
|
+
bottom: 0;
|
|
1114
|
+
background: linear-gradient(to left, ${Ki.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1118
|
+
left: 0;
|
|
1119
|
+
right: 0;
|
|
1120
|
+
bottom: -1px;
|
|
1121
|
+
background: linear-gradient(to top, ${Ki.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1125
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1126
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1127
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1128
|
+
background-color: ${Ki.colorSurface};
|
|
1129
|
+
}
|
|
1130
|
+
`,Zi([o({type:Boolean})],Vi.prototype,"horizontal",void 0),Zi([o({type:Boolean})],Vi.prototype,"hideScrollbar",void 0),Zi([o({type:Boolean})],Vi.prototype,"controls",void 0),Zi([o({type:Boolean})],Vi.prototype,"limitSize",void 0),Zi([s()],Vi.prototype,"elements",void 0),Zi([s()],Vi.prototype,"currentElement",void 0),Zi([s()],Vi.prototype,"withScroll",void 0),Zi([s()],Vi.prototype,"startReached",void 0),Zi([s()],Vi.prototype,"endReached",void 0),Zi([r(".ft-snap-scroll--content")],Vi.prototype,"contentSlot",void 0),h("ft-snap-scroll")(Vi);var qi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ji=ut.external(vt.colorOutline,"Design system"),Xi=ut.external(vt.colorOnSurface,"Design system"),Yi=ut.external(vt.colorOnSurfaceMedium,"Design system"),Qi=ut.external(vt.colorPrimary,"Design system"),Gi=ut.external(vt.colorSurface,"Design system"),to=ut.external(vt.transitionDuration,"Design system"),eo=ut.external(vt.transitionTimingFunction,"Design system");class io extends CustomEvent{constructor(t){super("change",{detail:t})}}class oo extends gt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e(300),this.changeDebouncer=new e(10)}get flatOptions(){return We(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected));let o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return W`
|
|
1287
1131
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1288
1132
|
part="container">
|
|
1289
|
-
${this.label||i?
|
|
1133
|
+
${this.label||i?W`
|
|
1290
1134
|
<div class="ft-filter--header" part="header">
|
|
1291
1135
|
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1292
1136
|
</ft-typography>
|
|
1293
|
-
${i?
|
|
1137
|
+
${i?W`
|
|
1294
1138
|
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1295
1139
|
${this.clearButtonLabel}
|
|
1296
1140
|
</ft-button>
|
|
1297
1141
|
`:null}
|
|
1298
1142
|
</div>
|
|
1299
1143
|
`:null}
|
|
1300
|
-
<div class="ft-filter--filter" ?hidden=${!
|
|
1144
|
+
<div class="ft-filter--filter" ?hidden=${!o}>
|
|
1301
1145
|
<input type="search"
|
|
1302
1146
|
part="input"
|
|
1303
1147
|
class="ft-typography--caption"
|
|
1304
|
-
?disabled=${!
|
|
1148
|
+
?disabled=${!o}
|
|
1305
1149
|
placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}"
|
|
1306
1150
|
@keyup=${this.onFilterChange}>
|
|
1307
1151
|
</div>
|
|
@@ -1312,8 +1156,8 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
1312
1156
|
@slotchange=${this.updateOptionsFromSlot}
|
|
1313
1157
|
@option-change=${this.optionsChanged}></slot>
|
|
1314
1158
|
</div>
|
|
1315
|
-
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,
|
|
1316
|
-
${this.raiseSelectedOptions&&e.length>0?
|
|
1159
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,o=i<0?"ft-filter--level-center":"ft-filter--level-left";return W`
|
|
1160
|
+
${this.raiseSelectedOptions&&e.length>0?W`
|
|
1317
1161
|
<ft-filter-level
|
|
1318
1162
|
id="${this.id}"
|
|
1319
1163
|
?multivalued=${this.multivalued}
|
|
@@ -1328,10 +1172,10 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
1328
1172
|
<ft-snap-scroll horizontal hideScrollbar
|
|
1329
1173
|
class="ft-filter--levels"
|
|
1330
1174
|
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1331
|
-
${this.renderLevel(
|
|
1332
|
-
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var
|
|
1175
|
+
${this.renderLevel(o,this.options)}
|
|
1176
|
+
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var o;const s=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":e===i?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(s,null!==(o=null==t?void 0:t.subOptions)&&void 0!==o?o:[],t)}))}
|
|
1333
1177
|
</ft-snap-scroll>
|
|
1334
|
-
`}renderLevel(t,e,i){return
|
|
1178
|
+
`}renderLevel(t,e,i){return W`
|
|
1335
1179
|
<ft-filter-level
|
|
1336
1180
|
class="${t}"
|
|
1337
1181
|
id="${this.id}"
|
|
@@ -1348,94 +1192,122 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
1348
1192
|
@display-level=${this.onDisplayLevel}
|
|
1349
1193
|
part="values"
|
|
1350
1194
|
></ft-filter-level>
|
|
1351
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
font-size: ${Pr};
|
|
1361
|
-
line-height: 1;
|
|
1362
|
-
font-weight: normal;
|
|
1363
|
-
text-transform: none;
|
|
1364
|
-
font-style: normal;
|
|
1365
|
-
font-variant: normal;
|
|
1366
|
-
speak: none;
|
|
1367
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
1368
|
-
text-rendering: auto;
|
|
1369
|
-
-webkit-font-smoothing: antialiased;
|
|
1370
|
-
-moz-osx-font-smoothing: grayscale;
|
|
1371
|
-
}
|
|
1372
|
-
`,Wr=a`
|
|
1373
|
-
.ft-icon--file-format {
|
|
1374
|
-
font-family: ${Vr}, ft-mime, sans-serif;
|
|
1375
|
-
font-size: ${Pr};
|
|
1376
|
-
line-height: 1;
|
|
1377
|
-
font-weight: normal;
|
|
1378
|
-
text-transform: none;
|
|
1379
|
-
font-style: normal;
|
|
1380
|
-
font-variant: normal;
|
|
1381
|
-
speak: none;
|
|
1382
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
1383
|
-
text-rendering: auto;
|
|
1384
|
-
-webkit-font-smoothing: antialiased;
|
|
1385
|
-
-moz-osx-font-smoothing: grayscale;
|
|
1386
|
-
}
|
|
1387
|
-
`;let Kr=class extends Tt{constructor(){super(...arguments),this.variant=Ir.fluid_topics}getStyles(){return[Zr,Wr,a`
|
|
1388
|
-
:host, i.ft-icon {
|
|
1389
|
-
display: inline-block;
|
|
1390
|
-
width: ${Pr};
|
|
1391
|
-
height: ${Pr};
|
|
1392
|
-
text-align: center;
|
|
1393
|
-
}
|
|
1394
|
-
`]}getTemplate(){return A`
|
|
1395
|
-
<slot @slotchange=${()=>this.requestUpdate()} hidden></slot>
|
|
1396
|
-
<i class="ft-icon ${"ft-icon--"+this.variant}">${Ar(this.getIcon())}</i>
|
|
1397
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;return this.variant===Ir.file_format?null!==(t=Mr[this.textContent.toUpperCase()])&&void 0!==t?t:this.textContent:null!==(e=jr[this.textContent.toUpperCase()])&&void 0!==e?e:this.textContent}};Kr.elementDefinitions={},Ur([nt()],Kr.prototype,"variant",void 0),Ur([lt("slot")],Kr.prototype,"slottedContent",void 0),Kr=Ur([Ct("ft-icon")],Kr);var qr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Gr=Rt.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),Xr=Rt.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),Jr=Rt.external(Ft.colorOutline,"Design system");let Yr=class extends Tt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}getStyles(){return a`
|
|
1398
|
-
.ft-accordion-item {
|
|
1195
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new io(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(t){const e=t.composedPath()[0];this.filter=e.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}oo.elementDefinitions={"ft-button":Si,"ft-filter-level":Hi,"ft-snap-scroll":Vi,"ft-typography":Ke},oo.styles=[Pe,g`
|
|
1196
|
+
:host {
|
|
1197
|
+
display: flex;
|
|
1198
|
+
max-height: 100%;
|
|
1199
|
+
max-width: 100%;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
.ft-filter--container {
|
|
1203
|
+
flex-grow: 1;
|
|
1399
1204
|
display: flex;
|
|
1400
1205
|
flex-direction: column;
|
|
1206
|
+
max-height: 100%;
|
|
1207
|
+
max-width: 100%;
|
|
1208
|
+
color: ${Xi};
|
|
1209
|
+
background: ${Gi};
|
|
1401
1210
|
}
|
|
1402
1211
|
|
|
1403
|
-
.ft-
|
|
1404
|
-
flex-shrink: 0;
|
|
1405
|
-
flex-grow: 0;
|
|
1406
|
-
position: relative;
|
|
1212
|
+
.ft-filter--header {
|
|
1407
1213
|
display: flex;
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1214
|
+
flex-wrap: wrap;
|
|
1215
|
+
gap: 4px;
|
|
1216
|
+
flex-shrink: 0;
|
|
1217
|
+
padding: 0 10px;
|
|
1218
|
+
margin-bottom: 8px;
|
|
1219
|
+
${bt(qt.fontSize,"14px")};
|
|
1413
1220
|
}
|
|
1414
1221
|
|
|
1415
|
-
.ft-
|
|
1416
|
-
flex-
|
|
1417
|
-
|
|
1418
|
-
|
|
1222
|
+
.ft-filter--header ft-button {
|
|
1223
|
+
flex-shrink: 0;
|
|
1224
|
+
margin-left: auto;
|
|
1225
|
+
${bt(mi.iconSize,"18px")};
|
|
1419
1226
|
}
|
|
1420
1227
|
|
|
1421
|
-
.ft-
|
|
1422
|
-
|
|
1228
|
+
.ft-filter--label {
|
|
1229
|
+
display: block;
|
|
1423
1230
|
flex-shrink: 1;
|
|
1424
1231
|
flex-grow: 1;
|
|
1232
|
+
word-break: break-word;
|
|
1233
|
+
${bt(qt.lineHeight,"22px")};
|
|
1234
|
+
${bt(qt.fontWeight,"bold")};
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
.ft-filter--filter {
|
|
1238
|
+
flex-shrink: 0;
|
|
1239
|
+
display: flex;
|
|
1240
|
+
margin: 0;
|
|
1241
|
+
margin-bottom: 8px;
|
|
1242
|
+
padding: 0 10px;
|
|
1425
1243
|
overflow: hidden;
|
|
1244
|
+
height: 32px;
|
|
1245
|
+
transition: height ${to} ${eo},
|
|
1246
|
+
margin ${to} ${eo};
|
|
1247
|
+
transition-delay: 500ms;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
.ft-filter--filter[hidden] {
|
|
1426
1251
|
height: 0;
|
|
1252
|
+
margin-bottom: 0;
|
|
1427
1253
|
}
|
|
1428
1254
|
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1255
|
+
input {
|
|
1256
|
+
display: block;
|
|
1257
|
+
width: 100%;
|
|
1258
|
+
border-radius: 4px;
|
|
1259
|
+
border: 1px solid ${Ji};
|
|
1260
|
+
padding: 4px;
|
|
1261
|
+
background-color: ${Gi};
|
|
1262
|
+
color: ${Yi};
|
|
1263
|
+
outline-color: ${Qi};
|
|
1433
1264
|
}
|
|
1434
1265
|
|
|
1435
|
-
.ft-
|
|
1436
|
-
|
|
1266
|
+
.ft-filter--values {
|
|
1267
|
+
flex-grow: 1;
|
|
1268
|
+
flex-shrink: 1;
|
|
1269
|
+
max-width: 100%;
|
|
1270
|
+
overflow-x: hidden;
|
|
1271
|
+
overflow-y: auto;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
.ft-filter--separator {
|
|
1275
|
+
border-top: 1px solid ${Ji};
|
|
1276
|
+
margin: 4px 10px;
|
|
1437
1277
|
}
|
|
1438
|
-
|
|
1278
|
+
|
|
1279
|
+
.ft-filter--levels-container {
|
|
1280
|
+
position: relative;
|
|
1281
|
+
overflow: hidden;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
.ft-filter--levels {
|
|
1285
|
+
position: relative;
|
|
1286
|
+
overflow: hidden;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
ft-filter-level {
|
|
1290
|
+
width: 100%;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
.ft-filter--level-left {
|
|
1294
|
+
height: 0;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
slot {
|
|
1298
|
+
display: none;
|
|
1299
|
+
}
|
|
1300
|
+
`],qi([o({type:String})],oo.prototype,"id",void 0),qi([o({type:String})],oo.prototype,"label",void 0),qi([o({type:String})],oo.prototype,"filterPlaceHolder",void 0),qi([o({type:String})],oo.prototype,"clearButtonLabel",void 0),qi([o({type:String})],oo.prototype,"moreValuesButtonLabel",void 0),qi([p([])],oo.prototype,"options",void 0),qi([o({type:Boolean})],oo.prototype,"multivalued",void 0),qi([o({type:Boolean})],oo.prototype,"disabled",void 0),qi([o({type:Boolean})],oo.prototype,"raiseSelectedOptions",void 0),qi([o({type:Number})],oo.prototype,"displayedValuesLimit",void 0),qi([r(".ft-filter--slot")],oo.prototype,"slotElement",void 0),qi([r(".ft-filter--container")],oo.prototype,"container",void 0),qi([r(".ft-filter--values")],oo.prototype,"valuesContainer",void 0),qi([r(".ft-filter--levels")],oo.prototype,"levelsContainer",void 0),qi([r(".ft-filter--levels ft-filter-level:last-child")],oo.prototype,"lastLevel",void 0),qi([function(t){return n({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],oo.prototype,"levels",void 0),qi([s()],oo.prototype,"withScroll",void 0),qi([s()],oo.prototype,"filter",void 0),qi([s()],oo.prototype,"slideIn",void 0),qi([s()],oo.prototype,"slideOut",void 0);var so=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class no extends gt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return W`
|
|
1301
|
+
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1302
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}no.elementDefinitions={},so([o({type:String})],no.prototype,"label",void 0),so([o({type:Object,converter:t=>t})],no.prototype,"value",void 0),so([o({type:Boolean,reflect:!0})],no.prototype,"selected",void 0),so([o({type:Object})],no.prototype,"subOptions",void 0),so([r(".ft-filter-option--slot")],no.prototype,"slotElement",void 0),h("ft-filter")(oo),h("ft-filter-option")(no);var ro=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class lo extends gt{constructor(){super(...arguments),this.multi=!1}render(){return W`
|
|
1303
|
+
<div class="ft-accordion">
|
|
1304
|
+
<slot @activated=${this.onChange}></slot>
|
|
1305
|
+
</div>
|
|
1306
|
+
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}lo.elementDefinitions={},lo.styles=g`
|
|
1307
|
+
.ft-accordion {
|
|
1308
|
+
box-sizing: border-box;
|
|
1309
|
+
}
|
|
1310
|
+
`,ro([o({type:Boolean})],lo.prototype,"multi",void 0),ro([r("slot")],lo.prototype,"content",void 0);var ao=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const co=ut.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),ho=ut.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),po=ut.external(vt.colorOutline,"Design system");class fo extends gt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return W`
|
|
1439
1311
|
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
1440
1312
|
<div class="ft-accordion-item--toggle"
|
|
1441
1313
|
part="toggle"
|
|
@@ -1443,34 +1315,68 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1443
1315
|
@keydown=${this.onToggleKeyDown}
|
|
1444
1316
|
tabindex="0">
|
|
1445
1317
|
<ft-ripple part="toggle-ripple"></ft-ripple>
|
|
1446
|
-
${this.icon?
|
|
1447
|
-
<
|
|
1318
|
+
${this.icon?W`
|
|
1319
|
+
<ft-icon variant="material">${this.icon}</ft-icon>
|
|
1448
1320
|
`:null}
|
|
1449
|
-
${this.label?
|
|
1321
|
+
${this.label?W`
|
|
1450
1322
|
<ft-typography class="ft-accordion-item--label" variant="body1" part="label">${this.label}
|
|
1451
1323
|
</ft-typography>
|
|
1452
|
-
`:
|
|
1324
|
+
`:W`
|
|
1453
1325
|
<slot class="ft-accordion-item--label" name="toggle" part="label"></slot>
|
|
1454
1326
|
`}
|
|
1455
|
-
<
|
|
1327
|
+
<ft-icon variant="material">${this.active?"expand_less":"expand_more"}</ft-icon>
|
|
1456
1328
|
</div>
|
|
1457
1329
|
<div class="ft-accordion-item--content" part="content" @focusin=${()=>this.active=!0}>
|
|
1458
1330
|
<slot></slot>
|
|
1459
1331
|
</div>
|
|
1460
1332
|
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1461
1333
|
</div>
|
|
1462
|
-
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1334
|
+
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}fo.elementDefinitions={"ft-ripple":Qe,"ft-typography":Ke,"ft-icon":gi},fo.styles=g`
|
|
1335
|
+
.ft-accordion-item {
|
|
1336
|
+
display: flex;
|
|
1337
|
+
flex-direction: column;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
.ft-accordion-item--toggle {
|
|
1341
|
+
flex-shrink: 0;
|
|
1342
|
+
flex-grow: 0;
|
|
1343
|
+
position: relative;
|
|
1344
|
+
display: flex;
|
|
1345
|
+
align-items: center;
|
|
1346
|
+
cursor: pointer;
|
|
1347
|
+
padding: ${ho} ${co};
|
|
1348
|
+
gap: calc(${co} / 2);
|
|
1349
|
+
outline: none;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
.ft-accordion-item--label {
|
|
1353
|
+
flex-grow: 1;
|
|
1354
|
+
flex-shrink: 1;
|
|
1355
|
+
display: block;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
.ft-accordion-item--content {
|
|
1359
|
+
box-sizing: border-box;
|
|
1360
|
+
flex-shrink: 1;
|
|
1361
|
+
flex-grow: 1;
|
|
1362
|
+
overflow: hidden;
|
|
1363
|
+
height: 0;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
.ft-accordion-item--active .ft-accordion-item--content {
|
|
1367
|
+
height: initial;
|
|
1368
|
+
overflow: visible;
|
|
1369
|
+
padding: ${ho} ${co};
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
.ft-accordion-item--separator {
|
|
1373
|
+
border-bottom: 1px solid ${po};
|
|
1374
|
+
}
|
|
1375
|
+
`,ao([o({type:String})],fo.prototype,"icon",void 0),ao([o({type:String})],fo.prototype,"label",void 0),ao([o({type:Boolean,reflect:!0})],fo.prototype,"active",void 0),h("ft-accordion")(lo),h("ft-accordion-item")(fo);var uo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const bo=ut.extend("--ft-chip-color",vt.colorOnSurface),vo={backgroundColor:ut.extend("--ft-chip-background-color",vt.colorSurface),color:bo,fontSize:ut.extend("--ft-chip-font-size",me.fontSize),iconSize:ut.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:ut.extend("--ft-chip-ripple-color",bo),horizontalPadding:ut.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:ut.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:ut.external(vt.colorOutline,"Design system"),opacityDisabled:ut.external(vt.colorOpacityDisabled,"Design system")},go=ut.extend("--ft-chip-highlighted-color",ut.extend("--ft-chip-color",vt.colorOnPrimary)),xo={backgroundColor:ut.extend("--ft-chip-highlighted-background-color",ut.extend("--ft-chip-background-color",vt.colorPrimary)),color:go,rippleColor:ut.extend("--ft-chip-highlighted-ripple-color",go)},yo=ut.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),mo=ut.create("--ft-chip-dense-vertical-padding","SIZE","4px");class $o extends CustomEvent{constructor(){super("icon-click")}}class wo extends gt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}static get styles(){return[xt,g`
|
|
1471
1376
|
:host {
|
|
1472
1377
|
display: inline-block;
|
|
1473
1378
|
max-width: 100%;
|
|
1379
|
+
pointer-events: none;
|
|
1474
1380
|
}
|
|
1475
1381
|
|
|
1476
1382
|
.ft-chip {
|
|
@@ -1481,28 +1387,29 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1481
1387
|
width: 100%;
|
|
1482
1388
|
overflow: hidden;
|
|
1483
1389
|
box-sizing: border-box;
|
|
1390
|
+
pointer-events: auto;
|
|
1484
1391
|
|
|
1485
|
-
--ft-chip-internal-font-size: ${
|
|
1392
|
+
--ft-chip-internal-font-size: ${vo.fontSize};
|
|
1486
1393
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1487
|
-
|
|
1488
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1489
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1394
|
+
${bt(vi.size,vo.iconSize)};
|
|
1395
|
+
--ft-chip-internal-vertical-padding: ${vo.verticalPadding};
|
|
1396
|
+
--ft-chip-internal-horizontal-padding: ${vo.horizontalPadding};
|
|
1490
1397
|
--ft-chip-internal-icon-padding: 3px;
|
|
1491
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height),
|
|
1398
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${vo.iconSize});
|
|
1492
1399
|
|
|
1493
|
-
border: 1px solid ${
|
|
1494
|
-
color: ${
|
|
1495
|
-
${
|
|
1400
|
+
border: 1px solid ${vo.colorOutline};
|
|
1401
|
+
color: ${vo.color};
|
|
1402
|
+
${bt(Ye.color,vo.rippleColor)};
|
|
1496
1403
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
1497
1404
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
1498
|
-
background-color: ${
|
|
1405
|
+
background-color: ${vo.backgroundColor};
|
|
1499
1406
|
line-height: var(--ft-chip-internal-content-height);
|
|
1500
1407
|
}
|
|
1501
1408
|
|
|
1502
1409
|
.ft-chip--dense {
|
|
1503
1410
|
--ft-chip-internal-icon-padding: 3px;
|
|
1504
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1505
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1411
|
+
--ft-chip-internal-vertical-padding: ${mo};
|
|
1412
|
+
--ft-chip-internal-horizontal-padding: ${yo};
|
|
1506
1413
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1507
1414
|
}
|
|
1508
1415
|
|
|
@@ -1514,15 +1421,15 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1514
1421
|
cursor: default;
|
|
1515
1422
|
pointer-events: none;
|
|
1516
1423
|
filter: grayscale(1);
|
|
1517
|
-
opacity: ${
|
|
1424
|
+
opacity: ${vo.opacityDisabled};
|
|
1518
1425
|
}
|
|
1519
1426
|
|
|
1520
1427
|
.ft-chip--highlighted {
|
|
1521
1428
|
border: none;
|
|
1522
1429
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
1523
|
-
background-color: ${
|
|
1524
|
-
${
|
|
1525
|
-
color: ${
|
|
1430
|
+
background-color: ${xo.backgroundColor};
|
|
1431
|
+
${bt(Ye.color,xo.rippleColor)};
|
|
1432
|
+
color: ${xo.color};
|
|
1526
1433
|
}
|
|
1527
1434
|
|
|
1528
1435
|
.ft-chip--clickable {
|
|
@@ -1551,8 +1458,8 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1551
1458
|
vertical-align: bottom;
|
|
1552
1459
|
display: block;
|
|
1553
1460
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
1554
|
-
${
|
|
1555
|
-
${
|
|
1461
|
+
${bt(me.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
1462
|
+
${bt(me.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
1556
1463
|
}
|
|
1557
1464
|
|
|
1558
1465
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -1587,8 +1494,8 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1587
1494
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
1588
1495
|
order: -1;
|
|
1589
1496
|
}
|
|
1590
|
-
`]}
|
|
1591
|
-
<div class="${
|
|
1497
|
+
`]}render(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":kt};return W`
|
|
1498
|
+
<div class="${jt(t)}"
|
|
1592
1499
|
aria-label="${this.getLabel()}"
|
|
1593
1500
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
1594
1501
|
@keyup=${this.onKeyUp}>
|
|
@@ -1598,286 +1505,165 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1598
1505
|
</ft-typography>
|
|
1599
1506
|
${this.internalIcon?this.renderIcon():null}
|
|
1600
1507
|
</div>
|
|
1601
|
-
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return
|
|
1508
|
+
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return W`
|
|
1602
1509
|
<div class="ft-chip--icon-container ft-no-text-select ${this.interactionsOnIcon?"ft-chip--clickable":""}"
|
|
1603
1510
|
tabindex="${this.interactionsOnIcon?0:-1}"
|
|
1604
1511
|
@click=${this.onIconClick}
|
|
1605
1512
|
@keyup=${this.onIconKeyUp}>
|
|
1606
1513
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1607
|
-
<
|
|
1514
|
+
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
1608
1515
|
</div>
|
|
1609
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
inset: 0;
|
|
1613
|
-
display: flex;
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
.ft-input-label {
|
|
1617
|
-
border-color: ${po.borderColor};
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
.ft-input-label:before,
|
|
1621
|
-
.ft-input-label:after {
|
|
1622
|
-
content: "";
|
|
1623
|
-
display: flex;
|
|
1624
|
-
border-bottom-width: 1px;
|
|
1625
|
-
border-bottom-style: solid;
|
|
1626
|
-
border-color: inherit;
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
.ft-input-label:before {
|
|
1630
|
-
width: ${po.horizontalSpacing};
|
|
1631
|
-
flex-shrink: 0;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
.ft-input-label:after {
|
|
1635
|
-
flex-grow: 1;
|
|
1636
|
-
flex-shrink: 1;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
.ft-input-label--text {
|
|
1640
|
-
display: flex;
|
|
1641
|
-
flex-shrink: 1;
|
|
1642
|
-
position: relative;
|
|
1643
|
-
border-bottom-width: 1px;
|
|
1644
|
-
border-bottom-style: solid;
|
|
1645
|
-
border-color: inherit;
|
|
1646
|
-
color: ${po.textColor};
|
|
1647
|
-
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1648
|
-
${Bt(_e.fontSize,po.fontSize)};
|
|
1649
|
-
${Bt(_e.lineHeight,po.fontSize)};
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
.ft-input-label--disabled .ft-input-label--text {
|
|
1653
|
-
color: ${po.disabledTextColor};
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
.ft-input-label--hidden-text {
|
|
1657
|
-
padding: 0 4px;
|
|
1658
|
-
opacity: 0;
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
.ft-input-label--floating-text {
|
|
1662
|
-
position: absolute;
|
|
1663
|
-
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
1664
|
-
transition: top 250ms;
|
|
1665
|
-
width: calc(100% - 8px);
|
|
1666
|
-
overflow: hidden;
|
|
1667
|
-
white-space: nowrap;
|
|
1668
|
-
text-overflow: ellipsis;
|
|
1669
|
-
padding: ${po.verticalSpacing} 4px;
|
|
1670
|
-
margin: calc(${po.verticalSpacing} * -1) 0;
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
.ft-input-label--raised .ft-input-label--text {
|
|
1674
|
-
${Bt(_e.fontSize,po.raisedFontSize)};
|
|
1675
|
-
${Bt(_e.lineHeight,po.raisedFontSize)};
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1679
|
-
top: ${po.verticalSpacing};
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
.ft-input-label--outlined .ft-input-label--text,
|
|
1683
|
-
.ft-input-label--outlined:before,
|
|
1684
|
-
.ft-input-label--outlined:after {
|
|
1685
|
-
border-top-width: 1px;
|
|
1686
|
-
border-top-style: solid;
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
.ft-input-label--outlined:before {
|
|
1690
|
-
border-left-width: 1px;
|
|
1691
|
-
border-left-style: solid;
|
|
1692
|
-
border-radius: ${po.borderRadiusS} 0 0 ${po.borderRadiusS};
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
.ft-input-label--outlined:after {
|
|
1696
|
-
border-right-width: 1px;
|
|
1697
|
-
border-right-style: solid;
|
|
1698
|
-
border-radius: 0 ${po.borderRadiusS} ${po.borderRadiusS} 0;
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1702
|
-
padding: 2px 4px;
|
|
1703
|
-
z-index: ${po.raisedZIndex};
|
|
1704
|
-
background-color: ${po.colorSurface};
|
|
1705
|
-
border-radius: ${po.borderRadiusS};
|
|
1706
|
-
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1710
|
-
border-top: none;
|
|
1711
|
-
}
|
|
1712
|
-
`]}getTemplate(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return A`
|
|
1713
|
-
<div class="${Ot(t)}">
|
|
1714
|
-
${this.text?A`
|
|
1516
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new $o))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new $o))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}wo.elementDefinitions={"ft-ripple":Qe,"ft-typography":Ke,"ft-icon":gi},uo([o({type:Boolean})],wo.prototype,"highlighted",void 0),uo([o({type:Boolean})],wo.prototype,"removable",void 0),uo([o({type:Boolean})],wo.prototype,"disabled",void 0),uo([o({type:Boolean})],wo.prototype,"clickable",void 0),uo([o({type:Boolean})],wo.prototype,"iconClickable",void 0),uo([o({type:Boolean})],wo.prototype,"dense",void 0),uo([o({type:Boolean})],wo.prototype,"multiLine",void 0),uo([o({type:String})],wo.prototype,"label",void 0),uo([o({type:String})],wo.prototype,"icon",void 0),uo([o({type:Boolean})],wo.prototype,"trailingIcon",void 0),uo([r("ft-typography slot")],wo.prototype,"slottedContent",void 0),h("ft-chip")(wo);var ko=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const So={fontSize:ut.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:ut.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:ut.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:ut.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:ut.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:ut.extend("--ft-input-label-border-color",vt.colorOutline),textColor:ut.extend("--ft-input-label-text-color",vt.colorOnSurfaceMedium),disabledTextColor:ut.extend("--ft-input-label-disabled-text-color",vt.colorOnSurfaceDisabled),colorSurface:ut.external(vt.colorSurface,"Design system"),borderRadiusS:ut.external(vt.borderRadiusS,"Design system")};class Oo extends gt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return W`
|
|
1517
|
+
<div class="${jt(t)}">
|
|
1518
|
+
${this.text?W`
|
|
1715
1519
|
<div class="ft-input-label--text ft-typography--caption">
|
|
1716
1520
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
1717
1521
|
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
1718
1522
|
</div>
|
|
1719
1523
|
`:null}
|
|
1720
1524
|
</div>
|
|
1721
|
-
`}}
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
display: flex;
|
|
1728
|
-
flex-direction: column;
|
|
1729
|
-
align-items: stretch;
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
|
-
.ft-select--main-panel {
|
|
1733
|
-
position: relative;
|
|
1734
|
-
display: flex;
|
|
1735
|
-
height: calc(4 * ${bo.verticalSpacing} + ${bo.labelSize} + ${bo.selectedOptionSize});
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1738
|
-
.ft-select--input-panel {
|
|
1739
|
-
flex-grow: 1;
|
|
1740
|
-
position: relative;
|
|
1741
|
-
display: flex;
|
|
1742
|
-
align-items: center;
|
|
1743
|
-
overflow: hidden;
|
|
1744
|
-
padding-left: 16px;
|
|
1745
|
-
padding-right: 8px;
|
|
1746
|
-
gap: 8px;
|
|
1747
|
-
color: ${bo.selectedOptionColor};
|
|
1748
|
-
${Bt(Bi.color,bo.selectedOptionColor)};
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
.ft-select--input-panel,
|
|
1752
|
-
.ft-select--option {
|
|
1753
|
-
${Bt(Bi.opacityContentOnSurfaceHover,"0.08")};
|
|
1754
|
-
${Bt(Bi.opacityContentOnSurfaceDragged,"0.04")};
|
|
1755
|
-
}
|
|
1525
|
+
`}}Oo.elementDefinitions={},Oo.styles=[Pe,g`
|
|
1526
|
+
.ft-input-label {
|
|
1527
|
+
position: absolute;
|
|
1528
|
+
inset: 0;
|
|
1529
|
+
display: flex;
|
|
1530
|
+
}
|
|
1756
1531
|
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
}
|
|
1532
|
+
.ft-input-label {
|
|
1533
|
+
border-color: ${So.borderColor};
|
|
1534
|
+
}
|
|
1761
1535
|
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1536
|
+
.ft-input-label:before,
|
|
1537
|
+
.ft-input-label:after {
|
|
1538
|
+
content: "";
|
|
1539
|
+
display: flex;
|
|
1540
|
+
border-bottom-width: 1px;
|
|
1541
|
+
border-bottom-style: solid;
|
|
1542
|
+
border-color: inherit;
|
|
1543
|
+
}
|
|
1766
1544
|
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
}
|
|
1545
|
+
.ft-input-label:before {
|
|
1546
|
+
width: ${So.horizontalSpacing};
|
|
1547
|
+
flex-shrink: 0;
|
|
1548
|
+
}
|
|
1772
1549
|
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1550
|
+
.ft-input-label:after {
|
|
1551
|
+
flex-grow: 1;
|
|
1552
|
+
flex-shrink: 1;
|
|
1553
|
+
}
|
|
1776
1554
|
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1555
|
+
.ft-input-label--text {
|
|
1556
|
+
display: flex;
|
|
1557
|
+
flex-shrink: 1;
|
|
1558
|
+
position: relative;
|
|
1559
|
+
border-bottom-width: 1px;
|
|
1560
|
+
border-bottom-style: solid;
|
|
1561
|
+
border-color: inherit;
|
|
1562
|
+
color: ${So.textColor};
|
|
1563
|
+
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1564
|
+
${bt($e.fontSize,So.fontSize)};
|
|
1565
|
+
${bt($e.lineHeight,So.fontSize)};
|
|
1566
|
+
}
|
|
1781
1567
|
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
flex-shrink: 1;
|
|
1786
|
-
overflow: hidden;
|
|
1787
|
-
white-space: nowrap;
|
|
1788
|
-
text-overflow: ellipsis;
|
|
1789
|
-
${Bt(we.fontSize,bo.selectedOptionSize)};
|
|
1790
|
-
${Bt(we.lineHeight,bo.selectedOptionSize)};
|
|
1791
|
-
}
|
|
1568
|
+
.ft-input-label--disabled .ft-input-label--text {
|
|
1569
|
+
color: ${So.disabledTextColor};
|
|
1570
|
+
}
|
|
1792
1571
|
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1572
|
+
.ft-input-label--hidden-text {
|
|
1573
|
+
padding: 0 4px;
|
|
1574
|
+
opacity: 0;
|
|
1575
|
+
}
|
|
1796
1576
|
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1577
|
+
.ft-input-label--floating-text {
|
|
1578
|
+
position: absolute;
|
|
1579
|
+
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
1580
|
+
transition: top 250ms;
|
|
1581
|
+
width: calc(100% - 8px);
|
|
1582
|
+
overflow: hidden;
|
|
1583
|
+
white-space: nowrap;
|
|
1584
|
+
text-overflow: ellipsis;
|
|
1585
|
+
padding: ${So.verticalSpacing} 4px;
|
|
1586
|
+
margin: calc(${So.verticalSpacing} * -1) 0;
|
|
1587
|
+
}
|
|
1800
1588
|
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
}
|
|
1589
|
+
.ft-input-label--raised .ft-input-label--text {
|
|
1590
|
+
${bt($e.fontSize,So.raisedFontSize)};
|
|
1591
|
+
${bt($e.lineHeight,So.raisedFontSize)};
|
|
1592
|
+
}
|
|
1804
1593
|
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
}
|
|
1594
|
+
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1595
|
+
top: ${So.verticalSpacing};
|
|
1596
|
+
}
|
|
1809
1597
|
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1598
|
+
.ft-input-label--outlined .ft-input-label--text,
|
|
1599
|
+
.ft-input-label--outlined:before,
|
|
1600
|
+
.ft-input-label--outlined:after {
|
|
1601
|
+
border-top-width: 1px;
|
|
1602
|
+
border-top-style: solid;
|
|
1603
|
+
}
|
|
1813
1604
|
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
right: 0;
|
|
1820
|
-
color: ${bo.optionsColor};
|
|
1821
|
-
background: ${bo.colorSurface};
|
|
1822
|
-
z-index: ${bo.optionsZIndex};
|
|
1823
|
-
box-shadow: ${bo.elevation02};
|
|
1824
|
-
}
|
|
1605
|
+
.ft-input-label--outlined:before {
|
|
1606
|
+
border-left-width: 1px;
|
|
1607
|
+
border-left-style: solid;
|
|
1608
|
+
border-radius: ${So.borderRadiusS} 0 0 ${So.borderRadiusS};
|
|
1609
|
+
}
|
|
1825
1610
|
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1611
|
+
.ft-input-label--outlined:after {
|
|
1612
|
+
border-right-width: 1px;
|
|
1613
|
+
border-right-style: solid;
|
|
1614
|
+
border-radius: 0 ${So.borderRadiusS} ${So.borderRadiusS} 0;
|
|
1615
|
+
}
|
|
1829
1616
|
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1617
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1618
|
+
padding: 2px 4px;
|
|
1619
|
+
z-index: ${So.raisedZIndex};
|
|
1620
|
+
background-color: ${So.colorSurface};
|
|
1621
|
+
border-radius: ${So.borderRadiusS};
|
|
1622
|
+
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1623
|
+
}
|
|
1837
1624
|
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
<div class="${Ot(s)}" part="container">
|
|
1625
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1626
|
+
border-top: none;
|
|
1627
|
+
}
|
|
1628
|
+
`],ko([o({type:String})],Oo.prototype,"text",void 0),ko([o({type:Boolean})],Oo.prototype,"raised",void 0),ko([o({type:Boolean})],Oo.prototype,"outlined",void 0),ko([o({type:Boolean})],Oo.prototype,"disabled",void 0),h("ft-input-label")(Oo);var Co=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class zo extends gt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return W``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}zo.elementDefinitions={},Co([o({type:String})],zo.prototype,"label",void 0),Co([o({type:Object,converter:t=>t})],zo.prototype,"value",void 0),Co([o({type:Boolean,reflect:!0})],zo.prototype,"selected",void 0);const Eo={labelSize:ut.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:ut.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:ut.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:ut.extend("--ft-select-selected-option-color",vt.colorOnSurface),helperColor:ut.extend("--ft-select-helper-color",vt.colorOnSurfaceMedium),optionsColor:ut.extend("--ft-select-options-color",vt.colorOnSurface),optionsZIndex:ut.create("--ft-select-options-z-index","NUMBER","2"),colorSurface:ut.external(vt.colorSurface,"Design system"),colorOnSurfaceDisabled:ut.external(vt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ut.external(vt.colorPrimary,"Design system"),borderRadiusS:ut.external(vt.borderRadiusS,"Design system"),elevation02:ut.external(vt.elevation02,"Design system")};class Bo extends gt{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,i,o,s;let n=!this.disabled&&this.optionsDisplayed&&this.hasOptions,r=this.disabled||!this.hasOptions;const l=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(i=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==i?i:"").length>0,a={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":r,"ft-select--options-displayed":n,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label};return W`
|
|
1629
|
+
<div class="${jt(a)}" part="container">
|
|
1844
1630
|
<div class="ft-select--main-panel" part="main-panel">
|
|
1845
1631
|
<ft-input-label text="${this.label}"
|
|
1846
1632
|
part="label"
|
|
1847
|
-
?disabled=${
|
|
1633
|
+
?disabled=${r}
|
|
1848
1634
|
?outlined=${this.outlined}
|
|
1849
|
-
?raised=${
|
|
1635
|
+
?raised=${l||n}
|
|
1850
1636
|
></ft-input-label>
|
|
1851
1637
|
<div class="ft-select--input-panel"
|
|
1852
1638
|
part="selected-value"
|
|
1853
|
-
tabindex="${
|
|
1639
|
+
tabindex="${r?"-1":"0"}"
|
|
1854
1640
|
@click=${()=>{this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=this.optionsDisplayed}}
|
|
1855
1641
|
@keydown=${this.onMainPanelKeyDown}
|
|
1856
1642
|
aria-label="${this.label}"
|
|
1857
1643
|
aria-haspopup="listbox"
|
|
1858
1644
|
aria-expanded="${n}">
|
|
1859
|
-
<ft-ripple ?disabled=${
|
|
1645
|
+
<ft-ripple ?disabled=${r} ?activated=${!this.outlined}></ft-ripple>
|
|
1860
1646
|
<ft-typography variant="body1" class="ft-select--selected-option">
|
|
1861
|
-
${null!==(
|
|
1647
|
+
${null!==(s=null===(o=this.selectedOption)||void 0===o?void 0:o.label)&&void 0!==s?s:""}
|
|
1862
1648
|
</ft-typography>
|
|
1863
|
-
<
|
|
1649
|
+
<ft-icon variant="material">${n?"expand_less":"expand_more"}</ft-icon>
|
|
1864
1650
|
</div>
|
|
1865
1651
|
<div class="ft-select--options"
|
|
1866
1652
|
part="options"
|
|
1867
1653
|
@keydown=${this.onOptionsKeyDown}
|
|
1868
1654
|
innerrole="listbox">
|
|
1869
|
-
${
|
|
1655
|
+
${Dt(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
1870
1656
|
</div>
|
|
1871
1657
|
</div>
|
|
1872
|
-
${this.helper?
|
|
1658
|
+
${this.helper?W`
|
|
1873
1659
|
<ft-typography class="ft-select--helper-text" variant="caption">${this.helper}
|
|
1874
1660
|
</ft-typography>`:void 0}
|
|
1875
1661
|
</div>
|
|
1876
1662
|
<slot @slotchange=${this.updateOptionsFromSlot}
|
|
1877
1663
|
@option-change=${this.updateOptionsFromSlot}
|
|
1878
1664
|
></slot>
|
|
1879
|
-
`}renderOption(t){let e=this.selectedOption===t;return
|
|
1880
|
-
<div class="${
|
|
1665
|
+
`}renderOption(t){let e=this.selectedOption===t;return W`
|
|
1666
|
+
<div class="${jt({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
|
|
1881
1667
|
part="option"
|
|
1882
1668
|
tabindex="0"
|
|
1883
1669
|
@keydown=${e=>this.onOptionKeyDown(e,t)}
|
|
@@ -1885,7 +1671,128 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1885
1671
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1886
1672
|
${t.label}
|
|
1887
1673
|
</div>
|
|
1888
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,
|
|
1674
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let r;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),r=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Bo.elementDefinitions={"ft-input-label":Oo,"ft-typography":Ke,"ft-ripple":Qe,"ft-icon":gi},Bo.styles=[Ae,Pe,g`
|
|
1675
|
+
*:focus {
|
|
1676
|
+
outline: none;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
.ft-select {
|
|
1680
|
+
display: flex;
|
|
1681
|
+
flex-direction: column;
|
|
1682
|
+
align-items: stretch;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
.ft-select--main-panel {
|
|
1686
|
+
position: relative;
|
|
1687
|
+
display: flex;
|
|
1688
|
+
height: calc(4 * ${Eo.verticalSpacing} + ${Eo.labelSize} + ${Eo.selectedOptionSize});
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
.ft-select--input-panel {
|
|
1692
|
+
flex-grow: 1;
|
|
1693
|
+
position: relative;
|
|
1694
|
+
display: flex;
|
|
1695
|
+
align-items: center;
|
|
1696
|
+
overflow: hidden;
|
|
1697
|
+
padding-left: 16px;
|
|
1698
|
+
padding-right: 8px;
|
|
1699
|
+
gap: 8px;
|
|
1700
|
+
color: ${Eo.selectedOptionColor};
|
|
1701
|
+
${bt(Ye.color,Eo.selectedOptionColor)};
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
.ft-select--input-panel,
|
|
1705
|
+
.ft-select--option {
|
|
1706
|
+
${bt(Ye.opacityContentOnSurfaceHover,"0.08")};
|
|
1707
|
+
${bt(Ye.opacityContentOnSurfacePressed,"0.04")};
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
.ft-select--disabled .ft-select--input-panel,
|
|
1711
|
+
.ft-select--disabled .ft-select--option {
|
|
1712
|
+
color: ${Eo.colorOnSurfaceDisabled};
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
1716
|
+
.ft-select:not(.ft-select--disabled) .ft-select--option {
|
|
1717
|
+
cursor: pointer;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
ft-input-label {
|
|
1721
|
+
${bt(So.fontSize,Eo.selectedOptionSize)};
|
|
1722
|
+
${bt(So.raisedFontSize,Eo.labelSize)};
|
|
1723
|
+
${bt(So.verticalSpacing,Eo.verticalSpacing)};
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
1727
|
+
color: ${Eo.colorPrimary};
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
1731
|
+
${bt(So.borderColor,Eo.colorPrimary)};
|
|
1732
|
+
${bt(So.textColor,Eo.colorPrimary)};
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
.ft-select--selected-option {
|
|
1736
|
+
display: block;
|
|
1737
|
+
flex-grow: 1;
|
|
1738
|
+
flex-shrink: 1;
|
|
1739
|
+
overflow: hidden;
|
|
1740
|
+
white-space: nowrap;
|
|
1741
|
+
text-overflow: ellipsis;
|
|
1742
|
+
${bt(ye.fontSize,Eo.selectedOptionSize)};
|
|
1743
|
+
${bt(ye.lineHeight,Eo.selectedOptionSize)};
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
ft-icon {
|
|
1747
|
+
flex-shrink: 0;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
slot {
|
|
1751
|
+
display: none;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
.ft-select--filled .ft-select--input-panel {
|
|
1755
|
+
border-radius: ${Eo.borderRadiusS} ${Eo.borderRadiusS} 0 0;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
1759
|
+
align-self: stretch;
|
|
1760
|
+
padding-top: calc(${Eo.labelSize} + 2 * ${Eo.verticalSpacing});
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
.ft-select--outlined .ft-select--input-panel {
|
|
1764
|
+
border-radius: ${Eo.borderRadiusS};
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
.ft-select--options {
|
|
1768
|
+
display: none;
|
|
1769
|
+
position: absolute;
|
|
1770
|
+
top: 100%;
|
|
1771
|
+
left: 0;
|
|
1772
|
+
right: 0;
|
|
1773
|
+
color: ${Eo.optionsColor};
|
|
1774
|
+
background: ${Eo.colorSurface};
|
|
1775
|
+
z-index: ${Eo.optionsZIndex};
|
|
1776
|
+
box-shadow: ${Eo.elevation02};
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
.ft-select--options-displayed .ft-select--options {
|
|
1780
|
+
display: block;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
.ft-select--option {
|
|
1784
|
+
position: relative;
|
|
1785
|
+
padding: 4px 16px;
|
|
1786
|
+
min-height: 32px;
|
|
1787
|
+
display: flex;
|
|
1788
|
+
align-items: center;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
.ft-select--helper-text {
|
|
1792
|
+
padding: 0 12px 0 16px;
|
|
1793
|
+
color: ${Eo.helperColor};
|
|
1794
|
+
}
|
|
1795
|
+
`],Co([o({type:String})],Bo.prototype,"label",void 0),Co([o({type:String})],Bo.prototype,"helper",void 0),Co([o({type:Boolean})],Bo.prototype,"outlined",void 0),Co([o({type:Boolean})],Bo.prototype,"disabled",void 0),Co([o({type:Array})],Bo.prototype,"options",void 0),Co([s()],Bo.prototype,"selectedOption",void 0),Co([s()],Bo.prototype,"optionsDisplayed",void 0),Co([s()],Bo.prototype,"focusOptions",void 0),Co([r(".ft-select")],Bo.prototype,"container",void 0),Co([r(".ft-select--input-panel")],Bo.prototype,"mainPanel",void 0),Co([r(".ft-select--option:first-child")],Bo.prototype,"firstOption",void 0),Co([r(".ft-select--option:focus")],Bo.prototype,"focusedOption",void 0),Co([r(".ft-select--option.ft-select--option-selected")],Bo.prototype,"selectedOptionElement",void 0),Co([r(".ft-select--option:last-child")],Bo.prototype,"lastOption",void 0),Co([r("slot")],Bo.prototype,"optionsSlot",void 0),h("ft-select")(Bo),h("ft-select-option")(zo);const No={height:ut.create("--ft-search-bar-height","SIZE","38px"),borderRadius:ut.extend("--ft-search-bar-border-radius",vt.borderRadiusS),mobileOpenPosition:ut.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:ut.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:ut.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:ut.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:ut.create("--ft-search-bar-mobile-open-right","SIZE","0"),floatingZIndex:ut.create("--ft-search-bar-floating-components-z-index","NUMBER","2"),colorSurface:ut.external(vt.colorSurface,"Design system"),colorOnSurface:ut.external(vt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ut.external(vt.colorOnSurfaceMedium,"Design system"),colorOutline:ut.external(vt.colorOutline,"Design system"),colorPrimary:ut.external(vt.colorPrimary,"Design system"),elevation02:ut.external(vt.elevation02,"Design system"),buttonColor:ut.external(mi.color,"Button"),buttonRippleColor:ut.external(mi.rippleColor,"Button")},Fo=g`
|
|
1889
1796
|
* {
|
|
1890
1797
|
box-sizing: border-box;
|
|
1891
1798
|
}
|
|
@@ -1894,7 +1801,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1894
1801
|
display: flex;
|
|
1895
1802
|
flex-direction: column;
|
|
1896
1803
|
gap: 8px;
|
|
1897
|
-
color: ${
|
|
1804
|
+
color: ${No.colorOnSurface};
|
|
1898
1805
|
outline: none;
|
|
1899
1806
|
}
|
|
1900
1807
|
|
|
@@ -1903,14 +1810,14 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1903
1810
|
}
|
|
1904
1811
|
|
|
1905
1812
|
.ft-search-bar--mobile-menu-open {
|
|
1906
|
-
position: ${
|
|
1907
|
-
top: ${
|
|
1908
|
-
bottom: ${
|
|
1909
|
-
left: ${
|
|
1910
|
-
right: ${
|
|
1911
|
-
z-index: ${
|
|
1813
|
+
position: ${No.mobileOpenPosition};
|
|
1814
|
+
top: ${No.mobileOpenTop};
|
|
1815
|
+
bottom: ${No.mobileOpenBottom};
|
|
1816
|
+
left: ${No.mobileOpenLeft};
|
|
1817
|
+
right: ${No.mobileOpenRight};
|
|
1818
|
+
z-index: ${No.floatingZIndex};
|
|
1912
1819
|
padding: 16px;
|
|
1913
|
-
background: ${
|
|
1820
|
+
background: ${No.colorSurface};
|
|
1914
1821
|
}
|
|
1915
1822
|
|
|
1916
1823
|
.ft-search-bar {
|
|
@@ -1918,15 +1825,15 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1918
1825
|
display: flex;
|
|
1919
1826
|
flex-direction: row;
|
|
1920
1827
|
align-items: center;
|
|
1921
|
-
height: ${
|
|
1828
|
+
height: ${No.height};
|
|
1922
1829
|
|
|
1923
|
-
background: ${
|
|
1924
|
-
border: 1px solid ${
|
|
1925
|
-
border-radius: ${
|
|
1830
|
+
background: ${No.colorSurface};
|
|
1831
|
+
border: 1px solid ${No.colorOutline};
|
|
1832
|
+
border-radius: ${No.borderRadius};
|
|
1926
1833
|
}
|
|
1927
1834
|
|
|
1928
1835
|
.ft-search-bar--floating-panel-open .ft-search-bar {
|
|
1929
|
-
border-radius: ${
|
|
1836
|
+
border-radius: ${No.borderRadius} ${No.borderRadius} 0 0;
|
|
1930
1837
|
}
|
|
1931
1838
|
|
|
1932
1839
|
.ft-search-bar--input-container {
|
|
@@ -1944,7 +1851,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1944
1851
|
align-self: stretch;
|
|
1945
1852
|
display: grid;
|
|
1946
1853
|
padding: 0 8px;
|
|
1947
|
-
border-radius: ${
|
|
1854
|
+
border-radius: ${No.borderRadius};
|
|
1948
1855
|
}
|
|
1949
1856
|
|
|
1950
1857
|
.ft-search-bar--dense .ft-search-bar--input-outline {
|
|
@@ -1953,7 +1860,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1953
1860
|
}
|
|
1954
1861
|
|
|
1955
1862
|
.ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
|
|
1956
|
-
outline: 2px solid ${
|
|
1863
|
+
outline: 2px solid ${No.colorPrimary};
|
|
1957
1864
|
}
|
|
1958
1865
|
|
|
1959
1866
|
.ft-search-bar--input {
|
|
@@ -1974,8 +1881,8 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1974
1881
|
}
|
|
1975
1882
|
|
|
1976
1883
|
.ft-search-bar--left-action {
|
|
1977
|
-
${
|
|
1978
|
-
border-right: 1px solid ${
|
|
1884
|
+
${bt(mi.borderRadius,g`calc(${No.borderRadius} - 1px) 0 0 calc(${No.borderRadius} - 1px)`)};
|
|
1885
|
+
border-right: 1px solid ${No.colorOutline};
|
|
1979
1886
|
height: 100%;
|
|
1980
1887
|
}
|
|
1981
1888
|
|
|
@@ -1984,7 +1891,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1984
1891
|
}
|
|
1985
1892
|
|
|
1986
1893
|
.ft-search-bar--floating-panel-open .ft-search-bar--left-action {
|
|
1987
|
-
${
|
|
1894
|
+
${bt(mi.borderRadius,g`calc(${No.borderRadius} - 1px) 0 0 0`)};
|
|
1988
1895
|
}
|
|
1989
1896
|
|
|
1990
1897
|
.ft-search-bar .ft-search-bar--launch-search,
|
|
@@ -1994,13 +1901,13 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
1994
1901
|
|
|
1995
1902
|
.ft-search-bar--separator {
|
|
1996
1903
|
height: 20px;
|
|
1997
|
-
border-right: 1px solid ${
|
|
1904
|
+
border-right: 1px solid ${No.colorOutline};
|
|
1998
1905
|
}
|
|
1999
1906
|
|
|
2000
1907
|
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
2001
|
-
${
|
|
2002
|
-
${
|
|
2003
|
-
${
|
|
1908
|
+
${bt(So.borderColor,"transparent")};
|
|
1909
|
+
${bt(So.borderRadiusS,g`calc(${No.borderRadius} - 1px)`)};
|
|
1910
|
+
${bt(Eo.selectedOptionColor,No.buttonColor)};
|
|
2004
1911
|
}
|
|
2005
1912
|
|
|
2006
1913
|
.ft-search-bar--left-action.ft-search-bar--content-locale,
|
|
@@ -2017,17 +1924,17 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2017
1924
|
}
|
|
2018
1925
|
|
|
2019
1926
|
.ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
|
|
2020
|
-
border-radius: calc(${
|
|
1927
|
+
border-radius: calc(${No.borderRadius} - 1px) 0 0 calc(${No.borderRadius} - 1px);
|
|
2021
1928
|
}
|
|
2022
1929
|
|
|
2023
|
-
`,
|
|
1930
|
+
`,Ro=g`
|
|
2024
1931
|
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
2025
1932
|
margin-right: auto;
|
|
2026
1933
|
}
|
|
2027
1934
|
|
|
2028
1935
|
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
2029
1936
|
min-width: 250px;
|
|
2030
|
-
${
|
|
1937
|
+
${bt(Eo.optionsZIndex,"2")};
|
|
2031
1938
|
}
|
|
2032
1939
|
|
|
2033
1940
|
.ft-search-bar--floating-panel {
|
|
@@ -2119,7 +2026,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2119
2026
|
|
|
2120
2027
|
.ft-search-bar--filter-label > :last-child {
|
|
2121
2028
|
flex-shrink: 1;
|
|
2122
|
-
color: ${
|
|
2029
|
+
color: ${No.colorOnSurfaceMedium};
|
|
2123
2030
|
}
|
|
2124
2031
|
|
|
2125
2032
|
ft-accordion-item::part(toggle) {
|
|
@@ -2139,7 +2046,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2139
2046
|
.ft-search-bar--floating-panel .ft-search-bar--launch-search {
|
|
2140
2047
|
margin: 0;
|
|
2141
2048
|
}
|
|
2142
|
-
`,
|
|
2049
|
+
`,Mo=g`
|
|
2143
2050
|
.ft-search-bar--selected-filters:not(ft-snap-scroll) {
|
|
2144
2051
|
flex-shrink: 0;
|
|
2145
2052
|
display: flex;
|
|
@@ -2150,7 +2057,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2150
2057
|
|
|
2151
2058
|
ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2152
2059
|
overflow: hidden;
|
|
2153
|
-
${
|
|
2060
|
+
${bt(Ki.gap,"4px")};
|
|
2154
2061
|
}
|
|
2155
2062
|
|
|
2156
2063
|
ft-snap-scroll.ft-search-bar--selected-filters::part(content) {
|
|
@@ -2158,8 +2065,8 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2158
2065
|
}
|
|
2159
2066
|
|
|
2160
2067
|
.ft-search-bar--desktop ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2161
|
-
${
|
|
2162
|
-
${
|
|
2068
|
+
${bt(vo.iconSize,"17px")};
|
|
2069
|
+
${bt(vo.fontSize,"12px")};
|
|
2163
2070
|
}
|
|
2164
2071
|
|
|
2165
2072
|
.ft-search-bar--selected-filters * {
|
|
@@ -2169,7 +2076,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2169
2076
|
.ft-search-bar--selected-filters ft-chip {
|
|
2170
2077
|
flex-grow: 0;
|
|
2171
2078
|
}
|
|
2172
|
-
`,
|
|
2079
|
+
`,Lo=g`
|
|
2173
2080
|
.ft-search-bar--mobile .ft-search-bar--suggestions {
|
|
2174
2081
|
flex-grow: 1;
|
|
2175
2082
|
flex-shrink: 1;
|
|
@@ -2178,7 +2085,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2178
2085
|
}
|
|
2179
2086
|
|
|
2180
2087
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2181
|
-
border-top: 1px solid ${
|
|
2088
|
+
border-top: 1px solid ${No.colorOutline};
|
|
2182
2089
|
}
|
|
2183
2090
|
|
|
2184
2091
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
@@ -2193,10 +2100,10 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2193
2100
|
left: -1px;
|
|
2194
2101
|
right: -1px;
|
|
2195
2102
|
display: none;
|
|
2196
|
-
background: ${
|
|
2197
|
-
border: 1px solid ${
|
|
2198
|
-
border-radius: 0 0 ${
|
|
2199
|
-
box-shadow: ${
|
|
2103
|
+
background: ${No.colorSurface};
|
|
2104
|
+
border: 1px solid ${No.colorOutline};
|
|
2105
|
+
border-radius: 0 0 ${No.borderRadius} ${No.borderRadius};
|
|
2106
|
+
box-shadow: ${No.elevation02};
|
|
2200
2107
|
outline: none;
|
|
2201
2108
|
}
|
|
2202
2109
|
|
|
@@ -2211,7 +2118,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2211
2118
|
.ft-search-bar--no-suggestions {
|
|
2212
2119
|
text-align: center;
|
|
2213
2120
|
padding: 8px;
|
|
2214
|
-
color: ${
|
|
2121
|
+
color: ${No.colorOnSurface};
|
|
2215
2122
|
}
|
|
2216
2123
|
|
|
2217
2124
|
.ft-search-bar--suggestion {
|
|
@@ -2222,7 +2129,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2222
2129
|
padding: 8px;
|
|
2223
2130
|
gap: 8px;
|
|
2224
2131
|
cursor: pointer;
|
|
2225
|
-
color: ${
|
|
2132
|
+
color: ${No.colorOnSurface};
|
|
2226
2133
|
min-height: 52px;
|
|
2227
2134
|
}
|
|
2228
2135
|
|
|
@@ -2235,7 +2142,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2235
2142
|
}
|
|
2236
2143
|
|
|
2237
2144
|
.ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
|
|
2238
|
-
border-top: 1px solid ${
|
|
2145
|
+
border-top: 1px solid ${No.colorOutline};
|
|
2239
2146
|
}
|
|
2240
2147
|
|
|
2241
2148
|
.ft-search-bar--suggestion ft-typography {
|
|
@@ -2243,12 +2150,12 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2243
2150
|
flex-grow: 1;
|
|
2244
2151
|
flex-shrink: 1;
|
|
2245
2152
|
}
|
|
2246
|
-
`;var
|
|
2153
|
+
`;var Do=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const jo={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",searchButton:"Search",noSuggestions:"No results found…",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Preset",removeRecentSearch:"Remove",back:"Back"};class Io extends CustomEvent{constructor(t){super("launch-search",{detail:t})}}class Uo extends CustomEvent{constructor(t){super("change",{detail:t})}}class To extends gt{constructor(){super(...arguments),this.dense=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.labels={},this.labelResolver=new yt(jo,{}),this.displayedFilters=[],this.presets=[],this.searchRequestSerializer=t=>function(t,e){var i;const o=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");o.append("filters",t)}return new URL(`${t}/search/all?${o.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=It.S,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.knownFacetLabels={},this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new e(500),this.suggestDebouncer=new e(300),this.facetsLoaded=!1,this.closeFloatingContainer=t=>{this.isMobile||(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))},this.compareFilters=(t,e)=>t.key===e.key&&t.negative==e.negative&&t.values.length===e.values.length&&t.values.every((t=>e.values.includes(t))),this.compareRequests=(t,e)=>(null==t.contentLocale||null==e.contentLocale||t.contentLocale===e.contentLocale)&&t.filters.length===e.filters.length&&t.filters.every((t=>e.filters.some((e=>this.compareFilters(t,e)))))}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>!this.displayedFilters.includes(t.key))).map((t=>({id:t.key})));return[...this.displayedFilters.map((t=>({id:t}))),...t]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}get isMobile(){return this.sizeCategory===It.S}get hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets.length>0}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":!this.isMobile&&this.dense,"ft-search-bar--mobile":this.isMobile,"ft-search-bar--desktop":!this.isMobile,"ft-search-bar--floating-panel-open":!this.isMobile&&this.displayFacets,"ft-search-bar--mobile-menu-open":this.mobileMenuOpen};return W`
|
|
2247
2154
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2248
|
-
<div class="${
|
|
2155
|
+
<div class="${jt(t)}" part="container" tabindex="-1">
|
|
2249
2156
|
${this.isMobile?this.renderMobileSearchBar():this.renderDesktopSearchBar()}
|
|
2250
2157
|
</div>
|
|
2251
|
-
`}renderMobileSearchBar(){return
|
|
2158
|
+
`}renderMobileSearchBar(){return W`
|
|
2252
2159
|
<div class="ft-search-bar">
|
|
2253
2160
|
<div class="ft-search-bar--input-container" part="input-container">
|
|
2254
2161
|
<div class="ft-search-bar--input-outline" part="input-outline">
|
|
@@ -2265,15 +2172,15 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2265
2172
|
</div>
|
|
2266
2173
|
${this.displayFacets?this.renderFacetsActions():this.renderSelectedFacets()}
|
|
2267
2174
|
${this.displayFacets?this.renderMobileFacets():this.renderSuggestions()}
|
|
2268
|
-
${this.mobileMenuOpen||this.displayFacets?
|
|
2175
|
+
${this.mobileMenuOpen||this.displayFacets?W`
|
|
2269
2176
|
<ft-button class="ft-search-bar--launch-search"
|
|
2270
2177
|
part="search-bar-actions"
|
|
2271
2178
|
icon="search"
|
|
2272
2179
|
@click=${this.launchSearch}>
|
|
2273
2180
|
${this.labelResolver.resolve("searchButton")}
|
|
2274
2181
|
</ft-button>
|
|
2275
|
-
`:
|
|
2276
|
-
`}renderMobileSearchBarButtons(){return this.query||this.mobileMenuOpen?
|
|
2182
|
+
`:q}
|
|
2183
|
+
`}renderMobileSearchBarButtons(){return this.query||this.mobileMenuOpen?W`
|
|
2277
2184
|
<ft-button class="ft-search-bar--clear-query"
|
|
2278
2185
|
part="search-bar-actions"
|
|
2279
2186
|
icon="close"
|
|
@@ -2281,7 +2188,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2281
2188
|
label="${this.labelResolver.resolve("clearInputButton")}"
|
|
2282
2189
|
@click=${()=>{this.setQuery(""),this.mobileMenuOpen=!1,this.displayFacets=!1}}
|
|
2283
2190
|
></ft-button>
|
|
2284
|
-
`:
|
|
2191
|
+
`:W`
|
|
2285
2192
|
<ft-button class="ft-search-bar--launch-search"
|
|
2286
2193
|
part="search-bar-actions"
|
|
2287
2194
|
icon="search"
|
|
@@ -2289,9 +2196,9 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2289
2196
|
label="${this.labelResolver.resolve("searchButton")}"
|
|
2290
2197
|
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}
|
|
2291
2198
|
></ft-button>
|
|
2292
|
-
`}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop();return
|
|
2199
|
+
`}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop();return W`
|
|
2293
2200
|
<ft-accordion class="ft-search-bar--filters-container">
|
|
2294
|
-
${this.hasLocaleSelector?
|
|
2201
|
+
${this.hasLocaleSelector?W`
|
|
2295
2202
|
<ft-accordion-item data-facet-key="ft:contentLocale">
|
|
2296
2203
|
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2297
2204
|
<ft-typography variant="button">${this.labelResolver.resolve("contentLocaleSelector")}
|
|
@@ -2309,12 +2216,12 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2309
2216
|
></ft-filter>
|
|
2310
2217
|
</ft-accordion-item>
|
|
2311
2218
|
`:null}
|
|
2312
|
-
${
|
|
2219
|
+
${Dt(this.facets,(t=>t.key),(t=>{const e=Je(t);return W`
|
|
2313
2220
|
<ft-accordion-item data-facet-key="${t.key}">
|
|
2314
2221
|
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2315
2222
|
<ft-typography variant="button">${t.label}</ft-typography>
|
|
2316
2223
|
<ft-typography variant="body2">
|
|
2317
|
-
${function(t){return
|
|
2224
|
+
${function(t){return We(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}
|
|
2318
2225
|
</ft-typography>
|
|
2319
2226
|
</div>
|
|
2320
2227
|
<ft-filter
|
|
@@ -2332,12 +2239,12 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2332
2239
|
</ft-accordion-item>
|
|
2333
2240
|
`}))}
|
|
2334
2241
|
</ft-accordion>
|
|
2335
|
-
`}contentLocalesAsFilterOptions(){return this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale})))}renderDesktopSearchBar(){return
|
|
2242
|
+
`}contentLocalesAsFilterOptions(){return this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale})))}renderDesktopSearchBar(){return W`
|
|
2336
2243
|
<div class="ft-search-bar" part="search-bar">
|
|
2337
2244
|
${this.renderSearchBarLeftAction()}
|
|
2338
2245
|
<div class="ft-search-bar--input-container" part="input-container">
|
|
2339
2246
|
<div class="ft-search-bar--input-outline" part="input-outline">
|
|
2340
|
-
${this.dense?this.renderSelectedFacets():
|
|
2247
|
+
${this.dense?this.renderSelectedFacets():q}
|
|
2341
2248
|
<input class="ft-search-bar--input ft-typography--body2"
|
|
2342
2249
|
part="input"
|
|
2343
2250
|
type="text"
|
|
@@ -2362,8 +2269,8 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2362
2269
|
</div>
|
|
2363
2270
|
</div>
|
|
2364
2271
|
</div>
|
|
2365
|
-
${this.dense?
|
|
2366
|
-
`}renderSearchBarLeftAction(){return this.hasFacets?
|
|
2272
|
+
${this.dense?q:this.renderSelectedFacets()}
|
|
2273
|
+
`}renderSearchBarLeftAction(){return this.hasFacets?W`
|
|
2367
2274
|
<ft-button class="ft-search-bar--filters-opener ft-search-bar--left-action"
|
|
2368
2275
|
part="filters-opener"
|
|
2369
2276
|
trailingIcon
|
|
@@ -2372,20 +2279,20 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2372
2279
|
@focusin=${t=>t.stopPropagation()}>
|
|
2373
2280
|
${this.labelResolver.resolve("filtersButton")}
|
|
2374
2281
|
</ft-button>
|
|
2375
|
-
`:this.hasLocaleSelector?
|
|
2282
|
+
`:this.hasLocaleSelector?W`
|
|
2376
2283
|
<ft-select outlined
|
|
2377
2284
|
class="ft-search-bar--content-locale ft-search-bar--left-action"
|
|
2378
2285
|
part="content-locale"
|
|
2379
2286
|
@change=${t=>this.contentLocale=null==t.detail?void 0:t.detail}>
|
|
2380
|
-
${
|
|
2287
|
+
${Dt(this.availableContentLocales,(t=>t.lang),(t=>W`
|
|
2381
2288
|
<ft-select-option .value=${t.lang}
|
|
2382
2289
|
label="${t.label}"
|
|
2383
2290
|
?selected=${t.lang===this.contentLocale}>
|
|
2384
2291
|
</ft-select-option>
|
|
2385
2292
|
`))}
|
|
2386
2293
|
</ft-select>
|
|
2387
|
-
`:
|
|
2388
|
-
${this.query?
|
|
2294
|
+
`:q}renderDesktopSearchBarButtons(){return W`
|
|
2295
|
+
${this.query?W`
|
|
2389
2296
|
<ft-button class="ft-search-bar--clear-query"
|
|
2390
2297
|
part="search-bar-actions"
|
|
2391
2298
|
icon="close"
|
|
@@ -2402,36 +2309,36 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2402
2309
|
label="${this.labelResolver.resolve("searchButton")}"
|
|
2403
2310
|
@click=${this.launchSearch}
|
|
2404
2311
|
></ft-button>
|
|
2405
|
-
`}renderFacetsActions(){return
|
|
2312
|
+
`}renderFacetsActions(){return W`
|
|
2406
2313
|
<div class="ft-search-bar--facets-actions">
|
|
2407
|
-
${this.hasPresets?
|
|
2314
|
+
${this.hasPresets?W`
|
|
2408
2315
|
<ft-select
|
|
2409
2316
|
class="ft-search-bar--presets"
|
|
2410
2317
|
part="presets"
|
|
2411
2318
|
label="${this.labelResolver.resolve("presetsSelector")}"
|
|
2412
2319
|
outlined
|
|
2413
2320
|
@change=${t=>this.selectedPreset=t.detail}>
|
|
2414
|
-
${
|
|
2321
|
+
${Dt(this.presets,(t=>t.name),(t=>W`
|
|
2415
2322
|
<ft-select-option value="${t.name}"
|
|
2416
2323
|
label="${t.name}"
|
|
2417
2324
|
?selected=${t.name===this.selectedPreset}>
|
|
2418
2325
|
</ft-select-option>
|
|
2419
2326
|
`))}
|
|
2420
2327
|
</ft-select>
|
|
2421
|
-
`:
|
|
2422
|
-
${this.searchFilters.length>0?
|
|
2328
|
+
`:q}
|
|
2329
|
+
${this.searchFilters.length>0?W`
|
|
2423
2330
|
<ft-button part="facets-actions"
|
|
2424
2331
|
@click=${this.clearFilters}>
|
|
2425
2332
|
${this.labelResolver.resolve("clearFilters")}
|
|
2426
2333
|
</ft-button>
|
|
2427
|
-
`:
|
|
2334
|
+
`:q}
|
|
2428
2335
|
<slot name="facets-actions"></slot>
|
|
2429
2336
|
</div>
|
|
2430
|
-
`}renderDesktopFacets(){return this.hasFacets?
|
|
2337
|
+
`}renderDesktopFacets(){return this.hasFacets?W`
|
|
2431
2338
|
<ft-snap-scroll horizontal limitSize controls
|
|
2432
2339
|
class="ft-search-bar--filters-container"
|
|
2433
2340
|
part="filters-container">
|
|
2434
|
-
${this.hasLocaleSelector?
|
|
2341
|
+
${this.hasLocaleSelector?W`
|
|
2435
2342
|
<ft-filter part="filters"
|
|
2436
2343
|
class="ft-search-bar--content-locale"
|
|
2437
2344
|
label="${this.labelResolver.resolve("contentLocaleSelector")}"
|
|
@@ -2439,8 +2346,8 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2439
2346
|
.options=${this.contentLocalesAsFilterOptions()}
|
|
2440
2347
|
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2441
2348
|
></ft-filter>
|
|
2442
|
-
`:
|
|
2443
|
-
${
|
|
2349
|
+
`:q}
|
|
2350
|
+
${Dt(this.facets,(t=>t.key),(t=>{const e=Je(t),i=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0}));return W`
|
|
2444
2351
|
<ft-filter
|
|
2445
2352
|
class="${i?"ft-search-bar--hierarchical-filter":""}"
|
|
2446
2353
|
part="filters"
|
|
@@ -2457,8 +2364,8 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2457
2364
|
></ft-filter>
|
|
2458
2365
|
`}))}
|
|
2459
2366
|
</ft-snap-scroll>
|
|
2460
|
-
`:
|
|
2461
|
-
${this.hasLocaleSelector&&(this.hasFacets||this.isMobile)?
|
|
2367
|
+
`:q}renderSelectedFacets(){if(!this.hasLocaleSelector&&!this.hasFacets)return null;const t=!this.isMobile&&this.dense||this.isMobile&&this.mobileMenuOpen,e=W`
|
|
2368
|
+
${this.hasLocaleSelector&&(this.hasFacets||this.isMobile)?W`
|
|
2462
2369
|
<ft-chip part="selected-filters"
|
|
2463
2370
|
?dense=${this.dense&&!this.isMobile}
|
|
2464
2371
|
?clickable=${this.isMobile}
|
|
@@ -2466,53 +2373,53 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2466
2373
|
${this.getLocaleLabel(this.contentLocale)}
|
|
2467
2374
|
</ft-chip>
|
|
2468
2375
|
`:null}
|
|
2469
|
-
${
|
|
2376
|
+
${Dt(this.facets,(t=>t.key),(e=>{const i=function(t){return We(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(e);return Dt(i,(o=>{let s=e.label+": "+function(t){return Ve(t).split("|").join(" > ")}(o);const n=W`
|
|
2470
2377
|
<ft-chip
|
|
2471
2378
|
part="selected-filters"
|
|
2472
2379
|
?dense=${this.dense&&!this.isMobile}
|
|
2473
2380
|
?clickable=${this.isMobile}
|
|
2474
2381
|
?removable=${!this.isMobile}
|
|
2475
|
-
icon=${this.isMobile?
|
|
2476
|
-
label="${
|
|
2477
|
-
title=${t?
|
|
2382
|
+
icon=${this.isMobile?q:"close"}
|
|
2383
|
+
label="${s}"
|
|
2384
|
+
title=${t?s:q}
|
|
2478
2385
|
@click=${()=>this.openMobileFilters(e.key)}
|
|
2479
|
-
@icon-click=${()=>this.setFilter(e.key,i.filter((t=>t!==
|
|
2480
|
-
${function(t){return
|
|
2386
|
+
@icon-click=${()=>this.setFilter(e.key,i.filter((t=>t!==o)))}>
|
|
2387
|
+
${function(t){return Ve(t).split("|").pop()}(o)}
|
|
2481
2388
|
</ft-chip>
|
|
2482
|
-
`;return t?n:
|
|
2483
|
-
<ft-tooltip inline text="${
|
|
2389
|
+
`;return t?n:W`
|
|
2390
|
+
<ft-tooltip inline text="${s}">
|
|
2484
2391
|
${n}
|
|
2485
2392
|
</ft-tooltip>
|
|
2486
2393
|
`}))}))}
|
|
2487
|
-
${this.isMobile?
|
|
2394
|
+
${this.isMobile?W`
|
|
2488
2395
|
<ft-chip part="selected-filters"
|
|
2489
2396
|
icon="add"
|
|
2490
2397
|
clickable
|
|
2491
2398
|
@click=${()=>{this.mobileMenuOpen=!0,this.displayFacets=!0}}>
|
|
2492
2399
|
${this.labelResolver.resolve("filtersButton")}
|
|
2493
2400
|
</ft-chip>
|
|
2494
|
-
`:
|
|
2495
|
-
`;return t?
|
|
2401
|
+
`:q}
|
|
2402
|
+
`;return t?W`
|
|
2496
2403
|
<ft-snap-scroll horizontal controls hideScrollbar limitSize
|
|
2497
2404
|
class="ft-search-bar--selected-filters"
|
|
2498
2405
|
part="selected-filters-container">
|
|
2499
2406
|
${e}
|
|
2500
2407
|
</ft-snap-scroll>
|
|
2501
|
-
`:
|
|
2408
|
+
`:W`
|
|
2502
2409
|
<div class="ft-search-bar--selected-filters" part="selected-filters-container">
|
|
2503
2410
|
${e}
|
|
2504
2411
|
</div>
|
|
2505
|
-
`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.query.length>2||t.length>0;return
|
|
2412
|
+
`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.query.length>2||t.length>0;return W`
|
|
2506
2413
|
<div class="ft-search-bar--suggestions ${e?"ft-search-bar--suggestions-not-empty":""}"
|
|
2507
2414
|
@keydown=${this.onSuggestKeyDown}>
|
|
2508
|
-
${
|
|
2415
|
+
${Dt(t.slice(0,5),(t=>t),(t=>W`
|
|
2509
2416
|
<a href="${this.searchRequestSerializer({...this.request,query:t})}"
|
|
2510
2417
|
part="suggestions"
|
|
2511
2418
|
class="ft-search-bar--suggestion ft-search-bar--recent-search"
|
|
2512
2419
|
@keyup=${e=>this.onSuggestKeyUp(e,t)}
|
|
2513
2420
|
@click=${e=>this.onSuggestClick(e,t)}>
|
|
2514
2421
|
<ft-ripple></ft-ripple>
|
|
2515
|
-
<
|
|
2422
|
+
<ft-icon variant="material" part="suggestion-icon">history</ft-icon>
|
|
2516
2423
|
<ft-typography variant="body1">${t}</ft-typography>
|
|
2517
2424
|
<ft-button icon="close"
|
|
2518
2425
|
round
|
|
@@ -2522,7 +2429,7 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2522
2429
|
@click=${e=>this.removeRecentSearch(e,t)}></ft-button>
|
|
2523
2430
|
</a>
|
|
2524
2431
|
`))}
|
|
2525
|
-
${
|
|
2432
|
+
${Dt(this.suggestions,(t=>t.value),(t=>W`
|
|
2526
2433
|
<a href="${this.searchRequestSerializer({...this.request,query:t.value})}"
|
|
2527
2434
|
part="suggestions"
|
|
2528
2435
|
class="ft-search-bar--suggestion"
|
|
@@ -2533,15 +2440,15 @@ class Nr extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
2533
2440
|
<ft-typography variant="body1">${t.value}</ft-typography>
|
|
2534
2441
|
</a>
|
|
2535
2442
|
`))}
|
|
2536
|
-
${0===t.length&&0===this.suggestions.length&&this.query.length>2&&this.suggestionsLoaded?
|
|
2443
|
+
${0===t.length&&0===this.suggestions.length&&this.query.length>2&&this.suggestionsLoaded?W`
|
|
2537
2444
|
<ft-typography class="ft-search-bar--no-suggestions" element="p"
|
|
2538
2445
|
variant="body2">
|
|
2539
2446
|
${this.labelResolver.resolve("noSuggestions")}
|
|
2540
2447
|
</ft-typography>
|
|
2541
2448
|
`:null}
|
|
2542
2449
|
</div>
|
|
2543
|
-
`}getIcon(t){const e="DOCUMENT"===t.type?
|
|
2450
|
+
`}getIcon(t){const e="DOCUMENT"===t.type?ui.file_format:ui.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?hi.BOOK:hi.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,o,s,n;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[r,l]=((null!==(i=fi.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(n=null!==(s=null!==(o=di.get(l))&&void 0!==o?o:di.get(e))&&void 0!==s?s:di.get(r))&&void 0!==n?n:pi.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=hi.TOPICS}return W`
|
|
2544
2451
|
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2545
2452
|
${i}
|
|
2546
2453
|
</ft-icon>
|
|
2547
|
-
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var e,i,
|
|
2454
|
+
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var e,i,o;if(t.has("labels")&&(this.labelResolver=new yt(jo,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const i=t=>this.availableContentLocales.some((e=>e.lang===t));i(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&i(t.get("contentLocale"))?t.get("contentLocale"):null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),t.has("selectedPreset")){const t=this.presets.find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(o=this.presets.find((t=>this.compareRequests(t,this.request))))||void 0===o?void 0:o.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&this.setApi(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new Uo(this.request))}contentAvailableCallback(t){var e,i,o;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.setApi(),setTimeout((()=>this.initApi()),100))}setApi(){this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t,e;this.facets=null!==(e=await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets)).catch((()=>[]))))&&void 0!==e?e:[],this.facets.forEach((t=>this.knownFacetLabels[t.key]=t.label)),this.facetsLoaded=!0}))):this.facets=[]}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new Io(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&We(i.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=e.includes(t.value)))})),e.length&&i.push({key:t,negative:!1,values:e}),this.searchFilters=i,this.scrollToFacet=t}setFiltersFromPreset(t){null!=t&&(null!=t.contentLocale&&(this.contentLocale=t.contentLocale),this.searchFilters=t.filters)}clearFilters(){this.facets.forEach((t=>We(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}removeRecentSearch(t,e){var i,o,s,n;t.preventDefault(),t.stopPropagation();const r=null!==(n=null!==(o=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.input;null==r||r.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}}To.elementDefinitions={"ft-accordion":lo,"ft-accordion-item":fo,"ft-button":Si,"ft-chip":wo,"ft-filter":oo,"ft-filter-option":no,"ft-icon":gi,"ft-ripple":Qe,"ft-select":Bo,"ft-select-option":zo,"ft-size-watcher":At,"ft-snap-scroll":Vi,"ft-tooltip":ni,"ft-typography":Ke},To.styles=[Ae,Fo,Ro,Mo,Lo],Do([o({type:Boolean})],To.prototype,"dense",void 0),Do([o({type:String})],To.prototype,"baseUrl",void 0),Do([o({type:String})],To.prototype,"apiIntegrationIdentifier",void 0),Do([o({type:String})],To.prototype,"contentLocale",void 0),Do([s()],To.prototype,"availableContentLocales",void 0),Do([o({type:String})],To.prototype,"uiLocale",void 0),Do([p({})],To.prototype,"labels",void 0),Do([p([])],To.prototype,"displayedFilters",void 0),Do([p([])],To.prototype,"presets",void 0),Do([o({type:String,reflect:!0})],To.prototype,"selectedPreset",void 0),Do([o()],To.prototype,"searchRequestSerializer",void 0),Do([s()],To.prototype,"searchFilters",void 0),Do([s()],To.prototype,"sizeCategory",void 0),Do([s()],To.prototype,"displayFacets",void 0),Do([s()],To.prototype,"mobileMenuOpen",void 0),Do([s()],To.prototype,"facets",void 0),Do([r(".ft-search-bar--container")],To.prototype,"container",void 0),Do([r(".ft-search-bar--filters-opener")],To.prototype,"filtersOpener",void 0),Do([r(".ft-search-bar--floating-panel")],To.prototype,"floatingContainer",void 0),Do([r("ft-snap-scroll.ft-search-bar--filters-container")],To.prototype,"scrollingFiltersContainer",void 0),Do([r(".ft-search-bar--input")],To.prototype,"input",void 0),Do([s()],To.prototype,"query",void 0),Do([s()],To.prototype,"suggestions",void 0),Do([s()],To.prototype,"suggestionsLoaded",void 0),Do([s()],To.prototype,"recentSearches",void 0),Do([s()],To.prototype,"scrollToFacet",void 0),Do([r(".ft-search-bar--suggestion:first-child")],To.prototype,"firstSuggestion",void 0),Do([r(".ft-search-bar--suggestion:focus-within")],To.prototype,"focusedSuggestion",void 0),Do([r(".ft-search-bar--suggestion:last-child")],To.prototype,"lastSuggestion",void 0),Do([s()],To.prototype,"api",void 0),h("ft-search-bar")(To),t.DEFAULT_LABELS=jo,t.FtSearchBar=To,t.FtSearchBarCssVariables=No,t.LaunchSearchEvent=Io,t.SearchStateChangeEvent=Uo,Object.defineProperty(t,"t",{value:!0})}({});
|