@fluid-topics/ft-infinite-scroll 1.0.47 → 1.0.49
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-infinite-scroll.min.js +21 -21
- package/package.json +3 -3
|
@@ -14,12 +14,12 @@
|
|
|
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,
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=window.customElements.get,s=window.customElements,n=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap;let h;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 l=n.prototype.attributeChangedCallback,h=new Set(n.observedAttributes||[]);d(n,h,l);const a={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:h};this._definitionsByTag.set(t,a),this._definitionsByClass.set(n,a);let c=e.call(s,t);c||(c=u(t),i.call(s,t,c)),this===window.customElements&&(r.set(n,a),a.standInClass=c);const p=this._awaitingUpgrade.get(t);if(p){this._awaitingUpgrade.delete(t);for(const t of p)o.delete(t),f(t,a,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){b.push(this),s.upgrade.apply(s,arguments),b.pop()}get(t){const i=this._definitionsByTag.get(t);return i?.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 s=this._awaitingUpgrade.get(i);s||this._awaitingUpgrade.set(i,s=new Set),e?s.add(t):s.delete(t)}},window.HTMLElement=function(){let i=h;if(i)return h=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 a=t=>t===document||t instanceof ShadowRoot,c=t=>{let i=t.getRootNode();if(!a(i)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),a(i)||(i=l.get(i)?.getRootNode()||document)}return i.customElements},u=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const s=c(e)||window.customElements,n=s._getDefinition(i);return n?f(e,n):o.set(e,s),e}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,i,!1)}adoptedCallback(){const t=n.get(this);t?.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)}},d=(t,i,e)=>{if(0===i.size||void 0===e)return;const s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,n){const o=t.toLowerCase();if(i.has(o)){const t=this.getAttribute(o);s.call(this,o,n),e.call(this,o,t,n)}else s.call(this,o,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const s=t.toLowerCase();if(i.has(s)){const t=this.getAttribute(s);n.call(this,s),e.call(this,s,t,null)}else n.call(this,s)})},p=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):p(e)},f=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),n.set(t,i),h=t;try{new i.elementClass}catch(t){p(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)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=v.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let b=[document];const m=(t,i,e=void 0)=>{const s=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){b.push(this);const t=s.apply(e||this,arguments);return void 0!==t&&l.set(t,this),b.pop(),t}};m(ShadowRoot,"createElement",document),m(ShadowRoot,"importNode",document),m(Element,"insertAdjacentHTML");const x=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){b.push(this),e.set.call(this,t),b.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const s=i.call(this,...e);return t.set(s,this),s},e.forEach((i=>{const e=window.ElementInternals.prototype,s=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==n.get(e).formAssociated)throw new DOMException(`Failed to execute ${s} on 'ElementInternals': The target element is not a form-associated custom element.`);s?.call(this,...i)}}));class s extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const i=new Map;t.forEach(((t,e)=>{const s=t.getAttribute("name"),n=i.get(s)||[];this[+e]=t,n.push(t),i.set(s,n)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=new s(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 o(i)}})}}try{window.customElements.define("custom-element",null)}catch(Tt){const t=window.customElements.define;window.customElements.define=(i,e,s)=>{if(null!==e)try{t.bind(window.customElements)(i,e,s)}catch(t){console.info(i,e,s,t)}}}class i{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){return this.callbacks=[t],this.debounce(i)}queue(t,i){return this.callbacks.push(t),this.debounce(i)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,i)=>{this.resolvePromise=t,this.rejectPromise=i}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,i;const e=[...this.callbacks];this.callbacks=[];const s=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,n=null!==(i=this.resolvePromise)&&void 0!==i?i:()=>null;this.clearPromise();for(let t of e)try{await t()}catch(t){return void s(t)}n(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/const
|
|
22
|
+
*/const e=(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 s(t){return(i,s)=>void 0!==s?((t,i,e)=>{i.constructor.createProperty(e,t)})(t,i,s):e(t,i)
|
|
23
23
|
/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
@@ -35,35 +35,35 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
37
|
*/
|
|
38
|
-
function o(t,
|
|
38
|
+
function o(t,i){return(({finisher:t,descriptor:i})=>(e,s)=>{var n;if(void 0===s){const s=null!==(n=e.originalKey)&&void 0!==n?n:e.key,o=null!=i?{kind:"method",placement:"prototype",key:s,descriptor:i(e.key)}:{...e,key:s};return null!=t&&(o.finisher=function(i){t(i,s)}),o}{const n=e.constructor;void 0!==i&&Object.defineProperty(e,s,i(s)),null==t||t(n,s)}})({descriptor:e=>{const s={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;s.get=function(){var e,s;return void 0===this[i]&&(this[i]=null!==(s=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==s?s:null),this[i]}}return s}})}
|
|
39
39
|
/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2021 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/var r;function l(t,
|
|
43
|
+
*/var r;function l(t,i){try{return function(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var e,s,n;if(Array.isArray(t)){if((e=t.length)!=i.length)return!1;for(s=e;0!=s--;)if(!l(t[s],i[s]))return!1;return!0}if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(s of t.entries())if(!i.has(s[0]))return!1;for(s of t.entries())if(!l(s[1],i.get(s[0])))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(s of t.entries())if(!i.has(s[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if((e=(n=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(s=e;0!=s--;)if(!Object.prototype.hasOwnProperty.call(i,n[s]))return!1;for(s=e;0!=s--;){var o=n[s];if(!l(t[o],i[o]))return!1}return!0}return t!=t&&i!=i}(t,i)}catch(t){return!1}}null===(r=window.HTMLSlotElement)||void 0===r||r.prototype.assignedElements;
|
|
44
44
|
/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2019 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
48
|
*/
|
|
49
|
-
const h=window,a=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),u=new WeakMap;let d=class{constructor(t,e
|
|
49
|
+
const h=window,a=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),u=new WeakMap;let d=class{constructor(t,i,e){if(this._$cssResult$=!0,e!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o;const i=this.t;if(a&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=u.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&u.set(i,t))}return t}toString(){return this.cssText}};const p=t=>new d("string"==typeof t?t:t+"",void 0,c),f=(t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,e,s)=>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[s+1]),t[0]);return new d(e,t,c)},v=(t,i)=>{a?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((i=>{const e=document.createElement("style"),s=h.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}))},b=a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return p(i)})(t):t
|
|
50
50
|
/**
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright 2017 Google LLC
|
|
53
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
|
-
*/;var m;const x=window,w=x.trustedTypes,y=w?w.emptyScript:"",g=x.reactiveElementPolyfillSupport,O={toAttribute(t,
|
|
54
|
+
*/;var m;const x=window,w=x.trustedTypes,y=w?w.emptyScript:"",g=x.reactiveElementPolyfillSupport,O={toAttribute(t,i){switch(i){case Boolean:t=t?y: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}},N=(t,i)=>i!==t&&(i==i||t==t),C={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:N};let E=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const s=this._$Ep(e,i);void 0!==s&&(this._$Ev.set(s,e),t.push(s))})),t}static createProperty(t,i=C){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,s=this.getPropertyDescriptor(t,e,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(s){const n=this[t];this[i]=s,this.requestUpdate(t,n,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||C}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=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(b(t))}else void 0!==t&&i.push(b(t));return i}static _$Ep(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).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._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.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 v(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||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._$ES)||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)}_$EO(t,i,e=C){var s;const n=this.constructor._$Ep(t,e);if(void 0!==n&&!0===e.reflect){const o=(void 0!==(null===(s=e.converter)||void 0===s?void 0:s.toAttribute)?e.converter:O).toAttribute(i,e.type);this._$El=t,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$El=null}}_$AK(t,i){var e;const s=this.constructor,n=s._$Ev.get(t);if(void 0!==n&&this._$El!==n){const t=s.getPropertyOptions(n),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(e=t.converter)||void 0===e?void 0:e.fromAttribute)?t.converter:O;this._$El=n,this[n]=o.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,e){let s=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||N)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,e))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}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._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$ES)||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._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||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)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
|
|
55
55
|
/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2017 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
59
|
*/
|
|
60
|
-
var S;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:E}),(null!==(m=x.reactiveElementVersions)&&void 0!==m?m:x.reactiveElementVersions=[]).push("1.6.1");const $=window,R=$.trustedTypes,M=R?R.createPolicy("lit-html",{createHTML:t=>t}):void 0,k="$lit$",U=`lit$${(Math.random()+"").slice(9)}$`,A="?"+U,F=`<${A}>`,L=document,j=()=>L.createComment(""),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,_=t=>I(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),B="[ \t\n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,K=/-->/g,P=/>/g,z=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,H=/"/g,Z=/^(?:script|style|textarea|title)$/i,V=(t=>(e
|
|
60
|
+
var S;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:E}),(null!==(m=x.reactiveElementVersions)&&void 0!==m?m:x.reactiveElementVersions=[]).push("1.6.1");const $=window,R=$.trustedTypes,M=R?R.createPolicy("lit-html",{createHTML:t=>t}):void 0,k="$lit$",U=`lit$${(Math.random()+"").slice(9)}$`,A="?"+U,F=`<${A}>`,L=document,j=()=>L.createComment(""),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,_=t=>I(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),B="[ \t\n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,K=/-->/g,P=/>/g,z=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,H=/"/g,Z=/^(?:script|style|textarea|title)$/i,V=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),J=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),G=new WeakMap,X=L.createTreeWalker(L,129,null,!1),Q=(t,i)=>{const e=t.length-1,s=[];let n,o=2===i?"<svg>":"",r=W;for(let i=0;i<e;i++){const e=t[i];let l,h,a=-1,c=0;for(;c<e.length&&(r.lastIndex=c,h=r.exec(e),null!==h);)c=r.lastIndex,r===W?"!--"===h[1]?r=K:void 0!==h[1]?r=P:void 0!==h[2]?(Z.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=z):void 0!==h[3]&&(r=z):r===z?">"===h[0]?(r=null!=n?n:W,a=-1):void 0===h[1]?a=-2:(a=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?z:'"'===h[3]?H:D):r===H||r===D?r=z:r===K||r===P?r=W:(r=z,n=void 0);const u=r===z&&t[i+1].startsWith("/>")?" ":"";o+=r===W?e+F:a>=0?(s.push(l),e.slice(0,a)+k+e.slice(a)+U+u):e+U+(-2===a?(s.push(void 0),i):u)}const l=o+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==M?M.createHTML(l):l,s]};class Y{constructor({strings:t,_$litType$:i},e){let s;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[h,a]=Q(t,i);if(this.el=Y.createElement(h,e),X.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=X.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith(k)||i.startsWith(U)){const e=a[o++];if(t.push(i),void 0!==e){const t=s.getAttribute(e.toLowerCase()+k).split(U),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?nt:"?"===i[1]?rt:"@"===i[1]?lt:st})}else l.push({type:6,index:n})}for(const i of t)s.removeAttribute(i)}if(Z.test(s.tagName)){const t=s.textContent.split(U),i=t.length-1;if(i>0){s.textContent=R?R.emptyScript:"";for(let e=0;e<i;e++)s.append(t[e],j()),X.nextNode(),l.push({type:2,index:++n});s.append(t[i],j())}}}else if(8===s.nodeType)if(s.data===A)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(U,t+1));)l.push({type:7,index:n}),t+=U.length-1}n++}}static createElement(t,i){const e=L.createElement("template");return e.innerHTML=t,e}}function tt(t,i,e=t,s){var n,o,r,l;if(i===J)return i;let h=void 0!==s?null===(n=e._$Co)||void 0===n?void 0:n[s]:e._$Cl;const a=T(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===a?h=void 0:(h=new a(t),h._$AT(t,e,s)),void 0!==s?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[s]=h:e._$Cl=h),void 0!==h&&(i=tt(t,h._$AS(t,i.values),h,s)),i}class it{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:s}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:L).importNode(e,!0);X.currentNode=n;let o=X.nextNode(),r=0,l=0,h=s[0];for(;void 0!==h;){if(r===h.index){let i;2===h.type?i=new et(o,o.nextSibling,this,t):1===h.type?i=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(i=new ht(o,this,t)),this._$AV.push(i),h=s[++l]}r!==(null==h?void 0:h.index)&&(o=X.nextNode(),r++)}return n}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class et{constructor(t,i,e,s){var n;this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=s,this._$Cp=null===(n=null==s?void 0:s.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._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=tt(this,t,i),T(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==J&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):_(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==q&&T(this._$AH)?this._$AA.nextSibling.data=t:this.$(L.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:s}=t,n="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=Y.createElement(s.h,this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.v(e);else{const t=new it(n,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=G.get(t.strings);return void 0===i&&G.set(t.strings,i=new Y(t)),i}T(t){I(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,s=0;for(const n of t)s===i.length?i.push(e=new et(this.k(j()),this.k(j()),this,this.options)):e=i[s],e._$AI(n),s++;s<i.length&&(this._$AR(e&&e._$AB.nextSibling,s),i.length=s)}_$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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class st{constructor(t,i,e,s,n){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,s){const n=this.strings;let o=!1;if(void 0===n)t=tt(this,t,i,0),o=!T(t)||t!==this._$AH&&t!==J,o&&(this._$AH=t);else{const s=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=tt(this,s[e+r],i,r),l===J&&(l=this._$AH[r]),o||(o=!T(l)||l!==this._$AH[r]),l===q?t=q:t!==q&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}o&&!s&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class nt extends st{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}const ot=R?R.emptyScript:"";class rt extends st{constructor(){super(...arguments),this.type=4}j(t){t&&t!==q?this.element.setAttribute(this.name,ot):this.element.removeAttribute(this.name)}}class lt extends st{constructor(t,i,e,s,n){super(t,i,e,s,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=tt(this,t,i,0))&&void 0!==e?e:q)===J)return;const s=this._$AH,n=t===q&&s!==q||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==q&&(s===q||n);n&&this.element.removeEventListener(this.name,this,s),o&&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 ht{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){tt(this,t)}}const at={O:k,P:U,A,C:1,M:Q,L:it,D:_,R:tt,I:et,V:st,H:rt,N:lt,U:nt,F:ht},ct=$.litHtmlPolyfillSupport;null==ct||ct(Y,et),(null!==(S=$.litHtmlVersions)&&void 0!==S?S:$.litHtmlVersions=[]).push("2.7.3");
|
|
61
61
|
/**
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright 2017 Google LLC
|
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
65
|
*/
|
|
66
|
-
var ut,dt;let pt=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var s,n;const o=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new it(e.insertBefore(j(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return J}};pt.finalized=!0,pt._$litElement$=!0,null===(ut=globalThis.litElementHydrateSupport)||void 0===ut||ut.call(globalThis,{LitElement:pt});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:pt}),(null!==(dt=globalThis.litElementVersions)&&void 0!==dt?dt:globalThis.litElementVersions=[]).push("3.3.2");class vt{static create(t,e,i){let s=t=>p(null!=t?t:i),n=f`var(${p(t)}, ${s(i)})`;return n.name=t,n.category=e,n.defaultValue=i,n.defaultCssValue=s,n.get=e=>f`var(${p(t)}, ${s(e)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>i,n}static extend(t,e,i){let s=t=>e.get(null!=t?t:i),n=f`var(${p(t)}, ${s(i)})`;return n.name=t,n.category=e.category,n.fallbackVariable=e,n.defaultValue=i,n.defaultCssValue=s,n.get=e=>f`var(${p(t)}, ${s(e)})`,n.breadcrumb=()=>[e.name,...e.breadcrumb()],n.lastResortDefaultValue=()=>i,n}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):p(null!=e?e:t.defaultValue),s=f`var(${p(t.name)}, ${i(t.defaultValue)})`;return s.name=t.name,s.category=t.category,s.fallbackVariable=t.fallbackVariable,s.defaultValue=t.defaultValue,s.context=e,s.defaultCssValue=i,s.get=e=>f`var(${p(t.name)}, ${i(e)})`,s.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],s.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},s}}vt.create("--ft-color-primary","COLOR","#2196F3"),vt.create("--ft-color-primary-variant","COLOR","#1976D2"),vt.create("--ft-color-secondary","COLOR","#FFCC80"),vt.create("--ft-color-secondary-variant","COLOR","#F57C00"),vt.create("--ft-color-surface","COLOR","#FFFFFF"),vt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),vt.create("--ft-color-error","COLOR","#B00020"),vt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),vt.create("--ft-color-opacity-high","NUMBER","1"),vt.create("--ft-color-opacity-medium","NUMBER","0.74"),vt.create("--ft-color-opacity-disabled","NUMBER","0.38"),vt.create("--ft-color-on-primary","COLOR","#FFFFFF"),vt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),vt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),vt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),vt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),vt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),vt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),vt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),vt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),vt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),vt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),vt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),vt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),vt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),vt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),vt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),vt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),vt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),vt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),vt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),vt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),vt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),vt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),vt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),vt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),vt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),vt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),vt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),vt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),vt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),vt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),vt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),vt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.create("--ft-border-radius-S","SIZE","4px"),vt.create("--ft-border-radius-M","SIZE","8px"),vt.create("--ft-border-radius-L","SIZE","12px"),vt.create("--ft-border-radius-XL","SIZE","16px"),vt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),vt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),vt.create("--ft-transition-duration","UNKNOWN","250ms"),vt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");class bt extends pt{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,i])=>t.registry.define(e,i))));const e={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(e);return v(i,t.elementStyles),i}}var mt,xt=function(t,e,i,s){for(var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};const wt=Symbol("constructorPrototype"),yt=Symbol("constructorName"),gt=Symbol("exportpartsDebouncer");class Ot extends bt{constructor(){super(),this[mt]=new e(5),this[yt]=this.constructor.name,this[wt]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[yt]&&Object.setPrototypeOf(this,this[wt])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[gt].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,s,n,o,r;const l=t=>null!=t&&t.trim().length>0,h=t.filter(l).map((t=>t.trim()));if(0===h.length)return void this.removeAttribute("exportparts");const a=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(n=null===(s=t.getAttribute("part"))||void 0===s?void 0:s.split(" "))&&void 0!==n?n:[],i=null!==(r=null===(o=t.getAttribute("exportparts"))||void 0===o?void 0:o.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>a.add(t)))}if(0===a.size)return void this.removeAttribute("exportparts");const c=[...a.values()].flatMap((t=>h.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}var Nt,Ct;mt=gt,xt([s()],Ot.prototype,"exportpartsPrefix",void 0),xt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return s({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!l(t,e),...null!=e?e:{}})}([])],Ot.prototype,"exportpartsPrefixes",void 0),xt([s()],Ot.prototype,"customStylesheet",void 0),f`
|
|
66
|
+
var ut,dt;let pt=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=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._$Do=((t,i,e)=>{var s,n;const o=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:i;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new et(i.insertBefore(j(),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._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return J}};pt.finalized=!0,pt._$litElement$=!0,null===(ut=globalThis.litElementHydrateSupport)||void 0===ut||ut.call(globalThis,{LitElement:pt});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:pt}),(null!==(dt=globalThis.litElementVersions)&&void 0!==dt?dt:globalThis.litElementVersions=[]).push("3.3.2");class vt{static create(t,i,e){let s=t=>p(null!=t?t:e),n=f`var(${p(t)}, ${s(e)})`;return n.name=t,n.category=i,n.defaultValue=e,n.defaultCssValue=s,n.get=i=>f`var(${p(t)}, ${s(i)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>e,n}static extend(t,i,e){let s=t=>i.get(null!=t?t:e),n=f`var(${p(t)}, ${s(e)})`;return n.name=t,n.category=i.category,n.fallbackVariable=i,n.defaultValue=e,n.defaultCssValue=s,n.get=i=>f`var(${p(t)}, ${s(i)})`,n.breadcrumb=()=>[i.name,...i.breadcrumb()],n.lastResortDefaultValue=()=>e,n}static external(t,i){let e=i=>t.fallbackVariable?t.fallbackVariable.get(null!=i?i:t.defaultValue):p(null!=i?i:t.defaultValue),s=f`var(${p(t.name)}, ${e(t.defaultValue)})`;return s.name=t.name,s.category=t.category,s.fallbackVariable=t.fallbackVariable,s.defaultValue=t.defaultValue,s.context=i,s.defaultCssValue=e,s.get=i=>f`var(${p(t.name)}, ${e(i)})`,s.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],s.lastResortDefaultValue=()=>{var i,e;return null!==(i=t.defaultValue)&&void 0!==i?i:null===(e=t.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()},s}}vt.create("--ft-color-primary","COLOR","#2196F3"),vt.create("--ft-color-primary-variant","COLOR","#1976D2"),vt.create("--ft-color-secondary","COLOR","#FFCC80"),vt.create("--ft-color-secondary-variant","COLOR","#F57C00"),vt.create("--ft-color-surface","COLOR","#FFFFFF"),vt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),vt.create("--ft-color-error","COLOR","#B00020"),vt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),vt.create("--ft-color-opacity-high","NUMBER","1"),vt.create("--ft-color-opacity-medium","NUMBER","0.74"),vt.create("--ft-color-opacity-disabled","NUMBER","0.38"),vt.create("--ft-color-on-primary","COLOR","#FFFFFF"),vt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),vt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),vt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),vt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),vt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),vt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),vt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),vt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),vt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),vt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),vt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),vt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),vt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),vt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),vt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),vt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),vt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),vt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),vt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),vt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),vt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),vt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),vt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),vt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),vt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),vt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),vt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),vt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),vt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),vt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),vt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),vt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.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)"),vt.create("--ft-border-radius-S","SIZE","4px"),vt.create("--ft-border-radius-M","SIZE","8px"),vt.create("--ft-border-radius-L","SIZE","12px"),vt.create("--ft-border-radius-XL","SIZE","16px"),vt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),vt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),vt.create("--ft-transition-duration","UNKNOWN","250ms"),vt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");class bt extends pt{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([i,e])=>t.registry.define(i,e))));const i={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(i);return v(e,t.elementStyles),e}}var mt,xt=function(t,i,e,s){for(var n,o=arguments.length,r=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(i,e,r):n(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r};const wt=Symbol("constructorPrototype"),yt=Symbol("constructorName"),gt=Symbol("exportpartsDebouncer");class Ot extends bt{constructor(){super(),this[mt]=new i(5),this[yt]=this.constructor.name,this[wt]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[yt]&&Object.setPrototypeOf(this,this[wt])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var i,e;if((null!==(e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[gt].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var i,e,s,n,o,r;const l=t=>null!=t&&t.trim().length>0,h=t.filter(l).map((t=>t.trim()));if(0===h.length)return void this.removeAttribute("exportparts");const a=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===(s=t.getAttribute("part"))||void 0===s?void 0:s.split(" "))&&void 0!==n?n:[],e=null!==(r=null===(o=t.getAttribute("exportparts"))||void 0===o?void 0:o.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...i,...e).filter(l).map((t=>t.trim())).forEach((t=>a.add(t)))}if(0===a.size)return void this.removeAttribute("exportparts");const c=[...a.values()].flatMap((t=>h.map((i=>`${t}:${i}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}var Nt,Ct;mt=gt,xt([s()],Ot.prototype,"exportpartsPrefix",void 0),xt([function(t,i){const e=()=>JSON.parse(JSON.stringify(t));return s({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,i)=>!l(t,i),...null!=i?i:{}})}([])],Ot.prototype,"exportpartsPrefixes",void 0),xt([s()],Ot.prototype,"customStylesheet",void 0),f`
|
|
67
67
|
.ft-no-text-select {
|
|
68
68
|
-webkit-touch-callout: none;
|
|
69
69
|
-webkit-user-select: none;
|
|
@@ -95,18 +95,18 @@ var ut,dt;let pt=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
95
95
|
display: inline-block;
|
|
96
96
|
width: 0;
|
|
97
97
|
}
|
|
98
|
-
`,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Ct=null===(Nt=window.safari)||void 0===Nt?void 0:Nt.pushNotification)||void 0===Ct||Ct.toString());
|
|
98
|
+
`,window.ftReduxStores||(window.ftReduxStores={}),navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Ct=null===(Nt=window.safari)||void 0===Nt?void 0:Nt.pushNotification)||void 0===Ct||Ct.toString());
|
|
99
99
|
/**
|
|
100
100
|
* @license
|
|
101
101
|
* Copyright 2017 Google LLC
|
|
102
102
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
103
103
|
*/
|
|
104
|
-
const Et=2,St=t=>(...
|
|
104
|
+
const Et=2,St=t=>(...i)=>({_$litDirective$:t,values:i});class $t{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)}}
|
|
105
105
|
/**
|
|
106
106
|
* @license
|
|
107
107
|
* Copyright 2020 Google LLC
|
|
108
108
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
109
|
-
*/const{I:Rt}=at,Mt=()=>document.createComment(""),kt=(t,e
|
|
109
|
+
*/const{I:Rt}=at,Mt=()=>document.createComment(""),kt=(t,i,e)=>{var s;const n=t._$AA.parentNode,o=void 0===i?t._$AB:i._$AA;if(void 0===e){const i=n.insertBefore(Mt(),o),s=n.insertBefore(Mt(),o);e=new Rt(i,s,t,t.options)}else{const i=e._$AB.nextSibling,r=e._$AM,l=r!==t;if(l){let i;null===(s=e._$AQ)||void 0===s||s.call(e,t),e._$AM=t,void 0!==e._$AP&&(i=t._$AU)!==r._$AU&&e._$AP(i)}if(i!==o||l){let t=e._$AA;for(;t!==i;){const i=t.nextSibling;n.insertBefore(t,o),t=i}}}return e},Ut=(t,i,e=t)=>(t._$AI(i,e),t),At={},Ft=t=>{var i;null===(i=t._$AP)||void 0===i||i.call(t,!1,!0);let e=t._$AA;const s=t._$AB.nextSibling;for(;e!==s;){const t=e.nextSibling;e.remove(),e=t}},Lt=(t,i,e)=>{const s=new Map;for(let n=i;n<=e;n++)s.set(t[n],n);return s},jt=St(class extends $t{constructor(t){if(super(t),t.type!==Et)throw Error("repeat() can only be used in text expressions")}dt(t,i,e){let s;void 0===e?e=i:void 0!==i&&(s=i);const n=[],o=[];let r=0;for(const i of t)n[r]=s?s(i,r):r,o[r]=e(i,r),r++;return{values:o,keys:n}}render(t,i,e){return this.dt(t,i,e).values}update(t,[i,e,s]){var n;const o=(t=>t._$AH)(t),{values:r,keys:l}=this.dt(i,e,s);if(!Array.isArray(o))return this.ht=l,r;const h=null!==(n=this.ht)&&void 0!==n?n:this.ht=[],a=[];let c,u,d=0,p=o.length-1,f=0,v=r.length-1;for(;d<=p&&f<=v;)if(null===o[d])d++;else if(null===o[p])p--;else if(h[d]===l[f])a[f]=Ut(o[d],r[f]),d++,f++;else if(h[p]===l[v])a[v]=Ut(o[p],r[v]),p--,v--;else if(h[d]===l[v])a[v]=Ut(o[d],r[v]),kt(t,a[v+1],o[d]),d++,v--;else if(h[p]===l[f])a[f]=Ut(o[p],r[f]),kt(t,o[d],o[p]),p--,f++;else if(void 0===c&&(c=Lt(l,f,v),u=Lt(h,d,p)),c.has(h[d]))if(c.has(h[p])){const i=u.get(l[f]),e=void 0!==i?o[i]:null;if(null===e){const i=kt(t,o[d]);Ut(i,r[f]),a[f]=i}else a[f]=Ut(e,r[f]),kt(t,o[d],e),o[i]=null;f++}else Ft(o[p]),p--;else Ft(o[d]),d++;for(;f<=v;){const i=kt(t,a[v+1]);Ut(i,r[f]),a[f++]=i}for(;d<=p;){const t=o[d++];null!==t&&Ft(t)}return this.ht=l,((t,i=At)=>{t._$AH=i})(t,a),J}});
|
|
110
110
|
/**
|
|
111
111
|
* @license
|
|
112
112
|
* Copyright 2017 Google LLC
|
|
@@ -117,7 +117,7 @@ const Et=2,St=t=>(...e)=>({_$litDirective$:t,values:e});class $t{constructor(t){
|
|
|
117
117
|
* Copyright 2017 Google LLC
|
|
118
118
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
119
119
|
*/
|
|
120
|
-
class Tt extends $t{constructor(t){if(super(t),this.et=q,t.type!==Et)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===q||null==t)return this.ft=void 0,this.et=t;if(t===J)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const
|
|
120
|
+
class Tt extends $t{constructor(t){if(super(t),this.et=q,t.type!==Et)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===q||null==t)return this.ft=void 0,this.et=t;if(t===J)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const i=[t];return i.raw=i,this.ft={_$litType$:this.constructor.resultType,strings:i,values:[]}}}Tt.directiveName="unsafeHTML",Tt.resultType=1;const It=St(Tt),_t={padding:vt.create("--ft-infinite-scroll-padding","SIZE","0"),itemsGap:vt.create("--ft-infinite-scroll-items-gap","SIZE","4px"),itemContainerMinHeight:vt.create("--ft-infinite-scroll-item-container-min-height","SIZE",".1px")},Bt=f`
|
|
121
121
|
.items-container {
|
|
122
122
|
position: relative;
|
|
123
123
|
padding: ${_t.padding};
|
|
@@ -156,18 +156,18 @@ class Tt extends $t{constructor(t){if(super(t),this.et=q,t.type!==Et)throw Error
|
|
|
156
156
|
.rendered {
|
|
157
157
|
display: flow-root;
|
|
158
158
|
}
|
|
159
|
-
`;var Wt=function(t,e,
|
|
159
|
+
`;var Wt=function(t,i,e,s){for(var n,o=arguments.length,r=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(i,e,r):n(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r};class Kt extends CustomEvent{constructor(t,i){super("visible-items-change",{detail:{visibleIndexes:t,visibleItems:i}})}}class Pt extends Event{constructor(){super("scrolled-to-target")}}class zt extends Ot{constructor(){super(...arguments),this.items=[],this.renderItem=()=>V``,this.getItemKey=(t,i)=>`${i} - ${JSON.stringify(t)}`,this.internalScroll=!1,this.renderBeforeFirst=1,this.renderAfterLast=1,this.visibleItems=[],this.scrolledToTarget=!1,this.alreadyRenderedIndexes=new Set,this.scrollDebouncer=new i(5),this.scrollDoneDebouncer=new i(10),this.onVisibilityChange=t=>{let i=new Set(this.visibleItems),e=new Set;for(let s of t){let t=+s.target.attributes.getNamedItem("data-item-index").value;s.intersectionRect.height>0?(i.add(t),e.add(t)):e.has(t)||i.delete(t)}this.visibleItems=[...i].sort(((t,i)=>t-i))},this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange),this.onResize=t=>{this.triggerFindScrollableParent();let i=this.searchFirstVisibleItem([...this.itemsContainer.children]),e=this.scrollable.scrollTop-this.getOffset(i);for(const i of t){const t=+i.target.parentElement.getAttribute("data-item-index");(this.alreadyRenderedIndexes.has(t)||i.target.classList.contains("rendered"))&&(i.target.parentElement.style.height=i.target.clientHeight+"px")}null!=i&&null!=e&&this.scrolledToTarget&&(this.scrollable.scrollTop=this.getOffset(i)+Math.min(e,i.clientHeight))},this.resizeObserver=new ResizeObserver(this.onResize),this.onMutation=()=>{[...this.itemsContainer.children].forEach((t=>{this.resizeObserver.observe(t.children.item(0)),this.intersectionObserver.observe(t)}))},this.mutationObserver=new MutationObserver(this.onMutation),this.resetVisibleItemsDebouncer=new i(10)}get scrollable(){var t;return null!==(t=this.internalScroll?this.internalScrollable:this.firstScrollableParent)&&void 0!==t?t:document.body}render(){return V`
|
|
160
160
|
<div class="items-container ${this.internalScroll?"scrollable":""}"
|
|
161
161
|
tabindex="-1"
|
|
162
162
|
@find-scrollable-parent=${this.findScrollableParent}>
|
|
163
|
-
${jt(this.items,((t,
|
|
163
|
+
${jt(this.items,((t,i)=>this.getItemKey(t,i)),((t,i)=>this.renderItemContainer(t,i)))}
|
|
164
164
|
</div>
|
|
165
|
-
`}renderItemContainer(t,
|
|
166
|
-
<div id="item-${
|
|
167
|
-
class="item-container ${
|
|
168
|
-
data-item-index="${
|
|
169
|
-
<div class="resizable ${
|
|
170
|
-
${s?(()=>{const
|
|
165
|
+
`}renderItemContainer(t,i){const e=this.scrolledToTarget&&this.visibleItems.includes(i),s=this.alreadyRenderedIndexes.has(i)||this.scrolledToTarget&&i>=this.visibleItems[0]-this.renderBeforeFirst&&i<=(null!=(n=this.visibleItems)?n:[])[(null!=n?n:[]).length-1]+this.renderAfterLast;var n;s&&this.alreadyRenderedIndexes.add(i);return V`
|
|
166
|
+
<div id="item-${i}"
|
|
167
|
+
class="item-container ${e?"visible":""}"
|
|
168
|
+
data-item-index="${i}">
|
|
169
|
+
<div class="resizable ${e?"visible":""} ${s?"rendered":""}">
|
|
170
|
+
${s?(()=>{const e=this.renderItem(t,i);return"string"==typeof e?V`${It(e)}`:e})():null}
|
|
171
171
|
</div>
|
|
172
172
|
</div>
|
|
173
|
-
`}resetScroll(){this.triggerFindScrollableParent(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.visibleItems=[],this.scrolledToTarget=!1,this.scrollDebouncer.run((()=>{var t;let
|
|
173
|
+
`}resetScroll(){this.triggerFindScrollableParent(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.visibleItems=[],this.scrolledToTarget=!1,this.scrollDebouncer.run((()=>{var t;let i=null!==(t=this.scrollToIndex)&&void 0!==t?t:this.scrollToItem?this.items.indexOf(this.scrollToItem):-1;i>=this.items.length&&(i=-1);let e=this.getItem(i);this.scrollToTarget(e),this.scrollDoneDebouncer.run((()=>{this.onMutation(),this.scrolledToTarget=!0}))}))}getItem(t){var i;return null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(`#item-${t}`)}scrollToTarget(t){var i;if(t){let e=+(null!==(i=t.getAttribute("data-item-index"))&&void 0!==i?i:"0");this.scrollable&&0===e?this.scrollable.scrollTop=0:this.scrollable.scrollTop=this.getOffset(t)}}getOffset(t){var i;let e=0,s=t;for(;s&&s.offsetParent!==this.scrollable.offsetParent;)e+=s.offsetTop,s=s.offsetParent;return e+(null!==(i=null==s?void 0:s.offsetTop)&&void 0!==i?i:0)-this.scrollable.offsetTop}getBottomOffset(t){var i;return this.getOffset(t)+(null!==(i=null==t?void 0:t.clientHeight)&&void 0!==i?i:0)}appendItems(...t){this.items=[...this.items,...t]}prependItems(...t){this.items=[...t,...this.items]}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.triggerFindScrollableParent(),this.initIntersectionObserver(),this.mutationObserver.disconnect(),this.mutationObserver.observe(this.itemsContainer,{childList:!0})}),0)}initIntersectionObserver(){this.intersectionObserver.disconnect(),this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange,{root:this.scrollable,rootMargin:"-8px",threshold:[0,.01,.1,1]})}triggerFindScrollableParent(){var t;null===(t=this.itemsContainer)||void 0===t||t.dispatchEvent(new Event("find-scrollable-parent",{composed:!0}))}findScrollableParent(t){let i,e;t.stopPropagation();for(let s of t.composedPath()){const t=s,n=this.elementCanScroll(t);if(t.clientHeight&&t.clientHeight<t.scrollHeight&&n){i=t;break}n&&(e=t)}let s=i||e;s!==this.firstScrollableParent&&(this.firstScrollableParent=s,this.initIntersectionObserver(),this.resetScroll())}elementCanScroll(t){try{return["auto","scroll"].includes(getComputedStyle(t).overflowY)}catch(t){return!1}}searchFirstVisibleItem(t,i,e){if(i=null!=i?i:0,(e=null!=e?e:t.length-1)-i<=0)return t[i];const s=Math.floor((e-i)/2)+i;return this.getOffset(t[s])>this.scrollable.scrollTop?this.searchFirstVisibleItem(t,i,s-1):this.getBottomOffset(t[s])<this.scrollable.scrollTop?this.searchFirstVisibleItem(t,s+1,e):t[s]}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.mutationObserver.disconnect()}firstUpdated(t){super.firstUpdated(t),this.resetScroll()}update(t){super.update(t),t.has("items")&&(this.alreadyRenderedIndexes=new Set),!t.has("scrollToItem")&&!t.has("scrollToIndex")||null==this.scrollToItem&&null==this.scrollToIndex||this.resetScroll()}updated(t){super.updated(t),(t.has("visibleItems")||t.has("items"))&&this.onVisibleItemsChange(),t.has("scrolledToTarget")&&this.scrolledToTarget&&(null!=this.scrollToItem||null!=this.scrollToIndex)&&this.dispatchEvent(new Pt)}onVisibleItemsChange(){const t=this.visibleItems.every(((t,i)=>null==this.visibleItems[i+1]||t+1===this.visibleItems[i+1]));t||l(this.visibleItems,this.lastNotOkVisibleItems)?(this.resetVisibleItemsDebouncer.cancel(),this.dispatchEvent(new Kt(this.visibleItems,this.visibleItems.map((t=>this.items[t]))))):this.resetVisibleItemsDebouncer.run((()=>{this.lastNotOkVisibleItems=[...this.visibleItems],this.visibleItems=[],this.initIntersectionObserver(),this.onMutation()}))}}var Dt;zt.styles=Bt,Wt([s({type:Array})],zt.prototype,"items",void 0),Wt([s({attribute:!1})],zt.prototype,"renderItem",void 0),Wt([s({attribute:!1})],zt.prototype,"getItemKey",void 0),Wt([s({type:Object})],zt.prototype,"scrollToItem",void 0),Wt([s({type:Number})],zt.prototype,"scrollToIndex",void 0),Wt([s({type:Boolean})],zt.prototype,"internalScroll",void 0),Wt([s({type:Number})],zt.prototype,"renderBeforeFirst",void 0),Wt([s({type:Number})],zt.prototype,"renderAfterLast",void 0),Wt([n({hasChanged:(t,i)=>null!=t&&null==i||t.length!==i.length||t[0]!==i[0]})],zt.prototype,"visibleItems",void 0),Wt([o(".scrollable")],zt.prototype,"internalScrollable",void 0),Wt([o(".items-container")],zt.prototype,"itemsContainer",void 0),Wt([n()],zt.prototype,"scrolledToTarget",void 0),(Dt="ft-infinite-scroll",t=>{window.customElements.get(Dt)||window.customElements.define(Dt,t)})(zt),t.FtInfiniteScroll=zt,t.FtInfiniteScrollCssVariables=_t,t.ScrolledToTargetEvent=Pt,t.VisibleItemsChangeEvent=Kt,t.styles=Bt}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-infinite-scroll",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"description": "An infinite scroller.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "1.0.49",
|
|
23
23
|
"lit": "2.7.2"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "77eac237aeec17a50f5bcc09890746d9a9f097f0"
|
|
26
26
|
}
|