@react-native/debugger-frontend
Version:
Debugger frontend for React Native based on Chrome DevTools
122 lines (121 loc) • 47.9 kB
JavaScript
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),i=new WeakMap;let n=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=i.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(s,t))}return t}toString(){return this.cssText}};const r=t=>new n("string"==typeof t?t:t+"",void 0,s),o=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(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.")})(s)+t[i+1]),t[0]);return new n(i,t,s)},h=(s,i)=>{if(e)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of i){const i=document.createElement("style"),n=t.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,s.appendChild(i)}},l=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/,{is:a,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:p,getOwnPropertySymbols:u,getPrototypeOf:$}=Object,_=globalThis,A=_.trustedTypes,f=A?A.emptyScript:"",g=_.reactiveElementPolyfillSupport,m=(t,e)=>t,y={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},v=(t,e)=>!a(t,e),b={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:v};Symbol.metadata??=Symbol("metadata"),_.litPropertyMetadata??=new WeakMap;let S=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=b){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&c(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);n.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=$(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...p(t),...u(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return h(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const n=(void 0!==s.converter?.toAttribute?s.converter:y).toAttribute(e,s.type);this._$Em=t,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:y;this._$Em=i,this[i]=n.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??v)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}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._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[m("elementProperties")]=new Map,S[m("finalized")]=new Map,g?.({ReactiveElement:S}),(_.reactiveElementVersions??=[]).push("2.0.4");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const E=globalThis,w=E.trustedTypes,C=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,x="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+P,U=`<${H}>`,T=document,N=()=>T.createComment(""),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,R=t=>O(t)||"function"==typeof t?.[Symbol.iterator],k="[ \t\n\f\r]",L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,j=/>/g,D=RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,B=/"/g,W=/^(?:script|style|textarea|title)$/i,V=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),Y=V(1),q=V(2),Z=V(3),K=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),J=new WeakMap,X=T.createTreeWalker(T,129);function Q(t,e){if(!O(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==C?C.createHTML(e):e}const G=(t,e)=>{const s=t.length-1,i=[];let n,r=2===e?"<svg>":3===e?"<math>":"",o=L;for(let e=0;e<s;e++){const s=t[e];let h,l,a=-1,c=0;for(;c<s.length&&(o.lastIndex=c,l=o.exec(s),null!==l);)c=o.lastIndex,o===L?"!--"===l[1]?o=I:void 0!==l[1]?o=j:void 0!==l[2]?(W.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=D):void 0!==l[3]&&(o=D):o===D?">"===l[0]?(o=n??L,a=-1):void 0===l[1]?a=-2:(a=o.lastIndex-l[2].length,h=l[1],o=void 0===l[3]?D:'"'===l[3]?B:z):o===B||o===z?o=D:o===I||o===j?o=L:(o=D,n=void 0);const d=o===D&&t[e+1].startsWith("/>")?" ":"";r+=o===L?s+U:a>=0?(i.push(h),s.slice(0,a)+x+s.slice(a)+P+d):s+P+(-2===a?e:d)}return[Q(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};let tt=class t{constructor({strings:e,_$litType$:s},i){let n;this.parts=[];let r=0,o=0;const h=e.length-1,l=this.parts,[a,c]=G(e,s);if(this.el=t.createElement(a,i),X.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=X.nextNode())&&l.length<h;){if(1===n.nodeType){if(n.hasAttributes())for(const t of n.getAttributeNames())if(t.endsWith(x)){const e=c[o++],s=n.getAttribute(t).split(P),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:r,name:i[2],strings:s,ctor:"."===i[1]?rt:"?"===i[1]?ot:"@"===i[1]?ht:nt}),n.removeAttribute(t)}else t.startsWith(P)&&(l.push({type:6,index:r}),n.removeAttribute(t));if(W.test(n.tagName)){const t=n.textContent.split(P),e=t.length-1;if(e>0){n.textContent=w?w.emptyScript:"";for(let s=0;s<e;s++)n.append(t[s],N()),X.nextNode(),l.push({type:2,index:++r});n.append(t[e],N())}}}else if(8===n.nodeType)if(n.data===H)l.push({type:2,index:r});else{let t=-1;for(;-1!==(t=n.data.indexOf(P,t+1));)l.push({type:7,index:r}),t+=P.length-1}r++}}static createElement(t,e){const s=T.createElement("template");return s.innerHTML=t,s}};function et(t,e,s=t,i){if(e===K)return e;let n=void 0!==i?s._$Co?.[i]:s._$Cl;const r=M(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),void 0===r?n=void 0:(n=new r(t),n._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=n:s._$Cl=n),void 0!==n&&(e=et(t,n._$AS(t,e.values),n,i)),e}let st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??T).importNode(e,!0);X.currentNode=i;let n=X.nextNode(),r=0,o=0,h=s[0];for(;void 0!==h;){if(r===h.index){let e;2===h.type?e=new it(n,n.nextSibling,this,t):1===h.type?e=new h.ctor(n,h.name,h.strings,this,t):6===h.type&&(e=new lt(n,this,t)),this._$AV.push(e),h=s[++o]}r!==h?.index&&(n=X.nextNode(),r++)}return X.currentNode=T,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},it=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=et(this,t,e),M(t)?t===F||null==t||""===t?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==K&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):R(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==F&&M(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=tt.createElement(Q(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new st(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=J.get(t.strings);return void 0===e&&J.set(t.strings,e=new tt(t)),e}k(e){O(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,n=0;for(const r of e)n===s.length?s.push(i=new t(this.O(N()),this.O(N()),this,this.options)):i=s[n],i._$AI(r),n++;n<s.length&&(this._$AR(i&&i._$AB.nextSibling,n),s.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},nt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=F,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=F}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(void 0===n)t=et(this,t,e,0),r=!M(t)||t!==this._$AH&&t!==K,r&&(this._$AH=t);else{const i=t;let o,h;for(t=n[0],o=0;o<n.length-1;o++)h=et(this,i[s+o],e,o),h===K&&(h=this._$AH[o]),r||=!M(h)||h!==this._$AH[o],h===F?t=F:t!==F&&(t+=(h??"")+n[o+1]),this._$AH[o]=h}r&&!i&&this.j(t)}j(t){t===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},rt=class extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===F?void 0:t}},ot=class extends nt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==F)}},ht=class extends nt{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=et(this,t,e,0)??F)===K)return;const s=this._$AH,i=t===F&&s!==F||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==F&&(s===F||i);i&&this.element.removeEventListener(this.name,this,s),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)}},lt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){et(this,t)}};const at={M:x,P:P,A:H,C:1,L:G,R:st,D:R,V:et,I:it,H:nt,N:ot,U:ht,B:rt,F:lt},ct=E.litHtmlPolyfillSupport;ct?.(tt,it),(E.litHtmlVersions??=[]).push("3.2.1");const dt=(t,e,s)=>{const i=s?.renderBefore??e;let n=i._$litPart$;if(void 0===n){const t=s?.renderBefore??null;i._$litPart$=n=new it(e.insertBefore(N(),t),t,void 0,s??{})}return n._$AI(t),n
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/};let pt=class extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=dt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return K}};pt._$litElement$=!0,pt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:pt});const ut=globalThis.litElementPolyfillSupport;ut?.({LitElement:pt});const $t={_$AK:(t,e,s)=>{t._$AK(e,s)},_$AL:t=>t._$AL};(globalThis.litElementVersions??=[]).push("4.1.1");
/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const _t=!1,At=globalThis,ft=At.trustedTypes,gt=ft?ft.createPolicy("lit-html",{createHTML:t=>t}):void 0,mt="$lit$",yt=`lit$${Math.random().toFixed(9).slice(2)}$`,vt="?"+yt,bt=`<${vt}>`,St=document,Et=()=>St.createComment(""),wt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Ct=Array.isArray,xt=t=>Ct(t)||"function"==typeof t?.[Symbol.iterator],Pt="[ \t\n\f\r]",Ht=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ut=/-->/g,Tt=/>/g,Nt=RegExp(`>|${Pt}(?:([^\\s"'>=/]+)(${Pt}*=${Pt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Mt=/'/g,Ot=/"/g,Rt=/^(?:script|style|textarea|title)$/i,kt=Symbol.for("lit-noChange"),Lt=Symbol.for("lit-nothing"),It=new WeakMap,jt=St.createTreeWalker(St,129);
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function Dt(t,e){if(!Ct(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==gt?gt.createHTML(e):e}const zt=(t,e)=>{const s=t.length-1,i=[];let n,r=2===e?"<svg>":3===e?"<math>":"",o=Ht;for(let e=0;e<s;e++){const s=t[e];let h,l,a=-1,c=0;for(;c<s.length&&(o.lastIndex=c,l=o.exec(s),null!==l);)c=o.lastIndex,o===Ht?"!--"===l[1]?o=Ut:void 0!==l[1]?o=Tt:void 0!==l[2]?(Rt.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=Nt):void 0!==l[3]&&(o=Nt):o===Nt?">"===l[0]?(o=n??Ht,a=-1):void 0===l[1]?a=-2:(a=o.lastIndex-l[2].length,h=l[1],o=void 0===l[3]?Nt:'"'===l[3]?Ot:Mt):o===Ot||o===Mt?o=Nt:o===Ut||o===Tt?o=Ht:(o=Nt,n=void 0);const d=o===Nt&&t[e+1].startsWith("/>")?" ":"";r+=o===Ht?s+bt:a>=0?(i.push(h),s.slice(0,a)+mt+s.slice(a)+yt+d):s+yt+(-2===a?e:d)}return[Dt(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};let Bt=class t{constructor({strings:e,_$litType$:s},i){let n;this.parts=[];let r=0,o=0;const h=e.length-1,l=this.parts,[a,c]=zt(e,s);if(this.el=t.createElement(a,i),jt.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=jt.nextNode())&&l.length<h;){if(1===n.nodeType){if(n.hasAttributes())for(const t of n.getAttributeNames())if(t.endsWith(mt)){const e=c[o++],s=n.getAttribute(t).split(yt),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:r,name:i[2],strings:s,ctor:"."===i[1]?Zt:"?"===i[1]?Kt:"@"===i[1]?Ft:qt}),n.removeAttribute(t)}else t.startsWith(yt)&&(l.push({type:6,index:r}),n.removeAttribute(t));if(Rt.test(n.tagName)){const t=n.textContent.split(yt),e=t.length-1;if(e>0){n.textContent=ft?ft.emptyScript:"";for(let s=0;s<e;s++)n.append(t[s],Et()),jt.nextNode(),l.push({type:2,index:++r});n.append(t[e],Et())}}}else if(8===n.nodeType)if(n.data===vt)l.push({type:2,index:r});else{let t=-1;for(;-1!==(t=n.data.indexOf(yt,t+1));)l.push({type:7,index:r}),t+=yt.length-1}r++}}static createElement(t,e){const s=St.createElement("template");return s.innerHTML=t,s}};function Wt(t,e,s=t,i){if(e===kt)return e;let n=void 0!==i?s._$Co?.[i]:s._$Cl;const r=wt(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),void 0===r?n=void 0:(n=new r(t),n._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=n:s._$Cl=n),void 0!==n&&(e=Wt(t,n._$AS(t,e.values),n,i)),e}let Vt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??St).importNode(e,!0);jt.currentNode=i;let n=jt.nextNode(),r=0,o=0,h=s[0];for(;void 0!==h;){if(r===h.index){let e;2===h.type?e=new Yt(n,n.nextSibling,this,t):1===h.type?e=new h.ctor(n,h.name,h.strings,this,t):6===h.type&&(e=new Jt(n,this,t)),this._$AV.push(e),h=s[++o]}r!==h?.index&&(n=jt.nextNode(),r++)}return jt.currentNode=St,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},Yt=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=Lt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Wt(this,t,e),wt(t)?t===Lt||null==t||""===t?(this._$AH!==Lt&&this._$AR(),this._$AH=Lt):t!==this._$AH&&t!==kt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):xt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Lt&&wt(this._$AH)?this._$AA.nextSibling.data=t:this.T(St.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=Bt.createElement(Dt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Vt(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=It.get(t.strings);return void 0===e&&It.set(t.strings,e=new Bt(t)),e}k(e){Ct(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,n=0;for(const r of e)n===s.length?s.push(i=new t(this.O(Et()),this.O(Et()),this,this.options)):i=s[n],i._$AI(r),n++;n<s.length&&(this._$AR(i&&i._$AB.nextSibling,n),s.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},qt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=Lt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=Lt}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(void 0===n)t=Wt(this,t,e,0),r=!wt(t)||t!==this._$AH&&t!==kt,r&&(this._$AH=t);else{const i=t;let o,h;for(t=n[0],o=0;o<n.length-1;o++)h=Wt(this,i[s+o],e,o),h===kt&&(h=this._$AH[o]),r||=!wt(h)||h!==this._$AH[o],h===Lt?t=Lt:t!==Lt&&(t+=(h??"")+n[o+1]),this._$AH[o]=h}r&&!i&&this.j(t)}j(t){t===Lt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Zt=class extends qt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Lt?void 0:t}},Kt=class extends qt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Lt)}};class Ft extends qt{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=Wt(this,t,e,0)??Lt)===kt)return;const s=this._$AH,i=t===Lt&&s!==Lt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==Lt&&(s===Lt||i);i&&this.element.removeEventListener(this.name,this,s),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)}}let Jt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Wt(this,t)}};const Xt={M:mt,P:yt,A:vt,C:1,L:zt,R:Vt,D:xt,V:Wt,I:Yt,H:qt,N:Kt,U:Ft,B:Zt,F:Jt},Qt=At.litHtmlPolyfillSupport;Qt?.(Bt,Yt),(At.litHtmlVersions??=[]).push("3.2.1");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const Gt=t=>(...e)=>({_$litDirective$:t,values:e});let te=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const ee=Gt(class extends te{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((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const s=t.element.classList;for(const t of this.st)t in e||(s.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(s.add(t),this.st.add(t)):(s.remove(t),this.st.delete(t)))}return kt}}),{I:se}=Xt,ie=t=>void 0===t.strings,ne=()=>document.createComment(""),re=(t,e,s)=>{const i=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=i.insertBefore(ne(),n),r=i.insertBefore(ne(),n);s=new se(e,r,t,t.options)}else{const e=s._$AB.nextSibling,r=s._$AM,o=r!==t;if(o){let e;s._$AQ?.(t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==r._$AU&&s._$AP(e)}if(e!==n||o){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;i.insertBefore(t,n),t=e}}}return s},oe=(t,e,s=t)=>(t._$AI(e,s),t),he={},le=(t,e=he)=>t._$AH=e,ae=t=>{t._$AP?.(!1,!0);let e=t._$AA;const s=t._$AB.nextSibling;for(;e!==s;){const t=e.nextSibling;e.remove(),e=t}},ce=Gt(class extends te{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(!ie(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===kt||e===Lt)return e;const s=t.element,i=t.name;if(3===t.type){if(e===s[i])return kt}else if(4===t.type){if(!!e===s.hasAttribute(i))return kt}else if(1===t.type&&s.getAttribute(i)===e+"")return kt;return le(t),e}}),de=(t,e,s)=>{const i=new Map;for(let n=e;n<=s;n++)i.set(t[n],n);return i},pe=Gt(class extends te{constructor(t){if(super(t),2!==t.type)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const n=[],r=[];let o=0;for(const e of t)n[o]=i?i(e,o):o,r[o]=s(e,o),o++;return{values:r,keys:n}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,i]){const n=(t=>t._$AH)(t),{values:r,keys:o}=this.dt(e,s,i);if(!Array.isArray(n))return this.ut=o,r;const h=this.ut??=[],l=[];let a,c,d=0,p=n.length-1,u=0,$=r.length-1;for(;d<=p&&u<=$;)if(null===n[d])d++;else if(null===n[p])p--;else if(h[d]===o[u])l[u]=oe(n[d],r[u]),d++,u++;else if(h[p]===o[$])l[$]=oe(n[p],r[$]),p--,$--;else if(h[d]===o[$])l[$]=oe(n[d],r[$]),re(t,l[$+1],n[d]),d++,$--;else if(h[p]===o[u])l[u]=oe(n[p],r[u]),re(t,n[d],n[p]),p--,u++;else if(void 0===a&&(a=de(o,u,$),c=de(h,d,p)),a.has(h[d]))if(a.has(h[p])){const e=c.get(o[u]),s=void 0!==e?n[e]:null;if(null===s){const e=re(t,n[d]);oe(e,r[u]),l[u]=e}else l[u]=oe(s,r[u]),re(t,n[d],s),n[e]=null;u++}else ae(n[p]),p--;else ae(n[d]),d++;for(;u<=$;){const e=re(t,l[$+1]);oe(e,r[u]),l[u++]=e}for(;d<=p;){const t=n[d++];null!==t&&ae(t)}return this.ut=o,le(t,l),kt}}),ue="important",$e=" !"+ue,_e=Gt(class extends te{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(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ft.add(t);const e="string"==typeof i&&i.endsWith($e);t.includes("-")||e?s.setProperty(t,e?i.slice(0,-11):i,e?ue:""):s[t]=i}}return kt}});
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/let Ae=class extends te{constructor(t){if(super(t),this.it=Lt,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Lt||null==t)return this._t=void 0,this.it=t;if(t===kt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Ae.directiveName="unsafeHTML",Ae.resultType=1;const fe=Gt(Ae),ge=(t,e)=>{const s=t._$AN;if(void 0===s)return!1;for(const t of s)t._$AO?.(e,!1),ge(t,e);return!0},me=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===s?.size)},ye=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Se(e)}};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function ve(t){void 0!==this._$AN?(me(this),this._$AM=t,ye(this)):this._$AM=t}function be(t,e=!1,s=0){const i=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)ge(i[t],!1),me(i[t]);else null!=i&&(ge(i,!1),me(i));else ge(this,t)}const Se=t=>{2==t.type&&(t._$AP??=be,t._$AQ??=ve)};class Ee extends te{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),ye(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(ge(this,t),me(this))}setValue(t){if(ie(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class we{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}class Ce{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??=new Promise((t=>this.q=t))}resume(){this.q?.(),this.Z=this.q=void 0}}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const xe=t=>!(t=>null===t||"object"!=typeof t&&"function"!=typeof t)(t)&&"function"==typeof t.then,Pe=1073741823;class He extends Ee{constructor(){super(...arguments),this._$Cwt=Pe,this._$Cbt=[],this._$CK=new we(this),this._$CX=new Ce}render(...t){return t.find((t=>!xe(t)))??kt}update(t,e){const s=this._$Cbt;let i=s.length;this._$Cbt=e;const n=this._$CK,r=this._$CX;this.isConnected||this.disconnected();for(let t=0;t<e.length&&!(t>this._$Cwt);t++){const o=e[t];if(!xe(o))return this._$Cwt=t,o;t<i&&o===s[t]||(this._$Cwt=Pe,i=0,Promise.resolve(o).then((async t=>{for(;r.get();)await r.get();const e=n.deref();if(void 0!==e){const s=e._$Cbt.indexOf(o);s>-1&&s<e._$Cwt&&(e._$Cwt=s,e.setValue(t))}})))}return kt}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const Ue=Gt(He);
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class Te{}const Ne=new WeakMap,Me=Gt(class extends Ee{render(t){return Lt}update(t,[e]){const s=e!==this.Y;return s&&void 0!==this.Y&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),Lt}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.Y){const e=this.ht??globalThis;let s=Ne.get(e);void 0===s&&(s=new WeakMap,Ne.set(e,s)),void 0!==s.get(this.Y)&&this.Y.call(this.ht,void 0),s.set(this.Y,t),void 0!==t&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return"function"==typeof this.Y?Ne.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Oe=Object.freeze({__proto__:null,UnsafeHTMLDirective:Ae,UntilDirective:He,classMap:ee,createRef:()=>new Te,ifDefined:t=>t??Lt
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/,live:ce,ref:Me,repeat:pe,styleMap:_e,unsafeHTML:fe,until:Ue});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/var Re=Object.freeze({__proto__:null,Directive:class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}},PartType:{ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},directive:t=>(...e)=>({_$litDirective$:t,values:e})});
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const ke=globalThis,Le=ke.ShadowRoot&&(void 0===ke.ShadyCSS||ke.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ie=Symbol(),je=new WeakMap;let De=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Ie)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Le&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=je.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&je.set(e,t))}return t}toString(){return this.cssText}};const ze=Le?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new De("string"==typeof t?t:t+"",void 0,Ie))(e)})(t):t
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/,{is:Be,defineProperty:We,getOwnPropertyDescriptor:Ve,getOwnPropertyNames:Ye,getOwnPropertySymbols:qe,getPrototypeOf:Ze}=Object,Ke=globalThis,Fe=Ke.trustedTypes,Je=Fe?Fe.emptyScript:"",Xe=Ke.reactiveElementPolyfillSupport,Qe=(t,e)=>t,Ge={toAttribute(t,e){switch(e){case Boolean:t=t?Je:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},ts=(t,e)=>!Be(t,e),es={attribute:!0,type:String,converter:Ge,reflect:!1,hasChanged:ts};Symbol.metadata??=Symbol("metadata"),Ke.litPropertyMetadata??=new WeakMap;let ss=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=es){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&We(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=Ve(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);n.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??es}static _$Ei(){if(this.hasOwnProperty(Qe("elementProperties")))return;const t=Ze(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Qe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Qe("properties"))){const t=this.properties,e=[...Ye(t),...qe(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(ze(t))}else void 0!==t&&e.push(ze(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(Le)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of e){const e=document.createElement("style"),i=ke.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=s.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const n=(void 0!==s.converter?.toAttribute?s.converter:Ge).toAttribute(e,s.type);this._$Em=t,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Ge;this._$Em=i,this[i]=n.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??ts)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}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._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}};ss.elementStyles=[],ss.shadowRootOptions={mode:"open"},ss[Qe("elementProperties")]=new Map,ss[Qe("finalized")]=new Map,Xe?.({ReactiveElement:ss}),(Ke.reactiveElementVersions??=[]).push("2.0.4");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const is={attribute:!0,type:String,converter:Ge,reflect:!1,hasChanged:ts},ns=(t=is,e,s)=>{const{kind:i,metadata:n}=s;let r=globalThis.litPropertyMetadata.get(n);if(void 0===r&&globalThis.litPropertyMetadata.set(n,r=new Map),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const n=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,n,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const n=this[i];e.call(this,s),this.requestUpdate(i,n,t)}}throw Error("Unsupported decorator location: "+i)};function rs(t){return(e,s)=>"object"==typeof s?ns(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/}var os=Object.freeze({__proto__:null,customElement:t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},property:rs,standardProperty:ns,state:function(t){return rs({...t,state:!0,attribute:!1})}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const hs=globalThis,ls=hs.trustedTypes,as=ls?ls.createPolicy("lit-html",{createHTML:t=>t}):void 0,cs="$lit$",ds=`lit$${Math.random().toFixed(9).slice(2)}$`,ps="?"+ds,us=`<${ps}>`,$s=document,_s=()=>$s.createComment(""),As=t=>null===t||"object"!=typeof t&&"function"!=typeof t,fs=Array.isArray,gs="[ \t\n\f\r]",ms=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ys=/-->/g,vs=/>/g,bs=RegExp(`>|${gs}(?:([^\\s"'>=/]+)(${gs}*=${gs}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Ss=/'/g,Es=/"/g,ws=/^(?:script|style|textarea|title)$/i,Cs=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),xs=Cs(1),Ps=Cs(2),Hs=Cs(3),Us=Symbol.for("lit-noChange"),Ts=Symbol.for("lit-nothing"),Ns=new WeakMap,Ms=$s.createTreeWalker($s,129);function Os(t,e){if(!fs(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==as?as.createHTML(e):e}const Rs=(t,e)=>{const s=t.length-1,i=[];let n,r=2===e?"<svg>":3===e?"<math>":"",o=ms;for(let e=0;e<s;e++){const s=t[e];let h,l,a=-1,c=0;for(;c<s.length&&(o.lastIndex=c,l=o.exec(s),null!==l);)c=o.lastIndex,o===ms?"!--"===l[1]?o=ys:void 0!==l[1]?o=vs:void 0!==l[2]?(ws.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=bs):void 0!==l[3]&&(o=bs):o===bs?">"===l[0]?(o=n??ms,a=-1):void 0===l[1]?a=-2:(a=o.lastIndex-l[2].length,h=l[1],o=void 0===l[3]?bs:'"'===l[3]?Es:Ss):o===Es||o===Ss?o=bs:o===ys||o===vs?o=ms:(o=bs,n=void 0);const d=o===bs&&t[e+1].startsWith("/>")?" ":"";r+=o===ms?s+us:a>=0?(i.push(h),s.slice(0,a)+cs+s.slice(a)+ds+d):s+ds+(-2===a?e:d)}return[Os(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class ks{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const o=t.length-1,h=this.parts,[l,a]=Rs(t,e);if(this.el=ks.createElement(l,s),Ms.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=Ms.nextNode())&&h.length<o;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(cs)){const e=a[r++],s=i.getAttribute(t).split(ds),o=/([.?@])?(.*)/.exec(e);h.push({type:1,index:n,name:o[2],strings:s,ctor:"."===o[1]?zs:"?"===o[1]?Bs:"@"===o[1]?Ws:Ds}),i.removeAttribute(t)}else t.startsWith(ds)&&(h.push({type:6,index:n}),i.removeAttribute(t));if(ws.test(i.tagName)){const t=i.textContent.split(ds),e=t.length-1;if(e>0){i.textContent=ls?ls.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],_s()),Ms.nextNode(),h.push({type:2,index:++n});i.append(t[e],_s())}}}else if(8===i.nodeType)if(i.data===ps)h.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(ds,t+1));)h.push({type:7,index:n}),t+=ds.length-1}n++}}static createElement(t,e){const s=$s.createElement("template");return s.innerHTML=t,s}}function Ls(t,e,s=t,i){if(e===Us)return e;let n=void 0!==i?s._$Co?.[i]:s._$Cl;const r=As(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),void 0===r?n=void 0:(n=new r(t),n._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=n:s._$Cl=n),void 0!==n&&(e=Ls(t,n._$AS(t,e.values),n,i)),e}class Is{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??$s).importNode(e,!0);Ms.currentNode=i;let n=Ms.nextNode(),r=0,o=0,h=s[0];for(;void 0!==h;){if(r===h.index){let e;2===h.type?e=new js(n,n.nextSibling,this,t):1===h.type?e=new h.ctor(n,h.name,h.strings,this,t):6===h.type&&(e=new Vs(n,this,t)),this._$AV.push(e),h=s[++o]}r!==h?.index&&(n=Ms.nextNode(),r++)}return Ms.currentNode=$s,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class js{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=Ts,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ls(this,t,e),As(t)?t===Ts||null==t||""===t?(this._$AH!==Ts&&this._$AR(),this._$AH=Ts):t!==this._$AH&&t!==Us&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>fs(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Ts&&As(this._$AH)?this._$AA.nextSibling.data=t:this.T($s.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=ks.createElement(Os(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Is(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=Ns.get(t.strings);return void 0===e&&Ns.set(t.strings,e=new ks(t)),e}k(t){fs(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new js(this.O(_s()),this.O(_s()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Ds{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=Ts,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=Ts}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(void 0===n)t=Ls(this,t,e,0),r=!As(t)||t!==this._$AH&&t!==Us,r&&(this._$AH=t);else{const i=t;let o,h;for(t=n[0],o=0;o<n.length-1;o++)h=Ls(this,i[s+o],e,o),h===Us&&(h=this._$AH[o]),r||=!As(h)||h!==this._$AH[o],h===Ts?t=Ts:t!==Ts&&(t+=(h??"")+n[o+1]),this._$AH[o]=h}r&&!i&&this.j(t)}j(t){t===Ts?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class zs extends Ds{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Ts?void 0:t}}class Bs extends Ds{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Ts)}}class Ws extends Ds{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=Ls(this,t,e,0)??Ts)===Us)return;const s=this._$AH,i=t===Ts&&s!==Ts||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==Ts&&(s===Ts||i);i&&this.element.removeEventListener(this.name,this,s),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 Vs{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Ls(this,t)}}const Ys=hs.litHtmlPolyfillSupport;Ys?.(ks,js),(hs.litHtmlVersions??=[]).push("3.2.1");
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const qs=Symbol.for(""),Zs=t=>{if(t?.r===qs)return t?._$litStatic$},Ks=new Map,Fs=t=>(e,...s)=>{const i=s.length;let n,r;const o=[],h=[];let l,a=0,c=!1;for(;a<i;){for(l=e[a];a<i&&void 0!==(r=s[a],n=Zs(r));)l+=n+e[++a],c=!0;a!==i&&h.push(r),o.push(l),a++}if(a===i&&o.push(e[i]),c){const t=o.join("$$lit$$");void 0===(e=Ks.get(t))&&(o.raw=o,Ks.set(t,e=o)),s=h}return t(e,...s)},Js=Fs(xs),Xs=Fs(Ps),Qs=Fs(Hs);var Gs=Object.freeze({__proto__:null,html:Js,literal:(t,...e)=>({_$litStatic$:e.reduce(((e,s,i)=>e+(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.`)})(s)+t[i+1]),t[0]),r:qs}),mathml:Qs,svg:Xs,unsafeStatic:t=>({_$litStatic$:t,r:qs}),withStatic:Fs});export{n as CSSResult,os as Decorators,Re as Directive,Oe as Directives,pt as LitElement,S as ReactiveElement,Gs as StaticHtml,$t as _$LE,at as _$LH,h as adoptStyles,o as css,y as defaultConverter,l as getCompatibleStyle,Y as html,_t as isServer,Z as mathml,K as noChange,v as notEqual,F as nothing,dt as render,e as supportsAdoptingStyleSheets,q as svg,r as unsafeCSS};