From 5a7ef11d4701439f982124fb12686467c6213ac3 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Mon, 26 Jan 2026 11:23:17 +0100 Subject: [PATCH 1/4] chore: Sort shoelace imports alphabetically Signed-off-by: Thomas von Deyen --- bundles/shoelace.js | 12 +- vendor/javascript/shoelace.min.js | 2647 ++++++++++++++--------------- 2 files changed, 1327 insertions(+), 1332 deletions(-) diff --git a/bundles/shoelace.js b/bundles/shoelace.js index 1799fbac9c..a4ebf53663 100644 --- a/bundles/shoelace.js +++ b/bundles/shoelace.js @@ -1,14 +1,14 @@ // Used to bundle our own Shoelace build with Rollup -import "@shoelace-style/shoelace/dist/utilities/animation-registry.js" +import "@shoelace-style/shoelace/dist/components/button/button.js" +import "@shoelace-style/shoelace/dist/components/dialog/dialog.js" +import "@shoelace-style/shoelace/dist/components/icon/icon.js" +import "@shoelace-style/shoelace/dist/components/progress-bar/progress-bar.js" import "@shoelace-style/shoelace/dist/components/switch/switch.js" -import "@shoelace-style/shoelace/dist/components/tab/tab.js" import "@shoelace-style/shoelace/dist/components/tab-group/tab-group.js" import "@shoelace-style/shoelace/dist/components/tab-panel/tab-panel.js" +import "@shoelace-style/shoelace/dist/components/tab/tab.js" import "@shoelace-style/shoelace/dist/components/tooltip/tooltip.js" -import "@shoelace-style/shoelace/dist/components/progress-bar/progress-bar.js" -import "@shoelace-style/shoelace/dist/components/dialog/dialog.js" -import "@shoelace-style/shoelace/dist/components/button/button.js" -import "@shoelace-style/shoelace/dist/components/icon/icon.js" +import "@shoelace-style/shoelace/dist/utilities/animation-registry.js" import { registerIconLibrary } from "@shoelace-style/shoelace/dist/utilities/icon-library.js" import { setDefaultAnimation } from "@shoelace-style/shoelace/dist/utilities/animation-registry.js" export { registerIconLibrary, setDefaultAnimation } diff --git a/vendor/javascript/shoelace.min.js b/vendor/javascript/shoelace.min.js index 973e97da7b..80ad59adc6 100644 --- a/vendor/javascript/shoelace.min.js +++ b/vendor/javascript/shoelace.min.js @@ -1,992 +1,1013 @@ -var t=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,a=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),l=t=>{throw TypeError(t)},c=(e,o,r)=>o in e?t(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r,h=(t,e)=>{for(var o in e||(e={}))s.call(e,o)&&c(t,o,e[o]);if(i)for(var o of i(e))n.call(e,o)&&c(t,o,e[o]);return t},d=(t,o)=>e(t,r(o)),u=(e,r,i,s)=>{for(var n,a=s>1?void 0:s?o(r,i):r,l=e.length-1;l>=0;l--)(n=e[l])&&(a=(s?n(r,i,a):n(a))||a);return s&&a&&t(r,i,a),a},p=(t,e,o)=>e.has(t)||l("Cannot "+o),b=function(t,e){this[0]=t,this[1]=e},f=t=>{var e,o=t[a("asyncIterator")],r=!1,i={};return null==o?(o=t[a("iterator")](),e=t=>i[t]=e=>o[t](e)):(o=o.call(t),e=t=>i[t]=e=>{if(r){if(r=!1,"throw"===t)throw e;return e}return r=!0,{done:!1,value:new b(new Promise((r=>{var i=o[t](e);i instanceof Object||l("Object expected"),r(i)})),1)}}),i[a("iterator")]=()=>i,e("next"),"throw"in o?e("throw"):i.throw=t=>{throw t},"return"in o&&e("return"),i},g=new Map,m=new WeakMap;function v(t,e){return"rtl"===e.toLowerCase()?{keyframes:t.rtlKeyframes||t.keyframes,options:t.options}:t}function y(t,e){g.set(t,function(t){return null!=t?t:{keyframes:[],options:{duration:0}}}(e))}function w(t,e,o){const r=m.get(t);if(null==r?void 0:r[e])return v(r[e],o.dir);const i=g.get(e);return i?v(i,o.dir):{keyframes:[],options:{duration:0}}} /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const _=globalThis,x=_.ShadowRoot&&(void 0===_.ShadyCSS||_.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,k=Symbol(),$=new WeakMap;let C=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==k)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(x&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=$.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&$.set(e,t))}return t}toString(){return this.cssText}};const A=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,o,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[r+1]),t[0]);return new C(o,t,k)},E=x?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new C("string"==typeof t?t:t+"",void 0,k))(e)})(t):t + */ +const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),r=new WeakMap;let i=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const o=this.t;if(e&&void 0===t){const e=void 0!==o&&1===o.length;e&&(t=r.get(o)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&r.set(o,t))}return t}toString(){return this.cssText}};const s=(t,...e)=>{const r=1===t.length?t[0]:e.reduce(((e,o,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[r+1]),t[0]);return new i(r,t,o)},n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new i("string"==typeof t?t:t+"",void 0,o))(e)})(t):t /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */,{is:S,defineProperty:z,getOwnPropertyDescriptor:T,getOwnPropertyNames:P,getOwnPropertySymbols:L,getPrototypeOf:O}=Object,B=globalThis,F=B.trustedTypes,D=F?F.emptyScript:"",R=B.reactiveElementPolyfillSupport,M=(t,e)=>t,N={toAttribute(t,e){switch(e){case Boolean:t=t?D:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},H=(t,e)=>!S(t,e),U={attribute:!0,type:String,converter:N,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),B.litPropertyMetadata??=new WeakMap;let I=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=U){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),r=this.getPropertyDescriptor(t,o,e);void 0!==r&&z(this.prototype,t,r)}}static getPropertyDescriptor(t,e,o){const{get:r,set:i}=T(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const s=r?.call(this);i?.call(this,e),this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??U}static _$Ei(){if(this.hasOwnProperty(M("elementProperties")))return;const t=O(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(M("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(M("properties"))){const t=this.properties,e=[...P(t),...L(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const o=this._$Eu(t,e);void 0!==o&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(E(t))}else void 0!==t&&e.push(E(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(x)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of e){const e=document.createElement("style"),r=_.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=o.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){const o=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,o);if(void 0!==r&&!0===o.reflect){const i=(void 0!==o.converter?.toAttribute?o.converter:N).toAttribute(e,o.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const o=this.constructor,r=o._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=o.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:N;this._$Em=r;const s=i.fromAttribute(e,t.type);this[r]=s??this._$Ej?.get(r)??s,this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){const r=this.constructor,i=this[t];if(o??=r.getPropertyOptions(t),!((o.hasChanged??H)(i,e)||o.useDefault&&o.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,o))))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:r,wrapped:i},s){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==i||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t){const{wrapped:t}=o,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,o,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};I.elementStyles=[],I.shadowRootOptions={mode:"open"},I[M("elementProperties")]=new Map,I[M("finalized")]=new Map,R?.({ReactiveElement:I}),(B.reactiveElementVersions??=[]).push("2.1.1"); + */,{is:a,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:d,getPrototypeOf:u}=Object,p=globalThis,b=p.trustedTypes,f=b?b.emptyScript:"",g=p.reactiveElementPolyfillSupport,m=(t,e)=>t,v={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},y=(t,e)=>!a(t,e),w={attribute:!0,type:String,converter:v,reflect:!1,useDefault:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;let _=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),r=this.getPropertyDescriptor(t,o,e);void 0!==r&&l(this.prototype,t,r)}}static getPropertyDescriptor(t,e,o){const{get:r,set:i}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const s=r?.call(this);i?.call(this,e),this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...h(t),...d(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const o=this._$Eu(t,e);void 0!==o&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const o=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((o,r)=>{if(e)o.adoptedStyleSheets=r.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of r){const r=document.createElement("style"),i=t.litNonce;void 0!==i&&r.setAttribute("nonce",i),r.textContent=e.cssText,o.appendChild(r)}})(o,this.constructor.elementStyles),o}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){const o=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,o);if(void 0!==r&&!0===o.reflect){const i=(void 0!==o.converter?.toAttribute?o.converter:v).toAttribute(e,o.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const o=this.constructor,r=o._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=o.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:v;this._$Em=r;const s=i.fromAttribute(e,t.type);this[r]=s??this._$Ej?.get(r)??s,this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){const r=this.constructor,i=this[t];if(o??=r.getPropertyOptions(t),!((o.hasChanged??y)(i,e)||o.useDefault&&o.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,o))))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:r,wrapped:i},s){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==i||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t){const{wrapped:t}=o,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,o,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[m("elementProperties")]=new Map,_[m("finalized")]=new Map,g?.({ReactiveElement:_}),(p.reactiveElementVersions??=[]).push("2.1.1"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const V=globalThis,W=V.trustedTypes,j=W?W.createPolicy("lit-html",{createHTML:t=>t}):void 0,q="$lit$",K=`lit$${Math.random().toFixed(9).slice(2)}$`,Z="?"+K,G=`<${Z}>`,X=document,Y=()=>X.createComment(""),J=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Q=Array.isArray,tt="[ \t\n\f\r]",et=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ot=/-->/g,rt=/>/g,it=RegExp(`>|${tt}(?:([^\\s"'>=/]+)(${tt}*=${tt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),st=/'/g,nt=/"/g,at=/^(?:script|style|textarea|title)$/i,lt=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),ct=Symbol.for("lit-noChange"),ht=Symbol.for("lit-nothing"),dt=new WeakMap,ut=X.createTreeWalker(X,129);function pt(t,e){if(!Q(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==j?j.createHTML(e):e}const bt=(t,e)=>{const o=t.length-1,r=[];let i,s=2===e?"":3===e?"":"",n=et;for(let e=0;e"===l[0]?(n=i??et,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?it:'"'===l[3]?nt:st):n===nt||n===st?n=it:n===ot||n===rt?n=et:(n=it,i=void 0);const d=n===it&&t[e+1].startsWith("/>")?" ":"";s+=n===et?o+G:c>=0?(r.push(a),o.slice(0,c)+q+o.slice(c)+K+d):o+K+(-2===c?e:d)}return[pt(t,s+(t[o]||"")+(2===e?"":3===e?"":"")),r]};class ft{constructor({strings:t,_$litType$:e},o){let r;this.parts=[];let i=0,s=0;const n=t.length-1,a=this.parts,[l,c]=bt(t,e);if(this.el=ft.createElement(l,o),ut.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=ut.nextNode())&&a.length0){r.textContent=W?W.emptyScript:"";for(let o=0;oQ(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==ht&&J(this._$AH)?this._$AA.nextSibling.data=t:this.T(X.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=ft.createElement(pt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new mt(r,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=dt.get(t.strings);return void 0===e&&dt.set(t.strings,e=new ft(t)),e}k(t){Q(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,r=0;for(const i of t)r===e.length?e.push(o=new vt(this.O(Y()),this.O(Y()),this,this.options)):o=e[r],o._$AI(i),r++;r2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=ht}_$AI(t,e=this,o,r){const i=this.strings;let s=!1;if(void 0===i)t=gt(this,t,e,0),s=!J(t)||t!==this._$AH&&t!==ct,s&&(this._$AH=t);else{const r=t;let n,a;for(t=i[0],n=0;nt}):void 0,C="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,E="?"+A,S=`<${E}>`,z=document,T=()=>z.createComment(""),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,L=Array.isArray,O="[ \t\n\f\r]",B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,D=/>/g,R=RegExp(`>|${O}(?:([^\\s"'>=/]+)(${O}*=${O}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),M=/'/g,N=/"/g,H=/^(?:script|style|textarea|title)$/i,U=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),I=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),W=new WeakMap,j=z.createTreeWalker(z,129);function q(t,e){if(!L(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==$?$.createHTML(e):e}const K=(t,e)=>{const o=t.length-1,r=[];let i,s=2===e?"":3===e?"":"",n=B;for(let e=0;e"===l[0]?(n=i??B,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?R:'"'===l[3]?N:M):n===N||n===M?n=R:n===F||n===D?n=B:(n=R,i=void 0);const d=n===R&&t[e+1].startsWith("/>")?" ":"";s+=n===B?o+S:c>=0?(r.push(a),o.slice(0,c)+C+o.slice(c)+A+d):o+A+(-2===c?e:d)}return[q(t,s+(t[o]||"")+(2===e?"":3===e?"":"")),r]};class Z{constructor({strings:t,_$litType$:e},o){let r;this.parts=[];let i=0,s=0;const n=t.length-1,a=this.parts,[l,c]=K(t,e);if(this.el=Z.createElement(l,o),j.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=j.nextNode())&&a.length0){r.textContent=k?k.emptyScript:"";for(let o=0;oL(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==V&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Z.createElement(q(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new X(r,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new Z(t)),e}k(t){L(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,r=0;for(const i of t)r===e.length?e.push(o=new Y(this.O(T()),this.O(T()),this,this.options)):o=e[r],o._$AI(i),r++;r2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=V}_$AI(t,e=this,o,r){const i=this.strings;let s=!1;if(void 0===i)t=G(this,t,e,0),s=!P(t)||t!==this._$AH&&t!==I,s&&(this._$AH=t);else{const r=t;let n,a;for(t=i[0],n=0;n{const r=o?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=o?.renderBefore??null;r._$litPart$=i=new vt(e.insertBefore(Y(),t),t,void 0,o??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ct}};At._$litElement$=!0,At.finalized=!0,Ct.litElementHydrateSupport?.({LitElement:At});const Et=Ct.litElementPolyfillSupport;Et?.({LitElement:At}),(Ct.litElementVersions??=[]).push("4.2.1");var St=A` + */let st=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{const r=o?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=o?.renderBefore??null;r._$litPart$=i=new Y(e.insertBefore(T(),t),t,void 0,o??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return I}};st._$litElement$=!0,st.finalized=!0,it.litElementHydrateSupport?.({LitElement:st});const nt=it.litElementPolyfillSupport;nt?.({LitElement:st}),(it.litElementVersions??=[]).push("4.2.1");var at=s` :host { - display: inline-block; + --track-width: 2px; + --track-color: rgb(128 128 128 / 25%); + --indicator-color: var(--sl-color-primary-600); + --speed: 2s; + + display: inline-flex; + width: 1em; + height: 1em; + flex: none; } - :host([size='small']) { - --height: var(--sl-toggle-size-small); - --thumb-size: calc(var(--sl-toggle-size-small) + 4px); - --width: calc(var(--height) * 2); + .spinner { + flex: 1 1 auto; + height: 100%; + width: 100%; + } - font-size: var(--sl-input-font-size-small); + .spinner__track, + .spinner__indicator { + fill: none; + stroke-width: var(--track-width); + r: calc(0.5em - var(--track-width) / 2); + cx: 0.5em; + cy: 0.5em; + transform-origin: 50% 50%; } - :host([size='medium']) { - --height: var(--sl-toggle-size-medium); - --thumb-size: calc(var(--sl-toggle-size-medium) + 4px); - --width: calc(var(--height) * 2); + .spinner__track { + stroke: var(--track-color); + transform-origin: 0% 0%; + } - font-size: var(--sl-input-font-size-medium); + .spinner__indicator { + stroke: var(--indicator-color); + stroke-linecap: round; + stroke-dasharray: 150% 75%; + animation: spin var(--speed) linear infinite; } - :host([size='large']) { - --height: var(--sl-toggle-size-large); - --thumb-size: calc(var(--sl-toggle-size-large) + 4px); - --width: calc(var(--height) * 2); + @keyframes spin { + 0% { + transform: rotate(0deg); + stroke-dasharray: 0.05em, 3em; + } - font-size: var(--sl-input-font-size-large); + 50% { + transform: rotate(450deg); + stroke-dasharray: 1.375em, 1.375em; + } + + 100% { + transform: rotate(1080deg); + stroke-dasharray: 0.05em, 3em; + } + } +`;const lt=new Set,ct=new Map;let ht,dt="ltr",ut="en";const pt="undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&void 0!==document.documentElement;if(pt){const t=new MutationObserver(ft);dt=document.documentElement.dir||"ltr",ut=document.documentElement.lang||navigator.language,t.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function bt(...t){t.map((t=>{const e=t.$code.toLowerCase();ct.has(e)?ct.set(e,Object.assign(Object.assign({},ct.get(e)),t)):ct.set(e,t),ht||(ht=t)})),ft()}function ft(){pt&&(dt=document.documentElement.dir||"ltr",ut=document.documentElement.lang||navigator.language),[...lt.keys()].map((t=>{"function"==typeof t.requestUpdate&&t.requestUpdate()}))}let gt=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){lt.add(this.host)}hostDisconnected(){lt.delete(this.host)}dir(){return`${this.host.dir||dt}`.toLowerCase()}lang(){return`${this.host.lang||ut}`.toLowerCase()}getTranslationData(t){var e,o;const r=new Intl.Locale(t.replace(/_/g,"-")),i=null==r?void 0:r.language.toLowerCase(),s=null!==(o=null===(e=null==r?void 0:r.region)||void 0===e?void 0:e.toLowerCase())&&void 0!==o?o:"";return{locale:r,language:i,region:s,primary:ct.get(`${i}-${s}`),secondary:ct.get(i)}}exists(t,e){var o;const{primary:r,secondary:i}=this.getTranslationData(null!==(o=e.lang)&&void 0!==o?o:this.lang());return e=Object.assign({includeFallback:!1},e),!!(r&&r[t]||i&&i[t]||e.includeFallback&&ht&&ht[t])}term(t,...e){const{primary:o,secondary:r}=this.getTranslationData(this.lang());let i;if(o&&o[t])i=o[t];else if(r&&r[t])i=r[t];else{if(!ht||!ht[t])return console.error(`No translation found for: ${String(t)}`),String(t);i=ht[t]}return"function"==typeof i?i(...e):i}date(t,e){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),e).format(t)}number(t,e){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),e).format(t)}relativeTime(t,e,o){return new Intl.RelativeTimeFormat(this.lang(),o).format(t,e)}};var mt={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(t,e)=>`Go to slide ${t} of ${e}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:t=>0===t?"No options selected":1===t?"1 option selected":`${t} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:t=>`Slide ${t}`,toggleColorFormat:"Toggle color format"};bt(mt);var vt=mt,yt=class extends gt{};bt(vt);var wt=s` + :host { + box-sizing: border-box; } - .switch { + :host *, + :host *::before, + :host *::after { + box-sizing: inherit; + } + + [hidden] { + display: none !important; + } +`,_t=Object.defineProperty,xt=Object.defineProperties,kt=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,St=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),zt=t=>{throw TypeError(t)},Tt=(t,e,o)=>e in t?_t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Pt=(t,e)=>{for(var o in e||(e={}))At.call(e,o)&&Tt(t,o,e[o]);if(Ct)for(var o of Ct(e))Et.call(e,o)&&Tt(t,o,e[o]);return t},Lt=(t,e)=>xt(t,$t(e)),Ot=(t,e,o,r)=>{for(var i,s=r>1?void 0:r?kt(e,o):e,n=t.length-1;n>=0;n--)(i=t[n])&&(s=(r?i(e,o,s):i(s))||s);return r&&s&&_t(e,o,s),s},Bt=(t,e,o)=>e.has(t)||zt("Cannot "+o),Ft=function(t,e){this[0]=t,this[1]=e},Dt=t=>{var e,o=t[St("asyncIterator")],r=!1,i={};return null==o?(o=t[St("iterator")](),e=t=>i[t]=e=>o[t](e)):(o=o.call(t),e=t=>i[t]=e=>{if(r){if(r=!1,"throw"===t)throw e;return e}return r=!0,{done:!1,value:new Ft(new Promise((r=>{var i=o[t](e);i instanceof Object||zt("Object expected"),r(i)})),1)}}),i[St("iterator")]=()=>i,e("next"),"throw"in o?e("throw"):i.throw=t=>{throw t},"return"in o&&e("return"),i}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Rt={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y},Mt=(t=Rt,e,o)=>{const{kind:r,metadata:i}=o;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===r&&((t=Object.create(t)).wrapped=!0),s.set(o.name,t),"accessor"===r){const{name:r}=o;return{set(o){const i=e.get.call(this);e.set.call(this,o),this.requestUpdate(r,i,t)},init(e){return void 0!==e&&this.C(r,void 0,t,e),e}}}if("setter"===r){const{name:r}=o;return function(o){const i=this[r];e.call(this,o),this.requestUpdate(r,i,t)}}throw Error("Unsupported decorator location: "+r)};function Nt(t){return(e,o)=>"object"==typeof o?Mt(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o) +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */}function Ht(t){return Nt({...t,state:!0,attribute:!1})} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function Ut(t,e){return(e,o,r)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o))(e,o,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}var It,Vt=class extends st{constructor(){var t,e,o;super(),t=this,o=!1,(e=It).has(t)?zt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}emit(t,e){const o=new CustomEvent(t,Pt({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const r=customElements.get(t);if(!r){try{customElements.define(t,e,o)}catch(r){customElements.define(t,class extends e{},o)}return}let i=" (unknown version)",s=i;"version"in e&&e.version&&(i=" v"+e.version),"version"in r&&r.version&&(s=" v"+r.version),i&&s&&i===s||console.warn(`Attempted to register <${t}>${i}, but <${t}>${s} has already been registered.`)}attributeChangedCallback(t,e,o){var r,i;Bt(r=this,i=It,"read from private field"),i.get(r)||(this.constructor.elementProperties.forEach(((t,e)=>{t.reflect&&null!=this[e]&&this.initialReflectedProperties.set(e,this[e])})),((t,e,o)=>{Bt(t,e,"write to private field"),e.set(t,o)})(this,It,!0)),super.attributeChangedCallback(t,e,o)}willUpdate(t){super.willUpdate(t),this.initialReflectedProperties.forEach(((e,o)=>{t.has(o)&&null==this[o]&&(this[o]=e)}))}};It=new WeakMap,Vt.version="2.20.1",Vt.dependencies={},Ot([Nt()],Vt.prototype,"dir",2),Ot([Nt()],Vt.prototype,"lang",2);var Wt=class extends Vt{constructor(){super(...arguments),this.localize=new yt(this)}render(){return U` + + + + + `}};Wt.styles=[wt,at];var jt=new WeakMap,qt=new WeakMap,Kt=new WeakMap,Zt=new WeakSet,Gt=new WeakMap,Xt=class{constructor(t,e){this.handleFormData=t=>{const e=this.options.disabled(this.host),o=this.options.name(this.host),r=this.options.value(this.host),i="sl-button"===this.host.tagName.toLowerCase();this.host.isConnected&&!e&&!i&&"string"==typeof o&&o.length>0&&void 0!==r&&(Array.isArray(r)?r.forEach((e=>{t.formData.append(o,e.toString())})):t.formData.append(o,r.toString()))},this.handleFormSubmit=t=>{var e;const o=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(e=jt.get(this.form))||e.forEach((t=>{this.setUserInteracted(t,!0)}))),!this.form||this.form.noValidate||o||r(this.host)||(t.preventDefault(),t.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),Gt.set(this.host,[])},this.handleInteraction=t=>{const e=Gt.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.checkFormValidity=()=>{if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.checkValidity&&!e.checkValidity())return!1}return!0},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.reportValidity&&!e.reportValidity())return!1}return!0},(this.host=t).addController(this),this.options=Pt({form:t=>{const e=t.form;if(e){const o=t.getRootNode().querySelector(`#${e}`);if(o)return o}return t.closest("form")},name:t=>t.name,value:t=>t.value,defaultValue:t=>t.defaultValue,disabled:t=>{var e;return null!=(e=t.disabled)&&e},reportValidity:t=>"function"!=typeof t.reportValidity||t.reportValidity(),checkValidity:t=>"function"!=typeof t.checkValidity||t.checkValidity(),setValue:(t,e)=>t.value=e,assumeInteractionOn:["sl-input"]},e)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),Gt.set(this.host,[]),this.options.assumeInteractionOn.forEach((t=>{this.host.addEventListener(t,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),Gt.delete(this.host),this.options.assumeInteractionOn.forEach((t=>{this.host.removeEventListener(t,this.handleInteraction)}))}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(t){t?(this.form=t,jt.has(this.form)?jt.get(this.form).add(this.host):jt.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),qt.has(this.form)||(qt.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Kt.has(this.form)||(Kt.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const t=jt.get(this.form);t&&(t.delete(this.host),t.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),qt.has(this.form)&&(this.form.reportValidity=qt.get(this.form),qt.delete(this.form)),Kt.has(this.form)&&(this.form.checkValidity=Kt.get(this.form),Kt.delete(this.form)),this.form=void 0))}setUserInteracted(t,e){e?Zt.add(t):Zt.delete(t),t.requestUpdate()}doAction(t,e){if(this.form){const o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach((t=>{e.hasAttribute(t)&&o.setAttribute(t,e.getAttribute(t))}))),this.form.append(o),o.click(),o.remove()}}getForm(){var t;return null!=(t=this.form)?t:null}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){const e=this.host,o=Boolean(Zt.has(e)),r=Boolean(e.required);e.toggleAttribute("data-required",r),e.toggleAttribute("data-optional",!r),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o)}updateValidity(){const t=this.host;this.setValidity(t.validity.valid)}emitInvalidEvent(t){const e=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault(),this.host.dispatchEvent(e)||null==t||t.preventDefault()}},Yt=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1});Object.freeze(Lt(Pt({},Yt),{valid:!1,valueMissing:!0})),Object.freeze(Lt(Pt({},Yt),{valid:!1,customError:!0}));var Jt=s` + :host { + display: inline-block; position: relative; - display: inline-flex; - align-items: center; - font-family: var(--sl-input-font-family); - font-size: inherit; - font-weight: var(--sl-input-font-weight); - color: var(--sl-input-label-color); - vertical-align: middle; + width: auto; cursor: pointer; } - .switch__control { - flex: 0 0 auto; - position: relative; + .button { display: inline-flex; - align-items: center; + align-items: stretch; justify-content: center; - width: var(--width); - height: var(--height); - background-color: var(--sl-color-neutral-400); - border: solid var(--sl-input-border-width) var(--sl-color-neutral-400); - border-radius: var(--height); + width: 100%; + border-style: solid; + border-width: var(--sl-input-border-width); + font-family: var(--sl-input-font-family); + font-weight: var(--sl-font-weight-semibold); + text-decoration: none; + user-select: none; + -webkit-user-select: none; + white-space: nowrap; + vertical-align: middle; + padding: 0; transition: - var(--sl-transition-fast) border-color, - var(--sl-transition-fast) background-color; + var(--sl-transition-x-fast) background-color, + var(--sl-transition-x-fast) color, + var(--sl-transition-x-fast) border, + var(--sl-transition-x-fast) box-shadow; + cursor: inherit; } - .switch__control .switch__thumb { - width: var(--thumb-size); - height: var(--thumb-size); - background-color: var(--sl-color-neutral-0); - border-radius: 50%; - border: solid var(--sl-input-border-width) var(--sl-color-neutral-400); - translate: calc((var(--width) - var(--height)) / -2); - transition: - var(--sl-transition-fast) translate ease, - var(--sl-transition-fast) background-color, - var(--sl-transition-fast) border-color, - var(--sl-transition-fast) box-shadow; + .button::-moz-focus-inner { + border: 0; } - .switch__input { - position: absolute; - opacity: 0; - padding: 0; - margin: 0; + .button:focus { + outline: none; + } + + .button:focus-visible { + outline: var(--sl-focus-ring); + outline-offset: var(--sl-focus-ring-offset); + } + + .button--disabled { + opacity: 0.5; + cursor: not-allowed; + } + + /* When disabled, prevent mouse events from bubbling up from children */ + .button--disabled * { pointer-events: none; } - /* Hover */ - .switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover { - background-color: var(--sl-color-neutral-400); - border-color: var(--sl-color-neutral-400); + .button__prefix, + .button__suffix { + flex: 0 0 auto; + display: flex; + align-items: center; + pointer-events: none; } - .switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover .switch__thumb { - background-color: var(--sl-color-neutral-0); - border-color: var(--sl-color-neutral-400); + .button__label { + display: inline-block; } - /* Focus */ - .switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control { - background-color: var(--sl-color-neutral-400); - border-color: var(--sl-color-neutral-400); + .button__label::slotted(sl-icon) { + vertical-align: -2px; } - .switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb { + /* + * Standard buttons + */ + + /* Default */ + .button--standard.button--default { background-color: var(--sl-color-neutral-0); - border-color: var(--sl-color-primary-600); - outline: var(--sl-focus-ring); - outline-offset: var(--sl-focus-ring-offset); + border-color: var(--sl-input-border-color); + color: var(--sl-color-neutral-700); } - /* Checked */ - .switch--checked .switch__control { - background-color: var(--sl-color-primary-600); - border-color: var(--sl-color-primary-600); + .button--standard.button--default:hover:not(.button--disabled) { + background-color: var(--sl-color-primary-50); + border-color: var(--sl-color-primary-300); + color: var(--sl-color-primary-700); } - .switch--checked .switch__control .switch__thumb { - background-color: var(--sl-color-neutral-0); - border-color: var(--sl-color-primary-600); - translate: calc((var(--width) - var(--height)) / 2); + .button--standard.button--default:active:not(.button--disabled) { + background-color: var(--sl-color-primary-100); + border-color: var(--sl-color-primary-400); + color: var(--sl-color-primary-700); } - /* Checked + hover */ - .switch.switch--checked:not(.switch--disabled) .switch__control:hover { + /* Primary */ + .button--standard.button--primary { background-color: var(--sl-color-primary-600); border-color: var(--sl-color-primary-600); + color: var(--sl-color-neutral-0); } - .switch.switch--checked:not(.switch--disabled) .switch__control:hover .switch__thumb { - background-color: var(--sl-color-neutral-0); - border-color: var(--sl-color-primary-600); + .button--standard.button--primary:hover:not(.button--disabled) { + background-color: var(--sl-color-primary-500); + border-color: var(--sl-color-primary-500); + color: var(--sl-color-neutral-0); } - /* Checked + focus */ - .switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control { + .button--standard.button--primary:active:not(.button--disabled) { background-color: var(--sl-color-primary-600); border-color: var(--sl-color-primary-600); + color: var(--sl-color-neutral-0); } - .switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb { - background-color: var(--sl-color-neutral-0); - border-color: var(--sl-color-primary-600); - outline: var(--sl-focus-ring); - outline-offset: var(--sl-focus-ring-offset); + /* Success */ + .button--standard.button--success { + background-color: var(--sl-color-success-600); + border-color: var(--sl-color-success-600); + color: var(--sl-color-neutral-0); } - /* Disabled */ - .switch--disabled { - opacity: 0.5; - cursor: not-allowed; + .button--standard.button--success:hover:not(.button--disabled) { + background-color: var(--sl-color-success-500); + border-color: var(--sl-color-success-500); + color: var(--sl-color-neutral-0); } - .switch__label { - display: inline-block; - line-height: var(--height); - margin-inline-start: 0.5em; - user-select: none; - -webkit-user-select: none; + .button--standard.button--success:active:not(.button--disabled) { + background-color: var(--sl-color-success-600); + border-color: var(--sl-color-success-600); + color: var(--sl-color-neutral-0); } - :host([required]) .switch__label::after { - content: var(--sl-input-required-content); - color: var(--sl-input-required-content-color); - margin-inline-start: var(--sl-input-required-content-offset); + /* Neutral */ + .button--standard.button--neutral { + background-color: var(--sl-color-neutral-600); + border-color: var(--sl-color-neutral-600); + color: var(--sl-color-neutral-0); } - @media (forced-colors: active) { - .switch.switch--checked:not(.switch--disabled) .switch__control:hover .switch__thumb, - .switch--checked .switch__control .switch__thumb { - background-color: ButtonText; - } - } -`,zt=A` - .form-control .form-control__label { - display: none; + .button--standard.button--neutral:hover:not(.button--disabled) { + background-color: var(--sl-color-neutral-500); + border-color: var(--sl-color-neutral-500); + color: var(--sl-color-neutral-0); } - .form-control .form-control__help-text { - display: none; + .button--standard.button--neutral:active:not(.button--disabled) { + background-color: var(--sl-color-neutral-600); + border-color: var(--sl-color-neutral-600); + color: var(--sl-color-neutral-0); } - /* Label */ - .form-control--has-label .form-control__label { - display: inline-block; - color: var(--sl-input-label-color); - margin-bottom: var(--sl-spacing-3x-small); + /* Warning */ + .button--standard.button--warning { + background-color: var(--sl-color-warning-600); + border-color: var(--sl-color-warning-600); + color: var(--sl-color-neutral-0); } - - .form-control--has-label.form-control--small .form-control__label { - font-size: var(--sl-input-label-font-size-small); + .button--standard.button--warning:hover:not(.button--disabled) { + background-color: var(--sl-color-warning-500); + border-color: var(--sl-color-warning-500); + color: var(--sl-color-neutral-0); } - .form-control--has-label.form-control--medium .form-control__label { - font-size: var(--sl-input-label-font-size-medium); + .button--standard.button--warning:active:not(.button--disabled) { + background-color: var(--sl-color-warning-600); + border-color: var(--sl-color-warning-600); + color: var(--sl-color-neutral-0); } - .form-control--has-label.form-control--large .form-control__label { - font-size: var(--sl-input-label-font-size-large); + /* Danger */ + .button--standard.button--danger { + background-color: var(--sl-color-danger-600); + border-color: var(--sl-color-danger-600); + color: var(--sl-color-neutral-0); } - :host([required]) .form-control--has-label .form-control__label::after { - content: var(--sl-input-required-content); - margin-inline-start: var(--sl-input-required-content-offset); - color: var(--sl-input-required-content-color); + .button--standard.button--danger:hover:not(.button--disabled) { + background-color: var(--sl-color-danger-500); + border-color: var(--sl-color-danger-500); + color: var(--sl-color-neutral-0); } - /* Help text */ - .form-control--has-help-text .form-control__help-text { - display: block; - color: var(--sl-input-help-text-color); - margin-top: var(--sl-spacing-3x-small); + .button--standard.button--danger:active:not(.button--disabled) { + background-color: var(--sl-color-danger-600); + border-color: var(--sl-color-danger-600); + color: var(--sl-color-neutral-0); } - .form-control--has-help-text.form-control--small .form-control__help-text { - font-size: var(--sl-input-help-text-font-size-small); + /* + * Outline buttons + */ + + .button--outline { + background: none; + border: solid 1px; } - .form-control--has-help-text.form-control--medium .form-control__help-text { - font-size: var(--sl-input-help-text-font-size-medium); + /* Default */ + .button--outline.button--default { + border-color: var(--sl-input-border-color); + color: var(--sl-color-neutral-700); } - .form-control--has-help-text.form-control--large .form-control__help-text { - font-size: var(--sl-input-help-text-font-size-large); + .button--outline.button--default:hover:not(.button--disabled), + .button--outline.button--default.button--checked:not(.button--disabled) { + border-color: var(--sl-color-primary-600); + background-color: var(--sl-color-primary-600); + color: var(--sl-color-neutral-0); } - .form-control--has-help-text.form-control--radio-group .form-control__help-text { - margin-top: var(--sl-spacing-2x-small); + .button--outline.button--default:active:not(.button--disabled) { + border-color: var(--sl-color-primary-700); + background-color: var(--sl-color-primary-700); + color: var(--sl-color-neutral-0); } -`,Tt=new WeakMap,Pt=new WeakMap,Lt=new WeakMap,Ot=new WeakSet,Bt=new WeakMap,Ft=class{constructor(t,e){this.handleFormData=t=>{const e=this.options.disabled(this.host),o=this.options.name(this.host),r=this.options.value(this.host),i="sl-button"===this.host.tagName.toLowerCase();this.host.isConnected&&!e&&!i&&"string"==typeof o&&o.length>0&&void 0!==r&&(Array.isArray(r)?r.forEach((e=>{t.formData.append(o,e.toString())})):t.formData.append(o,r.toString()))},this.handleFormSubmit=t=>{var e;const o=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(e=Tt.get(this.form))||e.forEach((t=>{this.setUserInteracted(t,!0)}))),!this.form||this.form.noValidate||o||r(this.host)||(t.preventDefault(),t.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),Bt.set(this.host,[])},this.handleInteraction=t=>{const e=Bt.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.checkFormValidity=()=>{if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.checkValidity&&!e.checkValidity())return!1}return!0},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.reportValidity&&!e.reportValidity())return!1}return!0},(this.host=t).addController(this),this.options=h({form:t=>{const e=t.form;if(e){const o=t.getRootNode().querySelector(`#${e}`);if(o)return o}return t.closest("form")},name:t=>t.name,value:t=>t.value,defaultValue:t=>t.defaultValue,disabled:t=>{var e;return null!=(e=t.disabled)&&e},reportValidity:t=>"function"!=typeof t.reportValidity||t.reportValidity(),checkValidity:t=>"function"!=typeof t.checkValidity||t.checkValidity(),setValue:(t,e)=>t.value=e,assumeInteractionOn:["sl-input"]},e)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),Bt.set(this.host,[]),this.options.assumeInteractionOn.forEach((t=>{this.host.addEventListener(t,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),Bt.delete(this.host),this.options.assumeInteractionOn.forEach((t=>{this.host.removeEventListener(t,this.handleInteraction)}))}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(t){t?(this.form=t,Tt.has(this.form)?Tt.get(this.form).add(this.host):Tt.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),Pt.has(this.form)||(Pt.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Lt.has(this.form)||(Lt.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const t=Tt.get(this.form);t&&(t.delete(this.host),t.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),Pt.has(this.form)&&(this.form.reportValidity=Pt.get(this.form),Pt.delete(this.form)),Lt.has(this.form)&&(this.form.checkValidity=Lt.get(this.form),Lt.delete(this.form)),this.form=void 0))}setUserInteracted(t,e){e?Ot.add(t):Ot.delete(t),t.requestUpdate()}doAction(t,e){if(this.form){const o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach((t=>{e.hasAttribute(t)&&o.setAttribute(t,e.getAttribute(t))}))),this.form.append(o),o.click(),o.remove()}}getForm(){var t;return null!=(t=this.form)?t:null}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){const e=this.host,o=Boolean(Ot.has(e)),r=Boolean(e.required);e.toggleAttribute("data-required",r),e.toggleAttribute("data-optional",!r),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o)}updateValidity(){const t=this.host;this.setValidity(t.validity.valid)}emitInvalidEvent(t){const e=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault(),this.host.dispatchEvent(e)||null==t||t.preventDefault()}},Dt=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1});Object.freeze(d(h({},Dt),{valid:!1,valueMissing:!0})),Object.freeze(d(h({},Dt),{valid:!1,customError:!0}));var Rt=class{constructor(t,...e){this.slotNames=[],this.handleSlotChange=t=>{const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()},(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some((t=>{if(t.nodeType===t.TEXT_NODE&&""!==t.textContent.trim())return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if("sl-visually-hidden"===e.tagName.toLowerCase())return!1;if(!e.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(t){return null!==this.host.querySelector(`:scope > [slot="${t}"]`)}test(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}};function Mt(t,e){const o=h({waitUntilFirstUpdate:!1},e);return(e,r)=>{const{update:i}=e,s=Array.isArray(t)?t:[t];e.update=function(t){s.forEach((e=>{const i=e;if(t.has(i)){const e=t.get(i),s=this[i];e!==s&&(o.waitUntilFirstUpdate&&!this.hasUpdated||this[r](e,s))}})),i.call(this,t)}}}var Nt=A` - :host { - box-sizing: border-box; + + /* Primary */ + .button--outline.button--primary { + border-color: var(--sl-color-primary-600); + color: var(--sl-color-primary-600); } - :host *, - :host *::before, - :host *::after { - box-sizing: inherit; + .button--outline.button--primary:hover:not(.button--disabled), + .button--outline.button--primary.button--checked:not(.button--disabled) { + background-color: var(--sl-color-primary-600); + color: var(--sl-color-neutral-0); } - [hidden] { - display: none !important; + .button--outline.button--primary:active:not(.button--disabled) { + border-color: var(--sl-color-primary-700); + background-color: var(--sl-color-primary-700); + color: var(--sl-color-neutral-0); } -` -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */;const Ht={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:H},Ut=(t=Ht,e,o)=>{const{kind:r,metadata:i}=o;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===r&&((t=Object.create(t)).wrapped=!0),s.set(o.name,t),"accessor"===r){const{name:r}=o;return{set(o){const i=e.get.call(this);e.set.call(this,o),this.requestUpdate(r,i,t)},init(e){return void 0!==e&&this.C(r,void 0,t,e),e}}}if("setter"===r){const{name:r}=o;return function(o){const i=this[r];e.call(this,o),this.requestUpdate(r,i,t)}}throw Error("Unsupported decorator location: "+r)};function It(t){return(e,o)=>"object"==typeof o?Ut(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o) -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */}function Vt(t){return It({...t,state:!0,attribute:!1})} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -function Wt(t,e){return(e,o,r)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o))(e,o,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}var jt,qt=class extends At{constructor(){var t,e,o;super(),t=this,o=!1,(e=jt).has(t)?l("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}emit(t,e){const o=new CustomEvent(t,h({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const r=customElements.get(t);if(!r){try{customElements.define(t,e,o)}catch(r){customElements.define(t,class extends e{},o)}return}let i=" (unknown version)",s=i;"version"in e&&e.version&&(i=" v"+e.version),"version"in r&&r.version&&(s=" v"+r.version),i&&s&&i===s||console.warn(`Attempted to register <${t}>${i}, but <${t}>${s} has already been registered.`)}attributeChangedCallback(t,e,o){var r,i;p(r=this,i=jt,"read from private field"),i.get(r)||(this.constructor.elementProperties.forEach(((t,e)=>{t.reflect&&null!=this[e]&&this.initialReflectedProperties.set(e,this[e])})),((t,e,o)=>{p(t,e,"write to private field"),e.set(t,o)})(this,jt,!0)),super.attributeChangedCallback(t,e,o)}willUpdate(t){super.willUpdate(t),this.initialReflectedProperties.forEach(((e,o)=>{t.has(o)&&null==this[o]&&(this[o]=e)}))}};jt=new WeakMap,qt.version="2.20.1",qt.dependencies={},u([It()],qt.prototype,"dir",2),u([It()],qt.prototype,"lang",2); -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -const Kt=1,Zt=3,Gt=4,Xt=t=>(...e)=>({_$litDirective$:t,values:e});let Yt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}; -/** - * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */const Jt=Xt(class extends Yt{constructor(t){if(super(t),t.type!==Kt||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const o=t.element.classList;for(const t of this.st)t in e||(o.remove(t),this.st.delete(t));for(const t in e){const r=!!e[t];r===this.st.has(t)||this.nt?.has(t)||(r?(o.add(t),this.st.add(t)):(o.remove(t),this.st.delete(t)))}return ct}}),Qt=t=>t??ht -/** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */,te={},ee=Xt(class extends Yt{constructor(t){if(super(t),t.type!==Zt&&t.type!==Kt&&t.type!==Gt)throw Error("The `live` directive is not allowed on child or event bindings");if(!(t=>void 0===t.strings)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===ct||e===ht)return e;const o=t.element,r=t.name;if(t.type===Zt){if(e===o[r])return ct}else if(t.type===Gt){if(!!e===o.hasAttribute(r))return ct}else if(t.type===Kt&&o.getAttribute(r)===e+"")return ct;return((t,e=te)=>{t._$AH=e; -/** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */})(t),e}}); -/** - * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */var oe=class extends qt{constructor(){super(...arguments),this.formControlController=new Ft(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.hasSlotController=new Rt(this,"help-text"),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.form="",this.required=!1,this.helpText=""}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleInput(){this.emit("sl-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}handleClick(){this.checked=!this.checked,this.emit("sl-change")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleKeyDown(t){"ArrowLeft"===t.key&&(t.preventDefault(),this.checked=!1,this.emit("sl-change"),this.emit("sl-input")),"ArrowRight"===t.key&&(t.preventDefault(),this.checked=!0,this.emit("sl-change"),this.emit("sl-input"))}handleCheckedChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}handleDisabledChange(){this.formControlController.setValidity(!0)}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("help-text"),e=!!this.helpText||!!t;return lt` -
- + .button--outline.button--success:hover:not(.button--disabled), + .button--outline.button--success.button--checked:not(.button--disabled) { + background-color: var(--sl-color-success-600); + color: var(--sl-color-neutral-0); + } -
- ${this.helpText} -
-
- `}};oe.styles=[Nt,zt,St],u([Wt('input[type="checkbox"]')],oe.prototype,"input",2),u([Vt()],oe.prototype,"hasFocus",2),u([It()],oe.prototype,"title",2),u([It()],oe.prototype,"name",2),u([It()],oe.prototype,"value",2),u([It({reflect:!0})],oe.prototype,"size",2),u([It({type:Boolean,reflect:!0})],oe.prototype,"disabled",2),u([It({type:Boolean,reflect:!0})],oe.prototype,"checked",2),u([((t="value")=>(e,o)=>{const r=e.constructor,i=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(e,s,n){var a;const l=r.getPropertyOptions(t);if(e===("string"==typeof l.attribute?l.attribute:t)){const e=l.converter||N,r=("function"==typeof e?e:null!=(a=null==e?void 0:e.fromAttribute)?a:N.fromAttribute)(n,l.type);this[t]!==r&&(this[o]=r)}i.call(this,e,s,n)}})("checked")],oe.prototype,"defaultChecked",2),u([It({reflect:!0})],oe.prototype,"form",2),u([It({type:Boolean,reflect:!0})],oe.prototype,"required",2),u([It({attribute:"help-text"})],oe.prototype,"helpText",2),u([Mt("checked",{waitUntilFirstUpdate:!0})],oe.prototype,"handleCheckedChange",1),u([Mt("disabled",{waitUntilFirstUpdate:!0})],oe.prototype,"handleDisabledChange",1),oe.define("sl-switch");var re=A` - :host { - display: inline-block; + .button--outline.button--success:active:not(.button--disabled) { + border-color: var(--sl-color-success-700); + background-color: var(--sl-color-success-700); + color: var(--sl-color-neutral-0); } - .tab { - display: inline-flex; - align-items: center; - font-family: var(--sl-font-sans); - font-size: var(--sl-font-size-small); - font-weight: var(--sl-font-weight-semibold); - border-radius: var(--sl-border-radius-medium); + /* Neutral */ + .button--outline.button--neutral { + border-color: var(--sl-color-neutral-600); color: var(--sl-color-neutral-600); - padding: var(--sl-spacing-medium) var(--sl-spacing-large); - white-space: nowrap; - user-select: none; - -webkit-user-select: none; - cursor: pointer; - transition: - var(--transition-speed) box-shadow, - var(--transition-speed) color; } - .tab:hover:not(.tab--disabled) { - color: var(--sl-color-primary-600); + .button--outline.button--neutral:hover:not(.button--disabled), + .button--outline.button--neutral.button--checked:not(.button--disabled) { + background-color: var(--sl-color-neutral-600); + color: var(--sl-color-neutral-0); } - :host(:focus) { - outline: transparent; + .button--outline.button--neutral:active:not(.button--disabled) { + border-color: var(--sl-color-neutral-700); + background-color: var(--sl-color-neutral-700); + color: var(--sl-color-neutral-0); } - :host(:focus-visible) { - color: var(--sl-color-primary-600); - outline: var(--sl-focus-ring); - outline-offset: calc(-1 * var(--sl-focus-ring-width) - var(--sl-focus-ring-offset)); + /* Warning */ + .button--outline.button--warning { + border-color: var(--sl-color-warning-600); + color: var(--sl-color-warning-600); } - .tab.tab--active:not(.tab--disabled) { - color: var(--sl-color-primary-600); + .button--outline.button--warning:hover:not(.button--disabled), + .button--outline.button--warning.button--checked:not(.button--disabled) { + background-color: var(--sl-color-warning-600); + color: var(--sl-color-neutral-0); } - .tab.tab--closable { - padding-inline-end: var(--sl-spacing-small); + .button--outline.button--warning:active:not(.button--disabled) { + border-color: var(--sl-color-warning-700); + background-color: var(--sl-color-warning-700); + color: var(--sl-color-neutral-0); } - .tab.tab--disabled { - opacity: 0.5; - cursor: not-allowed; + /* Danger */ + .button--outline.button--danger { + border-color: var(--sl-color-danger-600); + color: var(--sl-color-danger-600); } - .tab__close-button { - font-size: var(--sl-font-size-small); - margin-inline-start: var(--sl-spacing-small); + .button--outline.button--danger:hover:not(.button--disabled), + .button--outline.button--danger.button--checked:not(.button--disabled) { + background-color: var(--sl-color-danger-600); + color: var(--sl-color-neutral-0); } - .tab__close-button::part(base) { - padding: var(--sl-spacing-3x-small); + .button--outline.button--danger:active:not(.button--disabled) { + border-color: var(--sl-color-danger-700); + background-color: var(--sl-color-danger-700); + color: var(--sl-color-neutral-0); } @media (forced-colors: active) { - .tab.tab--active:not(.tab--disabled) { - outline: solid 1px transparent; - outline-offset: -3px; + .button.button--outline.button--checked:not(.button--disabled) { + outline: solid 2px transparent; } } -`,ie=A` - :host { - display: inline-block; - color: var(--sl-color-neutral-600); - } - .icon-button { - flex: 0 0 auto; - display: flex; - align-items: center; - background: none; - border: none; - border-radius: var(--sl-border-radius-medium); - font-size: inherit; - color: inherit; - padding: var(--sl-spacing-x-small); - cursor: pointer; - transition: var(--sl-transition-x-fast) color; - -webkit-appearance: none; - } + /* + * Text buttons + */ - .icon-button:hover:not(.icon-button--disabled), - .icon-button:focus-visible:not(.icon-button--disabled) { + .button--text { + background-color: transparent; + border-color: transparent; color: var(--sl-color-primary-600); } - .icon-button:active:not(.icon-button--disabled) { - color: var(--sl-color-primary-700); - } - - .icon-button:focus { - outline: none; + .button--text:hover:not(.button--disabled) { + background-color: transparent; + border-color: transparent; + color: var(--sl-color-primary-500); } - .icon-button--disabled { - opacity: 0.5; - cursor: not-allowed; + .button--text:focus-visible:not(.button--disabled) { + background-color: transparent; + border-color: transparent; + color: var(--sl-color-primary-500); } - .icon-button:focus-visible { - outline: var(--sl-focus-ring); - outline-offset: var(--sl-focus-ring-offset); + .button--text:active:not(.button--disabled) { + background-color: transparent; + border-color: transparent; + color: var(--sl-color-primary-700); } - .icon-button__icon { - pointer-events: none; - } -`,se="";function ne(t){se=t}var ae={name:"default",resolver:t=>function(t=""){if(!se){const t=[...document.getElementsByTagName("script")],e=t.find((t=>t.hasAttribute("data-shoelace")));if(e)ne(e.getAttribute("data-shoelace"));else{const e=t.find((t=>/shoelace(\.min)?\.js($|\?)/.test(t.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(t.src)));let o="";e&&(o=e.getAttribute("src")),ne(o.split("/").slice(0,-1).join("/"))}}return se.replace(/\/$/,"")+(t?`/${t.replace(/^\//,"")}`:"")}(`assets/icons/${t}.svg`)},le={caret:'\n \n \n \n ',check:'\n \n \n \n \n \n \n \n \n \n \n ',"chevron-down":'\n \n \n \n ',"chevron-left":'\n \n \n \n ',"chevron-right":'\n \n \n \n ',copy:'\n \n \n \n ',eye:'\n \n \n \n \n ',"eye-slash":'\n \n \n \n \n \n ',eyedropper:'\n \n \n \n ',"grip-vertical":'\n \n \n \n ',indeterminate:'\n \n \n \n \n \n \n \n \n \n ',"person-fill":'\n \n \n \n ',"play-fill":'\n \n \n \n ',"pause-fill":'\n \n \n \n ',radio:'\n \n \n \n \n \n \n \n ',"star-fill":'\n \n \n \n ',"x-lg":'\n \n \n \n ',"x-circle-fill":'\n \n \n \n '},ce=[ae,{name:"system",resolver:t=>t in le?`data:image/svg+xml,${encodeURIComponent(le[t])}`:""}],he=[];function de(t){return ce.find((e=>e.name===t))}function ue(t,e){!function(t){ce=ce.filter((e=>e.name!==t))}(t),ce.push({name:t,resolver:e.resolver,mutator:e.mutator,spriteSheet:e.spriteSheet}),he.forEach((e=>{e.library===t&&e.setIcon()}))}var pe,be=A` - :host { - display: inline-block; - width: 1em; - height: 1em; - box-sizing: content-box !important; - } + /* + * Size modifiers + */ - svg { - display: block; - height: 100%; - width: 100%; + .button--small { + height: auto; + min-height: var(--sl-input-height-small); + font-size: var(--sl-button-font-size-small); + line-height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2); + border-radius: var(--sl-input-border-radius-small); } -`,fe=Symbol(),ge=Symbol(),me=new Map,ve=class extends qt{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let r;if(null==e?void 0:e.spriteSheet)return this.svg=lt` - - `,this.svg;try{if(r=await fetch(t,{mode:"cors"}),!r.ok)return 410===r.status?fe:ge}catch(t){return ge}try{const t=document.createElement("div");t.innerHTML=await r.text();const e=t.firstElementChild;if("svg"!==(null==(o=null==e?void 0:e.tagName)?void 0:o.toLowerCase()))return fe;pe||(pe=new DOMParser);const i=pe.parseFromString(e.outerHTML,"text/html").body.querySelector("svg");return i?(i.part.add("svg"),document.adoptNode(i)):fe}catch(t){return fe}}connectedCallback(){var t;super.connectedCallback(),t=this,he.push(t)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,he=he.filter((e=>e!==t))}getIconSource(){const t=de(this.library);return this.name&&t?{url:t.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){"string"==typeof this.label&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var t;const{url:e,fromLibrary:o}=this.getIconSource(),r=o?de(this.library):void 0;if(!e)return void(this.svg=null);let i=me.get(e);if(i||(i=this.resolveIcon(e,r),me.set(e,i)),!this.initialRender)return;const s=await i;if(s===ge&&me.delete(e),e===this.getIconSource().url)if((t=>void 0!==t?._$litType$)(s)){if(this.svg=s,r){await this.updateComplete;const t=this.shadowRoot.querySelector("[part='svg']");"function"==typeof r.mutator&&t&&r.mutator(t)}}else switch(s){case ge:case fe:this.svg=null,this.emit("sl-error");break;default:this.svg=s.cloneNode(!0),null==(t=null==r?void 0:r.mutator)||t.call(r,this.svg),this.emit("sl-load")}}render(){return this.svg}};ve.styles=[Nt,be],u([Vt()],ve.prototype,"svg",2),u([It({reflect:!0})],ve.prototype,"name",2),u([It()],ve.prototype,"src",2),u([It()],ve.prototype,"label",2),u([It({reflect:!0})],ve.prototype,"library",2),u([Mt("label")],ve.prototype,"handleLabelChange",1),u([Mt(["name","src","library"])],ve.prototype,"setIcon",1); -/** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -const ye=Symbol.for(""),we=t=>{if(t?.r===ye)return t?._$litStatic$},_e=(t,...e)=>({_$litStatic$:e.reduce(((e,o,r)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[r+1]),t[0]),r:ye}),xe=new Map,ke=(t=>(e,...o)=>{const r=o.length;let i,s;const n=[],a=[];let l,c=0,h=!1;for(;c - - - `}};$e.styles=[Nt,ie],$e.dependencies={"sl-icon":ve},u([Wt(".icon-button")],$e.prototype,"button",2),u([Vt()],$e.prototype,"hasFocus",2),u([It()],$e.prototype,"name",2),u([It()],$e.prototype,"library",2),u([It()],$e.prototype,"src",2),u([It()],$e.prototype,"href",2),u([It()],$e.prototype,"target",2),u([It()],$e.prototype,"download",2),u([It()],$e.prototype,"label",2),u([It({type:Boolean,reflect:!0})],$e.prototype,"disabled",2);const Ce=new Set,Ae=new Map;let Ee,Se="ltr",ze="en";const Te="undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&void 0!==document.documentElement;if(Te){const t=new MutationObserver(Le);Se=document.documentElement.dir||"ltr",ze=document.documentElement.lang||navigator.language,t.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function Pe(...t){t.map((t=>{const e=t.$code.toLowerCase();Ae.has(e)?Ae.set(e,Object.assign(Object.assign({},Ae.get(e)),t)):Ae.set(e,t),Ee||(Ee=t)})),Le()}function Le(){Te&&(Se=document.documentElement.dir||"ltr",ze=document.documentElement.lang||navigator.language),[...Ce.keys()].map((t=>{"function"==typeof t.requestUpdate&&t.requestUpdate()}))}let Oe=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){Ce.add(this.host)}hostDisconnected(){Ce.delete(this.host)}dir(){return`${this.host.dir||Se}`.toLowerCase()}lang(){return`${this.host.lang||ze}`.toLowerCase()}getTranslationData(t){var e,o;const r=new Intl.Locale(t.replace(/_/g,"-")),i=null==r?void 0:r.language.toLowerCase(),s=null!==(o=null===(e=null==r?void 0:r.region)||void 0===e?void 0:e.toLowerCase())&&void 0!==o?o:"";return{locale:r,language:i,region:s,primary:Ae.get(`${i}-${s}`),secondary:Ae.get(i)}}exists(t,e){var o;const{primary:r,secondary:i}=this.getTranslationData(null!==(o=e.lang)&&void 0!==o?o:this.lang());return e=Object.assign({includeFallback:!1},e),!!(r&&r[t]||i&&i[t]||e.includeFallback&&Ee&&Ee[t])}term(t,...e){const{primary:o,secondary:r}=this.getTranslationData(this.lang());let i;if(o&&o[t])i=o[t];else if(r&&r[t])i=r[t];else{if(!Ee||!Ee[t])return console.error(`No translation found for: ${String(t)}`),String(t);i=Ee[t]}return"function"==typeof i?i(...e):i}date(t,e){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),e).format(t)}number(t,e){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),e).format(t)}relativeTime(t,e,o){return new Intl.RelativeTimeFormat(this.lang(),o).format(t,e)}};var Be={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(t,e)=>`Go to slide ${t} of ${e}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:t=>0===t?"No options selected":1===t?"1 option selected":`${t} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:t=>`Slide ${t}`,toggleColorFormat:"Toggle color format"};Pe(Be);var Fe=Be,De=class extends Oe{};Pe(Fe);var Re=0,Me=class extends qt{constructor(){super(...arguments),this.localize=new De(this),this.attrId=++Re,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1,this.tabIndex=0}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleCloseClick(t){t.stopPropagation(),this.emit("sl-close")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.disabled&&!this.active?this.tabIndex=-1:this.tabIndex=0}render(){return this.id=this.id.length>0?this.id:this.componentId,lt` -
- - ${this.closable?lt` - - `:""} -
- `}};Me.styles=[Nt,re],Me.dependencies={"sl-icon-button":$e},u([Wt(".tab")],Me.prototype,"tab",2),u([It({reflect:!0})],Me.prototype,"panel",2),u([It({type:Boolean,reflect:!0})],Me.prototype,"active",2),u([It({type:Boolean,reflect:!0})],Me.prototype,"closable",2),u([It({type:Boolean,reflect:!0})],Me.prototype,"disabled",2),u([It({type:Number,reflect:!0})],Me.prototype,"tabIndex",2),u([Mt("active")],Me.prototype,"handleActiveChange",1),u([Mt("disabled")],Me.prototype,"handleDisabledChange",1),Me.define("sl-tab");var Ne=A` - :host { - --indicator-color: var(--sl-color-primary-600); - --track-color: var(--sl-color-neutral-200); - --track-width: 2px; - display: block; + .button--medium { + height: auto; + min-height: var(--sl-input-height-medium); + font-size: var(--sl-button-font-size-medium); + line-height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2); + border-radius: var(--sl-input-border-radius-medium); } - .tab-group { - display: flex; - border-radius: 0; + .button--large { + height: auto; + min-height: var(--sl-input-height-large); + font-size: var(--sl-button-font-size-large); + line-height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2); + border-radius: var(--sl-input-border-radius-large); } - .tab-group__tabs { - display: flex; - position: relative; - } + /* + * Pill modifier + */ - .tab-group__indicator { - position: absolute; - transition: - var(--sl-transition-fast) translate ease, - var(--sl-transition-fast) width ease; + .button--pill.button--small { + border-radius: var(--sl-input-height-small); } - .tab-group--has-scroll-controls .tab-group__nav-container { - position: relative; - padding: 0 var(--sl-spacing-x-large); + .button--pill.button--medium { + border-radius: var(--sl-input-height-medium); } - .tab-group--has-scroll-controls .tab-group__scroll-button--start--hidden, - .tab-group--has-scroll-controls .tab-group__scroll-button--end--hidden { - visibility: hidden; + .button--pill.button--large { + border-radius: var(--sl-input-height-large); } - .tab-group__body { - display: block; - overflow: auto; - } + /* + * Circle modifier + */ - .tab-group__scroll-button { - display: flex; - align-items: center; - justify-content: center; - position: absolute; - top: 0; - bottom: 0; - width: var(--sl-spacing-x-large); + .button--circle { + padding-left: 0; + padding-right: 0; } - .tab-group__scroll-button--start { - left: 0; + .button--circle.button--small { + width: var(--sl-input-height-small); + border-radius: 50%; } - .tab-group__scroll-button--end { - right: 0; + .button--circle.button--medium { + width: var(--sl-input-height-medium); + border-radius: 50%; } - .tab-group--rtl .tab-group__scroll-button--start { - left: auto; - right: 0; + .button--circle.button--large { + width: var(--sl-input-height-large); + border-radius: 50%; } - .tab-group--rtl .tab-group__scroll-button--end { - left: 0; - right: auto; + .button--circle .button__prefix, + .button--circle .button__suffix, + .button--circle .button__caret { + display: none; } /* - * Top + * Caret modifier */ - .tab-group--top { - flex-direction: column; + .button--caret .button__suffix { + display: none; } - .tab-group--top .tab-group__nav-container { - order: 1; + .button--caret .button__caret { + height: auto; } - .tab-group--top .tab-group__nav { - display: flex; - overflow-x: auto; + /* + * Loading modifier + */ - /* Hide scrollbar in Firefox */ - scrollbar-width: none; + .button--loading { + position: relative; + cursor: wait; } - /* Hide scrollbar in Chrome/Safari */ - .tab-group--top .tab-group__nav::-webkit-scrollbar { - width: 0; - height: 0; + .button--loading .button__prefix, + .button--loading .button__label, + .button--loading .button__suffix, + .button--loading .button__caret { + visibility: hidden; } - .tab-group--top .tab-group__tabs { - flex: 1 1 auto; - position: relative; - flex-direction: row; - border-bottom: solid var(--track-width) var(--track-color); + .button--loading sl-spinner { + --indicator-color: currentColor; + position: absolute; + font-size: 1em; + height: 1em; + width: 1em; + top: calc(50% - 0.5em); + left: calc(50% - 0.5em); } - .tab-group--top .tab-group__indicator { - bottom: calc(-1 * var(--track-width)); - border-bottom: solid var(--track-width) var(--indicator-color); - } + /* + * Badges + */ - .tab-group--top .tab-group__body { - order: 2; + .button ::slotted(sl-badge) { + position: absolute; + top: 0; + right: 0; + translate: 50% -50%; + pointer-events: none; } - .tab-group--top ::slotted(sl-tab-panel) { - --padding: var(--sl-spacing-medium) 0; + .button--rtl ::slotted(sl-badge) { + right: auto; + left: 0; + translate: -50% -50%; } /* - * Bottom + * Button spacing */ - .tab-group--bottom { - flex-direction: column; + .button--has-label.button--small .button__label { + padding: 0 var(--sl-spacing-small); } - .tab-group--bottom .tab-group__nav-container { - order: 2; + .button--has-label.button--medium .button__label { + padding: 0 var(--sl-spacing-medium); } - .tab-group--bottom .tab-group__nav { - display: flex; - overflow-x: auto; - - /* Hide scrollbar in Firefox */ - scrollbar-width: none; + .button--has-label.button--large .button__label { + padding: 0 var(--sl-spacing-large); } - /* Hide scrollbar in Chrome/Safari */ - .tab-group--bottom .tab-group__nav::-webkit-scrollbar { - width: 0; - height: 0; + .button--has-prefix.button--small { + padding-inline-start: var(--sl-spacing-x-small); } - .tab-group--bottom .tab-group__tabs { - flex: 1 1 auto; - position: relative; - flex-direction: row; - border-top: solid var(--track-width) var(--track-color); + .button--has-prefix.button--small .button__label { + padding-inline-start: var(--sl-spacing-x-small); } - .tab-group--bottom .tab-group__indicator { - top: calc(-1 * var(--track-width)); - border-top: solid var(--track-width) var(--indicator-color); + .button--has-prefix.button--medium { + padding-inline-start: var(--sl-spacing-small); } - .tab-group--bottom .tab-group__body { - order: 1; + .button--has-prefix.button--medium .button__label { + padding-inline-start: var(--sl-spacing-small); } - .tab-group--bottom ::slotted(sl-tab-panel) { - --padding: var(--sl-spacing-medium) 0; + .button--has-prefix.button--large { + padding-inline-start: var(--sl-spacing-small); } - /* - * Start - */ - - .tab-group--start { - flex-direction: row; + .button--has-prefix.button--large .button__label { + padding-inline-start: var(--sl-spacing-small); } - .tab-group--start .tab-group__nav-container { - order: 1; + .button--has-suffix.button--small, + .button--caret.button--small { + padding-inline-end: var(--sl-spacing-x-small); } - .tab-group--start .tab-group__tabs { - flex: 0 0 auto; - flex-direction: column; - border-inline-end: solid var(--track-width) var(--track-color); + .button--has-suffix.button--small .button__label, + .button--caret.button--small .button__label { + padding-inline-end: var(--sl-spacing-x-small); } - .tab-group--start .tab-group__indicator { - right: calc(-1 * var(--track-width)); - border-right: solid var(--track-width) var(--indicator-color); + .button--has-suffix.button--medium, + .button--caret.button--medium { + padding-inline-end: var(--sl-spacing-small); } - .tab-group--start.tab-group--rtl .tab-group__indicator { - right: auto; - left: calc(-1 * var(--track-width)); + .button--has-suffix.button--medium .button__label, + .button--caret.button--medium .button__label { + padding-inline-end: var(--sl-spacing-small); } - .tab-group--start .tab-group__body { - flex: 1 1 auto; - order: 2; + .button--has-suffix.button--large, + .button--caret.button--large { + padding-inline-end: var(--sl-spacing-small); } - .tab-group--start ::slotted(sl-tab-panel) { - --padding: 0 var(--sl-spacing-medium); + .button--has-suffix.button--large .button__label, + .button--caret.button--large .button__label { + padding-inline-end: var(--sl-spacing-small); } /* - * End + * Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.). + * This means buttons aren't always direct descendants of the button group, thus we can't target them with the + * ::slotted selector. To work around this, the button group component does some magic to add these special classes to + * buttons and we style them here instead. */ - .tab-group--end { - flex-direction: row; + :host([data-sl-button-group__button--first]:not([data-sl-button-group__button--last])) .button { + border-start-end-radius: 0; + border-end-end-radius: 0; } - .tab-group--end .tab-group__nav-container { - order: 2; + :host([data-sl-button-group__button--inner]) .button { + border-radius: 0; } - .tab-group--end .tab-group__tabs { - flex: 0 0 auto; - flex-direction: column; - border-left: solid var(--track-width) var(--track-color); + :host([data-sl-button-group__button--last]:not([data-sl-button-group__button--first])) .button { + border-start-start-radius: 0; + border-end-start-radius: 0; } - .tab-group--end .tab-group__indicator { - left: calc(-1 * var(--track-width)); - border-inline-start: solid var(--track-width) var(--indicator-color); + /* All except the first */ + :host([data-sl-button-group__button]:not([data-sl-button-group__button--first])) { + margin-inline-start: calc(-1 * var(--sl-input-border-width)); } - .tab-group--end.tab-group--rtl .tab-group__indicator { - right: calc(-1 * var(--track-width)); - left: auto; + /* Add a visual separator between solid buttons */ + :host( + [data-sl-button-group__button]:not( + [data-sl-button-group__button--first], + [data-sl-button-group__button--radio], + [variant='default'] + ):not(:hover) + ) + .button:after { + content: ''; + position: absolute; + top: 0; + inset-inline-start: 0; + bottom: 0; + border-left: solid 1px rgb(128 128 128 / 33%); + mix-blend-mode: multiply; } - .tab-group--end .tab-group__body { - flex: 1 1 auto; - order: 1; + /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */ + :host([data-sl-button-group__button--hover]) { + z-index: 1; } - .tab-group--end ::slotted(sl-tab-panel) { - --padding: 0 var(--sl-spacing-medium); + /* Focus and checked are always on top */ + :host([data-sl-button-group__button--focus]), + :host([data-sl-button-group__button][checked]) { + z-index: 2; } -`,He=A` +`,Qt=class{constructor(t,...e){this.slotNames=[],this.handleSlotChange=t=>{const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()},(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some((t=>{if(t.nodeType===t.TEXT_NODE&&""!==t.textContent.trim())return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if("sl-visually-hidden"===e.tagName.toLowerCase())return!1;if(!e.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(t){return null!==this.host.querySelector(`:scope > [slot="${t}"]`)}test(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}},te="";function ee(t){te=t}var oe={name:"default",resolver:t=>function(t=""){if(!te){const t=[...document.getElementsByTagName("script")],e=t.find((t=>t.hasAttribute("data-shoelace")));if(e)ee(e.getAttribute("data-shoelace"));else{const e=t.find((t=>/shoelace(\.min)?\.js($|\?)/.test(t.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(t.src)));let o="";e&&(o=e.getAttribute("src")),ee(o.split("/").slice(0,-1).join("/"))}}return te.replace(/\/$/,"")+(t?`/${t.replace(/^\//,"")}`:"")}(`assets/icons/${t}.svg`)},re={caret:'\n \n \n \n ',check:'\n \n \n \n \n \n \n \n \n \n \n ',"chevron-down":'\n \n \n \n ',"chevron-left":'\n \n \n \n ',"chevron-right":'\n \n \n \n ',copy:'\n \n \n \n ',eye:'\n \n \n \n \n ',"eye-slash":'\n \n \n \n \n \n ',eyedropper:'\n \n \n \n ',"grip-vertical":'\n \n \n \n ',indeterminate:'\n \n \n \n \n \n \n \n \n \n ',"person-fill":'\n \n \n \n ',"play-fill":'\n \n \n \n ',"pause-fill":'\n \n \n \n ',radio:'\n \n \n \n \n \n \n \n ',"star-fill":'\n \n \n \n ',"x-lg":'\n \n \n \n ',"x-circle-fill":'\n \n \n \n '},ie=[oe,{name:"system",resolver:t=>t in re?`data:image/svg+xml,${encodeURIComponent(re[t])}`:""}],se=[];function ne(t){return ie.find((e=>e.name===t))}function ae(t,e){!function(t){ie=ie.filter((e=>e.name!==t))}(t),ie.push({name:t,resolver:e.resolver,mutator:e.mutator,spriteSheet:e.spriteSheet}),se.forEach((e=>{e.library===t&&e.setIcon()}))}var le=s` :host { - display: contents; + display: inline-block; + width: 1em; + height: 1em; + box-sizing: content-box !important; } -`,Ue=class extends qt{constructor(){super(...arguments),this.observedElements=[],this.disabled=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((t=>{this.emit("sl-resize",{detail:{entries:t}})})),this.disabled||this.startObserver()}disconnectedCallback(){super.disconnectedCallback(),this.stopObserver()}handleSlotChange(){this.disabled||this.startObserver()}startObserver(){const t=this.shadowRoot.querySelector("slot");if(null!==t){const e=t.assignedElements({flatten:!0});this.observedElements.forEach((t=>this.resizeObserver.unobserve(t))),this.observedElements=[],e.forEach((t=>{this.resizeObserver.observe(t),this.observedElements.push(t)}))}}stopObserver(){this.resizeObserver.disconnect()}handleDisabledChange(){this.disabled?this.stopObserver():this.startObserver()}render(){return lt` `}};Ue.styles=[Nt,He],u([It({type:Boolean,reflect:!0})],Ue.prototype,"disabled",2),u([Mt("disabled",{waitUntilFirstUpdate:!0})],Ue.prototype,"handleDisabledChange",1);var Ie=new Set;function Ve(t){if(Ie.add(t),!document.documentElement.classList.contains("sl-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}()+function(){const t=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(t)||!t?0:t}();let e=getComputedStyle(document.documentElement).scrollbarGutter;e&&"auto"!==e||(e="stable"),t<2&&(e=""),document.documentElement.style.setProperty("--sl-scroll-lock-gutter",e),document.documentElement.classList.add("sl-scroll-lock"),document.documentElement.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function We(t){Ie.delete(t),0===Ie.size&&(document.documentElement.classList.remove("sl-scroll-lock"),document.documentElement.style.removeProperty("--sl-scroll-lock-size"))}function je(t,e,o="vertical",r="smooth"){const i=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),s=i.top+e.scrollTop,n=i.left+e.scrollLeft,a=e.scrollLeft,l=e.scrollLeft+e.offsetWidth,c=e.scrollTop,h=e.scrollTop+e.offsetHeight;"horizontal"!==o&&"both"!==o||(nl&&e.scrollTo({left:n-e.offsetWidth+t.clientWidth,behavior:r})),"vertical"!==o&&"both"!==o||(sh&&e.scrollTo({top:s-e.offsetHeight+t.clientHeight,behavior:r}))}var qe=class extends qt{constructor(){super(...arguments),this.tabs=[],this.focusableTabs=[],this.panels=[],this.localize=new De(this),this.hasScrollControls=!1,this.shouldHideScrollStartButton=!1,this.shouldHideScrollEndButton=!1,this.placement="top",this.activation="auto",this.noScrollControls=!1,this.fixedScrollControls=!1,this.scrollOffset=1}connectedCallback(){const t=Promise.all([customElements.whenDefined("sl-tab"),customElements.whenDefined("sl-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>{this.repositionIndicator(),this.updateScrollControls()})),this.mutationObserver=new MutationObserver((t=>{const e=t.filter((({target:t})=>{if(t===this)return!0;if(t.closest("sl-tab-group")!==this)return!1;const e=t.tagName.toLowerCase();return"sl-tab"===e||"sl-tab-panel"===e}));if(0!==e.length)if(e.some((t=>!["aria-labelledby","aria-controls"].includes(t.attributeName)))&&setTimeout((()=>this.setAriaLabels())),e.some((t=>"disabled"===t.attributeName)))this.syncTabsAndPanels();else if(e.some((t=>"active"===t.attributeName))){const t=e.filter((t=>"active"===t.attributeName&&"sl-tab"===t.target.tagName.toLowerCase())).map((t=>t.target)),o=t.find((t=>t.active));o&&this.setActiveTab(o)}})),this.updateComplete.then((()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,attributeFilter:["active","disabled","name","panel"],childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),t.then((()=>{new IntersectionObserver(((t,e)=>{var o;t[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab(null!=(o=this.getActiveTab())?o:this.tabs[0],{emitEvents:!1}),e.unobserve(t[0].target))})).observe(this.tabGroup)}))}))}disconnectedCallback(){var t,e;super.disconnectedCallback(),null==(t=this.mutationObserver)||t.disconnect(),this.nav&&(null==(e=this.resizeObserver)||e.unobserve(this.nav))}getAllTabs(){return this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()}getAllPanels(){return[...this.body.assignedElements()].filter((t=>"sl-tab-panel"===t.tagName.toLowerCase()))}getActiveTab(){return this.tabs.find((t=>t.active))}handleClick(t){const e=t.target.closest("sl-tab");(null==e?void 0:e.closest("sl-tab-group"))===this&&null!==e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}handleKeyDown(t){const e=t.target.closest("sl-tab");if((null==e?void 0:e.closest("sl-tab-group"))===this&&(["Enter"," "].includes(t.key)&&null!==e&&(this.setActiveTab(e,{scrollBehavior:"smooth"}),t.preventDefault()),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key))){const e=this.tabs.find((t=>t.matches(":focus"))),o="rtl"===this.localize.dir();let r=null;if("sl-tab"===(null==e?void 0:e.tagName.toLowerCase())){if("Home"===t.key)r=this.focusableTabs[0];else if("End"===t.key)r=this.focusableTabs[this.focusableTabs.length-1];else if(["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&"ArrowUp"===t.key){const t=this.tabs.findIndex((t=>t===e));r=this.findNextFocusableTab(t,"backward")}else if(["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&"ArrowDown"===t.key){const t=this.tabs.findIndex((t=>t===e));r=this.findNextFocusableTab(t,"forward")}if(!r)return;r.tabIndex=0,r.focus({preventScroll:!0}),"auto"===this.activation?this.setActiveTab(r,{scrollBehavior:"smooth"}):this.tabs.forEach((t=>{t.tabIndex=t===r?0:-1})),["top","bottom"].includes(this.placement)&&je(r,this.nav,"horizontal"),t.preventDefault()}}}handleScrollToStart(){this.nav.scroll({left:"rtl"===this.localize.dir()?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:"rtl"===this.localize.dir()?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,e){if(e=h({emitEvents:!0,scrollBehavior:"auto"},e),t!==this.activeTab&&!t.disabled){const o=this.activeTab;this.activeTab=t,this.tabs.forEach((t=>{t.active=t===this.activeTab,t.tabIndex=t===this.activeTab?0:-1})),this.panels.forEach((t=>{var e;return t.active=t.name===(null==(e=this.activeTab)?void 0:e.panel)})),this.syncIndicator(),["top","bottom"].includes(this.placement)&&je(this.activeTab,this.nav,"horizontal",e.scrollBehavior),e.emitEvents&&(o&&this.emit("sl-tab-hide",{detail:{name:o.panel}}),this.emit("sl-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach((t=>{const e=this.panels.find((e=>e.name===t.panel));e&&(t.setAttribute("aria-controls",e.getAttribute("id")),e.setAttribute("aria-labelledby",t.getAttribute("id")))}))}repositionIndicator(){const t=this.getActiveTab();if(!t)return;const e=t.clientWidth,o=t.clientHeight,r="rtl"===this.localize.dir(),i=this.getAllTabs(),s=i.slice(0,i.indexOf(t)).reduce(((t,e)=>({left:t.left+e.clientWidth,top:t.top+e.clientHeight})),{left:0,top:0});switch(this.placement){case"top":case"bottom":this.indicator.style.width=`${e}px`,this.indicator.style.height="auto",this.indicator.style.translate=r?-1*s.left+"px":`${s.left}px`;break;case"start":case"end":this.indicator.style.width="auto",this.indicator.style.height=`${o}px`,this.indicator.style.translate=`0 ${s.top}px`}}syncTabsAndPanels(){this.tabs=this.getAllTabs(),this.focusableTabs=this.tabs.filter((t=>!t.disabled)),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then((()=>this.updateScrollControls()))}findNextFocusableTab(t,e){let o=null;const r="forward"===e?1:-1;let i=t+r;for(;t=this.nav.scrollWidth-this.scrollOffset}scrollFromStart(){return"rtl"===this.localize.dir()?-this.nav.scrollLeft:this.nav.scrollLeft}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth+1,this.updateScrollButtons()}syncIndicator(){this.getActiveTab()?(this.indicator.style.display="block",this.repositionIndicator()):this.indicator.style.display="none"}show(t){const e=this.tabs.find((e=>e.panel===t));e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}render(){const t="rtl"===this.localize.dir();return lt` -
-
- ${this.hasScrollControls?lt` - - `:""} -
-
-
- - - -
-
- - ${this.hasScrollControls?lt` - - `:""} -
- - -
- `}};qe.styles=[Nt,Ne],qe.dependencies={"sl-icon-button":$e,"sl-resize-observer":Ue},u([Wt(".tab-group")],qe.prototype,"tabGroup",2),u([Wt(".tab-group__body")],qe.prototype,"body",2),u([Wt(".tab-group__nav")],qe.prototype,"nav",2),u([Wt(".tab-group__indicator")],qe.prototype,"indicator",2),u([Vt()],qe.prototype,"hasScrollControls",2),u([Vt()],qe.prototype,"shouldHideScrollStartButton",2),u([Vt()],qe.prototype,"shouldHideScrollEndButton",2),u([It()],qe.prototype,"placement",2),u([It()],qe.prototype,"activation",2),u([It({attribute:"no-scroll-controls",type:Boolean})],qe.prototype,"noScrollControls",2),u([It({attribute:"fixed-scroll-controls",type:Boolean})],qe.prototype,"fixedScrollControls",2),u([function(t){return(e,o)=>{const r="function"==typeof e?e:e[o];Object.assign(r,t)}} + svg { + display: block; + height: 100%; + width: 100%; + } +`;function ce(t,e){const o=Pt({waitUntilFirstUpdate:!1},e);return(e,r)=>{const{update:i}=e,s=Array.isArray(t)?t:[t];e.update=function(t){s.forEach((e=>{const i=e;if(t.has(i)){const e=t.get(i),s=this[i];e!==s&&(o.waitUntilFirstUpdate&&!this.hasUpdated||this[r](e,s))}})),i.call(this,t)}}} +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const he={};var de,ue=Symbol(),pe=Symbol(),be=new Map,fe=class extends Vt{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let r;if(null==e?void 0:e.spriteSheet)return this.svg=U` + + `,this.svg;try{if(r=await fetch(t,{mode:"cors"}),!r.ok)return 410===r.status?ue:pe}catch(t){return pe}try{const t=document.createElement("div");t.innerHTML=await r.text();const e=t.firstElementChild;if("svg"!==(null==(o=null==e?void 0:e.tagName)?void 0:o.toLowerCase()))return ue;de||(de=new DOMParser);const i=de.parseFromString(e.outerHTML,"text/html").body.querySelector("svg");return i?(i.part.add("svg"),document.adoptNode(i)):ue}catch(t){return ue}}connectedCallback(){var t;super.connectedCallback(),t=this,se.push(t)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,se=se.filter((e=>e!==t))}getIconSource(){const t=ne(this.library);return this.name&&t?{url:t.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){"string"==typeof this.label&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var t;const{url:e,fromLibrary:o}=this.getIconSource(),r=o?ne(this.library):void 0;if(!e)return void(this.svg=null);let i=be.get(e);if(i||(i=this.resolveIcon(e,r),be.set(e,i)),!this.initialRender)return;const s=await i;if(s===pe&&be.delete(e),e===this.getIconSource().url)if((t=>void 0!==t?._$litType$)(s)){if(this.svg=s,r){await this.updateComplete;const t=this.shadowRoot.querySelector("[part='svg']");"function"==typeof r.mutator&&t&&r.mutator(t)}}else switch(s){case pe:case ue:this.svg=null,this.emit("sl-error");break;default:this.svg=s.cloneNode(!0),null==(t=null==r?void 0:r.mutator)||t.call(r,this.svg),this.emit("sl-load")}}render(){return this.svg}};fe.styles=[wt,le],Ot([Ht()],fe.prototype,"svg",2),Ot([Nt({reflect:!0})],fe.prototype,"name",2),Ot([Nt()],fe.prototype,"src",2),Ot([Nt()],fe.prototype,"label",2),Ot([Nt({reflect:!0})],fe.prototype,"library",2),Ot([ce("label")],fe.prototype,"handleLabelChange",1),Ot([ce(["name","src","library"])],fe.prototype,"setIcon",1); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */({passive:!0})],qe.prototype,"updateScrollButtons",1),u([Mt("noScrollControls",{waitUntilFirstUpdate:!0})],qe.prototype,"updateScrollControls",1),u([Mt("placement",{waitUntilFirstUpdate:!0})],qe.prototype,"syncIndicator",1),qe.define("sl-tab-group");var Ke=(t,e)=>{let o=0;return function(...r){window.clearTimeout(o),o=window.setTimeout((()=>{t.call(this,...r)}),e)}},Ze=(t,e,o)=>{const r=t[e];t[e]=function(...t){r.call(this,...t),o.call(this,r,...t)}};(()=>{if("undefined"==typeof window)return;if(!("onscrollend"in window)){const t=new Set,e=new WeakMap,o=e=>{for(const o of e.changedTouches)t.add(o.identifier)},r=e=>{for(const o of e.changedTouches)t.delete(o.identifier)};document.addEventListener("touchstart",o,!0),document.addEventListener("touchend",r,!0),document.addEventListener("touchcancel",r,!0),Ze(EventTarget.prototype,"addEventListener",(function(o,r){if("scrollend"!==r)return;const i=Ke((()=>{t.size?i():this.dispatchEvent(new Event("scrollend"))}),100);o.call(this,"scroll",i,{passive:!0}),e.set(this,i)})),Ze(EventTarget.prototype,"removeEventListener",(function(t,o){if("scrollend"!==o)return;const r=e.get(this);r&&t.call(this,"scroll",r,{passive:!0})}))}})();var Ge=A` + */ +const ge=1,me=3,ve=4,ye=t=>(...e)=>({_$litDirective$:t,values:e});let we=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}; +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const _e=ye(class extends we{constructor(t){if(super(t),t.type!==ge||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const o=t.element.classList;for(const t of this.st)t in e||(o.remove(t),this.st.delete(t));for(const t in e){const r=!!e[t];r===this.st.has(t)||this.nt?.has(t)||(r?(o.add(t),this.st.add(t)):(o.remove(t),this.st.delete(t)))}return I}}),xe=Symbol.for(""),ke=t=>{if(t?.r===xe)return t?._$litStatic$},$e=(t,...e)=>({_$litStatic$:e.reduce(((e,o,r)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[r+1]),t[0]),r:xe}),Ce=new Map,Ae=(t=>(e,...o)=>{const r=o.length;let i,s;const n=[],a=[];let l,c=0,h=!1;for(;ct??V; +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Se=class extends Vt{constructor(){super(...arguments),this.formControlController=new Xt(this,{assumeInteractionOn:["click"]}),this.hasSlotController=new Qt(this,"[default]","prefix","suffix"),this.localize=new yt(this),this.hasFocus=!1,this.invalid=!1,this.title="",this.variant="default",this.size="medium",this.caret=!1,this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href="",this.rel="noreferrer noopener"}get validity(){return this.isButton()?this.button.validity:Yt}get validationMessage(){return this.isButton()?this.button.validationMessage:""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(){"submit"===this.type&&this.formControlController.submit(this),"reset"===this.type&&this.formControlController.reset(this)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}checkValidity(){return!this.isButton()||this.button.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return!this.isButton()||this.button.reportValidity()}setCustomValidity(t){this.isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}render(){const t=this.isLink(),e=t?$e`a`:$e`button`;return Ae` + <${e} + part="base" + class=${_e({button:!0,"button--default":"default"===this.variant,"button--primary":"primary"===this.variant,"button--success":"success"===this.variant,"button--neutral":"neutral"===this.variant,"button--warning":"warning"===this.variant,"button--danger":"danger"===this.variant,"button--text":"text"===this.variant,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--caret":this.caret,"button--circle":this.circle,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--loading":this.loading,"button--standard":!this.outline,"button--outline":this.outline,"button--pill":this.pill,"button--rtl":"rtl"===this.localize.dir(),"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})} + ?disabled=${Ee(t?void 0:this.disabled)} + type=${Ee(t?void 0:this.type)} + title=${this.title} + name=${Ee(t?void 0:this.name)} + value=${Ee(t?void 0:this.value)} + href=${Ee(t&&!this.disabled?this.href:void 0)} + target=${Ee(t?this.target:void 0)} + download=${Ee(t?this.download:void 0)} + rel=${Ee(t?this.rel:void 0)} + role=${Ee(t?void 0:"button")} + aria-disabled=${this.disabled?"true":"false"} + tabindex=${this.disabled?"-1":"0"} + @blur=${this.handleBlur} + @focus=${this.handleFocus} + @invalid=${this.isButton()?this.handleInvalid:null} + @click=${this.handleClick} + > + + + + ${this.caret?Ae` `:""} + ${this.loading?Ae``:""} + + `}};function*ze(t=document.activeElement){null!=t&&(yield t,"shadowRoot"in t&&t.shadowRoot&&"closed"!==t.shadowRoot.mode&&(yield*Dt(ze(t.shadowRoot.activeElement))))}Se.styles=[wt,Jt],Se.dependencies={"sl-icon":fe,"sl-spinner":Wt},Ot([Ut(".button")],Se.prototype,"button",2),Ot([Ht()],Se.prototype,"hasFocus",2),Ot([Ht()],Se.prototype,"invalid",2),Ot([Nt()],Se.prototype,"title",2),Ot([Nt({reflect:!0})],Se.prototype,"variant",2),Ot([Nt({reflect:!0})],Se.prototype,"size",2),Ot([Nt({type:Boolean,reflect:!0})],Se.prototype,"caret",2),Ot([Nt({type:Boolean,reflect:!0})],Se.prototype,"disabled",2),Ot([Nt({type:Boolean,reflect:!0})],Se.prototype,"loading",2),Ot([Nt({type:Boolean,reflect:!0})],Se.prototype,"outline",2),Ot([Nt({type:Boolean,reflect:!0})],Se.prototype,"pill",2),Ot([Nt({type:Boolean,reflect:!0})],Se.prototype,"circle",2),Ot([Nt()],Se.prototype,"type",2),Ot([Nt()],Se.prototype,"name",2),Ot([Nt()],Se.prototype,"value",2),Ot([Nt()],Se.prototype,"href",2),Ot([Nt()],Se.prototype,"target",2),Ot([Nt()],Se.prototype,"rel",2),Ot([Nt()],Se.prototype,"download",2),Ot([Nt()],Se.prototype,"form",2),Ot([Nt({attribute:"formaction"})],Se.prototype,"formAction",2),Ot([Nt({attribute:"formenctype"})],Se.prototype,"formEnctype",2),Ot([Nt({attribute:"formmethod"})],Se.prototype,"formMethod",2),Ot([Nt({attribute:"formnovalidate",type:Boolean})],Se.prototype,"formNoValidate",2),Ot([Nt({attribute:"formtarget"})],Se.prototype,"formTarget",2),Ot([ce("disabled",{waitUntilFirstUpdate:!0})],Se.prototype,"handleDisabledChange",1),Se.define("sl-button");var Te=new WeakMap;function Pe(t){let e=Te.get(t);return e||(e=window.getComputedStyle(t,null),Te.set(t,e)),e}function Le(t){const e=t.tagName.toLowerCase(),o=Number(t.getAttribute("tabindex"));if(t.hasAttribute("tabindex")&&(isNaN(o)||o<=-1))return!1;if(t.hasAttribute("disabled"))return!1;if(t.closest("[inert]"))return!1;if("input"===e&&"radio"===t.getAttribute("type")){const e=t.getRootNode(),o=`input[type='radio'][name="${t.getAttribute("name")}"]`,r=e.querySelector(`${o}:checked`);if(r)return r===t;return e.querySelector(o)===t}if(!function(t){if("function"==typeof t.checkVisibility)return t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});const e=Pe(t);return"hidden"!==e.visibility&&"none"!==e.display}(t))return!1;if(("audio"===e||"video"===e)&&t.hasAttribute("controls"))return!0;if(t.hasAttribute("tabindex"))return!0;if(t.hasAttribute("contenteditable")&&"false"!==t.getAttribute("contenteditable"))return!0;return!!["button","input","select","textarea","a","audio","video","summary","iframe"].includes(e)||function(t){const e=Pe(t),{overflowY:o,overflowX:r}=e;return"scroll"===o||"scroll"===r||"auto"===o&&"auto"===r&&(t.scrollHeight>t.clientHeight&&"auto"===o||!(!(t.scrollWidth>t.clientWidth)||"auto"!==r))}(t)}function Oe(t){const e=new WeakMap,o=[];return function r(i){if(i instanceof Element){if(i.hasAttribute("inert")||i.closest("[inert]"))return;if(e.has(i))return;e.set(i,!0),!o.includes(i)&&Le(i)&&o.push(i),i instanceof HTMLSlotElement&&function(t,e){var o;return(null==(o=t.getRootNode({composed:!0}))?void 0:o.host)!==e}(i,t)&&i.assignedElements({flatten:!0}).forEach((t=>{r(t)})),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&r(i.shadowRoot)}for(const t of i.children)r(t)}(t),o.sort(((t,e)=>{const o=Number(t.getAttribute("tabindex"))||0;return(Number(e.getAttribute("tabindex"))||0)-o}))}var Be=[],Fe=class{constructor(t){this.tabDirection="forward",this.handleFocusIn=()=>{this.isActive()&&this.checkFocus()},this.handleKeyDown=t=>{var e;if("Tab"!==t.key||this.isExternalActivated)return;if(!this.isActive())return;const o=[...ze()].pop();if(this.previousFocus=o,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;t.shiftKey?this.tabDirection="backward":this.tabDirection="forward";const r=Oe(this.element);let i=r.findIndex((t=>t===o));this.previousFocus=this.currentFocus;const s="forward"===this.tabDirection?1:-1;for(;;){i+s>=r.length?i=0:i+s<0?i=r.length-1:i+=s,this.previousFocus=this.currentFocus;const o=r[i];if("backward"===this.tabDirection&&this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;if(o&&this.possiblyHasTabbableChildren(o))return;t.preventDefault(),this.currentFocus=o,null==(e=this.currentFocus)||e.focus({preventScroll:!1});const n=[...ze()];if(n.includes(this.currentFocus)||!n.includes(this.previousFocus))break}setTimeout((()=>this.checkFocus()))},this.handleKeyUp=()=>{this.tabDirection="forward"},this.element=t,this.elementsWithTabbableControls=["iframe"]}activate(){Be.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Be=Be.filter((t=>t!==this.element)),this.currentFocus=null,document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Be[Be.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const t=Oe(this.element);if(!this.element.matches(":focus-within")){const e=t[0],o=t[t.length-1],r="forward"===this.tabDirection?e:o;"function"==typeof(null==r?void 0:r.focus)&&(this.currentFocus=r,r.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(t){return this.elementsWithTabbableControls.includes(t.tagName.toLowerCase())||t.hasAttribute("controls")}};var De=new Set;function Re(t){if(De.add(t),!document.documentElement.classList.contains("sl-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}()+function(){const t=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(t)||!t?0:t}();let e=getComputedStyle(document.documentElement).scrollbarGutter;e&&"auto"!==e||(e="stable"),t<2&&(e=""),document.documentElement.style.setProperty("--sl-scroll-lock-gutter",e),document.documentElement.classList.add("sl-scroll-lock"),document.documentElement.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function Me(t){De.delete(t),0===De.size&&(document.documentElement.classList.remove("sl-scroll-lock"),document.documentElement.style.removeProperty("--sl-scroll-lock-size"))}function Ne(t,e,o="vertical",r="smooth"){const i=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),s=i.top+e.scrollTop,n=i.left+e.scrollLeft,a=e.scrollLeft,l=e.scrollLeft+e.offsetWidth,c=e.scrollTop,h=e.scrollTop+e.offsetHeight;"horizontal"!==o&&"both"!==o||(nl&&e.scrollTo({left:n-e.offsetWidth+t.clientWidth,behavior:r})),"vertical"!==o&&"both"!==o||(sh&&e.scrollTo({top:s-e.offsetHeight+t.clientHeight,behavior:r}))}var He=s` :host { - --padding: 0; + --width: 31rem; + --header-spacing: var(--sl-spacing-large); + --body-spacing: var(--sl-spacing-large); + --footer-spacing: var(--sl-spacing-large); - display: none; + display: contents; } - :host([active]) { - display: block; + .dialog { + display: flex; + align-items: center; + justify-content: center; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: var(--sl-z-index-dialog); } - .tab-panel { - display: block; - padding: var(--padding); + .dialog__panel { + display: flex; + flex-direction: column; + z-index: 2; + width: var(--width); + max-width: calc(100% - var(--sl-spacing-2x-large)); + max-height: calc(100% - var(--sl-spacing-2x-large)); + background-color: var(--sl-panel-background-color); + border-radius: var(--sl-border-radius-medium); + box-shadow: var(--sl-shadow-x-large); } -`,Xe=0,Ye=class extends qt{constructor(){super(...arguments),this.attrId=++Xe,this.componentId=`sl-tab-panel-${this.attrId}`,this.name="",this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return lt` - - `}};Ye.styles=[Nt,Ge],u([It({reflect:!0})],Ye.prototype,"name",2),u([It({type:Boolean,reflect:!0})],Ye.prototype,"active",2),u([Mt("active")],Ye.prototype,"handleActiveChange",1),Ye.define("sl-tab-panel");var Je=A` - :host { - --max-width: 20rem; - --hide-delay: 0ms; - --show-delay: 150ms; - display: contents; + .dialog__panel:focus { + outline: none; } - .tooltip { - --arrow-size: var(--sl-tooltip-arrow-size); - --arrow-color: var(--sl-tooltip-background-color); + /* Ensure there's enough vertical padding for phones that don't update vh when chrome appears (e.g. iPhone) */ + @media screen and (max-width: 420px) { + .dialog__panel { + max-height: 80vh; + } } - .tooltip::part(popup) { - z-index: var(--sl-z-index-tooltip); + .dialog--open .dialog__panel { + display: flex; + opacity: 1; } - .tooltip[placement^='top']::part(popup) { - transform-origin: bottom; + .dialog__header { + flex: 0 0 auto; + display: flex; } - .tooltip[placement^='bottom']::part(popup) { - transform-origin: top; + .dialog__title { + flex: 1 1 auto; + font: inherit; + font-size: var(--sl-font-size-large); + line-height: var(--sl-line-height-dense); + padding: var(--header-spacing); + margin: 0; } - .tooltip[placement^='left']::part(popup) { - transform-origin: right; + .dialog__header-actions { + flex-shrink: 0; + display: flex; + flex-wrap: wrap; + justify-content: end; + gap: var(--sl-spacing-2x-small); + padding: 0 var(--header-spacing); } - .tooltip[placement^='right']::part(popup) { - transform-origin: left; + .dialog__header-actions sl-icon-button, + .dialog__header-actions ::slotted(sl-icon-button) { + flex: 0 0 auto; + display: flex; + align-items: center; + font-size: var(--sl-font-size-medium); } - .tooltip__body { + .dialog__body { + flex: 1 1 auto; display: block; - width: max-content; - max-width: var(--max-width); - border-radius: var(--sl-tooltip-border-radius); - background-color: var(--sl-tooltip-background-color); - font-family: var(--sl-tooltip-font-family); - font-size: var(--sl-tooltip-font-size); - font-weight: var(--sl-tooltip-font-weight); - line-height: var(--sl-tooltip-line-height); - text-align: start; - white-space: normal; - color: var(--sl-tooltip-color); - padding: var(--sl-tooltip-padding); - pointer-events: none; - user-select: none; - -webkit-user-select: none; + padding: var(--body-spacing); + overflow: auto; + -webkit-overflow-scrolling: touch; } -`,Qe=A` - :host { - --arrow-color: var(--sl-color-neutral-1000); - --arrow-size: 6px; - /* - * These properties are computed to account for the arrow's dimensions after being rotated 45ยบ. The constant - * 0.7071 is derived from sin(45), which is the diagonal size of the arrow's container after rotating. - */ - --arrow-size-diagonal: calc(var(--arrow-size) * 0.7071); - --arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size)); + .dialog__footer { + flex: 0 0 auto; + text-align: right; + padding: var(--footer-spacing); + } - display: contents; + .dialog__footer ::slotted(sl-button:not(:first-of-type)) { + margin-inline-start: var(--sl-spacing-x-small); + } + + .dialog:not(.dialog--has-footer) .dialog__footer { + display: none; + } + + .dialog__overlay { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: var(--sl-overlay-background-color); + } + + @media (forced-colors: active) { + .dialog__panel { + border: solid 1px var(--sl-color-neutral-0); + } + } +`,Ue=s` + :host { + display: inline-block; + color: var(--sl-color-neutral-600); + } + + .icon-button { + flex: 0 0 auto; + display: flex; + align-items: center; + background: none; + border: none; + border-radius: var(--sl-border-radius-medium); + font-size: inherit; + color: inherit; + padding: var(--sl-spacing-x-small); + cursor: pointer; + transition: var(--sl-transition-x-fast) color; + -webkit-appearance: none; } - .popup { - position: absolute; - isolation: isolate; - max-width: var(--auto-size-available-width, none); - max-height: var(--auto-size-available-height, none); + .icon-button:hover:not(.icon-button--disabled), + .icon-button:focus-visible:not(.icon-button--disabled) { + color: var(--sl-color-primary-600); } - .popup--fixed { - position: fixed; + .icon-button:active:not(.icon-button--disabled) { + color: var(--sl-color-primary-700); } - .popup:not(.popup--active) { - display: none; + .icon-button:focus { + outline: none; } - .popup__arrow { - position: absolute; - width: calc(var(--arrow-size-diagonal) * 2); - height: calc(var(--arrow-size-diagonal) * 2); - rotate: 45deg; - background: var(--arrow-color); - z-index: -1; + .icon-button--disabled { + opacity: 0.5; + cursor: not-allowed; } - /* Hover bridge */ - .popup-hover-bridge:not(.popup-hover-bridge--visible) { - display: none; + .icon-button:focus-visible { + outline: var(--sl-focus-ring); + outline-offset: var(--sl-focus-ring-offset); } - .popup-hover-bridge { - position: fixed; - z-index: calc(var(--sl-z-index-dropdown) - 1); - top: 0; - right: 0; - bottom: 0; - left: 0; - clip-path: polygon( - var(--hover-bridge-top-left-x, 0) var(--hover-bridge-top-left-y, 0), - var(--hover-bridge-top-right-x, 0) var(--hover-bridge-top-right-y, 0), - var(--hover-bridge-bottom-right-x, 0) var(--hover-bridge-bottom-right-y, 0), - var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0) - ); + .icon-button__icon { + pointer-events: none; } -`;const to=Math.min,eo=Math.max,oo=Math.round,ro=Math.floor,io=t=>({x:t,y:t}),so={left:"right",right:"left",bottom:"top",top:"bottom"},no={start:"end",end:"start"};function ao(t,e,o){return eo(t,to(e,o))}function lo(t,e){return"function"==typeof t?t(e):t}function co(t){return t.split("-")[0]}function ho(t){return t.split("-")[1]}function uo(t){return"x"===t?"y":"x"}function po(t){return"y"===t?"height":"width"}const bo=new Set(["top","bottom"]);function fo(t){return bo.has(co(t))?"y":"x"}function go(t){return uo(fo(t))}function mo(t){return t.replace(/start|end/g,(t=>no[t]))}const vo=["left","right"],yo=["right","left"],wo=["top","bottom"],_o=["bottom","top"];function xo(t,e,o,r){const i=ho(t);let s=function(t,e,o){switch(t){case"top":case"bottom":return o?e?yo:vo:e?vo:yo;case"left":case"right":return e?wo:_o;default:return[]}}(co(t),"start"===o,r);return i&&(s=s.map((t=>t+"-"+i)),e&&(s=s.concat(s.map(mo)))),s}function ko(t){return t.replace(/left|right|bottom|top/g,(t=>so[t]))}function $o(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function Co(t){const{x:e,y:o,width:r,height:i}=t;return{width:r,height:i,top:o,left:e,right:e+r,bottom:o+i,x:e,y:o}}function Ao(t,e,o){let{reference:r,floating:i}=t;const s=fo(e),n=go(e),a=po(n),l=co(e),c="y"===s,h=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,u=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:h,y:r.y-i.height};break;case"bottom":p={x:h,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ho(e)){case"start":p[n]-=u*(o&&c?-1:1);break;case"end":p[n]+=u*(o&&c?-1:1)}return p}async function Eo(t,e){var o;void 0===e&&(e={});const{x:r,y:i,platform:s,rects:n,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:u=!1,padding:p=0}=lo(e,t),b=$o(p),f=a[u?"floating"===d?"reference":"floating":d],g=Co(await s.getClippingRect({element:null==(o=await(null==s.isElement?void 0:s.isElement(f)))||o?f:f.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),m="floating"===d?{x:r,y:i,width:n.floating.width,height:n.floating.height}:n.reference,v=await(null==s.getOffsetParent?void 0:s.getOffsetParent(a.floating)),y=await(null==s.isElement?void 0:s.isElement(v))&&await(null==s.getScale?void 0:s.getScale(v))||{x:1,y:1},w=Co(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-w.top+b.top)/y.y,bottom:(w.bottom-g.bottom+b.bottom)/y.y,left:(g.left-w.left+b.left)/y.x,right:(w.right-g.right+b.right)/y.x}}const So=new Set(["left","top"]);function zo(){return"undefined"!=typeof window}function To(t){return Oo(t)?(t.nodeName||"").toLowerCase():"#document"}function Po(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Lo(t){var e;return null==(e=(Oo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Oo(t){return!!zo()&&(t instanceof Node||t instanceof Po(t).Node)}function Bo(t){return!!zo()&&(t instanceof Element||t instanceof Po(t).Element)}function Fo(t){return!!zo()&&(t instanceof HTMLElement||t instanceof Po(t).HTMLElement)}function Do(t){return!(!zo()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof Po(t).ShadowRoot)}const Ro=new Set(["inline","contents"]);function Mo(t){const{overflow:e,overflowX:o,overflowY:r,display:i}=Xo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+o)&&!Ro.has(i)}const No=new Set(["table","td","th"]);function Ho(t){return No.has(To(t))}const Uo=[":popover-open",":modal"];function Io(t){return Uo.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}const Vo=["transform","translate","scale","rotate","perspective"],Wo=["transform","translate","scale","rotate","perspective","filter"],jo=["paint","layout","strict","content"];function qo(t){const e=Ko(),o=Bo(t)?Xo(t):t;return Vo.some((t=>!!o[t]&&"none"!==o[t]))||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||Wo.some((t=>(o.willChange||"").includes(t)))||jo.some((t=>(o.contain||"").includes(t)))}function Ko(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Zo=new Set(["html","body","#document"]);function Go(t){return Zo.has(To(t))}function Xo(t){return Po(t).getComputedStyle(t)}function Yo(t){return Bo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Jo(t){if("html"===To(t))return t;const e=t.assignedSlot||t.parentNode||Do(t)&&t.host||Lo(t);return Do(e)?e.host:e}function Qo(t){const e=Jo(t);return Go(e)?t.ownerDocument?t.ownerDocument.body:t.body:Fo(e)&&Mo(e)?e:Qo(e)}function tr(t,e,o){var r;void 0===e&&(e=[]),void 0===o&&(o=!0);const i=Qo(t),s=i===(null==(r=t.ownerDocument)?void 0:r.body),n=Po(i);if(s){const t=er(n);return e.concat(n,n.visualViewport||[],Mo(i)?i:[],t&&o?tr(t):[])}return e.concat(i,tr(i,[],o))}function er(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function or(t){const e=Xo(t);let o=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Fo(t),s=i?t.offsetWidth:o,n=i?t.offsetHeight:r,a=oo(o)!==s||oo(r)!==n;return a&&(o=s,r=n),{width:o,height:r,$:a}}function rr(t){return Bo(t)?t:t.contextElement}function ir(t){const e=rr(t);if(!Fo(e))return io(1);const o=e.getBoundingClientRect(),{width:r,height:i,$:s}=or(e);let n=(s?oo(o.width):o.width)/r,a=(s?oo(o.height):o.height)/i;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const sr=io(0);function nr(t){const e=Po(t);return Ko()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:sr}function ar(t,e,o,r){void 0===e&&(e=!1),void 0===o&&(o=!1);const i=t.getBoundingClientRect(),s=rr(t);let n=io(1);e&&(r?Bo(r)&&(n=ir(r)):n=ir(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==Po(t))&&e}(s,o,r)?nr(s):io(0);let l=(i.left+a.x)/n.x,c=(i.top+a.y)/n.y,h=i.width/n.x,d=i.height/n.y;if(s){const t=Po(s),e=r&&Bo(r)?Po(r):r;let o=t,i=er(o);for(;i&&r&&e!==o;){const t=ir(i),e=i.getBoundingClientRect(),r=Xo(i),s=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,n=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,d*=t.y,l+=s,c+=n,o=Po(i),i=er(o)}}return Co({width:h,height:d,x:l,y:c})}function lr(t,e){const o=Yo(t).scrollLeft;return e?e.left+o:ar(Lo(t)).left+o}function cr(t,e){const o=t.getBoundingClientRect();return{x:o.left+e.scrollLeft-lr(t,o),y:o.top+e.scrollTop}}const hr=25;const dr=new Set(["absolute","fixed"]);function ur(t,e,o){let r;if("viewport"===e)r=function(t,e){const o=Po(t),r=Lo(t),i=o.visualViewport;let s=r.clientWidth,n=r.clientHeight,a=0,l=0;if(i){s=i.width,n=i.height;const t=Ko();(!t||t&&"fixed"===e)&&(a=i.offsetLeft,l=i.offsetTop)}const c=lr(r);if(c<=0){const t=r.ownerDocument,e=t.body,o=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(o.marginLeft)+parseFloat(o.marginRight)||0,n=Math.abs(r.clientWidth-e.clientWidth-i);n<=hr&&(s-=n)}else c<=hr&&(s+=c);return{width:s,height:n,x:a,y:l}}(t,o);else if("document"===e)r=function(t){const e=Lo(t),o=Yo(t),r=t.ownerDocument.body,i=eo(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=eo(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let n=-o.scrollLeft+lr(t);const a=-o.scrollTop;return"rtl"===Xo(r).direction&&(n+=eo(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:n,y:a}}(Lo(t));else if(Bo(e))r=function(t,e){const o=ar(t,!0,"fixed"===e),r=o.top+t.clientTop,i=o.left+t.clientLeft,s=Fo(t)?ir(t):io(1);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:i*s.x,y:r*s.y}}(e,o);else{const o=nr(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Co(r)}function pr(t,e){const o=Jo(t);return!(o===e||!Bo(o)||Go(o))&&("fixed"===Xo(o).position||pr(o,e))}function br(t,e,o){const r=Fo(e),i=Lo(e),s="fixed"===o,n=ar(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=io(0);function c(){l.x=lr(i)}if(r||!r&&!s)if(("body"!==To(e)||Mo(i))&&(a=Yo(e)),r){const t=ar(e,!0,s,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&c();s&&!r&&i&&c();const h=!i||r||s?io(0):cr(i,a);return{x:n.left+a.scrollLeft-l.x-h.x,y:n.top+a.scrollTop-l.y-h.y,width:n.width,height:n.height}}function fr(t){return"static"===Xo(t).position}function gr(t,e){if(!Fo(t)||"fixed"===Xo(t).position)return null;if(e)return e(t);let o=t.offsetParent;return Lo(t)===o&&(o=o.ownerDocument.body),o}function mr(t,e){const o=Po(t);if(Io(t))return o;if(!Fo(t)){let e=Jo(t);for(;e&&!Go(e);){if(Bo(e)&&!fr(e))return e;e=Jo(e)}return o}let r=gr(t,e);for(;r&&Ho(r)&&fr(r);)r=gr(r,e);return r&&Go(r)&&fr(r)&&!qo(r)?o:r||function(t){let e=Jo(t);for(;Fo(e)&&!Go(e);){if(qo(e))return e;if(Io(e))return null;e=Jo(e)}return null}(t)||o}const vr={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:o,offsetParent:r,strategy:i}=t;const s="fixed"===i,n=Lo(r),a=!!e&&Io(e.floating);if(r===n||a&&s)return o;let l={scrollLeft:0,scrollTop:0},c=io(1);const h=io(0),d=Fo(r);if((d||!d&&!s)&&(("body"!==To(r)||Mo(n))&&(l=Yo(r)),Fo(r))){const t=ar(r);c=ir(r),h.x=t.x+r.clientLeft,h.y=t.y+r.clientTop}const u=!n||d||s?io(0):cr(n,l);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+h.x+u.x,y:o.y*c.y-l.scrollTop*c.y+h.y+u.y}},getDocumentElement:Lo,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:r,strategy:i}=t;const s=[..."clippingAncestors"===o?Io(e)?[]:function(t,e){const o=e.get(t);if(o)return o;let r=tr(t,[],!1).filter((t=>Bo(t)&&"body"!==To(t))),i=null;const s="fixed"===Xo(t).position;let n=s?Jo(t):t;for(;Bo(n)&&!Go(n);){const e=Xo(n),o=qo(n);o||"fixed"!==e.position||(i=null),(s?!o&&!i:!o&&"static"===e.position&&i&&dr.has(i.position)||Mo(n)&&!o&&pr(t,n))?r=r.filter((t=>t!==n)):i=e,n=Jo(n)}return e.set(t,r),r}(e,this._c):[].concat(o),r],n=s[0],a=s.reduce(((t,o)=>{const r=ur(e,o,i);return t.top=eo(r.top,t.top),t.right=to(r.right,t.right),t.bottom=to(r.bottom,t.bottom),t.left=eo(r.left,t.left),t}),ur(e,n,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:mr,getElementRects:async function(t){const e=this.getOffsetParent||mr,o=this.getDimensions,r=await o(t.floating);return{reference:br(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=or(t);return{width:e,height:o}},getScale:ir,isElement:Bo,isRTL:function(t){return"rtl"===Xo(t).direction}};function yr(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function wr(t,e,o,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=rr(t),h=i||s?[...c?tr(c):[],...tr(e)]:[];h.forEach((t=>{i&&t.addEventListener("scroll",o,{passive:!0}),s&&t.addEventListener("resize",o)}));const d=c&&a?function(t,e){let o,r=null;const i=Lo(t);function s(){var t;clearTimeout(o),null==(t=r)||t.disconnect(),r=null}return function n(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),s();const c=t.getBoundingClientRect(),{left:h,top:d,width:u,height:p}=c;if(a||e(),!u||!p)return;const b={rootMargin:-ro(d)+"px "+-ro(i.clientWidth-(h+u))+"px "+-ro(i.clientHeight-(d+p))+"px "+-ro(h)+"px",threshold:eo(0,to(1,l))||1};let f=!0;function g(e){const r=e[0].intersectionRatio;if(r!==l){if(!f)return n();r?n(!1,r):o=setTimeout((()=>{n(!1,1e-7)}),1e3)}1!==r||yr(c,t.getBoundingClientRect())||n(),f=!1}try{r=new IntersectionObserver(g,{...b,root:i.ownerDocument})}catch(t){r=new IntersectionObserver(g,b)}r.observe(t)}(!0),s}(c,o):null;let u,p=-1,b=null;n&&(b=new ResizeObserver((t=>{let[r]=t;r&&r.target===c&&b&&(b.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=b)||t.observe(e)}))),o()})),c&&!l&&b.observe(c),b.observe(e));let f=l?ar(t):null;return l&&function e(){const r=ar(t);f&&!yr(f,r)&&o();f=r,u=requestAnimationFrame(e)}(),o(),()=>{var t;h.forEach((t=>{i&&t.removeEventListener("scroll",o),s&&t.removeEventListener("resize",o)})),null==d||d(),null==(t=b)||t.disconnect(),b=null,l&&cancelAnimationFrame(u)}}const _r=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var o,r;const{x:i,y:s,placement:n,middlewareData:a}=e,l=await async function(t,e){const{placement:o,platform:r,elements:i}=t,s=await(null==r.isRTL?void 0:r.isRTL(i.floating)),n=co(o),a=ho(o),l="y"===fo(o),c=So.has(n)?-1:1,h=s&&l?-1:1,d=lo(e,t);let{mainAxis:u,crossAxis:p,alignmentAxis:b}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof b&&(p="end"===a?-1*b:b),l?{x:p*h,y:u*c}:{x:u*c,y:p*h}}(e,t);return n===(null==(o=a.offset)?void 0:o.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:n}}}}},xr=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:n=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=lo(t,e),c={x:o,y:r},h=await Eo(e,l),d=fo(co(i)),u=uo(d);let p=c[u],b=c[d];if(s){const t="y"===u?"bottom":"right";p=ao(p+h["y"===u?"top":"left"],p,p-h[t])}if(n){const t="y"===d?"bottom":"right";b=ao(b+h["y"===d?"top":"left"],b,b-h[t])}const f=a.fn({...e,[u]:p,[d]:b});return{...f,data:{x:f.x-o,y:f.y-r,enabled:{[u]:s,[d]:n}}}}}},kr=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,r;const{placement:i,middlewareData:s,rects:n,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:f=!0,...g}=lo(t,e);if(null!=(o=s.arrow)&&o.alignmentOffset)return{};const m=co(i),v=fo(a),y=co(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),_=u||(y||!f?[ko(a)]:function(t){const e=ko(t);return[mo(t),e,mo(e)]}(a)),x="none"!==b;!u&&x&&_.push(...xo(a,f,b,w));const k=[a,..._],$=await Eo(e,g),C=[];let A=(null==(r=s.flip)?void 0:r.overflows)||[];if(h&&C.push($[m]),d){const t=function(t,e,o){void 0===o&&(o=!1);const r=ho(t),i=go(t),s=po(i);let n="x"===i?r===(o?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[s]>e.floating[s]&&(n=ko(n)),[n,ko(n)]}(i,n,w);C.push($[t[0]],$[t[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every((t=>t<=0))){var E,S;const t=((null==(E=s.flip)?void 0:E.index)||0)+1,e=k[t];if(e){if(!("alignment"===d&&v!==fo(e))||A.every((t=>fo(t.placement)!==v||t.overflows[0]>0)))return{data:{index:t,overflows:A},reset:{placement:e}}}let o=null==(S=A.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:S.placement;if(!o)switch(p){case"bestFit":{var z;const t=null==(z=A.filter((t=>{if(x){const e=fo(t.placement);return e===v||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:z[0];t&&(o=t);break}case"initialPlacement":o=a}if(i!==o)return{reset:{placement:o}}}return{}}}},$r=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var o,r;const{placement:i,rects:s,platform:n,elements:a}=e,{apply:l=()=>{},...c}=lo(t,e),h=await Eo(e,c),d=co(i),u=ho(i),p="y"===fo(i),{width:b,height:f}=s.floating;let g,m;"top"===d||"bottom"===d?(g=d,m=u===(await(null==n.isRTL?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(m=d,g="end"===u?"top":"bottom");const v=f-h.top-h.bottom,y=b-h.left-h.right,w=to(f-h[g],v),_=to(b-h[m],y),x=!e.middlewareData.shift;let k=w,$=_;if(null!=(o=e.middlewareData.shift)&&o.enabled.x&&($=y),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(k=v),x&&!u){const t=eo(h.left,0),e=eo(h.right,0),o=eo(h.top,0),r=eo(h.bottom,0);p?$=b-2*(0!==t||0!==e?t+e:eo(h.left,h.right)):k=f-2*(0!==o||0!==r?o+r:eo(h.top,h.bottom))}await l({...e,availableWidth:$,availableHeight:k});const C=await n.getDimensions(a.floating);return b!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}},Cr=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:r,placement:i,rects:s,platform:n,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=lo(t,e)||{};if(null==c)return{};const d=$o(h),u={x:o,y:r},p=go(i),b=po(p),f=await n.getDimensions(c),g="y"===p,m=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=s.reference[b]+s.reference[p]-u[p]-s.floating[b],_=u[p]-s.reference[p],x=await(null==n.getOffsetParent?void 0:n.getOffsetParent(c));let k=x?x[y]:0;k&&await(null==n.isElement?void 0:n.isElement(x))||(k=a.floating[y]||s.floating[b]);const $=w/2-_/2,C=k/2-f[b]/2-1,A=to(d[m],C),E=to(d[v],C),S=A,z=k-f[b]-E,T=k/2-f[b]/2+$,P=ao(S,T,z),L=!l.arrow&&null!=ho(i)&&T!==P&&s.reference[b]/2-(T{const r=new Map,i={platform:vr,...o},s={...i.platform,_c:r};return(async(t,e,o)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:n}=o,a=s.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(e));let c=await n.getElementRects({reference:t,floating:e,strategy:i}),{x:h,y:d}=Ao(c,r,l),u=r,p={},b=0;for(let o=0;o{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let o=0,r=0,i=0,s=0,n=0,a=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")?t.top{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[_r({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push($r({apply:({rects:t})=>{const e="width"===this.sync||"both"===this.sync,o="height"===this.sync||"both"===this.sync;this.popup.style.width=e?`${t.reference.width}px`:"",this.popup.style.height=o?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(kr({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(xr({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push($r({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Cr({element:this.arrowEl,padding:this.arrowPadding}));const e="absolute"===this.strategy?t=>vr.getOffsetParent(t,Er):vr.getOffsetParent;Ar(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:d(h({},vr),{getOffsetParent:e})}).then((({x:t,y:e,middlewareData:o,placement:r})=>{const i="rtl"===this.localize.dir(),s={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=o.arrow.x,e=o.arrow.y;let r="",n="",a="",l="";if("start"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";r="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",n=i?o:"",l=i?"":o}else if("end"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n=i?"":o,l=i?o:"",a="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",r="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",r="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:r,right:n,bottom:a,left:l,[s]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return lt` - - - - -
- - ${this.arrow?lt``:""} -
- `}};function Tr(t,e){return new Promise((o=>{t.addEventListener(e,(function r(i){i.target===t&&(t.removeEventListener(e,r),o())}))}))}function Pr(t,e,o){return new Promise((r=>{if((null==o?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const i=t.animate(e,d(h({},o),{duration:Or()?0:o.duration}));i.addEventListener("cancel",r,{once:!0}),i.addEventListener("finish",r,{once:!0})}))}function Lr(t){return(t=t.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?1e3*parseFloat(t):parseFloat(t)}function Or(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Br(t){return Promise.all(t.getAnimations().map((t=>new Promise((e=>{t.cancel(),requestAnimationFrame(e)})))))}zr.styles=[Nt,Qe],u([Wt(".popup")],zr.prototype,"popup",2),u([Wt(".popup__arrow")],zr.prototype,"arrowEl",2),u([It()],zr.prototype,"anchor",2),u([It({type:Boolean,reflect:!0})],zr.prototype,"active",2),u([It({reflect:!0})],zr.prototype,"placement",2),u([It({reflect:!0})],zr.prototype,"strategy",2),u([It({type:Number})],zr.prototype,"distance",2),u([It({type:Number})],zr.prototype,"skidding",2),u([It({type:Boolean})],zr.prototype,"arrow",2),u([It({attribute:"arrow-placement"})],zr.prototype,"arrowPlacement",2),u([It({attribute:"arrow-padding",type:Number})],zr.prototype,"arrowPadding",2),u([It({type:Boolean})],zr.prototype,"flip",2),u([It({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],zr.prototype,"flipFallbackPlacements",2),u([It({attribute:"flip-fallback-strategy"})],zr.prototype,"flipFallbackStrategy",2),u([It({type:Object})],zr.prototype,"flipBoundary",2),u([It({attribute:"flip-padding",type:Number})],zr.prototype,"flipPadding",2),u([It({type:Boolean})],zr.prototype,"shift",2),u([It({type:Object})],zr.prototype,"shiftBoundary",2),u([It({attribute:"shift-padding",type:Number})],zr.prototype,"shiftPadding",2),u([It({attribute:"auto-size"})],zr.prototype,"autoSize",2),u([It()],zr.prototype,"sync",2),u([It({type:Object})],zr.prototype,"autoSizeBoundary",2),u([It({attribute:"auto-size-padding",type:Number})],zr.prototype,"autoSizePadding",2),u([It({attribute:"hover-bridge",type:Boolean})],zr.prototype,"hoverBridge",2);var Fr=class extends qt{constructor(){super(),this.localize=new De(this),this.content="",this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.trigger="hover focus",this.hoist=!1,this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()},this.handleClick=()=>{this.hasTrigger("click")&&(this.open?this.hide():this.show())},this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()},this.handleDocumentKeyDown=t=>{"Escape"===t.key&&(t.stopPropagation(),this.hide())},this.handleMouseOver=()=>{if(this.hasTrigger("hover")){const t=Lr(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=Lr(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),t)}},this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){var t,e;if(this.open){if(this.disabled)return;this.emit("sl-show"),"CloseWatcher"in window?(null==(t=this.closeWatcher)||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),await Br(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:o}=w(this,"tooltip.show",{dir:this.localize.dir()});await Pr(this.popup.popup,e,o),this.popup.reposition(),this.emit("sl-after-show")}else{this.emit("sl-hide"),null==(e=this.closeWatcher)||e.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown),await Br(this.body);const{keyframes:t,options:o}=w(this,"tooltip.hide",{dir:this.localize.dir()});await Pr(this.popup.popup,t,o),this.popup.active=!1,this.body.hidden=!0,this.emit("sl-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Tr(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,Tr(this,"sl-after-hide")}render(){return lt` -