UNPKG

@gdwc/components

Version:

A library of generic web components that are accessible, framework agnostic, possible to style, and easy to use with data provided by Drupal

247 lines (235 loc) 183 kB
(function(Re){typeof define=="function"&&define.amd?define(Re):Re()})(function(){"use strict";/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Re=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Zt=Symbol(),pn=new WeakMap;class yn{constructor(e,r,n){if(this._$cssResult$=!0,n!==Zt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o;const r=this.t;if(Re&&e===void 0){const n=r!==void 0&&r.length===1;n&&(e=pn.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&pn.set(r,e))}return e}toString(){return this.cssText}}const Ao=t=>new yn(typeof t=="string"?t:t+"",void 0,Zt),ne=(t,...e)=>{const r=t.length===1?t[0]:e.reduce((n,i,o)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1],t[0]);return new yn(r,t,Zt)},So=(t,e)=>{Re?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{const n=document.createElement("style"),i=window.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)})},vn=Re?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const n of e.cssRules)r+=n.cssText;return Ao(r)})(t):t;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var Yt;const gn=window.trustedTypes,Eo=gn?gn.emptyScript:"",mn=window.reactiveElementPolyfillSupport,Xt={toAttribute(t,e){switch(e){case Boolean:t=t?Eo:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},bn=(t,e)=>e!==t&&(e==e||t==t),er={attribute:!0,type:String,converter:Xt,reflect:!1,hasChanged:bn};class Ne extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var r;(r=this.h)!==null&&r!==void 0||(this.h=[]),this.h.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((r,n)=>{const i=this._$Ep(n,r);i!==void 0&&(this._$Ev.set(i,n),e.push(i))}),e}static createProperty(e,r=er){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(e,r),!r.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,r);i!==void 0&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){return{get(){return this[r]},set(i){const o=this[e];this[r]=i,this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||er}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const r=this.properties,n=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(const i of n)this.createProperty(i,r[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const r=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)r.unshift(vn(i))}else e!==void 0&&r.push(vn(e));return r}static _$Ep(e,r){const n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(r=>r(this))}addController(e){var r,n;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var e;const r=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return So(r,this.constructor.elementStyles),r}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var n;return(n=r.hostConnected)===null||n===void 0?void 0:n.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(r=>{var n;return(n=r.hostDisconnected)===null||n===void 0?void 0:n.call(r)})}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$EO(e,r,n=er){var i,o;const a=this.constructor._$Ep(e,n);if(a!==void 0&&n.reflect===!0){const s=((o=(i=n.converter)===null||i===void 0?void 0:i.toAttribute)!==null&&o!==void 0?o:Xt.toAttribute)(r,n.type);this._$El=e,s==null?this.removeAttribute(a):this.setAttribute(a,s),this._$El=null}}_$AK(e,r){var n,i;const o=this.constructor,a=o._$Ev.get(e);if(a!==void 0&&this._$El!==a){const s=o.getPropertyOptions(a),l=s.converter,c=(i=(n=l==null?void 0:l.fromAttribute)!==null&&n!==void 0?n:typeof l=="function"?l:null)!==null&&i!==void 0?i:Xt.fromAttribute;this._$El=a,this[a]=c(r,s.type),this._$El=null}}requestUpdate(e,r,n){let i=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||bn)(this[e],r)?(this._$AL.has(e)||this._$AL.set(e,r),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,o)=>this[o]=i),this._$Ei=void 0);let r=!1;const n=this._$AL;try{r=this.shouldUpdate(n),r?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var o;return(o=i.hostUpdate)===null||o===void 0?void 0:o.call(i)}),this.update(n)):this._$Ek()}catch(i){throw r=!1,this._$Ek(),i}r&&this._$AE(n)}willUpdate(e){}_$AE(e){var r;(r=this._$ES)===null||r===void 0||r.forEach(n=>{var i;return(i=n.hostUpdated)===null||i===void 0?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((r,n)=>this._$EO(n,this[n],r)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}Ne.finalized=!0,Ne.elementProperties=new Map,Ne.elementStyles=[],Ne.shadowRootOptions={mode:"open"},mn==null||mn({ReactiveElement:Ne}),((Yt=globalThis.reactiveElementVersions)!==null&&Yt!==void 0?Yt:globalThis.reactiveElementVersions=[]).push("1.3.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var tr;const je=globalThis.trustedTypes,wn=je?je.createPolicy("lit-html",{createHTML:t=>t}):void 0,ge=`lit$${(Math.random()+"").slice(9)}$`,$n="?"+ge,Oo=`<${$n}>`,Le=document,at=(t="")=>Le.createComment(t),st=t=>t===null||typeof t!="object"&&typeof t!="function",_n=Array.isArray,Po=t=>_n(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",lt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,An=/-->/g,Sn=/>/g,Ee=RegExp(`>|[ \f\r](?:([^\\s"'>=/]+)([ \f\r]*=[ \f\r]*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),En=/'/g,On=/"/g,Pn=/^(?:script|style|textarea|title)$/i,ko=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),j=ko(1),ae=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),kn=new WeakMap,xo=(t,e,r)=>{var n,i;const o=(n=r==null?void 0:r.renderBefore)!==null&&n!==void 0?n:e;let a=o._$litPart$;if(a===void 0){const s=(i=r==null?void 0:r.renderBefore)!==null&&i!==void 0?i:null;o._$litPart$=a=new ut(e.insertBefore(at(),s),s,void 0,r!=null?r:{})}return a._$AI(t),a},De=Le.createTreeWalker(Le,129,null,!1),Mo=(t,e)=>{const r=t.length-1,n=[];let i,o=e===2?"<svg>":"",a=lt;for(let l=0;l<r;l++){const c=t[l];let d,u,h=-1,m=0;for(;m<c.length&&(a.lastIndex=m,u=a.exec(c),u!==null);)m=a.lastIndex,a===lt?u[1]==="!--"?a=An:u[1]!==void 0?a=Sn:u[2]!==void 0?(Pn.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=Ee):u[3]!==void 0&&(a=Ee):a===Ee?u[0]===">"?(a=i!=null?i:lt,h=-1):u[1]===void 0?h=-2:(h=a.lastIndex-u[2].length,d=u[1],a=u[3]===void 0?Ee:u[3]==='"'?On:En):a===On||a===En?a=Ee:a===An||a===Sn?a=lt:(a=Ee,i=void 0);const $=a===Ee&&t[l+1].startsWith("/>")?" ":"";o+=a===lt?c+Oo:h>=0?(n.push(d),c.slice(0,h)+"$lit$"+c.slice(h)+ge+$):c+ge+(h===-2?(n.push(void 0),l):$)}const s=o+(t[r]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[wn!==void 0?wn.createHTML(s):s,n]};class ct{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let o=0,a=0;const s=e.length-1,l=this.parts,[c,d]=Mo(e,r);if(this.el=ct.createElement(c,n),De.currentNode=this.el.content,r===2){const u=this.el.content,h=u.firstChild;h.remove(),u.append(...h.childNodes)}for(;(i=De.nextNode())!==null&&l.length<s;){if(i.nodeType===1){if(i.hasAttributes()){const u=[];for(const h of i.getAttributeNames())if(h.endsWith("$lit$")||h.startsWith(ge)){const m=d[a++];if(u.push(h),m!==void 0){const $=i.getAttribute(m.toLowerCase()+"$lit$").split(ge),O=/([.?@])?(.*)/.exec(m);l.push({type:1,index:o,name:O[2],strings:$,ctor:O[1]==="."?To:O[1]==="?"?Io:O[1]==="@"?Ro:Pt})}else l.push({type:6,index:o})}for(const h of u)i.removeAttribute(h)}if(Pn.test(i.tagName)){const u=i.textContent.split(ge),h=u.length-1;if(h>0){i.textContent=je?je.emptyScript:"";for(let m=0;m<h;m++)i.append(u[m],at()),De.nextNode(),l.push({type:2,index:++o});i.append(u[h],at())}}}else if(i.nodeType===8)if(i.data===$n)l.push({type:2,index:o});else{let u=-1;for(;(u=i.data.indexOf(ge,u+1))!==-1;)l.push({type:7,index:o}),u+=ge.length-1}o++}}static createElement(e,r){const n=Le.createElement("template");return n.innerHTML=e,n}}function Be(t,e,r=t,n){var i,o,a,s;if(e===ae)return e;let l=n!==void 0?(i=r._$Cl)===null||i===void 0?void 0:i[n]:r._$Cu;const c=st(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==c&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),c===void 0?l=void 0:(l=new c(t),l._$AT(t,r,n)),n!==void 0?((a=(s=r)._$Cl)!==null&&a!==void 0?a:s._$Cl=[])[n]=l:r._$Cu=l),l!==void 0&&(e=Be(t,l._$AS(t,e.values),l,n)),e}class Co{constructor(e,r){this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(e){var r;const{el:{content:n},parts:i}=this._$AD,o=((r=e==null?void 0:e.creationScope)!==null&&r!==void 0?r:Le).importNode(n,!0);De.currentNode=o;let a=De.nextNode(),s=0,l=0,c=i[0];for(;c!==void 0;){if(s===c.index){let d;c.type===2?d=new ut(a,a.nextSibling,this,e):c.type===1?d=new c.ctor(a,c.name,c.strings,this,e):c.type===6&&(d=new No(a,this,e)),this.v.push(d),c=i[++l]}s!==(c==null?void 0:c.index)&&(a=De.nextNode(),s++)}return o}m(e){let r=0;for(const n of this.v)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}}class ut{constructor(e,r,n,i){var o;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$C_=(o=i==null?void 0:i.isConnected)===null||o===void 0||o}get _$AU(){var e,r;return(r=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&r!==void 0?r:this._$C_}get parentNode(){let e=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&e.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Be(this,e,r),st(e)?e===H||e==null||e===""?(this._$AH!==H&&this._$AR(),this._$AH=H):e!==this._$AH&&e!==ae&&this.T(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.k(e):Po(e)?this.S(e):this.T(e)}j(e,r=this._$AB){return this._$AA.parentNode.insertBefore(e,r)}k(e){this._$AH!==e&&(this._$AR(),this._$AH=this.j(e))}T(e){this._$AH!==H&&st(this._$AH)?this._$AA.nextSibling.data=e:this.k(Le.createTextNode(e)),this._$AH=e}$(e){var r;const{values:n,_$litType$:i}=e,o=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=ct.createElement(i.h,this.options)),i);if(((r=this._$AH)===null||r===void 0?void 0:r._$AD)===o)this._$AH.m(n);else{const a=new Co(o,this),s=a.p(this.options);a.m(n),this.k(s),this._$AH=a}}_$AC(e){let r=kn.get(e.strings);return r===void 0&&kn.set(e.strings,r=new ct(e)),r}S(e){_n(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let n,i=0;for(const o of e)i===r.length?r.push(n=new ut(this.j(at()),this.j(at()),this,this.options)):n=r[i],n._$AI(o),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,r);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var r;this._$AM===void 0&&(this._$C_=e,(r=this._$AP)===null||r===void 0||r.call(this,e))}}class Pt{constructor(e,r,n,i,o){this.type=1,this._$AH=H,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,r=this,n,i){const o=this.strings;let a=!1;if(o===void 0)e=Be(this,e,r,0),a=!st(e)||e!==this._$AH&&e!==ae,a&&(this._$AH=e);else{const s=e;let l,c;for(e=o[0],l=0;l<o.length-1;l++)c=Be(this,s[n+l],r,l),c===ae&&(c=this._$AH[l]),a||(a=!st(c)||c!==this._$AH[l]),c===H?e=H:e!==H&&(e+=(c!=null?c:"")+o[l+1]),this._$AH[l]=c}a&&!i&&this.P(e)}P(e){e===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class To extends Pt{constructor(){super(...arguments),this.type=3}P(e){this.element[this.name]=e===H?void 0:e}}const zo=je?je.emptyScript:"";class Io extends Pt{constructor(){super(...arguments),this.type=4}P(e){e&&e!==H?this.element.setAttribute(this.name,zo):this.element.removeAttribute(this.name)}}class Ro extends Pt{constructor(e,r,n,i,o){super(e,r,n,i,o),this.type=5}_$AI(e,r=this){var n;if((e=(n=Be(this,e,r,0))!==null&&n!==void 0?n:H)===ae)return;const i=this._$AH,o=e===H&&i!==H||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,a=e!==H&&(i===H||o);o&&this.element.removeEventListener(this.name,this,i),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var r,n;typeof this._$AH=="function"?this._$AH.call((n=(r=this.options)===null||r===void 0?void 0:r.host)!==null&&n!==void 0?n:this.element,e):this._$AH.handleEvent(e)}}class No{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Be(this,e)}}const xn=window.litHtmlPolyfillSupport;xn==null||xn(ct,ut),((tr=globalThis.litHtmlVersions)!==null&&tr!==void 0?tr:globalThis.litHtmlVersions=[]).push("2.2.7");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var rr,nr;class Q extends Ne{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,r;const n=super.createRenderRoot();return(e=(r=this.renderOptions).renderBefore)!==null&&e!==void 0||(r.renderBefore=n.firstChild),n}update(e){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=xo(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return ae}}Q.finalized=!0,Q._$litElement$=!0,(rr=globalThis.litElementHydrateSupport)===null||rr===void 0||rr.call(globalThis,{LitElement:Q});const Mn=globalThis.litElementPolyfillSupport;Mn==null||Mn({LitElement:Q}),((nr=globalThis.litElementVersions)!==null&&nr!==void 0?nr:globalThis.litElementVersions=[]).push("3.2.2");/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const he=t=>t!=null?t:H;var ir=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,or=Symbol(),Cn=new Map,Tn=class{constructor(t,e){if(this._$cssResult$=!0,e!==or)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=Cn.get(this.cssText);return ir&&t===void 0&&(Cn.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}},jo=t=>new Tn(typeof t=="string"?t:t+"",or),ar=(t,...e)=>{const r=t.length===1?t[0]:e.reduce((n,i,o)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1],t[0]);return new Tn(r,or)},Lo=(t,e)=>{ir?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{const n=document.createElement("style"),i=window.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)})},zn=ir?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const n of e.cssRules)r+=n.cssText;return jo(r)})(t):t,sr,In=window.trustedTypes,Do=In?In.emptyScript:"",Rn=window.reactiveElementPolyfillSupport,lr={toAttribute(t,e){switch(e){case Boolean:t=t?Do:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},Nn=(t,e)=>e!==t&&(e==e||t==t),cr={attribute:!0,type:String,converter:lr,reflect:!1,hasChanged:Nn},Ue=class extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;(e=this.l)!==null&&e!==void 0||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,r)=>{const n=this._$Eh(r,e);n!==void 0&&(this._$Eu.set(n,r),t.push(n))}),t}static createProperty(t,e=cr){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const r=typeof t=="symbol"?Symbol():"__"+t,n=this.getPropertyDescriptor(t,r,e);n!==void 0&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){return{get(){return this[e]},set(n){const i=this[t];this[e]=n,this.requestUpdate(t,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||cr}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,r=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of r)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const n of r)e.unshift(zn(n))}else t!==void 0&&e.push(zn(t));return e}static _$Eh(t,e){const r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Em(),this.requestUpdate(),(t=this.constructor.l)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,r;((e=this._$Eg)!==null&&e!==void 0?e:this._$Eg=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)===null||r===void 0||r.call(t))}removeController(t){var e;(e=this._$Eg)===null||e===void 0||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Lo(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$Eg)===null||t===void 0||t.forEach(e=>{var r;return(r=e.hostConnected)===null||r===void 0?void 0:r.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$Eg)===null||t===void 0||t.forEach(e=>{var r;return(r=e.hostDisconnected)===null||r===void 0?void 0:r.call(e)})}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ES(t,e,r=cr){var n,i;const o=this.constructor._$Eh(t,r);if(o!==void 0&&r.reflect===!0){const a=((i=(n=r.converter)===null||n===void 0?void 0:n.toAttribute)!==null&&i!==void 0?i:lr.toAttribute)(e,r.type);this._$Ei=t,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._$Ei=null}}_$AK(t,e){var r,n,i;const o=this.constructor,a=o._$Eu.get(t);if(a!==void 0&&this._$Ei!==a){const s=o.getPropertyOptions(a),l=s.converter,c=(i=(n=(r=l)===null||r===void 0?void 0:r.fromAttribute)!==null&&n!==void 0?n:typeof l=="function"?l:null)!==null&&i!==void 0?i:lr.fromAttribute;this._$Ei=a,this[a]=c(e,s.type),this._$Ei=null}}requestUpdate(t,e,r){let n=!0;t!==void 0&&(((r=r||this.constructor.getPropertyOptions(t)).hasChanged||Nn)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),r.reflect===!0&&this._$Ei!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,r))):n=!1),!this.isUpdatePending&&n&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((n,i)=>this[i]=n),this._$Et=void 0);let e=!1;const r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),(t=this._$Eg)===null||t===void 0||t.forEach(n=>{var i;return(i=n.hostUpdate)===null||i===void 0?void 0:i.call(n)}),this.update(r)):this._$EU()}catch(n){throw e=!1,this._$EU(),n}e&&this._$AE(r)}willUpdate(t){}_$AE(t){var e;(e=this._$Eg)===null||e===void 0||e.forEach(r=>{var n;return(n=r.hostUpdated)===null||n===void 0?void 0:n.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,r)=>this._$ES(r,this[r],e)),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}};Ue.finalized=!0,Ue.elementProperties=new Map,Ue.elementStyles=[],Ue.shadowRootOptions={mode:"open"},Rn==null||Rn({ReactiveElement:Ue}),((sr=globalThis.reactiveElementVersions)!==null&&sr!==void 0?sr:globalThis.reactiveElementVersions=[]).push("1.3.2");var ur,He=globalThis.trustedTypes,jn=He?He.createPolicy("lit-html",{createHTML:t=>t}):void 0,me=`lit$${(Math.random()+"").slice(9)}$`,Ln="?"+me,Bo=`<${Ln}>`,Fe=document,ht=(t="")=>Fe.createComment(t),dt=t=>t===null||typeof t!="object"&&typeof t!="function",Dn=Array.isArray,Uo=t=>{var e;return Dn(t)||typeof((e=t)===null||e===void 0?void 0:e[Symbol.iterator])=="function"},ft=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Bn=/-->/g,Un=/>/g,Oe=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,Hn=/'/g,Fn=/"/g,Jn=/^(?:script|style|textarea|title)$/i,Ho=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Wn=Ho(1),be=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),qn=new WeakMap,Fo=(t,e,r)=>{var n,i;const o=(n=r==null?void 0:r.renderBefore)!==null&&n!==void 0?n:e;let a=o._$litPart$;if(a===void 0){const s=(i=r==null?void 0:r.renderBefore)!==null&&i!==void 0?i:null;o._$litPart$=a=new xt(e.insertBefore(ht(),s),s,void 0,r!=null?r:{})}return a._$AI(t),a},Je=Fe.createTreeWalker(Fe,129,null,!1),Jo=(t,e)=>{const r=t.length-1,n=[];let i,o=e===2?"<svg>":"",a=ft;for(let l=0;l<r;l++){const c=t[l];let d,u,h=-1,m=0;for(;m<c.length&&(a.lastIndex=m,u=a.exec(c),u!==null);)m=a.lastIndex,a===ft?u[1]==="!--"?a=Bn:u[1]!==void 0?a=Un:u[2]!==void 0?(Jn.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=Oe):u[3]!==void 0&&(a=Oe):a===Oe?u[0]===">"?(a=i!=null?i:ft,h=-1):u[1]===void 0?h=-2:(h=a.lastIndex-u[2].length,d=u[1],a=u[3]===void 0?Oe:u[3]==='"'?Fn:Hn):a===Fn||a===Hn?a=Oe:a===Bn||a===Un?a=ft:(a=Oe,i=void 0);const $=a===Oe&&t[l+1].startsWith("/>")?" ":"";o+=a===ft?c+Bo:h>=0?(n.push(d),c.slice(0,h)+"$lit$"+c.slice(h)+me+$):c+me+(h===-2?(n.push(void 0),l):$)}const s=o+(t[r]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[jn!==void 0?jn.createHTML(s):s,n]},kt=class{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let i=0,o=0;const a=t.length-1,s=this.parts,[l,c]=Jo(t,e);if(this.el=kt.createElement(l,r),Je.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(n=Je.nextNode())!==null&&s.length<a;){if(n.nodeType===1){if(n.hasAttributes()){const d=[];for(const u of n.getAttributeNames())if(u.endsWith("$lit$")||u.startsWith(me)){const h=c[o++];if(d.push(u),h!==void 0){const m=n.getAttribute(h.toLowerCase()+"$lit$").split(me),$=/([.?@])?(.*)/.exec(h);s.push({type:1,index:i,name:$[2],strings:m,ctor:$[1]==="."?qo:$[1]==="?"?Vo:$[1]==="@"?Qo:Mt})}else s.push({type:6,index:i})}for(const u of d)n.removeAttribute(u)}if(Jn.test(n.tagName)){const d=n.textContent.split(me),u=d.length-1;if(u>0){n.textContent=He?He.emptyScript:"";for(let h=0;h<u;h++)n.append(d[h],ht()),Je.nextNode(),s.push({type:2,index:++i});n.append(d[u],ht())}}}else if(n.nodeType===8)if(n.data===Ln)s.push({type:2,index:i});else{let d=-1;for(;(d=n.data.indexOf(me,d+1))!==-1;)s.push({type:7,index:i}),d+=me.length-1}i++}}static createElement(t,e){const r=Fe.createElement("template");return r.innerHTML=t,r}};function We(t,e,r=t,n){var i,o,a,s;if(e===be)return e;let l=n!==void 0?(i=r._$Cl)===null||i===void 0?void 0:i[n]:r._$Cu;const c=dt(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==c&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),c===void 0?l=void 0:(l=new c(t),l._$AT(t,r,n)),n!==void 0?((a=(s=r)._$Cl)!==null&&a!==void 0?a:s._$Cl=[])[n]=l:r._$Cu=l),l!==void 0&&(e=We(t,l._$AS(t,e.values),l,n)),e}var Wo=class{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:r},parts:n}=this._$AD,i=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:Fe).importNode(r,!0);Je.currentNode=i;let o=Je.nextNode(),a=0,s=0,l=n[0];for(;l!==void 0;){if(a===l.index){let c;l.type===2?c=new xt(o,o.nextSibling,this,t):l.type===1?c=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(c=new Ko(o,this,t)),this.v.push(c),l=n[++s]}a!==(l==null?void 0:l.index)&&(o=Je.nextNode(),a++)}return i}m(t){let e=0;for(const r of this.v)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},xt=class{constructor(t,e,r,n){var i;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cg=(i=n==null?void 0:n.isConnected)===null||i===void 0||i}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=We(this,t,e),dt(t)?t===R||t==null||t===""?(this._$AH!==R&&this._$AR(),this._$AH=R):t!==this._$AH&&t!==be&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):Uo(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==R&&dt(this._$AH)?this._$AA.nextSibling.data=t:this.k(Fe.createTextNode(t)),this._$AH=t}T(t){var e;const{values:r,_$litType$:n}=t,i=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=kt.createElement(n.h,this.options)),n);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===i)this._$AH.m(r);else{const o=new Wo(i,this),a=o.p(this.options);o.m(r),this.k(a),this._$AH=o}}_$AC(t){let e=qn.get(t.strings);return e===void 0&&qn.set(t.strings,e=new kt(t)),e}S(t){Dn(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,n=0;for(const i of t)n===e.length?e.push(r=new xt(this.M(ht()),this.M(ht()),this,this.options)):r=e[n],r._$AI(i),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,e);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cg=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},Mt=class{constructor(t,e,r,n,i){this.type=1,this._$AH=R,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,r,n){const i=this.strings;let o=!1;if(i===void 0)t=We(this,t,e,0),o=!dt(t)||t!==this._$AH&&t!==be,o&&(this._$AH=t);else{const a=t;let s,l;for(t=i[0],s=0;s<i.length-1;s++)l=We(this,a[r+s],e,s),l===be&&(l=this._$AH[s]),o||(o=!dt(l)||l!==this._$AH[s]),l===R?t=R:t!==R&&(t+=(l!=null?l:"")+i[s+1]),this._$AH[s]=l}o&&!n&&this.C(t)}C(t){t===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},qo=class extends Mt{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===R?void 0:t}},Go=He?He.emptyScript:"",Vo=class extends Mt{constructor(){super(...arguments),this.type=4}C(t){t&&t!==R?this.element.setAttribute(this.name,Go):this.element.removeAttribute(this.name)}},Qo=class extends Mt{constructor(t,e,r,n,i){super(t,e,r,n,i),this.type=5}_$AI(t,e=this){var r;if((t=(r=We(this,t,e,0))!==null&&r!==void 0?r:R)===be)return;const n=this._$AH,i=t===R&&n!==R||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==R&&(n===R||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,r;typeof this._$AH=="function"?this._$AH.call((r=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&r!==void 0?r:this.element,t):this._$AH.handleEvent(t)}},Ko=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){We(this,t)}},Gn=window.litHtmlPolyfillSupport;Gn==null||Gn(kt,xt),((ur=globalThis.litHtmlVersions)!==null&&ur!==void 0?ur:globalThis.litHtmlVersions=[]).push("2.2.4");var hr,dr,pt=class extends Ue{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const r=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=r.firstChild),r}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=Fo(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!1)}render(){return be}};pt.finalized=!0,pt._$litElement$=!0,(hr=globalThis.litElementHydrateSupport)===null||hr===void 0||hr.call(globalThis,{LitElement:pt});var Vn=globalThis.litElementPolyfillSupport;Vn==null||Vn({LitElement:pt}),((dr=globalThis.litElementVersions)!==null&&dr!==void 0?dr:globalThis.litElementVersions=[]).push("3.2.0");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *//** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var Qn=ar` :host { box-sizing: border-box; } :host *, :host *::before, :host *::after { box-sizing: inherit; } [hidden] { display: none !important; } `,Zo=ar` ${Qn} :host { display: inline-block; } .icon-button { flex: 0 0 auto; display: flex; align-items: center; background: none; border: none; border-radius: var(--sl-border-radius-medium); font-size: inherit; color: var(--sl-color-neutral-600); padding: var(--sl-spacing-x-small); cursor: pointer; transition: var(--sl-transition-medium) color; -webkit-appearance: none; } .icon-button:hover:not(.icon-button--disabled), .icon-button:focus:not(.icon-button--disabled) { color: var(--sl-color-primary-600); } .icon-button:active:not(.icon-button--disabled) { color: var(--sl-color-primary-700); } .icon-button:focus { outline: none; } .icon-button--disabled { opacity: 0.5; cursor: not-allowed; } .icon-button:focus-visible { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); } .icon-button__icon { pointer-events: none; } `,Kn=Symbol.for(""),Yo=t=>{var e,r;if(((e=t)===null||e===void 0?void 0:e.r)===Kn)return(r=t)===null||r===void 0?void 0:r._$litStatic$},Zn=(t,...e)=>({_$litStatic$:e.reduce((r,n,i)=>r+(o=>{if(o._$litStatic$!==void 0)return o._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${o}. Use 'unsafeStatic' to pass non-literal values, but take care to ensure page security.`)})(n)+t[i+1],t[0]),r:Kn}),Yn=new Map,Xo=t=>(e,...r)=>{const n=r.length;let i,o;const a=[],s=[];let l,c=0,d=!1;for(;c<n;){for(l=e[c];c<n&&(o=r[c],(i=Yo(o))!==void 0);)l+=i+e[++c],d=!0;s.push(o),a.push(l),c++}if(c===n&&a.push(e[n]),d){const u=a.join("$$lit$$");(e=Yn.get(u))===void 0&&(a.raw=a,Yn.set(u,e=a)),r=s}return t(e,...r)},ea=Xo(Wn);/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var Xn={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ei=t=>(...e)=>({_$litDirective$:t,values:e}),ti=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var ta=ei(class extends ti{constructor(t){var e;if(super(t),t.type!==Xn.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.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]){var r,n;if(this.et===void 0){this.et=new Set,t.strings!==void 0&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in e)e[o]&&!(!((r=this.st)===null||r===void 0)&&r.has(o))&&this.et.add(o);return this.render(e)}const i=t.element.classList;this.et.forEach(o=>{o in e||(i.remove(o),this.et.delete(o))});for(const o in e){const a=!!e[o];a===this.et.has(o)||((n=this.st)===null||n===void 0?void 0:n.has(o))||(a?(i.add(o),this.et.add(o)):(i.remove(o),this.et.delete(o)))}return be}});/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var ie=t=>t!=null?t:R;/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var ri=Object.defineProperty,ra=Object.defineProperties,na=Object.getOwnPropertyDescriptor,ia=Object.getOwnPropertyDescriptors,ni=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,aa=Object.prototype.propertyIsEnumerable,ii=(t,e,r)=>e in t?ri(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,yt=(t,e)=>{for(var r in e||(e={}))oa.call(e,r)&&ii(t,r,e[r]);if(ni)for(var r of ni(e))aa.call(e,r)&&ii(t,r,e[r]);return t},fr=(t,e)=>ra(t,ia(e)),L=(t,e,r,n)=>{for(var i=n>1?void 0:n?na(e,r):e,o=t.length-1,a;o>=0;o--)(a=t[o])&&(i=(n?a(e,r,i):a(i))||i);return n&&i&&ri(e,r,i),i},oi=t=>e=>typeof e=="function"?((r,n)=>(window.customElements.define(r,n),n))(t,e):((r,n)=>{const{kind:i,elements:o}=n;return{kind:i,elements:o,finisher(a){window.customElements.define(r,a)}}})(t,e),sa=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?fr(yt({},e),{finisher(r){r.createProperty(e.key,t)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(r){r.createProperty(e.key,t)}};function X(t){return(e,r)=>r!==void 0?((n,i,o)=>{i.constructor.createProperty(o,n)})(t,e,r):sa(t,e)}function ai(t){return X(fr(yt({},t),{state:!0}))}var la=({finisher:t,descriptor:e})=>(r,n)=>{var i;if(n===void 0){const o=(i=r.originalKey)!==null&&i!==void 0?i:r.key,a=e!=null?{kind:"method",placement:"prototype",key:o,descriptor:e(r.key)}:fr(yt({},r),{key:o});return t!=null&&(a.finisher=function(s){t(s,o)}),a}{const o=r.constructor;e!==void 0&&Object.defineProperty(r,n,e(n)),t==null||t(o,n)}};function ca(t,e){return la({descriptor:r=>{const n={get(){var i,o;return(o=(i=this.renderRoot)===null||i===void 0?void 0:i.querySelector(t))!==null&&o!==void 0?o:null},enumerable:!0,configurable:!0};if(e){const i=typeof r=="symbol"?Symbol():"__"+r;n.get=function(){var o,a;return this[i]===void 0&&(this[i]=(a=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(t))!==null&&a!==void 0?a:null),this[i]}}return n}})}var pr;((pr=window.HTMLSlotElement)===null||pr===void 0?void 0:pr.prototype.assignedElements)!=null;var Ct=class extends pt{emit(t,e){const r=new CustomEvent(t,yt({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(r),r}};L([X()],Ct.prototype,"dir",2),L([X()],Ct.prototype,"lang",2);/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *//** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var oe=class extends Ct{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}render(){const t=!!this.href,e=t?Zn`a`:Zn`button`;return ea` <${e} part="base" class=${ta({"icon-button":!0,"icon-button--disabled":!t&&this.disabled,"icon-button--focused":this.hasFocus})} ?disabled=${ie(t?void 0:this.disabled)} type=${ie(t?void 0:"button")} href=${ie(t?this.href:void 0)} target=${ie(t?this.target:void 0)} download=${ie(t?this.download:void 0)} rel=${ie(t&&this.target?"noreferrer noopener":void 0)} role=${ie(t?void 0:"button")} aria-disabled=${this.disabled?"true":"false"} aria-label="${this.label}" tabindex=${this.disabled?"-1":"0"} @blur=${this.handleBlur} @focus=${this.handleFocus} @click=${this.handleClick} > <sl-icon class="icon-button__icon" name=${ie(this.name)} library=${ie(this.library)} src=${ie(this.src)} aria-hidden="true" ></sl-icon> </${e}> `}};oe.styles=Zo,L([ai()],oe.prototype,"hasFocus",2),L([ca(".icon-button")],oe.prototype,"button",2),L([X()],oe.prototype,"name",2),L([X()],oe.prototype,"library",2),L([X()],oe.prototype,"src",2),L([X()],oe.prototype,"href",2),L([X()],oe.prototype,"target",2),L([X()],oe.prototype,"download",2),L([X()],oe.prototype,"label",2),L([X({type:Boolean,reflect:!0})],oe.prototype,"disabled",2),oe=L([oi("sl-icon-button")],oe);var yr="";function Tt(t){yr=t}function ua(){if(!yr){const t=[...document.getElementsByTagName("script")],e=t.find(r=>r.hasAttribute("data-shoelace"));if(e)Tt(e.getAttribute("data-shoelace"));else{const r=t.find(i=>/shoelace(\.min)?\.js($|\?)/.test(i.src));let n="";r&&(n=r.getAttribute("src")),Tt(n.split("/").slice(0,-1).join("/"))}}return yr.replace(/\/$/,"")}var ha={name:"default",resolver:t=>`${ua()}/assets/icons/${t}.svg`},da=ha,si={"check-lg":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-lg" viewBox="0 0 16 16"> <path d="M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z"></path> </svg> `,"chevron-down":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/> </svg> `,"chevron-left":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/> </svg> `,"chevron-right":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/> </svg> `,eye:` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> </svg> `,"eye-slash":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16"> <path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/> <path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/> <path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/> </svg> `,eyedropper:` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16"> <path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path> </svg> `,"person-fill":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16"> <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/> </svg> `,"play-fill":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16"> <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path> </svg> `,"pause-fill":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16"> <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path> </svg> `,"star-fill":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16"> <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/> </svg> `,x:` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16"> <path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/> </svg> `,"x-circle-fill":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16"> <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path> </svg> `},fa={name:"system",resolver:t=>t in si?`data:image/svg+xml,${encodeURIComponent(si[t])}`:""},pa=fa,ya=[da,pa],vr=[];function va(t){vr.push(t)}function ga(t){vr=vr.filter(e=>e!==t)}function li(t){return ya.find(e=>e.name===t)}var gr=new Map;function ma(t,e="cors"){if(gr.has(t))return gr.get(t);const r=fetch(t,{mode:e}).then(async n=>({ok:n.ok,status:n.status,html:await n.text()}));return gr.set(t,r),r}var mr=new Map;async function ba(t){if(mr.has(t))return mr.get(t);const e=await ma(t),r={ok:e.ok,status:e.status,svg:null};if(e.ok){const n=document.createElement("div");n.innerHTML=e.html;const i=n.firstElementChild;r.svg=(i==null?void 0:i.tagName.toLowerCase())==="svg"?i.outerHTML:""}return mr.set(t,r),r}var wa=ar` ${Qn} :host { display: inline-block; width: 1em; height: 1em; contain: strict; box-sizing: content-box !important; } .icon, svg { display: block; height: 100%; width: 100%; } `;function br(t,e){const r=yt({waitUntilFirstUpdate:!1},e);return(n,i)=>{const{update:o}=n;if(t in n){const a=t;n.update=function(s){if(s.has(a)){const l=s.get(a),c=this[a];l!==c&&(!r.waitUntilFirstUpdate||this.hasUpdated)&&this[i](l,c)}o.call(this,s)}}}}var wr=class extends ti{constructor(t){if(super(t),this.it=R,t.type!==Xn.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===R||t==null)return this.ft=void 0,this.it=t;if(t===be)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}};wr.directiveName="unsafeHTML",wr.resultType=1;var $r=class extends wr{};$r.directiveName="unsafeSVG",$r.resultType=2;var $a=ei($r),_r,de=class extends Ct{constructor(){super(...arguments),this.svg="",this.label="",this.library="default"}connectedCallback(){super.connectedCallback(),va(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),ga(this)}getUrl(){const t=li(this.library);return this.name&&t?t.resolver(this.name):this.src}redraw(){this.setIcon()}async setIcon(){var t;const e=li(this.library),r=this.getUrl();if(_r||(_r=new DOMParser),r)try{const n=await ba(r);if(r!==this.getUrl())return;if(n.ok){const o=_r.parseFromString(n.svg,"text/html").body.querySelector("svg");o!==null?((t=e==null?void 0:e.mutator)==null||t.call(e,o),this.svg=o.outerHTML,this.emit("sl-load")):(this.svg="",this.emit("sl-error"))}else this.svg="",this.emit("sl-error")}catch{this.emit("sl-error")}else this.svg.length>0&&(this.svg="")}handleChange(){this.setIcon()}render(){const t=typeof this.label=="string"&&this.label.length>0;return Wn` <div part="base" class="icon" role=${ie(t?"img":void 0)} aria-label=${ie(t?this.label:void 0)} aria-hidden=${ie(t?void 0:"true")} > ${$a(this.svg)} </div>`}};de.styles=wa,L([ai()],de.prototype,"svg",2),L([X({reflect:!0})],de.prototype,"name",2),L([X()],de.prototype,"src",2),L([X()],de.prototype,"label",2),L([X({reflect:!0})],de.prototype,"library",2),L([br("name"),br("src"),br("library")],de.prototype,"setIcon",1),de=L([oi("sl-icon")],de);/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const fe=ne` :host { --link: var(--indigo-7); --link-visited: var(--grape-7); --text-1: var(--gray-9); --text-2: var(--gray-7); --surface-1: var(--gray-0); --surface-2: var(--gray-2); --surface-3: var(--gray-3); --surface-4: var(--gray-4); --scrollbar-color: var(--gray-7); accent-color: var(--link); -webkit-text-size-adjust: none; background-color: var(--surface-1); block-size: 100%; caret-color: var(--link); color: var(--text-2); color-scheme: li