@fluid-topics/ft-switch 0.2.3 → 0.2.7
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-switch-option.js +4 -0
- package/build/ft-switch.inline-styles.js +161 -143
- package/build/ft-switch.light.js +144 -126
- package/build/ft-switch.min.js +158 -140
- package/package.json +7 -7
package/build/ft-switch.min.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=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||[]);f(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 p=e.call(o,t);p||(p=c(t),i.call(o,t,p)),this===window.customElements&&(r.set(s,h),h.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)n.delete(t),u(t,h,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){x.push(this),o.upgrade.apply(o,arguments),x.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let o=this._awaitingUpgrade.get(i);o||this._awaitingUpgrade.set(i,o=new Set),e?o.add(t):o.delete(t)}},window.HTMLElement=function(){let i=a;if(i)return a=void 0,i;const e=r.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),s.set(i,e),i},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,p=t=>{let i=t.getRootNode();if(!h(i)){const t=x[x.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),h(i)||(i=l.get(i)?.getRootNode()||document)}return i.customElements},c=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const o=p(e)||window.customElements,s=o._getDefinition(i);return s?u(e,s):n.set(e,o),e}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,i,!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)}},f=(t,i,e)=>{if(0===i.size||void 0===e)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const n=t.toLowerCase();if(i.has(n)){const t=this.getAttribute(n);o.call(this,n,s),e.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(i.has(o)){const t=this.getAttribute(o);s.call(this,o),e.call(this,o,t,null)}else s.call(this,o)})},d=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):d(e)},u=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),s.set(t,i),a=t;try{new i.elementClass}catch(t){d(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=y.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let x=[document];const g=(t,i,e)=>{const o=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){x.push(this);const t=o.apply(e||this,arguments);return void 0!==t&&l.set(t,this),x.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const v=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){x.push(this),e.set.call(this,t),x.pop()}})};if(v(Element,"innerHTML"),v(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const o=i.call(this,...e);return t.set(o,this),o},e.forEach((i=>{const e=window.ElementInternals.prototype,o=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==s.get(e).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...i)}}));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 i=new Map;t.forEach(((t,e)=>{const o=t.getAttribute("name"),s=i.get(o)||[];this[+e]=t,s.push(t),i.set(o,s)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=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,[]),i=[];for(const e of t){const t=s.get(e);t&&!0!==t.formAssociated||i.push(e)}return new n(i)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=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||[]);f(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 p=e.call(o,t);p||(p=c(t),i.call(o,t,p)),this===window.customElements&&(r.set(s,h),h.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)n.delete(t),u(t,h,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){x.push(this),o.upgrade.apply(o,arguments),x.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let o=this._awaitingUpgrade.get(i);o||this._awaitingUpgrade.set(i,o=new Set),e?o.add(t):o.delete(t)}},window.HTMLElement=function(){let i=a;if(i)return a=void 0,i;const e=r.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),s.set(i,e),i},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,p=t=>{let i=t.getRootNode();if(!h(i)){const t=x[x.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),h(i)||(i=l.get(i)?.getRootNode()||document)}return i.customElements},c=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const o=p(e)||window.customElements,s=o._getDefinition(i);return s?u(e,s):n.set(e,o),e}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,i,!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)}},f=(t,i,e)=>{if(0===i.size||void 0===e)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const n=t.toLowerCase();if(i.has(n)){const t=this.getAttribute(n);o.call(this,n,s),e.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(i.has(o)){const t=this.getAttribute(o);s.call(this,o),e.call(this,o,t,null)}else s.call(this,o)})},d=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):d(e)},u=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),s.set(t,i),a=t;try{new i.elementClass}catch(t){d(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=y.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let x=[document];const g=(t,i,e)=>{const o=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){x.push(this);const t=o.apply(e||this,arguments);return void 0!==t&&l.set(t,this),x.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const v=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){x.push(this),e.set.call(this,t),x.pop()}})};if(v(Element,"innerHTML"),v(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const o=i.call(this,...e);return t.set(o,this),o},e.forEach((i=>{const e=window.ElementInternals.prototype,o=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==s.get(e).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...i)}}));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 i=new Map;t.forEach(((t,e)=>{const o=t.getAttribute("name"),s=i.get(o)||[];this[+e]=t,s.push(t),i.set(o,s)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=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,[]),i=[];for(const e of t){const t=s.get(e);t&&!0!==t.formAssociated||i.push(e)}return new n(i)}})}}try{window.customElements.define("custom-element",null)}catch(re){const t=window.customElements.define;window.customElements.define=(i,e,o)=>{try{t.bind(window.customElements)(i,e,o)}catch(t){console.warn(i,e,o,t)}}}class i{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){this.callbacks=[t],this.debounce(i)}queue(t,i){this.callbacks.push(t),this.debounce(i)}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
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -49,19 +49,19 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.cust
|
|
|
49
49
|
* @license
|
|
50
50
|
* Copyright 2017 Google LLC
|
|
51
51
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
|
-
*/;var v;const
|
|
52
|
+
*/;var v;const b=window.trustedTypes,m=b?b.emptyScript:"",w=window.reactiveElementPolyfillSupport,$={toAttribute(t,i){switch(i){case Boolean:t=t?m:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},O=(t,i)=>i!==t&&(i==i||t==t),S={attribute:!0,type:String,converter:$,reflect:!1,hasChanged:O};class C extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const o=this._$Eh(e,i);void 0!==o&&(this._$Eu.set(o,e),t.push(o))})),t}static createProperty(t,i=S){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,e,i);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(o){const s=this[t];this[i]=o,this.requestUpdate(t,s,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||S}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,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(g(t))}else void 0!==t&&i.push(g(t));return i}static _$Eh(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"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 i,e;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return x(i,this.constructor.elementStyles),i}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 i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,e){this._$AK(t,e)}_$ES(t,i,e=S){var o,s;const n=this.constructor._$Eh(t,e);if(void 0!==n&&!0===e.reflect){const r=(null!==(s=null===(o=e.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==s?s:$.toAttribute)(i,e.type);this._$Ei=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Ei=null}}_$AK(t,i){var e,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===(e=l)||void 0===e?void 0:e.fromAttribute)&&void 0!==o?o:"function"==typeof l?l:null)&&void 0!==s?s:$.fromAttribute;this._$Ei=r,this[r]=a(i,t.type),this._$Ei=null}}requestUpdate(t,i,e){let o=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||O)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,e))):o=!1),!this.isUpdatePending&&o&&(this._$Ep=this._$E_())}async _$E_(){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,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(e)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.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._$EC&&(this._$EC.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
|
|
53
53
|
/**
|
|
54
54
|
* @license
|
|
55
55
|
* Copyright 2017 Google LLC
|
|
56
56
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
57
57
|
*/
|
|
58
|
-
var k;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:C}),(null!==(v=globalThis.reactiveElementVersions)&&void 0!==v?v:globalThis.reactiveElementVersions=[]).push("1.
|
|
58
|
+
var k;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:C}),(null!==(v=globalThis.reactiveElementVersions)&&void 0!==v?v:globalThis.reactiveElementVersions=[]).push("1.3.2");const N=globalThis.trustedTypes,E=N?N.createPolicy("lit-html",{createHTML:t=>t}):void 0,R=`lit$${(Math.random()+"").slice(9)}$`,M="?"+R,F=`<${M}>`,U=document,z=(t="")=>U.createComment(t),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,L=Array.isArray,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,B=/>/g,_=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,D=/'/g,P=/"/g,W=/^(?:script|style|textarea|title)$/i,I=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),H=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),Z=new WeakMap,V=U.createTreeWalker(U,129,null,!1),q=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=T;for(let i=0;i<e;i++){const e=t[i];let l,a,h=-1,p=0;for(;p<e.length&&(r.lastIndex=p,a=r.exec(e),null!==a);)p=r.lastIndex,r===T?"!--"===a[1]?r=A:void 0!==a[1]?r=B:void 0!==a[2]?(W.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=_):void 0!==a[3]&&(r=_):r===_?">"===a[0]?(r=null!=s?s:T,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?_:'"'===a[3]?P:D):r===P||r===D?r=_:r===A||r===B?r=T:(r=_,s=void 0);const c=r===_&&t[i+1].startsWith("/>")?" ":"";n+=r===T?e+F:h>=0?(o.push(l),e.slice(0,h)+"$lit$"+e.slice(h)+R+c):e+R+(-2===h?(o.push(void 0),i):c)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==E?E.createHTML(l):l,o]};class X{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,h]=q(t,i);if(this.el=X.createElement(a,e),V.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=V.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(R)){const e=h[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(R),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?tt:"?"===i[1]?et:"@"===i[1]?ot:Q})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(W.test(o.tagName)){const t=o.textContent.split(R),i=t.length-1;if(i>0){o.textContent=N?N.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],z()),V.nextNode(),l.push({type:2,index:++s});o.append(t[i],z())}}}else if(8===o.nodeType)if(o.data===M)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(R,t+1));)l.push({type:7,index:s}),t+=R.length-1}s++}}static createElement(t,i){const e=U.createElement("template");return e.innerHTML=t,e}}function J(t,i,e=t,o){var s,n,r,l;if(i===H)return i;let a=void 0!==o?null===(s=e._$Cl)||void 0===s?void 0:s[o]:e._$Cu;const h=j(i)?void 0:i._$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,e,o)),void 0!==o?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:e._$Cu=a),void 0!==a&&(i=J(t,a._$AS(t,i.values),a,o)),i}class Y{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:U).importNode(e,!0);V.currentNode=s;let n=V.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new G(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new st(n,this,t)),this.v.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=V.nextNode(),r++)}return s}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class G{constructor(t,i,e,o){var s;this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cg=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=J(this,t,i),j(t)?t===K||null==t||""===t?(this._$AH!==K&&this._$AR(),this._$AH=K):t!==this._$AH&&t!==H&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var i;return L(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==K&&j(this._$AH)?this._$AA.nextSibling.data=t:this.k(U.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$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===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(e);else{const t=new Y(s,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=Z.get(t.strings);return void 0===i&&Z.set(t.strings,i=new X(t)),i}S(t){L(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new G(this.M(z()),this.M(z()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class Q{constructor(t,i,e,o,s){this.type=1,this._$AH=K,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=K}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=J(this,t,i,0),n=!j(t)||t!==this._$AH&&t!==H,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=J(this,o[e+r],i,r),l===H&&(l=this._$AH[r]),n||(n=!j(l)||l!==this._$AH[r]),l===K?t=K:t!==K&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.C(t)}C(t){t===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class tt extends Q{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===K?void 0:t}}const it=N?N.emptyScript:"";class et extends Q{constructor(){super(...arguments),this.type=4}C(t){t&&t!==K?this.element.setAttribute(this.name,it):this.element.removeAttribute(this.name)}}class ot extends Q{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=J(this,t,i,0))&&void 0!==e?e:K)===H)return;const o=this._$AH,s=t===K&&o!==K||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==K&&(o===K||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class st{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){J(this,t)}}const nt=window.litHtmlPolyfillSupport;
|
|
59
59
|
/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
63
|
*/
|
|
64
|
-
var rt,lt;null==nt||nt(X,G),(null!==(k=globalThis.litHtmlVersions)&&void 0!==k?k:globalThis.litHtmlVersions=[]).push("2.
|
|
64
|
+
var rt,lt;null==nt||nt(X,G),(null!==(k=globalThis.litHtmlVersions)&&void 0!==k?k:globalThis.litHtmlVersions=[]).push("2.2.4");class at extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const e=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=e.firstChild),e}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,e)=>{var o,s;const n=null!==(o=null==e?void 0:e.renderBefore)&&void 0!==o?o:i;let r=n._$litPart$;if(void 0===r){const t=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:null;n._$litPart$=r=new G(i.insertBefore(z(),t),t,void 0,null!=e?e:{})}return r._$AI(t),r})(i,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 H}}at.finalized=!0,at._$litElement$=!0,null===(rt=globalThis.litElementHydrateSupport)||void 0===rt||rt.call(globalThis,{LitElement:at});const ht=globalThis.litElementPolyfillSupport;null==ht||ht({LitElement:at}),(null!==(lt=globalThis.litElementVersions)&&void 0!==lt?lt:globalThis.litElementVersions=[]).push("3.2.0");class pt{constructor(t,i,e,o,s){this.name=t,this.category=i,this.fallbackVariable=e,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,i,e){return new pt(t,i,void 0,e)}static extend(t,i,e){return new pt(t,i.category,i,e)}static external(t,i){return new pt(t.name,t.category,t.fallbackVariable,t.defaultValue,i)}get(t){return y`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,i;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(i=this.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}function ct(t,i){return u(`${t.name}: ${i}`)}const ft={colorPrimary:pt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:pt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:pt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:pt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:pt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:pt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:pt.create("--ft-color-error","COLOR","#B00020"),colorOutline:pt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:pt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:pt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:pt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:pt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:pt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:pt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:pt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:pt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:pt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:pt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:pt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:pt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:pt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:pt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:pt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:pt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:pt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:pt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:pt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:pt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:pt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:pt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:pt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:pt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:pt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:pt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:pt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:pt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:pt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:pt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:pt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:pt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:pt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:pt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:pt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:pt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:pt.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:pt.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:pt.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:pt.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:pt.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:pt.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:pt.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:pt.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:pt.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:pt.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:pt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:pt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:pt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:pt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:pt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:pt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:pt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:pt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
65
65
|
/**
|
|
66
66
|
* @license
|
|
67
67
|
* Copyright 2021 Google LLC
|
|
@@ -86,12 +86,12 @@ var rt,lt;null==nt||nt(X,G),(null!==(k=globalThis.litHtmlVersions)&&void 0!==k?k
|
|
|
86
86
|
* Copyright 2017 Google LLC
|
|
87
87
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
88
88
|
*/
|
|
89
|
-
const xt=1,gt=2,vt=t=>(...i)=>({_$litDirective$:t,values:i});class
|
|
89
|
+
const xt=1,gt=2,vt=t=>(...i)=>({_$litDirective$:t,values:i});class bt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e){this._$Ct=t,this._$AM=i,this._$Ci=e}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}
|
|
90
90
|
/**
|
|
91
91
|
* @license
|
|
92
92
|
* Copyright 2018 Google LLC
|
|
93
93
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
94
|
-
*/const
|
|
94
|
+
*/const mt=vt(class extends bt{constructor(t){var i;if(super(t),t.type!==xt||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.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((i=>t[i])).join(" ")+" "}update(t,[i]){var e,o;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(e=this.st)||void 0===e?void 0:e.has(t))&&this.et.add(t);return this.render(i)}const s=t.element.classList;this.et.forEach((t=>{t in i||(s.remove(t),this.et.delete(t))}));for(const t in i){const e=!!i[t];e===this.et.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(e?(s.add(t),this.et.add(t)):(s.remove(t),this.et.delete(t)))}return H}});var wt=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const $t=pt.extend("--ft-ripple-color",ft.colorContent),Ot={color:$t,backgroundColor:pt.extend("--ft-ripple-background-color",$t),opacityContentOnSurfacePressed:pt.external(ft.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:pt.external(ft.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:pt.external(ft.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:pt.external(ft.opacityContentOnSurfaceSelected,"Design system")},St=pt.extend("--ft-ripple-color",ft.colorPrimary),Ct=St,kt=pt.extend("--ft-ripple-background-color",St),Nt=pt.extend("--ft-ripple-color",ft.colorSecondary),Et=Nt,Rt=pt.extend("--ft-ripple-background-color",Nt);class Mt extends dt{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.debouncer=new i(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),n=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{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 I`
|
|
95
95
|
<style>
|
|
96
96
|
.ft-ripple .ft-ripple--effect,
|
|
97
97
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -104,11 +104,11 @@ const xt=1,gt=2,vt=t=>(...i)=>({_$litDirective$:t,values:i});class mt{constructo
|
|
|
104
104
|
top: ${this.originY}px;
|
|
105
105
|
}
|
|
106
106
|
</style>
|
|
107
|
-
<div class="${
|
|
107
|
+
<div class="${mt(t)}">
|
|
108
108
|
<div class="ft-ripple--background"></div>
|
|
109
109
|
<div class="ft-ripple--effect"></div>
|
|
110
110
|
</div>
|
|
111
|
-
`}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
|
|
111
|
+
`}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){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),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 i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),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 i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),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",e),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 i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Mt.elementDefinitions={},Mt.styles=y`
|
|
112
112
|
:host {
|
|
113
113
|
display: contents;
|
|
114
114
|
}
|
|
@@ -127,17 +127,30 @@ const xt=1,gt=2,vt=t=>(...i)=>({_$litDirective$:t,values:i});class mt{constructo
|
|
|
127
127
|
.ft-ripple .ft-ripple--effect {
|
|
128
128
|
position: absolute;
|
|
129
129
|
opacity: 0;
|
|
130
|
-
background-color: ${$t.color};
|
|
131
130
|
}
|
|
132
131
|
|
|
133
|
-
.ft-ripple
|
|
132
|
+
.ft-ripple .ft-ripple--background {
|
|
133
|
+
background-color: ${Ot.backgroundColor};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ft-ripple .ft-ripple--effect {
|
|
137
|
+
background-color: ${Ot.color};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
141
|
+
background-color: ${Rt};
|
|
142
|
+
}
|
|
143
|
+
|
|
134
144
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
135
|
-
background-color: ${
|
|
145
|
+
background-color: ${Et};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
149
|
+
background-color: ${kt};
|
|
136
150
|
}
|
|
137
151
|
|
|
138
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
139
152
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
140
|
-
background-color: ${
|
|
153
|
+
background-color: ${Ct};
|
|
141
154
|
}
|
|
142
155
|
|
|
143
156
|
.ft-ripple .ft-ripple--background {
|
|
@@ -145,6 +158,7 @@ const xt=1,gt=2,vt=t=>(...i)=>({_$litDirective$:t,values:i});class mt{constructo
|
|
|
145
158
|
left: 0;
|
|
146
159
|
height: 100%;
|
|
147
160
|
width: 100%;
|
|
161
|
+
transition: opacity 75ms linear;
|
|
148
162
|
}
|
|
149
163
|
|
|
150
164
|
.ft-ripple .ft-ripple--effect,
|
|
@@ -168,130 +182,130 @@ const xt=1,gt=2,vt=t=>(...i)=>({_$litDirective$:t,values:i});class mt{constructo
|
|
|
168
182
|
}
|
|
169
183
|
|
|
170
184
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
171
|
-
opacity: ${
|
|
185
|
+
opacity: ${Ot.opacityContentOnSurfaceHover};
|
|
172
186
|
}
|
|
173
187
|
|
|
174
188
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
175
|
-
opacity: ${
|
|
189
|
+
opacity: ${Ot.opacityContentOnSurfaceSelected};
|
|
176
190
|
}
|
|
177
191
|
|
|
178
192
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
179
|
-
opacity: ${
|
|
193
|
+
opacity: ${Ot.opacityContentOnSurfaceFocused};
|
|
180
194
|
}
|
|
181
195
|
|
|
182
196
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
183
|
-
opacity: ${
|
|
197
|
+
opacity: ${Ot.opacityContentOnSurfacePressed};
|
|
184
198
|
transform: translate(-50%, -50%) scale(1);
|
|
185
199
|
}
|
|
186
|
-
`,wt([o({type:Boolean})],
|
|
200
|
+
`,wt([o({type:Boolean})],Mt.prototype,"primary",void 0),wt([o({type:Boolean})],Mt.prototype,"secondary",void 0),wt([o({type:Boolean})],Mt.prototype,"unbounded",void 0),wt([o({type:Boolean})],Mt.prototype,"activated",void 0),wt([o({type:Boolean})],Mt.prototype,"selected",void 0),wt([o({type:Boolean})],Mt.prototype,"disabled",void 0),wt([s()],Mt.prototype,"hovered",void 0),wt([s()],Mt.prototype,"focused",void 0),wt([s()],Mt.prototype,"pressed",void 0),wt([s()],Mt.prototype,"rippling",void 0),wt([s()],Mt.prototype,"rippleSize",void 0),wt([s()],Mt.prototype,"originX",void 0),wt([s()],Mt.prototype,"originY",void 0),wt([r(".ft-ripple")],Mt.prototype,"ripple",void 0),wt([r(".ft-ripple--effect")],Mt.prototype,"rippleEffect",void 0),h("ft-ripple")(Mt);
|
|
187
201
|
/**
|
|
188
202
|
* @license
|
|
189
203
|
* Copyright 2020 Google LLC
|
|
190
204
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
191
205
|
*/
|
|
192
|
-
const
|
|
206
|
+
const Ft=Symbol.for(""),Ut=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===Ft)return null===(e=t)||void 0===e?void 0:e._$litStatic$},zt=t=>({_$litStatic$:t,r:Ft}),jt=new Map,Lt=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(n=e[h],s=Ut(n));)a+=s+i[++h],p=!0;l.push(n),r.push(a),h++}if(h===o&&r.push(i[o]),p){const t=r.join("$$lit$$");void 0===(i=jt.get(t))&&(r.raw=r,jt.set(t,i=r)),e=l}return t(i,...e)})(I);var Tt,At=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,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"}(Tt||(Tt={}));const Bt=pt.extend("--ft-typography-font-family",ft.titleFont),_t=pt.extend("--ft-typography-font-family",ft.contentFont),Dt={fontFamily:_t,fontSize:pt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:pt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:pt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:pt.create("--ft-typography-line-height","SIZE","24px"),textTransform:pt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Pt=pt.extend("--ft-typography-title-font-family",Bt),Wt=pt.extend("--ft-typography-title-font-size",Dt.fontSize,"20px"),It=pt.extend("--ft-typography-title-font-weight",Dt.fontWeight,"normal"),Ht=pt.extend("--ft-typography-title-letter-spacing",Dt.letterSpacing,"0.15px"),Kt=pt.extend("--ft-typography-title-line-height",Dt.lineHeight,"24px"),Zt=pt.extend("--ft-typography-title-text-transform",Dt.textTransform,"inherit"),Vt=pt.extend("--ft-typography-title-dense-font-family",Bt),qt=pt.extend("--ft-typography-title-dense-font-size",Dt.fontSize,"14px"),Xt=pt.extend("--ft-typography-title-dense-font-weight",Dt.fontWeight,"normal"),Jt=pt.extend("--ft-typography-title-dense-letter-spacing",Dt.letterSpacing,"0.105px"),Yt=pt.extend("--ft-typography-title-dense-line-height",Dt.lineHeight,"24px"),Gt=pt.extend("--ft-typography-title-dense-text-transform",Dt.textTransform,"inherit"),Qt=pt.extend("--ft-typography-subtitle1-font-family",_t),ti=pt.extend("--ft-typography-subtitle1-font-size",Dt.fontSize,"16px"),ii=pt.extend("--ft-typography-subtitle1-font-weight",Dt.fontWeight,"600"),ei=pt.extend("--ft-typography-subtitle1-letter-spacing",Dt.letterSpacing,"0.144px"),oi=pt.extend("--ft-typography-subtitle1-line-height",Dt.lineHeight,"24px"),si=pt.extend("--ft-typography-subtitle1-text-transform",Dt.textTransform,"inherit"),ni=pt.extend("--ft-typography-subtitle2-font-family",_t),ri=pt.extend("--ft-typography-subtitle2-font-size",Dt.fontSize,"14px"),li=pt.extend("--ft-typography-subtitle2-font-weight",Dt.fontWeight,"normal"),ai=pt.extend("--ft-typography-subtitle2-letter-spacing",Dt.letterSpacing,"0.098px"),hi=pt.extend("--ft-typography-subtitle2-line-height",Dt.lineHeight,"24px"),pi=pt.extend("--ft-typography-subtitle2-text-transform",Dt.textTransform,"inherit"),ci=pt.extend("--ft-typography-body1-font-family",_t),fi=pt.extend("--ft-typography-body1-font-size",Dt.fontSize,"16px"),di=pt.extend("--ft-typography-body1-font-weight",Dt.fontWeight,"normal"),ui=pt.extend("--ft-typography-body1-letter-spacing",Dt.letterSpacing,"0.496px"),yi=pt.extend("--ft-typography-body1-line-height",Dt.lineHeight,"24px"),xi=pt.extend("--ft-typography-body1-text-transform",Dt.textTransform,"inherit"),gi=pt.extend("--ft-typography-body2-font-family",_t),vi=pt.extend("--ft-typography-body2-font-size",Dt.fontSize,"14px"),bi=pt.extend("--ft-typography-body2-font-weight",Dt.fontWeight,"normal"),mi=pt.extend("--ft-typography-body2-letter-spacing",Dt.letterSpacing,"0.252px"),wi=pt.extend("--ft-typography-body2-line-height",Dt.lineHeight,"20px"),$i=pt.extend("--ft-typography-body2-text-transform",Dt.textTransform,"inherit"),Oi=pt.extend("--ft-typography-caption-font-family",_t),Si=pt.extend("--ft-typography-caption-font-size",Dt.fontSize,"12px"),Ci=pt.extend("--ft-typography-caption-font-weight",Dt.fontWeight,"normal"),ki=pt.extend("--ft-typography-caption-letter-spacing",Dt.letterSpacing,"0.396px"),Ni=pt.extend("--ft-typography-caption-line-height",Dt.lineHeight,"16px"),Ei=pt.extend("--ft-typography-caption-text-transform",Dt.textTransform,"inherit"),Ri=pt.extend("--ft-typography-breadcrumb-font-family",_t),Mi=pt.extend("--ft-typography-breadcrumb-font-size",Dt.fontSize,"10px"),Fi=pt.extend("--ft-typography-breadcrumb-font-weight",Dt.fontWeight,"normal"),Ui=pt.extend("--ft-typography-breadcrumb-letter-spacing",Dt.letterSpacing,"0.33px"),zi=pt.extend("--ft-typography-breadcrumb-line-height",Dt.lineHeight,"16px"),ji=pt.extend("--ft-typography-breadcrumb-text-transform",Dt.textTransform,"inherit"),Li=pt.extend("--ft-typography-overline-font-family",_t),Ti=pt.extend("--ft-typography-overline-font-size",Dt.fontSize,"10px"),Ai=pt.extend("--ft-typography-overline-font-weight",Dt.fontWeight,"normal"),Bi=pt.extend("--ft-typography-overline-letter-spacing",Dt.letterSpacing,"1.5px"),_i=pt.extend("--ft-typography-overline-line-height",Dt.lineHeight,"16px"),Di=pt.extend("--ft-typography-overline-text-transform",Dt.textTransform,"uppercase"),Pi={fontFamily:pt.extend("--ft-typography-button-font-family",_t),fontSize:pt.extend("--ft-typography-button-font-size",Dt.fontSize,"14px"),fontWeight:pt.extend("--ft-typography-button-font-weight",Dt.fontWeight,"600"),letterSpacing:pt.extend("--ft-typography-button-letter-spacing",Dt.letterSpacing,"1.246px"),lineHeight:pt.extend("--ft-typography-button-line-height",Dt.lineHeight,"16px"),textTransform:pt.extend("--ft-typography-button-text-transform",Dt.textTransform,"uppercase")},Wi=y`
|
|
193
207
|
.ft-typography--title {
|
|
194
|
-
font-family: ${
|
|
195
|
-
font-size: ${
|
|
196
|
-
font-weight: ${
|
|
197
|
-
letter-spacing: ${
|
|
198
|
-
line-height: ${
|
|
199
|
-
text-transform: ${
|
|
208
|
+
font-family: ${Pt};
|
|
209
|
+
font-size: ${Wt};
|
|
210
|
+
font-weight: ${It};
|
|
211
|
+
letter-spacing: ${Ht};
|
|
212
|
+
line-height: ${Kt};
|
|
213
|
+
text-transform: ${Zt};
|
|
200
214
|
}
|
|
201
|
-
`,
|
|
215
|
+
`,Ii=y`
|
|
202
216
|
.ft-typography--title-dense {
|
|
203
|
-
font-family: ${
|
|
204
|
-
font-size: ${
|
|
205
|
-
font-weight: ${
|
|
206
|
-
letter-spacing: ${
|
|
207
|
-
line-height: ${
|
|
208
|
-
text-transform: ${
|
|
217
|
+
font-family: ${Vt};
|
|
218
|
+
font-size: ${qt};
|
|
219
|
+
font-weight: ${Xt};
|
|
220
|
+
letter-spacing: ${Jt};
|
|
221
|
+
line-height: ${Yt};
|
|
222
|
+
text-transform: ${Gt};
|
|
209
223
|
}
|
|
210
|
-
`,
|
|
224
|
+
`,Hi=y`
|
|
211
225
|
.ft-typography--subtitle1 {
|
|
212
|
-
font-family: ${
|
|
213
|
-
font-size: ${
|
|
214
|
-
font-weight: ${
|
|
215
|
-
letter-spacing: ${
|
|
216
|
-
line-height: ${
|
|
217
|
-
text-transform: ${
|
|
226
|
+
font-family: ${Qt};
|
|
227
|
+
font-size: ${ti};
|
|
228
|
+
font-weight: ${ii};
|
|
229
|
+
letter-spacing: ${ei};
|
|
230
|
+
line-height: ${oi};
|
|
231
|
+
text-transform: ${si};
|
|
218
232
|
}
|
|
219
|
-
`,
|
|
233
|
+
`,Ki=y`
|
|
220
234
|
.ft-typography--subtitle2 {
|
|
221
|
-
font-family: ${
|
|
222
|
-
font-size: ${
|
|
223
|
-
font-weight: ${
|
|
224
|
-
letter-spacing: ${
|
|
225
|
-
line-height: ${
|
|
226
|
-
text-transform: ${
|
|
235
|
+
font-family: ${ni};
|
|
236
|
+
font-size: ${ri};
|
|
237
|
+
font-weight: ${li};
|
|
238
|
+
letter-spacing: ${ai};
|
|
239
|
+
line-height: ${hi};
|
|
240
|
+
text-transform: ${pi};
|
|
227
241
|
}
|
|
228
242
|
|
|
229
|
-
`,
|
|
243
|
+
`,Zi=y`
|
|
230
244
|
.ft-typography--body1 {
|
|
231
|
-
font-family: ${
|
|
232
|
-
font-size: ${
|
|
233
|
-
font-weight: ${
|
|
234
|
-
letter-spacing: ${
|
|
235
|
-
line-height: ${
|
|
236
|
-
text-transform: ${
|
|
245
|
+
font-family: ${ci};
|
|
246
|
+
font-size: ${fi};
|
|
247
|
+
font-weight: ${di};
|
|
248
|
+
letter-spacing: ${ui};
|
|
249
|
+
line-height: ${yi};
|
|
250
|
+
text-transform: ${xi};
|
|
237
251
|
}
|
|
238
|
-
`,
|
|
252
|
+
`,Vi=y`
|
|
239
253
|
.ft-typography--body2 {
|
|
240
|
-
font-family: ${
|
|
241
|
-
font-size: ${
|
|
242
|
-
font-weight: ${
|
|
243
|
-
letter-spacing: ${
|
|
244
|
-
line-height: ${
|
|
245
|
-
text-transform: ${
|
|
254
|
+
font-family: ${gi};
|
|
255
|
+
font-size: ${vi};
|
|
256
|
+
font-weight: ${bi};
|
|
257
|
+
letter-spacing: ${mi};
|
|
258
|
+
line-height: ${wi};
|
|
259
|
+
text-transform: ${$i};
|
|
246
260
|
}
|
|
247
|
-
`,
|
|
261
|
+
`,qi=y`
|
|
248
262
|
.ft-typography--caption {
|
|
249
|
-
font-family: ${
|
|
250
|
-
font-size: ${
|
|
251
|
-
font-weight: ${
|
|
252
|
-
letter-spacing: ${
|
|
253
|
-
line-height: ${
|
|
254
|
-
text-transform: ${
|
|
263
|
+
font-family: ${Oi};
|
|
264
|
+
font-size: ${Si};
|
|
265
|
+
font-weight: ${Ci};
|
|
266
|
+
letter-spacing: ${ki};
|
|
267
|
+
line-height: ${Ni};
|
|
268
|
+
text-transform: ${Ei};
|
|
255
269
|
}
|
|
256
|
-
`,
|
|
270
|
+
`,Xi=y`
|
|
257
271
|
.ft-typography--breadcrumb {
|
|
258
|
-
font-family: ${
|
|
259
|
-
font-size: ${
|
|
260
|
-
font-weight: ${
|
|
261
|
-
letter-spacing: ${
|
|
262
|
-
line-height: ${
|
|
263
|
-
text-transform: ${
|
|
272
|
+
font-family: ${Ri};
|
|
273
|
+
font-size: ${Mi};
|
|
274
|
+
font-weight: ${Fi};
|
|
275
|
+
letter-spacing: ${Ui};
|
|
276
|
+
line-height: ${zi};
|
|
277
|
+
text-transform: ${ji};
|
|
264
278
|
}
|
|
265
|
-
`,
|
|
279
|
+
`,Ji=y`
|
|
266
280
|
.ft-typography--overline {
|
|
267
|
-
font-family: ${
|
|
268
|
-
font-size: ${
|
|
269
|
-
font-weight: ${
|
|
270
|
-
letter-spacing: ${
|
|
271
|
-
line-height: ${
|
|
272
|
-
text-transform: ${
|
|
281
|
+
font-family: ${Li};
|
|
282
|
+
font-size: ${Ti};
|
|
283
|
+
font-weight: ${Ai};
|
|
284
|
+
letter-spacing: ${Bi};
|
|
285
|
+
line-height: ${_i};
|
|
286
|
+
text-transform: ${Di};
|
|
273
287
|
}
|
|
274
|
-
`,
|
|
288
|
+
`,Yi=y`
|
|
275
289
|
.ft-typography--button {
|
|
276
|
-
font-family: ${
|
|
277
|
-
font-size: ${
|
|
278
|
-
font-weight: ${
|
|
279
|
-
letter-spacing: ${
|
|
280
|
-
line-height: ${
|
|
281
|
-
text-transform: ${
|
|
290
|
+
font-family: ${Pi.fontFamily};
|
|
291
|
+
font-size: ${Pi.fontSize};
|
|
292
|
+
font-weight: ${Pi.fontWeight};
|
|
293
|
+
letter-spacing: ${Pi.letterSpacing};
|
|
294
|
+
line-height: ${Pi.lineHeight};
|
|
295
|
+
text-transform: ${Pi.textTransform};
|
|
282
296
|
}
|
|
283
|
-
`;class
|
|
284
|
-
<${
|
|
297
|
+
`;class Gi extends dt{constructor(){super(...arguments),this.variant=Tt.body1}render(){return this.element?Lt`
|
|
298
|
+
<${zt(this.element)}
|
|
285
299
|
class="ft-typography ft-typography--${this.variant}">
|
|
286
300
|
<slot></slot>
|
|
287
|
-
</${
|
|
288
|
-
`:
|
|
301
|
+
</${zt(this.element)}>
|
|
302
|
+
`:Lt`
|
|
289
303
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
290
|
-
`}}
|
|
304
|
+
`}}Gi.styles=[Wi,Ii,Hi,Ki,Zi,Vi,qi,Xi,Ji,Yi,y`
|
|
291
305
|
.ft-typography {
|
|
292
306
|
vertical-align: inherit;
|
|
293
307
|
}
|
|
294
|
-
`],
|
|
308
|
+
`],At([o()],Gi.prototype,"element",void 0),At([o()],Gi.prototype,"variant",void 0),h("ft-typography")(Gi);var Qi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const te=pt.create("--ft-tooltip-distance","SIZE","4px"),ie=pt.create("--ft-tooltip-color","COLOR","#FFFFFF"),ee=pt.create("--ft-tooltip-background-color","COLOR","#666666"),oe=pt.create("--ft-tooltip-z-index","NUMBER","1"),se=pt.external(ft.borderRadiusS,"Design system");class ne extends dt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i,this.revealDebouncer=new i}render(){return I`
|
|
295
309
|
<div part="container"
|
|
296
310
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
297
311
|
@mouseenter=${this.onHover}
|
|
@@ -306,7 +320,7 @@ const St=t=>({_$litStatic$:t}),Ct=new Map,kt=(t=>(i,...e)=>{var o;const s=e.leng
|
|
|
306
320
|
</div>
|
|
307
321
|
<slot></slot>
|
|
308
322
|
</div>
|
|
309
|
-
`}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 i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.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=i.height+"px",s.left=o+"px";break;case"left":s.top=e+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=e+"px",s.left=i.width+"px"}s.maxWidth=Math.max(i.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())}}
|
|
323
|
+
`}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 i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.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=i.height+"px",s.left=o+"px";break;case"left":s.top=e+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=e+"px",s.left=i.width+"px"}s.maxWidth=Math.max(i.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())}}ne.elementDefinitions={"ft-typography":Gi},ne.styles=y`
|
|
310
324
|
.ft-tooltip--container {
|
|
311
325
|
display: block;
|
|
312
326
|
position: relative;
|
|
@@ -324,47 +338,47 @@ const St=t=>({_$litStatic$:t}),Ct=new Map,kt=(t=>(i,...e)=>{var o;const s=e.leng
|
|
|
324
338
|
width: max-content;
|
|
325
339
|
max-width: 150px;
|
|
326
340
|
text-align: center;
|
|
327
|
-
padding: ${
|
|
328
|
-
z-index: ${
|
|
341
|
+
padding: ${te};
|
|
342
|
+
z-index: ${oe};
|
|
329
343
|
}
|
|
330
344
|
|
|
331
345
|
.ft-tooltip--content {
|
|
332
346
|
padding: 4px 8px;
|
|
333
|
-
border-radius: ${
|
|
334
|
-
background-color: ${
|
|
335
|
-
color: ${
|
|
347
|
+
border-radius: ${se};
|
|
348
|
+
background-color: ${ee};
|
|
349
|
+
color: ${ie};
|
|
336
350
|
top: -500px;
|
|
337
351
|
left: -500px;
|
|
338
352
|
position: relative;
|
|
339
353
|
word-break: break-word;
|
|
340
354
|
}
|
|
341
|
-
`,
|
|
355
|
+
`,Qi([o()],ne.prototype,"text",void 0),Qi([o({type:Boolean})],ne.prototype,"manual",void 0),Qi([o({type:Boolean})],ne.prototype,"inline",void 0),Qi([o({type:Number})],ne.prototype,"delay",void 0),Qi([o()],ne.prototype,"position",void 0),Qi([
|
|
342
356
|
/**
|
|
343
357
|
* @license
|
|
344
358
|
* Copyright 2017 Google LLC
|
|
345
359
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
346
360
|
*/
|
|
347
|
-
function(t,i,e){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:i},e?function(t){const{slot:i,selector:e}=null!=t?t:{};return n({descriptor:o=>({get(){var o;const s="slot"+(i?`[name=${i}]`:":not([name])"),n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(s),r=null!=n?a(n,t):[];return e?r.filter((t=>t.matches(e))):r},enumerable:!0,configurable:!0})})}({slot:s,flatten:i,selector:e}):n({descriptor:t=>({get(){var t,i;const e="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e);return null!==(i=null==n?void 0:n.assignedNodes(o))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}("",!0)],
|
|
361
|
+
function(t,i,e){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:i},e?function(t){const{slot:i,selector:e}=null!=t?t:{};return n({descriptor:o=>({get(){var o;const s="slot"+(i?`[name=${i}]`:":not([name])"),n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(s),r=null!=n?a(n,t):[];return e?r.filter((t=>t.matches(e))):r},enumerable:!0,configurable:!0})})}({slot:s,flatten:i,selector:e}):n({descriptor:t=>({get(){var t,i;const e="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e);return null!==(i=null==n?void 0:n.assignedNodes(o))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}("",!0)],ne.prototype,"slotNodes",void 0),Qi([r(".ft-tooltip--container")],ne.prototype,"container",void 0),Qi([r("slot")],ne.prototype,"target",void 0),Qi([r(".ft-tooltip")],ne.prototype,"tooltip",void 0),Qi([r(".ft-tooltip--content")],ne.prototype,"tooltipContent",void 0),Qi([s()],ne.prototype,"visible",void 0),h("ft-tooltip")(ne);
|
|
348
362
|
/**
|
|
349
363
|
* @license
|
|
350
364
|
* Copyright 2017 Google LLC
|
|
351
365
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
352
366
|
*/
|
|
353
|
-
class
|
|
367
|
+
class re extends bt{constructor(t){if(super(t),this.it=K,t.type!==gt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===K||null==t)return this.ft=void 0,this.it=t;if(t===H)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const i=[t];return i.raw=i,this.ft={_$litType$:this.constructor.resultType,strings:i,values:[]}}}re.directiveName="unsafeHTML",re.resultType=1;const le=vt(re);var ae,he;!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=""}(ae||(ae={})),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=""}(he||(he={})),new Map([...["abw"].map((t=>[t,he.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,he.AUDIO])),...["avi"].map((t=>[t,he.AVI])),...["chm","xhs"].map((t=>[t,he.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,he.CODE])),...["csv"].map((t=>[t,he.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,he.DITA])),...["epub"].map((t=>[t,he.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,he.EXCEL])),...["flac"].map((t=>[t,he.FLAC])),...["gif"].map((t=>[t,he.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,he.GZIP])),...["html","htm","xhtml"].map((t=>[t,he.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,he.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,he.JPEG])),...["json"].map((t=>[t,he.JSON])),...["m4a","m4p"].map((t=>[t,he.M4A])),...["mov","qt"].map((t=>[t,he.MOV])),...["mp3"].map((t=>[t,he.MP3])),...["mp4","m4v"].map((t=>[t,he.MP4])),...["ogg","oga"].map((t=>[t,he.OGG])),...["pdf","ps"].map((t=>[t,he.PDF])),...["png"].map((t=>[t,he.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,he.POWERPOINT])),...["rar"].map((t=>[t,he.RAR])),...["stp"].map((t=>[t,he.STP])),...["txt","rtf","md","mdown"].map((t=>[t,he.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,he.VIDEO])),...["wav"].map((t=>[t,he.WAV])),...["wma"].map((t=>[t,he.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,he.WORD])),...["xml","xsl","rdf"].map((t=>[t,he.XML])),...["yaml","yml","x-yaml"].map((t=>[t,he.YAML])),...["zip"].map((t=>[t,he.ZIP]))]);var pe,ce=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(pe||(pe={}));const fe={size:pt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:pt.extend("--ft-icon-fluid-topics-font-family",pt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:pt.extend("--ft-icon-file-format-font-family",pt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:pt.extend("--ft-icon-material-font-family",pt.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class de extends dt{constructor(){super(...arguments),this.variant=pe.fluid_topics}render(){return I`
|
|
354
368
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
355
|
-
${
|
|
369
|
+
${le(this.getIcon())}
|
|
356
370
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
357
371
|
</i>
|
|
358
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}getIcon(){var t,i;let e=this.textContent;return this.variant===
|
|
372
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}getIcon(){var t,i;let e=this.textContent;return this.variant===pe.file_format?null!==(t=he[e.toUpperCase()])&&void 0!==t?t:e:this.variant===pe.fluid_topics?null!==(i=ae[e.toUpperCase()])&&void 0!==i?i:e:K}}de.elementDefinitions={},de.styles=y`
|
|
359
373
|
:host, i.ft-icon {
|
|
360
374
|
display: inline-block;
|
|
361
|
-
width: ${
|
|
362
|
-
height: ${
|
|
375
|
+
width: ${fe.size};
|
|
376
|
+
height: ${fe.size};
|
|
363
377
|
text-align: center;
|
|
364
378
|
}
|
|
365
379
|
|
|
366
380
|
i.ft-icon {
|
|
367
|
-
font-size: ${
|
|
381
|
+
font-size: ${fe.size};
|
|
368
382
|
line-height: 1;
|
|
369
383
|
font-weight: normal;
|
|
370
384
|
text-transform: none;
|
|
@@ -378,17 +392,17 @@ class Yi extends mt{constructor(t){if(super(t),this.it=K,t.type!==gt)throw Error
|
|
|
378
392
|
}
|
|
379
393
|
|
|
380
394
|
.ft-icon--fluid-topics {
|
|
381
|
-
font-family: ${
|
|
395
|
+
font-family: ${fe.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
382
396
|
}
|
|
383
397
|
|
|
384
398
|
.ft-icon--file-format {
|
|
385
|
-
font-family: ${
|
|
399
|
+
font-family: ${fe.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
386
400
|
}
|
|
387
401
|
|
|
388
402
|
.ft-icon--material {
|
|
389
|
-
font-family: ${
|
|
403
|
+
font-family: ${fe.materialFontFamily}, "Material Icons", sans-serif;
|
|
390
404
|
}
|
|
391
|
-
`,
|
|
405
|
+
`,ce([o()],de.prototype,"variant",void 0),ce([r("slot")],de.prototype,"slottedContent",void 0),h("ft-icon")(de);const ue={textColor:pt.extend("--ft-switch-text-color",ft.colorOnSurfaceHigh),backgroundColor:pt.extend("--ft-switch-background-color",ft.colorSurface),selectedTextColor:pt.extend("--ft-switch-selected-text-color",ft.colorPrimary),selectedBackgroundColor:pt.extend("--ft-switch-selected-background-color",ft.colorPrimary),borderColor:pt.extend("--ft-switch-border-color",ft.colorOutline),borderRadius:pt.extend("--ft-switch-border-radius",ft.borderRadiusL),fontSize:pt.extend("--ft-switch-font-size",Pi.fontSize),iconSize:pt.create("--ft-switch-icon-size","SIZE","24px"),iconColor:pt.extend("--ft-switch-text-color",ft.colorOnSurfaceMedium),rippleColor:pt.extend("--ft-switch-ripple-color",ft.colorPrimary),outlineColor:pt.extend("--ft-switch-outline-color",ft.colorPrimary)},ye={borderRadiusLeft:pt.extend("--ft-switch-option-border-radius-left",ft.borderRadiusL),borderRadiusRight:pt.extend("--ft-switch-option-border-radius-right",ft.borderRadiusL),borderWidthLeft:pt.create("--ft-switch-option-border-width-left","SIZE","1px"),borderWidthRight:pt.create("--ft-switch-option-border-width-right","SIZE","1px"),borderWidthVertical:pt.create("--ft-switch-option-border-width-vertical","SIZE","1px")};var xe=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class ge extends CustomEvent{constructor(){super("option-change",{bubbles:!0})}}class ve extends dt{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1}static get styles(){return y`
|
|
392
406
|
.ft-switch-option {
|
|
393
407
|
position: relative;
|
|
394
408
|
display: inline-block;
|
|
@@ -402,27 +416,31 @@ class Yi extends mt{constructor(t){if(super(t),this.it=K,t.type!==gt)throw Error
|
|
|
402
416
|
}
|
|
403
417
|
|
|
404
418
|
.ft-switch-option--content {
|
|
405
|
-
--ft-switch-option-internal-line-height: calc(${
|
|
406
|
-
--ft-switch-option-internal-content-height: max(var(--ft-switch-option-internal-line-height), ${
|
|
419
|
+
--ft-switch-option-internal-line-height: calc(${ue.fontSize} + 2px);
|
|
420
|
+
--ft-switch-option-internal-content-height: max(var(--ft-switch-option-internal-line-height), ${ue.iconSize});
|
|
407
421
|
|
|
408
422
|
border-style: solid;
|
|
409
|
-
border-color: ${
|
|
410
|
-
border-width: ${
|
|
411
|
-
border-radius: ${
|
|
423
|
+
border-color: ${ue.borderColor};
|
|
424
|
+
border-width: ${ye.borderWidthVertical} ${ye.borderWidthRight} ${ye.borderWidthVertical} ${ye.borderWidthLeft};
|
|
425
|
+
border-radius: ${ye.borderRadiusLeft} ${ye.borderRadiusRight} ${ye.borderRadiusRight} ${ye.borderRadiusLeft};
|
|
412
426
|
display: flex;
|
|
413
427
|
align-items: center;
|
|
414
428
|
justify-content: center;
|
|
415
429
|
overflow: hidden;
|
|
416
430
|
|
|
417
|
-
${ct(
|
|
431
|
+
${ct(fe.size,ue.iconSize)};
|
|
418
432
|
padding: 6px 8px;
|
|
419
|
-
background-color: ${
|
|
433
|
+
background-color: ${ue.backgroundColor};
|
|
420
434
|
-webkit-mask-image: radial-gradient(white, black);
|
|
421
435
|
}
|
|
422
436
|
|
|
437
|
+
.ft-switch-option--content > *:not(ft-ripple) {
|
|
438
|
+
position: relative;
|
|
439
|
+
}
|
|
440
|
+
|
|
423
441
|
.ft-switch-option--input:checked + .ft-switch-option--content:before {
|
|
424
|
-
background-color: ${
|
|
425
|
-
border-radius: ${
|
|
442
|
+
background-color: ${ue.selectedBackgroundColor};
|
|
443
|
+
border-radius: ${ye.borderRadiusLeft} ${ye.borderRadiusRight} ${ye.borderRadiusRight} ${ye.borderRadiusLeft};
|
|
426
444
|
position: absolute;
|
|
427
445
|
inset: 0;
|
|
428
446
|
content: "";
|
|
@@ -431,18 +449,18 @@ class Yi extends mt{constructor(t){if(super(t),this.it=K,t.type!==gt)throw Error
|
|
|
431
449
|
}
|
|
432
450
|
|
|
433
451
|
.ft-switch-option--label {
|
|
434
|
-
color: ${
|
|
452
|
+
color: ${ue.textColor};
|
|
435
453
|
overflow: hidden;
|
|
436
454
|
white-space: nowrap;
|
|
437
455
|
text-overflow: ellipsis;
|
|
438
456
|
display: block;
|
|
439
457
|
margin: 0 8px;
|
|
440
|
-
${ct(
|
|
441
|
-
${ct(
|
|
458
|
+
${ct(Pi.fontSize,ue.fontSize)};
|
|
459
|
+
${ct(Pi.lineHeight,"var(--ft-switch-option-internal-content-height)")}
|
|
442
460
|
}
|
|
443
461
|
|
|
444
462
|
.ft-switch-option--input:checked + .ft-switch-option--content .ft-switch-option--label {
|
|
445
|
-
color: ${
|
|
463
|
+
color: ${ue.selectedTextColor};
|
|
446
464
|
}
|
|
447
465
|
|
|
448
466
|
.ft-switch-option--label[hidden] {
|
|
@@ -450,7 +468,7 @@ class Yi extends mt{constructor(t){if(super(t),this.it=K,t.type!==gt)throw Error
|
|
|
450
468
|
}
|
|
451
469
|
|
|
452
470
|
.ft-switch-option--ripple {
|
|
453
|
-
${ct(
|
|
471
|
+
${ct(Ot.color,ue.rippleColor)};
|
|
454
472
|
}
|
|
455
473
|
|
|
456
474
|
ft-icon, ft-ripple, ft-typography {
|
|
@@ -463,14 +481,14 @@ class Yi extends mt{constructor(t){if(super(t),this.it=K,t.type!==gt)throw Error
|
|
|
463
481
|
|
|
464
482
|
ft-icon {
|
|
465
483
|
flex-shrink: 0;
|
|
466
|
-
color: ${
|
|
484
|
+
color: ${ue.iconColor};
|
|
467
485
|
}
|
|
468
486
|
|
|
469
487
|
.ft-switch-option--input:checked + .ft-switch-option--content ft-icon {
|
|
470
|
-
color: ${
|
|
488
|
+
color: ${ue.selectedTextColor};
|
|
471
489
|
}
|
|
472
|
-
`}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new
|
|
473
|
-
<label for="input" class=${
|
|
490
|
+
`}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new ge)}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon};return this.addTooltip(I`
|
|
491
|
+
<label for="input" class=${mt(t)}>
|
|
474
492
|
<input id="input" type="radio" class="ft-switch-option--input"
|
|
475
493
|
.checked=${this.selected}
|
|
476
494
|
@change=${this.onChange}>
|
|
@@ -490,14 +508,14 @@ class Yi extends mt{constructor(t){if(super(t),this.it=K,t.type!==gt)throw Error
|
|
|
490
508
|
${t}
|
|
491
509
|
</ft-tooltip>
|
|
492
510
|
`}onChange(){this.selected=!0}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?I`
|
|
493
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:K}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}
|
|
511
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:K}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}ve.elementDefinitions={"ft-ripple":Mt,"ft-typography":Gi,"ft-tooltip":ne,"ft-icon":de},xe([o({type:String})],ve.prototype,"value",void 0),xe([o({type:String})],ve.prototype,"icon",void 0),xe([o({type:String})],ve.prototype,"label",void 0),xe([o({type:String})],ve.prototype,"tooltipPosition",void 0),xe([o({type:Boolean,reflect:!0})],ve.prototype,"selected",void 0),xe([o({type:Boolean})],ve.prototype,"trailingIcon",void 0),xe([r(".ft-switch-option--content slot")],ve.prototype,"slottedContent",void 0),xe([r(".ft-switch-option--input")],ve.prototype,"input",void 0);var be=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class me extends CustomEvent{constructor(t){super("change",{detail:t})}}class we extends dt{constructor(){super(...arguments),this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}updated(t){var i;super.updated(t),t.has("selectedOption")&&(this.updateOptions(),this.dispatchEvent(new me(null===(i=this.selectedOption)||void 0===i?void 0:i.value)))}static get styles(){return y`
|
|
494
512
|
:host {
|
|
495
513
|
display: inline-block;
|
|
496
514
|
}
|
|
497
515
|
|
|
498
516
|
.ft-switch {
|
|
499
|
-
border-radius: ${
|
|
500
|
-
outline-color: ${
|
|
517
|
+
border-radius: ${ue.borderRadius};
|
|
518
|
+
outline-color: ${ue.outlineColor};
|
|
501
519
|
}
|
|
502
520
|
|
|
503
521
|
.ft-switch slot {
|
|
@@ -506,22 +524,22 @@ class Yi extends mt{constructor(t){if(super(t),this.it=K,t.type!==gt)throw Error
|
|
|
506
524
|
}
|
|
507
525
|
|
|
508
526
|
.ft-switch slot::slotted(ft-switch-option) {
|
|
509
|
-
${ct(
|
|
510
|
-
${ct(
|
|
511
|
-
${ct(
|
|
527
|
+
${ct(ye.borderRadiusLeft,"0")};
|
|
528
|
+
${ct(ye.borderRadiusRight,"0")};
|
|
529
|
+
${ct(ye.borderWidthLeft,"0")};
|
|
512
530
|
}
|
|
513
531
|
|
|
514
532
|
.ft-switch slot::slotted(ft-switch-option:first-child) {
|
|
515
|
-
${ct(
|
|
516
|
-
${ct(
|
|
533
|
+
${ct(ye.borderRadiusLeft,ue.borderRadius)};
|
|
534
|
+
${ct(ye.borderWidthLeft,"1px")};
|
|
517
535
|
}
|
|
518
536
|
|
|
519
537
|
.ft-switch slot::slotted(ft-switch-option:last-child) {
|
|
520
|
-
${ct(
|
|
538
|
+
${ct(ye.borderRadiusRight,ue.borderRadius)};
|
|
521
539
|
}
|
|
522
540
|
`}render(){return I`
|
|
523
541
|
<div class="ft-switch" @keydown=${this.onKeyDown} tabindex="0">
|
|
524
542
|
<slot @slotchange=${this.onSlotchange}
|
|
525
543
|
@option-change=${this.onOptionChange}></slot>
|
|
526
544
|
</div>
|
|
527
|
-
`}onKeyDown(t){let i;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=i&&(t.preventDefault(),this.options[this.fixIndex(i)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof
|
|
545
|
+
`}onKeyDown(t){let i;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=i&&(t.preventDefault(),this.options[this.fixIndex(i)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof ve&&this.registerOption(t)})),this.selectedOption=this.options.find((t=>t.selected))}registerOption(t){t.setAttribute("tabindex","-1"),this.options.push(t)}onOptionChange(t){let i=t.target;i.selected?this.selectedOption=i:this.selectedOption=this.options.find((t=>t.selected))}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach((t=>{t.selected=t==this.selectedOption}))}}we.elementDefinitions={},be([r(".ft-switch slot")],we.prototype,"slottedContent",void 0),be([s()],we.prototype,"selectedOption",void 0),be([r(".ft-switch")],we.prototype,"ftSwitchDiv",void 0),h("ft-switch")(we),h("ft-switch-option")(ve),t.FtSwitch=we,t.FtSwitchChange=me,t.FtSwitchCssVariables=ue,t.FtSwitchOption=ve,t.SwitchOptionChange=ge,Object.defineProperty(t,"t",{value:!0})}({});
|