(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function r(i){if(i.ep)return;i.ep=!0;const n=t(i);fetch(i.href,n)}})();function c(o,e,t,r){var i=arguments.length,n=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(o,e,t,r);else for(var s=o.length-1;s>=0;s--)(a=o[s])&&(n=(i<3?a(n):i>3?a(e,t,n):a(e,t))||n);return i>3&&n&&Object.defineProperty(e,t,n),n}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const B=o=>(e,t)=>{t!==void 0?t.addInitializer((()=>{customElements.define(o,e)})):customElements.define(o,e)};/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Rt=globalThis,Zr=Rt.ShadowRoot&&(Rt.ShadyCSS===void 0||Rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Jr=Symbol(),Ro=new WeakMap;let pi=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Jr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Zr&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Ro.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Ro.set(t,e))}return e}toString(){return this.cssText}};const cn=o=>new pi(typeof o=="string"?o:o+"",void 0,Jr),C=(o,...e)=>{const t=o.length===1?o[0]:e.reduce(((r,i,n)=>r+(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)+o[n+1]),o[0]);return new pi(t,o,Jr)},dn=(o,e)=>{if(Zr)o.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const r=document.createElement("style"),i=Rt.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=t.cssText,o.appendChild(r)}},Lo=Zr?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return cn(t)})(o):o;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const{is:un,defineProperty:hn,getOwnPropertyDescriptor:pn,getOwnPropertyNames:mn,getOwnPropertySymbols:fn,getPrototypeOf:vn}=Object,Vt=globalThis,Oo=Vt.trustedTypes,gn=Oo?Oo.emptyScript:"",bn=Vt.reactiveElementPolyfillSupport,Ge=(o,e)=>o,Lt={toAttribute(o,e){switch(e){case Boolean:o=o?gn:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Qr=(o,e)=>!un(o,e),Po={attribute:!0,type:String,converter:Lt,reflect:!1,useDefault:!1,hasChanged:Qr};Symbol.metadata??=Symbol("metadata"),Vt.litPropertyMetadata??=new WeakMap;let Pe=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Po){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,t);i!==void 0&&hn(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){const{get:i,set:n}=pn(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:i,set(a){const s=i?.call(this);n?.call(this,a),this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Po}static _$Ei(){if(this.hasOwnProperty(Ge("elementProperties")))return;const e=vn(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ge("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ge("properties"))){const t=this.properties,r=[...mn(t),...fn(t)];for(const i of r)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[r,i]of t)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const i=this._$Eu(t,r);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)t.unshift(Lo(i))}else e!==void 0&&t.push(Lo(e));return t}static _$Eu(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.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((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return dn(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const n=(r.converter?.toAttribute!==void 0?r.converter:Lt).toAttribute(t,r.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=r.getPropertyOptions(i),a=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:Lt;this._$Em=i;const s=a.fromAttribute(t,n.type);this[i]=s??this._$Ej?.get(i)??s,this._$Em=null}}requestUpdate(e,t,r){if(e!==void 0){const i=this.constructor,n=this[e];if(r??=i.getPropertyOptions(e),!((r.hasChanged??Qr)(n,t)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:i,wrapped:n},a){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),n!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,n]of r){const{wrapped:a}=n,s=this[i];a!==!0||this._$AL.has(i)||s===void 0||this.C(i,void 0,n,s)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Pe.elementStyles=[],Pe.shadowRootOptions={mode:"open"},Pe[Ge("elementProperties")]=new Map,Pe[Ge("finalized")]=new Map,bn?.({ReactiveElement:Pe}),(Vt.reactiveElementVersions??=[]).push("2.1.1");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const yn={attribute:!0,type:String,converter:Lt,reflect:!1,hasChanged:Qr},xn=(o=yn,e,t)=>{const{kind:r,metadata:i}=t;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),n.set(t.name,o),r==="accessor"){const{name:a}=t;return{set(s){const l=e.get.call(this);e.set.call(this,s),this.requestUpdate(a,l,o)},init(s){return s!==void 0&&this.C(a,void 0,o,s),s}}}if(r==="setter"){const{name:a}=t;return function(s){const l=this[a];e.call(this,s),this.requestUpdate(a,l,o)}}throw Error("Unsupported decorator location: "+r)};function h(o){return(e,t)=>typeof t=="object"?xn(o,e,t):((r,i,n)=>{const a=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),a?Object.getOwnPropertyDescriptor(i,n):void 0})(o,e,t)}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function F(o){return h({...o,state:!0,attribute:!1})}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Wt=(o,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(o,e,t),t);/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function L(o,e){return(t,r,i)=>{const n=a=>a.renderRoot?.querySelector(o)??null;return Wt(t,r,{get(){return n(this)}})}}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */let _n;function wn(o){return(e,t)=>Wt(e,t,{get(){return(this.renderRoot??(_n??=document.createDocumentFragment())).querySelectorAll(o)}})}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function fe(o){return(e,t)=>{const{slot:r,selector:i}=o??{},n="slot"+(r?`[name=${r}]`:":not([name])");return Wt(e,t,{get(){const a=this.renderRoot?.querySelector(n),s=a?.assignedElements(o)??[];return i===void 0?s:s.filter((l=>l.matches(i)))}})}}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function kn(o){return(e,t)=>{const{slot:r}=o??{},i="slot"+(r?`[name=${r}]`:":not([name])");return Wt(e,t,{get(){return this.renderRoot?.querySelector(i)?.assignedNodes(o)??[]}})}}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const eo=globalThis,Ot=eo.trustedTypes,zo=Ot?Ot.createPolicy("lit-html",{createHTML:o=>o}):void 0,mi="$lit$",be=`lit$${Math.random().toFixed(9).slice(2)}$`,fi="?"+be,En=`<${fi}>`,$e=document,et=()=>$e.createComment(""),tt=o=>o===null||typeof o!="object"&&typeof o!="function",to=Array.isArray,$n=o=>to(o)||typeof o?.[Symbol.iterator]=="function",rr=`[ 	
\f\r]`,Ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Bo=/-->/g,Mo=/>/g,_e=RegExp(`>|${rr}(?:([^\\s"'>=/]+)(${rr}*=${rr}*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`,"g"),Do=/'/g,No=/"/g,vi=/^(?:script|style|textarea|title)$/i,An=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),x=An(1),Z=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Fo=new WeakMap,we=$e.createTreeWalker($e,129);function gi(o,e){if(!to(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return zo!==void 0?zo.createHTML(e):e}const Cn=(o,e)=>{const t=o.length-1,r=[];let i,n=e===2?"<svg>":e===3?"<math>":"",a=Ne;for(let s=0;s<t;s++){const l=o[s];let d,u,p=-1,f=0;for(;f<l.length&&(a.lastIndex=f,u=a.exec(l),u!==null);)f=a.lastIndex,a===Ne?u[1]==="!--"?a=Bo:u[1]!==void 0?a=Mo:u[2]!==void 0?(vi.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=_e):u[3]!==void 0&&(a=_e):a===_e?u[0]===">"?(a=i??Ne,p=-1):u[1]===void 0?p=-2:(p=a.lastIndex-u[2].length,d=u[1],a=u[3]===void 0?_e:u[3]==='"'?No:Do):a===No||a===Do?a=_e:a===Bo||a===Mo?a=Ne:(a=_e,i=void 0);const v=a===_e&&o[s+1].startsWith("/>")?" ":"";n+=a===Ne?l+En:p>=0?(r.push(d),l.slice(0,p)+mi+l.slice(p)+be+v):l+be+(p===-2?s:v)}return[gi(o,n+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};let fr=class bi{constructor({strings:e,_$litType$:t},r){let i;this.parts=[];let n=0,a=0;const s=e.length-1,l=this.parts,[d,u]=Cn(e,t);if(this.el=bi.createElement(d,r),we.currentNode=this.el.content,t===2||t===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=we.nextNode())!==null&&l.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(const p of i.getAttributeNames())if(p.endsWith(mi)){const f=u[a++],v=i.getAttribute(p).split(be),g=/([.?@])?(.*)/.exec(f);l.push({type:1,index:n,name:g[2],strings:v,ctor:g[1]==="."?In:g[1]==="?"?Sn:g[1]==="@"?Rn:jt}),i.removeAttribute(p)}else p.startsWith(be)&&(l.push({type:6,index:n}),i.removeAttribute(p));if(vi.test(i.tagName)){const p=i.textContent.split(be),f=p.length-1;if(f>0){i.textContent=Ot?Ot.emptyScript:"";for(let v=0;v<f;v++)i.append(p[v],et()),we.nextNode(),l.push({type:2,index:++n});i.append(p[f],et())}}}else if(i.nodeType===8)if(i.data===fi)l.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(be,p+1))!==-1;)l.push({type:7,index:n}),p+=be.length-1}n++}}static createElement(e,t){const r=$e.createElement("template");return r.innerHTML=e,r}};function Be(o,e,t=o,r){if(e===Z)return e;let i=r!==void 0?t._$Co?.[r]:t._$Cl;const n=tt(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,t,r)),r!==void 0?(t._$Co??=[])[r]=i:t._$Cl=i),i!==void 0&&(e=Be(o,i._$AS(o,e.values),i,r)),e}let Tn=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,i=(e?.creationScope??$e).importNode(t,!0);we.currentNode=i;let n=we.nextNode(),a=0,s=0,l=r[0];for(;l!==void 0;){if(a===l.index){let d;l.type===2?d=new nt(n,n.nextSibling,this,e):l.type===1?d=new l.ctor(n,l.name,l.strings,this,e):l.type===6&&(d=new Ln(n,this,e)),this._$AV.push(d),l=r[++s]}a!==l?.index&&(n=we.nextNode(),a++)}return we.currentNode=$e,i}p(e){let t=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}};class nt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,i){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Be(this,e,t),tt(e)?e===m||e==null||e===""?(this._$AH!==m&&this._$AR(),this._$AH=m):e!==this._$AH&&e!==Z&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):$n(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==m&&tt(this._$AH)?this._$AA.nextSibling.data=e:this.T($e.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=fr.createElement(gi(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(t);else{const n=new Tn(i,this),a=n.u(this.options);n.p(t),this.T(a),this._$AH=n}}_$AC(e){let t=Fo.get(e.strings);return t===void 0&&Fo.set(e.strings,t=new fr(e)),t}k(e){to(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,i=0;for(const n of e)i===t.length?t.push(r=new nt(this.O(et()),this.O(et()),this,this.options)):r=t[i],r._$AI(n),i++;i<t.length&&(this._$AR(r&&r._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}let jt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,i,n){this.type=1,this._$AH=m,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=m}_$AI(e,t=this,r,i){const n=this.strings;let a=!1;if(n===void 0)e=Be(this,e,t,0),a=!tt(e)||e!==this._$AH&&e!==Z,a&&(this._$AH=e);else{const s=e;let l,d;for(e=n[0],l=0;l<n.length-1;l++)d=Be(this,s[r+l],t,l),d===Z&&(d=this._$AH[l]),a||=!tt(d)||d!==this._$AH[l],d===m?e=m:e!==m&&(e+=(d??"")+n[l+1]),this._$AH[l]=d}a&&!i&&this.j(e)}j(e){e===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}};class In extends jt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===m?void 0:e}}let Sn=class extends jt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==m)}},Rn=class extends jt{constructor(e,t,r,i,n){super(e,t,r,i,n),this.type=5}_$AI(e,t=this){if((e=Be(this,e,t,0)??m)===Z)return;const r=this._$AH,i=e===m&&r!==m||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==m&&(r===m||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ln=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Be(this,e)}};const On=eo.litHtmlPolyfillSupport;On?.(fr,nt),(eo.litHtmlVersions??=[]).push("3.3.1");const yi=(o,e,t)=>{const r=t?.renderBefore??e;let i=r._$litPart$;if(i===void 0){const n=t?.renderBefore??null;r._$litPart$=i=new nt(e.insertBefore(et(),n),n,void 0,t??{})}return i._$AI(o),i};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const ro=globalThis;let S=class extends Pe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=yi(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Z}};S._$litElement$=!0,S.finalized=!0,ro.litElementHydrateSupport?.({LitElement:S});const Pn=ro.litElementPolyfillSupport;Pn?.({LitElement:S});(ro.litElementVersions??=[]).push("4.2.1");/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class zn extends S{render(){return x`<slot></slot>`}connectedCallback(){if(super.connectedCallback(),this.getAttribute("aria-hidden")==="false"){this.removeAttribute("aria-hidden");return}this.setAttribute("aria-hidden","true")}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Bn=C`:host{font-size:var(--md-icon-size, 24px);width:var(--md-icon-size, 24px);height:var(--md-icon-size, 24px);color:inherit;font-variation-settings:inherit;font-weight:400;font-family:var(--md-icon-font, Material Symbols Outlined);display:inline-flex;font-style:normal;place-items:center;place-content:center;line-height:1;overflow:hidden;letter-spacing:normal;text-transform:none;user-select:none;white-space:nowrap;word-wrap:normal;flex-shrink:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}::slotted(svg){fill:currentColor}::slotted(*){height:100%;width:100%}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let vr=class extends zn{};vr.styles=[Bn];vr=c([B("md-icon")],vr);/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Mn extends S{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return x`<span class="shadow"></span>`}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Dn=C`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let gr=class extends Mn{};gr.styles=[Dn];gr=c([B("md-elevation")],gr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const xi=Symbol("attachableController");let _i;_i=new MutationObserver(o=>{for(const e of o)e.target[xi]?.hostConnected()});class wi{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){e===null?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?!this.htmlFor||!this.host.isConnected?null:this.host.getRootNode().querySelector(`#${this.htmlFor}`):this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[xi]=this,_i?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Nn=["focusin","focusout","pointerdown"];class oo extends S{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new wi(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[qo]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1;break}e[qo]=!0}}onControlChange(e,t){for(const r of Nn)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}c([h({type:Boolean,reflect:!0})],oo.prototype,"visible",void 0);c([h({type:Boolean,reflect:!0})],oo.prototype,"inward",void 0);const qo=Symbol("handledByFocusRing");/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Fn=C`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let br=class extends oo{};br.styles=[Fn];br=c([B("md-focus-ring")],br);/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const ge={ATTRIBUTE:1,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},io=o=>(...e)=>({_$litDirective$:o,values:e});let no=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Q=io(class extends no{constructor(o){if(super(o),o.type!==ge.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter((e=>o[e])).join(" ")+" "}update(o,[e]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}const t=o.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const i=!!e[r];i===this.st.has(r)||this.nt?.has(r)||(i?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return Z}});/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ae={STANDARD:"cubic-bezier(0.2, 0, 0, 1)",EMPHASIZED:"cubic-bezier(.3,0,0,1)",EMPHASIZED_ACCELERATE:"cubic-bezier(.3,0,.8,.15)"};function qn(){let o=null;return{start(){return o?.abort(),o=new AbortController,o.signal},finish(){o=null}}}/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Hn=450,Ho=225,Un=.2,Vn=10,Wn=75,jn=.35,Kn="::after",Yn="forwards";var W;(function(o){o[o.INACTIVE=0]="INACTIVE",o[o.TOUCH_DELAY=1]="TOUCH_DELAY",o[o.HOLDING=2]="HOLDING",o[o.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"})(W||(W={}));const Gn=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],Xn=150,Zn=window.matchMedia("(forced-colors: active)");class at extends S{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=W.INACTIVE,this.attachableController=new wi(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return x`<div class="surface ${Q(e)}"></div>`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==W.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state===W.HOLDING){this.state=W.WAITING_FOR_CLICK;return}if(this.state===W.TOUCH_DELAY){this.state=W.WAITING_FOR_CLICK,this.startPressAnimation(this.rippleStartEvent);return}}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e)){this.state=W.WAITING_FOR_CLICK,this.startPressAnimation(e);return}this.state=W.TOUCH_DELAY,await new Promise(t=>{setTimeout(t,Xn)}),this.state===W.TOUCH_DELAY&&(this.state=W.HOLDING,this.startPressAnimation(e))}}handleClick(){if(!this.disabled){if(this.state===W.WAITING_FOR_CLICK){this.endPressAnimation();return}this.state===W.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation())}}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||this.endPressAnimation()}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),i=Math.max(jn*r,Wn),n=this.currentCSSZoom??1,a=Math.floor(r*Un/n),l=Math.sqrt(t**2+e**2)+Vn;this.initialSize=a;const d=(l+i)/a;this.rippleScale=`${d/n}`,this.rippleSize=`${a}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:i,top:n}=this.getBoundingClientRect(),a=t+i,s=r+n,{pageX:l,pageY:d}=e,u=this.currentCSSZoom??1;return{x:(l-a)/u,y:(d-s)/u}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),i=this.currentCSSZoom??1,n={x:(r/i-this.initialSize)/2,y:(t/i-this.initialSize)/2};let a;return e instanceof PointerEvent?a=this.getNormalizedPointerEventCoords(e):a={x:r/i/2,y:t/i/2},a={x:a.x-this.initialSize/2,y:a.y-this.initialSize/2},{startPoint:a,endPoint:n}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),i=`${t.x}px, ${t.y}px`,n=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${i}) scale(1)`,`translate(${n}) scale(${this.rippleScale})`]},{pseudoElement:Kn,duration:Hn,easing:ae.STANDARD,fill:Yn})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=W.INACTIVE;const e=this.growAnimation;let t=1/0;if(typeof e?.currentTime=="number"?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=Ho){this.pressed=!1;return}await new Promise(r=>{setTimeout(r,Ho-t)}),this.growAnimation===e&&(this.pressed=!1)}shouldReactToEvent(e){if(this.disabled||!e.isPrimary||this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if(e.type==="pointerenter"||e.type==="pointerleave")return!this.isTouch(e);const t=e.buttons===1;return this.isTouch(e)||t}isTouch({pointerType:e}){return e==="touch"}async handleEvent(e){if(!Zn?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e);break}}onControlChange(e,t){for(const r of Gn)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}c([h({type:Boolean,reflect:!0})],at.prototype,"disabled",void 0);c([F()],at.prototype,"hovered",void 0);c([F()],at.prototype,"pressed",void 0);c([L(".surface")],at.prototype,"mdRoot",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Jn=C`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let yr=class extends at{};yr.styles=[Jn];yr=c([B("md-ripple")],yr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ki=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],Qn=ki.map(Ei);function or(o){return Qn.includes(o)}function Ei(o){return o.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const pt=Symbol("privateIgnoreAttributeChangesFor");function Ce(o){var e;class t extends o{constructor(){super(...arguments),this[e]=new Set}attributeChangedCallback(i,n,a){if(!or(i)){super.attributeChangedCallback(i,n,a);return}if(this[pt].has(i))return;this[pt].add(i),this.removeAttribute(i),this[pt].delete(i);const s=_r(i);a===null?delete this.dataset[s]:this.dataset[s]=a,this.requestUpdate(_r(i),n)}getAttribute(i){return or(i)?super.getAttribute(xr(i)):super.getAttribute(i)}removeAttribute(i){super.removeAttribute(i),or(i)&&(super.removeAttribute(xr(i)),this.requestUpdate())}}return e=pt,ea(t),t}function ea(o){for(const e of ki){const t=Ei(e),r=xr(t),i=_r(t);o.createProperty(e,{attribute:t,noAccessor:!0}),o.createProperty(Symbol(r),{attribute:r,noAccessor:!0}),Object.defineProperty(o.prototype,e,{configurable:!0,enumerable:!0,get(){return this.dataset[i]??null},set(n){const a=this.dataset[i]??null;n!==a&&(n===null?delete this.dataset[i]:this.dataset[i]=n,this.requestUpdate(e,a))}})}}function xr(o){return`data-${o}`}function _r(o){return o.replace(/-\w/,e=>e[1].toUpperCase())}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const H=Symbol("internals"),ir=Symbol("privateInternals");function st(o){class e extends o{get[H](){return this[ir]||(this[ir]=this.attachInternals()),this[ir]}}return e}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function $i(o){o.addInitializer(e=>{const t=e;t.addEventListener("click",async r=>{const{type:i,[H]:n}=t,{form:a}=n;if(!(!a||i==="button")&&(await new Promise(s=>{setTimeout(s)}),!r.defaultPrevented)){if(i==="reset"){a.reset();return}a.addEventListener("submit",s=>{Object.defineProperty(s,"submitter",{configurable:!0,enumerable:!0,get:()=>t})},{capture:!0,once:!0}),n.setFormValue(t.value),a.requestSubmit()}})})}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function Ai(o){const e=new MouseEvent("click",{bubbles:!0});return o.dispatchEvent(e),e}function ao(o){return o.currentTarget!==o.target||o.composedPath()[0]!==o.target||o.target.disabled?!1:!ta(o)}function ta(o){const e=wr;return e&&(o.preventDefault(),o.stopImmediatePropagation()),ra(),e}let wr=!1;async function ra(){wr=!0,await null,wr=!1}/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const oa=Ce(st(S));class U extends oa{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[H].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.download="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=this.disabled||this.softDisabled,t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return x`
      ${this.renderElevationOrOutline?.()}
      <div class="background"></div>
      <md-focus-ring part="focus-ring" for=${r}></md-focus-ring>
      <md-ripple
        part="ripple"
        for=${r}
        ?disabled="${e}"></md-ripple>
      ${t}
    `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return x`<button
      id="button"
      class="button"
      ?disabled=${this.disabled}
      aria-disabled=${this.softDisabled||m}
      aria-label="${e||m}"
      aria-haspopup="${t||m}"
      aria-expanded="${r||m}">
      ${this.renderContent()}
    </button>`}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return x`<a
      id="link"
      class="button"
      aria-label="${e||m}"
      aria-haspopup="${t||m}"
      aria-expanded="${r||m}"
      aria-disabled=${this.disabled||this.softDisabled||m}
      tabindex="${this.disabled&&!this.softDisabled?-1:m}"
      href=${this.href}
      download=${this.download||m}
      target=${this.target||m}
      >${this.renderContent()}
    </a>`}renderContent(){const e=x`<slot
      name="icon"
      @slotchange="${this.handleSlotChange}"></slot>`;return x`
      <span class="touch"></span>
      ${this.trailingIcon?m:e}
      <span class="label"><slot></slot></span>
      ${this.trailingIcon?e:m}
    `}handleClick(e){if(this.softDisabled||this.disabled&&this.href){e.stopImmediatePropagation(),e.preventDefault();return}!ao(e)||!this.buttonElement||(this.focus(),Ai(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}$i(U);U.formAssociated=!0;U.shadowRootOptions={mode:"open",delegatesFocus:!0};c([h({type:Boolean,reflect:!0})],U.prototype,"disabled",void 0);c([h({type:Boolean,attribute:"soft-disabled",reflect:!0})],U.prototype,"softDisabled",void 0);c([h()],U.prototype,"href",void 0);c([h()],U.prototype,"download",void 0);c([h()],U.prototype,"target",void 0);c([h({type:Boolean,attribute:"trailing-icon",reflect:!0})],U.prototype,"trailingIcon",void 0);c([h({type:Boolean,attribute:"has-icon",reflect:!0})],U.prototype,"hasIcon",void 0);c([h()],U.prototype,"type",void 0);c([h({reflect:!0})],U.prototype,"value",void 0);c([L(".button")],U.prototype,"buttonElement",void 0);c([fe({slot:"icon",flatten:!0})],U.prototype,"assignedIcons",void 0);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class ia extends U{renderElevationOrOutline(){return x`<md-elevation part="elevation"></md-elevation>`}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const na=C`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)}
`;/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const aa=C`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)}
`;/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const so=C`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let kr=class extends ia{};kr.styles=[so,aa,na];kr=c([B("md-filled-button")],kr);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class sa extends U{renderElevationOrOutline(){return x`<div class="outline"></div>`}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const la=C`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host(:is([disabled],[soft-disabled])) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])) .background{border-color:GrayText}:host(:is([disabled],[soft-disabled])) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Er=class extends sa{};Er.styles=[so,la];Er=c([B("md-outlined-button")],Er);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class ca extends U{}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const da=C`:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let $r=class extends ca{};$r.styles=[so,da];$r=c([B("md-text-button")],$r);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function lo(o,e){e.bubbles&&(!o.shadowRoot||e.composed)&&e.stopPropagation();const t=Reflect.construct(e.constructor,[e.type,e]),r=o.dispatchEvent(t);return r||e.preventDefault(),r}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const rt=Symbol("createValidator"),ot=Symbol("getValidityAnchor"),nr=Symbol("privateValidator"),he=Symbol("privateSyncValidity"),mt=Symbol("privateCustomValidationMessage");function co(o){var e;class t extends o{constructor(){super(...arguments),this[e]=""}get validity(){return this[he](),this[H].validity}get validationMessage(){return this[he](),this[H].validationMessage}get willValidate(){return this[he](),this[H].willValidate}checkValidity(){return this[he](),this[H].checkValidity()}reportValidity(){return this[he](),this[H].reportValidity()}setCustomValidity(i){this[mt]=i,this[he]()}requestUpdate(i,n,a){super.requestUpdate(i,n,a),this[he]()}firstUpdated(i){super.firstUpdated(i),this[he]()}[(e=mt,he)](){this[nr]||(this[nr]=this[rt]());const{validity:i,validationMessage:n}=this[nr].getValidity(),a=!!this[mt],s=this[mt]||n;this[H].setValidity({...i,customError:a},s,this[ot]()??void 0)}[rt](){throw new Error("Implement [createValidator]")}[ot](){throw new Error("Implement [getValidityAnchor]")}}return t}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ze=Symbol("getFormValue"),Pt=Symbol("getFormState");function uo(o){class e extends o{get form(){return this[H].form}get labels(){return this[H].labels}get name(){return this.getAttribute("name")??""}set name(r){this.setAttribute("name",r)}get disabled(){return this.hasAttribute("disabled")}set disabled(r){this.toggleAttribute("disabled",r)}attributeChangedCallback(r,i,n){if(r==="name"||r==="disabled"){const a=r==="disabled"?i!==null:i;this.requestUpdate(r,a);return}super.attributeChangedCallback(r,i,n)}requestUpdate(r,i,n){super.requestUpdate(r,i,n),this[H].setFormValue(this[ze](),this[Pt]())}[ze](){throw new Error("Implement [getFormValue]")}[Pt](){return this[ze]()}formDisabledCallback(r){this.disabled=r}}return e.formAssociated=!0,c([h({noAccessor:!0})],e.prototype,"name",null),c([h({type:Boolean,noAccessor:!0})],e.prototype,"disabled",null),e}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class ho{constructor(e){this.getCurrentState=e,this.currentValidity={validity:{},validationMessage:""}}getValidity(){const e=this.getCurrentState();if(!(!this.prevState||!this.equals(this.prevState,e)))return this.currentValidity;const{validity:r,validationMessage:i}=this.computeValidity(e);return this.prevState=this.copy(e),this.currentValidity={validationMessage:i,validity:{badInput:r.badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing}},this.currentValidity}}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class ua extends ho{computeValidity(e){return this.checkboxControl||(this.checkboxControl=document.createElement("input"),this.checkboxControl.type="checkbox"),this.checkboxControl.checked=e.checked,this.checkboxControl.required=e.required,{validity:this.checkboxControl.validity,validationMessage:this.checkboxControl.validationMessage}}equals(e,t){return e.checked===t.checked&&e.required===t.required}copy({checked:e,required:t}){return{checked:e,required:t}}}/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ha=Ce(co(uo(st(S))));class ce extends ha{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener("click",e=>{!ao(e)||!this.input||(this.focus(),Ai(this.input))})}update(e){(e.has("checked")||e.has("disabled")||e.has("indeterminate"))&&(this.prevChecked=e.get("checked")??this.checked,this.prevDisabled=e.get("disabled")??this.disabled,this.prevIndeterminate=e.get("indeterminate")??this.indeterminate),super.update(e)}render(){const e=!this.prevChecked&&!this.prevIndeterminate,t=this.prevChecked&&!this.prevIndeterminate,r=this.prevIndeterminate,i=this.checked&&!this.indeterminate,n=this.indeterminate,a=Q({disabled:this.disabled,selected:i||n,unselected:!i&&!n,checked:i,indeterminate:n,"prev-unselected":e,"prev-checked":t,"prev-indeterminate":r,"prev-disabled":this.prevDisabled}),{ariaLabel:s,ariaInvalid:l}=this;return x`
      <div class="container ${a}">
        <input
          type="checkbox"
          id="input"
          aria-checked=${n?"mixed":m}
          aria-label=${s||m}
          aria-invalid=${l||m}
          ?disabled=${this.disabled}
          ?required=${this.required}
          .indeterminate=${this.indeterminate}
          .checked=${this.checked}
          @input=${this.handleInput}
          @change=${this.handleChange} />

        <div class="outline"></div>
        <div class="background"></div>
        <md-focus-ring part="focus-ring" for="input"></md-focus-ring>
        <md-ripple for="input" ?disabled=${this.disabled}></md-ripple>
        <svg class="icon" viewBox="0 0 18 18" aria-hidden="true">
          <rect class="mark short" />
          <rect class="mark long" />
        </svg>
      </div>
    `}handleInput(e){const t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate}handleChange(e){lo(this,e)}[ze](){return!this.checked||this.indeterminate?null:this.value}[Pt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[rt](){return new ua(()=>this)}[ot](){return this.input}}ce.shadowRootOptions={...S.shadowRootOptions,delegatesFocus:!0};c([h({type:Boolean})],ce.prototype,"checked",void 0);c([h({type:Boolean})],ce.prototype,"indeterminate",void 0);c([h({type:Boolean})],ce.prototype,"required",void 0);c([h()],ce.prototype,"value",void 0);c([F()],ce.prototype,"prevChecked",void 0);c([F()],ce.prototype,"prevDisabled",void 0);c([F()],ce.prototype,"prevIndeterminate",void 0);c([L("input")],ce.prototype,"input",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const pa=C`:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}}
`;/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Ar=class extends ce{};Ar.styles=[pa];Ar=c([B("md-checkbox")],Ar);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Kt extends S{constructor(){super(...arguments),this.inset=!1,this.insetStart=!1,this.insetEnd=!1}}c([h({type:Boolean,reflect:!0})],Kt.prototype,"inset",void 0);c([h({type:Boolean,reflect:!0,attribute:"inset-start"})],Kt.prototype,"insetStart",void 0);c([h({type:Boolean,reflect:!0,attribute:"inset-end"})],Kt.prototype,"insetEnd",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ma=C`:host{box-sizing:border-box;color:var(--md-divider-color, var(--md-sys-color-outline-variant, #cac4d0));display:flex;height:var(--md-divider-thickness, 1px);width:100%}:host([inset]),:host([inset-start]){padding-inline-start:16px}:host([inset]),:host([inset-end]){padding-inline-end:16px}:host::before{background:currentColor;content:"";height:100%;width:100%}@media(forced-colors: active){:host::before{background:CanvasText}}
`;/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Cr=class extends Kt{};Cr.styles=[ma];Cr=c([B("md-divider")],Cr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const fa={dialog:[[[{transform:"translateY(-50px)"},{transform:"translateY(0)"}],{duration:500,easing:ae.EMPHASIZED}]],scrim:[[[{opacity:0},{opacity:.32}],{duration:500,easing:"linear"}]],container:[[[{opacity:0},{opacity:1}],{duration:50,easing:"linear",pseudoElement:"::before"}],[[{height:"35%"},{height:"100%"}],{duration:500,easing:ae.EMPHASIZED,pseudoElement:"::before"}]],headline:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],content:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:0},{opacity:0,offset:.5},{opacity:1}],{duration:300,easing:"linear",fill:"forwards"}]]},va={dialog:[[[{transform:"translateY(0)"},{transform:"translateY(-50px)"}],{duration:150,easing:ae.EMPHASIZED_ACCELERATE}]],scrim:[[[{opacity:.32},{opacity:0}],{duration:150,easing:"linear"}]],container:[[[{height:"100%"},{height:"35%"}],{duration:150,easing:ae.EMPHASIZED_ACCELERATE,pseudoElement:"::before"}],[[{opacity:"1"},{opacity:"0"}],{delay:100,duration:50,easing:"linear",pseudoElement:"::before"}]],headline:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],content:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]]};/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ga=Ce(S);class M extends ga{get open(){return this.isOpen}set open(e){e!==this.isOpen&&(this.isOpen=e,e?(this.setAttribute("open",""),this.show()):(this.removeAttribute("open"),this.close()))}constructor(){super(),this.quick=!1,this.returnValue="",this.noFocusTrap=!1,this.getOpenAnimation=()=>fa,this.getCloseAnimation=()=>va,this.isOpen=!1,this.isOpening=!1,this.isConnectedPromise=this.getIsConnectedPromise(),this.isAtScrollTop=!1,this.isAtScrollBottom=!1,this.nextClickIsFromContent=!1,this.hasHeadline=!1,this.hasActions=!1,this.hasIcon=!1,this.escapePressedWithoutCancel=!1,this.treewalker=document.createTreeWalker(this,NodeFilter.SHOW_ELEMENT),this.addEventListener("submit",this.handleSubmit)}async show(){this.isOpening=!0,await this.isConnectedPromise,await this.updateComplete;const e=this.dialog;if(e.open||!this.isOpening){this.isOpening=!1;return}if(!this.dispatchEvent(new Event("open",{cancelable:!0}))){this.open=!1,this.isOpening=!1;return}e.showModal(),this.open=!0,this.scroller&&(this.scroller.scrollTop=0),this.querySelector("[autofocus]")?.focus(),await this.animateDialog(this.getOpenAnimation()),this.dispatchEvent(new Event("opened")),this.isOpening=!1}async close(e=this.returnValue){if(this.isOpening=!1,!this.isConnected){this.open=!1;return}await this.updateComplete;const t=this.dialog;if(!t.open||this.isOpening){this.open=!1;return}const r=this.returnValue;if(this.returnValue=e,!this.dispatchEvent(new Event("close",{cancelable:!0}))){this.returnValue=r;return}await this.animateDialog(this.getCloseAnimation()),t.close(e),this.open=!1,this.dispatchEvent(new Event("closed"))}connectedCallback(){super.connectedCallback(),this.isConnectedPromiseResolve()}disconnectedCallback(){super.disconnectedCallback(),this.isConnectedPromise=this.getIsConnectedPromise()}render(){const e=this.open&&!(this.isAtScrollTop&&this.isAtScrollBottom),t={"has-headline":this.hasHeadline,"has-actions":this.hasActions,"has-icon":this.hasIcon,scrollable:e,"show-top-divider":e&&!this.isAtScrollTop,"show-bottom-divider":e&&!this.isAtScrollBottom},r=this.open&&!this.noFocusTrap,i=x`
      <div
        class="focus-trap"
        tabindex="0"
        aria-hidden="true"
        @focus=${this.handleFocusTrapFocus}></div>
    `,{ariaLabel:n}=this;return x`
      <div class="scrim"></div>
      <dialog
        class=${Q(t)}
        aria-label=${n||m}
        aria-labelledby=${this.hasHeadline?"headline":m}
        role=${this.type==="alert"?"alertdialog":m}
        @cancel=${this.handleCancel}
        @click=${this.handleDialogClick}
        @close=${this.handleClose}
        @keydown=${this.handleKeydown}
        .returnValue=${this.returnValue||m}>
        ${r?i:m}
        <div class="container" @click=${this.handleContentClick}>
          <div class="headline">
            <div class="icon" aria-hidden="true">
              <slot name="icon" @slotchange=${this.handleIconChange}></slot>
            </div>
            <h2 id="headline" aria-hidden=${!this.hasHeadline||m}>
              <slot
                name="headline"
                @slotchange=${this.handleHeadlineChange}></slot>
            </h2>
            <md-divider></md-divider>
          </div>
          <div class="scroller">
            <div class="content">
              <div class="top anchor"></div>
              <slot name="content"></slot>
              <div class="bottom anchor"></div>
            </div>
          </div>
          <div class="actions">
            <md-divider></md-divider>
            <slot name="actions" @slotchange=${this.handleActionsChange}></slot>
          </div>
        </div>
        ${r?i:m}
      </dialog>
    `}firstUpdated(){this.intersectionObserver=new IntersectionObserver(e=>{for(const t of e)this.handleAnchorIntersection(t)},{root:this.scroller}),this.intersectionObserver.observe(this.topAnchor),this.intersectionObserver.observe(this.bottomAnchor)}handleDialogClick(){if(this.nextClickIsFromContent){this.nextClickIsFromContent=!1;return}this.dispatchEvent(new Event("cancel",{cancelable:!0}))&&this.close()}handleContentClick(){this.nextClickIsFromContent=!0}handleSubmit(e){const t=e.target,{submitter:r}=e;t.getAttribute("method")!=="dialog"||!r||this.close(r.getAttribute("value")??this.returnValue)}handleCancel(e){if(e.target!==this.dialog)return;this.escapePressedWithoutCancel=!1;const t=!lo(this,e);e.preventDefault(),!t&&this.close()}handleClose(){this.escapePressedWithoutCancel&&(this.escapePressedWithoutCancel=!1,this.dialog?.dispatchEvent(new Event("cancel",{cancelable:!0})))}handleKeydown(e){e.key==="Escape"&&(this.escapePressedWithoutCancel=!0,setTimeout(()=>{this.escapePressedWithoutCancel=!1}))}async animateDialog(e){if(this.cancelAnimations?.abort(),this.cancelAnimations=new AbortController,this.quick)return;const{dialog:t,scrim:r,container:i,headline:n,content:a,actions:s}=this;if(!t||!r||!i||!n||!a||!s)return;const{container:l,dialog:d,scrim:u,headline:p,content:f,actions:v}=e,g=[[t,d??[]],[r,u??[]],[i,l??[]],[n,p??[]],[a,f??[]],[s,v??[]]],b=[];for(const[A,T]of g)for(const E of T){const z=A.animate(...E);this.cancelAnimations.signal.addEventListener("abort",()=>{z.cancel()}),b.push(z)}await Promise.all(b.map(A=>A.finished.catch(()=>{})))}handleHeadlineChange(e){const t=e.target;this.hasHeadline=t.assignedElements().length>0}handleActionsChange(e){const t=e.target;this.hasActions=t.assignedElements().length>0}handleIconChange(e){const t=e.target;this.hasIcon=t.assignedElements().length>0}handleAnchorIntersection(e){const{target:t,isIntersecting:r}=e;t===this.topAnchor&&(this.isAtScrollTop=r),t===this.bottomAnchor&&(this.isAtScrollBottom=r)}getIsConnectedPromise(){return new Promise(e=>{this.isConnectedPromiseResolve=e})}handleFocusTrapFocus(e){const[t,r]=this.getFirstAndLastFocusableChildren();if(!t||!r){this.dialog?.focus();return}const i=e.target===this.firstFocusTrap,n=!i,a=e.relatedTarget===t,s=e.relatedTarget===r,l=!a&&!s;if(n&&s||i&&l){t.focus();return}if(i&&a||n&&l){r.focus();return}}getFirstAndLastFocusableChildren(){if(!this.treewalker)return[null,null];let e=null,t=null;for(this.treewalker.currentNode=this.treewalker.root;this.treewalker.nextNode();){const r=this.treewalker.currentNode;ba(r)&&(e||(e=r),t=r)}return[e,t]}}c([h({type:Boolean})],M.prototype,"open",null);c([h({type:Boolean})],M.prototype,"quick",void 0);c([h({attribute:!1})],M.prototype,"returnValue",void 0);c([h()],M.prototype,"type",void 0);c([h({type:Boolean,attribute:"no-focus-trap"})],M.prototype,"noFocusTrap",void 0);c([L("dialog")],M.prototype,"dialog",void 0);c([L(".scrim")],M.prototype,"scrim",void 0);c([L(".container")],M.prototype,"container",void 0);c([L(".headline")],M.prototype,"headline",void 0);c([L(".content")],M.prototype,"content",void 0);c([L(".actions")],M.prototype,"actions",void 0);c([F()],M.prototype,"isAtScrollTop",void 0);c([F()],M.prototype,"isAtScrollBottom",void 0);c([L(".scroller")],M.prototype,"scroller",void 0);c([L(".top.anchor")],M.prototype,"topAnchor",void 0);c([L(".bottom.anchor")],M.prototype,"bottomAnchor",void 0);c([L(".focus-trap")],M.prototype,"firstFocusTrap",void 0);c([F()],M.prototype,"hasHeadline",void 0);c([F()],M.prototype,"hasActions",void 0);c([F()],M.prototype,"hasIcon",void 0);function ba(o){const e=":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])",t=":not(:disabled,[disabled])";return o.matches(e+t+':not([tabindex^="-"])')?!0:!o.localName.includes("-")||!o.matches(t)?!1:o.shadowRoot?.delegatesFocus??!1}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ya=C`:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:"";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));flex:1;font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}}
`;/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Tr=class extends M{};Tr.styles=[ya];Tr=c([B("md-dialog")],Tr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const xa=Ce(S);class lt extends xa{constructor(){super(...arguments),this.size="medium",this.label="",this.lowered=!1}render(){const{ariaLabel:e}=this;return x`
      <button
        class="fab ${Q(this.getRenderClasses())}"
        aria-label=${e||m}>
        <md-elevation part="elevation"></md-elevation>
        <md-focus-ring part="focus-ring"></md-focus-ring>
        <md-ripple class="ripple"></md-ripple>
        ${this.renderTouchTarget()} ${this.renderIcon()} ${this.renderLabel()}
      </button>
    `}getRenderClasses(){const e=!!this.label;return{lowered:this.lowered,small:this.size==="small"&&!e,large:this.size==="large"&&!e,extended:e}}renderTouchTarget(){return x`<div class="touch-target"></div>`}renderLabel(){return this.label?x`<span class="label">${this.label}</span>`:""}renderIcon(){const{ariaLabel:e}=this;return x`<span class="icon">
      <slot
        name="icon"
        aria-hidden=${e||this.label?"true":m}>
        <span></span>
      </slot>
    </span>`}}lt.shadowRootOptions={mode:"open",delegatesFocus:!0};c([h({reflect:!0})],lt.prototype,"size",void 0);c([h()],lt.prototype,"label",void 0);c([h({type:Boolean})],lt.prototype,"lowered",void 0);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Ci extends lt{constructor(){super(...arguments),this.variant="surface"}getRenderClasses(){return{...super.getRenderClasses(),primary:this.variant==="primary",secondary:this.variant==="secondary",tertiary:this.variant==="tertiary"}}}c([h()],Ci.prototype,"variant",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const _a=C`:host{--_container-color: var(--md-fab-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-container-elevation, 3);--_container-height: var(--md-fab-container-height, 56px);--_container-shadow-color: var(--md-fab-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-container-width, 56px);--_focus-container-elevation: var(--md-fab-focus-container-elevation, 3);--_focus-icon-color: var(--md-fab-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-fab-hover-container-elevation, 4);--_hover-icon-color: var(--md-fab-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-fab-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-fab-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-fab-icon-size, 24px);--_lowered-container-color: var(--md-fab-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-pressed-container-elevation, 3);--_pressed-icon-color: var(--md-fab-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-fab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-fab-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-fab-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-fab-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-fab-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-large-container-height, 96px);--_large-container-width: var(--md-fab-large-container-width, 96px);--_large-icon-size: var(--md-fab-large-icon-size, 36px);--_pressed-label-text-color: var(--md-fab-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_primary-container-color: var(--md-fab-primary-container-color, var(--md-sys-color-primary-container, #eaddff));--_primary-focus-icon-color: var(--md-fab-primary-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-focus-label-text-color: var(--md-fab-primary-focus-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-icon-color: var(--md-fab-primary-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-label-text-color: var(--md-fab-primary-hover-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-state-layer-color: var(--md-fab-primary-hover-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-icon-color: var(--md-fab-primary-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-label-text-color: var(--md-fab-primary-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-icon-color: var(--md-fab-primary-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-label-text-color: var(--md-fab-primary-pressed-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-state-layer-color: var(--md-fab-primary-pressed-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_secondary-container-color: var(--md-fab-secondary-container-color, var(--md-sys-color-secondary-container, #e8def8));--_secondary-focus-icon-color: var(--md-fab-secondary-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-focus-label-text-color: var(--md-fab-secondary-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-icon-color: var(--md-fab-secondary-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-label-text-color: var(--md-fab-secondary-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-state-layer-color: var(--md-fab-secondary-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-icon-color: var(--md-fab-secondary-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-label-text-color: var(--md-fab-secondary-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-icon-color: var(--md-fab-secondary-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-label-text-color: var(--md-fab-secondary-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-state-layer-color: var(--md-fab-secondary-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_small-container-height: var(--md-fab-small-container-height, 40px);--_small-container-width: var(--md-fab-small-container-width, 40px);--_small-icon-size: var(--md-fab-small-icon-size, 24px);--_tertiary-container-color: var(--md-fab-tertiary-container-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_tertiary-focus-icon-color: var(--md-fab-tertiary-focus-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-focus-label-text-color: var(--md-fab-tertiary-focus-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-icon-color: var(--md-fab-tertiary-hover-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-label-text-color: var(--md-fab-tertiary-hover-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-state-layer-color: var(--md-fab-tertiary-hover-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-icon-color: var(--md-fab-tertiary-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-label-text-color: var(--md-fab-tertiary-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-icon-color: var(--md-fab-tertiary-pressed-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-label-text-color: var(--md-fab-tertiary-pressed-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-state-layer-color: var(--md-fab-tertiary-pressed-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_container-shape-start-start: var(--md-fab-container-shape-start-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-container-shape-start-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-container-shape-end-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-container-shape-end-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-large-container-shape-start-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-large-container-shape-start-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-large-container-shape-end-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-large-container-shape-end-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_small-container-shape-start-start: var(--md-fab-small-container-shape-start-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-start-end: var(--md-fab-small-container-shape-start-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-end: var(--md-fab-small-container-shape-end-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-start: var(--md-fab-small-container-shape-end-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));cursor:pointer}:host([size=small][touch-target=wrapper]){margin:max(0px,48px - var(--_small-container-height))}.fab .icon ::slotted(*){color:var(--_icon-color)}.fab:focus{color:var(--_focus-icon-color)}.fab:hover{color:var(--_hover-icon-color)}.fab:active{color:var(--_pressed-icon-color)}.fab{cursor:inherit}.fab.primary{background-color:var(--_primary-container-color);--md-ripple-hover-color: var(--_primary-hover-state-layer-color);--md-ripple-pressed-color: var(--_primary-pressed-state-layer-color)}.fab.primary .icon ::slotted(*){color:var(--_primary-icon-color)}.fab.primary:focus{color:var(--_primary-focus-icon-color)}.fab.primary:hover{color:var(--_primary-hover-icon-color)}.fab.primary:active{color:var(--_primary-pressed-icon-color)}.fab.primary .label{color:var(--_primary-label-text-color)}.fab:hover .fab.primary .label{color:var(--_primary-hover-label-text-color)}.fab:focus .fab.primary .label{color:var(--_primary-focus-label-text-color)}.fab:active .fab.primary .label{color:var(--_primary-pressed-label-text-color)}.fab.secondary{background-color:var(--_secondary-container-color);--md-ripple-hover-color: var(--_secondary-hover-state-layer-color);--md-ripple-pressed-color: var(--_secondary-pressed-state-layer-color)}.fab.secondary .icon ::slotted(*){color:var(--_secondary-icon-color)}.fab.secondary:focus{color:var(--_secondary-focus-icon-color)}.fab.secondary:hover{color:var(--_secondary-hover-icon-color)}.fab.secondary:active{color:var(--_secondary-pressed-icon-color)}.fab.secondary .label{color:var(--_secondary-label-text-color)}.fab:hover .fab.secondary .label{color:var(--_secondary-hover-label-text-color)}.fab:focus .fab.secondary .label{color:var(--_secondary-focus-label-text-color)}.fab:active .fab.secondary .label{color:var(--_secondary-pressed-label-text-color)}.fab.tertiary{background-color:var(--_tertiary-container-color);--md-ripple-hover-color: var(--_tertiary-hover-state-layer-color);--md-ripple-pressed-color: var(--_tertiary-pressed-state-layer-color)}.fab.tertiary .icon ::slotted(*){color:var(--_tertiary-icon-color)}.fab.tertiary:focus{color:var(--_tertiary-focus-icon-color)}.fab.tertiary:hover{color:var(--_tertiary-hover-icon-color)}.fab.tertiary:active{color:var(--_tertiary-pressed-icon-color)}.fab.tertiary .label{color:var(--_tertiary-label-text-color)}.fab:hover .fab.tertiary .label{color:var(--_tertiary-hover-label-text-color)}.fab:focus .fab.tertiary .label{color:var(--_tertiary-focus-label-text-color)}.fab:active .fab.tertiary .label{color:var(--_tertiary-pressed-label-text-color)}.fab.extended slot span{padding-inline-start:4px}.fab.small{width:var(--_small-container-width);height:var(--_small-container-height)}.fab.small .icon ::slotted(*){width:var(--_small-icon-size);height:var(--_small-icon-size);font-size:var(--_small-icon-size)}.fab.small,.fab.small .ripple{border-start-start-radius:var(--_small-container-shape-start-start);border-start-end-radius:var(--_small-container-shape-start-end);border-end-start-radius:var(--_small-container-shape-end-start);border-end-end-radius:var(--_small-container-shape-end-end)}.fab.small md-focus-ring{--md-focus-ring-shape-start-start: var(--_small-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_small-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_small-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_small-container-shape-end-start)}
`;/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const wa=C`@media(forced-colors: active){.fab{border:1px solid ButtonText}.fab.extended{padding-inline-start:15px;padding-inline-end:19px}md-focus-ring{--md-focus-ring-outward-offset: 3px}}
`;/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ka=C`:host{--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);display:inline-flex;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host([size=medium][touch-target=wrapper]){margin:max(0px,48px - var(--_container-height))}:host([size=large][touch-target=wrapper]){margin:max(0px,48px - var(--_large-container-height))}.fab,.icon,.icon ::slotted(*){display:flex}.fab{align-items:center;justify-content:center;vertical-align:middle;padding:0;position:relative;height:var(--_container-height);transition-property:background-color;border-width:0px;outline:none;z-index:0;text-transform:inherit}.fab.extended{width:inherit;box-sizing:border-box;padding-inline-start:16px;padding-inline-end:20px}.fab:not(.extended){width:var(--_container-width)}.fab.large{width:var(--_large-container-width);height:var(--_large-container-height)}.fab.large .icon ::slotted(*){width:var(--_large-icon-size);height:var(--_large-icon-size);font-size:var(--_large-icon-size)}.fab.large,.fab.large .ripple{border-start-start-radius:var(--_large-container-shape-start-start);border-start-end-radius:var(--_large-container-shape-start-end);border-end-start-radius:var(--_large-container-shape-end-start);border-end-end-radius:var(--_large-container-shape-end-end)}.fab.large md-focus-ring{--md-focus-ring-shape-start-start: var(--_large-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_large-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_large-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_large-container-shape-end-start)}.fab{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}.fab:focus{--md-elevation-level: var(--_focus-container-elevation)}.fab:hover{--md-elevation-level: var(--_hover-container-elevation)}.fab:active{--md-elevation-level: var(--_pressed-container-elevation)}.fab.lowered{background-color:var(--_lowered-container-color);--md-elevation-level: var(--_lowered-container-elevation)}.fab.lowered:focus{--md-elevation-level: var(--_lowered-focus-container-elevation)}.fab.lowered:hover{--md-elevation-level: var(--_lowered-hover-container-elevation)}.fab.lowered:active{--md-elevation-level: var(--_lowered-pressed-container-elevation)}.fab{background-color:var(--_container-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color)}.fab .label{color:var(--_label-text-color)}.fab:hover .fab .label{color:var(--_hover-label-text-color)}.fab:focus .fab .label{color:var(--_focus-label-text-color)}.fab:active .fab .label{color:var(--_pressed-label-text-color)}.label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight)}.fab.extended .icon ::slotted(*){margin-inline-end:12px}.ripple{overflow:hidden}.ripple,md-elevation{z-index:-1}.touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host([touch-target=none]) .touch-target{display:none}md-elevation,.fab{transition-duration:280ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}.fab,.ripple{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.icon ::slotted(*){width:var(--_icon-size);height:var(--_icon-size);font-size:var(--_icon-size)}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Ir=class extends Ci{};Ir.styles=[ka,_a,wa];Ir=c([B("md-fab")],Ir);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ea=C`:host{--_container-color: var(--md-filled-icon-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-height: var(--md-filled-icon-button-container-height, 40px);--_container-width: var(--md-filled-icon-button-container-width, 40px);--_disabled-container-color: var(--md-filled-icon-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-icon-button-disabled-container-opacity, 0.12);--_disabled-icon-color: var(--md-filled-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-icon-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-icon-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-icon-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-icon-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-filled-icon-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-icon-button-icon-size, 24px);--_pressed-icon-color: var(--md-filled-icon-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-icon-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-icon-button-pressed-state-layer-opacity, 0.12);--_selected-container-color: var(--md-filled-icon-button-selected-container-color, var(--md-sys-color-primary, #6750a4));--_toggle-selected-focus-icon-color: var(--md-filled-icon-button-toggle-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-icon-color: var(--md-filled-icon-button-toggle-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-state-layer-color: var(--md-filled-icon-button-toggle-selected-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-icon-color: var(--md-filled-icon-button-toggle-selected-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-icon-color: var(--md-filled-icon-button-toggle-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-state-layer-color: var(--md-filled-icon-button-toggle-selected-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_unselected-container-color: var(--md-filled-icon-button-unselected-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_toggle-focus-icon-color: var(--md-filled-icon-button-toggle-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-icon-color: var(--md-filled-icon-button-toggle-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-state-layer-color: var(--md-filled-icon-button-toggle-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_toggle-icon-color: var(--md-filled-icon-button-toggle-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-icon-color: var(--md-filled-icon-button-toggle-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-state-layer-color: var(--md-filled-icon-button-toggle-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-filled-icon-button-container-shape-start-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-icon-button-container-shape-start-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-icon-button-container-shape-end-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-icon-button-container-shape-end-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)))}.icon-button{color:var(--_icon-color)}.icon-button:hover{color:var(--_hover-icon-color)}.icon-button:focus{color:var(--_focus-icon-color)}.icon-button:active{color:var(--_pressed-icon-color)}.icon-button:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}.icon-button{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.icon-button::before{background-color:var(--_container-color);border-radius:inherit;content:"";inset:0;position:absolute;z-index:-1}.icon-button:is(:disabled,[aria-disabled=true])::before{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.icon-button:is(:disabled,[aria-disabled=true]) .icon{opacity:var(--_disabled-icon-opacity)}.toggle-filled:not(:disabled,[aria-disabled=true]){color:var(--_toggle-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-hover-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-focus-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-pressed-icon-color)}.toggle-filled{--md-ripple-hover-color: var(--_toggle-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-pressed-state-layer-color)}.toggle-filled:not(:disabled,[aria-disabled=true])::before{background-color:var(--_unselected-container-color)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_toggle-selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-selected-pressed-icon-color)}.selected{--md-ripple-hover-color: var(--_toggle-selected-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-selected-pressed-state-layer-color)}.selected:not(:disabled,[aria-disabled=true])::before{background-color:var(--_selected-container-color)}
`;/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Ti=Symbol.for(""),$a=o=>{if(o?.r===Ti)return o?._$litStatic$},ke=(o,...e)=>({_$litStatic$:e.reduce(((t,r,i)=>t+(n=>{if(n._$litStatic$!==void 0)return n._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${n}. Use 'unsafeStatic' to pass non-literal values, but
            take care to ensure page security.`)})(r)+o[i+1]),o[0]),r:Ti}),Uo=new Map,Aa=o=>(e,...t)=>{const r=t.length;let i,n;const a=[],s=[];let l,d=0,u=!1;for(;d<r;){for(l=e[d];d<r&&(n=t[d],(i=$a(n))!==void 0);)l+=i+e[++d],u=!0;d!==r&&s.push(n),a.push(l),d++}if(d===r&&a.push(e[r]),u){const p=a.join("$$lit$$");(e=Uo.get(p))===void 0&&(a.raw=a,Uo.set(p,e=a)),t=s}return o(e,...t)},po=Aa(x);/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function Vo(o,e=!0){return e&&getComputedStyle(o).getPropertyValue("direction").trim()==="rtl"}/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ca=Ce(st(S));class q extends Ca{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[H].form}get labels(){return this[H].labels}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.flipIconInRtl=!1,this.href="",this.download="",this.target="",this.ariaLabelSelected="",this.toggle=!1,this.selected=!1,this.type="submit",this.value="",this.flipIcon=Vo(this,this.flipIconInRtl),this.addEventListener("click",this.handleClick.bind(this))}willUpdate(){this.href&&(this.disabled=!1,this.softDisabled=!1)}render(){const e=this.href?ke`div`:ke`button`,{ariaLabel:t,ariaHasPopup:r,ariaExpanded:i}=this,n=t&&this.ariaLabelSelected,a=this.toggle?this.selected:m;let s=m;return this.href||(s=n&&this.selected?this.ariaLabelSelected:t),po`<${e}
        class="icon-button ${Q(this.getRenderClasses())}"
        id="button"
        aria-label="${s||m}"
        aria-haspopup="${!this.href&&r||m}"
        aria-expanded="${!this.href&&i||m}"
        aria-pressed="${a}"
        aria-disabled=${!this.href&&this.softDisabled||m}
        ?disabled="${!this.href&&this.disabled}"
        @click="${this.handleClickOnChild}">
        ${this.renderFocusRing()}
        ${this.renderRipple()}
        ${this.selected?m:this.renderIcon()}
        ${this.selected?this.renderSelectedIcon():m}
        ${this.href?this.renderLink():this.renderTouchTarget()}
  </${e}>`}renderLink(){const{ariaLabel:e}=this;return x`
      <a
        class="link"
        id="link"
        href="${this.href}"
        download="${this.download||m}"
        target="${this.target||m}"
        aria-label="${e||m}">
        ${this.renderTouchTarget()}
      </a>
    `}getRenderClasses(){return{"flip-icon":this.flipIcon,selected:this.toggle&&this.selected}}renderIcon(){return x`<span class="icon"><slot></slot></span>`}renderSelectedIcon(){return x`<span class="icon icon--selected"
      ><slot name="selected"><slot></slot></slot
    ></span>`}renderTouchTarget(){return x`<span class="touch"></span>`}renderFocusRing(){return x`<md-focus-ring
      part="focus-ring"
      for=${this.href?"link":"button"}></md-focus-ring>`}renderRipple(){const e=!this.href&&(this.disabled||this.softDisabled);return x`<md-ripple
      for=${this.href?"link":m}
      ?disabled="${e}"></md-ripple>`}connectedCallback(){this.flipIcon=Vo(this,this.flipIconInRtl),super.connectedCallback()}handleClick(e){if(!this.href&&this.softDisabled){e.stopImmediatePropagation(),e.preventDefault();return}}async handleClickOnChild(e){await 0,!(!this.toggle||this.disabled||this.softDisabled||e.defaultPrevented)&&(this.selected=!this.selected,this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}}$i(q);q.formAssociated=!0;q.shadowRootOptions={mode:"open",delegatesFocus:!0};c([h({type:Boolean,reflect:!0})],q.prototype,"disabled",void 0);c([h({type:Boolean,attribute:"soft-disabled",reflect:!0})],q.prototype,"softDisabled",void 0);c([h({type:Boolean,attribute:"flip-icon-in-rtl"})],q.prototype,"flipIconInRtl",void 0);c([h()],q.prototype,"href",void 0);c([h()],q.prototype,"download",void 0);c([h()],q.prototype,"target",void 0);c([h({attribute:"aria-label-selected"})],q.prototype,"ariaLabelSelected",void 0);c([h({type:Boolean})],q.prototype,"toggle",void 0);c([h({type:Boolean,reflect:!0})],q.prototype,"selected",void 0);c([h()],q.prototype,"type",void 0);c([h({reflect:!0})],q.prototype,"value",void 0);c([F()],q.prototype,"flipIcon",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const mo=C`:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);height:var(--_container-height);width:var(--_container-width);justify-content:center}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) max(0px,(48px - var(--_container-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){pointer-events:none}.icon-button{place-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:flex;place-content:center;outline:none;padding:0;position:relative;text-decoration:none;user-select:none;z-index:0;flex:1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.icon ::slotted(*){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size);font-weight:inherit}md-ripple{z-index:-1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.flip-icon .icon{transform:scaleX(-1)}.icon{display:inline-flex}.link{display:grid;height:100%;outline:none;place-items:center;position:absolute;width:100%}.touch{position:absolute;height:max(48px,100%);width:max(48px,100%)}:host([touch-target=none]) .touch{display:none}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1}}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Sr=class extends q{getRenderClasses(){return{...super.getRenderClasses(),filled:!0,"toggle-filled":this.toggle}}};Sr.styles=[mo,Ea];Sr=c([B("md-filled-icon-button")],Sr);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ta=C`:host{--_container-color: var(--md-filled-tonal-icon-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-height: var(--md-filled-tonal-icon-button-container-height, 40px);--_container-width: var(--md-filled-tonal-icon-button-container-width, 40px);--_disabled-container-color: var(--md-filled-tonal-icon-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-tonal-icon-button-disabled-container-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-icon-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-icon-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-icon-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-icon-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-filled-tonal-icon-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-icon-button-icon-size, 24px);--_pressed-icon-color: var(--md-filled-tonal-icon-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-icon-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-icon-button-pressed-state-layer-opacity, 0.12);--_selected-container-color: var(--md-filled-tonal-icon-button-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_toggle-selected-focus-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-hover-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-hover-state-layer-color: var(--md-filled-tonal-icon-button-toggle-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-pressed-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-pressed-state-layer-color: var(--md-filled-tonal-icon-button-toggle-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_unselected-container-color: var(--md-filled-tonal-icon-button-unselected-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_toggle-focus-icon-color: var(--md-filled-tonal-icon-button-toggle-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-hover-icon-color: var(--md-filled-tonal-icon-button-toggle-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-hover-state-layer-color: var(--md-filled-tonal-icon-button-toggle-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-icon-color: var(--md-filled-tonal-icon-button-toggle-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-pressed-icon-color: var(--md-filled-tonal-icon-button-toggle-pressed-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-pressed-state-layer-color: var(--md-filled-tonal-icon-button-toggle-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-filled-tonal-icon-button-container-shape-start-start, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-icon-button-container-shape-start-end, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-icon-button-container-shape-end-end, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-icon-button-container-shape-end-start, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)))}.icon-button{color:var(--_icon-color)}.icon-button:hover{color:var(--_hover-icon-color)}.icon-button:focus{color:var(--_focus-icon-color)}.icon-button:active{color:var(--_pressed-icon-color)}.icon-button:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}.icon-button{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.icon-button::before{background-color:var(--_container-color);border-radius:inherit;content:"";inset:0;position:absolute;z-index:-1}.icon-button:is(:disabled,[aria-disabled=true])::before{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.icon-button:is(:disabled,[aria-disabled=true]) .icon{opacity:var(--_disabled-icon-opacity)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]){color:var(--_toggle-icon-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-hover-icon-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-focus-icon-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-pressed-icon-color)}.toggle-filled-tonal{--md-ripple-hover-color: var(--_toggle-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-pressed-state-layer-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true])::before{background-color:var(--_unselected-container-color)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_toggle-selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-selected-pressed-icon-color)}.selected{--md-ripple-hover-color: var(--_toggle-selected-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-selected-pressed-state-layer-color)}.selected:not(:disabled,[aria-disabled=true])::before{background-color:var(--_selected-container-color)}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Rr=class extends q{getRenderClasses(){return{...super.getRenderClasses(),"filled-tonal":!0,"toggle-filled-tonal":this.toggle}}};Rr.styles=[mo,Ta];Rr=c([B("md-filled-tonal-icon-button")],Rr);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ia=C`:host{--_disabled-icon-color: var(--md-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-icon-button-disabled-icon-opacity, 0.38);--_icon-size: var(--md-icon-button-icon-size, 24px);--_selected-focus-icon-color: var(--md-icon-button-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-icon-color: var(--md-icon-button-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-color: var(--md-icon-button-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-opacity: var(--md-icon-button-selected-hover-state-layer-opacity, 0.08);--_selected-icon-color: var(--md-icon-button-selected-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-icon-color: var(--md-icon-button-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-color: var(--md-icon-button-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-opacity: var(--md-icon-button-selected-pressed-state-layer-opacity, 0.12);--_state-layer-height: var(--md-icon-button-state-layer-height, 40px);--_state-layer-shape: var(--md-icon-button-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));--_state-layer-width: var(--md-icon-button-state-layer-width, 40px);--_focus-icon-color: var(--md-icon-button-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-icon-color: var(--md-icon-button-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-icon-button-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-icon-button-pressed-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-icon-button-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-icon-button-pressed-state-layer-opacity, 0.12);--_container-shape-start-start: 0;--_container-shape-start-end: 0;--_container-shape-end-end: 0;--_container-shape-end-start: 0;--_container-height: 0;--_container-width: 0;height:var(--_state-layer-height);width:var(--_state-layer-width)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_state-layer-height))/2) max(0px,(48px - var(--_state-layer-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_state-layer-shape);--md-focus-ring-shape-start-end: var(--_state-layer-shape);--md-focus-ring-shape-end-end: var(--_state-layer-shape);--md-focus-ring-shape-end-start: var(--_state-layer-shape)}.standard{background-color:rgba(0,0,0,0);color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.standard:hover{color:var(--_hover-icon-color)}.standard:focus{color:var(--_focus-icon-color)}.standard:active{color:var(--_pressed-icon-color)}.standard:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}md-ripple{border-radius:var(--_state-layer-shape)}.standard:is(:disabled,[aria-disabled=true]){opacity:var(--_disabled-icon-opacity)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_selected-pressed-icon-color)}.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Lr=class extends q{getRenderClasses(){return{...super.getRenderClasses(),standard:!0}}};Lr.styles=[mo,Ia];Lr=c([B("md-icon-button")],Lr);/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Ii="important",Sa=" !"+Ii,Or=io(class extends no{constructor(o){if(super(o),o.type!==ge.ATTRIBUTE||o.name!=="style"||o.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(o){return Object.keys(o).reduce(((e,t)=>{const r=o[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(o,[e]){const{style:t}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(const r in e){const i=e[r];if(i!=null){this.ft.add(r);const n=typeof i=="string"&&i.endsWith(Sa);r.includes("-")||n?t.setProperty(r,n?i.slice(0,-11):i,n?Ii:""):t[r]=i}}return Z}});/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function Si(o,e=de){const t=Yt(o,e);return t&&(t.tabIndex=0,t.focus()),t}function Ri(o,e=de){const t=Li(o,e);return t&&(t.tabIndex=0,t.focus()),t}function Ra(o,e=de){const t=Xe(o,e);return t&&(t.item.tabIndex=-1),t}function Xe(o,e=de){for(let t=0;t<o.length;t++){const r=o[t];if(r.tabIndex===0&&e(r))return{item:r,index:t}}return null}function Yt(o,e=de){for(const t of o)if(e(t))return t;return null}function Li(o,e=de){for(let t=o.length-1;t>=0;t--){const r=o[t];if(e(r))return r}return null}function La(o,e,t=de,r=!0){for(let i=1;i<o.length;i++){const n=(i+e)%o.length;if(n<e&&!r)return null;const a=o[n];if(t(a))return a}return o[e]?o[e]:null}function Oa(o,e,t=de,r=!0){for(let i=1;i<o.length;i++){const n=(e-i+o.length)%o.length;if(n>e&&!r)return null;const a=o[n];if(t(a))return a}return o[e]?o[e]:null}function Wo(o,e,t=de,r=!0){if(e){const i=La(o,e.index,t,r);return i&&(i.tabIndex=0,i.focus()),i}else return Si(o,t)}function jo(o,e,t=de,r=!0){if(e){const i=Oa(o,e.index,t,r);return i&&(i.tabIndex=0,i.focus()),i}else return Ri(o,t)}function ft(){return new Event("deactivate-items",{bubbles:!0,composed:!0})}function Pa(){return new Event("request-activation",{bubbles:!0,composed:!0})}function de(o){return!o.disabled}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const V={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",Home:"Home",End:"End"};class za{constructor(e){this.handleKeydown=u=>{const p=u.key;if(u.defaultPrevented||!this.isNavigableKey(p))return;const f=this.items;if(!f.length)return;const v=Xe(f,this.isActivatable);u.preventDefault();const g=this.isRtl(),b=g?V.ArrowRight:V.ArrowLeft,A=g?V.ArrowLeft:V.ArrowRight;let T=null;switch(p){case V.ArrowDown:case A:T=Wo(f,v,this.isActivatable,this.wrapNavigation());break;case V.ArrowUp:case b:T=jo(f,v,this.isActivatable,this.wrapNavigation());break;case V.Home:T=Si(f,this.isActivatable);break;case V.End:T=Ri(f,this.isActivatable);break}T&&v&&v.item!==T&&(v.item.tabIndex=-1)},this.onDeactivateItems=()=>{const u=this.items;for(const p of u)this.deactivateItem(p)},this.onRequestActivation=u=>{this.onDeactivateItems();const p=u.target;this.activateItem(p),p.focus()},this.onSlotchange=()=>{const u=this.items;let p=!1;for(const v of u){if(!v.disabled&&v.tabIndex>-1&&!p){p=!0,v.tabIndex=0;continue}v.tabIndex=-1}if(p)return;const f=Yt(u,this.isActivatable);f&&(f.tabIndex=0)};const{isItem:t,getPossibleItems:r,isRtl:i,deactivateItem:n,activateItem:a,isNavigableKey:s,isActivatable:l,wrapNavigation:d}=e;this.isItem=t,this.getPossibleItems=r,this.isRtl=i,this.deactivateItem=n,this.activateItem=a,this.isNavigableKey=s,this.isActivatable=l,this.wrapNavigation=d??(()=>!0)}get items(){const e=this.getPossibleItems(),t=[];for(const r of e){if(this.isItem(r)){t.push(r);continue}const n=r.item;n&&this.isItem(n)&&t.push(n)}return t}activateNextItem(){const e=this.items,t=Xe(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Wo(e,t,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){const e=this.items,t=Xe(e,this.isActivatable);return t&&(t.item.tabIndex=-1),jo(e,t,this.isActivatable,this.wrapNavigation())}}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function Ba(o,e){return new CustomEvent("close-menu",{bubbles:!0,composed:!0,detail:{initiator:o,reason:e,itemPath:[o]}})}const Ko=Ba;function Ma(){return new Event("deactivate-typeahead",{bubbles:!0,composed:!0})}function ar(){return new Event("activate-typeahead",{bubbles:!0,composed:!0})}const ve={RIGHT:"ArrowRight",LEFT:"ArrowLeft"},Ze={SPACE:"Space",ENTER:"Enter"},Pr={CLICK_SELECTION:"click-selection",KEYDOWN:"keydown"},zr={ESCAPE:"Escape",SPACE:Ze.SPACE,ENTER:Ze.ENTER};function Oi(o){return Object.values(zr).some(e=>e===o)}function Yo(o,e){const t=new Event("md-contains",{bubbles:!0,composed:!0});let r=[];const i=a=>{r=a.composedPath()};return e.addEventListener("md-contains",i),o.dispatchEvent(t),e.removeEventListener("md-contains",i),r.length>0}const Re={NONE:"none",LIST_ROOT:"list-root",FIRST_ITEM:"first-item",LAST_ITEM:"last-item"};/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const zt={END_START:"end-start",START_START:"start-start",START_END:"start-end"};class Da{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:"none"},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){const{surfaceEl:e,anchorEl:t,anchorCorner:r,surfaceCorner:i,positioning:n,xOffset:a,yOffset:s,disableBlockFlip:l,disableInlineFlip:d,repositionStrategy:u}=this.getProperties(),p=r.toLowerCase().trim(),f=i.toLowerCase().trim();if(!e||!t)return;const v=window.innerWidth,g=window.innerHeight,b=document.createElement("div");b.style.opacity="0",b.style.position="fixed",b.style.display="block",b.style.inset="0",document.body.appendChild(b);const A=b.getBoundingClientRect();b.remove();const T=window.innerHeight-A.bottom,E=window.innerWidth-A.right;this.surfaceStylesInternal={display:"block",opacity:"0"},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();const z=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),N=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[R,X]=f.split("-"),[K,xe]=p.split("-"),ut=getComputedStyle(e).direction==="ltr";let{blockInset:Ie,blockOutOfBoundsCorrection:ie,surfaceBlockProperty:Io}=this.calculateBlock({surfaceRect:z,anchorRect:N,anchorBlock:K,surfaceBlock:R,yOffset:s,positioning:n,windowInnerHeight:g,blockScrollbarHeight:T});if(ie&&!l){const er=R==="start"?"end":"start",tr=K==="start"?"end":"start",ue=this.calculateBlock({surfaceRect:z,anchorRect:N,anchorBlock:tr,surfaceBlock:er,yOffset:s,positioning:n,windowInnerHeight:g,blockScrollbarHeight:T});ie>ue.blockOutOfBoundsCorrection&&(Ie=ue.blockInset,ie=ue.blockOutOfBoundsCorrection,Io=ue.surfaceBlockProperty)}let{inlineInset:ht,inlineOutOfBoundsCorrection:Se,surfaceInlineProperty:So}=this.calculateInline({surfaceRect:z,anchorRect:N,anchorInline:xe,surfaceInline:X,xOffset:a,positioning:n,isLTR:ut,windowInnerWidth:v,inlineScrollbarWidth:E});if(Se&&!d){const er=X==="start"?"end":"start",tr=xe==="start"?"end":"start",ue=this.calculateInline({surfaceRect:z,anchorRect:N,anchorInline:tr,surfaceInline:er,xOffset:a,positioning:n,isLTR:ut,windowInnerWidth:v,inlineScrollbarWidth:E});Math.abs(Se)>Math.abs(ue.inlineOutOfBoundsCorrection)&&(ht=ue.inlineInset,Se=ue.inlineOutOfBoundsCorrection,So=ue.surfaceInlineProperty)}u==="move"&&(Ie=Ie-ie,ht=ht-Se),this.surfaceStylesInternal={display:"block",opacity:"1",[Io]:`${Ie}px`,[So]:`${ht}px`},u==="resize"&&(ie&&(this.surfaceStylesInternal.height=`${z.height-ie}px`),Se&&(this.surfaceStylesInternal.width=`${z.width-Se}px`)),this.host.requestUpdate()}calculateBlock(e){const{surfaceRect:t,anchorRect:r,anchorBlock:i,surfaceBlock:n,yOffset:a,positioning:s,windowInnerHeight:l,blockScrollbarHeight:d}=e,u=s==="fixed"||s==="document"?1:0,p=s==="document"?1:0,f=n==="start"?1:0,v=n==="end"?1:0,b=(i!==n?1:0)*r.height+a,A=f*r.top+v*(l-r.bottom-d),T=f*window.scrollY-v*window.scrollY,E=Math.abs(Math.min(0,l-A-b-t.height));return{blockInset:u*A+p*T+b,blockOutOfBoundsCorrection:E,surfaceBlockProperty:n==="start"?"inset-block-start":"inset-block-end"}}calculateInline(e){const{isLTR:t,surfaceInline:r,anchorInline:i,anchorRect:n,surfaceRect:a,xOffset:s,positioning:l,windowInnerWidth:d,inlineScrollbarWidth:u}=e,p=l==="fixed"||l==="document"?1:0,f=l==="document"?1:0,v=t?1:0,g=t?0:1,b=r==="start"?1:0,A=r==="end"?1:0,E=(i!==r?1:0)*n.width+s,z=b*n.left+A*(d-n.right-u),N=b*(d-n.right-u)+A*n.left,R=v*z+g*N,X=b*window.scrollX-A*window.scrollX,K=A*window.scrollX-b*window.scrollX,xe=v*X+g*K,ut=Math.abs(Math.min(0,d-R-E-a.width)),Ie=p*R+E+f*xe;let ie=r==="start"?"inset-inline-start":"inset-inline-end";return(l==="document"||l==="fixed")&&(r==="start"&&t||r==="end"&&!t?ie="left":ie="right"),{inlineInset:Ie,inlineOutOfBoundsCorrection:ut,surfaceInlineProperty:ie}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){const e=this.getProperties();let t=!1;for(const[a,s]of Object.entries(e))if(t=t||s!==this.lastValues[a],t)break;const r=this.lastValues.isOpen!==e.isOpen,i=!!e.anchorEl,n=!!e.surfaceEl;t&&i&&n&&(this.lastValues.isOpen=e.isOpen,e.isOpen?(this.lastValues=e,await this.position(),e.onOpen()):r&&(await e.beforeClose(),this.close(),e.onClose()))}close(){this.surfaceStylesInternal={display:"none"},this.host.requestUpdate();const e=this.getProperties().surfaceEl;e?.popover&&e?.isConnected&&e.hidePopover()}}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ee={INDEX:0,ITEM:1,TEXT:2};class Na{constructor(e){this.getProperties=e,this.typeaheadRecords=[],this.typaheadBuffer="",this.cancelTypeaheadTimeout=0,this.isTypingAhead=!1,this.lastActiveRecord=null,this.onKeydown=t=>{this.isTypingAhead?this.typeahead(t):this.beginTypeahead(t)},this.endTypeahead=()=>{this.isTypingAhead=!1,this.typaheadBuffer="",this.typeaheadRecords=[]}}get items(){return this.getProperties().getItems()}get active(){return this.getProperties().active}beginTypeahead(e){this.active&&(e.code==="Space"||e.code==="Enter"||e.code.startsWith("Arrow")||e.code==="Escape"||(this.isTypingAhead=!0,this.typeaheadRecords=this.items.map((t,r)=>[r,t,t.typeaheadText.trim().toLowerCase()]),this.lastActiveRecord=this.typeaheadRecords.find(t=>t[ee.ITEM].tabIndex===0)??null,this.lastActiveRecord&&(this.lastActiveRecord[ee.ITEM].tabIndex=-1),this.typeahead(e)))}typeahead(e){if(e.defaultPrevented)return;if(clearTimeout(this.cancelTypeaheadTimeout),e.code==="Enter"||e.code.startsWith("Arrow")||e.code==="Escape"){this.endTypeahead(),this.lastActiveRecord&&(this.lastActiveRecord[ee.ITEM].tabIndex=-1);return}e.code==="Space"&&e.preventDefault(),this.cancelTypeaheadTimeout=setTimeout(this.endTypeahead,this.getProperties().typeaheadBufferTime),this.typaheadBuffer+=e.key.toLowerCase();const t=this.lastActiveRecord?this.lastActiveRecord[ee.INDEX]:-1,r=this.typeaheadRecords.length,i=l=>(l[ee.INDEX]+r-t)%r,n=this.typeaheadRecords.filter(l=>!l[ee.ITEM].disabled&&l[ee.TEXT].startsWith(this.typaheadBuffer)).sort((l,d)=>i(l)-i(d));if(n.length===0){clearTimeout(this.cancelTypeaheadTimeout),this.lastActiveRecord&&(this.lastActiveRecord[ee.ITEM].tabIndex=-1),this.endTypeahead();return}const a=this.typaheadBuffer.length===1;let s;this.lastActiveRecord===n[0]&&a?s=n[1]??n[0]:s=n[0],this.lastActiveRecord&&(this.lastActiveRecord[ee.ITEM].tabIndex=-1),this.lastActiveRecord=s,s[ee.ITEM].tabIndex=0,s[ee.ITEM].focus()}}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Fa=200,Pi=new Set([V.ArrowDown,V.ArrowUp,V.Home,V.End]),qa=new Set([V.ArrowLeft,V.ArrowRight,...Pi]);function Ha(o=document){let e=o.activeElement;for(;e&&e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}class O extends S{get openDirection(){return this.menuCorner.split("-")[0]==="start"?"DOWN":"UP"}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate("anchorElement")}constructor(){super(),this.anchor="",this.positioning="absolute",this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.noHorizontalFlip=!1,this.noVerticalFlip=!1,this.typeaheadDelay=Fa,this.anchorCorner=zt.END_START,this.menuCorner=zt.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=Re.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=qn(),this.listController=new za({isItem:e=>e.hasAttribute("md-menu-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction==="rtl",deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>{if(!this.isSubmenu)return qa.has(e);const r=getComputedStyle(this).direction==="rtl"?V.ArrowLeft:V.ArrowRight;return e===r?!0:Pi.has(e)},wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Na(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new Da(this,()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning==="popover"?"document":this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,disableBlockFlip:this.noVerticalFlip,disableInlineFlip:this.noHorizontalFlip,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&this.positioning!=="popover"?"move":"resize"})),this.onWindowResize=()=>{this.isRepositioning||this.positioning!=="document"&&this.positioning!=="fixed"&&this.positioning!=="popover"||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{const t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(Yo(e.relatedTarget,this)||this.pointerPath.length!==0&&Yo(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;const r=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=r},this.onOpened=async()=>{this.lastFocusedElement=Ha();const e=this.items,t=Xe(e);t&&this.defaultFocus!==Re.NONE&&(t.item.tabIndex=-1);let r=!this.quick;switch(this.quick?this.dispatchEvent(new Event("opening")):r=!!await this.animateOpen(),this.defaultFocus){case Re.FIRST_ITEM:const i=Yt(e);i&&(i.tabIndex=0,i.focus(),await i.updateComplete);break;case Re.LAST_ITEM:const n=Li(e);n&&(n.tabIndex=0,n.focus(),await n.updateComplete);break;case Re.LIST_ROOT:this.focus();break;default:case Re.NONE:break}r||this.dispatchEvent(new Event("opened"))},this.beforeClose=async()=>{this.open=!1,this.skipRestoreFocus||this.lastFocusedElement?.focus?.(),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event("closing")),this.dispatchEvent(new Event("closed")))},this.onWindowPointerdown=e=>{this.pointerPath=e.composedPath()},this.onDocumentClick=e=>{if(!this.open)return;const t=e.composedPath();!this.stayOpenOnOutsideClick&&!t.includes(this)&&!t.includes(this.anchorElement)&&(this.open=!1)},this.internals.role="menu",this.addEventListener("keydown",this.handleKeydown),this.addEventListener("keydown",this.captureKeydown,{capture:!0}),this.addEventListener("focusout",this.handleFocusout)}get items(){return this.listController.items}willUpdate(e){if(e.has("open")){if(this.open){this.removeAttribute("aria-hidden");return}this.setAttribute("aria-hidden","true")}}update(e){e.has("open")&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),e.has("positioning")&&this.positioning==="popover"&&!this.showPopover&&(this.positioning="fixed"),super.update(e)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}getBoundingClientRect(){return this.surfaceEl?this.surfaceEl.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){return this.surfaceEl?this.surfaceEl.getClientRects():super.getClientRects()}render(){return this.renderSurface()}renderSurface(){return x`
      <div
        class="menu ${Q(this.getSurfaceClasses())}"
        style=${Or(this.menuPositionController.surfaceStyles)}
        popover=${this.positioning==="popover"?"manual":m}>
        ${this.renderElevation()}
        <div class="items">
          <div class="item-padding"> ${this.renderMenuItems()} </div>
        </div>
      </div>
    `}renderMenuItems(){return x`<slot
      @close-menu=${this.onCloseMenu}
      @deactivate-items=${this.onDeactivateItems}
      @request-activation=${this.onRequestActivation}
      @deactivate-typeahead=${this.handleDeactivateTypeahead}
      @activate-typeahead=${this.handleActivateTypeahead}
      @stay-open-on-focusout=${this.handleStayOpenOnFocusout}
      @close-on-focusout=${this.handleCloseOnFocusout}
      @slotchange=${this.listController.onSlotchange}></slot>`}renderElevation(){return x`<md-elevation part="elevation"></md-elevation>`}getSurfaceClasses(){return{open:this.open,fixed:this.positioning==="fixed","has-overflow":this.hasOverflow}}captureKeydown(e){e.target===this&&!e.defaultPrevented&&Oi(e.code)&&(e.preventDefault(),this.close()),this.typeaheadController.onKeydown(e)}async animateOpen(){const e=this.surfaceEl,t=this.slotEl;if(!e||!t)return!0;const r=this.openDirection;this.dispatchEvent(new Event("opening")),e.classList.toggle("animating",!0);const i=this.openCloseAnimationSignal.start(),n=e.offsetHeight,a=r==="UP",s=this.items,l=500,d=50,u=250,p=(l-u)/s.length,f=e.animate([{height:"0px"},{height:`${n}px`}],{duration:l,easing:ae.EMPHASIZED}),v=t.animate([{transform:a?`translateY(-${n}px)`:""},{transform:""}],{duration:l,easing:ae.EMPHASIZED}),g=e.animate([{opacity:0},{opacity:1}],d),b=[];for(let E=0;E<s.length;E++){const z=a?s.length-1-E:E,N=s[z],R=N.animate([{opacity:0},{opacity:1}],{duration:u,delay:p*E});N.classList.toggle("md-menu-hidden",!0),R.addEventListener("finish",()=>{N.classList.toggle("md-menu-hidden",!1)}),b.push([N,R])}let A=E=>{};const T=new Promise(E=>{A=E});return i.addEventListener("abort",()=>{f.cancel(),v.cancel(),g.cancel(),b.forEach(([E,z])=>{E.classList.toggle("md-menu-hidden",!1),z.cancel()}),A(!0)}),f.addEventListener("finish",()=>{e.classList.toggle("animating",!1),this.openCloseAnimationSignal.finish(),A(!1)}),await T}animateClose(){let e;const t=new Promise(R=>{e=R}),r=this.surfaceEl,i=this.slotEl;if(!r||!i)return e(!1),t;const a=this.openDirection==="UP";this.dispatchEvent(new Event("closing")),r.classList.toggle("animating",!0);const s=this.openCloseAnimationSignal.start(),l=r.offsetHeight,d=this.items,u=150,p=50,f=u-p,v=50,g=50,b=.35,A=(u-g-v)/d.length,T=r.animate([{height:`${l}px`},{height:`${l*b}px`}],{duration:u,easing:ae.EMPHASIZED_ACCELERATE}),E=i.animate([{transform:""},{transform:a?`translateY(-${l*(1-b)}px)`:""}],{duration:u,easing:ae.EMPHASIZED_ACCELERATE}),z=r.animate([{opacity:1},{opacity:0}],{duration:p,delay:f}),N=[];for(let R=0;R<d.length;R++){const X=a?R:d.length-1-R,K=d[X],xe=K.animate([{opacity:1},{opacity:0}],{duration:v,delay:g+A*R});xe.addEventListener("finish",()=>{K.classList.toggle("md-menu-hidden",!0)}),N.push([K,xe])}return s.addEventListener("abort",()=>{T.cancel(),E.cancel(),z.cancel(),N.forEach(([R,X])=>{X.cancel(),R.classList.toggle("md-menu-hidden",!1)}),e(!1)}),T.addEventListener("finish",()=>{r.classList.toggle("animating",!1),N.forEach(([R])=>{R.classList.toggle("md-menu-hidden",!1)}),this.openCloseAnimationSignal.finish(),this.dispatchEvent(new Event("closed")),e(!0)}),t}handleKeydown(e){this.pointerPath=[],this.listController.handleKeydown(e)}setUpGlobalEventListeners(){document.addEventListener("click",this.onDocumentClick,{capture:!0}),window.addEventListener("pointerdown",this.onWindowPointerdown),document.addEventListener("resize",this.onWindowResize,{passive:!0}),window.addEventListener("resize",this.onWindowResize,{passive:!0})}cleanUpGlobalEventListeners(){document.removeEventListener("click",this.onDocumentClick,{capture:!0}),window.removeEventListener("pointerdown",this.onWindowPointerdown),document.removeEventListener("resize",this.onWindowResize),window.removeEventListener("resize",this.onWindowResize)}onCloseMenu(){this.close()}onDeactivateItems(e){e.stopPropagation(),this.listController.onDeactivateItems()}onRequestActivation(e){e.stopPropagation(),this.listController.onRequestActivation(e)}handleDeactivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!1}handleActivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!0}handleStayOpenOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!0}handleCloseOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!1}close(){this.open=!1,this.slotItems.forEach(t=>{t.close?.()})}show(){this.open=!0}activateNextItem(){return this.listController.activateNextItem()??null}activatePreviousItem(){return this.listController.activatePreviousItem()??null}reposition(){this.open&&this.menuPositionController.position()}}c([L(".menu")],O.prototype,"surfaceEl",void 0);c([L("slot")],O.prototype,"slotEl",void 0);c([h()],O.prototype,"anchor",void 0);c([h()],O.prototype,"positioning",void 0);c([h({type:Boolean})],O.prototype,"quick",void 0);c([h({type:Boolean,attribute:"has-overflow"})],O.prototype,"hasOverflow",void 0);c([h({type:Boolean,reflect:!0})],O.prototype,"open",void 0);c([h({type:Number,attribute:"x-offset"})],O.prototype,"xOffset",void 0);c([h({type:Number,attribute:"y-offset"})],O.prototype,"yOffset",void 0);c([h({type:Boolean,attribute:"no-horizontal-flip"})],O.prototype,"noHorizontalFlip",void 0);c([h({type:Boolean,attribute:"no-vertical-flip"})],O.prototype,"noVerticalFlip",void 0);c([h({type:Number,attribute:"typeahead-delay"})],O.prototype,"typeaheadDelay",void 0);c([h({attribute:"anchor-corner"})],O.prototype,"anchorCorner",void 0);c([h({attribute:"menu-corner"})],O.prototype,"menuCorner",void 0);c([h({type:Boolean,attribute:"stay-open-on-outside-click"})],O.prototype,"stayOpenOnOutsideClick",void 0);c([h({type:Boolean,attribute:"stay-open-on-focusout"})],O.prototype,"stayOpenOnFocusout",void 0);c([h({type:Boolean,attribute:"skip-restore-focus"})],O.prototype,"skipRestoreFocus",void 0);c([h({attribute:"default-focus"})],O.prototype,"defaultFocus",void 0);c([h({type:Boolean,attribute:"no-navigation-wrap"})],O.prototype,"noNavigationWrap",void 0);c([fe({flatten:!0})],O.prototype,"slotItems",void 0);c([F()],O.prototype,"typeaheadActive",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ua=C`:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px))}.menu{border-radius:var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px));display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);color:inherit;opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit;scrollbar-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit;scrollbar-width:inherit}.item-padding{padding-block:var(--md-menu-top-space, 8px) var(--md-menu-bottom-space, 8px)}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Br=class extends O{};Br.styles=[Ua];Br=c([B("md-menu")],Br);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class fo extends S{constructor(){super(...arguments),this.multiline=!1}render(){return x`
      <slot name="container"></slot>
      <slot class="non-text" name="start"></slot>
      <div class="text">
        <slot name="overline" @slotchange=${this.handleTextSlotChange}></slot>
        <slot
          class="default-slot"
          @slotchange=${this.handleTextSlotChange}></slot>
        <slot name="headline" @slotchange=${this.handleTextSlotChange}></slot>
        <slot
          name="supporting-text"
          @slotchange=${this.handleTextSlotChange}></slot>
      </div>
      <slot class="non-text" name="trailing-supporting-text"></slot>
      <slot class="non-text" name="end"></slot>
    `}handleTextSlotChange(){let e=!1,t=0;for(const r of this.textSlots)if(Va(r)&&(t+=1),t>1){e=!0;break}this.multiline=e}}c([h({type:Boolean,reflect:!0})],fo.prototype,"multiline",void 0);c([wn(".text slot")],fo.prototype,"textSlots",void 0);function Va(o){for(const e of o.assignedNodes({flatten:!0})){const t=e.nodeType===Node.ELEMENT_NODE,r=e.nodeType===Node.TEXT_NODE&&e.textContent?.match(/\S/);if(t||r)return!0}return!1}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Wa=C`:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}
`;/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Mr=class extends fo{};Mr.styles=[Wa];Mr=c([B("md-item")],Mr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class ja{constructor(e,t){this.host=e,this.internalTypeaheadText=null,this.onClick=()=>{this.host.keepOpen||this.host.dispatchEvent(Ko(this.host,{kind:Pr.CLICK_SELECTION}))},this.onKeydown=r=>{if(this.host.href&&r.code==="Enter"){const n=this.getInteractiveElement();n instanceof HTMLAnchorElement&&n.click()}if(r.defaultPrevented)return;const i=r.code;this.host.keepOpen&&i!=="Escape"||Oi(i)&&(r.preventDefault(),this.host.dispatchEvent(Ko(this.host,{kind:Pr.KEYDOWN,key:i})))},this.getHeadlineElements=t.getHeadlineElements,this.getSupportingTextElements=t.getSupportingTextElements,this.getDefaultElements=t.getDefaultElements,this.getInteractiveElement=t.getInteractiveElement,this.host.addController(this)}get typeaheadText(){if(this.internalTypeaheadText!==null)return this.internalTypeaheadText;const e=this.getHeadlineElements(),t=[];return e.forEach(r=>{r.textContent&&r.textContent.trim()&&t.push(r.textContent.trim())}),t.length===0&&this.getDefaultElements().forEach(r=>{r.textContent&&r.textContent.trim()&&t.push(r.textContent.trim())}),t.length===0&&this.getSupportingTextElements().forEach(r=>{r.textContent&&r.textContent.trim()&&t.push(r.textContent.trim())}),t.join(" ")}get tagName(){switch(this.host.type){case"link":return"a";case"button":return"button";default:case"menuitem":case"option":return"li"}}get role(){return this.host.type==="option"?"option":"menuitem"}hostConnected(){this.host.toggleAttribute("md-menu-item",!0)}hostUpdate(){this.host.href&&(this.host.type="link")}setTypeaheadText(e){this.internalTypeaheadText=e}}/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ka=Ce(S);class G extends Ka{constructor(){super(...arguments),this.disabled=!1,this.type="menuitem",this.href="",this.target="",this.keepOpen=!1,this.selected=!1,this.menuItemController=new ja(this,{getHeadlineElements:()=>this.headlineElements,getSupportingTextElements:()=>this.supportingTextElements,getDefaultElements:()=>this.defaultElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.menuItemController.typeaheadText}set typeaheadText(e){this.menuItemController.setTypeaheadText(e)}render(){return this.renderListItem(x`
      <md-item>
        <div slot="container">
          ${this.renderRipple()} ${this.renderFocusRing()}
        </div>
        <slot name="start" slot="start"></slot>
        <slot name="end" slot="end"></slot>
        ${this.renderBody()}
      </md-item>
    `)}renderListItem(e){const t=this.type==="link";let r;switch(this.menuItemController.tagName){case"a":r=ke`a`;break;case"button":r=ke`button`;break;default:case"li":r=ke`li`;break}const i=t&&this.target?this.target:m;return po`
      <${r}
        id="item"
        tabindex=${this.disabled&&!t?-1:0}
        role=${this.menuItemController.role}
        aria-label=${this.ariaLabel||m}
        aria-selected=${this.ariaSelected||m}
        aria-checked=${this.ariaChecked||m}
        aria-expanded=${this.ariaExpanded||m}
        aria-haspopup=${this.ariaHasPopup||m}
        class="list-item ${Q(this.getRenderClasses())}"
        href=${this.href||m}
        target=${i}
        @click=${this.menuItemController.onClick}
        @keydown=${this.menuItemController.onKeydown}
      >${e}</${r}>
    `}renderRipple(){return x` <md-ripple
      part="ripple"
      for="item"
      ?disabled=${this.disabled}></md-ripple>`}renderFocusRing(){return x` <md-focus-ring
      part="focus-ring"
      for="item"
      inward></md-focus-ring>`}getRenderClasses(){return{disabled:this.disabled,selected:this.selected}}renderBody(){return x`
      <slot></slot>
      <slot name="overline" slot="overline"></slot>
      <slot name="headline" slot="headline"></slot>
      <slot name="supporting-text" slot="supporting-text"></slot>
      <slot
        name="trailing-supporting-text"
        slot="trailing-supporting-text"></slot>
    `}focus(){this.listItemRoot?.focus()}}G.shadowRootOptions={...S.shadowRootOptions,delegatesFocus:!0};c([h({type:Boolean,reflect:!0})],G.prototype,"disabled",void 0);c([h()],G.prototype,"type",void 0);c([h()],G.prototype,"href",void 0);c([h()],G.prototype,"target",void 0);c([h({type:Boolean,attribute:"keep-open"})],G.prototype,"keepOpen",void 0);c([h({type:Boolean})],G.prototype,"selected",void 0);c([L(".list-item")],G.prototype,"listItemRoot",void 0);c([fe({slot:"headline"})],G.prototype,"headlineElements",void 0);c([fe({slot:"supporting-text"})],G.prototype,"supportingTextElements",void 0);c([kn({slot:""})],G.prototype,"defaultElements",void 0);c([h({attribute:"typeahead-text"})],G.prototype,"typeaheadText",null);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ya=C`:host{display:flex;--md-ripple-hover-color: var(--md-menu-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-menu-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-menu-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-menu-item-pressed-state-layer-opacity, 0.12)}:host([disabled]){opacity:var(--md-menu-item-disabled-opacity, 0.3);pointer-events:none}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled){cursor:pointer}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;color:var(--md-menu-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-menu-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-menu-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-menu-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-menu-item-one-line-container-height, 56px);padding-top:var(--md-menu-item-top-space, 12px);padding-bottom:var(--md-menu-item-bottom-space, 12px);padding-inline-start:var(--md-menu-item-leading-space, 16px);padding-inline-end:var(--md-menu-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-menu-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-menu-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-menu-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-menu-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-menu-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-menu-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-menu-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-menu-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-menu-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}.list-item{background-color:var(--md-menu-item-container-color, transparent)}.list-item.selected{background-color:var(--md-menu-item-selected-container-color, var(--md-sys-color-secondary-container, #e8def8))}.selected:not(.disabled) ::slotted(*){color:var(--md-menu-item-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b))}@media(forced-colors: active){:host([disabled]),:host([disabled]) slot{color:GrayText;opacity:1}.list-item{position:relative}.list-item.selected::before{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;border:3px double CanvasText}}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Dr=class extends G{};Dr.styles=[Ya];Dr=c([B("md-menu-item")],Dr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class ye extends S{get item(){return this.items[0]??null}get menu(){return this.menus[0]??null}constructor(){super(),this.anchorCorner=zt.START_END,this.menuCorner=zt.START_START,this.hoverOpenDelay=400,this.hoverCloseDelay=400,this.isSubMenu=!0,this.previousOpenTimeout=0,this.previousCloseTimeout=0,this.onMouseenter=()=>{clearTimeout(this.previousOpenTimeout),clearTimeout(this.previousCloseTimeout),!this.menu?.open&&(this.hoverOpenDelay?this.previousOpenTimeout=setTimeout(()=>{this.show()},this.hoverOpenDelay):this.show())},this.onMouseleave=()=>{clearTimeout(this.previousCloseTimeout),clearTimeout(this.previousOpenTimeout),this.hoverCloseDelay?this.previousCloseTimeout=setTimeout(()=>{this.close()},this.hoverCloseDelay):this.close()},this.addEventListener("mouseenter",this.onMouseenter),this.addEventListener("mouseleave",this.onMouseleave)}render(){return x`
      <slot
        name="item"
        @click=${this.onClick}
        @keydown=${this.onKeydown}
        @slotchange=${this.onSlotchange}>
      </slot>
      <slot
        name="menu"
        @keydown=${this.onSubMenuKeydown}
        @close-menu=${this.onCloseSubmenu}
        @slotchange=${this.onSlotchange}>
      </slot>
    `}firstUpdated(){this.onSlotchange()}async show(){const e=this.menu;if(!e||e.open)return;e.addEventListener("closed",()=>{this.item.ariaExpanded="false",this.dispatchEvent(ar()),this.dispatchEvent(ft()),e.ariaHidden="true"},{once:!0}),e.positioning==="document"&&(e.positioning="absolute"),e.quick=!0,e.hasOverflow=!0,e.anchorCorner=this.anchorCorner,e.menuCorner=this.menuCorner,e.anchorElement=this.item,e.defaultFocus="first-item",e.removeAttribute("aria-hidden"),e.skipRestoreFocus=!1;const t=e.open;if(e.show(),this.item.ariaExpanded="true",this.item.ariaHasPopup="menu",e.id&&this.item.setAttribute("aria-controls",e.id),this.dispatchEvent(ft()),this.dispatchEvent(Ma()),this.item.selected=!0,!t){let r=n=>{};const i=new Promise(n=>{r=n});e.addEventListener("opened",r,{once:!0}),await i}}async close(){const e=this.menu;if(!e||!e.open)return;this.dispatchEvent(ar()),e.quick=!0,e.close(),this.dispatchEvent(ft());let t=i=>{};const r=new Promise(i=>{t=i});e.addEventListener("closed",t,{once:!0}),await r}onSlotchange(){if(!this.item)return;this.item.ariaExpanded="false",this.item.ariaHasPopup="menu",this.menu?.id&&this.item.setAttribute("aria-controls",this.menu.id),this.item.keepOpen=!0;const e=this.menu;e&&(e.isSubmenu=!0,e.ariaHidden="true")}onClick(){this.show()}async onKeydown(e){const t=this.isSubmenuOpenKey(e.code);if(e.defaultPrevented)return;const r=t&&(ve.LEFT===e.code||ve.RIGHT===e.code);if((e.code===Ze.SPACE||r)&&(e.preventDefault(),r&&e.stopPropagation()),!t)return;const i=this.menu;if(!i)return;const n=i.items,a=Yt(n);if(a){await this.show(),a.tabIndex=0,a.focus();return}}onCloseSubmenu(e){const{itemPath:t,reason:r}=e.detail;if(t.push(this.item),this.dispatchEvent(ar()),r.kind===Pr.KEYDOWN&&r.key===zr.ESCAPE){e.stopPropagation(),this.item.dispatchEvent(Pa());return}this.dispatchEvent(ft())}async onSubMenuKeydown(e){if(e.defaultPrevented)return;const{close:t,keyCode:r}=this.isSubmenuCloseKey(e.code);t&&(e.preventDefault(),(r===ve.LEFT||r===ve.RIGHT)&&e.stopPropagation(),await this.close(),Ra(this.menu.items),this.item?.focus(),this.item.tabIndex=0,this.item.focus())}isSubmenuOpenKey(e){const r=getComputedStyle(this).direction==="rtl"?ve.LEFT:ve.RIGHT;switch(e){case r:case Ze.SPACE:case Ze.ENTER:return!0;default:return!1}}isSubmenuCloseKey(e){const r=getComputedStyle(this).direction==="rtl"?ve.RIGHT:ve.LEFT;switch(e){case r:case zr.ESCAPE:return{close:!0,keyCode:e};default:return{close:!1}}}}c([h({attribute:"anchor-corner"})],ye.prototype,"anchorCorner",void 0);c([h({attribute:"menu-corner"})],ye.prototype,"menuCorner",void 0);c([h({type:Number,attribute:"hover-open-delay"})],ye.prototype,"hoverOpenDelay",void 0);c([h({type:Number,attribute:"hover-close-delay"})],ye.prototype,"hoverCloseDelay",void 0);c([h({type:Boolean,reflect:!0,attribute:"md-sub-menu"})],ye.prototype,"isSubMenu",void 0);c([fe({slot:"item",flatten:!0})],ye.prototype,"items",void 0);c([fe({slot:"menu",flatten:!0})],ye.prototype,"menus",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ga=C`:host{position:relative;display:flex;flex-direction:column}
`;/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Nr=class extends ye{};Nr.styles=[Ga];Nr=c([B("md-sub-menu")],Nr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const vt=Symbol("isFocusable"),sr=Symbol("privateIsFocusable"),gt=Symbol("externalTabIndex"),bt=Symbol("isUpdatingTabIndex"),yt=Symbol("updateTabIndex");function Xa(o){var e,t,r;class i extends o{constructor(){super(...arguments),this[e]=!0,this[t]=null,this[r]=!1}get[vt](){return this[sr]}set[vt](a){this[vt]!==a&&(this[sr]=a,this[yt]())}connectedCallback(){super.connectedCallback(),this[yt]()}attributeChangedCallback(a,s,l){if(a!=="tabindex"){super.attributeChangedCallback(a,s,l);return}if(this.requestUpdate("tabIndex",Number(s??-1)),!this[bt]){if(!this.hasAttribute("tabindex")){this[gt]=null,this[yt]();return}this[gt]=this.tabIndex}}[(e=sr,t=gt,r=bt,yt)](){const a=this[vt]?0:-1,s=this[gt]??a;this[bt]=!0,this.tabIndex=s,this[bt]=!1}}return c([h({noAccessor:!0})],i.prototype,"tabIndex",void 0),i}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Za extends ho{computeValidity(e){this.radioElement||(this.radioElement=document.createElement("input"),this.radioElement.type="radio",this.radioElement.name="group");let t=!1,r=!1;for(const{checked:i,required:n}of e)n&&(t=!0),i&&(r=!0);return this.radioElement.checked=r,this.radioElement.required=t,{validity:{valueMissing:t&&!r},validationMessage:this.radioElement.validationMessage}}equals(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const i=e[r],n=t[r];if(i.checked!==n.checked||i.required!==n.required)return!1}return!0}copy(e){return e.map(({checked:t,required:r})=>({checked:t,required:r}))}}/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Ja{get controls(){const e=this.host.getAttribute("name");return!e||!this.root||!this.host.isConnected?[this.host]:Array.from(this.root.querySelectorAll(`[name="${e}"]`))}constructor(e){this.host=e,this.focused=!1,this.root=null,this.handleFocusIn=()=>{this.focused=!0,this.updateTabIndices()},this.handleFocusOut=()=>{this.focused=!1,this.updateTabIndices()},this.handleKeyDown=t=>{const r=t.key==="ArrowDown",i=t.key==="ArrowUp",n=t.key==="ArrowLeft",a=t.key==="ArrowRight";if(!n&&!a&&!r&&!i)return;const s=this.controls;if(!s.length)return;t.preventDefault();const d=getComputedStyle(this.host).direction==="rtl"?n||r:a||r,u=s.indexOf(this.host);let p=d?u+1:u-1;for(;p!==u;){p>=s.length?p=0:p<0&&(p=s.length-1);const f=s[p];if(f.hasAttribute("disabled")){d?p++:p--;continue}for(const v of s)v!==f&&(v.checked=!1,v.tabIndex=-1,v.blur());f.checked=!0,f.tabIndex=0,f.focus(),f.dispatchEvent(new Event("change",{bubbles:!0}));break}}}hostConnected(){this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("focusin",this.handleFocusIn),this.host.addEventListener("focusout",this.handleFocusOut),queueMicrotask(()=>{this.root=this.host.getRootNode(),this.host.checked&&this.uncheckSiblings(),this.updateTabIndices()})}hostDisconnected(){this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("focusin",this.handleFocusIn),this.host.removeEventListener("focusout",this.handleFocusOut),queueMicrotask(()=>{this.updateTabIndices(),this.root=null})}handleCheckedChange(){this.host.checked&&(this.uncheckSiblings(),this.updateTabIndices())}uncheckSiblings(){for(const e of this.controls)e!==this.host&&(e.checked=!1)}updateTabIndices(){const e=this.controls,t=e.find(r=>r.checked);if(t||this.focused){const r=t||this.host;r.tabIndex=0;for(const i of e)i!==r&&(i.tabIndex=-1);return}for(const r of e)r.tabIndex=0}}/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */var Go;const lr=Symbol("checked");let Qa=0;const es=co(uo(st(Xa(S))));class ct extends es{get checked(){return this[lr]}set checked(e){const t=this.checked;t!==e&&(this[lr]=e,this.requestUpdate("checked",t),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId=`cutout${++Qa}`,this[Go]=!1,this.required=!1,this.value="on",this.selectionController=new Ja(this),this.addController(this.selectionController),this[H].role="radio",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeydown.bind(this))}render(){const e={checked:this.checked};return x`
      <div class="container ${Q(e)}" aria-hidden="true">
        <md-ripple
          part="ripple"
          .control=${this}
          ?disabled=${this.disabled}></md-ripple>
        <md-focus-ring part="focus-ring" .control=${this}></md-focus-ring>
        <svg class="icon" viewBox="0 0 20 20">
          <mask id="${this.maskId}">
            <rect width="100%" height="100%" fill="white" />
            <circle cx="10" cy="10" r="8" fill="black" />
          </mask>
          <circle
            class="outer circle"
            cx="10"
            cy="10"
            r="10"
            mask="url(#${this.maskId})" />
          <circle class="inner circle" cx="10" cy="10" r="5" />
        </svg>

        <div class="touch-target"></div>
      </div>
    `}updated(){this[H].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(ao(e)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))))}async handleKeydown(e){await 0,!(e.key!==" "||e.defaultPrevented)&&this.click()}[(Go=lr,ze)](){return this.checked?this.value:null}[Pt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[rt](){return new Za(()=>this.selectionController?this.selectionController.controls:[this])}[ot](){return this.container}}c([h({type:Boolean})],ct.prototype,"checked",null);c([h({type:Boolean})],ct.prototype,"required",void 0);c([h()],ct.prototype,"value",void 0);c([L(".container")],ct.prototype,"container",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ts=C`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20px);outline:none;position:relative;vertical-align:top;width:var(--md-radio-icon-size, 20px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;--md-ripple-hover-color: var(--md-radio-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-radio-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-radio-pressed-state-layer-opacity, 0.12)}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-radio-icon-size, 20px))/2)}.container{display:flex;height:100%;place-content:center;place-items:center;width:100%}md-focus-ring{height:44px;inset:unset;width:44px}.checked{--md-ripple-hover-color: var(--md-radio-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-radio-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-radio-selected-pressed-state-layer-opacity, 0.12)}.touch-target{height:48px;position:absolute;width:48px}:host([touch-target=none]) .touch-target{display:none}md-ripple{border-radius:50%;height:var(--md-radio-state-layer-size, 40px);inset:unset;width:var(--md-radio-state-layer-size, 40px)}.icon{fill:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant, #49454f));inset:0;position:absolute}.outer.circle{transition:fill 50ms linear}.inner.circle{opacity:0;transform-origin:center;transition:opacity 50ms linear}.checked .icon{fill:var(--md-radio-selected-icon-color, var(--md-sys-color-primary, #6750a4))}.checked .inner.circle{animation:inner-circle-grow 300ms cubic-bezier(0.05, 0.7, 0.1, 1);opacity:1}@keyframes inner-circle-grow{from{transform:scale(0)}to{transform:scale(1)}}:host([disabled]) .circle{animation-duration:0s;transition-duration:0s}:host(:hover) .icon{fill:var(--md-radio-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:focus-within) .icon{fill:var(--md-radio-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:active) .icon{fill:var(--md-radio-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host([disabled]) .icon{fill:var(--md-radio-disabled-unselected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-unselected-icon-opacity, 0.38)}:host(:hover) .checked .icon{fill:var(--md-radio-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:focus-within) .checked .icon{fill:var(--md-radio-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:active) .checked .icon{fill:var(--md-radio-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4))}:host([disabled]) .checked .icon{fill:var(--md-radio-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon{fill:CanvasText}:host([disabled]) .icon{fill:GrayText;opacity:1}}}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Fr=class extends ct{};Fr.styles=[ts];Fr=c([B("md-radio")],Fr);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class P extends S{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.noAsterisk=!1,this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){const e=this.count??-1,t=this.max??-1;return e<0||t<=0?"":`${e} / ${t}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has("disabled")&&e.get("disabled")!==void 0&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get("focused"),wasPopulated:e.get("populated")}),super.update(e)}render(){const e=this.renderLabel(!0),t=this.renderLabel(!1),r=this.renderOutline?.(e),i={disabled:this.disabled,"disable-transitions":this.disableTransitions,error:this.error&&!this.disabled,focused:this.focused,"with-start":this.hasStart,"with-end":this.hasEnd,populated:this.populated,resizable:this.resizable,required:this.required,"no-label":!this.label};return x`
      <div class="field ${Q(i)}">
        <div class="container-overflow">
          ${this.renderBackground?.()}
          <slot name="container"></slot>
          ${this.renderStateLayer?.()} ${this.renderIndicator?.()} ${r}
          <div class="container">
            <div class="start">
              <slot name="start"></slot>
            </div>
            <div class="middle">
              <div class="label-wrapper">
                ${t} ${r?m:e}
              </div>
              <div class="content">
                <slot></slot>
              </div>
            </div>
            <div class="end">
              <slot name="end"></slot>
            </div>
          </div>
        </div>
        ${this.renderSupportingText()}
      </div>
    `}updated(e){(e.has("supportingText")||e.has("errorText")||e.has("count")||e.has("max"))&&this.updateSlottedAriaDescribedBy(),this.refreshErrorAlert&&requestAnimationFrame(()=>{this.refreshErrorAlert=!1}),this.disableTransitions&&requestAnimationFrame(()=>{this.disableTransitions=!1})}renderSupportingText(){const{supportingOrErrorText:e,counterText:t}=this;if(!e&&!t)return m;const r=x`<span>${e}</span>`,i=t?x`<span class="counter">${t}</span>`:m,a=this.error&&this.errorText&&!this.refreshErrorAlert?"alert":m;return x`
      <div class="supporting-text" role=${a}>${r}${i}</div>
      <slot
        name="aria-describedby"
        @slotchange=${this.updateSlottedAriaDescribedBy}></slot>
    `}updateSlottedAriaDescribedBy(){for(const e of this.slottedAriaDescribedBy)yi(x`${this.supportingOrErrorText} ${this.counterText}`,e),e.setAttribute("hidden","")}renderLabel(e){if(!this.label)return m;let t;e?t=this.focused||this.populated||this.isAnimating:t=!this.focused&&!this.populated&&!this.isAnimating;const r={hidden:!t,floating:e,resting:!e},i=`${this.label}${this.required&&!this.noAsterisk?"*":""}`;return x`
      <span class="label ${Q(r)}" aria-hidden=${!t}
        >${i}</span
      >
    `}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){if(!this.label)return;e??=this.focused,t??=this.populated;const r=e||t,i=this.focused||this.populated;r!==i&&(this.isAnimating=!0,this.labelAnimation?.cancel(),this.labelAnimation=this.floatingLabelEl?.animate(this.getLabelKeyframes(),{duration:150,easing:ae.STANDARD}),this.labelAnimation?.addEventListener("finish",()=>{this.isAnimating=!1}))}getLabelKeyframes(){const{floatingLabelEl:e,restingLabelEl:t}=this;if(!e||!t)return[];const{x:r,y:i,height:n}=e.getBoundingClientRect(),{x:a,y:s,height:l}=t.getBoundingClientRect(),d=e.scrollWidth,u=t.scrollWidth,p=u/d,f=a-r,v=s-i+Math.round((l-n*p)/2),g=`translateX(${f}px) translateY(${v}px) scale(${p})`,b="translateX(0) translateY(0) scale(1)",A=t.clientWidth,E=u>A?`${A/p}px`:"";return this.focused||this.populated?[{transform:g,width:E},{transform:b,width:E}]:[{transform:b,width:E},{transform:g,width:E}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}c([h({type:Boolean})],P.prototype,"disabled",void 0);c([h({type:Boolean})],P.prototype,"error",void 0);c([h({type:Boolean})],P.prototype,"focused",void 0);c([h()],P.prototype,"label",void 0);c([h({type:Boolean,attribute:"no-asterisk"})],P.prototype,"noAsterisk",void 0);c([h({type:Boolean})],P.prototype,"populated",void 0);c([h({type:Boolean})],P.prototype,"required",void 0);c([h({type:Boolean})],P.prototype,"resizable",void 0);c([h({attribute:"supporting-text"})],P.prototype,"supportingText",void 0);c([h({attribute:"error-text"})],P.prototype,"errorText",void 0);c([h({type:Number})],P.prototype,"count",void 0);c([h({type:Number})],P.prototype,"max",void 0);c([h({type:Boolean,attribute:"has-start"})],P.prototype,"hasStart",void 0);c([h({type:Boolean,attribute:"has-end"})],P.prototype,"hasEnd",void 0);c([fe({slot:"aria-describedby"})],P.prototype,"slottedAriaDescribedBy",void 0);c([F()],P.prototype,"isAnimating",void 0);c([F()],P.prototype,"refreshErrorAlert",void 0);c([F()],P.prototype,"disableTransitions",void 0);c([L(".label.floating")],P.prototype,"floatingLabelEl",void 0);c([L(".label.resting")],P.prototype,"restingLabelEl",void 0);c([L(".container")],P.prototype,"containerEl",void 0);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class rs extends P{renderOutline(e){return x`
      <div class="outline">
        <div class="outline-start"></div>
        <div class="outline-notch">
          <div class="outline-panel-inactive"></div>
          <div class="outline-panel-active"></div>
          <div class="outline-label">${e}</div>
        </div>
        <div class="outline-end"></div>
      </div>
    `}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const os=C`@layer styles{:host{--_bottom-space: var(--md-outlined-field-bottom-space, 16px);--_content-color: var(--md-outlined-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-outlined-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-outlined-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-outlined-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-space: var(--md-outlined-field-content-space, 16px);--_content-weight: var(--md-outlined-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-content-color: var(--md-outlined-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-outlined-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-outlined-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-outlined-field-disabled-leading-content-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-outlined-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-outlined-field-disabled-trailing-content-opacity, 0.38);--_error-content-color: var(--md-outlined-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-content-color: var(--md-outlined-field-error-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-outlined-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-outlined-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-content-color: var(--md-outlined-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-outlined-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-outlined-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-outlined-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-outlined-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-outlined-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-content-color: var(--md-outlined-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-outlined-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-outlined-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-content-color: var(--md-outlined-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-content-color: var(--md-outlined-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-outlined-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-outlined-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-padding-bottom: var(--md-outlined-field-label-text-padding-bottom, 8px);--_label-text-populated-line-height: var(--md-outlined-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-outlined-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-outlined-field-leading-space, 16px);--_outline-color: var(--md-outlined-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-label-padding: var(--md-outlined-field-outline-label-padding, 4px);--_outline-width: var(--md-outlined-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-outlined-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-outlined-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-outlined-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-outlined-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-outlined-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-outlined-field-top-space, 16px);--_trailing-content-color: var(--md-outlined-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-outlined-field-trailing-space, 16px);--_with-leading-content-leading-space: var(--md-outlined-field-with-leading-content-leading-space, 12px);--_with-trailing-content-trailing-space: var(--md-outlined-field-with-trailing-content-trailing-space, 12px);--_container-shape-start-start: var(--md-outlined-field-container-shape-start-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-field-container-shape-start-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-field-container-shape-end-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-field-container-shape-end-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)))}.outline{border-color:var(--_outline-color);border-radius:inherit;display:flex;pointer-events:none;height:100%;position:absolute;width:100%;z-index:1}.outline-start::before,.outline-start::after,.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after,.outline-end::before,.outline-end::after{border:inherit;content:"";inset:0;position:absolute}.outline-start,.outline-end{border:inherit;border-radius:inherit;box-sizing:border-box;position:relative}.outline-start::before,.outline-start::after,.outline-end::before,.outline-end::after{border-bottom-style:solid;border-top-style:solid}.outline-start::after,.outline-end::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-start::after,.focused .outline-end::after{opacity:1}.outline-start::before,.outline-start::after{border-inline-start-style:solid;border-inline-end-style:none;border-start-start-radius:inherit;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:0;margin-inline-end:var(--_outline-label-padding)}.outline-end{flex-grow:1;margin-inline-start:calc(-1*var(--_outline-label-padding))}.outline-end::before,.outline-end::after{border-inline-start-style:none;border-inline-end-style:solid;border-start-start-radius:0;border-start-end-radius:inherit;border-end-start-radius:0;border-end-end-radius:inherit}.outline-notch{align-items:flex-start;border:inherit;display:flex;margin-inline-start:calc(-1*var(--_outline-label-padding));margin-inline-end:var(--_outline-label-padding);max-width:calc(100% - var(--_leading-space) - var(--_trailing-space));padding:0 var(--_outline-label-padding);position:relative}.no-label .outline-notch{display:none}.outline-panel-inactive,.outline-panel-active{border:inherit;border-bottom-style:solid;inset:0;position:absolute}.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after{border-top-style:solid;border-bottom:none;bottom:auto;transform:scaleX(1);transition:transform 150ms cubic-bezier(0.2, 0, 0, 1)}.outline-panel-inactive::before,.outline-panel-active::before{right:50%;transform-origin:top left}.outline-panel-inactive::after,.outline-panel-active::after{left:50%;transform-origin:top right}.populated .outline-panel-inactive::before,.populated .outline-panel-inactive::after,.populated .outline-panel-active::before,.populated .outline-panel-active::after,.focused .outline-panel-inactive::before,.focused .outline-panel-inactive::after,.focused .outline-panel-active::before,.focused .outline-panel-active::after{transform:scaleX(0)}.outline-panel-active{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-panel-active{opacity:1}.outline-label{display:flex;max-width:100%;transform:translateY(calc(-100% + var(--_label-text-padding-bottom)))}.outline-start,.field:not(.with-start) .content ::slotted(*){padding-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-start) .label-wrapper{margin-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-end) .content ::slotted(*){padding-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.field:not(.with-end) .label-wrapper{margin-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.outline-start::before,.outline-end::before,.outline-panel-inactive,.outline-panel-inactive::before,.outline-panel-inactive::after{border-width:var(--_outline-width)}:hover .outline{border-color:var(--_hover-outline-color);color:var(--_hover-outline-color)}:hover .outline-start::before,:hover .outline-end::before,:hover .outline-panel-inactive,:hover .outline-panel-inactive::before,:hover .outline-panel-inactive::after{border-width:var(--_hover-outline-width)}.focused .outline{border-color:var(--_focus-outline-color);color:var(--_focus-outline-color)}.outline-start::after,.outline-end::after,.outline-panel-active,.outline-panel-active::before,.outline-panel-active::after{border-width:var(--_focus-outline-width)}.disabled .outline{border-color:var(--_disabled-outline-color);color:var(--_disabled-outline-color)}.disabled .outline-start,.disabled .outline-end,.disabled .outline-panel-inactive{opacity:var(--_disabled-outline-opacity)}.disabled .outline-start::before,.disabled .outline-end::before,.disabled .outline-panel-inactive,.disabled .outline-panel-inactive::before,.disabled .outline-panel-inactive::after{border-width:var(--_disabled-outline-width)}.error .outline{border-color:var(--_error-outline-color);color:var(--_error-outline-color)}.error:hover .outline{border-color:var(--_error-hover-outline-color);color:var(--_error-hover-outline-color)}.error.focused .outline{border-color:var(--_error-focus-outline-color);color:var(--_error-focus-outline-color)}.resizable .container{bottom:var(--_focus-outline-width);inset-inline-end:var(--_focus-outline-width);clip-path:inset(var(--_focus-outline-width) 0 0 var(--_focus-outline-width))}.resizable .container>*{top:var(--_focus-outline-width);inset-inline-start:var(--_focus-outline-width)}.resizable .container:dir(rtl){clip-path:inset(var(--_focus-outline-width) var(--_focus-outline-width) 0 0)}}@layer hcm{@media(forced-colors: active){.disabled .outline{border-color:GrayText;color:GrayText}.disabled :is(.outline-start,.outline-end,.outline-panel-inactive){opacity:1}}}
`;/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const is=C`:host{display:inline-flex;resize:both}.field{display:flex;flex:1;flex-direction:column;writing-mode:horizontal-tb;max-width:100%}.container-overflow{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:flex;height:100%;position:relative}.container{align-items:center;border-radius:inherit;display:flex;flex:1;max-height:100%;min-height:100%;min-width:min-content;position:relative}.field,.container-overflow{resize:inherit}.resizable:not(.disabled) .container{resize:inherit;overflow:hidden}.disabled{pointer-events:none}slot[name=container]{border-radius:inherit}slot[name=container]::slotted(*){border-radius:inherit;inset:0;pointer-events:none;position:absolute}@layer styles{.start,.middle,.end{display:flex;box-sizing:border-box;height:100%;position:relative}.start{color:var(--_leading-content-color)}.end{color:var(--_trailing-content-color)}.start,.end{align-items:center;justify-content:center}.with-start .start{margin-inline:var(--_with-leading-content-leading-space) var(--_content-space)}.with-end .end{margin-inline:var(--_content-space) var(--_with-trailing-content-trailing-space)}.middle{align-items:stretch;align-self:baseline;flex:1}.content{color:var(--_content-color);display:flex;flex:1;opacity:0;transition:opacity 83ms cubic-bezier(0.2, 0, 0, 1)}.no-label .content,.focused .content,.populated .content{opacity:1;transition-delay:67ms}:is(.disabled,.disable-transitions) .content{transition:none}.content ::slotted(*){all:unset;color:currentColor;font-family:var(--_content-font);font-size:var(--_content-size);line-height:var(--_content-line-height);font-weight:var(--_content-weight);width:100%;overflow-wrap:revert;white-space:revert}.content ::slotted(:not(textarea)){padding-top:var(--_top-space);padding-bottom:var(--_bottom-space)}.content ::slotted(textarea){margin-top:var(--_top-space);margin-bottom:var(--_bottom-space)}:hover .content{color:var(--_hover-content-color)}:hover .start{color:var(--_hover-leading-content-color)}:hover .end{color:var(--_hover-trailing-content-color)}.focused .content{color:var(--_focus-content-color)}.focused .start{color:var(--_focus-leading-content-color)}.focused .end{color:var(--_focus-trailing-content-color)}.disabled .content{color:var(--_disabled-content-color)}.disabled.no-label .content,.disabled.focused .content,.disabled.populated .content{opacity:var(--_disabled-content-opacity)}.disabled .start{color:var(--_disabled-leading-content-color);opacity:var(--_disabled-leading-content-opacity)}.disabled .end{color:var(--_disabled-trailing-content-color);opacity:var(--_disabled-trailing-content-opacity)}.error .content{color:var(--_error-content-color)}.error .start{color:var(--_error-leading-content-color)}.error .end{color:var(--_error-trailing-content-color)}.error:hover .content{color:var(--_error-hover-content-color)}.error:hover .start{color:var(--_error-hover-leading-content-color)}.error:hover .end{color:var(--_error-hover-trailing-content-color)}.error.focused .content{color:var(--_error-focus-content-color)}.error.focused .start{color:var(--_error-focus-leading-content-color)}.error.focused .end{color:var(--_error-focus-trailing-content-color)}}@layer hcm{@media(forced-colors: active){.disabled :is(.start,.content,.end){color:GrayText;opacity:1}}}@layer styles{.label{box-sizing:border-box;color:var(--_label-text-color);overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;z-index:1;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);width:min-content}.label-wrapper{inset:0;pointer-events:none;position:absolute}.label.resting{position:absolute;top:var(--_top-space)}.label.floating{font-size:var(--_label-text-populated-size);line-height:var(--_label-text-populated-line-height);transform-origin:top left}.label.hidden{opacity:0}.no-label .label{display:none}.label-wrapper{inset:0;position:absolute;text-align:initial}:hover .label{color:var(--_hover-label-text-color)}.focused .label{color:var(--_focus-label-text-color)}.disabled .label{color:var(--_disabled-label-text-color)}.disabled .label:not(.hidden){opacity:var(--_disabled-label-text-opacity)}.error .label{color:var(--_error-label-text-color)}.error:hover .label{color:var(--_error-hover-label-text-color)}.error.focused .label{color:var(--_error-focus-label-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .label:not(.hidden){color:GrayText;opacity:1}}}@layer styles{.supporting-text{color:var(--_supporting-text-color);display:flex;font-family:var(--_supporting-text-font);font-size:var(--_supporting-text-size);line-height:var(--_supporting-text-line-height);font-weight:var(--_supporting-text-weight);gap:16px;justify-content:space-between;padding-inline-start:var(--_supporting-text-leading-space);padding-inline-end:var(--_supporting-text-trailing-space);padding-top:var(--_supporting-text-top-space)}.supporting-text :nth-child(2){flex-shrink:0}:hover .supporting-text{color:var(--_hover-supporting-text-color)}.focus .supporting-text{color:var(--_focus-supporting-text-color)}.disabled .supporting-text{color:var(--_disabled-supporting-text-color);opacity:var(--_disabled-supporting-text-opacity)}.error .supporting-text{color:var(--_error-supporting-text-color)}.error:hover .supporting-text{color:var(--_error-hover-supporting-text-color)}.error.focus .supporting-text{color:var(--_error-focus-supporting-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .supporting-text{color:GrayText;opacity:1}}}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let qr=class extends rs{};qr.styles=[is,os];qr=c([B("md-outlined-field")],qr);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ns=C`:host{--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-outlined-text-field-container-shape-start-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-text-field-container-shape-start-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-text-field-container-shape-end-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-text-field-container-shape-end-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_icon-input-space: var(--md-outlined-text-field-icon-input-space, 16px);--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_with-leading-icon-leading-space: var(--md-outlined-text-field-with-leading-icon-leading-space, 12px);--_with-trailing-icon-trailing-space: var(--md-outlined-text-field-with-trailing-icon-trailing-space, 12px);--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-space: var(--_icon-input-space);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space);--md-outlined-field-with-leading-content-leading-space: var(--_with-leading-icon-leading-space);--md-outlined-field-with-trailing-content-trailing-space: var(--_with-trailing-icon-trailing-space)}
`;/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const as=o=>o.strings===void 0,ss={},ls=(o,e=ss)=>o._$AH=e;/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Xo=io(class extends no{constructor(o){if(super(o),o.type!==ge.PROPERTY&&o.type!==ge.ATTRIBUTE&&o.type!==ge.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!as(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[e]){if(e===Z||e===m)return e;const t=o.element,r=o.name;if(o.type===ge.PROPERTY){if(e===t[r])return Z}else if(o.type===ge.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return Z}else if(o.type===ge.ATTRIBUTE&&t.getAttribute(r)===e+"")return Z;return ls(o),e}});/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const cs={fromAttribute(o){return o??""},toAttribute(o){return o||null}};/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Hr=Symbol("onReportValidity"),xt=Symbol("privateCleanupFormListeners"),_t=Symbol("privateDoNotReportInvalid"),wt=Symbol("privateIsSelfReportingValidity"),kt=Symbol("privateCallOnReportValidity");function ds(o){var e,t,r;class i extends o{constructor(...a){super(...a),this[e]=new AbortController,this[t]=!1,this[r]=!1,this.addEventListener("invalid",s=>{this[_t]||!s.isTrusted||this.addEventListener("invalid",()=>{this[kt](s)},{once:!0})},{capture:!0})}checkValidity(){this[_t]=!0;const a=super.checkValidity();return this[_t]=!1,a}reportValidity(){this[wt]=!0;const a=super.reportValidity();return a&&this[kt](null),this[wt]=!1,a}[(e=xt,t=_t,r=wt,kt)](a){const s=a?.defaultPrevented;s||(this[Hr](a),!(!s&&a?.defaultPrevented))||(this[wt]||ps(this[H].form,this))&&this.focus()}[Hr](a){throw new Error("Implement [onReportValidity]")}formAssociatedCallback(a){super.formAssociatedCallback&&super.formAssociatedCallback(a),this[xt].abort(),a&&(this[xt]=new AbortController,us(this,a,()=>{this[kt](null)},this[xt].signal))}}return i}function us(o,e,t,r){const i=hs(e);let n=!1,a,s=!1;i.addEventListener("before",()=>{s=!0,a=new AbortController,n=!1,o.addEventListener("invalid",()=>{n=!0},{signal:a.signal})},{signal:r}),i.addEventListener("after",()=>{s=!1,a?.abort(),!n&&t()},{signal:r}),e.addEventListener("submit",()=>{s||t()},{signal:r})}const cr=new WeakMap;function hs(o){if(!cr.has(o)){const e=new EventTarget;cr.set(o,e);for(const t of["reportValidity","requestSubmit"]){const r=o[t];o[t]=function(){e.dispatchEvent(new Event("before"));const i=Reflect.apply(r,this,arguments);return e.dispatchEvent(new Event("after")),i}}}return cr.get(o)}function ps(o,e){if(!o)return!0;let t;for(const r of o.elements)if(r.matches(":invalid")){t=r;break}return t===e}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class ms extends ho{computeValidity({state:e,renderedControl:t}){let r=t;Fe(e)&&!r?(r=this.inputControl||document.createElement("input"),this.inputControl=r):r||(r=this.textAreaControl||document.createElement("textarea"),this.textAreaControl=r);const i=Fe(e)?r:null;if(i&&(i.type=e.type),r.value!==e.value&&(r.value=e.value),r.required=e.required,i){const n=e;n.pattern?i.pattern=n.pattern:i.removeAttribute("pattern"),n.min?i.min=n.min:i.removeAttribute("min"),n.max?i.max=n.max:i.removeAttribute("max"),n.step?i.step=n.step:i.removeAttribute("step")}return(e.minLength??-1)>-1?r.setAttribute("minlength",String(e.minLength)):r.removeAttribute("minlength"),(e.maxLength??-1)>-1?r.setAttribute("maxlength",String(e.maxLength)):r.removeAttribute("maxlength"),{validity:r.validity,validationMessage:r.validationMessage}}equals({state:e},{state:t}){const r=e.type===t.type&&e.value===t.value&&e.required===t.required&&e.minLength===t.minLength&&e.maxLength===t.maxLength;return!Fe(e)||!Fe(t)?r:r&&e.pattern===t.pattern&&e.min===t.min&&e.max===t.max&&e.step===t.step}copy({state:e}){return{state:Fe(e)?this.copyInput(e):this.copyTextArea(e),renderedControl:null}}copyInput(e){const{type:t,pattern:r,min:i,max:n,step:a}=e;return{...this.copySharedState(e),type:t,pattern:r,min:i,max:n,step:a}}copyTextArea(e){return{...this.copySharedState(e),type:e.type}}copySharedState({value:e,required:t,minLength:r,maxLength:i}){return{value:e,required:t,minLength:r,maxLength:i}}}function Fe(o){return o.type!=="textarea"}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const fs=Ce(ds(co(uo(st(S)))));class w extends fs{constructor(){super(...arguments),this.error=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.required=!1,this.value="",this.prefixText="",this.suffixText="",this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText="",this.textDirection="",this.rows=2,this.cols=20,this.inputMode="",this.max="",this.maxLength=-1,this.min="",this.minLength=-1,this.noSpinner=!1,this.pattern="",this.placeholder="",this.readOnly=!1,this.multiple=!1,this.step="",this.type="text",this.autocomplete="",this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText=""}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(e){this.getInputOrTextarea().selectionDirection=e}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(e){this.getInputOrTextarea().selectionEnd=e}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(e){this.getInputOrTextarea().selectionStart=e}get valueAsNumber(){const e=this.getInput();return e?e.valueAsNumber:NaN}set valueAsNumber(e){const t=this.getInput();t&&(t.valueAsNumber=e,this.value=t.value)}get valueAsDate(){const e=this.getInput();return e?e.valueAsDate:null}set valueAsDate(e){const t=this.getInput();t&&(t.valueAsDate=e,this.value=t.value)}get hasError(){return this.error||this.nativeError}select(){this.getInputOrTextarea().select()}setRangeText(...e){this.getInputOrTextarea().setRangeText(...e),this.value=this.getInputOrTextarea().value}setSelectionRange(e,t,r){this.getInputOrTextarea().setSelectionRange(e,t,r)}showPicker(){const e=this.getInput();e&&e.showPicker()}stepDown(e){const t=this.getInput();t&&(t.stepDown(e),this.value=t.value)}stepUp(e){const t=this.getInput();t&&(t.stepUp(e),this.value=t.value)}reset(){this.dirty=!1,this.value=this.getAttribute("value")??"",this.nativeError=!1,this.nativeErrorText=""}attributeChangedCallback(e,t,r){e==="value"&&this.dirty||super.attributeChangedCallback(e,t,r)}render(){const e={disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:this.type==="textarea","no-spinner":this.noSpinner};return x`
      <span class="text-field ${Q(e)}">
        ${this.renderField()}
      </span>
    `}updated(e){const t=this.getInputOrTextarea().value;this.value!==t&&(this.value=t)}renderField(){return po`<${this.fieldTag}
      class="field"
      count=${this.value.length}
      ?disabled=${this.disabled}
      ?error=${this.hasError}
      error-text=${this.getErrorText()}
      ?focused=${this.focused}
      ?has-end=${this.hasTrailingIcon}
      ?has-start=${this.hasLeadingIcon}
      label=${this.label}
      ?no-asterisk=${this.noAsterisk}
      max=${this.maxLength}
      ?populated=${!!this.value}
      ?required=${this.required}
      ?resizable=${this.type==="textarea"}
      supporting-text=${this.supportingText}
    >
      ${this.renderLeadingIcon()}
      ${this.renderInputOrTextarea()}
      ${this.renderTrailingIcon()}
      <div id="description" slot="aria-describedby"></div>
      <slot name="container" slot="container"></slot>
    </${this.fieldTag}>`}renderLeadingIcon(){return x`
      <span class="icon leading" slot="start">
        <slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
      </span>
    `}renderTrailingIcon(){return x`
      <span class="icon trailing" slot="end">
        <slot name="trailing-icon" @slotchange=${this.handleIconChange}></slot>
      </span>
    `}renderInputOrTextarea(){const e={direction:this.textDirection},t=this.ariaLabel||this.label||m,r=this.autocomplete,i=(this.maxLength??-1)>-1,n=(this.minLength??-1)>-1;if(this.type==="textarea")return x`
        <textarea
          class="input"
          style=${Or(e)}
          aria-describedby="description"
          aria-invalid=${this.hasError}
          aria-label=${t}
          autocomplete=${r||m}
          name=${this.name||m}
          ?disabled=${this.disabled}
          maxlength=${i?this.maxLength:m}
          minlength=${n?this.minLength:m}
          placeholder=${this.placeholder||m}
          ?readonly=${this.readOnly}
          ?required=${this.required}
          rows=${this.rows}
          cols=${this.cols}
          .value=${Xo(this.value)}
          @change=${this.redispatchEvent}
          @focus=${this.handleFocusChange}
          @blur=${this.handleFocusChange}
          @input=${this.handleInput}
          @select=${this.redispatchEvent}></textarea>
      `;const a=this.renderPrefix(),s=this.renderSuffix(),l=this.inputMode;return x`
      <div class="input-wrapper">
        ${a}
        <input
          class="input"
          style=${Or(e)}
          aria-describedby="description"
          aria-invalid=${this.hasError}
          aria-label=${t}
          autocomplete=${r||m}
          name=${this.name||m}
          ?disabled=${this.disabled}
          inputmode=${l||m}
          max=${this.max||m}
          maxlength=${i?this.maxLength:m}
          min=${this.min||m}
          minlength=${n?this.minLength:m}
          pattern=${this.pattern||m}
          placeholder=${this.placeholder||m}
          ?readonly=${this.readOnly}
          ?required=${this.required}
          ?multiple=${this.multiple}
          step=${this.step||m}
          type=${this.type}
          .value=${Xo(this.value)}
          @change=${this.redispatchEvent}
          @focus=${this.handleFocusChange}
          @blur=${this.handleFocusChange}
          @input=${this.handleInput}
          @select=${this.redispatchEvent} />
        ${s}
      </div>
    `}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?x`<span class="${Q({suffix:t,prefix:!t})}">${e}</span>`:m}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){this.focused=this.inputOrTextarea?.matches(":focus")??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){lo(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return this.type==="textarea"?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[ze](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[rt](){return new ms(()=>({state:this,renderedControl:this.inputOrTextarea}))}[ot](){return this.inputOrTextarea}[Hr](e){e?.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}}w.shadowRootOptions={...S.shadowRootOptions,delegatesFocus:!0};c([h({type:Boolean,reflect:!0})],w.prototype,"error",void 0);c([h({attribute:"error-text"})],w.prototype,"errorText",void 0);c([h()],w.prototype,"label",void 0);c([h({type:Boolean,attribute:"no-asterisk"})],w.prototype,"noAsterisk",void 0);c([h({type:Boolean,reflect:!0})],w.prototype,"required",void 0);c([h()],w.prototype,"value",void 0);c([h({attribute:"prefix-text"})],w.prototype,"prefixText",void 0);c([h({attribute:"suffix-text"})],w.prototype,"suffixText",void 0);c([h({type:Boolean,attribute:"has-leading-icon"})],w.prototype,"hasLeadingIcon",void 0);c([h({type:Boolean,attribute:"has-trailing-icon"})],w.prototype,"hasTrailingIcon",void 0);c([h({attribute:"supporting-text"})],w.prototype,"supportingText",void 0);c([h({attribute:"text-direction"})],w.prototype,"textDirection",void 0);c([h({type:Number})],w.prototype,"rows",void 0);c([h({type:Number})],w.prototype,"cols",void 0);c([h({reflect:!0})],w.prototype,"inputMode",void 0);c([h()],w.prototype,"max",void 0);c([h({type:Number})],w.prototype,"maxLength",void 0);c([h()],w.prototype,"min",void 0);c([h({type:Number})],w.prototype,"minLength",void 0);c([h({type:Boolean,attribute:"no-spinner"})],w.prototype,"noSpinner",void 0);c([h()],w.prototype,"pattern",void 0);c([h({reflect:!0,converter:cs})],w.prototype,"placeholder",void 0);c([h({type:Boolean,reflect:!0})],w.prototype,"readOnly",void 0);c([h({type:Boolean,reflect:!0})],w.prototype,"multiple",void 0);c([h()],w.prototype,"step",void 0);c([h({reflect:!0})],w.prototype,"type",void 0);c([h({reflect:!0})],w.prototype,"autocomplete",void 0);c([F()],w.prototype,"dirty",void 0);c([F()],w.prototype,"focused",void 0);c([F()],w.prototype,"nativeError",void 0);c([F()],w.prototype,"nativeErrorText",void 0);c([L(".input")],w.prototype,"inputOrTextarea",void 0);c([L(".field")],w.prototype,"field",void 0);c([fe({slot:"leading-icon"})],w.prototype,"leadingIcons",void 0);c([fe({slot:"trailing-icon"})],w.prototype,"trailingIcons",void 0);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class vs extends w{constructor(){super(...arguments),this.fieldTag=ke`md-outlined-field`}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const gs=C`:host{display:inline-flex;outline:none;resize:both;text-align:start;-webkit-tap-highlight-color:rgba(0,0,0,0)}.text-field,.field{width:100%}.text-field{display:inline-flex}.field{cursor:text}.disabled .field{cursor:default}.text-field,.textarea .field{resize:inherit}slot[name=container]{border-radius:inherit}.icon{color:currentColor;display:flex;align-items:center;justify-content:center;fill:currentColor;position:relative}.icon ::slotted(*){display:flex;position:absolute}[has-start] .icon.leading{font-size:var(--_leading-icon-size);height:var(--_leading-icon-size);width:var(--_leading-icon-size)}[has-end] .icon.trailing{font-size:var(--_trailing-icon-size);height:var(--_trailing-icon-size);width:var(--_trailing-icon-size)}.input-wrapper{display:flex}.input-wrapper>*{all:inherit;padding:0}.input{caret-color:var(--_caret-color);overflow-x:hidden;text-align:inherit}.input::placeholder{color:currentColor;opacity:1}.input::-webkit-calendar-picker-indicator{display:none}.input::-webkit-search-decoration,.input::-webkit-search-cancel-button{display:none}@media(forced-colors: active){.input{background:none}}.no-spinner .input::-webkit-inner-spin-button,.no-spinner .input::-webkit-outer-spin-button{display:none}.no-spinner .input[type=number]{-moz-appearance:textfield}:focus-within .input{caret-color:var(--_focus-caret-color)}.error:focus-within .input{caret-color:var(--_error-focus-caret-color)}.text-field:not(.disabled) .prefix{color:var(--_input-text-prefix-color)}.text-field:not(.disabled) .suffix{color:var(--_input-text-suffix-color)}.text-field:not(.disabled) .input::placeholder{color:var(--_input-text-placeholder-color)}.prefix,.suffix{text-wrap:nowrap;width:min-content}.prefix{padding-inline-end:var(--_input-text-prefix-trailing-space)}.suffix{padding-inline-start:var(--_input-text-suffix-leading-space)}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Ur=class extends vs{constructor(){super(...arguments),this.fieldTag=ke`md-outlined-field`}};Ur.styles=[gs,ns];Ur=c([B("md-outlined-text-field")],Ur);let bs=0;function zi(o){return`${o}_callback_${Date.now()}_${bs++}`}function _(o,e={}){return new Promise((t,r)=>{const i=zi("exec");window[i]=(a,s,l)=>{t({errno:a,stdout:s,stderr:l}),n(i)};function n(a){delete window[a]}try{typeof ksu<"u"?ksu.exec(o,JSON.stringify(e),i):t({errno:1,stdout:"",stderr:"ksu is not defined"})}catch(a){r(a),n(i)}})}class dr{constructor(){this.listeners={}}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}emit(e,...t){this.listeners[e]&&this.listeners[e].forEach(r=>r(...t))}}function Y(o,e=[],t={}){const r={listeners:{},stdout:new dr,stderr:new dr,stdin:new dr,on(n,a){this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(a)},emit(n,...a){this.listeners[n]&&this.listeners[n].forEach(s=>s(...a))}},i=zi("spawn");window[i]=r,r.on("exit",()=>delete window[i]);try{typeof ksu<"u"?ksu.spawn(o,JSON.stringify(e),JSON.stringify(t),i):setTimeout(()=>{r.stderr.emit("data","ksu is not defined"),r.emit("exit",1)},0)}catch(n){r.emit("error",n),delete window[i]}return r}function Me(o){typeof ksu<"u"?ksu.toast(o):console.log(o)}async function Zo(o="all"){const t={all:()=>globalThis.ksu?.listAllPackages(),user:()=>globalThis.ksu?.listUserPackages(),system:()=>globalThis.ksu?.listSystemPackages()}[o];if(typeof t=="function")try{return JSON.parse(t())}catch{}return new Promise((r,i)=>{const n={all:[],user:["-3"],system:["-s"]};if(!(o in n))return i(new Error(`Unknown listPackages type: ${o}`));let a=[],s="";const l=Y("pm",["list","packages",...n[o]]);l.stdout.on("data",d=>{d.trim()!==""&&a.push(d.trim().replace(/^package:/,""))}),l.stderr.on("data",d=>s+=d),l.on("exit",d=>{if(d!==0)return i(new Error(`pm process exited with code ${d}: ${s.trim()}`));r(a)}),l.on("error",d=>{i(d)})})}function ys(o){return new Promise((e,t)=>{if(!o)return e([]);if(typeof globalThis.ksu?.getPackagesInfo!="function")return t(new Error("ksu.getPackagesInfo is not available."));const r=Array.isArray(o)?o:[o];if(r.length===0)return e([]);try{const i=ksu.getPackagesInfo(JSON.stringify(r)),n=JSON.parse(i);!Array.isArray(o)&&n.length===1?e(n[0]):e(n)}catch(i){t(new Error(`Failed to get package info: ${i.message}`))}})}function xs(o,e=100){return new Promise((t,r)=>{if(!o)return t([]);if(typeof globalThis.ksu?.getPackagesIcons!="function")return r(new Error("ksu.getPackagesIcons is not available."));const i=Array.isArray(o)?o:[o];if(i.length===0)return t([]);try{const n=ksu.getPackagesIcons(JSON.stringify(i),e),a=JSON.parse(n);!Array.isArray(o)&&a.length===1?t(a[0]):t(a)}catch(n){r(new Error(`Failed to get package icon: ${n.message}`))}})}class Jo extends Event{_wxOrigin;_wxData;get wxOrigin(){return this._wxOrigin}set wxOrigin(e){this._wxOrigin=e}get wx(){return this._wxData}set wx(e){this._wxData=e}constructor(e){super(e,{bubbles:!0,cancelable:!0,composed:!0})}}var _s={cordova:!1};class vo{_initialized=!1;_handlers=new WeakMap;_eventTypes;get eventTypes(){return this._eventTypes}constructor(e=_s){this._initialized||(this._initialized=!0,this._eventTypes={WX_ON_BACK:e.cordova?"backbutton":"back",WX_ON_RESUME:"resume",WX_ON_REFRESH:"refresh",WX_ON_PAUSE:"pause",WX_ON_KEYBOARD:"keyboard",WX_ON_INSETS:"insets"},window.addEventListener("message",t=>{try{if(typeof t.data!="string")return;let r=JSON.parse(t.data);if(!r?.type)return;let i=this._eventTypes[r.type]??r.type;this._dispatch(window,i,r)}catch(r){console.error("[WXEvent] Message error:",r)}}))}_dispatch(e,t,r){let i=new Jo(t);i.wx=r.data,i.wxOrigin="system",e.dispatchEvent(i)}on(e,t,r){this._initialized||new vo;let i=a=>{if(!(a instanceof Jo)){console.warn("[WXEvent] Event is not a WXEvent:",a);return}a.wxOrigin==="system"&&(typeof r=="function"?r(a):r&&typeof r.handleEvent=="function"&&r.handleEvent(a))};this._handlers.has(e)||this._handlers.set(e,new Map);let n=this._handlers.get(e);return n.has(t)||n.set(t,new Set),n.get(t).add({handler:r,wrapper:i}),e.addEventListener(t,i),()=>this.off(e,t,r)}off(e,t,r){let i=this._handlers.get(e);if(i?.has(t)){for(let n of i.get(t))if(n.handler===r){e.removeEventListener(t,n.wrapper),i.get(t).delete(n);break}}}}var Bi={chunkSize:1048576,headers:{"Content-Type":"application/octet-stream"}};async function ws(o,e={}){let t={...Bi,...e};return new Promise((r,i)=>{let n;try{if(n=o,!n)throw new Error("Failed to open file input stream")}catch(d){i(d);return}let a=()=>{try{n?.close()}catch(d){console.error("Error during abort cleanup:",d)}i(new DOMException("The operation was aborted.","AbortError"))};if(t.signal){if(t.signal.aborted){a();return}t.signal.addEventListener("abort",a)}let s=new ReadableStream({async pull(d){try{let u=ks(n,t.chunkSize);if(!u){d.close(),l();return}d.enqueue(u)}catch(u){l(),d.error(u),i(new Error(`Error reading file chunk: ${u}`))}},cancel(d){console.warn("Stream canceled:",d),l()}});function l(){try{t.signal&&t.signal.removeEventListener("abort",a),n?.close()}catch(d){console.error(`Error during cleanup: ${d}`)}}r(s)})}function ks(o,e){try{let t=e?o.readChunk(e):o.read();if(typeof t=="number")return new Uint8Array([t]);if(typeof t=="string"){let r=JSON.parse(t);return r&&Array.isArray(r)&&r.length>0?new Uint8Array(r):null}return null}catch(t){throw new Error("Error reading chunk data: "+t)}}async function Es(o,e={}){let t={...Bi,...e};try{let r=await ws(o,t);return new Response(r,t)}catch(r){throw new Error(`wrapInputStream failed: ${r}`)}}const $s=document.getElementById("app-template").content,se=document.getElementById("apps-list"),it=document.getElementById("update-card");let Je=[];async function Mi(){await _("cat /data/adb/tricky_store/target.txt").then(({errno:a,stdout:s})=>{a===0?Je=Qo(s):typeof ksu>"u"?Je=Qo(`com.example.one
com.example.two!
com.example.three?`):Me("Failed to read target.txt!")});let o={};try{o=(await(await fetch("applist.json")).json()).reduce((l,d)=>(l[d.package_name]=d.app_name,l),{})}catch(a){typeof ksu>"u"?o={"com.example.one":"One","com.example.two":"Two","com.example.three":"Three"}:(console.warn("Failed to fetch applist.json:",a),o={})}let e=[],t=[];const r=await _('cat "/data/adb/tricky_store/system_app" || true'),[i,n]=await Promise.all([Zo("user").catch(()=>[]),Zo("system").catch(()=>[])]);t.push(...i),r.stdout.split(`
`).forEach(a=>{a&&n.includes(a)&&t.push(a)}),t=Array.from(new Set(t)),typeof ksu>"u"&&(t=["com.example.one","com.example.two","com.example.three","com.example.four","com.example.five","com.example.six"]),e=await Promise.all(t.map(async a=>{if(o[a]&&o[a].trim()!=="")return{appName:o[a].trim(),packageName:a};try{return{appName:(await ys(a)).appLabel,packageName:a}}catch{return typeof $packageManager<"u"?{appName:$packageManager.getApplicationInfo(a,0,0).getLabel(),packageName:a}:new Promise(l=>{const d=Y("sh",[`${I}/common/get_extra.sh`,"--appname",a],{env:{PATH:`$PATH:${I}/common/bin:/data/data/com.termux/files/usr/bin`}});d.stdout.on("data",u=>{l({appName:u.trim()===""?a:u.trim(),packageName:a})}),d.on("exit",u=>{u!==0&&l({appName:a,packageName:a})})})}})),As(e)}function As(o){const e=o.sort((i,n)=>{const a=Je.includes(i.packageName),s=Je.includes(n.packageName);return a!==s?a?-1:1:(i.appName||"").localeCompare(n.appName||"")});se.innerHTML="",an.style.display="none",document.querySelector(".floating-btn").classList.remove("hide"),it&&se.appendChild(it);let t=!1;(typeof $packageManager<"u"||typeof ksu<"u"&&typeof ksu.getPackagesIcons=="function")&&(t=!0);const r=i=>{if(i>=e.length){document.querySelector(".uninstall-container").style.display="flex",Ss(),Rs(),Di(),Ul(),t&&Cs();return}const{appName:n,packageName:a}=e[i],s=document.importNode($s,!0);s.querySelector(".content").setAttribute("data-package",a);const d=s.querySelector(".name");d.setAttribute("for",`checkbox-${a}`),d.innerHTML=`
            <div class="app-icon-container" style="display:${t?"flex":"none"};">
                <div class="loader" data-package="${a}"></div>
                <img class="app-icon" data-package="${a}" />
            </div>
            <div class="app-info">
                <div class="app-name">${n}</div>
                <div class="package-name">${a}</div>
            </div>
        `;const u=s.querySelector("md-checkbox");u.id=`checkbox-${a}`,Je.includes(a)&&(u.checked=!0,s.querySelector(".card").classList.add("selected")),se.appendChild(s),r(i+1)};r(0)}function Cs(){const o=new IntersectionObserver(t=>{t.forEach(r=>{if(r.isIntersecting){const i=r.target,n=i.querySelector(".app-icon").getAttribute("data-package");n&&(Ts(n),o.unobserve(i))}})},{rootMargin:"100px",threshold:.1});document.querySelectorAll(".app-icon-container").forEach(t=>{o.observe(t)})}const Et=new Map;function Ts(o){const e=document.querySelector(`.app-icon[data-package="${o}"]`),t=document.querySelector(`.loader[data-package="${o}"]`);if(Et.has(o))e.src=Et.get(o),t.style.display="none",e.style.opacity="1";else if(typeof ksu.getPackagesIcons=="function")xs(o,100).then(r=>{Et.set(o,r.icon),e.src=r.icon,t.style.display="none",e.style.opacity="1"}).catch(r=>{console.error("Failed to load icon:",r),t.style.display="none"});else if(typeof $packageManager<"u"){const r=$packageManager.getApplicationIcon(o,0,0);Es(r).then(i=>i.arrayBuffer()).then(i=>{const n="data:image/png;base64,"+Is(i);Et.set(o,n),e.src=n,t.style.display="none",e.style.opacity="1"})}}function Is(o){const e=new Uint8Array(o);let t="";return e.forEach(r=>t+=String.fromCharCode(r)),btoa(t)}function Qo(o){return pe.length=0,me.length=0,o.split(`
`).map(t=>{const r=t.trim();return r.endsWith("!")?pe.push(r.slice(0,-1)):r.endsWith("?")&&me.push(r.slice(0,-1)),r.replace(/[!?]/g,"")}).filter(t=>t.trim()!=="")}let ur=!1;function Ss(){se.querySelectorAll(".card").forEach(e=>{const t=e.querySelector(".checkbox");e.onclick=()=>{ur||(t.checked=!t.checked,e.classList.toggle("selected"))}}),document.querySelectorAll("md-menu").forEach(e=>{e.dataset.closeListener||(e.addEventListener("closing",()=>ur=!0),e.addEventListener("closed",()=>ur=!1),e.dataset.closeListener="true")})}function Rs(){const o=document.getElementById("mode-dialog"),e=document.getElementById("mode-dialog-appname");let t,r=null;function i(u){r=u;const p=u.getAttribute("data-package"),f=u.querySelector(".app-name"),v=f?f.textContent:p;e.innerHTML=`${v}<br>${p}`;const g=pe.includes(p),b=me.includes(p);document.getElementById("mode-default").checked=!g&&!b,document.getElementById("mode-generate").checked=g,document.getElementById("mode-hack").checked=b,o.show()}function n(u){if(!r||!u){o.close(),r=null;return}const p=r.getAttribute("data-package"),f=pe.indexOf(p);f>-1&&pe.splice(f,1);const v=me.indexOf(p);v>-1&&me.splice(v,1),u==="generate"?pe.push(p):u==="hack"&&me.push(p),Di(),r=null,setTimeout(()=>o.close(),200)}const a=document.getElementById("mode-default"),s=document.getElementById("mode-generate"),l=document.getElementById("mode-hack");a.addEventListener("click",()=>n("normal")),s.addEventListener("click",()=>n("generate")),l.addEventListener("click",()=>n("hack")),document.getElementById("mode-cancel").addEventListener("click",()=>n()),se.querySelectorAll(".card").forEach(u=>{u.addEventListener("pointerdown",p=>{const f=u.querySelector("md-checkbox");f&&f.checked&&(t=setTimeout(()=>i(u),500))}),u.addEventListener("pointerup",()=>clearTimeout(t)),u.addEventListener("pointercancel",()=>clearTimeout(t))})}function Di(){se.querySelectorAll(".card").forEach(e=>{const t=e.getAttribute("data-package"),r=e.querySelector("md-checkbox");r.classList.remove("checkbox-checked-generate","checkbox-checked-hack"),pe.includes(t)?r.classList.add("checkbox-checked-generate"):me.includes(t)?r.classList.add("checkbox-checked-hack"):r.checked&&r.classList.remove("checkbox-checked-generate","checkbox-checked-hack")})}const $t=document.getElementById("language-menu"),Ls=["ar","fa","he","ur","ps","sd","ku","yi","dv"];let Ee={},At={},Ct=["en"],Ni={};function ei(o){const r=new DOMParser().parseFromString(o,"text/xml").getElementsByTagName("string"),i={};for(let n=0;n<r.length;n++){const a=r[n],s=a.getAttribute("name"),l=a.textContent;i[s]=l}return i}async function Os(){const o=navigator.language||navigator.userLanguage,e=o.split("-")[0];try{const r=await(await fetch("locales/languages.json")).json();Ct=Object.keys(r),Ni=r;const i=localStorage.getItem("trickyAddonLanguage");return i!=="default"&&Ct.includes(i)?i:Ct.includes(o)?o:Ct.includes(e)?e:(localStorage.removeItem("trickyAddonLanguage"),"en")}catch(t){return console.error("Error detecting user language:",t),"en"}}async function Ps(){try{const e=await(await fetch("./locales/strings/en.xml")).text();At=ei(e);const t=await Os();if(t!=="en"){const n=await(await fetch(`locales/strings/${t}.xml`)).text(),a=ei(n);Ee={...At,...a}}else Ee=At;const r=Ls.includes(t.split("-")[0]);document.documentElement.setAttribute("dir",r?"rtl":"ltr"),await Bs()}catch(o){console.error("Error loading translations:",o),Ee=At}zs()}function zs(){document.querySelectorAll("[data-i18n]").forEach(o=>{const e=o.getAttribute("data-i18n"),t=Ee[e];t&&(o.hasAttribute("placeholder")?o.setAttribute("placeholder",t):o.hasAttribute("label")?o.setAttribute("label",t):o.textContent=t)})}function ti(o){localStorage.setItem("trickyAddonLanguage",o),window.location.reload()}async function Bs(){$t.innerHTML="";const o=document.createElement("md-menu-item");o.className="top-inset",o.setAttribute("data-i18n","system_default"),o.onclick=()=>ti("default"),$t.appendChild(o),Object.entries(Ni).map(([r,i])=>({lang:r,name:i})).sort((r,i)=>r.name.localeCompare(i.name)).forEach(({lang:r,name:i})=>{const n=document.createElement("md-menu-item");n.textContent=i,n.onclick=()=>ti(r),$t.appendChild(n)});const t=document.createElement("md-menu-item");t.className="bottom-inset",t.textContent=Ee.more_language,t.onclick=()=>Jt("https://github.com/KOWX712/Tricky-Addon-Update-Target-List/blob/main/module/webui/locales/GUIDE.md"),$t.appendChild(t)}let Bt;const J=document.getElementById("file-selector-dialog");let D="/storage/emulated/0/Download";function Fi(){const o=J.querySelector(".current-path"),e=D.split("/").filter(Boolean),t=e.map((r,i)=>`<span class="path-segment" data-path="${"/"+e.slice(0,i+1).join("/")}">${r}</span>`).join('<span class="separator">›</span>');o.innerHTML=t,o.scrollTo({left:o.scrollWidth,behavior:"smooth"})}async function Gt(o,e=!1){const t=J.querySelector(".file-list");e||(t.classList.add("switching"),await new Promise(i=>setTimeout(i,150)));const r=await _(`
        cd "${o}"
        find . -maxdepth 1 -type f -name "*.${Bt}" -o -type d ! -name ".*" -o -type l | sort
    `);if(r.errno===0){const i=r.stdout.split(`
`).filter(Boolean).map(n=>({path:o+"/"+n.replace(/^\.\//,""),name:n.split("/").pop(),isDirectory:!n.endsWith("."+Bt)}));if(t.innerHTML="",D!=="/storage/emulated/0"){const n=document.createElement("div");n.className="file-item",n.innerHTML=`
                <md-ripple></md-ripple>
                <md-icon>folder</md-icon>
                <span>..</span>
            `,n.addEventListener("click",()=>{J.querySelector(".back-button").click()}),t.appendChild(n)}i.forEach(n=>{if(n.path===o)return;const a=document.createElement("div");a.className="file-item",a.innerHTML=`
                <md-ripple></md-ripple>
                <md-icon>${n.isDirectory?"folder":"description"}</md-icon>
                <span>${n.name}</span>
            `,a.addEventListener("click",async()=>{if(n.isDirectory){D=n.path;const s=document.querySelector(".current-path");s.innerHTML=D.split("/").filter(Boolean).join('<span class="separator">›</span>'),s.scrollTo({left:s.scrollWidth,behavior:"smooth"}),await Gt(n.path)}}),t.appendChild(a)}),e||t.classList.remove("switching")}else console.error("Error listing files:",r.stderr),e||t.classList.remove("switching");Fi()}J.querySelector(".current-path").addEventListener("click",async o=>{const e=o.target.closest(".path-segment");if(!e)return;const t=e.dataset.path;if(!t||t===D)return;const r=e.textContent;(r==="storage"||r==="emulated")&&D==="/storage/emulated/0"||(t.split("/").length<=3?D="/storage/emulated/0":D=t,Fi(),await Gt(D))});J.querySelector(".back-button").addEventListener("click",async()=>{if(D==="/storage/emulated/0")return;D=D.split("/").slice(0,-1).join("/"),D===""&&(D="/storage/emulated/0");const o=J.querySelector(".current-path");o.innerHTML=D.split("/").filter(Boolean).join('<span class="separator">›</span>'),o.scrollTo({left:o.scrollWidth,behavior:"smooth"}),await Gt(D)});J.querySelector(".close-selector").addEventListener("click",()=>J.close());async function Ms(o){Bt=o,D="/storage/emulated/0/Download",J.show();const e=J.querySelector(".current-path");return e.innerHTML=D.split("/").filter(Boolean).join('<span class="separator">›</span>'),e.scrollTo({left:e.scrollWidth,behavior:"smooth"}),await Gt(D,!0),new Promise((t,r)=>{J.querySelector(".file-list").addEventListener("click",n=>{const a=n.target.closest(".file-item");a&&a.querySelector("span").textContent.endsWith("."+Bt)&&_(`cat "${D}/${a.querySelector("span").textContent}"`).then(({errno:s,stdout:l,stderr:d})=>{s===0?t(l):r(d),J.close()})})})}function qi(o){document.querySelectorAll("md-checkbox").forEach(e=>{const t=e.closest(".card");t&&t.style.display!=="none"&&(e.checked=o,t.classList.toggle("selected",o))})}document.querySelector(".menu-item-button-container").addEventListener("click",o=>{document.getElementById("menu-options").close()});document.getElementById("select-all").onclick=()=>qi(!0);document.getElementById("deselect-all").onclick=()=>qi(!1);document.getElementById("select-denylist").onclick=()=>{_(`magisk --denylist ls 2>/dev/null | awk -F'|' '{print $1}' | grep -v "isolated" | sort -u`).then(({errno:o,stdout:e})=>{if(o===0){const t=e.split(`
`).map(r=>r.trim()).filter(Boolean);document.querySelectorAll(".card").forEach(r=>{const i=r.getAttribute("data-package");t.includes(i)&&(r.querySelector("md-checkbox").checked=!0,r.classList.add("selected"))}),_('touch "/data/adb/tricky_store/target_from_denylist"')}else Me("Failed to read DenyList!")})};document.getElementById("deselect-unnecessary").onclick=async()=>{try{const o=await fetch("https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/more-exclude.json").then(e=>{if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return e.json()}).catch(async()=>fetch("https://hub.gitmirror.com/raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/more-exclude.json").then(e=>{if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return e.json()})).then(e=>e.data.flatMap(t=>t.apps).map(t=>t["package-name"]).join(`
`)).catch(e=>{throw Me("Failed to download unnecessary apps!"),e});_(`sh ${I}/common/get_extra.sh --xposed`).then(({stdout:e})=>{const t=o.split(`
`).map(r=>r.trim()).filter(Boolean).concat(e.split(`
`).map(r=>r.trim()).filter(Boolean));document.querySelectorAll(".card").forEach(r=>{const i=r.getAttribute("data-package");t.includes(i)&&(r.querySelector("md-checkbox").checked=!1,r.classList.remove("selected"))})})}catch(o){Me("Failed to get unnecessary apps!"),console.error("Failed to get unnecessary apps:",o)}};async function Ds(){const o=document.getElementById("add-system-app-dialog");document.getElementById("add-system-app").onclick=()=>{e(),o.show()},document.getElementById("add-system-app-button").onclick=async()=>{const t=document.getElementById("system-app-input"),r=t.value.trim();r&&_(`pm list packages -s | grep -q ${r}`).then(({errno:i})=>{i!==0?y("prompt_system_app_not_found",!1):(_(`
                            touch "/data/adb/tricky_store/system_app"
                            echo "${r}" >> "/data/adb/tricky_store/system_app"
                            echo "${r}" >> "/data/adb/tricky_store/target.txt"
                        `),t.value="",o.close(),Ht())})},document.getElementById("cancel-add-system-app").onclick=()=>o.close();async function e(){const t=document.querySelector(".current-system-app-list"),r=document.querySelector(".current-system-app-list-content");r.innerHTML="";const{errno:i,stdout:n}=await _(`[ -f "/data/adb/tricky_store/system_app" ] && cat "/data/adb/tricky_store/system_app" | sed '/^#/d; /^$/d'`);i!==0||n.trim()===""?t.style.display="none":n.split(`
`).forEach(a=>{a.trim()!==""&&(r.innerHTML+=`
                        <div class="system-app-item">
                            <span>${a}</span>
                            <md-filled-icon-button class="remove-system-app-button">
                                <md-icon>delete</md-icon>
                            </md-filled-icon-button>
                        </div>
                    `)}),document.querySelectorAll(".remove-system-app-button").forEach(a=>{a.onclick=()=>{const s=a.closest(".system-app-item").querySelector("span").textContent;_(`
                    sed -i "/${s}/d" "/data/adb/tricky_store/system_app"
                    sed -i "/${s}/d" "/data/adb/tricky_store/target.txt"
                `).then(()=>{o.close(),Ht()})}})}}document.querySelectorAll(".sub-menu-entry").forEach(o=>{const e=o.parentElement;o.addEventListener("click",t=>{t.stopPropagation(),e.open?e.close():e.show()}),e.querySelector("md-menu").addEventListener("opening",()=>e.open=!0),e.querySelector("md-menu").addEventListener("closing",()=>e.open=!1)});async function go(o){const{errno:e}=await _(`
        mv -f /data/adb/tricky_store/keybox.xml /data/adb/tricky_store/keybox.xml.bak 2>/dev/null
        cat << 'KB_EOF' > /data/adb/tricky_store/keybox.xml
${o}
KB_EOF
        chmod 644 /data/adb/tricky_store/keybox.xml
    `);return e===0}async function Ns(){const{stdout:o}=await _(`xxd -r -p ${I}/common/.default | base64 -d`),e=await go(o);y(e?"prompt_aosp_key_set":"prompt_key_set_error",e)}document.getElementById("aospkb").onclick=Ns;async function Fs(o,e){fetch(o).then(t=>{if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return t.text()}).catch(async()=>fetch(e).then(t=>{if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return t.text()})).then(async t=>{if(!t.trim()){y("prompt_no_valid",!1);return}try{const r=new Uint8Array(t.match(/.{1,2}/g).map(s=>parseInt(s,16))),i=new TextDecoder().decode(r),n=atob(i);if(await go(n))y("prompt_valid_key_set");else throw new Error("Failed to copy valid keybox")}catch{throw new Error("Failed to decode keybox data")}}).catch(async t=>{y("prompt_no_internet",!1)})}document.getElementById("devicekb").onclick=async()=>{Y("sh",[`${I}/common/get_extra.sh`,"--unknown-kb"],{cwd:"/data/local/tmp",env:{PATH:`${I}/common/bin:$PATH`}}).on("exit",e=>{y(e===0?"prompt_unknown_key_set":"prompt_key_set_error",e===0)})};document.getElementById("validkb").onclick=()=>{Fs("https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/.extra","https://hub.gitmirror.com/raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/.extra")};document.getElementById("customkb").onclick=async()=>{try{const o=await Ms("xml"),e=await go(o);y(e?"prompt_custom_key_set":"prompt_key_set_error",e)}catch{y("prompt_key_set_error",!1)}};const Hi=document.getElementById("help-dialog");document.getElementById("help").onclick=()=>Hi.show();document.getElementById("close-help").onclick=()=>Hi.close();const le=document.getElementById("search"),bo=document.getElementById("search-button"),qs=document.getElementById("clear-btn"),Hs=document.getElementById("menu-button"),ri=document.getElementById("menu-options");bo.onclick=()=>{le.classList.add("show"),le.focus()};le.addEventListener("focus",()=>{bo.style.pointerEvents="none",document.querySelectorAll(".search-bg").forEach(o=>{o.classList.add("hide")})});le.addEventListener("blur",()=>{le.value===""&&(le.classList.remove("show"),bo.style.pointerEvents="auto",document.querySelectorAll(".search-bg").forEach(o=>{o.classList.remove("hide")}))});le.addEventListener("input",o=>{const e=o.target.value.toLowerCase();se.querySelectorAll(".card").forEach(r=>{const i=r.querySelector(".name").textContent.toLowerCase();r.style.display=i.includes(e)?"flex":"none",window.scrollTo(0,0)})});qs.addEventListener("click",()=>{le.value="",le.blur(),window.scrollTo(0,0),se.querySelectorAll(".card").forEach(e=>e.style.display="flex")});Hs.addEventListener("click",()=>{ri.open=!ri.open});function yo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Te=yo();function Ui(o){Te=o}var Qe={exec:()=>null};function k(o,e=""){let t=typeof o=="string"?o:o.source,r={replace:(i,n)=>{let a=typeof n=="string"?n:n.source;return a=a.replace(j.caret,"$1"),t=t.replace(i,a),r},getRegex:()=>new RegExp(t,e)};return r}var j={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o=>new RegExp(`^( {0,3}${o})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}#`),htmlBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}<(?:[a-z].*>|!--)`,"i")},Us=/^(?:[ \t]*(?:\n|$))+/,Vs=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ws=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,dt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,js=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xo=/(?:[*+-]|\d{1,9}[.)])/,Vi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wi=k(Vi).replace(/bull/g,xo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ks=k(Vi).replace(/bull/g,xo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_o=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ys=/^[^\n]+/,wo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Gs=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xs=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xo).getRegex(),Xt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ko=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zs=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",ko).replace("tag",Xt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ji=k(_o).replace("hr",dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt).getRegex(),Js=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ji).getRegex(),Eo={blockquote:Js,code:Vs,def:Gs,fences:Ws,heading:js,hr:dt,html:Zs,lheading:Wi,list:Xs,newline:Us,paragraph:ji,table:Qe,text:Ys},oi=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt).getRegex(),Qs={...Eo,lheading:Ks,table:oi,paragraph:k(_o).replace("hr",dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",oi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt).getRegex()},el={...Eo,html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ko).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Qe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(_o).replace("hr",dt).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Wi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ki=/^( {2,}|\\)\n(?!\s*$)/,ol=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Zt=/[\p{P}\p{S}]/u,$o=/[\s\p{P}\p{S}]/u,Yi=/[^\s\p{P}\p{S}]/u,il=k(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,$o).getRegex(),Gi=/(?!~)[\p{P}\p{S}]/u,nl=/(?!~)[\s\p{P}\p{S}]/u,al=/(?:[^\s\p{P}\p{S}]|~)/u,sl=k(/link|code|html/,"g").replace("link",new RegExp("\\[(?:[^\\[\\]`]|(?<!`)(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("code",new RegExp("(?<!`)(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html",/<(?! )[^<>]*?>/).getRegex(),Xi=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ll=k(Xi,"u").replace(/punct/g,Zt).getRegex(),cl=k(Xi,"u").replace(/punct/g,Gi).getRegex(),Zi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",dl=k(Zi,"gu").replace(/notPunctSpace/g,Yi).replace(/punctSpace/g,$o).replace(/punct/g,Zt).getRegex(),ul=k(Zi,"gu").replace(/notPunctSpace/g,al).replace(/punctSpace/g,nl).replace(/punct/g,Gi).getRegex(),hl=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yi).replace(/punctSpace/g,$o).replace(/punct/g,Zt).getRegex(),pl=k(/\\(punct)/,"gu").replace(/punct/g,Zt).getRegex(),ml=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),fl=k(ko).replace("(?:-->|$)","-->").getRegex(),vl=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",fl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Mt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gl=k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Mt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ji=k(/^!?\[(label)\]\[(ref)\]/).replace("label",Mt).replace("ref",wo).getRegex(),Qi=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",wo).getRegex(),bl=k("reflink|nolink(?!\\()","g").replace("reflink",Ji).replace("nolink",Qi).getRegex(),ii=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ao={_backpedal:Qe,anyPunctuation:pl,autolink:ml,blockSkip:sl,br:Ki,code:rl,del:Qe,emStrongLDelim:ll,emStrongRDelimAst:dl,emStrongRDelimUnd:hl,escape:tl,link:gl,nolink:Qi,punctuation:il,reflink:Ji,reflinkSearch:bl,tag:vl,text:ol,url:Qe},yl={...Ao,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",Mt).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Mt).getRegex()},Vr={...Ao,emStrongRDelimAst:ul,emStrongLDelim:cl,url:k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ii).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ii).getRegex()},xl={...Vr,br:k(Ki).replace("{2,}","*").getRegex(),text:k(Vr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Tt={normal:Eo,gfm:Qs,pedantic:el},qe={normal:Ao,gfm:Vr,breaks:xl,pedantic:yl},_l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ni=o=>_l[o];function ne(o,e){if(e){if(j.escapeTest.test(o))return o.replace(j.escapeReplace,ni)}else if(j.escapeTestNoEncode.test(o))return o.replace(j.escapeReplaceNoEncode,ni);return o}function ai(o){try{o=encodeURI(o).replace(j.percentDecode,"%")}catch{return null}return o}function si(o,e){let t=o.replace(j.findPipe,(n,a,s)=>{let l=!1,d=a;for(;--d>=0&&s[d]==="\\";)l=!l;return l?"|":" |"}),r=t.split(j.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(j.slashPipe,"|");return r}function He(o,e,t){let r=o.length;if(r===0)return"";let i=0;for(;i<r&&o.charAt(r-i-1)===e;)i++;return o.slice(0,r-i)}function wl(o,e){if(o.indexOf(e[1])===-1)return-1;let t=0;for(let r=0;r<o.length;r++)if(o[r]==="\\")r++;else if(o[r]===e[0])t++;else if(o[r]===e[1]&&(t--,t<0))return r;return t>0?-2:-1}function li(o,e,t,r,i){let n=e.href,a=e.title||null,s=o[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:o[0].charAt(0)==="!"?"image":"link",raw:t,href:n,title:a,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}function kl(o,e,t){let r=o.match(t.other.indentCodeCompensation);if(r===null)return e;let i=r[1];return e.split(`
`).map(n=>{let a=n.match(t.other.beginningSpace);if(a===null)return n;let[s]=a;return s.length>=i.length?n.slice(i.length):n}).join(`
`)}var Dt=class{options;rules;lexer;constructor(o){this.options=o||Te}space(o){let e=this.rules.block.newline.exec(o);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(o){let e=this.rules.block.code.exec(o);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:He(t,`
`)}}}fences(o){let e=this.rules.block.fences.exec(o);if(e){let t=e[0],r=kl(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(o){let e=this.rules.block.heading.exec(o);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let r=He(t,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(t=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(o){let e=this.rules.block.hr.exec(o);if(e)return{type:"hr",raw:He(e[0],`
`)}}blockquote(o){let e=this.rules.block.blockquote.exec(o);if(e){let t=He(e[0],`
`).split(`
`),r="",i="",n=[];for(;t.length>0;){let a=!1,s=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))s.push(t[l]),a=!0;else if(!a)s.push(t[l]);else break;t=t.slice(l);let d=s.join(`
`),u=d.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
${d}`:d,i=i?`${i}
${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=p,t.length===0)break;let f=n.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let v=f,g=v.raw+`
`+t.join(`
`),b=this.blockquote(g);n[n.length-1]=b,r=r.substring(0,r.length-v.raw.length)+b.raw,i=i.substring(0,i.length-v.text.length)+b.text;break}else if(f?.type==="list"){let v=f,g=v.raw+`
`+t.join(`
`),b=this.list(g);n[n.length-1]=b,r=r.substring(0,r.length-f.raw.length)+b.raw,i=i.substring(0,i.length-v.raw.length)+b.raw,t=g.substring(n.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:r,tokens:n,text:i}}}list(o){let e=this.rules.block.list.exec(o);if(e){let t=e[1].trim(),r=t.length>1,i={type:"list",raw:"",ordered:r,start:r?+t.slice(0,-1):"",loose:!1,items:[]};t=r?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=r?t:"[*+-]");let n=this.rules.other.listItemRegex(t),a=!1;for(;o;){let l=!1,d="",u="";if(!(e=n.exec(o))||this.rules.block.hr.test(o))break;d=e[0],o=o.substring(d.length);let p=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),f=o.split(`
`,1)[0],v=!p.trim(),g=0;if(this.options.pedantic?(g=2,u=p.trimStart()):v?g=e[1].length+1:(g=e[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=p.slice(g),g+=e[1].length),v&&this.rules.other.blankLine.test(f)&&(d+=f+`
`,o=o.substring(f.length+1),l=!0),!l){let T=this.rules.other.nextBulletRegex(g),E=this.rules.other.hrRegex(g),z=this.rules.other.fencesBeginRegex(g),N=this.rules.other.headingBeginRegex(g),R=this.rules.other.htmlBeginRegex(g);for(;o;){let X=o.split(`
`,1)[0],K;if(f=X,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting,"  "),K=f):K=f.replace(this.rules.other.tabCharGlobal,"    "),z.test(f)||N.test(f)||R.test(f)||T.test(f)||E.test(f))break;if(K.search(this.rules.other.nonSpaceChar)>=g||!f.trim())u+=`
`+K.slice(g);else{if(v||p.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||z.test(p)||N.test(p)||E.test(p))break;u+=`
`+f}!v&&!f.trim()&&(v=!0),d+=X+`
`,o=o.substring(X.length+1),p=K.slice(g)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(a=!0));let b=null,A;this.options.gfm&&(b=this.rules.other.listIsTask.exec(u),b&&(A=b[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:d,task:!!b,checked:A,loose:!1,text:u,tokens:[]}),i.raw+=d}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;l<i.items.length;l++)if(this.lexer.state.top=!1,i.items[l].tokens=this.lexer.blockTokens(i.items[l].text,[]),!i.loose){let d=i.items[l].tokens.filter(p=>p.type==="space"),u=d.length>0&&d.some(p=>this.rules.other.anyLine.test(p.raw));i.loose=u}if(i.loose)for(let l=0;l<i.items.length;l++)i.items[l].loose=!0;return i}}html(o){let e=this.rules.block.html.exec(o);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(o){let e=this.rules.block.def.exec(o);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(o){let e=this.rules.block.table.exec(o);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=si(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?n.align.push("right"):this.rules.other.tableAlignCenter.test(a)?n.align.push("center"):this.rules.other.tableAlignLeft.test(a)?n.align.push("left"):n.align.push(null);for(let a=0;a<t.length;a++)n.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:n.align[a]});for(let a of i)n.rows.push(si(a,n.header.length).map((s,l)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:n.align[l]})));return n}}lheading(o){let e=this.rules.block.lheading.exec(o);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(o){let e=this.rules.block.paragraph.exec(o);if(e){let t=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(o){let e=this.rules.block.text.exec(o);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(o){let e=this.rules.inline.escape.exec(o);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(o){let e=this.rules.inline.tag.exec(o);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(o){let e=this.rules.inline.link.exec(o);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let n=He(t.slice(0,-1),"\\");if((t.length-n.length)%2===0)return}else{let n=wl(e[2],"()");if(n===-2)return;if(n>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(r);n&&(r=n[1],i=n[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r=r.slice(1):r=r.slice(1,-1)),li(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(o,e){let t;if((t=this.rules.inline.reflink.exec(o))||(t=this.rules.inline.nolink.exec(o))){let r=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[r.toLowerCase()];if(!i){let n=t[0].charAt(0);return{type:"text",raw:n,text:n}}return li(t,i,t[0],this.lexer,this.rules)}}emStrong(o,e,t=""){let r=this.rules.inline.emStrongLDelim.exec(o);if(!(!r||r[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!t||this.rules.inline.punctuation.exec(t))){let i=[...r[0]].length-1,n,a,s=i,l=0,d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*o.length+i);(r=d.exec(e))!=null;){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(a=[...n].length,r[3]||r[4]){s+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){l+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+l);let u=[...r[0]][0].length,p=o.slice(0,i+r.index+u+a);if(Math.min(i,a)%2){let v=p.slice(1,-1);return{type:"em",raw:p,text:v,tokens:this.lexer.inlineTokens(v)}}let f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(o){let e=this.rules.inline.code.exec(o);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(o){let e=this.rules.inline.br.exec(o);if(e)return{type:"br",raw:e[0]}}del(o){let e=this.rules.inline.del.exec(o);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(o){let e=this.rules.inline.autolink.exec(o);if(e){let t,r;return e[2]==="@"?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(o){let e;if(e=this.rules.inline.url.exec(o)){let t,r;if(e[2]==="@")t=e[0],r="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(o){let e=this.rules.inline.text.exec(o);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},te=class Wr{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Te,this.options.tokenizer=this.options.tokenizer||new Dt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:j,block:Tt.normal,inline:qe.normal};this.options.pedantic?(t.block=Tt.pedantic,t.inline=qe.pedantic):this.options.gfm&&(t.block=Tt.gfm,this.options.breaks?t.inline=qe.breaks:t.inline=qe.gfm),this.tokenizer.rules=t}static get rules(){return{block:Tt,inline:qe}}static lex(e,t){return new Wr(t).lex(e)}static lexInline(e,t){return new Wr(t).inlineTokens(e)}lex(e){e=e.replace(j.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let r=this.inlineQueue[t];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){for(this.options.pedantic&&(e=e.replace(j.tabCharGlobal,"    ").replace(j.spaceLine,""));e;){let i;if(this.options.extensions?.block?.some(a=>(i=a.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let a=t.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+i.raw,a.text+=`
`+i.text,this.inlineQueue.at(-1).src=a.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+i.raw,a.text+=`
`+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let n=e;if(this.options.extensions?.startBlock){let a=1/0,s=e.slice(1),l;this.options.extensions.startBlock.forEach(d=>{l=d.call({lexer:this},s),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(n=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n))){let a=t.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+i.raw,a.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(i),r=n.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let a=t.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+i.raw,a.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(i);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r=e,i=null;if(this.tokens.links){let s=Object.keys(this.tokens.links);if(s.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let n=!1,a="";for(;e;){n||(a=""),n=!1;let s;if(this.options.extensions?.inline?.some(d=>(s=d.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);let d=t.at(-1);s.type==="text"&&d?.type==="text"?(d.raw+=s.raw,d.text+=s.text):t.push(s);continue}if(s=this.tokenizer.emStrong(e,r,a)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.del(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),t.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),t.push(s);continue}let l=e;if(this.options.extensions?.startInline){let d=1/0,u=e.slice(1),p;this.options.extensions.startInline.forEach(f=>{p=f.call({lexer:this},u),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(l=e.substring(0,d+1))}if(s=this.tokenizer.inlineText(l)){e=e.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(a=s.raw.slice(-1)),n=!0;let d=t.at(-1);d?.type==="text"?(d.raw+=s.raw,d.text+=s.text):t.push(s);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return t}},Nt=class{options;parser;constructor(o){this.options=o||Te}space(o){return""}code({text:o,lang:e,escaped:t}){let r=(e||"").match(j.notSpaceStart)?.[0],i=o.replace(j.endingNewline,"")+`
`;return r?'<pre><code class="language-'+ne(r)+'">'+(t?i:ne(i,!0))+`</code></pre>
`:"<pre><code>"+(t?i:ne(i,!0))+`</code></pre>
`}blockquote({tokens:o}){return`<blockquote>
${this.parser.parse(o)}</blockquote>
`}html({text:o}){return o}def(o){return""}heading({tokens:o,depth:e}){return`<h${e}>${this.parser.parseInline(o)}</h${e}>
`}hr(o){return`<hr>
`}list(o){let e=o.ordered,t=o.start,r="";for(let a=0;a<o.items.length;a++){let s=o.items[a];r+=this.listitem(s)}let i=e?"ol":"ul",n=e&&t!==1?' start="'+t+'"':"";return"<"+i+n+`>
`+r+"</"+i+`>
`}listitem(o){let e="";if(o.task){let t=this.checkbox({checked:!!o.checked});o.loose?o.tokens[0]?.type==="paragraph"?(o.tokens[0].text=t+" "+o.tokens[0].text,o.tokens[0].tokens&&o.tokens[0].tokens.length>0&&o.tokens[0].tokens[0].type==="text"&&(o.tokens[0].tokens[0].text=t+" "+ne(o.tokens[0].tokens[0].text),o.tokens[0].tokens[0].escaped=!0)):o.tokens.unshift({type:"text",raw:t+" ",text:t+" ",escaped:!0}):e+=t+" "}return e+=this.parser.parse(o.tokens,!!o.loose),`<li>${e}</li>
`}checkbox({checked:o}){return"<input "+(o?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:o}){return`<p>${this.parser.parseInline(o)}</p>
`}table(o){let e="",t="";for(let i=0;i<o.header.length;i++)t+=this.tablecell(o.header[i]);e+=this.tablerow({text:t});let r="";for(let i=0;i<o.rows.length;i++){let n=o.rows[i];t="";for(let a=0;a<n.length;a++)t+=this.tablecell(n[a]);r+=this.tablerow({text:t})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+r+`</table>
`}tablerow({text:o}){return`<tr>
${o}</tr>
`}tablecell(o){let e=this.parser.parseInline(o.tokens),t=o.header?"th":"td";return(o.align?`<${t} align="${o.align}">`:`<${t}>`)+e+`</${t}>
`}strong({tokens:o}){return`<strong>${this.parser.parseInline(o)}</strong>`}em({tokens:o}){return`<em>${this.parser.parseInline(o)}</em>`}codespan({text:o}){return`<code>${ne(o,!0)}</code>`}br(o){return"<br>"}del({tokens:o}){return`<del>${this.parser.parseInline(o)}</del>`}link({href:o,title:e,tokens:t}){let r=this.parser.parseInline(t),i=ai(o);if(i===null)return r;o=i;let n='<a href="'+o+'"';return e&&(n+=' title="'+ne(e)+'"'),n+=">"+r+"</a>",n}image({href:o,title:e,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));let i=ai(o);if(i===null)return ne(t);o=i;let n=`<img src="${o}" alt="${t}"`;return e&&(n+=` title="${ne(e)}"`),n+=">",n}text(o){return"tokens"in o&&o.tokens?this.parser.parseInline(o.tokens):"escaped"in o&&o.escaped?o.text:ne(o.text)}},Co=class{strong({text:o}){return o}em({text:o}){return o}codespan({text:o}){return o}del({text:o}){return o}html({text:o}){return o}text({text:o}){return o}link({text:o}){return""+o}image({text:o}){return""+o}br(){return""}},re=class jr{options;renderer;textRenderer;constructor(e){this.options=e||Te,this.options.renderer=this.options.renderer||new Nt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Co}static parse(e,t){return new jr(t).parse(e)}static parseInline(e,t){return new jr(t).parseInline(e)}parse(e,t=!0){let r="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let s=n,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){r+=l||"";continue}}let a=n;switch(a.type){case"space":{r+=this.renderer.space(a);continue}case"hr":{r+=this.renderer.hr(a);continue}case"heading":{r+=this.renderer.heading(a);continue}case"code":{r+=this.renderer.code(a);continue}case"table":{r+=this.renderer.table(a);continue}case"blockquote":{r+=this.renderer.blockquote(a);continue}case"list":{r+=this.renderer.list(a);continue}case"html":{r+=this.renderer.html(a);continue}case"def":{r+=this.renderer.def(a);continue}case"paragraph":{r+=this.renderer.paragraph(a);continue}case"text":{let s=a,l=this.renderer.text(s);for(;i+1<e.length&&e[i+1].type==="text";)s=e[++i],l+=`
`+this.renderer.text(s);t?r+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):r+=l;continue}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}parseInline(e,t=this.renderer){let r="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let s=this.options.extensions.renderers[n.type].call({parser:this},n);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){r+=s||"";continue}}let a=n;switch(a.type){case"escape":{r+=t.text(a);break}case"html":{r+=t.html(a);break}case"link":{r+=t.link(a);break}case"image":{r+=t.image(a);break}case"strong":{r+=t.strong(a);break}case"em":{r+=t.em(a);break}case"codespan":{r+=t.codespan(a);break}case"br":{r+=t.br(a);break}case"del":{r+=t.del(a);break}case"text":{r+=t.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}},Ve=class{options;block;constructor(o){this.options=o||Te}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(o){return o}postprocess(o){return o}processAllTokens(o){return o}emStrongMask(o){return o}provideLexer(){return this.block?te.lex:te.lexInline}provideParser(){return this.block?re.parse:re.parseInline}},El=class{defaults=yo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=re;Renderer=Nt;TextRenderer=Co;Lexer=te;Tokenizer=Dt;Hooks=Ve;constructor(...o){this.use(...o)}walkTokens(o,e){let t=[];for(let r of o)switch(t=t.concat(e.call(this,r)),r.type){case"table":{let i=r;for(let n of i.header)t=t.concat(this.walkTokens(n.tokens,e));for(let n of i.rows)for(let a of n)t=t.concat(this.walkTokens(a.tokens,e));break}case"list":{let i=r;t=t.concat(this.walkTokens(i.items,e));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let a=i[n].flat(1/0);t=t.concat(this.walkTokens(a,e))}):i.tokens&&(t=t.concat(this.walkTokens(i.tokens,e)))}}return t}use(...o){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return o.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let n=e.renderers[i.name];n?e.renderers[i.name]=function(...a){let s=i.renderer.apply(this,a);return s===!1&&(s=n.apply(this,a)),s}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=e[i.level];n?n.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),r.extensions=e),t.renderer){let i=this.defaults.renderer||new Nt(this.defaults);for(let n in t.renderer){if(!(n in i))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let a=n,s=t.renderer[a],l=i[a];i[a]=(...d)=>{let u=s.apply(i,d);return u===!1&&(u=l.apply(i,d)),u||""}}r.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new Dt(this.defaults);for(let n in t.tokenizer){if(!(n in i))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let a=n,s=t.tokenizer[a],l=i[a];i[a]=(...d)=>{let u=s.apply(i,d);return u===!1&&(u=l.apply(i,d)),u}}r.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new Ve;for(let n in t.hooks){if(!(n in i))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let a=n,s=t.hooks[a],l=i[a];Ve.passThroughHooks.has(n)?i[a]=d=>{if(this.defaults.async&&Ve.passThroughHooksRespectAsync.has(n))return(async()=>{let p=await s.call(i,d);return l.call(i,p)})();let u=s.call(i,d);return l.call(i,u)}:i[a]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await s.apply(i,d);return p===!1&&(p=await l.apply(i,d)),p})();let u=s.apply(i,d);return u===!1&&(u=l.apply(i,d)),u}}r.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,n=t.walkTokens;r.walkTokens=function(a){let s=[];return s.push(n.call(this,a)),i&&(s=s.concat(i.call(this,a))),s}}this.defaults={...this.defaults,...r}}),this}setOptions(o){return this.defaults={...this.defaults,...o},this}lexer(o,e){return te.lex(o,e??this.defaults)}parser(o,e){return re.parse(o,e??this.defaults)}parseMarkdown(o){return(e,t)=>{let r={...t},i={...this.defaults,...r},n=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=o),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(e):e,s=await(i.hooks?await i.hooks.provideLexer():o?te.lex:te.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(s):s;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let d=await(i.hooks?await i.hooks.provideParser():o?re.parse:re.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(d):d})().catch(n);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer():o?te.lex:te.lexInline)(e,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let s=(i.hooks?i.hooks.provideParser():o?re.parse:re.parseInline)(a,i);return i.hooks&&(s=i.hooks.postprocess(s)),s}catch(a){return n(a)}}}onError(o,e){return t=>{if(t.message+=`
Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error occurred:</p><pre>"+ne(t.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(t);throw t}}},Ae=new El;function $(o,e){return Ae.parse(o,e)}$.options=$.setOptions=function(o){return Ae.setOptions(o),$.defaults=Ae.defaults,Ui($.defaults),$};$.getDefaults=yo;$.defaults=Te;$.use=function(...o){return Ae.use(...o),$.defaults=Ae.defaults,Ui($.defaults),$};$.walkTokens=function(o,e){return Ae.walkTokens(o,e)};$.parseInline=Ae.parseInline;$.Parser=re;$.parser=re.parse;$.Renderer=Nt;$.TextRenderer=Co;$.Lexer=te;$.lexer=te.lex;$.Tokenizer=Dt;$.Hooks=Ve;$.parse=$;$.options;$.setOptions;$.use;$.walkTokens;$.parseInline;re.parse;te.lex;const It=document.getElementById("update-dialog"),$l=document.getElementById("close-update"),Al=document.querySelector(".changelog"),Ue=document.querySelector(".install"),hr=document.querySelector(".reboot");let ci,en,tn,rn,pr=!1,Kr=!0;function Cl(o,e){return new Promise((t,r)=>{fetch(o).then(i=>{if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i.blob()}).then(i=>{const n=new File([i],e,{type:i.type}),a=new FileReader;a.onload=()=>{const s=a.result.split(",")[1];_(`echo ${s} | base64 -d > ${I}/common/tmp/${e}`).then(({errno:l,stderr:d})=>{l===0?t():r(d)})},a.readAsDataURL(n)}).catch(r)})}async function on(){try{const o=await fetch("https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/update.json").catch(async()=>fetch("https://hub.gitmirror.com/raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/update.json"));if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);Kr=!0;const e=await o.json();ci=e.versionCode,en=e.version,tn=e.zipUrl,rn=e.changelog,Y("sh",[`${I}/common/get_extra.sh`,"--check-update",`${ci}`]).stdout.on("data",r=>{r.includes("update")&&(it.style.display="flex",Tl())})}catch(o){console.error("Error fetching JSON or executing command:",o),y("prompt_no_internet",!1),Kr=!1}}function di(){_(`sh ${I}/common/get_extra.sh --release-note ${en}`).then(({stdout:o})=>{window.linkRedirect=Jt,$.setOptions({sanitize:!0,walkTokens(r){if(r.type==="link"){const i=r.href;r.href="javascript:void(0);",r.type="html",r.text=`<a href="javascript:void(0);" onclick="linkRedirect('${i}')">${r.text}</a>`}}});const e=o.split(`
`).filter(r=>r.trim()!=="").join(`
`),t=$.parse(e);Al.innerHTML=t})}function Tl(){it.addEventListener("click",async()=>{const{stdout:o}=await _(`
            [ -f ${I}/common/tmp/module.zip ] || echo "noModule"
            [ -f ${I}/common/tmp/changelog.md ] || echo "noChangelog"
            [ ! -f /data/adb/modules/TA_utl/update ] || echo "updated"
        `);if(o.trim().includes("updated"))Ue.style.display="none",hr.style.display="flex",It.show();else if(o.trim().includes("noChangelog"))y("prompt_downloading"),await Cl(rn,"changelog.md"),di(),It.show(),setTimeout(()=>{it.click()},200);else if(o.trim().includes("noModule")){if(pr)return;pr=!0,Y("sh",[`${I}/common/get_extra.sh`,"--get-update",`${tn}`],{env:{PATH:"$PATH:/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:/data/data/com.termux/files/usr/bin"}}).on("exit",t=>{pr=!1,t===0?(y("prompt_downloaded"),Ue.style.display="flex"):y("prompt_download_fail",!1)})}else Ue.style.display="flex",di(),It.show()}),$l.addEventListener("click",()=>It.close()),Ue.addEventListener("click",async()=>{y("prompt_installing");const o=Y("sh",[`${I}/common/get_extra.sh`,"--install-update"],{env:{PATH:"$PATH:/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk"}});o.stderr.on("data",e=>{console.error("Error during installation:",e)}),o.on("exit",e=>{e===0?(y("prompt_installed"),Ue.style.display="none",hr.style.display="flex"):y("prompt_install_fail",!1)})}),hr.addEventListener("click",async()=>{try{y("prompt_rebooting"),await new Promise(o=>setTimeout(o,1e3)),await _("svc power reboot")}catch(o){y("prompt_reboot_fail",!1),console.error("Fail to reboot:",o)}})}let De=!1;const Le=document.getElementById("security-patch-dialog"),Il=document.querySelector(".advanced-toggle"),Ft=document.getElementById("advanced-mode"),qt=document.getElementById("normal-mode-inputs"),Yr=document.getElementById("advanced-mode-inputs"),Sl=document.getElementById("devconfig-mode-inputs"),We=document.getElementById("all-patch"),je=document.getElementById("boot-patch"),Ke=document.getElementById("system-patch"),Ye=document.getElementById("vendor-patch"),Rl=document.getElementById("devconfig-securityPatch"),Ll=document.getElementById("get-patch"),Ol=document.getElementById("auto-config"),Pl=document.getElementById("save-patch"),nn=["securityPatch","osVersion","brand","device","product","manufacturer","model","serial","meid","imei","imei2"];function Oe(o,e=null){if(o==="disable")_(`
            rm -f /data/adb/tricky_store/security_patch_auto_config || true
            rm -f /data/adb/tricky_store/security_patch.txt || true
            rm -f /data/adb/tricky_store/devconfig.toml || true
        `).then(({errno:t})=>(y("security_patch_value_empty"),t===0));else if(o==="manual"){const t=De?"/data/adb/tricky_store/devconfig.toml":"/data/adb/tricky_store/security_patch.txt";_(`
            ${De?"":"rm -f /data/adb/tricky_store/security_patch_auto_config || true"}
            echo "${e}" > ${t}
            chmod 644 ${t}
        `).then(({errno:r})=>{const i=r===0;return y(i?"security_patch_save_success":"security_patch_save_failed",i),i})}}async function mr(){let o,e,t,r;try{const{errno:i}=await _("[ -f /data/adb/tricky_store/security_patch_auto_config ]");if(De){const{stdout:n}=await _("cat /data/adb/tricky_store/devconfig.toml");if(n.trim()!==""){const a=n.split(`
`);for(const s of a)for(const l of nn){if(s.trim().startsWith(`${l} =`)){const d=s.split("=")[1].trim().replace(/"/g,"");document.getElementById(`devconfig-${l}`).value=d}n.includes(l)||(document.getElementById(`devconfig-${l}`).value="")}}}else if(i===0)o=null,e=null,t=null,r=null;else{const{stdout:n}=await _("cat /data/adb/tricky_store/security_patch.txt");if(n.trim()!==""){const a=n.split(`
`);for(const s of a)s.startsWith("all=")?(o=s.split("=")[1]||null,o!==null&&(We.value=o)):o=null,s.startsWith("system=")?(e=s.split("=")[1]||null,e!==null&&(Ke.value=e)):e=null,s.startsWith("boot=")?(t=s.split("=")[1]||null,t!==null&&(je.value=t)):t=null,s.startsWith("vendor=")?(r=s.split("=")[1]||null,r!==null&&(Ye.value=r)):r=null}o===null&&(t||e||r)&&Gr(!0)}}catch(i){console.error("Failed to load security patch config:",i)}}function Gr(o){De||(o?(Ft.checked=!0,qt.classList.add("hidden"),Yr.classList.remove("hidden")):(Ft.checked=!1,qt.classList.remove("hidden"),Yr.classList.add("hidden")))}window.formatDate=function(o){let e=o.value.replace(/-/g,""),t=e.slice(0,4);if(e==="no")return o.value="no",o.setSelectionRange(2,2),"no";if(e.startsWith("n")){if(e.length>1&&e[1]!=="o"&&(e="n"),t=e.slice(0,2),e.length>2)return o.value=t,o.setSelectionRange(2,2),t}else{const s=e.replace(/\D/g,"");s!==e&&(o.value=s,e=s,t=s.slice(0,4)),e.length>=4&&(t+="-"+e.slice(4,6)),e.length>=6&&(t+="-"+e.slice(6,8))}const r=e.slice(-1);(r==="-"||isNaN(r)&&!["n"].includes(r))&&(t=t.slice(0,-1));const i=o.selectionStart;o.value=t;const n=t.length,a=(e.length===4||e.length===6)&&n>i;return o.setSelectionRange(a?n:i,a?n:i),t};function ui(o){return o==="no"?!0:/^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$/.test(o)}function zl(o){return o==="prop"?!0:/^\d{6}$/.test(o)}function Bl(o){return/^\d{8}$/.test(o)}function Ml(){_('grep -q "James" "/data/adb/modules/tricky_store/module.prop" && ! grep -q "beakthoven" "/data/adb/modules/tricky_store/module.prop"').then(({errno:o})=>{o===0&&(De=!0,document.getElementById("security-patch").textContent=Ee.menu_set_devconfig,Il.style.display="none",qt.classList.add("hidden"),Sl.classList.remove("hidden"))}),document.getElementById("security-patch").addEventListener("click",()=>{Le.show(),mr()}),Ft.addEventListener("change",()=>{qt.classList.toggle("hidden"),Yr.classList.toggle("hidden")}),Ol.addEventListener("click",()=>{const o=Y("sh",[`${I}/common/get_extra.sh`,"--security-patch"]);o.stdout.on("data",e=>{e.includes("not set")&&y("security_patch_auto_failed",!1)}),o.on("exit",e=>{e===0?(_("touch /data/adb/tricky_store/security_patch_auto_config"),We.value="",Ke.value="",je.value="",Ye.value="",Gr(!1),y("security_patch_auto_success")):y("security_patch_auto_failed",!1),Le.close(),mr()})}),Pl.addEventListener("click",async()=>{if(De){const o=new Map;for(const n of nn){const a=document.getElementById(`devconfig-${n}`);a.value.trim()!==""&&o.set(n,a.value.trim())}if(o.size===0){Oe("disable"),Le.close();return}o.has("securityPatch")||_("rm -f /data/adb/tricky_store/security_patch_auto_config || true");const e=["securityPatch","osVersion"],t=[],r=[];for(const[n,a]of o.entries())e.includes(n)?n==="osVersion"?t.push(`${n} = ${a}`):t.push(`${n} = "${a}"`):r.push(`${n} = "${a}"`);let i=t.join(`
`);r.length>0&&(i+=`
[deviceProps]
`+r.join(`
`)),Oe("manual",i)}else if(Ft.checked){const o=formatDate(je,"boot"),e=Ke.value.trim(),t=Ye.value.trim();if(!o&&!e&&!t){Oe("disable"),Le.close();return}if(e&&!zl(e)){y("security_patch_invalid_system",!1);return}if(o&&!ui(o)){y("security_patch_invalid_boot",!1);return}if(t&&!ui(t)){y("security_patch_invalid_vendor",!1);return}const r=[e?`system=${e}`:"",o?`boot=${o}`:"",t?`vendor=${t}`:""].filter(Boolean).join(`
`);Oe("manual",r)&&(We.value="")}else{const o=We.value.trim();if(!o){Oe("disable"),Le.close();return}if(!Bl(o)){y("security_patch_invalid_all",!1);return}const e=`all=${o}`;Oe("manual",e)&&(Ke.value="",je.value="",Ye.value="")}Le.close(),mr()}),Ll.addEventListener("click",async()=>{y("security_patch_fetching");const o=Y("sh",[`${I}/common/get_extra.sh`,"--get-security-patch"],{cwd:"/data/local/tmp",env:{PATH:"/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:/data/data/com.termux/files/usr/bin:$PATH"}});o.stdout.on("data",e=>{y("security_patch_fetched",!0,1e3),Gr(!0),We.value=e.replace(/-/g,""),Ke.value="prop",je.value=e,Ye.value=e,Rl.value=e}),o.stderr.on("data",e=>{e.includes("failed")?y("security_patch_unable_to_connect",!1):console.error(e)}),o.on("exit",e=>{e!==0&&y("security_patch_get_failed",!1)})})}document.body.removeAttribute("unresolved");const an=document.querySelector(".loading"),St=document.getElementById("prompt"),sn=document.querySelector(".floating-btn");let I;const pe=[],me=[],Dl=[];let Xr=!1;window.wx=new vo;async function Nl(){try{const{errno:o}=await _("[ -d /data/adb/modules/.TA_utl ]");I=o===0?"/data/adb/modules/.TA_utl":"/data/adb/modules/TA_utl"}catch(o){console.error("Error getting base path:",o)}}function Fl(){_(`grep '^version=' ${I}/common/update/module.prop | cut -d'=' -f2`).then(({stdout:o})=>{document.getElementById("module-version").textContent=o})}async function Ht(){Xr=!0,sn.classList.add("hide"),le.value="",se.innerHTML="",an.style.display="flex",document.querySelector(".uninstall-container").style.display="none",window.scrollTo(0,0),Kr===!1&&(on(),_(`rm -f "${I}/common/tmp/exclude-list"`)),Mi(),Xr=!1}function ql(){const o=document.getElementById("security-patch");_(`
        TS_version=$(grep "versionCode=" "/data/adb/modules/tricky_store/module.prop" | cut -d'=' -f2)
        if grep -qE "James|beakthoven" "/data/adb/modules/tricky_store/module.prop"; then
            echo 0
        elif [ "$TS_version" -ge 158 ]; then
            echo 0
        else
            echo $TS_version
        fi
    `).then(({stdout:e})=>{e.trim()==="0"||typeof ksu>"u"?o.style.display="flex":console.log("Tricky Store version:",e.trim())}).catch(e=>{console.error("Error checking Tricky Store version:",e),o.style.display="flex"})}function Hl(){const o=document.getElementById("select-denylist");_("command -v magisk").then(({errno:e})=>{e===0&&(o.style.display="flex")})}function Ul(){_("echo $TMPDIR").then(o=>{o.errno===0&&o.stdout.includes("com.sukisu.ultra")&&_("cat /data/data/com.sukisu.ultra/shared_prefs/card_settings.xml").then(e=>{if(e.errno===0)try{const r=new DOMParser().parseFromString(e.stdout,"text/xml"),i=r.querySelector('float[name="card_alpha"]'),n=r.querySelector('float[name="card_dim"]');if(i&&i.getAttribute("value")&&n&&n.getAttribute("value")){const a=parseFloat(i.getAttribute("value")),s=parseFloat(n.getAttribute("value"));if(!isNaN(a)&&!isNaN(s)){const l=Math.round(a*100)/100,d=Math.round(s*100)/100;document.querySelectorAll(".card-alpha").forEach(u=>{let f=window.getComputedStyle(u).backgroundColor||u.style.backgroundColor||"";const v=Vl(f,l,d);v&&(u.style.backgroundColor=v)})}}}catch{}})})}function Vl(o,e,t){if(!o)return null;o=o.trim();let r,i,n;const a=o.match(/rgba?\(([^)]+)\)/i);if(a)[r,i,n]=a[1].split(",").map(g=>parseInt(g.trim())||0);else{const v=o.replace("#",""),g=v.length;if(g===3||g===6||g===8){const b=g===3?v.replace(/./g,"$&$&"):v;r=parseInt(b.slice(0,2),16)||0,i=parseInt(b.slice(2,4),16)||0,n=parseInt(b.slice(4,6),16)||0}else return null}r/=255,i/=255,n/=255;const s=Math.max(r,i,n),l=Math.min(r,i,n);let d,u,p=(s+l)/2;if(s===l)d=u=0;else{const v=s-l;switch(u=p>.5?v/(2-s-l):v/(s+l),s){case r:d=(i-n)/v+(i<n?6:0);break;case i:d=(n-r)/v+2;break;case n:d=(r-i)/v+4;break}d/=6}const f=t/100;return p=p*(1-f),d=Math.round(d*360),u=Math.round(u*100),p=Math.round(p*100),`hsla(${d}, ${u}%, ${p}%, ${e})`}function y(o,e=!0,t=3e3){St.textContent=Ee[o],St.classList.toggle("error",!e),St.classList.add("show");const r=document.querySelector(".prompt-container");try{r&&!r.matches(":popover-open")&&r.showPopover()}catch{}window.promptTimeout&&clearTimeout(window.promptTimeout),window.promptTimeout=setTimeout(()=>{St.classList.remove("show");try{r&&r.matches(":popover-open")&&r.hidePopover()}catch{}},t)}function Jt(o){Me("Redirecting to "+o),setTimeout(()=>{_(`am start -a android.intent.action.VIEW -d ${o}`).then(({errno:e})=>{e!==0&&Me("Failed to open link")})},100)}document.getElementById("save").onclick=()=>{const o=Array.from(se.querySelectorAll("md-checkbox")).filter(i=>i.checked).map(i=>i.closest(".card").getAttribute("data-package"));let e=new Set(o);Dl.forEach(i=>{e.add(i)}),e=Array.from(e);const r=e.map(i=>pe.includes(i)?`${i}!`:me.includes(i)?`${i}?`:i).join(`
`);_(`echo "${r}" | sort -u > /data/adb/tricky_store/target.txt`).then(({errno:i})=>{if(i===0){for(const n of pe)_(`sed -i 's/^${n}$/${n}!/' /data/adb/tricky_store/target.txt`);for(const n of me)_(`sed -i 's/^${n}$/${n}?/' /data/adb/tricky_store/target.txt`);y("prompt_saved_target"),Ht()}else y("prompt_save_error",!1)})};document.querySelector(".uninstall-container").onclick=()=>{const o=document.getElementById("uninstall-confirmation-dialog");o.show(),document.getElementById("cancel-uninstall").onclick=()=>{o.close()},document.getElementById("confirm-uninstall").onclick=()=>{_(`sh ${I}/common/get_extra.sh --uninstall`).then(({errno:e})=>{e===0?y("prompt_uninstall_prompt"):y("prompt_uninstall_failed",!1)}),o.close()}};function Wl(){window.$tricky_store&&Object.keys($tricky_store).length>0&&$tricky_store.setLightStatusBars(!window.matchMedia("(prefers-color-scheme: dark)").matches)}function jl(){const o=r=>{document.documentElement.classList.toggle("dialog-open",r),document.body.style.overflow=r?"hidden":"",document.documentElement.style.touchAction=r?"none":""},e=r=>{o(!!r.open),new MutationObserver(n=>{for(const a of n)a.type==="attributes"&&a.attributeName==="open"&&o(!!r.open)}).observe(r,{attributes:!0,attributeFilter:["open"]})};document.querySelectorAll("md-dialog").forEach(e),new MutationObserver(r=>{for(const i of r){for(const n of i.addedNodes){if(n.nodeType!==Node.ELEMENT_NODE)continue;const a=n;a.tagName&&a.tagName.toLowerCase()==="md-dialog"?e(a):a.querySelectorAll&&a.querySelectorAll("md-dialog").forEach(e)}i.removedNodes&&i.removedNodes.length&&(document.querySelectorAll("md-dialog[open]").length>0||o(!1))}}).observe(document.body,{childList:!0,subtree:!0})}let hi=window.scrollY;window.addEventListener("scroll",()=>{if(document.querySelectorAll("md-menu").forEach(e=>e.close()),Xr)return;const o=window.scrollY>hi&&window.scrollY>40;sn.classList.toggle("hide",o),document.querySelectorAll(".header-bg").forEach(e=>{e.classList.toggle("scroll",window.scrollY>10)}),hi=window.scrollY});wx.on(window,"back",()=>{for(const o of document.querySelectorAll("md-dialog"))if(o.open){o.close();return}webui.exit()});document.querySelectorAll("md-dialog").forEach(o=>{const e=o.getOpenAnimation,t=o.getCloseAnimation;o.getOpenAnimation=()=>{const r=e.call(o),i={};return Object.keys(r).forEach(n=>i[n]=r[n]),i.dialog=[[[{opacity:0,transform:"translateY(50px)"},{opacity:1,transform:"translateY(0)"}],{duration:300,easing:"ease"}]],i.scrim=[[[{opacity:0},{opacity:.32}],{duration:300,easing:"linear"}]],i.container=[],i},o.getCloseAnimation=()=>{const r=t.call(o),i={};return Object.keys(r).forEach(n=>i[n]=r[n]),i.dialog=[[[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-50px)"}],{duration:300,easing:"ease"}]],i.scrim=[[[{opacity:.32},{opacity:0}],{duration:300,easing:"linear"}]],i.container=[],i}});document.addEventListener("DOMContentLoaded",async()=>{await Ps(),await Nl(),Wl(),Fl(),Ds(),Mi(),ql(),Hl(),on(),Ml(),jl(),document.getElementById("refresh").onclick=Ht});const Qt=document.getElementById("about-dialog"),Kl=document.getElementById("close-about");let oe=!1;document.getElementById("about").addEventListener("click",()=>{Qt.show()});Kl.onclick=()=>Qt.close();document.getElementById("telegram").onclick=()=>{Jt("https://t.me/kowchannel")};document.getElementById("github").onclick=()=>{Jt("https://github.com/KOWX712/Tricky-Addon-Update-Target-List")};document.getElementById("canary").onclick=()=>{if(oe)return;oe=!0,Qt.close(),y("prompt_checking_update",!0,1e4);let o="";const t=Y("sh",[`${I}/common/get_extra.sh`,"--download","https://nightly.link/KOWX712/Tricky-Addon-Update-Target-List/workflows/build/main?preview"],{env:{PATH:"$PATH:/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk"}});t.stdout.on("data",r=>{o+=r}),t.on("exit",async r=>{if(r===0){const a=new DOMParser().parseFromString(o,"text/html").querySelector('a[href$=".zip"]')?.href;if(a){const s=a.split("-"),l=s.length>=2?s[s.length-2]:null;Y("sh",[`${I}/common/get_extra.sh`,"--check-update",`${l}`],{env:{CANARY:"true"}}).on("exit",u=>{u===0?(y("prompt_no_update"),oe=!1):u===1&&Yl(a)})}else console.error("No link found.")}else console.error("Error fetching ZIP link"),oe=!1})};document.getElementById("locales").onclick=()=>{oe||(oe=!0,Qt.close(),y("prompt_checking_update",!0,1e4),fetch("https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/bot/locales_version").then(o=>{if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return o.text()}).catch(async()=>fetch("https://hub.gitmirror.com/raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/bot/locales_version").then(o=>{if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return o.text()})).then(async o=>{const e=o.trim(),t=await fetch("locales/version").then(r=>r.text()).then(r=>r.trim());Number(e)<=Number(t)?(y("prompt_no_update"),oe=!1):(y("prompt_downloading",!0,2e4),Y("sh",[`${I}/common/get_extra.sh`,"--update-locales"]).on("exit",i=>{oe=!1,y(i===0?"prompt_translation_updated":"prompt_translation_update_failed",i===0),i===0&&window.location.reload()}))}).catch(o=>{y("prompt_translation_update_failed",!1),oe=!1}))};function Yl(o){y("prompt_downloading",!0,2e4),Y("sh",[`${I}/common/get_extra.sh`,"--get-update",`${o}`],{env:{PATH:"$PATH:/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:/data/data/com.termux/files/usr/bin"}}).on("exit",t=>{t===0?Gl():(y("prompt_download_fail",!1),oe=!1)})}function Gl(){y("prompt_installing");const o=Y("sh",[`${I}/common/get_extra.sh`,"--install-update"],{env:{PATH:"$PATH:/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk"}});o.stderr.on("data",e=>{console.error("Error during installation:",e)}),o.on("exit",e=>{e===0?y("prompt_installed"):y("prompt_install_fail",!1),oe=!1})}const To=document.getElementById("boot-hash-dialog"),Ut=document.getElementById("boot-hash-input"),ln=document.getElementById("boot-hash-save-button"),Xl=document.getElementById("cancel-boot-hash");window.trimInput=o=>{o.value=o.value.replace(/\s+/g,"").toLowerCase()};document.getElementById("boot-hash").addEventListener("click",async()=>{To.show(),_("sed '/[^#]/d; /^$/d' /data/adb/boot_hash").then(({errno:o,stdout:e})=>{if(o!==0)Ut.value="";else{const t=e.trim();Ut.value=t||""}})});ln.addEventListener("click",async()=>{const o=Ut.value.trim();_(`
        resetprop -n ro.boot.vbmeta.digest "${o}"
        [ -z "${o}" ] && rm -f /data/adb/boot_hash || {
            echo "${o}" > /data/adb/boot_hash
            chmod 644 /data/adb/boot_hash
        }
    `,{env:{PATH:"/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:$PATH"}}).then(()=>{y("prompt_boot_hash_set"),To.close()})});Xl.addEventListener("click",()=>{To.close()});Ut.addEventListener("keydown",o=>{o.key==="Enter"&&ln.click()});
