import{aq as w,ar as b,k as m,as as $}from"./index-BgvJrIu2.js";/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const y={attribute:!0,type:String,converter:b,reflect:!1,hasChanged:w},T=(t=y,s,e)=>{const{kind:n,metadata:i}=e;let o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),n==="setter"&&((t=Object.create(t)).wrapped=!0),o.set(e.name,t),n==="accessor"){const{name:c}=e;return{set(r){const h=s.get.call(this);s.set.call(this,r),this.requestUpdate(c,h,t)},init(r){return r!==void 0&&this.C(c,void 0,t,r),r}}}if(n==="setter"){const{name:c}=e;return function(r){const h=this[c];s.call(this,r),this.requestUpdate(c,h,t)}}throw Error("Unsupported decorator location: "+n)};function M(t){return(s,e)=>typeof e=="object"?T(t,s,e):((n,i,o)=>{const c=i.hasOwnProperty(o);return i.constructor.createProperty(o,n),c?Object.getOwnPropertyDescriptor(i,o):void 0})(t,s,e)}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function D(t){return M({...t,state:!0,attribute:!1})}/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const G=t=>t??m;/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const O=t=>t===null||typeof t!="object"&&typeof t!="function",P=t=>t.strings===void 0;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const p={ATTRIBUTE:1,CHILD:2},C=t=>(...s)=>({_$litDirective$:t,values:s});let A=class{constructor(s){}get _$AU(){return this._$AM._$AU}_$AT(s,e,n){this._$Ct=s,this._$AM=e,this._$Ci=n}_$AS(s,e){return this.update(s,e)}update(s,e){return this.render(...e)}};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const d=(t,s)=>{const e=t._$AN;if(e===void 0)return!1;for(const n of e)n._$AO?.(s,!1),d(n,s);return!0},u=t=>{let s,e;do{if((s=t._$AM)===void 0)break;e=s._$AN,e.delete(t),t=s}while(e?.size===0)},v=t=>{for(let s;s=t._$AM;t=s){let e=s._$AN;if(e===void 0)s._$AN=e=new Set;else if(e.has(t))break;e.add(t),N(s)}};function U(t){this._$AN!==void 0?(u(this),this._$AM=t,v(this)):this._$AM=t}function j(t,s=!1,e=0){const n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(s)if(Array.isArray(n))for(let o=e;o<n.length;o++)d(n[o],!1),u(n[o]);else n!=null&&(d(n,!1),u(n));else d(this,t)}const N=t=>{t.type==p.CHILD&&(t._$AP??=j,t._$AQ??=U)};class I extends A{constructor(){super(...arguments),this._$AN=void 0}_$AT(s,e,n){super._$AT(s,e,n),v(this),this.isConnected=s._$AU}_$AO(s,e=!0){s!==this.isConnected&&(this.isConnected=s,s?this.reconnected?.():this.disconnected?.()),e&&(d(this,s),u(this))}setValue(s){if(P(this._$Ct))this._$Ct._$AI(s,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=s,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class k{constructor(s){this.G=s}disconnect(){this.G=void 0}reconnect(s){this.G=s}deref(){return this.G}}class x{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(s=>this.Z=s)}resume(){this.Z?.(),this.Y=this.Z=void 0}}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const _=t=>!O(t)&&typeof t.then=="function",f=1073741823;class E extends I{constructor(){super(...arguments),this._$Cwt=f,this._$Cbt=[],this._$CK=new k(this),this._$CX=new x}render(...s){return s.find(e=>!_(e))??$}update(s,e){const n=this._$Cbt;let i=n.length;this._$Cbt=e;const o=this._$CK,c=this._$CX;this.isConnected||this.disconnected();for(let r=0;r<e.length&&!(r>this._$Cwt);r++){const h=e[r];if(!_(h))return this._$Cwt=r,h;r<i&&h===n[r]||(this._$Cwt=f,i=0,Promise.resolve(h).then(async g=>{for(;c.get();)await c.get();const a=o.deref();if(a!==void 0){const l=a._$Cbt.indexOf(h);l>-1&&l<a._$Cwt&&(a._$Cwt=l,a.setValue(g))}}))}return $}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const K=C(E);/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const X=C(class extends A{constructor(t){if(super(t),t.type!==p.ATTRIBUTE||t.name!=="class"||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(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in s)s[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(s)}const e=t.element.classList;for(const n of this.st)n in s||(e.remove(n),this.st.delete(n));for(const n in s){const i=!!s[n];i===this.st.has(n)||this.nt?.has(n)||(i?(e.add(n),this.st.add(n)):(e.remove(n),this.st.delete(n)))}return $}});export{X as a,C as e,I as f,K as m,M as n,G as o,D as r};
//# sourceMappingURL=class-map-Dep74gIr.js.map
