tildefriends/apps/ssb/lit-all.min.js
2024-08-06 12:19:10 -04:00

121 lines
29 KiB
JavaScript

/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const tt=globalThis,st=tt.ShadowRoot&&(void 0===tt.ShadyCSS||tt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,it=Symbol(),et=new WeakMap;class ht{constructor(t,s,i){if(this._$cssResult$=!0,i!==it)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.i;const s=this.t;if(st&&void 0===t){const i=void 0!==s&&1===s.length;i&&(t=et.get(s)),void 0===t&&((this.i=t=new CSSStyleSheet).replaceSync(this.cssText),i&&et.set(s,t))}return t}toString(){return this.cssText}}const ot=t=>new ht("string"==typeof t?t:t+"",void 0,it),rt=(t,...s)=>{const i=1===t.length?t[0]:s.reduce(((s,i,e)=>s+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[e+1]),t[0]);return new ht(i,t,it)},nt=(t,s)=>{if(st)t.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of s){const s=document.createElement("style"),e=tt.litNonce;void 0!==e&&s.setAttribute("nonce",e),s.textContent=i.cssText,t.appendChild(s)}},ct=st?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let s="";for(const i of t.cssRules)s+=i.cssText;return ot(s)})(t):t
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/,{is:at,defineProperty:lt,getOwnPropertyDescriptor:ut,getOwnPropertyNames:dt,getOwnPropertySymbols:ft,getPrototypeOf:pt}=Object,vt=globalThis,mt=vt.trustedTypes,yt=mt?mt.emptyScript:"",gt=vt.reactiveElementPolyfillSupport,_t=(t,s)=>t,bt={toAttribute(t,s){switch(s){case Boolean:t=t?yt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},St=(t,s)=>!at(t,s),wt={attribute:!0,type:String,converter:bt,reflect:!1,hasChanged:St};Symbol.metadata??=Symbol("metadata"),vt.litPropertyMetadata??=new WeakMap;class $t extends HTMLElement{static addInitializer(t){this.o(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this.u&&[...this.u.keys()]}static createProperty(t,s=wt){if(s.state&&(s.attribute=!1),this.o(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),e=this.getPropertyDescriptor(t,i,s);void 0!==e&&lt(this.prototype,t,e)}}static getPropertyDescriptor(t,s,i){const{get:e,set:n}=ut(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);n.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??wt}static o(){if(this.hasOwnProperty(_t("elementProperties")))return;const t=pt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_t("finalized")))return;if(this.finalized=!0,this.o(),this.hasOwnProperty(_t("properties"))){const t=this.properties,s=[...dt(t),...ft(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this.u=new Map;for(const[t,s]of this.elementProperties){const i=this.p(t,s);void 0!==i&&this.u.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)s.unshift(ct(t))}else void 0!==t&&s.push(ct(t));return s}static p(t,s){const i=s.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this.v=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.m=null,this._()}_(){this.S=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this.$(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this.P??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this.P?.delete(t)}$(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this.v=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return nt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.P?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this.P?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}C(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor.p(t,i);if(void 0!==e&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:bt).toAttribute(s,i.type);this.m=t,null==n?this.removeAttribute(e):this.setAttribute(e,n),this.m=null}}_$AK(t,s){const i=this.constructor,e=i.u.get(t);if(void 0!==e&&this.m!==e){const t=i.getPropertyOptions(e),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:bt;this.m=e,this[e]=n.fromAttribute(s,t.type),this.m=null}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??St)(this[t],s))return;this.T(t,s,i)}!1===this.isUpdatePending&&(this.S=this.M())}T(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this.m!==t&&(this.k??=new Set).add(t)}async M(){this.isUpdatePending=!0;try{await this.S}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this.v){for(const[t,s]of this.v)this[t]=s;this.v=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.T(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this.P?.forEach((t=>t.hostUpdate?.())),this.update(s)):this.A()}catch(s){throw t=!1,this.A(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this.P?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}A(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.S}shouldUpdate(t){return!0}update(t){this.k&&=this.k.forEach((t=>this.C(t,this[t]))),this.A()}updated(t){}firstUpdated(t){}}$t.elementStyles=[],$t.shadowRootOptions={mode:"open"},$t[_t("elementProperties")]=new Map,$t[_t("finalized")]=new Map,gt?.({ReactiveElement:$t}),(vt.reactiveElementVersions??=[]).push("2.0.4");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const Pt=globalThis,Ct=Pt.trustedTypes,Tt=Ct?Ct.createPolicy("lit-html",{createHTML:t=>t}):void 0,xt="$lit$",Mt=`lit$${Math.random().toFixed(9).slice(2)}$`,kt="?"+Mt,At=`<${kt}>`,Et=document,ys=()=>Et.createComment(""),ms=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Ot=Array.isArray,Rt=t=>Ot(t)||"function"==typeof t?.[Symbol.iterator],zt="[ \t\n\f\r]",Vt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Lt=/-->/g,It=/>/g,jt=RegExp(`>|${zt}(?:([^\\s"'>=/]+)(${zt}*=${zt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Dt=/'/g,Ht=/"/g,Bt=/^(?:script|style|textarea|title)$/i,Wt=t=>(s,...i)=>({_$litType$:t,strings:s,values:i}),bs=Wt(1),gs=Wt(2),Zt=Wt(3),Ft=Symbol.for("lit-noChange"),Gt=Symbol.for("lit-nothing"),Kt=new WeakMap,Qt=Et.createTreeWalker(Et,129);function Xt(t,s){if(!Ot(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Tt?Tt.createHTML(s):s}const Yt=(t,s)=>{const i=t.length-1,e=[];let n,r=2===s?"<svg>":3===s?"<math>":"",o=Vt;for(let s=0;s<i;s++){const i=t[s];let h,c,l=-1,a=0;for(;a<i.length&&(o.lastIndex=a,c=o.exec(i),null!==c);)a=o.lastIndex,o===Vt?"!--"===c[1]?o=Lt:void 0!==c[1]?o=It:void 0!==c[2]?(Bt.test(c[2])&&(n=RegExp("</"+c[2],"g")),o=jt):void 0!==c[3]&&(o=jt):o===jt?">"===c[0]?(o=n??Vt,l=-1):void 0===c[1]?l=-2:(l=o.lastIndex-c[2].length,h=c[1],o=void 0===c[3]?jt:'"'===c[3]?Ht:Dt):o===Ht||o===Dt?o=jt:o===Lt||o===It?o=Vt:(o=jt,n=void 0);const u=o===jt&&t[s+1].startsWith("/>")?" ":"";r+=o===Vt?i+At:l>=0?(e.push(h),i.slice(0,l)+xt+i.slice(l)+Mt+u):i+Mt+(-2===l?s:u)}return[Xt(t,r+(t[i]||"<?>")+(2===s?"</svg>":3===s?"</math>":"")),e]};class ts{constructor({strings:t,_$litType$:s},i){let e;this.parts=[];let n=0,r=0;const o=t.length-1,h=this.parts,[c,l]=Yt(t,s);if(this.el=ts.createElement(c,i),Qt.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(e=Qt.nextNode())&&h.length<o;){if(1===e.nodeType){if(e.hasAttributes())for(const t of e.getAttributeNames())if(t.endsWith(xt)){const s=l[r++],i=e.getAttribute(t).split(Mt),o=/([.?@])?(.*)/.exec(s);h.push({type:1,index:n,name:o[2],strings:i,ctor:"."===o[1]?os:"?"===o[1]?rs:"@"===o[1]?ns:hs}),e.removeAttribute(t)}else t.startsWith(Mt)&&(h.push({type:6,index:n}),e.removeAttribute(t));if(Bt.test(e.tagName)){const t=e.textContent.split(Mt),s=t.length-1;if(s>0){e.textContent=Ct?Ct.emptyScript:"";for(let i=0;i<s;i++)e.append(t[i],ys()),Qt.nextNode(),h.push({type:2,index:++n});e.append(t[s],ys())}}}else if(8===e.nodeType)if(e.data===kt)h.push({type:2,index:n});else{let t=-1;for(;-1!==(t=e.data.indexOf(Mt,t+1));)h.push({type:7,index:n}),t+=Mt.length-1}n++}}static createElement(t,s){const i=Et.createElement("template");return i.innerHTML=t,i}}function ss(t,s,i=t,e){if(s===Ft)return s;let n=void 0!==e?i.U?.[e]:i.N;const r=ms(s)?void 0:s._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),void 0===r?n=void 0:(n=new r(t),n._$AT(t,i,e)),void 0!==e?(i.U??=[])[e]=n:i.N=n),void 0!==n&&(s=ss(t,n._$AS(t,s.values),n,e)),s}class is{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}O(t){const{el:{content:s},parts:i}=this._$AD,e=(t?.creationScope??Et).importNode(s,!0);Qt.currentNode=e;let n=Qt.nextNode(),r=0,o=0,h=i[0];for(;void 0!==h;){if(r===h.index){let s;2===h.type?s=new ws(n,n.nextSibling,this,t):1===h.type?s=new h.ctor(n,h.name,h.strings,this,t):6===h.type&&(s=new cs(n,this,t)),this._$AV.push(s),h=i[++o]}r!==h?.index&&(n=Qt.nextNode(),r++)}return Qt.currentNode=Et,e}R(t){let s=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}}let ws=class t{get _$AU(){return this._$AM?._$AU??this.V}constructor(t,s,i,e){this.type=2,this._$AH=Gt,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=e,this.V=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return void 0!==s&&11===t?.nodeType&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=ss(this,t,s),ms(t)?t===Gt||null==t||""===t?(this._$AH!==Gt&&this._$AR(),this._$AH=Gt):t!==this._$AH&&t!==Ft&&this.L(t):void 0!==t._$litType$?this.I(t):void 0!==t.nodeType?this.j(t):Rt(t)?this.D(t):this.L(t)}H(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}j(t){this._$AH!==t&&(this._$AR(),this._$AH=this.H(t))}L(t){this._$AH!==Gt&&ms(this._$AH)?this._$AA.nextSibling.data=t:this.j(Et.createTextNode(t)),this._$AH=t}I(t){const{values:s,_$litType$:i}=t,e="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=ts.createElement(Xt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===e)this._$AH.R(s);else{const t=new is(e,this),i=t.O(this.options);t.R(s),this.j(i),this._$AH=t}}_$AC(t){let s=Kt.get(t.strings);return void 0===s&&Kt.set(t.strings,s=new ts(t)),s}D(s){Ot(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,n=0;for(const r of s)n===i.length?i.push(e=new t(this.H(ys()),this.H(ys()),this,this.options)):e=i[n],e._$AI(r),n++;n<i.length&&(this._$AR(e&&e._$AB.nextSibling,n),i.length=n)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){void 0===this._$AM&&(this.V=t,this._$AP?.(t))}};class hs{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,i,e,n){this.type=1,this._$AH=Gt,this._$AN=void 0,this.element=t,this.name=s,this._$AM=e,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Gt}_$AI(t,s=this,i,e){const n=this.strings;let r=!1;if(void 0===n)t=ss(this,t,s,0),r=!ms(t)||t!==this._$AH&&t!==Ft,r&&(this._$AH=t);else{const e=t;let o,h;for(t=n[0],o=0;o<n.length-1;o++)h=ss(this,e[i+o],s,o),h===Ft&&(h=this._$AH[o]),r||=!ms(h)||h!==this._$AH[o],h===Gt?t=Gt:t!==Gt&&(t+=(h??"")+n[o+1]),this._$AH[o]=h}r&&!e&&this.B(t)}B(t){t===Gt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class os extends hs{constructor(){super(...arguments),this.type=3}B(t){this.element[this.name]=t===Gt?void 0:t}}class rs extends hs{constructor(){super(...arguments),this.type=4}B(t){this.element.toggleAttribute(this.name,!!t&&t!==Gt)}}class ns extends hs{constructor(t,s,i,e,n){super(t,s,i,e,n),this.type=5}_$AI(t,s=this){if((t=ss(this,t,s,0)??Gt)===Ft)return;const i=this._$AH,e=t===Gt&&i!==Gt||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==Gt&&(i===Gt||e);e&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class cs{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ss(this,t)}}const as={W:xt,q:Mt,J:kt,Z:1,F:Yt,G:is,K:Rt,X:ss,Y:ws,tt:hs,st:rs,it:ns,et:os,ht:cs},ls=Pt.litHtmlPolyfillSupport;ls?.(ts,ws),(Pt.litHtmlVersions??=[]).push("3.2.0");const us=(t,s,i)=>{const e=i?.renderBefore??s;let n=e._$litPart$;if(void 0===n){const t=i?.renderBefore??null;e._$litPart$=n=new ws(s.insertBefore(ys(),t),t,void 0,i??{})}return n._$AI(t),n};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class ds extends $t{constructor(){super(...arguments),this.renderOptions={host:this},this.ot=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.ot=us(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.ot?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.ot?.setConnected(!1)}render(){return Ft}}ds._$litElement$=!0,ds["finalized"]=!0,globalThis.litElementHydrateSupport?.({LitElement:ds});const fs=globalThis.litElementPolyfillSupport;fs?.({LitElement:ds});const ps={_$AK:(t,s,i)=>{t._$AK(s,i)},_$AL:t=>t._$AL};(globalThis.litElementVersions??=[]).push("4.1.0");
/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const vs=!1,{Y:es}=as,Nt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_s={HTML:1,SVG:2,MATHML:3},Ss=(t,s)=>void 0===s?void 0!==t?._$litType$:t?._$litType$===s,$s=t=>null!=t?._$litType$?.h,Ts=t=>void 0!==t?._$litDirective$,xs=t=>t?._$litDirective$,Es=t=>void 0===t.strings,Ut=()=>document.createComment(""),Cs=(t,s,i)=>{const e=t._$AA.parentNode,n=void 0===s?t._$AB:s._$AA;if(void 0===i){const s=e.insertBefore(Ut(),n),r=e.insertBefore(Ut(),n);i=new es(s,r,t,t.options)}else{const s=i._$AB.nextSibling,r=i._$AM,o=r!==t;if(o){let s;i._$AQ?.(t),i._$AM=t,void 0!==i._$AP&&(s=t._$AU)!==r._$AU&&i._$AP(s)}if(s!==n||o){let t=i._$AA;for(;t!==s;){const s=t.nextSibling;e.insertBefore(t,n),t=s}}}return i},Ps=(t,s,i=t)=>(t._$AI(s,i),t),As={},Ms=(t,s=As)=>t._$AH=s,ks=t=>t._$AH,Us=t=>{t._$AP?.(!1,!0);let s=t._$AA;const i=t._$AB.nextSibling;for(;s!==i;){const t=s.nextSibling;s.remove(),s=t}},Vs=t=>{t._$AR()},Os={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Rs=t=>(...s)=>({_$litDirective$:t,values:s});class Ns{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,i){this.nt=t,this._$AM=s,this.rt=i}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Ls=(t,s)=>{const i=t._$AN;if(void 0===i)return!1;for(const t of i)t._$AO?.(s,!1),Ls(t,s);return!0},zs=t=>{let s,i;do{if(void 0===(s=t._$AM))break;i=s._$AN,i.delete(t),t=s}while(0===i?.size)},js=t=>{for(let s;s=t._$AM;t=s){let i=s._$AN;if(void 0===i)s._$AN=i=new Set;else if(i.has(t))break;i.add(t),Ds(s)}};function Hs(t){void 0!==this._$AN?(zs(this),this._$AM=t,js(this)):this._$AM=t}function Is(t,s=!1,i=0){const e=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(s)if(Array.isArray(e))for(let t=i;t<e.length;t++)Ls(e[t],!1),zs(e[t]);else null!=e&&(Ls(e,!1),zs(e));else Ls(this,t)}const Ds=t=>{2==t.type&&(t._$AP??=Is,t._$AQ??=Hs)};class Bs extends Ns{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,i){super._$AT(t,s,i),js(this),this.isConnected=t._$AU}_$AO(t,s=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),s&&(Ls(this,t),zs(this))}setValue(t){if(Es(this.nt))this.nt._$AI(t,this);else{const s=[...this.nt._$AH];s[this.rt]=t,this.nt._$AI(s,this,0)}}disconnected(){}reconnected(){}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class Ws{constructor(t){this.ct=t}disconnect(){this.ct=void 0}reconnect(t){this.ct=t}deref(){return this.ct}}class Zs{constructor(){this.lt=void 0,this.ut=void 0}get(){return this.lt}pause(){this.lt??=new Promise((t=>this.ut=t))}resume(){this.ut?.(),this.lt=this.ut=void 0}}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class qs extends Bs{constructor(){super(...arguments),this.dt=new Ws(this),this.ft=new Zs}render(t,s){return Ft}update(t,[s,i]){if(this.isConnected||this.disconnected(),s===this.vt)return Ft;this.vt=s;let e=0;const{dt:n,ft:r}=this;return(async(t,s)=>{for await(const i of t)if(!1===await s(i))return})(s,(async t=>{for(;r.get();)await r.get();const o=n.deref();if(void 0!==o){if(o.vt!==s)return!1;void 0!==i&&(t=i(t,e)),o.commitValue(t,e),e++}return!0})),Ft}commitValue(t,s){this.setValue(t)}disconnected(){this.dt.disconnect(),this.ft.pause()}reconnected(){this.dt.reconnect(this),this.ft.resume()}}const Fs=Rs(qs),Gs=Rs(
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
class extends qs{constructor(t){if(super(t),2!==t.type)throw Error("asyncAppend can only be used in child expressions")}update(t,s){return this.ot=t,super.update(t,s)}commitValue(t,s){0===s&&Vs(this.ot);const i=Cs(this.ot);Ps(i,t)}}),Js=t=>$s(t)?t._$litType$.h:t.strings,Ks=Rs(class extends Ns{constructor(t){super(t),this.yt=new WeakMap}render(t){return[t]}update(t,[s]){const i=Ss(this.bt)?Js(this.bt):null,e=Ss(s)?Js(s):null;if(null!==i&&(null===e||i!==e)){const s=ks(t).pop();let e=this.yt.get(i);if(void 0===e){const t=document.createDocumentFragment();e=us(Gt,t),e.setConnected(!1),this.yt.set(i,e)}Ms(e,[s]),Cs(e,void 0,s)}if(null!==e){if(null===i||i!==e){const s=this.yt.get(e);if(void 0!==s){const i=ks(s).pop();Vs(t),Cs(t,void 0,i),Ms(t,[i])}}this.bt=s}else this.bt=void 0;return this.render(s)}}),Ys=(t,s,i)=>{for(const i of s)if(i[0]===t)return(0,i[1])();return i?.()},Qs=Rs(
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
class extends Ns{constructor(t){if(super(t),1!==t.type||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(t,[s]){if(void 0===this.gt){this.gt=new Set,void 0!==t.strings&&(this.wt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in s)s[t]&&!this.wt?.has(t)&&this.gt.add(t);return this.render(s)}const i=t.element.classList;for(const t of this.gt)t in s||(i.remove(t),this.gt.delete(t));for(const t in s){const e=!!s[t];e===this.gt.has(t)||this.wt?.has(t)||(e?(i.add(t),this.gt.add(t)):(i.remove(t),this.gt.delete(t)))}return Ft}}),Xs={},ti=Rs(class extends Ns{constructor(){super(...arguments),this._t=Xs}render(t,s){return s()}update(t,[s,i]){if(Array.isArray(s)){if(Array.isArray(this._t)&&this._t.length===s.length&&s.every(((t,s)=>t===this._t[s])))return Ft}else if(this._t===s)return Ft;return this._t=Array.isArray(s)?Array.from(s):s,this.render(s,i)}}),si=t=>t??Gt
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/;function*ii(t,s){const i="function"==typeof s;if(void 0!==t){let e=-1;for(const n of t)e>-1&&(yield i?s(e):s),e++,yield n}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const ei=Rs(class extends Ns{constructor(){super(...arguments),this.key=Gt}render(t,s){return this.key=t,s}update(t,[s,i]){return s!==this.key&&(Ms(t),this.key=s),i}}),ni=Rs(
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
class extends Ns{constructor(t){if(super(t),3!==t.type&&1!==t.type&&4!==t.type)throw Error("The `live` directive is not allowed on child or event bindings");if(!Es(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[s]){if(s===Ft||s===Gt)return s;const i=t.element,e=t.name;if(3===t.type){if(s===i[e])return Ft}else if(4===t.type){if(!!s===i.hasAttribute(e))return Ft}else if(1===t.type&&i.getAttribute(e)===s+"")return Ft;return Ms(t),s}});
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
function*ri(t,s){if(void 0!==t){let i=0;for(const e of t)yield s(e,i++)}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function*oi(t,s,i=1){const e=void 0===s?0:t;s??=t;for(let t=e;i>0?t<s:s<t;t+=i)yield t}
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const hi=()=>new ci;class ci{}const li=new WeakMap,ai=Rs(class extends Bs{render(t){return Gt}update(t,[s]){const i=s!==this.ct;return i&&void 0!==this.ct&&this.St(void 0),(i||this.$t!==this.Tt)&&(this.ct=s,this.xt=t.options?.host,this.St(this.Tt=t.element)),Gt}St(t){if(this.isConnected||(t=void 0),"function"==typeof this.ct){const s=this.xt??globalThis;let i=li.get(s);void 0===i&&(i=new WeakMap,li.set(s,i)),void 0!==i.get(this.ct)&&this.ct.call(this.xt,void 0),i.set(this.ct,t),void 0!==t&&this.ct.call(this.xt,t)}else this.ct.value=t}get $t(){return"function"==typeof this.ct?li.get(this.xt??globalThis)?.get(this.ct):this.ct?.value}disconnected(){this.$t===this.Tt&&this.St(void 0)}reconnected(){this.St(this.Tt)}}),ui=(t,s,i)=>{const e=new Map;for(let n=s;n<=i;n++)e.set(t[n],n);return e},di=Rs(class extends Ns{constructor(t){if(super(t),2!==t.type)throw Error("repeat() can only be used in text expressions")}Et(t,s,i){let e;void 0===i?i=s:void 0!==s&&(e=s);const n=[],r=[];let o=0;for(const s of t)n[o]=e?e(s,o):o,r[o]=i(s,o),o++;return{values:r,keys:n}}render(t,s,i){return this.Et(t,s,i).values}update(t,[s,i,e]){const n=ks(t),{values:r,keys:o}=this.Et(s,i,e);if(!Array.isArray(n))return this.Ct=o,r;const h=this.Ct??=[],c=[];let l,a,u=0,d=n.length-1,f=0,p=r.length-1;for(;u<=d&&f<=p;)if(null===n[u])u++;else if(null===n[d])d--;else if(h[u]===o[f])c[f]=Ps(n[u],r[f]),u++,f++;else if(h[d]===o[p])c[p]=Ps(n[d],r[p]),d--,p--;else if(h[u]===o[p])c[p]=Ps(n[u],r[p]),Cs(t,c[p+1],n[u]),u++,p--;else if(h[d]===o[f])c[f]=Ps(n[d],r[f]),Cs(t,n[u],n[d]),d--,f++;else if(void 0===l&&(l=ui(o,f,p),a=ui(h,u,d)),l.has(h[u]))if(l.has(h[d])){const s=a.get(o[f]),i=void 0!==s?n[s]:null;if(null===i){const s=Cs(t,n[u]);Ps(s,r[f]),c[f]=s}else c[f]=Ps(i,r[f]),Cs(t,n[u],i),n[s]=null;f++}else Us(n[d]),d--;else Us(n[u]),u++;for(;f<=p;){const s=Cs(t,c[p+1]);Ps(s,r[f]),c[f++]=s}for(;u<=d;){const t=n[u++];null!==t&&Us(t)}return this.Ct=o,Ms(t,c),Ft}}),fi="important",pi=" !"+fi,vi=Rs(class extends Ns{constructor(t){if(super(t),1!==t.type||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((s,i)=>{const e=t[i];return null==e?s:s+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${e};`}),"")}update(t,[s]){const{style:i}=t.element;if(void 0===this.Pt)return this.Pt=new Set(Object.keys(s)),this.render(s);for(const t of this.Pt)null==s[t]&&(this.Pt.delete(t),t.includes("-")?i.removeProperty(t):i[t]=null);for(const t in s){const e=s[t];if(null!=e){this.Pt.add(t);const s="string"==typeof e&&e.endsWith(pi);t.includes("-")||s?i.setProperty(t,s?e.slice(0,-11):e,s?fi:""):i[t]=e}}return Ft}}),yi=Rs(
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
class extends Ns{constructor(t){if(super(t),2!==t.type)throw Error("templateContent can only be used in child bindings")}render(t){return this.At===t?Ft:(this.At=t,document.importNode(t.content,!0))}});class mi extends Ns{constructor(t){if(super(t),this.bt=Gt,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Gt||null==t)return this.Mt=void 0,this.bt=t;if(t===Ft)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.bt)return this.Mt;this.bt=t;const s=[t];return s.raw=s,this.Mt={_$litType$:this.constructor.resultType,strings:s,values:[]}}}mi.directiveName="unsafeHTML",mi.resultType=1;const bi=Rs(mi);
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class gi extends mi{}gi.directiveName="unsafeSVG",gi.resultType=2;const wi=Rs(gi),_i=t=>!Nt(t)&&"function"==typeof t.then,Si=1073741823;
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class $i extends Bs{constructor(){super(...arguments),this.kt=Si,this.Ut=[],this.dt=new Ws(this),this.ft=new Zs}render(...t){return t.find((t=>!_i(t)))??Ft}update(t,s){const i=this.Ut;let e=i.length;this.Ut=s;const n=this.dt,r=this.ft;this.isConnected||this.disconnected();for(let t=0;t<s.length&&!(t>this.kt);t++){const o=s[t];if(!_i(o))return this.kt=t,o;t<e&&o===i[t]||(this.kt=Si,e=0,Promise.resolve(o).then((async t=>{for(;r.get();)await r.get();const s=n.deref();if(void 0!==s){const i=s.Ut.indexOf(o);i>-1&&i<s.kt&&(s.kt=i,s.setValue(t))}})))}return Ft}disconnected(){this.dt.disconnect(),this.ft.pause()}reconnected(){this.dt.reconnect(this),this.ft.resume()}}const Ti=Rs($i);
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function xi(t,s,i){return t?s(t):i?.(t)}
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Ei=Symbol.for(""),Ci=t=>{if(t?.r===Ei)return t?._$litStatic$},Pi=t=>({_$litStatic$:t,r:Ei}),Ai=(t,...s)=>({_$litStatic$:s.reduce(((s,i,e)=>s+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+t[e+1]),t[0]),r:Ei}),Mi=new Map,ki=t=>(s,...i)=>{const e=i.length;let n,r;const o=[],h=[];let c,l=0,a=!1;for(;l<e;){for(c=s[l];l<e&&void 0!==(r=i[l],n=Ci(r));)c+=n+s[++l],a=!0;l!==e&&h.push(r),o.push(c),l++}if(l===e&&o.push(s[e]),a){const t=o.join("$$lit$$");void 0===(s=Mi.get(t))&&(o.raw=o,Mi.set(t,s=o)),i=h}return t(s,...i)},qt=ki(bs),Jt=ki(gs);
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
window.litDisableBundleWarning||console.warn("Lit has been loaded from a bundle that combines all core features into a single file. To reduce transfer size and parsing cost, consider using the `lit` npm package directly in your project.");export{Bs as AsyncDirective,qs as AsyncReplaceDirective,ht as CSSResult,Ns as Directive,ds as LitElement,Os as PartType,$t as ReactiveElement,_s as TemplateResultType,mi as UnsafeHTMLDirective,$i as UntilDirective,ps as _$LE,as as _$LH,nt as adoptStyles,Gs as asyncAppend,Fs as asyncReplace,Ks as cache,Ys as choose,Qs as classMap,Vs as clearPart,hi as createRef,rt as css,bt as defaultConverter,Rs as directive,ks as getCommittedValue,ct as getCompatibleStyle,xs as getDirectiveClass,ti as guard,bs as html,si as ifDefined,Cs as insertPart,$s as isCompiledTemplateResult,Ts as isDirectiveResult,Nt as isPrimitive,vs as isServer,Es as isSingleExpression,Ss as isTemplateResult,ii as join,ei as keyed,Ai as literal,ni as live,ri as map,Zt as mathml,Ft as noChange,St as notEqual,Gt as nothing,oi as range,ai as ref,Us as removePart,us as render,di as repeat,Ps as setChildPartValue,Ms as setCommittedValue,qt as staticHtml,Jt as staticSvg,vi as styleMap,st as supportsAdoptingStyleSheets,gs as svg,yi as templateContent,ot as unsafeCSS,bi as unsafeHTML,wi as unsafeSVG,Pi as unsafeStatic,Ti as until,xi as when,ki as withStatic};
//# sourceMappingURL=lit-all.min.js.map