@fluid-topics/ft-tooltip 0.2.17 → 0.2.20

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.
@@ -73,7 +73,7 @@ var st,rt;null==nt||nt(J,G),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?N
73
73
  <style>${t}</style>
74
74
  `))}
75
75
  ${this.getTemplate()}
76
- `}updated(t){super.updated(t),setTimeout((()=>{var i;this.contentAvailableCallback(t),(null===(i=this.exportpartsPrefix)||void 0===i?void 0:i.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var i,e,o,n,s,r;let a=[];for(let l of t){let t=null==l?void 0:l.trim();if(t)for(let l of null!==(e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){let i=null!==(n=null===(o=l.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],e=null!==(r=null===(s=l.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];const h=[...new Set([...i,...e])].filter((t=>null!=t&&t.trim().length>0)).map((t=>t.trim())).map((i=>`${i}:${t}--${i}`));a.push(...h)}}this.setAttribute("exportparts",a.join(", "))}contentAvailableCallback(t){}}ft([o()],dt.prototype,"exportpartsPrefix",void 0),ft([function(t,i){const e=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},...null!=i?i:{}})}([])],dt.prototype,"exportpartsPrefixes",void 0),d`
76
+ `}updated(t){super.updated(t),setTimeout((()=>{var i;this.contentAvailableCallback(t),(null===(i=this.exportpartsPrefix)||void 0===i?void 0:i.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var i,e,o,n,s,r;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const i=null!==(n=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],e=null!==(r=null===(s=t.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...i,...e).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((i=>`${t}:${i}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}contentAvailableCallback(t){}}ft([o()],dt.prototype,"exportpartsPrefix",void 0),ft([function(t,i){const e=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},...null!=i?i:{}})}([])],dt.prototype,"exportpartsPrefixes",void 0),d`
77
77
  .ft-no-text-select {
78
78
  -webkit-touch-callout: none;
79
79
  -webkit-user-select: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-tooltip",
3
- "version": "0.2.17",
3
+ "version": "0.2.20",
4
4
  "description": "A simple tooltip component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,9 +19,9 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-typography": "^0.2.17",
23
- "@fluid-topics/ft-wc-utils": "^0.2.17",
22
+ "@fluid-topics/ft-typography": "^0.2.20",
23
+ "@fluid-topics/ft-wc-utils": "^0.2.20",
24
24
  "lit": "2.1.3"
25
25
  },
26
- "gitHead": "7f1e7d4377a6bac24d6d797b342f25166ee44031"
26
+ "gitHead": "12b770753cd907c340153c5f9fed0909ecb1eefc"
27
27
  }
@@ -1,251 +0,0 @@
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,i=window.customElements.define,e=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){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(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);f(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let c=e.call(o,t);c||(c=p(t),i.call(o,t,c)),this===window.customElements&&(r.set(n,h),h.standInClass=c);const u=this._awaitingUpgrade.get(t);if(u){this._awaitingUpgrade.delete(t);for(const t of u)s.delete(t),d(t,h,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){g.push(this),o.upgrade.apply(o,arguments),g.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=l;if(i)return l=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),n.set(i,e),i},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let i=t.getRootNode();if(!h(i)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),h(i)||(i=a.get(i)?.getRootNode()||document)}return i.customElements},p=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const o=c(e)||window.customElements,n=o._getDefinition(i);return n?d(e,n):s.set(e,o),e}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,i,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.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,n){const s=t.toLowerCase();if(i.has(s)){const t=this.getAttribute(s);o.call(this,s,n),e.call(this,s,t,n)}else o.call(this,s,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(i.has(o)){const t=this.getAttribute(o);n.call(this,o),e.call(this,o,t,null)}else n.call(this,o)})},u=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):u(e)},d=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),n.set(t,i),l=t;try{new i.elementClass}catch(t){u(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 g=[document];const v=(t,i,e)=>{const o=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){g.push(this);const t=o.apply(e||this,arguments);return void 0!==t&&a.set(t,this),g.pop(),t}};v(ShadowRoot,"createElement",document),v(ShadowRoot,"importNode",document),v(Element,"insertAdjacentHTML");const b=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){g.push(this),e.set.call(this,t),g.pop()}})};if(b(Element,"innerHTML"),b(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!==n.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 s{constructor(t){const i=new Map;t.forEach(((t,e)=>{const o=t.getAttribute("name"),n=i.get(o)||[];this[+e]=t,n.push(t),i.set(o,n)})),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=n.get(e);t&&!0!==t.formAssociated||i.push(e)}return new s(i)}})}}try{window.customElements.define("custom-element",null)}catch(yt){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 t{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
- /**
19
- * @license
20
- * Copyright 2017 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */const i=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(e){e.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,t)}};function e(t){return(e,o)=>void 0!==o?((t,i,e)=>{i.constructor.createProperty(e,t)})(t,e,o):i(t,e)
23
- /**
24
- * @license
25
- * Copyright 2017 Google LLC
26
- * SPDX-License-Identifier: BSD-3-Clause
27
- */}
28
- /**
29
- * @license
30
- * Copyright 2017 Google LLC
31
- * SPDX-License-Identifier: BSD-3-Clause
32
- */
33
- const o=({finisher:t,descriptor:i})=>(e,o)=>{var n;if(void 0===o){const o=null!==(n=e.originalKey)&&void 0!==n?n:e.key,s=null!=i?{kind:"method",placement:"prototype",key:o,descriptor:i(e.key)}:{...e,key:o};return null!=t&&(s.finisher=function(i){t(i,o)}),s}{const n=e.constructor;void 0!==i&&Object.defineProperty(e,o,i(o)),null==t||t(n,o)}}
34
- /**
35
- * @license
36
- * Copyright 2017 Google LLC
37
- * SPDX-License-Identifier: BSD-3-Clause
38
- */;function n(t,i){return o({descriptor:e=>{const o={get(){var i,e;return null!==(e=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==e?e:null},enumerable:!0,configurable:!0};if(i){const i="symbol"==typeof e?Symbol():"__"+e;o.get=function(){var e,o;return void 0===this[i]&&(this[i]=null!==(o=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==o?o:null),this[i]}}return o}})}
39
- /**
40
- * @license
41
- * Copyright 2021 Google LLC
42
- * SPDX-License-Identifier: BSD-3-Clause
43
- */var s;const r=null!=(null===(s=window.HTMLSlotElement)||void 0===s?void 0:s.prototype.assignedElements)?(t,i)=>t.assignedElements(i):(t,i)=>t.assignedNodes(i).filter((t=>t.nodeType===Node.ELEMENT_NODE));const a=t=>i=>{window.customElements.get(t)||window.customElements.define(t,i)};
44
- /**
45
- * @license
46
- * Copyright 2019 Google LLC
47
- * SPDX-License-Identifier: BSD-3-Clause
48
- */
49
- const l=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,h=Symbol(),c=new Map;class p{constructor(t,i){if(this._$cssResult$=!0,i!==h)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=c.get(this.cssText);return l&&void 0===t&&(c.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const f=t=>new p("string"==typeof t?t:t+"",h),u=(t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,e,o)=>i+(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.")})(e)+t[o+1]),t[0]);return new p(e,h)},d=(t,i)=>{l?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((i=>{const e=document.createElement("style"),o=window.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}))},y=l?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return f(i)})(t):t
50
- /**
51
- * @license
52
- * Copyright 2017 Google LLC
53
- * SPDX-License-Identifier: BSD-3-Clause
54
- */;var g;const v=window.trustedTypes,b=v?v.emptyScript:"",m=window.reactiveElementPolyfillSupport,x={toAttribute(t,i){switch(i){case Boolean:t=t?b: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}},w=(t,i)=>i!==t&&(i==i||t==t),O={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:w};class $ 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=O){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 n=this[t];this[i]=o,this.requestUpdate(t,n,e)},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,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(y(t))}else void 0!==t&&i.push(y(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 d(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=O){var o,n;const s=this.constructor._$Eh(t,e);if(void 0!==s&&!0===e.reflect){const r=(null!==(n=null===(o=e.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==n?n:x.toAttribute)(i,e.type);this._$Ei=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Ei=null}}_$AK(t,i){var e,o,n;const s=this.constructor,r=s._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=s.getPropertyOptions(r),a=t.converter,l=null!==(n=null!==(o=null===(e=a)||void 0===e?void 0:e.fromAttribute)&&void 0!==o?o:"function"==typeof a?a:null)&&void 0!==n?n:x.fromAttribute;this._$Ei=r,this[r]=l(i,t.type),this._$Ei=null}}requestUpdate(t,i,e){let o=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||w)(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){}}
55
- /**
56
- * @license
57
- * Copyright 2017 Google LLC
58
- * SPDX-License-Identifier: BSD-3-Clause
59
- */
60
- var S;$.finalized=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},null==m||m({ReactiveElement:$}),(null!==(g=globalThis.reactiveElementVersions)&&void 0!==g?g:globalThis.reactiveElementVersions=[]).push("1.3.2");const N=globalThis.trustedTypes,C=N?N.createPolicy("lit-html",{createHTML:t=>t}):void 0,R=`lit$${(Math.random()+"").slice(9)}$`,E="?"+R,M=`<${E}>`,U=document,k=(t="")=>U.createComment(t),F=t=>null===t||"object"!=typeof t&&"function"!=typeof t,L=Array.isArray,A=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,z=/>/g,P=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,B=/'/g,j=/"/g,_=/^(?:script|style|textarea|title)$/i,D=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),W=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),K=new WeakMap,I=U.createTreeWalker(U,129,null,!1),V=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=A;for(let i=0;i<e;i++){const e=t[i];let a,l,h=-1,c=0;for(;c<e.length&&(r.lastIndex=c,l=r.exec(e),null!==l);)c=r.lastIndex,r===A?"!--"===l[1]?r=T:void 0!==l[1]?r=z:void 0!==l[2]?(_.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=P):void 0!==l[3]&&(r=P):r===P?">"===l[0]?(r=null!=n?n:A,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?P:'"'===l[3]?j:B):r===j||r===B?r=P:r===T||r===z?r=A:(r=P,n=void 0);const p=r===P&&t[i+1].startsWith("/>")?" ":"";s+=r===A?e+M:h>=0?(o.push(a),e.slice(0,h)+"$lit$"+e.slice(h)+R+p):e+R+(-2===h?(o.push(void 0),i):p)}const a=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==C?C.createHTML(a):a,o]};class Z{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,a=this.parts,[l,h]=V(t,i);if(this.el=Z.createElement(l,e),I.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=I.nextNode())&&a.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[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(R),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?Q:"?"===i[1]?tt:"@"===i[1]?it:G})}else a.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(_.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],k()),I.nextNode(),a.push({type:2,index:++n});o.append(t[i],k())}}}else if(8===o.nodeType)if(o.data===E)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(R,t+1));)a.push({type:7,index:n}),t+=R.length-1}n++}}static createElement(t,i){const e=U.createElement("template");return e.innerHTML=t,e}}function J(t,i,e=t,o){var n,s,r,a;if(i===W)return i;let l=void 0!==o?null===(n=e._$Cl)||void 0===n?void 0:n[o]:e._$Cu;const h=F(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,e,o)),void 0!==o?(null!==(r=(a=e)._$Cl)&&void 0!==r?r:a._$Cl=[])[o]=l:e._$Cu=l),void 0!==l&&(i=J(t,l._$AS(t,i.values),l,o)),i}class q{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,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:U).importNode(e,!0);I.currentNode=n;let s=I.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new X(s,s.nextSibling,this,t):1===l.type?i=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(i=new et(s,this,t)),this.v.push(i),l=o[++a]}r!==(null==l?void 0:l.index)&&(s=I.nextNode(),r++)}return n}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 X{constructor(t,i,e,o){var n;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cg=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}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),F(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==W&&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!==H&&F(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,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Z.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new q(n,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=K.get(t.strings);return void 0===i&&K.set(t.strings,i=new Z(t)),i}S(t){L(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new X(this.M(k()),this.M(k()),this,this.options)):e=i[o],e._$AI(n),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 G{constructor(t,i,e,o,n){this.type=1,this._$AH=H,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let s=!1;if(void 0===n)t=J(this,t,i,0),s=!F(t)||t!==this._$AH&&t!==W,s&&(this._$AH=t);else{const o=t;let r,a;for(t=n[0],r=0;r<n.length-1;r++)a=J(this,o[e+r],i,r),a===W&&(a=this._$AH[r]),s||(s=!F(a)||a!==this._$AH[r]),a===H?t=H:t!==H&&(t+=(null!=a?a:"")+n[r+1]),this._$AH[r]=a}s&&!o&&this.C(t)}C(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Q extends G{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===H?void 0:t}}const Y=N?N.emptyScript:"";class tt extends G{constructor(){super(...arguments),this.type=4}C(t){t&&t!==H?this.element.setAttribute(this.name,Y):this.element.removeAttribute(this.name)}}class it extends G{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=J(this,t,i,0))&&void 0!==e?e:H)===W)return;const o=this._$AH,n=t===H&&o!==H||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==H&&(o===H||n);n&&this.element.removeEventListener(this.name,this,o),s&&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 et{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 ot=window.litHtmlPolyfillSupport;
61
- /**
62
- * @license
63
- * Copyright 2017 Google LLC
64
- * SPDX-License-Identifier: BSD-3-Clause
65
- */
66
- var nt,st;null==ot||ot(Z,X),(null!==(S=globalThis.litHtmlVersions)&&void 0!==S?S:globalThis.litHtmlVersions=[]).push("2.2.4");class rt extends ${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,n;const s=null!==(o=null==e?void 0:e.renderBefore)&&void 0!==o?o:i;let r=s._$litPart$;if(void 0===r){const t=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:null;s._$litPart$=r=new X(i.insertBefore(k(),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 W}}rt.finalized=!0,rt._$litElement$=!0,null===(nt=globalThis.litElementHydrateSupport)||void 0===nt||nt.call(globalThis,{LitElement:rt});const at=globalThis.litElementPolyfillSupport;null==at||at({LitElement:rt}),(null!==(st=globalThis.litElementVersions)&&void 0!==st?st:globalThis.litElementVersions=[]).push("3.2.0");class lt{constructor(t,i,e,o,n){this.name=t,this.category=i,this.fallbackVariable=e,this.defaultValue=o,this.context=n,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 lt(t,i,void 0,e)}static extend(t,i,e){return new lt(t,i.category,i,e)}static external(t,i){return new lt(t.name,t.category,t.fallbackVariable,t.defaultValue,i)}get(t){return u`var(${f(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):f(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()]:[]}}const ht={colorPrimary:lt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:lt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:lt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:lt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:lt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:lt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:lt.create("--ft-color-error","COLOR","#B00020"),colorOutline:lt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:lt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:lt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:lt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:lt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:lt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:lt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:lt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:lt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:lt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:lt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:lt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:lt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:lt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:lt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:lt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:lt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:lt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:lt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:lt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:lt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:lt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:lt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:lt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:lt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:lt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:lt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:lt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:lt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:lt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:lt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:lt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:lt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:lt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:lt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:lt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:lt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:lt.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:lt.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:lt.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:lt.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:lt.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:lt.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:lt.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:lt.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:lt.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:lt.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:lt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:lt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:lt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:lt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:lt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:lt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:lt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:lt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
67
- /**
68
- * @license
69
- * Copyright 2021 Google LLC
70
- * SPDX-License-Identifier: BSD-3-Clause
71
- */var ct,pt,ft=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class ut extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:i,elementDefinitions:e,shadowRootOptions:o}=t;e&&!i&&(t.registry=new CustomElementRegistry,Object.entries(e).forEach((([i,e])=>t.registry.define(i,e))));const n=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return d(n,this.constructor.elementStyles),n}}}(rt)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),D`
72
- ${t.map((t=>D`
73
- <style>${t}</style>
74
- `))}
75
- ${this.getTemplate()}
76
- `}updated(t){super.updated(t),setTimeout((()=>{var i;this.contentAvailableCallback(t),(null===(i=this.exportpartsPrefix)||void 0===i?void 0:i.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var i,e,o,n,s,r;let a=[];for(let l of t){let t=null==l?void 0:l.trim();if(t)for(let l of null!==(e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){let i=null!==(n=null===(o=l.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],e=null!==(r=null===(s=l.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];const h=[...new Set([...i,...e])].filter((t=>null!=t&&t.trim().length>0)).map((t=>t.trim())).map((i=>`${i}:${t}--${i}`));a.push(...h)}}this.setAttribute("exportparts",a.join(", "))}contentAvailableCallback(t){}}ft([e()],ut.prototype,"exportpartsPrefix",void 0),ft([function(t,i){const o=()=>JSON.parse(JSON.stringify(t));return e({type:Object,converter:{fromAttribute:t=>{if(null==t)return o();try{return JSON.parse(t)}catch{return o()}},toAttribute:t=>JSON.stringify(t)},...null!=i?i:{}})}([])],ut.prototype,"exportpartsPrefixes",void 0),u`
77
- .ft-no-text-select {
78
- -webkit-touch-callout: none;
79
- -webkit-user-select: none;
80
- -khtml-user-select: none;
81
- -moz-user-select: none;
82
- -ms-user-select: none;
83
- user-select: none;
84
- }
85
- `,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(pt=null===(ct=window.safari)||void 0===ct?void 0:ct.pushNotification)||void 0===pt||pt.toString());
86
- /**
87
- * @license
88
- * Copyright 2020 Google LLC
89
- * SPDX-License-Identifier: BSD-3-Clause
90
- */
91
- const dt=Symbol.for(""),yt=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===dt)return null===(e=t)||void 0===e?void 0:e._$litStatic$},gt=t=>({_$litStatic$:t,r:dt}),vt=new Map,bt=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=i[h];h<o&&void 0!==(s=e[h],n=yt(s));)l+=n+i[++h],c=!0;a.push(s),r.push(l),h++}if(h===o&&r.push(i[o]),c){const t=r.join("$$lit$$");void 0===(i=vt.get(t))&&(r.raw=r,vt.set(t,i=r)),e=a}return t(i,...e)})(D);var mt,xt=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>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"}(mt||(mt={}));const wt=lt.extend("--ft-typography-font-family",ht.titleFont),Ot=lt.extend("--ft-typography-font-family",ht.contentFont),$t={fontFamily:Ot,fontSize:lt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:lt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:lt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:lt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:lt.create("--ft-typography-text-transform","UNKNOWN","inherit")},St=lt.extend("--ft-typography-title-font-family",wt),Nt=lt.extend("--ft-typography-title-font-size",$t.fontSize,"20px"),Ct=lt.extend("--ft-typography-title-font-weight",$t.fontWeight,"normal"),Rt=lt.extend("--ft-typography-title-letter-spacing",$t.letterSpacing,"0.15px"),Et=lt.extend("--ft-typography-title-line-height",$t.lineHeight,"1.2"),Mt=lt.extend("--ft-typography-title-text-transform",$t.textTransform,"inherit"),Ut=lt.extend("--ft-typography-title-dense-font-family",wt),kt=lt.extend("--ft-typography-title-dense-font-size",$t.fontSize,"14px"),Ft=lt.extend("--ft-typography-title-dense-font-weight",$t.fontWeight,"normal"),Lt=lt.extend("--ft-typography-title-dense-letter-spacing",$t.letterSpacing,"0.105px"),At=lt.extend("--ft-typography-title-dense-line-height",$t.lineHeight,"1.7"),Tt=lt.extend("--ft-typography-title-dense-text-transform",$t.textTransform,"inherit"),zt=lt.extend("--ft-typography-subtitle1-font-family",Ot),Pt=lt.extend("--ft-typography-subtitle1-font-size",$t.fontSize,"16px"),Bt=lt.extend("--ft-typography-subtitle1-font-weight",$t.fontWeight,"600"),jt=lt.extend("--ft-typography-subtitle1-letter-spacing",$t.letterSpacing,"0.144px"),_t=lt.extend("--ft-typography-subtitle1-line-height",$t.lineHeight,"1.5"),Dt=lt.extend("--ft-typography-subtitle1-text-transform",$t.textTransform,"inherit"),Wt=lt.extend("--ft-typography-subtitle2-font-family",Ot),Ht=lt.extend("--ft-typography-subtitle2-font-size",$t.fontSize,"14px"),Kt=lt.extend("--ft-typography-subtitle2-font-weight",$t.fontWeight,"normal"),It=lt.extend("--ft-typography-subtitle2-letter-spacing",$t.letterSpacing,"0.098px"),Vt=lt.extend("--ft-typography-subtitle2-line-height",$t.lineHeight,"1.7"),Zt=lt.extend("--ft-typography-subtitle2-text-transform",$t.textTransform,"inherit"),Jt=lt.extend("--ft-typography-body1-font-family",Ot),qt=lt.extend("--ft-typography-body1-font-size",$t.fontSize,"16px"),Xt=lt.extend("--ft-typography-body1-font-weight",$t.fontWeight,"normal"),Gt=lt.extend("--ft-typography-body1-letter-spacing",$t.letterSpacing,"0.496px"),Qt=lt.extend("--ft-typography-body1-line-height",$t.lineHeight,"1.5"),Yt=lt.extend("--ft-typography-body1-text-transform",$t.textTransform,"inherit"),ti=lt.extend("--ft-typography-body2-font-family",Ot),ii=lt.extend("--ft-typography-body2-font-size",$t.fontSize,"14px"),ei=lt.extend("--ft-typography-body2-font-weight",$t.fontWeight,"normal"),oi=lt.extend("--ft-typography-body2-letter-spacing",$t.letterSpacing,"0.252px"),ni=lt.extend("--ft-typography-body2-line-height",$t.lineHeight,"1.4"),si=lt.extend("--ft-typography-body2-text-transform",$t.textTransform,"inherit"),ri=lt.extend("--ft-typography-caption-font-family",Ot),ai=lt.extend("--ft-typography-caption-font-size",$t.fontSize,"12px"),li=lt.extend("--ft-typography-caption-font-weight",$t.fontWeight,"normal"),hi=lt.extend("--ft-typography-caption-letter-spacing",$t.letterSpacing,"0.396px"),ci=lt.extend("--ft-typography-caption-line-height",$t.lineHeight,"1.33"),pi=lt.extend("--ft-typography-caption-text-transform",$t.textTransform,"inherit"),fi=lt.extend("--ft-typography-breadcrumb-font-family",Ot),ui=lt.extend("--ft-typography-breadcrumb-font-size",$t.fontSize,"10px"),di=lt.extend("--ft-typography-breadcrumb-font-weight",$t.fontWeight,"normal"),yi=lt.extend("--ft-typography-breadcrumb-letter-spacing",$t.letterSpacing,"0.33px"),gi=lt.extend("--ft-typography-breadcrumb-line-height",$t.lineHeight,"1.6"),vi=lt.extend("--ft-typography-breadcrumb-text-transform",$t.textTransform,"inherit"),bi=lt.extend("--ft-typography-overline-font-family",Ot),mi=lt.extend("--ft-typography-overline-font-size",$t.fontSize,"10px"),xi=lt.extend("--ft-typography-overline-font-weight",$t.fontWeight,"normal"),wi=lt.extend("--ft-typography-overline-letter-spacing",$t.letterSpacing,"1.5px"),Oi=lt.extend("--ft-typography-overline-line-height",$t.lineHeight,"1.6"),$i=lt.extend("--ft-typography-overline-text-transform",$t.textTransform,"uppercase"),Si=lt.extend("--ft-typography-button-font-family",Ot),Ni=lt.extend("--ft-typography-button-font-size",$t.fontSize,"14px"),Ci=lt.extend("--ft-typography-button-font-weight",$t.fontWeight,"600"),Ri=lt.extend("--ft-typography-button-letter-spacing",$t.letterSpacing,"1.246px"),Ei=lt.extend("--ft-typography-button-line-height",$t.lineHeight,"1.15"),Mi=lt.extend("--ft-typography-button-text-transform",$t.textTransform,"uppercase"),Ui=u`
92
- .ft-typography--title {
93
- font-family: ${St};
94
- font-size: ${Nt};
95
- font-weight: ${Ct};
96
- letter-spacing: ${Rt};
97
- line-height: ${Et};
98
- text-transform: ${Mt};
99
- }
100
- `,ki=u`
101
- .ft-typography--title-dense {
102
- font-family: ${Ut};
103
- font-size: ${kt};
104
- font-weight: ${Ft};
105
- letter-spacing: ${Lt};
106
- line-height: ${At};
107
- text-transform: ${Tt};
108
- }
109
- `,Fi=u`
110
- .ft-typography--subtitle1 {
111
- font-family: ${zt};
112
- font-size: ${Pt};
113
- font-weight: ${Bt};
114
- letter-spacing: ${jt};
115
- line-height: ${_t};
116
- text-transform: ${Dt};
117
- }
118
- `,Li=u`
119
- .ft-typography--subtitle2 {
120
- font-family: ${Wt};
121
- font-size: ${Ht};
122
- font-weight: ${Kt};
123
- letter-spacing: ${It};
124
- line-height: ${Vt};
125
- text-transform: ${Zt};
126
- }
127
-
128
- `,Ai=u`
129
- .ft-typography--body1 {
130
- font-family: ${Jt};
131
- font-size: ${qt};
132
- font-weight: ${Xt};
133
- letter-spacing: ${Gt};
134
- line-height: ${Qt};
135
- text-transform: ${Yt};
136
- }
137
- `,Ti=u`
138
- .ft-typography--body2 {
139
- font-family: ${ti};
140
- font-size: ${ii};
141
- font-weight: ${ei};
142
- letter-spacing: ${oi};
143
- line-height: ${ni};
144
- text-transform: ${si};
145
- }
146
- `,zi=u`
147
- .ft-typography--caption {
148
- font-family: ${ri};
149
- font-size: ${ai};
150
- font-weight: ${li};
151
- letter-spacing: ${hi};
152
- line-height: ${ci};
153
- text-transform: ${pi};
154
- }
155
- `,Pi=u`
156
- .ft-typography--breadcrumb {
157
- font-family: ${fi};
158
- font-size: ${ui};
159
- font-weight: ${di};
160
- letter-spacing: ${yi};
161
- line-height: ${gi};
162
- text-transform: ${vi};
163
- }
164
- `,Bi=u`
165
- .ft-typography--overline {
166
- font-family: ${bi};
167
- font-size: ${mi};
168
- font-weight: ${xi};
169
- letter-spacing: ${wi};
170
- line-height: ${Oi};
171
- text-transform: ${$i};
172
- }
173
- `,ji=u`
174
- .ft-typography--button {
175
- font-family: ${Si};
176
- font-size: ${Ni};
177
- font-weight: ${Ci};
178
- letter-spacing: ${Ri};
179
- line-height: ${Ei};
180
- text-transform: ${Mi};
181
- }
182
- `;class _i extends ut{constructor(){super(...arguments),this.variant=mt.body1}render(){return this.element?bt`
183
- <${gt(this.element)}
184
- class="ft-typography ft-typography--${this.variant}">
185
- <slot></slot>
186
- </${gt(this.element)}>
187
- `:bt`
188
- <slot class="ft-typography ft-typography--${this.variant}"></slot>
189
- `}}_i.styles=[Ui,ki,Fi,Li,Ai,Ti,zi,Pi,Bi,ji,u`
190
- .ft-typography {
191
- vertical-align: inherit;
192
- }
193
- `],xt([e()],_i.prototype,"element",void 0),xt([e()],_i.prototype,"variant",void 0),a("ft-typography")(_i);var Di=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const Wi=lt.create("--ft-tooltip-distance","SIZE","4px"),Hi=lt.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ki=lt.create("--ft-tooltip-background-color","COLOR","#666666"),Ii=lt.create("--ft-tooltip-z-index","NUMBER","1"),Vi=lt.external(ht.borderRadiusS,"Design system");class Zi extends ut{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 D`
194
- <div part="container"
195
- class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
196
- @mouseenter=${this.onHover}
197
- @mouseleave=${this.onOut}
198
- @focusin=${this.onHover}
199
- @focusout=${this.onOut}
200
- @touchstart=${this.onTouch}>
201
- <div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
202
- <div part="tooltip-content" class="ft-tooltip--content">
203
- <ft-typography variant="caption">${this.text}</ft-typography>
204
- </div>
205
- </div>
206
- <slot></slot>
207
- </div>
208
- `}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,n=this.tooltip.style;switch(this.position){case"top":n.top=-this.tooltip.clientHeight+"px",n.left=o+"px";break;case"bottom":n.top=i.height+"px",n.left=o+"px";break;case"left":n.top=e+"px",n.left=-this.tooltip.clientWidth+"px";break;case"right":n.top=e+"px",n.left=i.width+"px"}n.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())}}Zi.elementDefinitions={"ft-typography":_i},Zi.styles=u`
209
- .ft-tooltip--container {
210
- display: block;
211
- position: relative;
212
- }
213
-
214
- .ft-tooltip--inline {
215
- display: inline-block;
216
- max-width: 100%;
217
- }
218
-
219
- .ft-tooltip {
220
- position: absolute;
221
- box-sizing: border-box;
222
- overflow: hidden;
223
- width: max-content;
224
- max-width: 150px;
225
- text-align: center;
226
- padding: ${Wi};
227
- z-index: ${Ii};
228
- }
229
-
230
- .ft-tooltip--content {
231
- padding: 4px 8px;
232
- border-radius: ${Vi};
233
- background-color: ${Ki};
234
- color: ${Hi};
235
- top: -500px;
236
- left: -500px;
237
- position: relative;
238
- word-break: break-word;
239
- }
240
- `,Di([e()],Zi.prototype,"text",void 0),Di([e({type:Boolean})],Zi.prototype,"manual",void 0),Di([e({type:Boolean})],Zi.prototype,"inline",void 0),Di([e({type:Number})],Zi.prototype,"delay",void 0),Di([e()],Zi.prototype,"position",void 0),Di([
241
- /**
242
- * @license
243
- * Copyright 2017 Google LLC
244
- * SPDX-License-Identifier: BSD-3-Clause
245
- */
246
- function(t,i,e){let n,s=t;return"object"==typeof t?(s=t.slot,n=t):n={flatten:i},e?function(t){const{slot:i,selector:e}=null!=t?t:{};return o({descriptor:o=>({get(){var o;const n="slot"+(i?`[name=${i}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),a=null!=s?r(s,t):[];return e?a.filter((t=>t.matches(e))):a},enumerable:!0,configurable:!0})})}({slot:s,flatten:i,selector:e}):o({descriptor:t=>({get(){var t,i;const e="slot"+(s?`[name=${s}]`:":not([name])"),o=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e);return null!==(i=null==o?void 0:o.assignedNodes(n))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}("",!0)],Zi.prototype,"slotNodes",void 0),Di([n(".ft-tooltip--container")],Zi.prototype,"container",void 0),Di([n("slot")],Zi.prototype,"target",void 0),Di([n(".ft-tooltip")],Zi.prototype,"tooltip",void 0),Di([n(".ft-tooltip--content")],Zi.prototype,"tooltipContent",void 0),Di([function(t){return e({...t,state:!0})}()],Zi.prototype,"visible",void 0),a("ft-tooltip")(function t(i){var e;let o;if("elementDefinitions"in i){o={};const e=i.elementDefinitions;for(let i in e)o[i]=t(e[i])}return e=class extends i{render(){var t;let e=null!==(t=i.styles)&&void 0!==t?t:[];return Array.isArray(e)||(e=[e]),D`
247
- ${e.map((t=>D`
248
- <style>${t}</style>
249
- `))}
250
- ${super.render()}
251
- `}},e.styles=void 0,e.elementDefinitions=o,e}(Zi))}();
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=inline-styles.d.ts.map
@@ -1,4 +0,0 @@
1
- import { customElement, InlineStyles } from "@fluid-topics/ft-wc-utils";
2
- import { FtTooltip } from "./ft-tooltip";
3
- customElement("ft-tooltip")(InlineStyles(FtTooltip));
4
- //# sourceMappingURL=inline-styles.js.map