@fluid-topics/ft-filter 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-filter-level.d.ts +3 -2
- package/build/ft-filter-level.js +97 -125
- package/build/ft-filter-option.d.ts +1 -1
- package/build/ft-filter-option.js +4 -8
- package/build/ft-filter.d.ts +2 -3
- package/build/ft-filter.inline-styles.js +1284 -0
- package/build/ft-filter.js +114 -121
- package/build/ft-filter.light.js +774 -821
- package/build/ft-filter.min.js +828 -882
- package/build/index.d.ts +3 -0
- package/build/index.js +8 -0
- package/build/inline-styles.d.ts +2 -0
- package/build/inline-styles.js +6 -0
- package/package.json +12 -13
|
@@ -0,0 +1,1284 @@
|
|
|
1
|
+
!function(){
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
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
|
|
16
|
+
*/
|
|
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 h={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,h),this._definitionsByClass.set(s,h);let c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(r.set(s,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)n.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){b.push(this),o.upgrade.apply(o,arguments),b.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 h=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!h(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(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=c(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)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const x=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),b.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const y=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){b.push(this),i.set.call(this,t),b.pop()}})};if(y(Element,"innerHTML"),y(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(hi){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 t{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=[]}}
|
|
18
|
+
/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2017 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/const e=(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 i(t){return(i,o)=>void 0!==o?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,i,o):e(t,i)
|
|
23
|
+
/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2017 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/}function o(t){return i({...t,state:!0})}
|
|
28
|
+
/**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright 2017 Google LLC
|
|
31
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
+
*/const s=({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)}}
|
|
33
|
+
/**
|
|
34
|
+
* @license
|
|
35
|
+
* Copyright 2017 Google LLC
|
|
36
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
+
*/;function n(t,e){return s({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}})}
|
|
38
|
+
/**
|
|
39
|
+
* @license
|
|
40
|
+
* Copyright 2017 Google LLC
|
|
41
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* @license
|
|
45
|
+
* Copyright 2021 Google LLC
|
|
46
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
+
*/
|
|
48
|
+
var r;const l=null!=(null===(r=window.HTMLSlotElement)||void 0===r?void 0:r.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function a(t){const{slot:e,selector:i}=null!=t?t:{};return s({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?l(n,t):[];return i?r.filter((t=>t.matches(i))):r},enumerable:!0,configurable:!0})})}
|
|
49
|
+
/**
|
|
50
|
+
* @license
|
|
51
|
+
* Copyright 2017 Google LLC
|
|
52
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
+
*/const h=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};
|
|
54
|
+
/**
|
|
55
|
+
* @license
|
|
56
|
+
* Copyright 2019 Google LLC
|
|
57
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
|
+
*/
|
|
59
|
+
const c=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,p=Symbol(),d=new Map;class f{constructor(t,e){if(this._$cssResult$=!0,e!==p)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=d.get(this.cssText);return c&&void 0===t&&(d.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const u=t=>new f("string"==typeof t?t:t+"",p),v=(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 f(i,p)},b=(t,e)=>{c?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)}))},x=c?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return u(e)})(t):t
|
|
60
|
+
/**
|
|
61
|
+
* @license
|
|
62
|
+
* Copyright 2017 Google LLC
|
|
63
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
|
+
*/;var y;const g=window.trustedTypes,m=g?g.emptyScript:"",$=window.reactiveElementPolyfillSupport,w={toAttribute(t,e){switch(e){case Boolean:t=t?m: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}},k=(t,e)=>e!==t&&(e==e||t==t),O={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:k};class S 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=O){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)||O}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(x(t))}else void 0!==t&&e.push(x(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 b(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=O){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:w.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:w.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||k)(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){}}
|
|
65
|
+
/**
|
|
66
|
+
* @license
|
|
67
|
+
* Copyright 2017 Google LLC
|
|
68
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
69
|
+
*/
|
|
70
|
+
var C;S.finalized=!0,S.elementProperties=new Map,S.elementStyles=[],S.shadowRootOptions={mode:"open"},null==$||$({ReactiveElement:S}),(null!==(y=globalThis.reactiveElementVersions)&&void 0!==y?y:globalThis.reactiveElementVersions=[]).push("1.2.2");const E=globalThis.trustedTypes,N=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,z=`lit$${(Math.random()+"").slice(9)}$`,R="?"+z,M=`<${R}>`,B=document,F=(t="")=>B.createComment(t),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,U=Array.isArray,D=t=>{var e;return U(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,A=/>/g,_=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,P=/'/g,I=/"/g,H=/^(?:script|style|textarea|title)$/i,W=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),K=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),Z=new WeakMap,J=B.createTreeWalker(B,129,null,!1),q=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=L;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(r.lastIndex=c,a=r.exec(i),null!==a);)c=r.lastIndex,r===L?"!--"===a[1]?r=T:void 0!==a[1]?r=A:void 0!==a[2]?(H.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=_):void 0!==a[3]&&(r=_):r===_?">"===a[0]?(r=null!=s?s:L,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?_:'"'===a[3]?I:P):r===I||r===P?r=_:r===T||r===A?r=L:(r=_,s=void 0);const p=r===_&&t[e+1].startsWith("/>")?" ":"";n+=r===L?i+M:h>=0?(o.push(l),i.slice(0,h)+"$lit$"+i.slice(h)+z+p):i+z+(-2===h?(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 X{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,h]=q(t,e);if(this.el=X.createElement(a,i),J.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=J.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(z)){const i=h[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(z),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?et:"?"===e[1]?ot:"@"===e[1]?st:tt})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(H.test(o.tagName)){const t=o.textContent.split(z),e=t.length-1;if(e>0){o.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],F()),J.nextNode(),l.push({type:2,index:++s});o.append(t[e],F())}}}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(z,t+1));)l.push({type:7,index:s}),t+=z.length-1}s++}}static createElement(t,e){const i=B.createElement("template");return i.innerHTML=t,i}}function Y(t,e,i=t,o){var s,n,r,l;if(e===K)return e;let a=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const h=j(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(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=Y(t,a._$AS(t,e.values),a,o)),e}class G{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:B).importNode(i,!0);J.currentNode=s;let n=J.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new Q(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new nt(n,this,t)),this.v.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=J.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 Q{constructor(t,e,i,o){var s;this.type=2,this._$AH=V,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=Y(this,t,e),j(t)?t===V||null==t||""===t?(this._$AH!==V&&this._$AR(),this._$AH=V):t!==this._$AH&&t!==K&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):D(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!==V&&j(this._$AH)?this._$AA.nextSibling.data=t:this.S(B.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=X.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 G(s,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=Z.get(t.strings);return void 0===e&&Z.set(t.strings,e=new X(t)),e}A(t){U(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 Q(this.M(F()),this.M(F()),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 tt{constructor(t,e,i,o,s){this.type=1,this._$AH=V,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=V}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=Y(this,t,e,0),n=!j(t)||t!==this._$AH&&t!==K,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=Y(this,o[i+r],e,r),l===K&&(l=this._$AH[r]),n||(n=!j(l)||l!==this._$AH[r]),l===V?t=V:t!==V&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.k(t)}k(t){t===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class et extends tt{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===V?void 0:t}}const it=E?E.emptyScript:"";class ot extends tt{constructor(){super(...arguments),this.type=4}k(t){t&&t!==V?this.element.setAttribute(this.name,it):this.element.removeAttribute(this.name)}}class st extends tt{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=Y(this,t,e,0))&&void 0!==i?i:V)===K)return;const o=this._$AH,s=t===V&&o!==V||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==V&&(o===V||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 nt{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){Y(this,t)}}const rt={P:"$lit$",V:z,L:R,I:1,N:q,R:G,D,j:Y,H:Q,O:tt,F:ot,B:st,W:et,Z:nt},lt=window.litHtmlPolyfillSupport;
|
|
71
|
+
/**
|
|
72
|
+
* @license
|
|
73
|
+
* Copyright 2017 Google LLC
|
|
74
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
75
|
+
*/
|
|
76
|
+
var at,ht;null==lt||lt(X,Q),(null!==(C=globalThis.litHtmlVersions)&&void 0!==C?C:globalThis.litHtmlVersions=[]).push("2.1.3");class ct extends S{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 Q(e.insertBefore(F(),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 K}}ct.finalized=!0,ct._$litElement$=!0,null===(at=globalThis.litElementHydrateSupport)||void 0===at||at.call(globalThis,{LitElement:ct});const pt=globalThis.litElementPolyfillSupport;null==pt||pt({LitElement:ct}),(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.1.2");class dt{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 dt(t,e,void 0,i)}static extend(t,e,i){return new dt(t,e.category,e,i)}static external(t,e){return new dt(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return v`var(${u(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):u(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 ft(t,e){return u(`${t.name}: ${e}`)}const ut={colorPrimary:dt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:dt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:dt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:dt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:dt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:dt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:dt.create("--ft-color-error","COLOR","#B00020"),colorOutline:dt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:dt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:dt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:dt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:dt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:dt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:dt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:dt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:dt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:dt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:dt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:dt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:dt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:dt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:dt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:dt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:dt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:dt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:dt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:dt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:dt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:dt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:dt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:dt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:dt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:dt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:dt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:dt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:dt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:dt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:dt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:dt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:dt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:dt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:dt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:dt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:dt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:dt.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:dt.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:dt.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:dt.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:dt.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:dt.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:dt.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:dt.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:dt.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:dt.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:dt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:dt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:dt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:dt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:dt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:dt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:dt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:dt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
77
|
+
/**
|
|
78
|
+
* @license
|
|
79
|
+
* Copyright 2021 Google LLC
|
|
80
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
81
|
+
*/class vt 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 b(s,this.constructor.elementStyles),s}}}(ct)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),W`
|
|
82
|
+
${t.map((t=>W`
|
|
83
|
+
<style>${t}</style>
|
|
84
|
+
`))}
|
|
85
|
+
${this.getTemplate()}
|
|
86
|
+
`}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const bt=v`
|
|
87
|
+
.ft-no-text-select {
|
|
88
|
+
-webkit-touch-callout: none;
|
|
89
|
+
-webkit-user-select: none;
|
|
90
|
+
-khtml-user-select: none;
|
|
91
|
+
-moz-user-select: none;
|
|
92
|
+
-ms-user-select: none;
|
|
93
|
+
user-select: none;
|
|
94
|
+
}
|
|
95
|
+
`;function xt(t){var e;let i;if("elementDefinitions"in t){i={};const e=t.elementDefinitions;for(let t in e)i[t]=xt(e[t])}return e=class extends t{constructor(...t){super(t),this._constructor=this.constructor}render(){var e;let i=null!==(e=t.styles)&&void 0!==e?e:[];return Array.isArray(i)||(i=[i]),W`
|
|
96
|
+
${i.map((t=>W`
|
|
97
|
+
<style>${t}</style>
|
|
98
|
+
`))}
|
|
99
|
+
${super.render()}
|
|
100
|
+
`}},e.styles=void 0,e.elementDefinitions=i,e}var yt,gt,mt;const $t=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(mt=null===(gt=null===(yt=window.safari)||void 0===yt?void 0:yt.pushNotification)||void 0===gt?void 0:gt.toString())&&void 0!==mt?mt:""),wt=t=>({_$litStatic$:t}),kt=new Map,Ot=(t=>(e,...i)=>{var o;const s=i.length;let n,r;const l=[],a=[];let h,c=0,p=!1;for(;c<s;){for(h=e[c];c<s&&void 0!==(r=i[c],n=null===(o=r)||void 0===o?void 0:o._$litStatic$);)h+=n+e[++c],p=!0;a.push(r),l.push(h),c++}if(c===s&&l.push(e[s]),p){const t=l.join("$$lit$$");void 0===(e=kt.get(t))&&(l.raw=l,kt.set(t,e=l)),i=a}return t(e,...i)})(W);
|
|
101
|
+
/**
|
|
102
|
+
* @license
|
|
103
|
+
* Copyright 2020 Google LLC
|
|
104
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
105
|
+
*/var St,Ct=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"}(St||(St={}));const Et=dt.extend("--ft-typography-font-family",ut.titleFont),Nt=dt.extend("--ft-typography-font-family",ut.contentFont),zt={fontFamily:Nt,fontSize:dt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:dt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:dt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:dt.create("--ft-typography-line-height","SIZE","24px"),textTransform:dt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Rt=dt.extend("--ft-typography-title-font-family",Et),Mt=dt.extend("--ft-typography-title-font-size",zt.fontSize,"20px"),Bt=dt.extend("--ft-typography-title-font-weight",zt.fontWeight,"normal"),Ft=dt.extend("--ft-typography-title-letter-spacing",zt.letterSpacing,"0.15px"),jt=dt.extend("--ft-typography-title-line-height",zt.lineHeight,"24px"),Ut=dt.extend("--ft-typography-title-text-transform",zt.textTransform,"inherit"),Dt=dt.extend("--ft-typography-title-dense-font-family",Et),Lt=dt.extend("--ft-typography-title-dense-font-size",zt.fontSize,"14px"),Tt=dt.extend("--ft-typography-title-dense-font-weight",zt.fontWeight,"normal"),At=dt.extend("--ft-typography-title-dense-letter-spacing",zt.letterSpacing,"0.105px"),_t=dt.extend("--ft-typography-title-dense-line-height",zt.lineHeight,"24px"),Pt=dt.extend("--ft-typography-title-dense-text-transform",zt.textTransform,"inherit"),It=dt.extend("--ft-typography-subtitle1-font-family",Nt),Ht=dt.extend("--ft-typography-subtitle1-font-size",zt.fontSize,"16px"),Wt=dt.extend("--ft-typography-subtitle1-font-weight",zt.fontWeight,"600"),Kt=dt.extend("--ft-typography-subtitle1-letter-spacing",zt.letterSpacing,"0.144px"),Vt=dt.extend("--ft-typography-subtitle1-line-height",zt.lineHeight,"24px"),Zt=dt.extend("--ft-typography-subtitle1-text-transform",zt.textTransform,"inherit"),Jt=dt.extend("--ft-typography-subtitle2-font-family",Nt),qt=dt.extend("--ft-typography-subtitle2-font-size",zt.fontSize,"14px"),Xt=dt.extend("--ft-typography-subtitle2-font-weight",zt.fontWeight,"normal"),Yt=dt.extend("--ft-typography-subtitle2-letter-spacing",zt.letterSpacing,"0.098px"),Gt=dt.extend("--ft-typography-subtitle2-line-height",zt.lineHeight,"24px"),Qt=dt.extend("--ft-typography-subtitle2-text-transform",zt.textTransform,"inherit"),te=dt.extend("--ft-typography-body1-font-family",Nt),ee=dt.extend("--ft-typography-body1-font-size",zt.fontSize,"16px"),ie=dt.extend("--ft-typography-body1-font-weight",zt.fontWeight,"normal"),oe=dt.extend("--ft-typography-body1-letter-spacing",zt.letterSpacing,"0.496px"),se=dt.extend("--ft-typography-body1-line-height",zt.lineHeight,"24px"),ne=dt.extend("--ft-typography-body1-text-transform",zt.textTransform,"inherit"),re={fontFamily:dt.extend("--ft-typography-body2-font-family",Nt),fontSize:dt.extend("--ft-typography-body2-font-size",zt.fontSize,"14px"),fontWeight:dt.extend("--ft-typography-body2-font-weight",zt.fontWeight,"normal"),letterSpacing:dt.extend("--ft-typography-body2-letter-spacing",zt.letterSpacing,"0.252px"),lineHeight:dt.extend("--ft-typography-body2-line-height",zt.lineHeight,"20px"),textTransform:dt.extend("--ft-typography-body2-text-transform",zt.textTransform,"inherit")},le=dt.extend("--ft-typography-caption-font-family",Nt),ae=dt.extend("--ft-typography-caption-font-size",zt.fontSize,"12px"),he=dt.extend("--ft-typography-caption-font-weight",zt.fontWeight,"normal"),ce=dt.extend("--ft-typography-caption-letter-spacing",zt.letterSpacing,"0.396px"),pe=dt.extend("--ft-typography-caption-line-height",zt.lineHeight,"16px"),de=dt.extend("--ft-typography-caption-text-transform",zt.textTransform,"inherit"),fe=dt.extend("--ft-typography-breadcrumb-font-family",Nt),ue=dt.extend("--ft-typography-breadcrumb-font-size",zt.fontSize,"10px"),ve=dt.extend("--ft-typography-breadcrumb-font-weight",zt.fontWeight,"normal"),be=dt.extend("--ft-typography-breadcrumb-letter-spacing",zt.letterSpacing,"0.33px"),xe=dt.extend("--ft-typography-breadcrumb-line-height",zt.lineHeight,"16px"),ye=dt.extend("--ft-typography-breadcrumb-text-transform",zt.textTransform,"inherit"),ge=dt.extend("--ft-typography-overline-font-family",Nt),me=dt.extend("--ft-typography-overline-font-size",zt.fontSize,"10px"),$e=dt.extend("--ft-typography-overline-font-weight",zt.fontWeight,"normal"),we=dt.extend("--ft-typography-overline-letter-spacing",zt.letterSpacing,"1.5px"),ke=dt.extend("--ft-typography-overline-line-height",zt.lineHeight,"16px"),Oe=dt.extend("--ft-typography-overline-text-transform",zt.textTransform,"uppercase"),Se={fontFamily:dt.extend("--ft-typography-button-font-family",Nt),fontSize:dt.extend("--ft-typography-button-font-size",zt.fontSize,"14px"),fontWeight:dt.extend("--ft-typography-button-font-weight",zt.fontWeight,"600"),letterSpacing:dt.extend("--ft-typography-button-letter-spacing",zt.letterSpacing,"1.246px"),lineHeight:dt.extend("--ft-typography-button-line-height",zt.lineHeight,"16px"),textTransform:dt.extend("--ft-typography-button-text-transform",zt.textTransform,"uppercase")},Ce=v`
|
|
106
|
+
.ft-typography--title {
|
|
107
|
+
font-family: ${Rt};
|
|
108
|
+
font-size: ${Mt};
|
|
109
|
+
font-weight: ${Bt};
|
|
110
|
+
letter-spacing: ${Ft};
|
|
111
|
+
line-height: ${jt};
|
|
112
|
+
text-transform: ${Ut};
|
|
113
|
+
}
|
|
114
|
+
`,Ee=v`
|
|
115
|
+
.ft-typography--title-dense {
|
|
116
|
+
font-family: ${Dt};
|
|
117
|
+
font-size: ${Lt};
|
|
118
|
+
font-weight: ${Tt};
|
|
119
|
+
letter-spacing: ${At};
|
|
120
|
+
line-height: ${_t};
|
|
121
|
+
text-transform: ${Pt};
|
|
122
|
+
}
|
|
123
|
+
`,Ne=v`
|
|
124
|
+
.ft-typography--subtitle1 {
|
|
125
|
+
font-family: ${It};
|
|
126
|
+
font-size: ${Ht};
|
|
127
|
+
font-weight: ${Wt};
|
|
128
|
+
letter-spacing: ${Kt};
|
|
129
|
+
line-height: ${Vt};
|
|
130
|
+
text-transform: ${Zt};
|
|
131
|
+
}
|
|
132
|
+
`,ze=v`
|
|
133
|
+
.ft-typography--subtitle2 {
|
|
134
|
+
font-family: ${Jt};
|
|
135
|
+
font-size: ${qt};
|
|
136
|
+
font-weight: ${Xt};
|
|
137
|
+
letter-spacing: ${Yt};
|
|
138
|
+
line-height: ${Gt};
|
|
139
|
+
text-transform: ${Qt};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
`,Re=v`
|
|
143
|
+
.ft-typography--body1 {
|
|
144
|
+
font-family: ${te};
|
|
145
|
+
font-size: ${ee};
|
|
146
|
+
font-weight: ${ie};
|
|
147
|
+
letter-spacing: ${oe};
|
|
148
|
+
line-height: ${se};
|
|
149
|
+
text-transform: ${ne};
|
|
150
|
+
}
|
|
151
|
+
`,Me=v`
|
|
152
|
+
.ft-typography--body2 {
|
|
153
|
+
font-family: ${re.fontFamily};
|
|
154
|
+
font-size: ${re.fontSize};
|
|
155
|
+
font-weight: ${re.fontWeight};
|
|
156
|
+
letter-spacing: ${re.letterSpacing};
|
|
157
|
+
line-height: ${re.lineHeight};
|
|
158
|
+
text-transform: ${re.textTransform};
|
|
159
|
+
}
|
|
160
|
+
`,Be=v`
|
|
161
|
+
.ft-typography--caption {
|
|
162
|
+
font-family: ${le};
|
|
163
|
+
font-size: ${ae};
|
|
164
|
+
font-weight: ${he};
|
|
165
|
+
letter-spacing: ${ce};
|
|
166
|
+
line-height: ${pe};
|
|
167
|
+
text-transform: ${de};
|
|
168
|
+
}
|
|
169
|
+
`,Fe=v`
|
|
170
|
+
.ft-typography--breadcrumb {
|
|
171
|
+
font-family: ${fe};
|
|
172
|
+
font-size: ${ue};
|
|
173
|
+
font-weight: ${ve};
|
|
174
|
+
letter-spacing: ${be};
|
|
175
|
+
line-height: ${xe};
|
|
176
|
+
text-transform: ${ye};
|
|
177
|
+
}
|
|
178
|
+
`,je=v`
|
|
179
|
+
.ft-typography--overline {
|
|
180
|
+
font-family: ${ge};
|
|
181
|
+
font-size: ${me};
|
|
182
|
+
font-weight: ${$e};
|
|
183
|
+
letter-spacing: ${we};
|
|
184
|
+
line-height: ${ke};
|
|
185
|
+
text-transform: ${Oe};
|
|
186
|
+
}
|
|
187
|
+
`,Ue=v`
|
|
188
|
+
.ft-typography--button {
|
|
189
|
+
font-family: ${Se.fontFamily};
|
|
190
|
+
font-size: ${Se.fontSize};
|
|
191
|
+
font-weight: ${Se.fontWeight};
|
|
192
|
+
letter-spacing: ${Se.letterSpacing};
|
|
193
|
+
line-height: ${Se.lineHeight};
|
|
194
|
+
text-transform: ${Se.textTransform};
|
|
195
|
+
}
|
|
196
|
+
`;class De extends vt{constructor(){super(...arguments),this.variant=St.body1}render(){return this.element?Ot`
|
|
197
|
+
<${wt(this.element)}
|
|
198
|
+
class="ft-typography ft-typography--${this.variant}">
|
|
199
|
+
<slot></slot>
|
|
200
|
+
</${wt(this.element)}>
|
|
201
|
+
`:Ot`
|
|
202
|
+
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
203
|
+
`}}function Le(t,e){return t.flatMap((t=>[t,...Le(e(t),e)]))}
|
|
204
|
+
/**
|
|
205
|
+
* @license
|
|
206
|
+
* Copyright 2017 Google LLC
|
|
207
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
208
|
+
*/De.styles=[Ce,Ee,Ne,ze,Re,Me,Be,Fe,je,Ue,v`
|
|
209
|
+
.ft-typography {
|
|
210
|
+
vertical-align: inherit;
|
|
211
|
+
}
|
|
212
|
+
`],Ct([i()],De.prototype,"element",void 0),Ct([i()],De.prototype,"variant",void 0),h("ft-typography")(De);const Te=1,Ae=2,_e=t=>(...e)=>({_$litDirective$:t,values:e});class Pe{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)}}
|
|
213
|
+
/**
|
|
214
|
+
* @license
|
|
215
|
+
* Copyright 2020 Google LLC
|
|
216
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
217
|
+
*/const{H:Ie}=rt,He=()=>document.createComment(""),We=(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(He(),n),o=s.insertBefore(He(),n);i=new Ie(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},Ke=(t,e,i=t)=>(t._$AI(e,i),t),Ve={},Ze=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}},Je=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},qe=_e(class extends Pe{constructor(t){if(super(t),t.type!==Ae)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=[],h=[];let c,p,d=0,f=n.length-1,u=0,v=r.length-1;for(;d<=f&&u<=v;)if(null===n[d])d++;else if(null===n[f])f--;else if(a[d]===l[u])h[u]=Ke(n[d],r[u]),d++,u++;else if(a[f]===l[v])h[v]=Ke(n[f],r[v]),f--,v--;else if(a[d]===l[v])h[v]=Ke(n[d],r[v]),We(t,h[v+1],n[d]),d++,v--;else if(a[f]===l[u])h[u]=Ke(n[f],r[u]),We(t,n[d],n[f]),f--,u++;else if(void 0===c&&(c=Je(l,u,v),p=Je(a,d,f)),c.has(a[d]))if(c.has(a[f])){const e=p.get(l[u]),i=void 0!==e?n[e]:null;if(null===i){const e=We(t,n[d]);Ke(e,r[u]),h[u]=e}else h[u]=Ke(i,r[u]),We(t,n[d],i),n[e]=null;u++}else Ze(n[f]),f--;else Ze(n[d]),d++;for(;u<=v;){const e=We(t,h[v+1]);Ke(e,r[u]),h[u++]=e}for(;d<=f;){const t=n[d++];null!==t&&Ze(t)}return this.at=l,((t,e=Ve)=>{t._$AH=e})(t,h),K}}),Xe=_e(class extends Pe{constructor(t){var e;if(super(t),t.type!==Te||"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 K}});
|
|
218
|
+
/**
|
|
219
|
+
* @license
|
|
220
|
+
* Copyright 2017 Google LLC
|
|
221
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
222
|
+
*/var Ye=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 Ge={color:dt.extend("--ft-ripple-color",ut.colorContent),primaryColor:dt.extend("--ft-ripple-primary-color",dt.extend("--ft-ripple-color",ut.colorPrimary)),secondaryColor:dt.extend("--ft-ripple-secondary-color",dt.extend("--ft-ripple-color",ut.colorSecondary)),opacityContentOnSurfacePressed:dt.external(ut.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:dt.external(ut.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:dt.external(ut.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:dt.external(ut.opacityContentOnSurfaceSelected,"Design system")};class Qe extends vt{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`
|
|
223
|
+
<style>
|
|
224
|
+
.ft-ripple .ft-ripple--effect,
|
|
225
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
226
|
+
width: ${this.rippleSize}px;
|
|
227
|
+
height: ${this.rippleSize}px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.ft-ripple .ft-ripple--effect {
|
|
231
|
+
left: ${this.originX}px;
|
|
232
|
+
top: ${this.originY}px;
|
|
233
|
+
}
|
|
234
|
+
</style>
|
|
235
|
+
<div class="${Xe(t)}">
|
|
236
|
+
<div class="ft-ripple--background"></div>
|
|
237
|
+
<div class="ft-ripple--effect"></div>
|
|
238
|
+
</div>
|
|
239
|
+
`}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=v`
|
|
240
|
+
:host {
|
|
241
|
+
display: contents;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.ft-ripple {
|
|
245
|
+
position: absolute;
|
|
246
|
+
inset: 0;
|
|
247
|
+
pointer-events: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
251
|
+
overflow: hidden;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.ft-ripple .ft-ripple--background,
|
|
255
|
+
.ft-ripple .ft-ripple--effect {
|
|
256
|
+
position: absolute;
|
|
257
|
+
opacity: 0;
|
|
258
|
+
background-color: ${Ge.color};
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background,
|
|
262
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
263
|
+
background-color: ${Ge.secondaryColor};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
267
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
268
|
+
background-color: ${Ge.primaryColor};
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.ft-ripple .ft-ripple--background {
|
|
272
|
+
top: 0;
|
|
273
|
+
left: 0;
|
|
274
|
+
height: 100%;
|
|
275
|
+
width: 100%;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.ft-ripple .ft-ripple--effect,
|
|
279
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
280
|
+
border-radius: 50%;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.ft-ripple .ft-ripple--effect {
|
|
284
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
285
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
289
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
290
|
+
left: 50%;
|
|
291
|
+
top: 50%;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
295
|
+
transform: translate(-50%, -50%);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
299
|
+
opacity: ${Ge.opacityContentOnSurfaceHover};
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
303
|
+
opacity: ${Ge.opacityContentOnSurfaceSelected};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
307
|
+
opacity: ${Ge.opacityContentOnSurfaceFocused};
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
311
|
+
opacity: ${Ge.opacityContentOnSurfacePressed};
|
|
312
|
+
transform: translate(-50%, -50%) scale(1);
|
|
313
|
+
}
|
|
314
|
+
`,Ye([i({type:Boolean})],Qe.prototype,"primary",void 0),Ye([i({type:Boolean})],Qe.prototype,"secondary",void 0),Ye([i({type:Boolean})],Qe.prototype,"unbounded",void 0),Ye([i({type:Boolean})],Qe.prototype,"activated",void 0),Ye([i({type:Boolean})],Qe.prototype,"selected",void 0),Ye([i({type:Boolean})],Qe.prototype,"disabled",void 0),Ye([o()],Qe.prototype,"hovered",void 0),Ye([o()],Qe.prototype,"focused",void 0),Ye([o()],Qe.prototype,"pressed",void 0),Ye([o()],Qe.prototype,"rippling",void 0),Ye([o()],Qe.prototype,"rippleSize",void 0),Ye([o()],Qe.prototype,"originX",void 0),Ye([o()],Qe.prototype,"originY",void 0),Ye([n(".ft-ripple")],Qe.prototype,"ripple",void 0),Ye([n(".ft-ripple--effect")],Qe.prototype,"rippleEffect",void 0),h("ft-ripple")(Qe);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};const ei=dt.create("--ft-tooltip-distance","SIZE","4px"),ii=dt.create("--ft-tooltip-color","COLOR","#FFFFFF"),oi=dt.create("--ft-tooltip-background-color","COLOR","#666666"),si=dt.create("--ft-tooltip-z-index","NUMBER","1"),ni=dt.external(ut.borderRadiusS,"Design system");class ri extends vt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new t,this.revealDebouncer=new t}render(){return W`
|
|
315
|
+
<div part="container"
|
|
316
|
+
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
317
|
+
@mouseenter=${this.onHover}
|
|
318
|
+
@mouseleave=${this.onOut}
|
|
319
|
+
@focusin=${this.onHover}
|
|
320
|
+
@focusout=${this.onOut}
|
|
321
|
+
@touchstart=${this.onTouch}>
|
|
322
|
+
<div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
|
|
323
|
+
<div part="tooltip-content" class="ft-tooltip--content">
|
|
324
|
+
<ft-typography variant="caption">${this.text}</ft-typography>
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
<slot></slot>
|
|
328
|
+
</div>
|
|
329
|
+
`}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())}}ri.elementDefinitions={"ft-typography":De},ri.styles=v`
|
|
330
|
+
.ft-tooltip--container {
|
|
331
|
+
display: block;
|
|
332
|
+
position: relative;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.ft-tooltip--inline {
|
|
336
|
+
display: inline-block;
|
|
337
|
+
max-width: 100%;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.ft-tooltip {
|
|
341
|
+
position: absolute;
|
|
342
|
+
box-sizing: border-box;
|
|
343
|
+
overflow: hidden;
|
|
344
|
+
width: max-content;
|
|
345
|
+
max-width: 150px;
|
|
346
|
+
text-align: center;
|
|
347
|
+
padding: ${ei};
|
|
348
|
+
z-index: ${si};
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.ft-tooltip--content {
|
|
352
|
+
padding: 4px 8px;
|
|
353
|
+
border-radius: ${ni};
|
|
354
|
+
background-color: ${oi};
|
|
355
|
+
color: ${ii};
|
|
356
|
+
top: -500px;
|
|
357
|
+
left: -500px;
|
|
358
|
+
position: relative;
|
|
359
|
+
word-break: break-word;
|
|
360
|
+
}
|
|
361
|
+
`,ti([i()],ri.prototype,"text",void 0),ti([i({type:Boolean})],ri.prototype,"manual",void 0),ti([i({type:Boolean})],ri.prototype,"inline",void 0),ti([i({type:Number})],ri.prototype,"delay",void 0),ti([i()],ri.prototype,"position",void 0),ti([function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?a({slot:n,flatten:e,selector:i}):s({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==s?void 0:s.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],ri.prototype,"slotNodes",void 0),ti([n(".ft-tooltip--container")],ri.prototype,"container",void 0),ti([n("slot")],ri.prototype,"target",void 0),ti([n(".ft-tooltip")],ri.prototype,"tooltip",void 0),ti([n(".ft-tooltip--content")],ri.prototype,"tooltipContent",void 0),ti([o()],ri.prototype,"visible",void 0),h("ft-tooltip")(ri);const li={color:dt.extend("--ft-loader-color",ut.colorPrimary),size:dt.create("--ft-loader-size","SIZE","80px")};class ai extends vt{static get styles(){return v`
|
|
362
|
+
:host {
|
|
363
|
+
line-height: 0;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.ft-loader {
|
|
367
|
+
display: inline-block;
|
|
368
|
+
position: relative;
|
|
369
|
+
|
|
370
|
+
width: ${li.size};
|
|
371
|
+
height: ${li.size};
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.ft-loader div {
|
|
375
|
+
position: absolute;
|
|
376
|
+
top: 37.5%;
|
|
377
|
+
width: 25%;
|
|
378
|
+
height: 25%;
|
|
379
|
+
border-radius: 50%;
|
|
380
|
+
background: ${li.color};
|
|
381
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.ft-loader div:nth-child(1) {
|
|
385
|
+
left: 2.5%;
|
|
386
|
+
animation: appear 0.6s infinite;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.ft-loader div:nth-child(2) {
|
|
390
|
+
left: 2.5%;
|
|
391
|
+
animation: move 0.6s infinite;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.ft-loader div:nth-child(3) {
|
|
395
|
+
left: 37.5%;
|
|
396
|
+
animation: move 0.6s infinite;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.ft-loader div:nth-child(4) {
|
|
400
|
+
left: 72.5%;
|
|
401
|
+
animation: disappear 0.6s infinite;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
@keyframes appear {
|
|
405
|
+
0% {
|
|
406
|
+
transform: scale(0);
|
|
407
|
+
}
|
|
408
|
+
100% {
|
|
409
|
+
transform: scale(1);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
@keyframes disappear {
|
|
414
|
+
0% {
|
|
415
|
+
transform: scale(1);
|
|
416
|
+
}
|
|
417
|
+
100% {
|
|
418
|
+
transform: scale(0);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
@keyframes move {
|
|
423
|
+
0% {
|
|
424
|
+
transform: translate(0, 0);
|
|
425
|
+
}
|
|
426
|
+
100% {
|
|
427
|
+
transform: translate(calc(0.35 * ${li.size}), 0);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
`}render(){return W`
|
|
431
|
+
<div class="ft-loader">
|
|
432
|
+
<div></div>
|
|
433
|
+
<div></div>
|
|
434
|
+
<div></div>
|
|
435
|
+
<div></div>
|
|
436
|
+
</div>
|
|
437
|
+
`}}h("ft-loader")(ai);
|
|
438
|
+
/**
|
|
439
|
+
* @license
|
|
440
|
+
* Copyright 2017 Google LLC
|
|
441
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
442
|
+
*/
|
|
443
|
+
class hi extends Pe{constructor(t){if(super(t),this.it=V,t.type!==Ae)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===V||null==t)return this.vt=void 0,this.it=t;if(t===K)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:[]}}}hi.directiveName="unsafeHTML",hi.resultType=1;const ci=_e(hi);var pi,di;!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=""}(pi||(pi={})),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=""}(di||(di={})),new Map([...["abw"].map((t=>[t,di.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,di.AUDIO])),...["avi"].map((t=>[t,di.AVI])),...["chm","xhs"].map((t=>[t,di.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,di.CODE])),...["csv"].map((t=>[t,di.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,di.DITA])),...["epub"].map((t=>[t,di.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,di.EXCEL])),...["flac"].map((t=>[t,di.FLAC])),...["gif"].map((t=>[t,di.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,di.GZIP])),...["html","htm","xhtml"].map((t=>[t,di.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,di.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,di.JPEG])),...["json"].map((t=>[t,di.JSON])),...["m4a","m4p"].map((t=>[t,di.M4A])),...["mov","qt"].map((t=>[t,di.MOV])),...["mp3"].map((t=>[t,di.MP3])),...["mp4","m4v"].map((t=>[t,di.MP4])),...["ogg","oga"].map((t=>[t,di.OGG])),...["pdf","ps"].map((t=>[t,di.PDF])),...["png"].map((t=>[t,di.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,di.POWERPOINT])),...["rar"].map((t=>[t,di.RAR])),...["stp"].map((t=>[t,di.STP])),...["txt","rtf","md","mdown"].map((t=>[t,di.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,di.VIDEO])),...["wav"].map((t=>[t,di.WAV])),...["wma"].map((t=>[t,di.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,di.WORD])),...["xml","xsl","rdf"].map((t=>[t,di.XML])),...["yaml","yml","x-yaml"].map((t=>[t,di.YAML])),...["zip"].map((t=>[t,di.ZIP]))]);var fi,ui=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"}(fi||(fi={}));const vi={size:dt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:dt.extend("--ft-icon-fluid-topics-font-family",dt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:dt.extend("--ft-icon-file-format-font-family",dt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:dt.extend("--ft-icon-material-font-family",dt.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class bi extends vt{constructor(){super(...arguments),this.variant=fi.fluid_topics}render(){return W`
|
|
444
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
445
|
+
${ci(this.getIcon())}
|
|
446
|
+
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
447
|
+
</i>
|
|
448
|
+
`}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===fi.file_format?null!==(t=di[i.toUpperCase()])&&void 0!==t?t:i:this.variant===fi.fluid_topics?null!==(e=pi[i.toUpperCase()])&&void 0!==e?e:i:V}}bi.elementDefinitions={},bi.styles=v`
|
|
449
|
+
:host, i.ft-icon {
|
|
450
|
+
display: inline-block;
|
|
451
|
+
width: ${vi.size};
|
|
452
|
+
height: ${vi.size};
|
|
453
|
+
text-align: center;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
i.ft-icon {
|
|
457
|
+
font-size: ${vi.size};
|
|
458
|
+
line-height: 1;
|
|
459
|
+
font-weight: normal;
|
|
460
|
+
text-transform: none;
|
|
461
|
+
font-style: normal;
|
|
462
|
+
font-variant: normal;
|
|
463
|
+
speak: none;
|
|
464
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
465
|
+
text-rendering: auto;
|
|
466
|
+
-webkit-font-smoothing: antialiased;
|
|
467
|
+
-moz-osx-font-smoothing: grayscale;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.ft-icon--fluid-topics {
|
|
471
|
+
font-family: ${vi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.ft-icon--file-format {
|
|
475
|
+
font-family: ${vi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.ft-icon--material {
|
|
479
|
+
font-family: ${vi.materialFontFamily}, "Material Icons", sans-serif;
|
|
480
|
+
}
|
|
481
|
+
`,ui([i()],bi.prototype,"variant",void 0),ui([n("slot")],bi.prototype,"slottedContent",void 0),h("ft-icon")(bi);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=dt.extend("--ft-button-color",ut.colorPrimary),gi={backgroundColor:dt.extend("--ft-button-background-color",ut.colorSurface),borderRadius:dt.extend("--ft-button-border-radius",ut.borderRadiusL),color:yi,fontSize:dt.extend("--ft-button-font-size",Se.fontSize),iconSize:dt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:dt.extend("--ft-button-ripple-color",yi),opacityDisabled:dt.external(ut.colorOpacityDisabled,"Design system")},mi=dt.extend("--ft-button-primary-color",dt.extend("--ft-button-color",ut.colorOnPrimary)),$i={backgroundColor:dt.extend("--ft-button-primary-background-color",dt.extend("--ft-button-background-color",ut.colorPrimary)),color:mi,rippleColor:dt.extend("--ft-button-primary-ripple-color",mi)},wi=dt.extend("--ft-button-dense-border-radius",dt.extend("--ft-button-border-radius",ut.borderRadiusM));class ki extends vt{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[bt,v`
|
|
482
|
+
:host {
|
|
483
|
+
display: inline-block;
|
|
484
|
+
max-width: 100%;
|
|
485
|
+
pointer-events: none;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
button {
|
|
489
|
+
box-shadow: 0px 0px 0px transparent;
|
|
490
|
+
border: 0px solid transparent;
|
|
491
|
+
text-shadow: 0px 0px 0px transparent;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
button:hover {
|
|
495
|
+
box-shadow: 0px 0px 0px transparent;
|
|
496
|
+
border: 0px solid transparent;
|
|
497
|
+
text-shadow: 0px 0px 0px transparent;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
button:active {
|
|
501
|
+
outline: none;
|
|
502
|
+
border: none;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
button:focus {
|
|
506
|
+
outline: 0;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.ft-button {
|
|
510
|
+
position: relative;
|
|
511
|
+
display: flex;
|
|
512
|
+
justify-content: center;
|
|
513
|
+
align-items: center;
|
|
514
|
+
width: 100%;
|
|
515
|
+
overflow: hidden;
|
|
516
|
+
box-sizing: border-box;
|
|
517
|
+
border: none;
|
|
518
|
+
pointer-events: auto;
|
|
519
|
+
|
|
520
|
+
--ft-button-internal-font-size: ${gi.fontSize};
|
|
521
|
+
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
522
|
+
--ft-button-internal-color: ${gi.color};
|
|
523
|
+
${ft(vi.size,gi.iconSize)};
|
|
524
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
525
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
526
|
+
${ft(Ge.color,gi.rippleColor)};
|
|
527
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${gi.iconSize});
|
|
528
|
+
|
|
529
|
+
border-radius: ${gi.borderRadius};
|
|
530
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
531
|
+
background-color: ${gi.backgroundColor};
|
|
532
|
+
color: var(--ft-button-internal-color);
|
|
533
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.ft-button:not([disabled]):hover {
|
|
537
|
+
cursor: pointer;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.ft-button--dense {
|
|
541
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
542
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
543
|
+
border-radius: ${wi};
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.ft-button--round {
|
|
547
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.ft-button[disabled] {
|
|
551
|
+
filter: grayscale(1);
|
|
552
|
+
opacity: ${gi.opacityDisabled};
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.ft-button.ft-button--primary {
|
|
556
|
+
background-color: ${$i.backgroundColor};
|
|
557
|
+
--ft-button-internal-color: ${$i.color};
|
|
558
|
+
${ft(Ge.color,$i.rippleColor)};
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.ft-button.ft-button--outlined {
|
|
562
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
563
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.ft-button:focus {
|
|
567
|
+
outline: none;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.ft-button--label {
|
|
571
|
+
overflow: hidden;
|
|
572
|
+
white-space: nowrap;
|
|
573
|
+
text-overflow: ellipsis;
|
|
574
|
+
display: block;
|
|
575
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
576
|
+
${ft(Se.fontSize,"var(--ft-button-internal-font-size)")};
|
|
577
|
+
${ft(Se.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.ft-button--safari-fix .ft-button--label {
|
|
581
|
+
margin-right: 0;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.ft-button--safari-fix .ft-button--label:after {
|
|
585
|
+
content: "\\0000a0";
|
|
586
|
+
display: inline-block;
|
|
587
|
+
width: 0;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.ft-button--label[hidden] {
|
|
591
|
+
display: none;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
ft-icon {
|
|
595
|
+
flex-shrink: 0;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.ft-button--label[hidden] + ft-icon {
|
|
599
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
600
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
604
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
605
|
+
order: -1;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
ft-loader {
|
|
609
|
+
${ft(li.size,gi.iconSize)};
|
|
610
|
+
${ft(li.color,"var(--ft-button-internal-color)")};
|
|
611
|
+
}
|
|
612
|
+
`]}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":$t,"ft-no-text-select":!0};return this.addTooltip(W`
|
|
613
|
+
<button part="button"
|
|
614
|
+
class="${Xe(t)}"
|
|
615
|
+
aria-label="${this.getLabel()}"
|
|
616
|
+
?disabled=${this.isDisabled()}>
|
|
617
|
+
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
618
|
+
<ft-typography part="label"
|
|
619
|
+
variant="button"
|
|
620
|
+
class="ft-button--label"
|
|
621
|
+
?hidden=${!this.hasTextContent()}>
|
|
622
|
+
<slot @slotchange=${this.onSlotchange}></slot>
|
|
623
|
+
</ft-typography>
|
|
624
|
+
${this.resolveIcon()}
|
|
625
|
+
</button>
|
|
626
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:W`
|
|
627
|
+
<ft-tooltip part="tooltip"
|
|
628
|
+
text="${this.getLabel()}"
|
|
629
|
+
position="${this.tooltipPosition}">
|
|
630
|
+
${t}
|
|
631
|
+
</ft-tooltip>
|
|
632
|
+
`}resolveIcon(){return this.loading?W`
|
|
633
|
+
<ft-loader></ft-loader> `:this.icon?W`
|
|
634
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:V}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}}ki.elementDefinitions={"ft-ripple":Qe,"ft-tooltip":ri,"ft-typography":De,"ft-icon":bi,"ft-loader":ai},xi([i({type:Boolean})],ki.prototype,"primary",void 0),xi([i({type:Boolean})],ki.prototype,"outlined",void 0),xi([i({type:Boolean})],ki.prototype,"disabled",void 0),xi([i({type:Boolean})],ki.prototype,"dense",void 0),xi([i({type:Boolean})],ki.prototype,"round",void 0),xi([i({type:String})],ki.prototype,"label",void 0),xi([i({type:String})],ki.prototype,"icon",void 0),xi([i({type:Boolean})],ki.prototype,"trailingIcon",void 0),xi([i({type:Boolean})],ki.prototype,"loading",void 0),xi([i({type:String})],ki.prototype,"tooltipPosition",void 0),xi([n(".ft-button")],ki.prototype,"button",void 0),xi([n(".ft-button--label slot")],ki.prototype,"slottedContent",void 0),h("ft-button")(ki);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 Si=dt.extend("--ft-checkbox-text-color",ut.colorOnSurfaceHigh),Ci=dt.external(ut.colorPrimary,"Design system"),Ei=dt.external(ut.colorOnPrimary,"Design system"),Ni=dt.extend("--ft-checkbox-border-color",ut.colorOnSurfaceMedium),zi=dt.external(ut.colorOnSurfaceDisabled,"Design system");class Ri extends vt{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`
|
|
635
|
+
<label class="${Xe(t)}">
|
|
636
|
+
<div class="ft-checkbox--box-container">
|
|
637
|
+
<input type="checkbox"
|
|
638
|
+
name=${this.name}
|
|
639
|
+
.checked=${this.checked}
|
|
640
|
+
.disabled=${this.disabled}
|
|
641
|
+
@change=${this.onChange}
|
|
642
|
+
>
|
|
643
|
+
<ft-ripple
|
|
644
|
+
?disabled=${this.disabled}
|
|
645
|
+
?primary=${this.checked||this.indeterminate}
|
|
646
|
+
unbounded>
|
|
647
|
+
</ft-ripple>
|
|
648
|
+
<div class="ft-checkbox--box">
|
|
649
|
+
<svg class="ft-checkbox--checkmark" viewBox="0 0 24 24">
|
|
650
|
+
<path class="ft-checkbox--checkmark-path" fill="none"
|
|
651
|
+
d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
|
|
652
|
+
</svg>
|
|
653
|
+
</div>
|
|
654
|
+
</div>
|
|
655
|
+
<ft-typography variant="body2">
|
|
656
|
+
<slot></slot>
|
|
657
|
+
</ft-typography>
|
|
658
|
+
</label>
|
|
659
|
+
`}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)}}Ri.elementDefinitions={"ft-ripple":Qe,"ft-typography":De},Ri.styles=v`
|
|
660
|
+
* {
|
|
661
|
+
box-sizing: border-box;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.ft-checkbox {
|
|
665
|
+
box-sizing: border-box;
|
|
666
|
+
color: ${Si};
|
|
667
|
+
|
|
668
|
+
display: inline-flex;
|
|
669
|
+
align-items: center;
|
|
670
|
+
gap: 4px;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.ft-checkbox--disabled {
|
|
674
|
+
color: ${zi};
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
input {
|
|
678
|
+
opacity: 0;
|
|
679
|
+
position: absolute;
|
|
680
|
+
width: 40px;
|
|
681
|
+
height: 40px;
|
|
682
|
+
margin: 0;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.ft-checkbox--box-container {
|
|
686
|
+
position: relative;
|
|
687
|
+
width: 40px;
|
|
688
|
+
height: 40px;
|
|
689
|
+
|
|
690
|
+
display: flex;
|
|
691
|
+
justify-content: center;
|
|
692
|
+
align-items: center;
|
|
693
|
+
flex-shrink: 0;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.ft-checkbox--box {
|
|
697
|
+
border: 2px solid ${Ni};
|
|
698
|
+
border-radius: 2px;
|
|
699
|
+
|
|
700
|
+
width: 18px;
|
|
701
|
+
height: 18px;
|
|
702
|
+
|
|
703
|
+
color: ${Ei};
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
.ft-checkbox--checked .ft-checkbox--box,
|
|
708
|
+
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
709
|
+
border-color: ${Ci};
|
|
710
|
+
background-color: ${Ci};
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.ft-checkbox--disabled .ft-checkbox--box {
|
|
714
|
+
border-color: ${zi};
|
|
715
|
+
background-color: transparent;
|
|
716
|
+
color: ${zi};
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.ft-checkbox--checkmark {
|
|
720
|
+
transition: opacity 180ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 180ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
721
|
+
opacity: 0;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.ft-checkbox--checkmark-path {
|
|
725
|
+
stroke-dashoffset: 0;
|
|
726
|
+
stroke: currentcolor;
|
|
727
|
+
stroke-width: 3px;
|
|
728
|
+
stroke-dasharray: 30;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.ft-checkbox--checked .ft-checkbox--checkmark,
|
|
732
|
+
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
733
|
+
opacity: 1;
|
|
734
|
+
}
|
|
735
|
+
`,Oi([i()],Ri.prototype,"name",void 0),Oi([i({type:Boolean})],Ri.prototype,"checked",void 0),Oi([i({type:Boolean})],Ri.prototype,"indeterminate",void 0),Oi([i({type:Boolean})],Ri.prototype,"disabled",void 0),Oi([n(".ft-checkbox")],Ri.prototype,"container",void 0),Oi([n("ft-ripple")],Ri.prototype,"ripple",void 0),h("ft-checkbox")(Ri);var Mi=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 Bi=dt.extend("--ft-radio-text-color",ut.colorOnSurfaceHigh),Fi=dt.external(ut.colorPrimary,"Design system"),ji=(dt.external(ut.colorOnPrimary,"Design system"),dt.extend("--ft-radio-border-color",ut.colorOnSurfaceMedium)),Ui=dt.external(ut.colorOnSurfaceDisabled,"Design system");class Di extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Li extends vt{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`
|
|
736
|
+
<div class="${Xe(t)}">
|
|
737
|
+
<div class="ft-radio--box-container">
|
|
738
|
+
<input id="radio-button"
|
|
739
|
+
type="radio"
|
|
740
|
+
name="${this.name}"
|
|
741
|
+
value="${this.value}"
|
|
742
|
+
.checked=${this.checked}
|
|
743
|
+
.disabled=${this.disabled}
|
|
744
|
+
@change=${this.onChange}
|
|
745
|
+
>
|
|
746
|
+
<ft-ripple
|
|
747
|
+
?disabled=${this.disabled}
|
|
748
|
+
?primary=${this.checked}
|
|
749
|
+
unbounded>
|
|
750
|
+
</ft-ripple>
|
|
751
|
+
<div class="ft-radio--box">
|
|
752
|
+
</div>
|
|
753
|
+
</div>
|
|
754
|
+
<label for="radio-button" @click=${t=>t.stopPropagation()}>
|
|
755
|
+
<ft-typography variant="body2">
|
|
756
|
+
<slot></slot>
|
|
757
|
+
</ft-typography>
|
|
758
|
+
</label>
|
|
759
|
+
</div>
|
|
760
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Di(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 Di(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Li.elementDefinitions={"ft-ripple":Qe,"ft-typography":De},Li.styles=v`
|
|
761
|
+
* {
|
|
762
|
+
box-sizing: border-box;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.ft-radio {
|
|
766
|
+
box-sizing: border-box;
|
|
767
|
+
color: ${Bi};
|
|
768
|
+
|
|
769
|
+
display: inline-flex;
|
|
770
|
+
align-items: center;
|
|
771
|
+
gap: 4px;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.ft-radio--disabled {
|
|
775
|
+
color: ${Ui};
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
input {
|
|
779
|
+
opacity: 0;
|
|
780
|
+
position: absolute;
|
|
781
|
+
width: 40px;
|
|
782
|
+
height: 40px;
|
|
783
|
+
margin: 0;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
.ft-radio--box-container {
|
|
787
|
+
position: relative;
|
|
788
|
+
width: 40px;
|
|
789
|
+
height: 40px;
|
|
790
|
+
|
|
791
|
+
display: flex;
|
|
792
|
+
justify-content: center;
|
|
793
|
+
align-items: center;
|
|
794
|
+
flex-shrink: 0;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.ft-radio--box {
|
|
798
|
+
border: 2px solid ${ji};
|
|
799
|
+
border-radius: 50%;
|
|
800
|
+
|
|
801
|
+
display: flex;
|
|
802
|
+
justify-content: center;
|
|
803
|
+
align-items: center;
|
|
804
|
+
|
|
805
|
+
width: 20px;
|
|
806
|
+
height: 20px;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.ft-radio--box:after {
|
|
810
|
+
content: " ";
|
|
811
|
+
background-color: ${Fi};
|
|
812
|
+
|
|
813
|
+
border-radius: 50%;
|
|
814
|
+
|
|
815
|
+
width: 12px;
|
|
816
|
+
height: 12px;
|
|
817
|
+
|
|
818
|
+
transform: scale(0);
|
|
819
|
+
transition: transform 100ms ease;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
.ft-radio--checked .ft-radio--box {
|
|
823
|
+
border-color: ${Fi};
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
.ft-radio--checked .ft-radio--box:after {
|
|
828
|
+
transform: scale(1);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.ft-radio--disabled .ft-radio--box {
|
|
832
|
+
border-color: ${Ui};
|
|
833
|
+
background-color: transparent;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
.ft-radio--disabled .ft-radio--box:after {
|
|
837
|
+
background-color: ${Ui};
|
|
838
|
+
}
|
|
839
|
+
`,Mi([i()],Li.prototype,"value",void 0),Mi([i()],Li.prototype,"name",void 0),Mi([i({type:Boolean})],Li.prototype,"checked",void 0),Mi([i({type:Boolean})],Li.prototype,"disabled",void 0),Mi([n(".ft-radio")],Li.prototype,"container",void 0),Mi([n("ft-ripple")],Li.prototype,"ripple",void 0),Mi([n("input")],Li.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 vt{constructor(){super(...arguments),this.name=""}render(){return W`
|
|
840
|
+
<slot @slotchange=${this.onSlotChange}
|
|
841
|
+
@change=${this.onChange}
|
|
842
|
+
@keydown=${this.onKeyDown}
|
|
843
|
+
@focusin=${this.onFocusIn}
|
|
844
|
+
></slot>
|
|
845
|
+
`}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=v`
|
|
846
|
+
:host {
|
|
847
|
+
display: contents;
|
|
848
|
+
}
|
|
849
|
+
`,Ti([i()],Ai.prototype,"name",void 0),Ti([a()],Ai.prototype,"radioButtons",void 0),h("ft-radio")(Li),h("ft-radio-group")(Ai);var _i=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 Pi={borderRadiusM:dt.external(ut.borderRadiusM,"Design system"),colorOutline:dt.external(ut.colorOutline,"Design system"),colorOnSurface:dt.external(ut.colorOnSurface,"Design system"),colorOnSurfaceMedium:dt.external(ut.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:dt.external(ut.colorOnSurfaceDisabled,"Design system"),colorPrimary:dt.external(ut.colorPrimary,"Design system"),colorOnPrimary:dt.external(ut.colorOnPrimary,"Design system"),fontFamily:dt.external(re.fontFamily,"Body2 typography"),fontSize:dt.external(re.fontSize,"Body2 typography"),fontWeight:dt.external(re.fontWeight,"Body2 typography"),letterSpacing:dt.external(re.letterSpacing,"Body2 typography"),lineHeight:dt.external(re.lineHeight,"Body2 typography"),textTransform:dt.external(re.textTransform,"Body2 typography")};class Ii extends vt{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`
|
|
850
|
+
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
851
|
+
${null==this.parent?null:W`
|
|
852
|
+
<div tabindex="0"
|
|
853
|
+
class="ft-filter-level--go-back"
|
|
854
|
+
?disabled=${this.disabled}
|
|
855
|
+
@keyup=${this.goBackOnKeyPress}
|
|
856
|
+
@click=${this.goBackOnClick}>
|
|
857
|
+
<ft-ripple></ft-ripple>
|
|
858
|
+
<ft-icon variant="material">chevron_left</ft-icon>
|
|
859
|
+
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
860
|
+
</div>
|
|
861
|
+
`}
|
|
862
|
+
${qe(e,(t=>t.value),(t=>{var e;return W`
|
|
863
|
+
<div class="ft-filter-level--option" part="options">
|
|
864
|
+
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
865
|
+
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?V:W`
|
|
866
|
+
<ft-button icon="chevron_right"
|
|
867
|
+
label="${t.label}"
|
|
868
|
+
?disabled=${this.disabled}
|
|
869
|
+
tooltipPosition="left"
|
|
870
|
+
@click=${()=>this.displayLevel(t)}></ft-button>
|
|
871
|
+
`}
|
|
872
|
+
</div>
|
|
873
|
+
`}))}
|
|
874
|
+
${e.length<t.length?W`
|
|
875
|
+
<ft-button
|
|
876
|
+
class="ft-filter-level--display-more"
|
|
877
|
+
icon="expand_more"
|
|
878
|
+
dense trailingIcon
|
|
879
|
+
@click=${this.displayMore}>
|
|
880
|
+
${this.moreValuesButtonLabel}
|
|
881
|
+
</ft-button>
|
|
882
|
+
`:V}
|
|
883
|
+
</div>
|
|
884
|
+
`}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`
|
|
885
|
+
<ft-checkbox name="${this.id}"
|
|
886
|
+
.checked=${t.selected}
|
|
887
|
+
.disabled=${this.disabled}
|
|
888
|
+
.indeterminate=${Le(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
889
|
+
@change=${e=>this.optionsChanged(e,t)}>
|
|
890
|
+
${t.label}
|
|
891
|
+
</ft-checkbox>
|
|
892
|
+
`}buildMonoValuedOption(t){return W`
|
|
893
|
+
<ft-radio name="${this.id+Math.round(1e6*Math.random())}"
|
|
894
|
+
.checked=${t.selected}
|
|
895
|
+
?disabled=${this.disabled}
|
|
896
|
+
@click=${e=>this.optionsChanged(e,t)}
|
|
897
|
+
@keyup=${e=>this.onRadioKeyUp(e,t)}
|
|
898
|
+
@change=${t=>t.stopPropagation()}>
|
|
899
|
+
|
|
900
|
+
${t.label}
|
|
901
|
+
</ft-radio>
|
|
902
|
+
`}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}))}}Ii.elementDefinitions={"ft-button":ki,"ft-ripple":Qe,"ft-typography":De,"ft-checkbox":Ri,"ft-icon":bi,"ft-radio":Li},Ii.styles=[v`
|
|
903
|
+
.ft-filter-level--container {
|
|
904
|
+
display: flex;
|
|
905
|
+
flex-direction: column;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.ft-filter-level--container > * {
|
|
909
|
+
padding: 0 10px;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
.ft-filter-level--go-back {
|
|
913
|
+
flex-shrink: 0;
|
|
914
|
+
text-decoration: none;
|
|
915
|
+
position: relative;
|
|
916
|
+
border-radius: ${Pi.borderRadiusM};
|
|
917
|
+
overflow: hidden;
|
|
918
|
+
display: flex;
|
|
919
|
+
align-items: center;
|
|
920
|
+
padding: 4px 4px;
|
|
921
|
+
gap: 4px;
|
|
922
|
+
cursor: pointer;
|
|
923
|
+
color: ${Pi.colorOnSurface};
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
.ft-filter-level--go-back:focus {
|
|
927
|
+
outline: none;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
.ft-filter-level--go-back ft-icon {
|
|
931
|
+
flex-shrink: 0;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
.ft-filter-level--go-back ft-typography {
|
|
935
|
+
display: block;
|
|
936
|
+
flex-grow: 1;
|
|
937
|
+
flex-shrink: 0;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.ft-filter-level--option {
|
|
941
|
+
display: flex;
|
|
942
|
+
align-items: center;
|
|
943
|
+
max-width: 100%;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
.ft-filter-level--option ft-button {
|
|
947
|
+
margin-right: -10px;
|
|
948
|
+
flex-shrink: 0;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
ft-button {
|
|
952
|
+
${ft(gi.color,Pi.colorOnSurface)};
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
ft-radio, ft-checkbox {
|
|
956
|
+
flex-shrink: 1;
|
|
957
|
+
flex-grow: 1;
|
|
958
|
+
display: block;
|
|
959
|
+
max-width: calc(100% + 10px);
|
|
960
|
+
margin-left: -10px;
|
|
961
|
+
word-break: break-word;
|
|
962
|
+
}
|
|
963
|
+
`],_i([i({type:String})],Ii.prototype,"id",void 0),_i([i({type:Object})],Ii.prototype,"parent",void 0),_i([i({type:Array})],Ii.prototype,"options",void 0),_i([i({type:Boolean})],Ii.prototype,"multivalued",void 0),_i([i({type:Boolean})],Ii.prototype,"disabled",void 0),_i([i({type:Boolean})],Ii.prototype,"hideSelectedOptions",void 0),_i([i({type:Boolean})],Ii.prototype,"preventNavigation",void 0),_i([i({type:String})],Ii.prototype,"filter",void 0),_i([i({type:String})],Ii.prototype,"moreValuesButtonLabel",void 0),_i([i({type:Number})],Ii.prototype,"displayedValuesLimit",void 0),_i([n(".ft-filter-level--container")],Ii.prototype,"container",void 0),_i([o()],Ii.prototype,"displayedPages",void 0);var Hi=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 Wi={buttonsColor:dt.extend("--ft-snap-scroll-buttons-color",ut.colorPrimary),buttonsZIndex:dt.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:dt.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:dt.external(ut.colorSurface,"Design system")};class Ki extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class Vi extends vt{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 t(200),this.updateScrollDebouncer=new t(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=Xe({"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":$t}),e=this.controls&&this.withScroll;return W`
|
|
964
|
+
<div part="container" class="${t}">
|
|
965
|
+
<ft-button
|
|
966
|
+
class="ft-snap-scroll--previous"
|
|
967
|
+
part="controls"
|
|
968
|
+
primary
|
|
969
|
+
icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}"
|
|
970
|
+
?hidden=${!e||this.startReached}
|
|
971
|
+
?disabled=${!e||this.startReached}
|
|
972
|
+
@click=${this.previous}
|
|
973
|
+
></ft-button>
|
|
974
|
+
<slot class="ft-snap-scroll--content"
|
|
975
|
+
part="content"
|
|
976
|
+
@slotchange=${this.onSlotChange}></slot>
|
|
977
|
+
<ft-button
|
|
978
|
+
class="ft-snap-scroll--next"
|
|
979
|
+
part="controls"
|
|
980
|
+
primary
|
|
981
|
+
icon="${this.horizontal?"arrow_forward_ios":"expand_more"}"
|
|
982
|
+
?hidden=${!e||this.endReached}
|
|
983
|
+
?disabled=${!e||this.endReached}
|
|
984
|
+
@click=${this.next}
|
|
985
|
+
></ft-button>
|
|
986
|
+
</div>
|
|
987
|
+
`}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 Ki(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":ki},Vi.styles=v`
|
|
988
|
+
.ft-snap-scroll {
|
|
989
|
+
box-sizing: border-box;
|
|
990
|
+
position: relative;
|
|
991
|
+
display: flex;
|
|
992
|
+
|
|
993
|
+
--ft-snap-scroll-transparent-color: transparent;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
.ft-snap-scroll.ft-snap-scroll--safari-fix {
|
|
997
|
+
/* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
|
|
998
|
+
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
999
|
+
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
.ft-snap-scroll,
|
|
1003
|
+
.ft-snap-scroll--content {
|
|
1004
|
+
overflow: hidden;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
.ft-snap-scroll--limit-size,
|
|
1008
|
+
.ft-snap-scroll--limit-size .ft-snap-scroll--content {
|
|
1009
|
+
width: 100%;
|
|
1010
|
+
height: 100%;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.ft-snap-scroll--content {
|
|
1014
|
+
flex-grow: 1;
|
|
1015
|
+
flex-shrink: 1;
|
|
1016
|
+
box-sizing: border-box;
|
|
1017
|
+
scroll-snap-align: start;
|
|
1018
|
+
display: flex;
|
|
1019
|
+
flex-wrap: nowrap;
|
|
1020
|
+
align-items: flex-start;
|
|
1021
|
+
justify-content: flex-start;
|
|
1022
|
+
gap: ${Wi.gap};
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
1026
|
+
display: none;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
1030
|
+
-ms-overflow-style: none;
|
|
1031
|
+
scrollbar-width: none;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.ft-snap-scroll--content::slotted(*) {
|
|
1035
|
+
flex-shrink: 0;
|
|
1036
|
+
flex-grow: 1;
|
|
1037
|
+
max-height: 100%;
|
|
1038
|
+
max-width: 100%;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.ft-snap-scroll--horizontal,
|
|
1042
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1043
|
+
width: 100%;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
.ft-snap-scroll--vertical,
|
|
1047
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1048
|
+
height: 100%;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1052
|
+
flex-direction: row;
|
|
1053
|
+
overflow-x: auto;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1057
|
+
flex-direction: column;
|
|
1058
|
+
overflow-y: auto;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.ft-snap-scroll--previous,
|
|
1062
|
+
.ft-snap-scroll--next {
|
|
1063
|
+
position: absolute;
|
|
1064
|
+
display: flex;
|
|
1065
|
+
z-index: ${Wi.buttonsZIndex};
|
|
1066
|
+
opacity: 1;
|
|
1067
|
+
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1068
|
+
${ft(gi.backgroundColor,"transparent")};
|
|
1069
|
+
${ft(gi.color,Wi.buttonsColor)};
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
.ft-snap-scroll--previous[hidden],
|
|
1073
|
+
.ft-snap-scroll--next[hidden] {
|
|
1074
|
+
z-index: -1;
|
|
1075
|
+
opacity: 0;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
1079
|
+
top: 0;
|
|
1080
|
+
left: -1px;
|
|
1081
|
+
bottom: 0;
|
|
1082
|
+
background: linear-gradient(to right, ${Wi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1086
|
+
top: -1px;
|
|
1087
|
+
left: 0;
|
|
1088
|
+
right: 0;
|
|
1089
|
+
background: linear-gradient(to bottom, ${Wi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1093
|
+
top: 0;
|
|
1094
|
+
right: -1px;
|
|
1095
|
+
bottom: 0;
|
|
1096
|
+
background: linear-gradient(to left, ${Wi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1100
|
+
left: 0;
|
|
1101
|
+
right: 0;
|
|
1102
|
+
bottom: -1px;
|
|
1103
|
+
background: linear-gradient(to top, ${Wi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1107
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1108
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1109
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1110
|
+
background-color: ${Wi.colorSurface};
|
|
1111
|
+
}
|
|
1112
|
+
`,Hi([i({type:Boolean})],Vi.prototype,"horizontal",void 0),Hi([i({type:Boolean})],Vi.prototype,"hideScrollbar",void 0),Hi([i({type:Boolean})],Vi.prototype,"controls",void 0),Hi([i({type:Boolean})],Vi.prototype,"limitSize",void 0),Hi([o()],Vi.prototype,"elements",void 0),Hi([o()],Vi.prototype,"currentElement",void 0),Hi([o()],Vi.prototype,"withScroll",void 0),Hi([o()],Vi.prototype,"startReached",void 0),Hi([o()],Vi.prototype,"endReached",void 0),Hi([n(".ft-snap-scroll--content")],Vi.prototype,"contentSlot",void 0),h("ft-snap-scroll")(Vi);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 Ji=dt.external(ut.colorOutline,"Design system"),qi=dt.external(ut.colorOnSurface,"Design system"),Xi=dt.external(ut.colorOnSurfaceMedium,"Design system"),Yi=dt.external(ut.colorPrimary,"Design system"),Gi=dt.external(ut.colorSurface,"Design system"),Qi=dt.external(ut.transitionDuration,"Design system"),to=dt.external(ut.transitionTimingFunction,"Design system");class eo extends CustomEvent{constructor(t){super("change",{detail:t})}}class io extends vt{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 t(300),this.changeDebouncer=new t(10)}get flatOptions(){return Le(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`
|
|
1113
|
+
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1114
|
+
part="container">
|
|
1115
|
+
${this.label||i?W`
|
|
1116
|
+
<div class="ft-filter--header" part="header">
|
|
1117
|
+
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1118
|
+
</ft-typography>
|
|
1119
|
+
${i?W`
|
|
1120
|
+
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1121
|
+
${this.clearButtonLabel}
|
|
1122
|
+
</ft-button>
|
|
1123
|
+
`:null}
|
|
1124
|
+
</div>
|
|
1125
|
+
`:null}
|
|
1126
|
+
<div class="ft-filter--filter" ?hidden=${!o}>
|
|
1127
|
+
<input type="search"
|
|
1128
|
+
part="input"
|
|
1129
|
+
class="ft-typography--caption"
|
|
1130
|
+
?disabled=${!o}
|
|
1131
|
+
placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}"
|
|
1132
|
+
@keyup=${this.onFilterChange}>
|
|
1133
|
+
</div>
|
|
1134
|
+
<div class="ft-filter--values">
|
|
1135
|
+
${this.renderLevels()}
|
|
1136
|
+
</div>
|
|
1137
|
+
<slot class="ft-filter--slot"
|
|
1138
|
+
@slotchange=${this.updateOptionsFromSlot}
|
|
1139
|
+
@option-change=${this.optionsChanged}></slot>
|
|
1140
|
+
</div>
|
|
1141
|
+
`}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`
|
|
1142
|
+
${this.raiseSelectedOptions&&e.length>0?W`
|
|
1143
|
+
<ft-filter-level
|
|
1144
|
+
id="${this.id}"
|
|
1145
|
+
?multivalued=${this.multivalued}
|
|
1146
|
+
?disabled=${this.disabled}
|
|
1147
|
+
preventNavigation
|
|
1148
|
+
.options=${e}
|
|
1149
|
+
@change=${this.onChange}
|
|
1150
|
+
part="selected-values"
|
|
1151
|
+
></ft-filter-level>
|
|
1152
|
+
<div class="ft-filter--separator">
|
|
1153
|
+
`:null}
|
|
1154
|
+
<ft-snap-scroll horizontal hideScrollbar
|
|
1155
|
+
class="ft-filter--levels"
|
|
1156
|
+
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1157
|
+
${this.renderLevel(o,this.options)}
|
|
1158
|
+
${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)}))}
|
|
1159
|
+
</ft-snap-scroll>
|
|
1160
|
+
`}renderLevel(t,e,i){return W`
|
|
1161
|
+
<ft-filter-level
|
|
1162
|
+
class="${t}"
|
|
1163
|
+
id="${this.id}"
|
|
1164
|
+
filter="${this.filter}"
|
|
1165
|
+
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1166
|
+
?multivalued=${this.multivalued}
|
|
1167
|
+
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1168
|
+
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1169
|
+
.parent=${i}
|
|
1170
|
+
.options=${e}
|
|
1171
|
+
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
1172
|
+
@change=${this.onChange}
|
|
1173
|
+
@go-back=${this.goBack}
|
|
1174
|
+
@display-level=${this.onDisplayLevel}
|
|
1175
|
+
part="values"
|
|
1176
|
+
></ft-filter-level>
|
|
1177
|
+
`}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 eo(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)}}io.elementDefinitions={"ft-button":ki,"ft-filter-level":Ii,"ft-snap-scroll":Vi,"ft-typography":De},io.styles=[Be,v`
|
|
1178
|
+
:host {
|
|
1179
|
+
display: flex;
|
|
1180
|
+
max-height: 100%;
|
|
1181
|
+
max-width: 100%;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
.ft-filter--container {
|
|
1185
|
+
flex-grow: 1;
|
|
1186
|
+
display: flex;
|
|
1187
|
+
flex-direction: column;
|
|
1188
|
+
max-height: 100%;
|
|
1189
|
+
max-width: 100%;
|
|
1190
|
+
color: ${qi};
|
|
1191
|
+
background: ${Gi};
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
.ft-filter--header {
|
|
1195
|
+
display: flex;
|
|
1196
|
+
flex-wrap: wrap;
|
|
1197
|
+
gap: 4px;
|
|
1198
|
+
flex-shrink: 0;
|
|
1199
|
+
padding: 0 10px;
|
|
1200
|
+
margin-bottom: 8px;
|
|
1201
|
+
${ft(zt.fontSize,"14px")};
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
.ft-filter--header ft-button {
|
|
1205
|
+
flex-shrink: 0;
|
|
1206
|
+
margin-left: auto;
|
|
1207
|
+
${ft(gi.iconSize,"18px")};
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
.ft-filter--label {
|
|
1211
|
+
display: block;
|
|
1212
|
+
flex-shrink: 1;
|
|
1213
|
+
flex-grow: 1;
|
|
1214
|
+
word-break: break-word;
|
|
1215
|
+
${ft(zt.lineHeight,"22px")};
|
|
1216
|
+
${ft(zt.fontWeight,"bold")};
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
.ft-filter--filter {
|
|
1220
|
+
flex-shrink: 0;
|
|
1221
|
+
display: flex;
|
|
1222
|
+
margin: 0;
|
|
1223
|
+
margin-bottom: 8px;
|
|
1224
|
+
padding: 0 10px;
|
|
1225
|
+
overflow: hidden;
|
|
1226
|
+
height: 32px;
|
|
1227
|
+
transition: height ${Qi} ${to},
|
|
1228
|
+
margin ${Qi} ${to};
|
|
1229
|
+
transition-delay: 500ms;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
.ft-filter--filter[hidden] {
|
|
1233
|
+
height: 0;
|
|
1234
|
+
margin-bottom: 0;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
input {
|
|
1238
|
+
display: block;
|
|
1239
|
+
width: 100%;
|
|
1240
|
+
border-radius: 4px;
|
|
1241
|
+
border: 1px solid ${Ji};
|
|
1242
|
+
padding: 4px;
|
|
1243
|
+
background-color: ${Gi};
|
|
1244
|
+
color: ${Xi};
|
|
1245
|
+
outline-color: ${Yi};
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
.ft-filter--values {
|
|
1249
|
+
flex-grow: 1;
|
|
1250
|
+
flex-shrink: 1;
|
|
1251
|
+
max-width: 100%;
|
|
1252
|
+
overflow-x: hidden;
|
|
1253
|
+
overflow-y: auto;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
.ft-filter--separator {
|
|
1257
|
+
border-top: 1px solid ${Ji};
|
|
1258
|
+
margin: 4px 10px;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
.ft-filter--levels-container {
|
|
1262
|
+
position: relative;
|
|
1263
|
+
overflow: hidden;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
.ft-filter--levels {
|
|
1267
|
+
position: relative;
|
|
1268
|
+
overflow: hidden;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
ft-filter-level {
|
|
1272
|
+
width: 100%;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
.ft-filter--level-left {
|
|
1276
|
+
height: 0;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
slot {
|
|
1280
|
+
display: none;
|
|
1281
|
+
}
|
|
1282
|
+
`],Zi([i({type:String})],io.prototype,"id",void 0),Zi([i({type:String})],io.prototype,"label",void 0),Zi([i({type:String})],io.prototype,"filterPlaceHolder",void 0),Zi([i({type:String})],io.prototype,"clearButtonLabel",void 0),Zi([i({type:String})],io.prototype,"moreValuesButtonLabel",void 0),Zi([function(t,e){const o=()=>JSON.parse(JSON.stringify(t));return i({type:Object,converter:{fromAttribute:t=>{if(null==t)return o();try{return JSON.parse(t)}catch{return o()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}([])],io.prototype,"options",void 0),Zi([i({type:Boolean})],io.prototype,"multivalued",void 0),Zi([i({type:Boolean})],io.prototype,"disabled",void 0),Zi([i({type:Boolean})],io.prototype,"raiseSelectedOptions",void 0),Zi([i({type:Number})],io.prototype,"displayedValuesLimit",void 0),Zi([n(".ft-filter--slot")],io.prototype,"slotElement",void 0),Zi([n(".ft-filter--container")],io.prototype,"container",void 0),Zi([n(".ft-filter--values")],io.prototype,"valuesContainer",void 0),Zi([n(".ft-filter--levels")],io.prototype,"levelsContainer",void 0),Zi([n(".ft-filter--levels ft-filter-level:last-child")],io.prototype,"lastLevel",void 0),Zi([function(t){return s({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")],io.prototype,"levels",void 0),Zi([o()],io.prototype,"withScroll",void 0),Zi([o()],io.prototype,"filter",void 0),Zi([o()],io.prototype,"slideIn",void 0),Zi([o()],io.prototype,"slideOut",void 0);var oo=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 so extends vt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return W`
|
|
1283
|
+
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1284
|
+
`}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}))}}so.elementDefinitions={},oo([i({type:String})],so.prototype,"label",void 0),oo([i({type:Object,converter:t=>t})],so.prototype,"value",void 0),oo([i({type:Boolean,reflect:!0})],so.prototype,"selected",void 0),oo([i({type:Object})],so.prototype,"subOptions",void 0),oo([n(".ft-filter-option--slot")],so.prototype,"slotElement",void 0),h("ft-filter")(xt(io)),h("ft-filter-option")(xt(so))}();
|