From b81b98ea7890999c748d4a237b78fa81f72f3213 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 4 Apr 2024 18:47:48 +0200 Subject: [PATCH 1/5] Use shoelace dialog for confirm dialog --- .../alchemy/_custom-properties.scss | 3 + app/assets/stylesheets/alchemy/base.scss | 15 + app/assets/stylesheets/alchemy/shoelace.scss | 32 ++ .../alchemy_admin/confirm_dialog.js | 82 +++-- bundles/shoelace.js | 1 + .../admin/page_destroy_feature_spec.rb | 4 +- vendor/javascript/shoelace.min.js | 285 ++++++++++++++---- 7 files changed, 327 insertions(+), 95 deletions(-) diff --git a/app/assets/stylesheets/alchemy/_custom-properties.scss b/app/assets/stylesheets/alchemy/_custom-properties.scss index e67eaef95f..08d6213020 100644 --- a/app/assets/stylesheets/alchemy/_custom-properties.scss +++ b/app/assets/stylesheets/alchemy/_custom-properties.scss @@ -62,6 +62,9 @@ --color-grey_medium: hsl(0deg, 0%, 78%); --color-grey_dark: hsl(0deg, 0%, 40%); --color-grey_very_dark: hsl(0deg, 0%, 20%); + + --color-white: hsl(0deg, 0%, 100%); + --color-text: hsla(224, 22.7%, 25.9%, 0.8); --color-icon: hsla(224, 22.7%, 25.9%, 0.75); } diff --git a/app/assets/stylesheets/alchemy/base.scss b/app/assets/stylesheets/alchemy/base.scss index fb1d66865b..0a18b1e3e6 100644 --- a/app/assets/stylesheets/alchemy/base.scss +++ b/app/assets/stylesheets/alchemy/base.scss @@ -151,3 +151,18 @@ a img { .hidden { display: none !important; } + +.mx-1 { + margin-left: var(--spacing-1); + margin-right: var(--spacing-1); +} + +.mx-2 { + margin-left: var(--spacing-2); + margin-right: var(--spacing-2); +} + +.my-0 { + margin-top: 0; + margin-bottom: 0; +} diff --git a/app/assets/stylesheets/alchemy/shoelace.scss b/app/assets/stylesheets/alchemy/shoelace.scss index 53c1eb9f8b..68cde74bc8 100644 --- a/app/assets/stylesheets/alchemy/shoelace.scss +++ b/app/assets/stylesheets/alchemy/shoelace.scss @@ -343,3 +343,35 @@ sl-tooltip { box-shadow: 0 0 var(--spacing-1) var(--color-grey_medium); } } + +sl-dialog { + &::part(panel) { + background-color: var(--color-grey_light); + } + + &::part(header) { + --header-spacing: var(--spacing-3); + background-color: var(--color-blue_dark); + border-top-left-radius: var(--border-radius_medium); + border-top-right-radius: var(--border-radius_medium); + } + + &::part(header-actions) { + --header-spacing: var(--spacing-1); + } + + &::part(title) { + --sl-font-size-large: var(--font-size_small); + color: var(--color-white); + } + + &::part(close-button) { + color: var(--color-white); + fill: currentColor; + } + + &::part(close-button):hover, + &::part(close-button__base):focus-visible { + --sl-color-primary-600: var(--color-white); + } +} diff --git a/app/javascript/alchemy_admin/confirm_dialog.js b/app/javascript/alchemy_admin/confirm_dialog.js index 0ef1f8c5da..80728b65ff 100644 --- a/app/javascript/alchemy_admin/confirm_dialog.js +++ b/app/javascript/alchemy_admin/confirm_dialog.js @@ -1,57 +1,77 @@ import { growl } from "alchemy_admin/growler" import pleaseWaitOverlay from "alchemy_admin/please_wait_overlay" +import { createHtmlElement } from "alchemy_admin/utils/dom_helpers" +import { translate } from "alchemy_admin/i18n" -Alchemy.Dialog = window.Alchemy.Dialog || class Dialog {} - -class ConfirmDialog extends Alchemy.Dialog { +class ConfirmDialog { constructor(message, options = {}) { const DEFAULTS = { size: "300x100", - title: "Please confirm", - ok_label: "Yes", - cancel_label: "No", + title: translate("Please confirm"), + ok_label: translate("Yes"), + cancel_label: translate("No"), on_ok() {} } options = { ...DEFAULTS, ...options } - super("", options) this.message = message this.options = options + this.#build() + this.#bindEvents() } - load() { - this.dialog_title.text(this.options.title) - this.dialog_body.html(`

${this.message}

`) - this.dialog_body.append(this.build_buttons()) - this.bind_buttons() + open() { + requestAnimationFrame(() => { + this.dialog.show() + }) } - build_buttons() { - const $btn_container = $('
') - this.cancel_button = $( - `` - ) - this.ok_button = $( - `` - ) - $btn_container.append(this.cancel_button) - $btn_container.append(this.ok_button) - return $btn_container + #build() { + const width = this.options.size.split("x")[0] + this.dialog = createHtmlElement(` + + ${this.message} + + + + `) + document.body.append(this.dialog) } - bind_buttons() { - this.cancel_button.trigger("focus") - this.cancel_button.on("click", () => { - this.close() - return false + #bindEvents() { + this.cancelButton.addEventListener("click", (evt) => { + evt.preventDefault() + this.dialog.hide() }) - this.ok_button.on("click", () => { - this.close() + this.okButton.addEventListener("click", (evt) => { + evt.preventDefault() this.options.on_ok() - return false + this.dialog.hide() + }) + // Prevent the dialog from closing when the user clicks on the overlay + this.dialog.addEventListener("sl-request-close", (event) => { + if (event.detail.source === "overlay") { + event.preventDefault() + } + }) + // Remove the dialog from the DOM after it has been hidden + this.dialog.addEventListener("sl-after-hide", () => { + this.dialog.remove() }) } + + get cancelButton() { + return this.dialog.querySelector("button[type=reset]") + } + + get okButton() { + return this.dialog.querySelector("button[type=submit]") + } } // Opens a confirm dialog diff --git a/bundles/shoelace.js b/bundles/shoelace.js index a8390fa5ee..053589c414 100644 --- a/bundles/shoelace.js +++ b/bundles/shoelace.js @@ -6,5 +6,6 @@ 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/tooltip/tooltip.js" import "@shoelace-style/shoelace/dist/components/progress-bar/progress-bar.js" +import "@shoelace-style/shoelace/dist/components/dialog/dialog.js" import { setDefaultAnimation } from "@shoelace-style/shoelace/dist/utilities/animation-registry.js" export { setDefaultAnimation } diff --git a/spec/features/admin/page_destroy_feature_spec.rb b/spec/features/admin/page_destroy_feature_spec.rb index a8aa704d1d..c5db9a462b 100644 --- a/spec/features/admin/page_destroy_feature_spec.rb +++ b/spec/features/admin/page_destroy_feature_spec.rb @@ -13,7 +13,7 @@ page.find("a[href='#{admin_page_path(content_page.id)}']").click - within ".alchemy-dialog-buttons" do + within "sl-dialog" do click_button "Yes" end @@ -30,7 +30,7 @@ page.find("a[href='#{admin_page_path(layout_page.id)}']").click - within ".alchemy-dialog-buttons" do + within "sl-dialog" do click_button "Yes" end diff --git a/vendor/javascript/shoelace.min.js b/vendor/javascript/shoelace.min.js index ab437d87dd..fd3de2944c 100644 --- a/vendor/javascript/shoelace.min.js +++ b/vendor/javascript/shoelace.min.js @@ -1,26 +1,26 @@ -var t=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,a=(e,o,i)=>o in e?t(e,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[o]=i,l=(t,e)=>{for(var o in e||(e={}))s.call(e,o)&&a(t,o,e[o]);if(r)for(var o of r(e))n.call(e,o)&&a(t,o,e[o]);return t},c=(t,o)=>e(t,i(o)),h=(e,i,r,s)=>{for(var n,a=s>1?void 0:s?o(i,r):i,l=e.length-1;l>=0;l--)(n=e[l])&&(a=(s?n(i,r,a):n(a))||a);return s&&a&&t(i,r,a),a},d=new Map,p=new WeakMap;function u(t,e){return"rtl"===e.toLowerCase()?{keyframes:t.rtlKeyframes||t.keyframes,options:t.options}:t}function f(t,e){d.set(t,function(t){return null!=t?t:{keyframes:[],options:{duration:0}}}(e))}function b(t,e,o){const i=p.get(t);if(null==i?void 0:i[e])return u(i[e],o.dir);const r=d.get(e);return r?u(r,o.dir):{keyframes:[],options:{duration:0}}} +var t=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,a=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),l=(e,o,i)=>o in e?t(e,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[o]=i,c=(t,e)=>{for(var o in e||(e={}))r.call(e,o)&&l(t,o,e[o]);if(s)for(var o of s(e))n.call(e,o)&&l(t,o,e[o]);return t},h=(t,o)=>e(t,i(o)),d=(e,i,s,r)=>{for(var n,a=r>1?void 0:r?o(i,s):i,l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r?n(i,s,a):n(a))||a);return r&&a&&t(i,s,a),a},p=function(t,e){this[0]=t,this[1]=e},u=t=>{var e,o=t[a("asyncIterator")],i=!1,s={};return null==o?(o=t[a("iterator")](),e=t=>s[t]=e=>o[t](e)):(o=o.call(t),e=t=>s[t]=e=>{if(i){if(i=!1,"throw"===t)throw e;return e}return i=!0,{done:!1,value:new p(new Promise((i=>{var s=o[t](e);if(!(s instanceof Object))throw TypeError("Object expected");i(s)})),1)}}),s[a("iterator")]=()=>s,e("next"),"throw"in o?e("throw"):s.throw=t=>{throw t},"return"in o&&e("return"),s},f=new Map,b=new WeakMap;function g(t,e){return"rtl"===e.toLowerCase()?{keyframes:t.rtlKeyframes||t.keyframes,options:t.options}:t}function m(t,e){f.set(t,function(t){return null!=t?t:{keyframes:[],options:{duration:0}}}(e))}function v(t,e,o){const i=b.get(t);if(null==i?void 0:i[e])return g(i[e],o.dir);const s=f.get(e);return s?g(s,o.dir):{keyframes:[],options:{duration:0}}} /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const g=globalThis,m=g.ShadowRoot&&(void 0===g.ShadyCSS||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),y=new WeakMap;let w=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==v)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(m&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=y.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&y.set(e,t))}return t}toString(){return this.cssText}};const _=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1]),t[0]);return new w(o,t,v)},x=m?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new w("string"==typeof t?t:t+"",void 0,v))(e)})(t):t + */const y=globalThis,w=y.ShadowRoot&&(void 0===y.ShadyCSS||y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_=Symbol(),x=new WeakMap;let $=class{constructor(t,e,o){if(this._$cssResult$=!0,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 e=this.t;if(w&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=x.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&x.set(e,t))}return t}toString(){return this.cssText}};const k=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1]),t[0]);return new $(o,t,_)},A=w?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new $("string"==typeof t?t:t+"",void 0,_))(e)})(t):t /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */,{is:$,defineProperty:k,getOwnPropertyDescriptor:A,getOwnPropertyNames:C,getOwnPropertySymbols:E,getPrototypeOf:S}=Object,z=globalThis,T=z.trustedTypes,P=T?T.emptyScript:"",L=z.reactiveElementPolyfillSupport,O=(t,e)=>t,R={toAttribute(t,e){switch(e){case Boolean:t=t?P: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}},M=(t,e)=>!$(t,e),B={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:M};Symbol.metadata??=Symbol("metadata"),z.litPropertyMetadata??=new WeakMap;class D extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=B){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&k(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:r}=A(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const s=i?.call(this);r.call(this,e),this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??B}static _$Ei(){if(this.hasOwnProperty(O("elementProperties")))return;const t=S(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(O("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(O("properties"))){const t=this.properties,e=[...C(t),...E(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(x(t))}else void 0!==t&&e.push(x(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._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){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(m)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of e){const e=document.createElement("style"),i=g.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=o.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EO(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const r=(void 0!==o.converter?.toAttribute?o.converter:R).toAttribute(e,o.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:R;this._$Em=i,this[i]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,o,i=!1,r){if(void 0!==t){if(o??=this.constructor.getPropertyOptions(t),!(o.hasChanged??M)(i?r:this[t],e))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),!0===o.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}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)!0!==o.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}D.elementStyles=[],D.shadowRootOptions={mode:"open"},D[O("elementProperties")]=new Map,D[O("finalized")]=new Map,L?.({ReactiveElement:D}),(z.reactiveElementVersions??=[]).push("2.0.2"); + */,{is:C,defineProperty:E,getOwnPropertyDescriptor:S,getOwnPropertyNames:z,getOwnPropertySymbols:T,getPrototypeOf:P}=Object,L=globalThis,O=L.trustedTypes,D=O?O.emptyScript:"",F=L.reactiveElementPolyfillSupport,R=(t,e)=>t,M={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}},B=(t,e)=>!C(t,e),N={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:B};Symbol.metadata??=Symbol("metadata"),L.litPropertyMetadata??=new WeakMap;class H 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=N){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&E(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:s}=S(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);s.call(this,e),this.requestUpdate(t,r,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??N}static _$Ei(){if(this.hasOwnProperty(R("elementProperties")))return;const t=P(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(R("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(R("properties"))){const t=this.properties,e=[...z(t),...T(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(A(t))}else void 0!==t&&e.push(A(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._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){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(w)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of e){const e=document.createElement("style"),i=y.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=o.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EO(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const s=(void 0!==o.converter?.toAttribute?o.converter:M).toAttribute(e,o.type);this._$Em=t,null==s?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:M;this._$Em=i,this[i]=s.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,o,i=!1,s){if(void 0!==t){if(o??=this.constructor.getPropertyOptions(t),!(o.hasChanged??B)(i?s:this[t],e))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),!0===o.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}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)!0!==o.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}H.elementStyles=[],H.shadowRootOptions={mode:"open"},H[R("elementProperties")]=new Map,H[R("finalized")]=new Map,F?.({ReactiveElement:H}),(L.reactiveElementVersions??=[]).push("2.0.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const F=globalThis,N=F.trustedTypes,U=N?N.createPolicy("lit-html",{createHTML:t=>t}):void 0,H="$lit$",V=`lit$${(Math.random()+"").slice(9)}$`,I="?"+V,j=`<${I}>`,W=document,q=()=>W.createComment(""),K=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Z=Array.isArray,G="[ \t\n\f\r]",X=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Y=/-->/g,J=/>/g,Q=RegExp(`>|${G}(?:([^\\s"'>=/]+)(${G}*=${G}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),tt=/'/g,et=/"/g,ot=/^(?:script|style|textarea|title)$/i,it=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),rt=Symbol.for("lit-noChange"),st=Symbol.for("lit-nothing"),nt=new WeakMap,at=W.createTreeWalker(W,129);function lt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==U?U.createHTML(e):e}const ct=(t,e)=>{const o=t.length-1,i=[];let r,s=2===e?"":"",n=X;for(let e=0;e"===l[0]?(n=r??X,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?Q:'"'===l[3]?et:tt):n===et||n===tt?n=Q:n===Y||n===J?n=X:(n=Q,r=void 0);const d=n===Q&&t[e+1].startsWith("/>")?" ":"";s+=n===X?o+j:c>=0?(i.push(a),o.slice(0,c)+H+o.slice(c)+V+d):o+V+(-2===c?e:d)}return[lt(t,s+(t[o]||"")+(2===e?"":"")),i]};class ht{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let r=0,s=0;const n=t.length-1,a=this.parts,[l,c]=ct(t,e);if(this.el=ht.createElement(l,o),at.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=at.nextNode())&&a.length0){i.textContent=N?N.emptyScript:"";for(let o=0;oZ(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==st&&K(this._$AH)?this._$AA.nextSibling.data=t:this.$(W.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=ht.createElement(lt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new pt(i,this),o=t.u(this.options);t.p(e),this.$(o),this._$AH=t}}_$AC(t){let e=nt.get(t.strings);return void 0===e&&nt.set(t.strings,e=new ht(t)),e}T(t){Z(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const r of t)i===e.length?e.push(o=new ut(this.k(q()),this.k(q()),this,this.options)):o=e[i],o._$AI(r),i++;i2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=st}_$AI(t,e=this,o,i){const r=this.strings;let s=!1;if(void 0===r)t=dt(this,t,e,0),s=!K(t)||t!==this._$AH&&t!==rt,s&&(this._$AH=t);else{const i=t;let n,a;for(t=r[0],n=0;nt}):void 0,W="$lit$",j=`lit$${(Math.random()+"").slice(9)}$`,q="?"+j,K=`<${q}>`,Z=document,X=()=>Z.createComment(""),Y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,G=Array.isArray,J="[ \t\n\f\r]",Q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tt=/-->/g,et=/>/g,ot=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,st=/"/g,rt=/^(?:script|style|textarea|title)$/i,nt=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),at=Symbol.for("lit-noChange"),lt=Symbol.for("lit-nothing"),ct=new WeakMap,ht=Z.createTreeWalker(Z,129);function dt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==I?I.createHTML(e):e}const pt=(t,e)=>{const o=t.length-1,i=[];let s,r=2===e?"":"",n=Q;for(let e=0;e"===l[0]?(n=s??Q,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?ot:'"'===l[3]?st:it):n===st||n===it?n=ot:n===tt||n===et?n=Q:(n=ot,s=void 0);const d=n===ot&&t[e+1].startsWith("/>")?" ":"";r+=n===Q?o+K:c>=0?(i.push(a),o.slice(0,c)+W+o.slice(c)+j+d):o+j+(-2===c?e:d)}return[dt(t,r+(t[o]||"")+(2===e?"":"")),i]};class ut{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,c]=pt(t,e);if(this.el=ut.createElement(l,o),ht.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=ht.nextNode())&&a.length0){i.textContent=V?V.emptyScript:"";for(let o=0;oG(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==lt&&Y(this._$AH)?this._$AA.nextSibling.data=t:this.$(Z.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=ut.createElement(dt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new bt(i,this),o=t.u(this.options);t.p(e),this.$(o),this._$AH=t}}_$AC(t){let e=ct.get(t.strings);return void 0===e&&ct.set(t.strings,e=new ut(t)),e}T(t){G(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new gt(this.k(X()),this.k(X()),this,this.options)):o=e[i],o._$AI(s),i++;i2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=lt}_$AI(t,e=this,o,i){const s=this.strings;let r=!1;if(void 0===s)t=ft(this,t,e,0),r=!Y(t)||t!==this._$AH&&t!==at,r&&(this._$AH=t);else{const i=t;let n,a;for(t=s[0],n=0;n{const i=o?.renderBefore??e;let r=i._$litPart$;if(void 0===r){const t=o?.renderBefore??null;i._$litPart$=r=new ut(e.insertBefore(q(),t),t,void 0,o??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return rt}};wt._$litElement$=!0,wt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:wt});const _t=globalThis.litElementPolyfillSupport;_t?.({LitElement:wt}),(globalThis.litElementVersions??=[]).push("4.0.2");var xt=_` +let $t=class extends H{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 i=o?.renderBefore??e;let s=i._$litPart$;if(void 0===s){const t=o?.renderBefore??null;i._$litPart$=s=new gt(e.insertBefore(X(),t),t,void 0,o??{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return at}};$t._$litElement$=!0,$t.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:$t});const kt=globalThis.litElementPolyfillSupport;kt?.({LitElement:$t}),(globalThis.litElementVersions??=[]).push("4.0.2");var At=k` :host { display: inline-block; } @@ -184,7 +184,7 @@ let wt=class extends D{constructor(){super(...arguments),this.renderOptions={hos background-color: ButtonText; } } -`,$t=_` +`,Ct=k` .form-control .form-control__label { display: none; } @@ -240,7 +240,7 @@ let wt=class extends D{constructor(){super(...arguments),this.renderOptions={hos .form-control--has-help-text.form-control--radio-group .form-control__help-text { margin-top: var(--sl-spacing-2x-small); } -`,kt=new WeakMap,At=new WeakMap,Ct=new WeakMap,Et=new WeakSet,St=new WeakMap,zt=class{constructor(t,e){this.handleFormData=t=>{const e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),r="sl-button"===this.host.tagName.toLowerCase();this.host.isConnected&&!e&&!r&&"string"==typeof o&&o.length>0&&void 0!==i&&(Array.isArray(i)?i.forEach((e=>{t.formData.append(o,e.toString())})):t.formData.append(o,i.toString()))},this.handleFormSubmit=t=>{var e;const o=this.options.disabled(this.host),i=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(e=kt.get(this.form))||e.forEach((t=>{this.setUserInteracted(t,!0)}))),!this.form||this.form.noValidate||o||i(this.host)||(t.preventDefault(),t.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),St.set(this.host,[])},this.handleInteraction=t=>{const e=St.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=l({form:t=>{const e=t.form;if(e){const o=t.getRootNode().getElementById(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),St.set(this.host,[]),this.options.assumeInteractionOn.forEach((t=>{this.host.addEventListener(t,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),St.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,kt.has(this.form)?kt.get(this.form).add(this.host):kt.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),At.has(this.form)||(At.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Ct.has(this.form)||(Ct.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const t=kt.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),At.has(this.form)&&(this.form.reportValidity=At.get(this.form),At.delete(this.form)),Ct.has(this.form)&&(this.form.checkValidity=Ct.get(this.form),Ct.delete(this.form)),this.form=void 0))}setUserInteracted(t,e){e?Et.add(t):Et.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(Et.has(e)),i=Boolean(e.required);e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),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()}},Tt=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(c(l({},Tt),{valid:!1,valueMissing:!0})),Object.freeze(c(l({},Tt),{valid:!1,customError:!0}));var Pt=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 Lt(t,e){const o=l({waitUntilFirstUpdate:!1},e);return(e,i)=>{const{update:r}=e,s=Array.isArray(t)?t:[t];e.update=function(t){s.forEach((e=>{const r=e;if(t.has(r)){const e=t.get(r),s=this[r];e!==s&&(o.waitUntilFirstUpdate&&!this.hasUpdated||this[i](e,s))}})),r.call(this,t)}}}var Ot=_` +`,Et=new WeakMap,St=new WeakMap,zt=new WeakMap,Tt=new WeakSet,Pt=new WeakMap,Lt=class{constructor(t,e){this.handleFormData=t=>{const e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s="sl-button"===this.host.tagName.toLowerCase();this.host.isConnected&&!e&&!s&&"string"==typeof o&&o.length>0&&void 0!==i&&(Array.isArray(i)?i.forEach((e=>{t.formData.append(o,e.toString())})):t.formData.append(o,i.toString()))},this.handleFormSubmit=t=>{var e;const o=this.options.disabled(this.host),i=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(e=Et.get(this.form))||e.forEach((t=>{this.setUserInteracted(t,!0)}))),!this.form||this.form.noValidate||o||i(this.host)||(t.preventDefault(),t.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),Pt.set(this.host,[])},this.handleInteraction=t=>{const e=Pt.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=c({form:t=>{const e=t.form;if(e){const o=t.getRootNode().getElementById(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),Pt.set(this.host,[]),this.options.assumeInteractionOn.forEach((t=>{this.host.addEventListener(t,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),Pt.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,Et.has(this.form)?Et.get(this.form).add(this.host):Et.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),St.has(this.form)||(St.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),zt.has(this.form)||(zt.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const t=Et.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),St.has(this.form)&&(this.form.reportValidity=St.get(this.form),St.delete(this.form)),zt.has(this.form)&&(this.form.checkValidity=zt.get(this.form),zt.delete(this.form)),this.form=void 0))}setUserInteracted(t,e){e?Tt.add(t):Tt.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(Tt.has(e)),i=Boolean(e.required);e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),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()}},Ot=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(h(c({},Ot),{valid:!1,valueMissing:!0})),Object.freeze(h(c({},Ot),{valid:!1,customError:!0}));var Dt=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 Ft(t,e){const o=c({waitUntilFirstUpdate:!1},e);return(e,i)=>{const{update:s}=e,r=Array.isArray(t)?t:[t];e.update=function(t){r.forEach((e=>{const s=e;if(t.has(s)){const e=t.get(s),r=this[s];e!==r&&(o.waitUntilFirstUpdate&&!this.hasUpdated||this[i](e,r))}})),s.call(this,t)}}}var Rt=k` :host { box-sizing: border-box; } @@ -259,38 +259,38 @@ let wt=class extends D{constructor(){super(...arguments),this.renderOptions={hos * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;const Rt={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:M},Mt=(t=Rt,e,o)=>{const{kind:i,metadata:r}=o;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),s.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const r=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,r,t)},init(e){return void 0!==e&&this.C(i,void 0,t),e}}}if("setter"===i){const{name:i}=o;return function(o){const r=this[i];e.call(this,o),this.requestUpdate(i,r,t)}}throw Error("Unsupported decorator location: "+i)};function Bt(t){return(e,o)=>"object"==typeof o?Mt(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o) + */;const Mt={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:B},Bt=(t=Mt,e,o)=>{const{kind:i,metadata:s}=o;let r=globalThis.litPropertyMetadata.get(s);if(void 0===r&&globalThis.litPropertyMetadata.set(s,r=new Map),r.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const s=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,s,t)},init(e){return void 0!==e&&this.C(i,void 0,t),e}}}if("setter"===i){const{name:i}=o;return function(o){const s=this[i];e.call(this,o),this.requestUpdate(i,s,t)}}throw Error("Unsupported decorator location: "+i)};function Nt(t){return(e,o)=>"object"==typeof o?Bt(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o) /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */}function Dt(t){return Bt({...t,state:!0,attribute:!1})} + */}function Ht(t){return Nt({...t,state:!0,attribute:!1})} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Ft=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o) + */const Ut=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o) /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;function Nt(t,e){return(o,i,r)=>{const s=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof i?o:r??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return Ft(o,i,{get(){let o=t.call(this);return void 0===o&&(o=s(this),(null!==o||this.hasUpdated)&&e.call(this,o)),o}})}return Ft(o,i,{get(){return s(this)}})}}var Ut=class extends wt{constructor(){super(),Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}emit(t,e){const o=new CustomEvent(t,l({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const i=customElements.get(t);if(!i)return void customElements.define(t,class extends e{},o);let r=" (unknown version)",s=r;"version"in e&&e.version&&(r=" v"+e.version),"version"in i&&i.version&&(s=" v"+i.version),r&&s&&r===s||console.warn(`Attempted to register <${t}>${r}, but <${t}>${s} has already been registered.`)}};Ut.version="2.14.0",Ut.dependencies={},h([Bt()],Ut.prototype,"dir",2),h([Bt()],Ut.prototype,"lang",2); + */;function Vt(t,e){return(o,i,s)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof i?o:s??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return Ut(o,i,{get(){let o=t.call(this);return void 0===o&&(o=r(this),(null!==o||this.hasUpdated)&&e.call(this,o)),o}})}return Ut(o,i,{get(){return r(this)}})}}var It=class extends $t{constructor(){super(),Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}emit(t,e){const o=new CustomEvent(t,c({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const i=customElements.get(t);if(!i)return void customElements.define(t,class extends e{},o);let s=" (unknown version)",r=s;"version"in e&&e.version&&(s=" v"+e.version),"version"in i&&i.version&&(r=" v"+i.version),s&&r&&s===r||console.warn(`Attempted to register <${t}>${s}, but <${t}>${r} has already been registered.`)}};It.version="2.14.0",It.dependencies={},d([Nt()],It.prototype,"dir",2),d([Nt()],It.prototype,"lang",2); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Ht=1,Vt=3,It=4,jt=t=>(...e)=>({_$litDirective$:t,values:e});let Wt=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)}}; +const Wt=1,jt=3,qt=4,Kt=t=>(...e)=>({_$litDirective$:t,values:e});let Zt=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 qt=jt(class extends Wt{constructor(t){if(super(t),t.type!==Ht||"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.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const o=t.element.classList;for(const t of this.it)t in e||(o.remove(t),this.it.delete(t));for(const t in e){const i=!!e[t];i===this.it.has(t)||this.st?.has(t)||(i?(o.add(t),this.it.add(t)):(o.remove(t),this.it.delete(t)))}return rt}}),Kt=t=>t??st + */const Xt=Kt(class extends Zt{constructor(t){if(super(t),t.type!==Wt||"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.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const o=t.element.classList;for(const t of this.it)t in e||(o.remove(t),this.it.delete(t));for(const t in e){const i=!!e[t];i===this.it.has(t)||this.st?.has(t)||(i?(o.add(t),this.it.add(t)):(o.remove(t),this.it.delete(t)))}return at}}),Yt=t=>t??lt /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */,Zt={},Gt=jt(class extends Wt{constructor(t){if(super(t),t.type!==Vt&&t.type!==Ht&&t.type!==It)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===rt||e===st)return e;const o=t.element,i=t.name;if(t.type===Vt){if(e===o[i])return rt}else if(t.type===It){if(!!e===o.hasAttribute(i))return rt}else if(t.type===Ht&&o.getAttribute(i)===e+"")return rt;return((t,e=Zt)=>{t._$AH=e; + */,Gt={},Jt=Kt(class extends Zt{constructor(t){if(super(t),t.type!==jt&&t.type!==Wt&&t.type!==qt)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===at||e===lt)return e;const o=t.element,i=t.name;if(t.type===jt){if(e===o[i])return at}else if(t.type===qt){if(!!e===o.hasAttribute(i))return at}else if(t.type===Wt&&o.getAttribute(i)===e+"")return at;return((t,e=Gt)=>{t._$AH=e; /** * @license * Copyright 2020 Google LLC @@ -300,21 +300,21 @@ const Ht=1,Vt=3,It=4,jt=t=>(...e)=>({_$litDirective$:t,values:e});let Wt=class{c * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var Xt=class extends Ut{constructor(){super(...arguments),this.formControlController=new zt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.hasSlotController=new Pt(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 it` + */var Qt=class extends It{constructor(){super(...arguments),this.formControlController=new Lt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.hasSlotController=new Dt(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 nt`
- `}};Xt.styles=[Ot,$t,xt],h([Nt('input[type="checkbox"]')],Xt.prototype,"input",2),h([Dt()],Xt.prototype,"hasFocus",2),h([Bt()],Xt.prototype,"title",2),h([Bt()],Xt.prototype,"name",2),h([Bt()],Xt.prototype,"value",2),h([Bt({reflect:!0})],Xt.prototype,"size",2),h([Bt({type:Boolean,reflect:!0})],Xt.prototype,"disabled",2),h([Bt({type:Boolean,reflect:!0})],Xt.prototype,"checked",2),h([((t="value")=>(e,o)=>{const i=e.constructor,r=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(e,s,n){var a;const l=i.getPropertyOptions(t);if(e===("string"==typeof l.attribute?l.attribute:t)){const e=l.converter||R,i=("function"==typeof e?e:null!=(a=null==e?void 0:e.fromAttribute)?a:R.fromAttribute)(n,l.type);this[t]!==i&&(this[o]=i)}r.call(this,e,s,n)}})("checked")],Xt.prototype,"defaultChecked",2),h([Bt({reflect:!0})],Xt.prototype,"form",2),h([Bt({type:Boolean,reflect:!0})],Xt.prototype,"required",2),h([Bt({attribute:"help-text"})],Xt.prototype,"helpText",2),h([Lt("checked",{waitUntilFirstUpdate:!0})],Xt.prototype,"handleCheckedChange",1),h([Lt("disabled",{waitUntilFirstUpdate:!0})],Xt.prototype,"handleDisabledChange",1),Xt.define("sl-switch");var Yt=_` + `}};Qt.styles=[Rt,Ct,At],d([Vt('input[type="checkbox"]')],Qt.prototype,"input",2),d([Ht()],Qt.prototype,"hasFocus",2),d([Nt()],Qt.prototype,"title",2),d([Nt()],Qt.prototype,"name",2),d([Nt()],Qt.prototype,"value",2),d([Nt({reflect:!0})],Qt.prototype,"size",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"disabled",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"checked",2),d([((t="value")=>(e,o)=>{const i=e.constructor,s=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(e,r,n){var a;const l=i.getPropertyOptions(t);if(e===("string"==typeof l.attribute?l.attribute:t)){const e=l.converter||M,i=("function"==typeof e?e:null!=(a=null==e?void 0:e.fromAttribute)?a:M.fromAttribute)(n,l.type);this[t]!==i&&(this[o]=i)}s.call(this,e,r,n)}})("checked")],Qt.prototype,"defaultChecked",2),d([Nt({reflect:!0})],Qt.prototype,"form",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"required",2),d([Nt({attribute:"help-text"})],Qt.prototype,"helpText",2),d([Ft("checked",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleCheckedChange",1),d([Ft("disabled",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleDisabledChange",1),Qt.define("sl-switch");var te=k` :host { display: inline-block; } @@ -414,7 +414,7 @@ const Ht=1,Vt=3,It=4,jt=t=>(...e)=>({_$litDirective$:t,values:e});let Wt=class{c outline-offset: -3px; } } -`,Jt=_` +`,ee=k` :host { display: inline-block; color: var(--sl-color-neutral-600); @@ -461,7 +461,7 @@ const Ht=1,Vt=3,It=4,jt=t=>(...e)=>({_$litDirective$:t,values:e});let Wt=class{c .icon-button__icon { pointer-events: none; } -`,Qt="";function te(t){Qt=t}var ee={name:"default",resolver:t=>function(t=""){if(!Qt){const t=[...document.getElementsByTagName("script")],e=t.find((t=>t.hasAttribute("data-shoelace")));if(e)te(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")),te(o.split("/").slice(0,-1).join("/"))}}return Qt.replace(/\/$/,"")+(t?`/${t.replace(/^\//,"")}`:"")}(`assets/icons/${t}.svg`)},oe={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=[ee,{name:"system",resolver:t=>t in oe?`data:image/svg+xml,${encodeURIComponent(oe[t])}`:""}],re=[];function se(t){return ie.find((e=>e.name===t))}var ne,ae=_` +`,oe="";function ie(t){oe=t}var se={name:"default",resolver:t=>function(t=""){if(!oe){const t=[...document.getElementsByTagName("script")],e=t.find((t=>t.hasAttribute("data-shoelace")));if(e)ie(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")),ie(o.split("/").slice(0,-1).join("/"))}}return oe.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 '},ne=[se,{name:"system",resolver:t=>t in re?`data:image/svg+xml,${encodeURIComponent(re[t])}`:""}],ae=[];function le(t){return ne.find((e=>e.name===t))}var ce,he=k` :host { display: inline-block; width: 1em; @@ -474,25 +474,25 @@ const Ht=1,Vt=3,It=4,jt=t=>(...e)=>({_$litDirective$:t,values:e});let Wt=class{c height: 100%; width: 100%; } -`,le=Symbol(),ce=Symbol(),he=new Map,de=class extends Ut{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let i;if(null==e?void 0:e.spriteSheet)return it` +`,de=Symbol(),pe=Symbol(),ue=new Map,fe=class extends It{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let i;if(null==e?void 0:e.spriteSheet)return nt` - `;try{if(i=await fetch(t,{mode:"cors"}),!i.ok)return 410===i.status?le:ce}catch(t){return ce}try{const t=document.createElement("div");t.innerHTML=await i.text();const e=t.firstElementChild;if("svg"!==(null==(o=null==e?void 0:e.tagName)?void 0:o.toLowerCase()))return le;ne||(ne=new DOMParser);const r=ne.parseFromString(e.outerHTML,"text/html").body.querySelector("svg");return r?(r.part.add("svg"),document.adoptNode(r)):le}catch(t){return le}}connectedCallback(){var t;super.connectedCallback(),t=this,re.push(t)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,re=re.filter((e=>e!==t))}getIconSource(){const t=se(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(),i=o?se(this.library):void 0;if(!e)return void(this.svg=null);let r=he.get(e);if(r||(r=this.resolveIcon(e,i),he.set(e,r)),!this.initialRender)return;const s=await r;if(s===ce&&he.delete(e),e===this.getIconSource().url)if(((t,e)=>void 0===e?void 0!==t?._$litType$:t?._$litType$===e)(s))this.svg=s;else switch(s){case ce:case le:this.svg=null,this.emit("sl-error");break;default:this.svg=s.cloneNode(!0),null==(t=null==i?void 0:i.mutator)||t.call(i,this.svg),this.emit("sl-load")}}render(){return this.svg}};de.styles=[Ot,ae],h([Dt()],de.prototype,"svg",2),h([Bt({reflect:!0})],de.prototype,"name",2),h([Bt()],de.prototype,"src",2),h([Bt()],de.prototype,"label",2),h([Bt({reflect:!0})],de.prototype,"library",2),h([Lt("label")],de.prototype,"handleLabelChange",1),h([Lt(["name","src","library"])],de.prototype,"setIcon",1); + `;try{if(i=await fetch(t,{mode:"cors"}),!i.ok)return 410===i.status?de:pe}catch(t){return pe}try{const t=document.createElement("div");t.innerHTML=await i.text();const e=t.firstElementChild;if("svg"!==(null==(o=null==e?void 0:e.tagName)?void 0:o.toLowerCase()))return de;ce||(ce=new DOMParser);const s=ce.parseFromString(e.outerHTML,"text/html").body.querySelector("svg");return s?(s.part.add("svg"),document.adoptNode(s)):de}catch(t){return de}}connectedCallback(){var t;super.connectedCallback(),t=this,ae.push(t)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,ae=ae.filter((e=>e!==t))}getIconSource(){const t=le(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(),i=o?le(this.library):void 0;if(!e)return void(this.svg=null);let s=ue.get(e);if(s||(s=this.resolveIcon(e,i),ue.set(e,s)),!this.initialRender)return;const r=await s;if(r===pe&&ue.delete(e),e===this.getIconSource().url)if(((t,e)=>void 0===e?void 0!==t?._$litType$:t?._$litType$===e)(r))this.svg=r;else switch(r){case pe:case de:this.svg=null,this.emit("sl-error");break;default:this.svg=r.cloneNode(!0),null==(t=null==i?void 0:i.mutator)||t.call(i,this.svg),this.emit("sl-load")}}render(){return this.svg}};fe.styles=[Rt,he],d([Ht()],fe.prototype,"svg",2),d([Nt({reflect:!0})],fe.prototype,"name",2),d([Nt()],fe.prototype,"src",2),d([Nt()],fe.prototype,"label",2),d([Nt({reflect:!0})],fe.prototype,"library",2),d([Ft("label")],fe.prototype,"handleLabelChange",1),d([Ft(["name","src","library"])],fe.prototype,"setIcon",1); /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const pe=Symbol.for(""),ue=t=>{if(t?.r===pe)return t?._$litStatic$},fe=(t,...e)=>({_$litStatic$:e.reduce(((e,o,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[i+1]),t[0]),r:pe}),be=new Map,ge=(t=>(e,...o)=>{const i=o.length;let r,s;const n=[],a=[];let l,c=0,h=!1;for(;c{if(t?.r===be)return t?._$litStatic$},me=(t,...e)=>({_$litStatic$:e.reduce(((e,o,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[i+1]),t[0]),r:be}),ve=new Map,ye=(t=>(e,...o)=>{const i=o.length;let s,r;const n=[],a=[];let l,c=0,h=!1;for(;c{if(t?.r===pe)return t?._$litStatic$},fe=(t,...e)= > - `}};me.styles=[Ot,Jt],me.dependencies={"sl-icon":de},h([Nt(".icon-button")],me.prototype,"button",2),h([Dt()],me.prototype,"hasFocus",2),h([Bt()],me.prototype,"name",2),h([Bt()],me.prototype,"library",2),h([Bt()],me.prototype,"src",2),h([Bt()],me.prototype,"href",2),h([Bt()],me.prototype,"target",2),h([Bt()],me.prototype,"download",2),h([Bt()],me.prototype,"label",2),h([Bt({type:Boolean,reflect:!0})],me.prototype,"disabled",2);const ve=new Set,ye=new MutationObserver(Ae),we=new Map;let _e,xe=document.documentElement.dir||"ltr",$e=document.documentElement.lang||navigator.language;function ke(...t){t.map((t=>{const e=t.$code.toLowerCase();we.has(e)?we.set(e,Object.assign(Object.assign({},we.get(e)),t)):we.set(e,t),_e||(_e=t)})),Ae()}function Ae(){xe=document.documentElement.dir||"ltr",$e=document.documentElement.lang||navigator.language,[...ve.keys()].map((t=>{"function"==typeof t.requestUpdate&&t.requestUpdate()}))}ye.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});let Ce=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){ve.add(this.host)}hostDisconnected(){ve.delete(this.host)}dir(){return`${this.host.dir||xe}`.toLowerCase()}lang(){return`${this.host.lang||$e}`.toLowerCase()}getTranslationData(t){var e,o;const i=new Intl.Locale(t.replace(/_/g,"-")),r=null==i?void 0:i.language.toLowerCase(),s=null!==(o=null===(e=null==i?void 0:i.region)||void 0===e?void 0:e.toLowerCase())&&void 0!==o?o:"";return{locale:i,language:r,region:s,primary:we.get(`${r}-${s}`),secondary:we.get(r)}}exists(t,e){var o;const{primary:i,secondary:r}=this.getTranslationData(null!==(o=e.lang)&&void 0!==o?o:this.lang());return e=Object.assign({includeFallback:!1},e),!!(i&&i[t]||r&&r[t]||e.includeFallback&&_e&&_e[t])}term(t,...e){const{primary:o,secondary:i}=this.getTranslationData(this.lang());let r;if(o&&o[t])r=o[t];else if(i&&i[t])r=i[t];else{if(!_e||!_e[t])return console.error(`No translation found for: ${String(t)}`),String(t);r=_e[t]}return"function"==typeof r?r(...e):r}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 Ee={$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"};ke(Ee);var Se=Ee,ze=class extends Ce{};ke(Se);var Te=0,Pe=class extends Ut{constructor(){super(...arguments),this.localize=new ze(this),this.attrId=++Te,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1}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")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){return this.id=this.id.length>0?this.id:this.componentId,it` + `}};we.styles=[Rt,ee],we.dependencies={"sl-icon":fe},d([Vt(".icon-button")],we.prototype,"button",2),d([Ht()],we.prototype,"hasFocus",2),d([Nt()],we.prototype,"name",2),d([Nt()],we.prototype,"library",2),d([Nt()],we.prototype,"src",2),d([Nt()],we.prototype,"href",2),d([Nt()],we.prototype,"target",2),d([Nt()],we.prototype,"download",2),d([Nt()],we.prototype,"label",2),d([Nt({type:Boolean,reflect:!0})],we.prototype,"disabled",2);const _e=new Set,xe=new MutationObserver(Se),$e=new Map;let ke,Ae=document.documentElement.dir||"ltr",Ce=document.documentElement.lang||navigator.language;function Ee(...t){t.map((t=>{const e=t.$code.toLowerCase();$e.has(e)?$e.set(e,Object.assign(Object.assign({},$e.get(e)),t)):$e.set(e,t),ke||(ke=t)})),Se()}function Se(){Ae=document.documentElement.dir||"ltr",Ce=document.documentElement.lang||navigator.language,[..._e.keys()].map((t=>{"function"==typeof t.requestUpdate&&t.requestUpdate()}))}xe.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});let ze=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){_e.add(this.host)}hostDisconnected(){_e.delete(this.host)}dir(){return`${this.host.dir||Ae}`.toLowerCase()}lang(){return`${this.host.lang||Ce}`.toLowerCase()}getTranslationData(t){var e,o;const i=new Intl.Locale(t.replace(/_/g,"-")),s=null==i?void 0:i.language.toLowerCase(),r=null!==(o=null===(e=null==i?void 0:i.region)||void 0===e?void 0:e.toLowerCase())&&void 0!==o?o:"";return{locale:i,language:s,region:r,primary:$e.get(`${s}-${r}`),secondary:$e.get(s)}}exists(t,e){var o;const{primary:i,secondary:s}=this.getTranslationData(null!==(o=e.lang)&&void 0!==o?o:this.lang());return e=Object.assign({includeFallback:!1},e),!!(i&&i[t]||s&&s[t]||e.includeFallback&&ke&&ke[t])}term(t,...e){const{primary:o,secondary:i}=this.getTranslationData(this.lang());let s;if(o&&o[t])s=o[t];else if(i&&i[t])s=i[t];else{if(!ke||!ke[t])return console.error(`No translation found for: ${String(t)}`),String(t);s=ke[t]}return"function"==typeof s?s(...e):s}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 Te={$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"};Ee(Te);var Pe=Te,Le=class extends ze{};Ee(Pe);var Oe=0,De=class extends It{constructor(){super(...arguments),this.localize=new Le(this),this.attrId=++Oe,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1}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")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){return this.id=this.id.length>0?this.id:this.componentId,nt`
- ${this.closable?it` + ${this.closable?nt` {if(t?.r===pe)return t?._$litStatic$},fe=(t,...e)= > `:""}
- `}};Pe.styles=[Ot,Yt],Pe.dependencies={"sl-icon-button":me},h([Nt(".tab")],Pe.prototype,"tab",2),h([Bt({reflect:!0})],Pe.prototype,"panel",2),h([Bt({type:Boolean,reflect:!0})],Pe.prototype,"active",2),h([Bt({type:Boolean})],Pe.prototype,"closable",2),h([Bt({type:Boolean,reflect:!0})],Pe.prototype,"disabled",2),h([Lt("active")],Pe.prototype,"handleActiveChange",1),h([Lt("disabled")],Pe.prototype,"handleDisabledChange",1),Pe.define("sl-tab");var Le=_` + `}};De.styles=[Rt,te],De.dependencies={"sl-icon-button":we},d([Vt(".tab")],De.prototype,"tab",2),d([Nt({reflect:!0})],De.prototype,"panel",2),d([Nt({type:Boolean,reflect:!0})],De.prototype,"active",2),d([Nt({type:Boolean})],De.prototype,"closable",2),d([Nt({type:Boolean,reflect:!0})],De.prototype,"disabled",2),d([Ft("active")],De.prototype,"handleActiveChange",1),d([Ft("disabled")],De.prototype,"handleDisabledChange",1),De.define("sl-tab");var Fe=k` :host { --indicator-color: var(--sl-color-primary-600); --track-color: var(--sl-color-neutral-200); @@ -757,15 +757,15 @@ const pe=Symbol.for(""),ue=t=>{if(t?.r===pe)return t?._$litStatic$},fe=(t,...e)= .tab-group--end ::slotted(sl-tab-panel) { --padding: 0 var(--sl-spacing-medium); } -`;function Oe(t,e,o="vertical",i="smooth"){const r=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=r.top+e.scrollTop,n=r.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:i})),"vertical"!==o&&"both"!==o||(sh&&e.scrollTo({top:s-e.offsetHeight+t.clientHeight,behavior:i}))}var Re=class extends Ut{constructor(){super(...arguments),this.localize=new ze(this),this.tabs=[],this.panels=[],this.hasScrollControls=!1,this.placement="top",this.activation="auto",this.noScrollControls=!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=>{t.some((t=>!["aria-labelledby","aria-controls"].includes(t.attributeName)))&&setTimeout((()=>this.setAriaLabels())),t.some((t=>"disabled"===t.attributeName))&&this.syncTabsAndPanels()})),this.updateComplete.then((()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,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(){super.disconnectedCallback(),this.mutationObserver.disconnect(),this.resizeObserver.unobserve(this.nav)}getAllTabs(t={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter((e=>t.includeDisabled?"sl-tab"===e.tagName.toLowerCase():"sl-tab"===e.tagName.toLowerCase()&&!e.disabled))}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();if("sl-tab"===(null==e?void 0:e.tagName.toLowerCase())){let i=this.tabs.indexOf(e);"Home"===t.key?i=0:"End"===t.key?i=this.tabs.length-1:["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&"ArrowUp"===t.key?i--:(["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&"ArrowDown"===t.key)&&i++,i<0&&(i=this.tabs.length-1),i>this.tabs.length-1&&(i=0),this.tabs[i].focus({preventScroll:!0}),"auto"===this.activation&&this.setActiveTab(this.tabs[i],{scrollBehavior:"smooth"}),["top","bottom"].includes(this.placement)&&Oe(this.tabs[i],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=l({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)),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)&&Oe(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,i="rtl"===this.localize.dir(),r=this.getAllTabs(),s=r.slice(0,r.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=i?-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({includeDisabled:!1}),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then((()=>this.updateScrollControls()))}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth}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 it` +`;var Re=new Set;function Me(t){if(Re.add(t),!document.body.classList.contains("sl-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}();document.body.classList.add("sl-scroll-lock"),document.body.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function Be(t){Re.delete(t),0===Re.size&&(document.body.classList.remove("sl-scroll-lock"),document.body.style.removeProperty("--sl-scroll-lock-size"))}function Ne(t,e,o="vertical",i="smooth"){const s=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),r=s.top+e.scrollTop,n=s.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:i})),"vertical"!==o&&"both"!==o||(rh&&e.scrollTo({top:r-e.offsetHeight+t.clientHeight,behavior:i}))}var He=class extends It{constructor(){super(...arguments),this.localize=new Le(this),this.tabs=[],this.panels=[],this.hasScrollControls=!1,this.placement="top",this.activation="auto",this.noScrollControls=!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=>{t.some((t=>!["aria-labelledby","aria-controls"].includes(t.attributeName)))&&setTimeout((()=>this.setAriaLabels())),t.some((t=>"disabled"===t.attributeName))&&this.syncTabsAndPanels()})),this.updateComplete.then((()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,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(){super.disconnectedCallback(),this.mutationObserver.disconnect(),this.resizeObserver.unobserve(this.nav)}getAllTabs(t={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter((e=>t.includeDisabled?"sl-tab"===e.tagName.toLowerCase():"sl-tab"===e.tagName.toLowerCase()&&!e.disabled))}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();if("sl-tab"===(null==e?void 0:e.tagName.toLowerCase())){let i=this.tabs.indexOf(e);"Home"===t.key?i=0:"End"===t.key?i=this.tabs.length-1:["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&"ArrowUp"===t.key?i--:(["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&"ArrowDown"===t.key)&&i++,i<0&&(i=this.tabs.length-1),i>this.tabs.length-1&&(i=0),this.tabs[i].focus({preventScroll:!0}),"auto"===this.activation&&this.setActiveTab(this.tabs[i],{scrollBehavior:"smooth"}),["top","bottom"].includes(this.placement)&&Ne(this.tabs[i],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=c({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)),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)&&Ne(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,i="rtl"===this.localize.dir(),s=this.getAllTabs(),r=s.slice(0,s.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=i?-1*r.left+"px":`${r.left}px`;break;case"start":case"end":this.indicator.style.width="auto",this.indicator.style.height=`${o}px`,this.indicator.style.translate=`0 ${r.top}px`}}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then((()=>this.updateScrollControls()))}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth}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 nt`
- ${this.hasScrollControls?it` + ${this.hasScrollControls?nt` {if(t?.r===pe)return t?._$litStatic$},fe=(t,...e)=
- ${this.hasScrollControls?it` + ${this.hasScrollControls?nt` {if(t?.r===pe)return t?._$litStatic$},fe=(t,...e)= - `}};Re.styles=[Ot,Le],Re.dependencies={"sl-icon-button":me},h([Nt(".tab-group")],Re.prototype,"tabGroup",2),h([Nt(".tab-group__body")],Re.prototype,"body",2),h([Nt(".tab-group__nav")],Re.prototype,"nav",2),h([Nt(".tab-group__indicator")],Re.prototype,"indicator",2),h([Dt()],Re.prototype,"hasScrollControls",2),h([Bt()],Re.prototype,"placement",2),h([Bt()],Re.prototype,"activation",2),h([Bt({attribute:"no-scroll-controls",type:Boolean})],Re.prototype,"noScrollControls",2),h([Lt("noScrollControls",{waitUntilFirstUpdate:!0})],Re.prototype,"updateScrollControls",1),h([Lt("placement",{waitUntilFirstUpdate:!0})],Re.prototype,"syncIndicator",1),Re.define("sl-tab-group");var Me=_` + `}};He.styles=[Rt,Fe],He.dependencies={"sl-icon-button":we},d([Vt(".tab-group")],He.prototype,"tabGroup",2),d([Vt(".tab-group__body")],He.prototype,"body",2),d([Vt(".tab-group__nav")],He.prototype,"nav",2),d([Vt(".tab-group__indicator")],He.prototype,"indicator",2),d([Ht()],He.prototype,"hasScrollControls",2),d([Nt()],He.prototype,"placement",2),d([Nt()],He.prototype,"activation",2),d([Nt({attribute:"no-scroll-controls",type:Boolean})],He.prototype,"noScrollControls",2),d([Ft("noScrollControls",{waitUntilFirstUpdate:!0})],He.prototype,"updateScrollControls",1),d([Ft("placement",{waitUntilFirstUpdate:!0})],He.prototype,"syncIndicator",1),He.define("sl-tab-group");var Ue=k` :host { --padding: 0; @@ -814,12 +814,12 @@ const pe=Symbol.for(""),ue=t=>{if(t?.r===pe)return t?._$litStatic$},fe=(t,...e)= display: block; padding: var(--padding); } -`,Be=0,De=class extends Ut{constructor(){super(...arguments),this.attrId=++Be,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 it` +`,Ve=0,Ie=class extends It{constructor(){super(...arguments),this.attrId=++Ve,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 nt` - `}};De.styles=[Ot,Me],h([Bt({reflect:!0})],De.prototype,"name",2),h([Bt({type:Boolean,reflect:!0})],De.prototype,"active",2),h([Lt("active")],De.prototype,"handleActiveChange",1),De.define("sl-tab-panel");var Fe=_` + `}};Ie.styles=[Rt,Ue],d([Nt({reflect:!0})],Ie.prototype,"name",2),d([Nt({type:Boolean,reflect:!0})],Ie.prototype,"active",2),d([Ft("active")],Ie.prototype,"handleActiveChange",1),Ie.define("sl-tab-panel");var We=k` :host { --max-width: 20rem; --hide-delay: 0ms; @@ -869,7 +869,7 @@ const pe=Symbol.for(""),ue=t=>{if(t?.r===pe)return t?._$litStatic$},fe=(t,...e)= user-select: none; -webkit-user-select: none; } -`,Ne=_` +`,je=k` :host { --arrow-color: var(--sl-color-neutral-1000); --arrow-size: 6px; @@ -927,29 +927,29 @@ const pe=Symbol.for(""),ue=t=>{if(t?.r===pe)return t?._$litStatic$},fe=(t,...e)= var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0) ); } -`;const Ue=Math.min,He=Math.max,Ve=Math.round,Ie=Math.floor,je=t=>({x:t,y:t}),We={left:"right",right:"left",bottom:"top",top:"bottom"},qe={start:"end",end:"start"};function Ke(t,e,o){return He(t,Ue(e,o))}function Ze(t,e){return"function"==typeof t?t(e):t}function Ge(t){return t.split("-")[0]}function Xe(t){return t.split("-")[1]}function Ye(t){return"x"===t?"y":"x"}function Je(t){return"y"===t?"height":"width"}function Qe(t){return["top","bottom"].includes(Ge(t))?"y":"x"}function to(t){return Ye(Qe(t))}function eo(t){return t.replace(/start|end/g,(t=>qe[t]))}function oo(t){return t.replace(/left|right|bottom|top/g,(t=>We[t]))}function io(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 ro(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function so(t,e,o){let{reference:i,floating:r}=t;const s=Qe(e),n=to(e),a=Je(n),l=Ge(e),c="y"===s,h=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,p=i[a]/2-r[a]/2;let u;switch(l){case"top":u={x:h,y:i.y-r.height};break;case"bottom":u={x:h,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:d};break;case"left":u={x:i.x-r.width,y:d};break;default:u={x:i.x,y:i.y}}switch(Xe(e)){case"start":u[n]-=p*(o&&c?-1:1);break;case"end":u[n]+=p*(o&&c?-1:1)}return u}async function no(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:s,rects:n,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=Ze(e,t),f=io(u),b=a[p?"floating"===d?"reference":"floating":d],g=ro(await s.getClippingRect({element:null==(o=await(null==s.isElement?void 0:s.isElement(b)))||o?b:b.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),m="floating"===d?{...n.floating,x:i,y:r}: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=ro(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-w.top+f.top)/y.y,bottom:(w.bottom-g.bottom+f.bottom)/y.y,left:(g.left-w.left+f.left)/y.x,right:(w.right-g.right+f.right)/y.x}}const ao=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var o,i;const{x:r,y:s,placement:n,middlewareData:a}=e,l=await async function(t,e){const{placement:o,platform:i,elements:r}=t,s=await(null==i.isRTL?void 0:i.isRTL(r.floating)),n=Ge(o),a=Xe(o),l="y"===Qe(o),c=["left","top"].includes(n)?-1:1,h=s&&l?-1:1,d=Ze(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof f&&(u="end"===a?-1*f:f),l?{x:u*h,y:p*c}:{x:p*c,y:u*h}}(e,t);return n===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:n}}}}};function lo(t){return po(t)?(t.nodeName||"").toLowerCase():"#document"}function co(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function ho(t){var e;return null==(e=(po(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function po(t){return t instanceof Node||t instanceof co(t).Node}function uo(t){return t instanceof Element||t instanceof co(t).Element}function fo(t){return t instanceof HTMLElement||t instanceof co(t).HTMLElement}function bo(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof co(t).ShadowRoot)}function go(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=_o(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function mo(t){return["table","td","th"].includes(lo(t))}function vo(t){const e=yo(),o=_o(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function yo(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function wo(t){return["html","body","#document"].includes(lo(t))}function _o(t){return co(t).getComputedStyle(t)}function xo(t){return uo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function $o(t){if("html"===lo(t))return t;const e=t.assignedSlot||t.parentNode||bo(t)&&t.host||ho(t);return bo(e)?e.host:e}function ko(t){const e=$o(t);return wo(e)?t.ownerDocument?t.ownerDocument.body:t.body:fo(e)&&go(e)?e:ko(e)}function Ao(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const r=ko(t),s=r===(null==(i=t.ownerDocument)?void 0:i.body),n=co(r);return s?e.concat(n,n.visualViewport||[],go(r)?r:[],n.frameElement&&o?Ao(n.frameElement):[]):e.concat(r,Ao(r,[],o))}function Co(t){const e=_o(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=fo(t),s=r?t.offsetWidth:o,n=r?t.offsetHeight:i,a=Ve(o)!==s||Ve(i)!==n;return a&&(o=s,i=n),{width:o,height:i,$:a}}function Eo(t){return uo(t)?t:t.contextElement}function So(t){const e=Eo(t);if(!fo(e))return je(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:s}=Co(e);let n=(s?Ve(o.width):o.width)/i,a=(s?Ve(o.height):o.height)/r;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const zo=je(0);function To(t){const e=co(t);return yo()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:zo}function Po(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),s=Eo(t);let n=je(1);e&&(i?uo(i)&&(n=So(i)):n=So(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==co(t))&&e}(s,o,i)?To(s):je(0);let l=(r.left+a.x)/n.x,c=(r.top+a.y)/n.y,h=r.width/n.x,d=r.height/n.y;if(s){const t=co(s),e=i&&uo(i)?co(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=So(o),e=o.getBoundingClientRect(),i=_o(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,d*=t.y,l+=r,c+=s,o=co(o).frameElement}}return ro({width:h,height:d,x:l,y:c})}function Lo(t){return Po(ho(t)).left+xo(t).scrollLeft}function Oo(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=co(t),i=ho(t),r=o.visualViewport;let s=i.clientWidth,n=i.clientHeight,a=0,l=0;if(r){s=r.width,n=r.height;const t=yo();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:n,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=ho(t),o=xo(t),i=t.ownerDocument.body,r=He(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=He(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let n=-o.scrollLeft+Lo(t);const a=-o.scrollTop;return"rtl"===_o(i).direction&&(n+=He(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:n,y:a}}(ho(t));else if(uo(e))i=function(t,e){const o=Po(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,s=fo(t)?So(t):je(1);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:r*s.x,y:i*s.y}}(e,o);else{const o=To(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return ro(i)}function Ro(t,e){const o=$o(t);return!(o===e||!uo(o)||wo(o))&&("fixed"===_o(o).position||Ro(o,e))}function Mo(t,e,o){const i=fo(e),r=ho(e),s="fixed"===o,n=Po(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=je(0);if(i||!i&&!s)if(("body"!==lo(e)||go(r))&&(a=xo(e)),i){const t=Po(e,!0,s,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=Lo(r));return{x:n.left+a.scrollLeft-l.x,y:n.top+a.scrollTop-l.y,width:n.width,height:n.height}}function Bo(t,e){return fo(t)&&"fixed"!==_o(t).position?e?e(t):t.offsetParent:null}function Do(t,e){const o=co(t);if(!fo(t))return o;let i=Bo(t,e);for(;i&&mo(i)&&"static"===_o(i).position;)i=Bo(i,e);return i&&("html"===lo(i)||"body"===lo(i)&&"static"===_o(i).position&&!vo(i))?o:i||function(t){let e=$o(t);for(;fo(e)&&!wo(e);){if(vo(e))return e;e=$o(e)}return null}(t)||o}const Fo={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const r=fo(o),s=ho(o);if(o===s)return e;let n={scrollLeft:0,scrollTop:0},a=je(1);const l=je(0);if((r||!r&&"fixed"!==i)&&(("body"!==lo(o)||go(s))&&(n=xo(o)),fo(o))){const t=Po(o);a=So(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-n.scrollLeft*a.x+l.x,y:e.y*a.y-n.scrollTop*a.y+l.y}},getDocumentElement:ho,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:r}=t;const s=[..."clippingAncestors"===o?function(t,e){const o=e.get(t);if(o)return o;let i=Ao(t,[],!1).filter((t=>uo(t)&&"body"!==lo(t))),r=null;const s="fixed"===_o(t).position;let n=s?$o(t):t;for(;uo(n)&&!wo(n);){const e=_o(n),o=vo(n);o||"fixed"!==e.position||(r=null),(s?!o&&!r:!o&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||go(n)&&!o&&Ro(t,n))?i=i.filter((t=>t!==n)):r=e,n=$o(n)}return e.set(t,i),i}(e,this._c):[].concat(o),i],n=s[0],a=s.reduce(((t,o)=>{const i=Oo(e,o,r);return t.top=He(i.top,t.top),t.right=Ue(i.right,t.right),t.bottom=Ue(i.bottom,t.bottom),t.left=He(i.left,t.left),t}),Oo(e,n,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Do,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const r=this.getOffsetParent||Do,s=this.getDimensions;return{reference:Mo(e,await r(o),i),floating:{x:0,y:0,...await s(o)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=Co(t);return{width:e,height:o}},getScale:So,isElement:uo,isRTL:function(t){return"rtl"===_o(t).direction}};function No(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Eo(t),h=r||s?[...c?Ao(c):[],...Ao(e)]:[];h.forEach((t=>{r&&t.addEventListener("scroll",o,{passive:!0}),s&&t.addEventListener("resize",o)}));const d=c&&a?function(t,e){let o,i=null;const r=ho(t);function s(){clearTimeout(o),i&&i.disconnect(),i=null}return function n(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),s();const{left:c,top:h,width:d,height:p}=t.getBoundingClientRect();if(a||e(),!d||!p)return;const u={rootMargin:-Ie(h)+"px "+-Ie(r.clientWidth-(c+d))+"px "+-Ie(r.clientHeight-(h+p))+"px "+-Ie(c)+"px",threshold:He(0,Ue(1,l))||1};let f=!0;function b(t){const e=t[0].intersectionRatio;if(e!==l){if(!f)return n();e?n(!1,e):o=setTimeout((()=>{n(!1,1e-7)}),100)}f=!1}try{i=new IntersectionObserver(b,{...u,root:r.ownerDocument})}catch(t){i=new IntersectionObserver(b,u)}i.observe(t)}(!0),s}(c,o):null;let p,u=-1,f=null;n&&(f=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{f&&f.observe(e)}))),o()})),c&&!l&&f.observe(c),f.observe(e));let b=l?Po(t):null;return l&&function e(){const i=Po(t);!b||i.x===b.x&&i.y===b.y&&i.width===b.width&&i.height===b.height||o();b=i,p=requestAnimationFrame(e)}(),o(),()=>{h.forEach((t=>{r&&t.removeEventListener("scroll",o),s&&t.removeEventListener("resize",o)})),d&&d(),f&&f.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Uo=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:n=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=Ze(t,e),c={x:o,y:i},h=await no(e,l),d=Qe(Ge(r)),p=Ye(d);let u=c[p],f=c[d];if(s){const t="y"===p?"bottom":"right";u=Ke(u+h["y"===p?"top":"left"],u,u-h[t])}if(n){const t="y"===d?"bottom":"right";f=Ke(f+h["y"===d?"top":"left"],f,f-h[t])}const b=a.fn({...e,[p]:u,[d]:f});return{...b,data:{x:b.x-o,y:b.y-i}}}}},Ho=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:r,middlewareData:s,rects:n,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:b=!0,...g}=Ze(t,e);if(null!=(o=s.arrow)&&o.alignmentOffset)return{};const m=Ge(r),v=Ge(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(v||!b?[oo(a)]:function(t){const e=oo(t);return[eo(t),e,eo(e)]}(a));p||"none"===f||w.push(...function(t,e,o,i){const r=Xe(t);let s=function(t,e,o){const i=["left","right"],r=["right","left"],s=["top","bottom"],n=["bottom","top"];switch(t){case"top":case"bottom":return o?e?r:i:e?i:r;case"left":case"right":return e?s:n;default:return[]}}(Ge(t),"start"===o,i);return r&&(s=s.map((t=>t+"-"+r)),e&&(s=s.concat(s.map(eo)))),s}(a,b,f,y));const _=[a,...w],x=await no(e,g),$=[];let k=(null==(i=s.flip)?void 0:i.overflows)||[];if(h&&$.push(x[m]),d){const t=function(t,e,o){void 0===o&&(o=!1);const i=Xe(t),r=to(t),s=Je(r);let n="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[s]>e.floating[s]&&(n=oo(n)),[n,oo(n)]}(r,n,y);$.push(x[t[0]],x[t[1]])}if(k=[...k,{placement:r,overflows:$}],!$.every((t=>t<=0))){var A,C;const t=((null==(A=s.flip)?void 0:A.index)||0)+1,e=_[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let o=null==(C=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!o)switch(u){case"bestFit":{var E;const t=null==(E=k.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:E[0];t&&(o=t);break}case"initialPlacement":o=a}if(r!==o)return{reset:{placement:o}}}return{}}}},Vo=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:i,platform:r,elements:s}=e,{apply:n=(()=>{}),...a}=Ze(t,e),l=await no(e,a),c=Ge(o),h=Xe(o),d="y"===Qe(o),{width:p,height:u}=i.floating;let f,b;"top"===c||"bottom"===c?(f=c,b=h===(await(null==r.isRTL?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(b=c,f="end"===h?"top":"bottom");const g=u-l[f],m=p-l[b],v=!e.middlewareData.shift;let y=g,w=m;if(d){const t=p-l.left-l.right;w=h||v?Ue(m,t):t}else{const t=u-l.top-l.bottom;y=h||v?Ue(g,t):t}if(v&&!h){const t=He(l.left,0),e=He(l.right,0),o=He(l.top,0),i=He(l.bottom,0);d?w=p-2*(0!==t||0!==e?t+e:He(l.left,l.right)):y=u-2*(0!==o||0!==i?o+i:He(l.top,l.bottom))}await n({...e,availableWidth:w,availableHeight:y});const _=await r.getDimensions(s.floating);return p!==_.width||u!==_.height?{reset:{rects:!0}}:{}}}},Io=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:r,rects:s,platform:n,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=Ze(t,e)||{};if(null==c)return{};const d=io(h),p={x:o,y:i},u=to(r),f=Je(u),b=await n.getDimensions(c),g="y"===u,m=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=s.reference[f]+s.reference[u]-p[u]-s.floating[f],_=p[u]-s.reference[u],x=await(null==n.getOffsetParent?void 0:n.getOffsetParent(c));let $=x?x[y]:0;$&&await(null==n.isElement?void 0:n.isElement(x))||($=a.floating[y]||s.floating[f]);const k=w/2-_/2,A=$/2-b[f]/2-1,C=Ue(d[m],A),E=Ue(d[v],A),S=C,z=$-b[f]-E,T=$/2-b[f]/2+k,P=Ke(S,T,z),L=!l.arrow&&null!=Xe(r)&&T!=P&&s.reference[f]/2-(T{const i=new Map,r={platform:Fo,...o},s={...r.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:r="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:r}),{x:h,y:d}=so(c,i,l),p=i,u={},f=0;for(let o=0;o{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let o=0,i=0,r=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=[ao({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Vo({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(Ho({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Uo({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Vo({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(Io({element:this.arrowEl,padding:this.arrowPadding}));const e="absolute"===this.strategy?t=>Fo.getOffsetParent(t,Wo):Fo.getOffsetParent;jo(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:c(l({},Fo),{getOffsetParent:e})}).then((({x:t,y:e,middlewareData:o,placement:i})=>{const r="rtl"===getComputedStyle(this).direction,s={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=o.arrow.x,e=o.arrow.y;let i="",n="",a="",l="";if("start"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",n=r?o:"",l=r?"":o}else if("end"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n=r?"":o,l=r?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))":"",i="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",i="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:i,right:n,bottom:a,left:l,[s]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return it` +`;const qe=Math.min,Ke=Math.max,Ze=Math.round,Xe=Math.floor,Ye=t=>({x:t,y:t}),Ge={left:"right",right:"left",bottom:"top",top:"bottom"},Je={start:"end",end:"start"};function Qe(t,e,o){return Ke(t,qe(e,o))}function to(t,e){return"function"==typeof t?t(e):t}function eo(t){return t.split("-")[0]}function oo(t){return t.split("-")[1]}function io(t){return"x"===t?"y":"x"}function so(t){return"y"===t?"height":"width"}function ro(t){return["top","bottom"].includes(eo(t))?"y":"x"}function no(t){return io(ro(t))}function ao(t){return t.replace(/start|end/g,(t=>Je[t]))}function lo(t){return t.replace(/left|right|bottom|top/g,(t=>Ge[t]))}function co(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 ho(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function po(t,e,o){let{reference:i,floating:s}=t;const r=ro(e),n=no(e),a=so(n),l=eo(e),c="y"===r,h=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,p=i[a]/2-s[a]/2;let u;switch(l){case"top":u={x:h,y:i.y-s.height};break;case"bottom":u={x:h,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:d};break;case"left":u={x:i.x-s.width,y:d};break;default:u={x:i.x,y:i.y}}switch(oo(e)){case"start":u[n]-=p*(o&&c?-1:1);break;case"end":u[n]+=p*(o&&c?-1:1)}return u}async function uo(t,e){var o;void 0===e&&(e={});const{x:i,y:s,platform:r,rects:n,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=to(e,t),f=co(u),b=a[p?"floating"===d?"reference":"floating":d],g=ho(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(b)))||o?b:b.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),m="floating"===d?{...n.floating,x:i,y:s}:n.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),y=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},w=ho(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-w.top+f.top)/y.y,bottom:(w.bottom-g.bottom+f.bottom)/y.y,left:(g.left-w.left+f.left)/y.x,right:(w.right-g.right+f.right)/y.x}}const fo=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var o,i;const{x:s,y:r,placement:n,middlewareData:a}=e,l=await async function(t,e){const{placement:o,platform:i,elements:s}=t,r=await(null==i.isRTL?void 0:i.isRTL(s.floating)),n=eo(o),a=oo(o),l="y"===ro(o),c=["left","top"].includes(n)?-1:1,h=r&&l?-1:1,d=to(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof f&&(u="end"===a?-1*f:f),l?{x:u*h,y:p*c}:{x:p*c,y:u*h}}(e,t);return n===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:n}}}}};function bo(t){return vo(t)?(t.nodeName||"").toLowerCase():"#document"}function go(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function mo(t){var e;return null==(e=(vo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function vo(t){return t instanceof Node||t instanceof go(t).Node}function yo(t){return t instanceof Element||t instanceof go(t).Element}function wo(t){return t instanceof HTMLElement||t instanceof go(t).HTMLElement}function _o(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof go(t).ShadowRoot)}function xo(t){const{overflow:e,overflowX:o,overflowY:i,display:s}=Eo(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(s)}function $o(t){return["table","td","th"].includes(bo(t))}function ko(t){const e=Ao(),o=Eo(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function Ao(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Co(t){return["html","body","#document"].includes(bo(t))}function Eo(t){return go(t).getComputedStyle(t)}function So(t){return yo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function zo(t){if("html"===bo(t))return t;const e=t.assignedSlot||t.parentNode||_o(t)&&t.host||mo(t);return _o(e)?e.host:e}function To(t){const e=zo(t);return Co(e)?t.ownerDocument?t.ownerDocument.body:t.body:wo(e)&&xo(e)?e:To(e)}function Po(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const s=To(t),r=s===(null==(i=t.ownerDocument)?void 0:i.body),n=go(s);return r?e.concat(n,n.visualViewport||[],xo(s)?s:[],n.frameElement&&o?Po(n.frameElement):[]):e.concat(s,Po(s,[],o))}function Lo(t){const e=Eo(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=wo(t),r=s?t.offsetWidth:o,n=s?t.offsetHeight:i,a=Ze(o)!==r||Ze(i)!==n;return a&&(o=r,i=n),{width:o,height:i,$:a}}function Oo(t){return yo(t)?t:t.contextElement}function Do(t){const e=Oo(t);if(!wo(e))return Ye(1);const o=e.getBoundingClientRect(),{width:i,height:s,$:r}=Lo(e);let n=(r?Ze(o.width):o.width)/i,a=(r?Ze(o.height):o.height)/s;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const Fo=Ye(0);function Ro(t){const e=go(t);return Ao()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Fo}function Mo(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const s=t.getBoundingClientRect(),r=Oo(t);let n=Ye(1);e&&(i?yo(i)&&(n=Do(i)):n=Do(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==go(t))&&e}(r,o,i)?Ro(r):Ye(0);let l=(s.left+a.x)/n.x,c=(s.top+a.y)/n.y,h=s.width/n.x,d=s.height/n.y;if(r){const t=go(r),e=i&&yo(i)?go(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=Do(o),e=o.getBoundingClientRect(),i=Eo(o),s=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,r=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,d*=t.y,l+=s,c+=r,o=go(o).frameElement}}return ho({width:h,height:d,x:l,y:c})}function Bo(t){return Mo(mo(t)).left+So(t).scrollLeft}function No(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=go(t),i=mo(t),s=o.visualViewport;let r=i.clientWidth,n=i.clientHeight,a=0,l=0;if(s){r=s.width,n=s.height;const t=Ao();(!t||t&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:n,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=mo(t),o=So(t),i=t.ownerDocument.body,s=Ke(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=Ke(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let n=-o.scrollLeft+Bo(t);const a=-o.scrollTop;return"rtl"===Eo(i).direction&&(n+=Ke(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:n,y:a}}(mo(t));else if(yo(e))i=function(t,e){const o=Mo(t,!0,"fixed"===e),i=o.top+t.clientTop,s=o.left+t.clientLeft,r=wo(t)?Do(t):Ye(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:s*r.x,y:i*r.y}}(e,o);else{const o=Ro(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return ho(i)}function Ho(t,e){const o=zo(t);return!(o===e||!yo(o)||Co(o))&&("fixed"===Eo(o).position||Ho(o,e))}function Uo(t,e,o){const i=wo(e),s=mo(e),r="fixed"===o,n=Mo(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=Ye(0);if(i||!i&&!r)if(("body"!==bo(e)||xo(s))&&(a=So(e)),i){const t=Mo(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else s&&(l.x=Bo(s));return{x:n.left+a.scrollLeft-l.x,y:n.top+a.scrollTop-l.y,width:n.width,height:n.height}}function Vo(t,e){return wo(t)&&"fixed"!==Eo(t).position?e?e(t):t.offsetParent:null}function Io(t,e){const o=go(t);if(!wo(t))return o;let i=Vo(t,e);for(;i&&$o(i)&&"static"===Eo(i).position;)i=Vo(i,e);return i&&("html"===bo(i)||"body"===bo(i)&&"static"===Eo(i).position&&!ko(i))?o:i||function(t){let e=zo(t);for(;wo(e)&&!Co(e);){if(ko(e))return e;e=zo(e)}return null}(t)||o}const Wo={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const s=wo(o),r=mo(o);if(o===r)return e;let n={scrollLeft:0,scrollTop:0},a=Ye(1);const l=Ye(0);if((s||!s&&"fixed"!==i)&&(("body"!==bo(o)||xo(r))&&(n=So(o)),wo(o))){const t=Mo(o);a=Do(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-n.scrollLeft*a.x+l.x,y:e.y*a.y-n.scrollTop*a.y+l.y}},getDocumentElement:mo,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:s}=t;const r=[..."clippingAncestors"===o?function(t,e){const o=e.get(t);if(o)return o;let i=Po(t,[],!1).filter((t=>yo(t)&&"body"!==bo(t))),s=null;const r="fixed"===Eo(t).position;let n=r?zo(t):t;for(;yo(n)&&!Co(n);){const e=Eo(n),o=ko(n);o||"fixed"!==e.position||(s=null),(r?!o&&!s:!o&&"static"===e.position&&s&&["absolute","fixed"].includes(s.position)||xo(n)&&!o&&Ho(t,n))?i=i.filter((t=>t!==n)):s=e,n=zo(n)}return e.set(t,i),i}(e,this._c):[].concat(o),i],n=r[0],a=r.reduce(((t,o)=>{const i=No(e,o,s);return t.top=Ke(i.top,t.top),t.right=qe(i.right,t.right),t.bottom=qe(i.bottom,t.bottom),t.left=Ke(i.left,t.left),t}),No(e,n,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Io,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const s=this.getOffsetParent||Io,r=this.getDimensions;return{reference:Uo(e,await s(o),i),floating:{x:0,y:0,...await r(o)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=Lo(t);return{width:e,height:o}},getScale:Do,isElement:yo,isRTL:function(t){return"rtl"===Eo(t).direction}};function jo(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Oo(t),h=s||r?[...c?Po(c):[],...Po(e)]:[];h.forEach((t=>{s&&t.addEventListener("scroll",o,{passive:!0}),r&&t.addEventListener("resize",o)}));const d=c&&a?function(t,e){let o,i=null;const s=mo(t);function r(){clearTimeout(o),i&&i.disconnect(),i=null}return function n(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const{left:c,top:h,width:d,height:p}=t.getBoundingClientRect();if(a||e(),!d||!p)return;const u={rootMargin:-Xe(h)+"px "+-Xe(s.clientWidth-(c+d))+"px "+-Xe(s.clientHeight-(h+p))+"px "+-Xe(c)+"px",threshold:Ke(0,qe(1,l))||1};let f=!0;function b(t){const e=t[0].intersectionRatio;if(e!==l){if(!f)return n();e?n(!1,e):o=setTimeout((()=>{n(!1,1e-7)}),100)}f=!1}try{i=new IntersectionObserver(b,{...u,root:s.ownerDocument})}catch(t){i=new IntersectionObserver(b,u)}i.observe(t)}(!0),r}(c,o):null;let p,u=-1,f=null;n&&(f=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{f&&f.observe(e)}))),o()})),c&&!l&&f.observe(c),f.observe(e));let b=l?Mo(t):null;return l&&function e(){const i=Mo(t);!b||i.x===b.x&&i.y===b.y&&i.width===b.width&&i.height===b.height||o();b=i,p=requestAnimationFrame(e)}(),o(),()=>{h.forEach((t=>{s&&t.removeEventListener("scroll",o),r&&t.removeEventListener("resize",o)})),d&&d(),f&&f.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const qo=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:n=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=to(t,e),c={x:o,y:i},h=await uo(e,l),d=ro(eo(s)),p=io(d);let u=c[p],f=c[d];if(r){const t="y"===p?"bottom":"right";u=Qe(u+h["y"===p?"top":"left"],u,u-h[t])}if(n){const t="y"===d?"bottom":"right";f=Qe(f+h["y"===d?"top":"left"],f,f-h[t])}const b=a.fn({...e,[p]:u,[d]:f});return{...b,data:{x:b.x-o,y:b.y-i}}}}},Ko=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:s,middlewareData:r,rects:n,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:b=!0,...g}=to(t,e);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const m=eo(s),v=eo(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(v||!b?[lo(a)]:function(t){const e=lo(t);return[ao(t),e,ao(e)]}(a));p||"none"===f||w.push(...function(t,e,o,i){const s=oo(t);let r=function(t,e,o){const i=["left","right"],s=["right","left"],r=["top","bottom"],n=["bottom","top"];switch(t){case"top":case"bottom":return o?e?s:i:e?i:s;case"left":case"right":return e?r:n;default:return[]}}(eo(t),"start"===o,i);return s&&(r=r.map((t=>t+"-"+s)),e&&(r=r.concat(r.map(ao)))),r}(a,b,f,y));const _=[a,...w],x=await uo(e,g),$=[];let k=(null==(i=r.flip)?void 0:i.overflows)||[];if(h&&$.push(x[m]),d){const t=function(t,e,o){void 0===o&&(o=!1);const i=oo(t),s=no(t),r=so(s);let n="x"===s?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(n=lo(n)),[n,lo(n)]}(s,n,y);$.push(x[t[0]],x[t[1]])}if(k=[...k,{placement:s,overflows:$}],!$.every((t=>t<=0))){var A,C;const t=((null==(A=r.flip)?void 0:A.index)||0)+1,e=_[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let o=null==(C=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!o)switch(u){case"bestFit":{var E;const t=null==(E=k.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:E[0];t&&(o=t);break}case"initialPlacement":o=a}if(s!==o)return{reset:{placement:o}}}return{}}}},Zo=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:i,platform:s,elements:r}=e,{apply:n=(()=>{}),...a}=to(t,e),l=await uo(e,a),c=eo(o),h=oo(o),d="y"===ro(o),{width:p,height:u}=i.floating;let f,b;"top"===c||"bottom"===c?(f=c,b=h===(await(null==s.isRTL?void 0:s.isRTL(r.floating))?"start":"end")?"left":"right"):(b=c,f="end"===h?"top":"bottom");const g=u-l[f],m=p-l[b],v=!e.middlewareData.shift;let y=g,w=m;if(d){const t=p-l.left-l.right;w=h||v?qe(m,t):t}else{const t=u-l.top-l.bottom;y=h||v?qe(g,t):t}if(v&&!h){const t=Ke(l.left,0),e=Ke(l.right,0),o=Ke(l.top,0),i=Ke(l.bottom,0);d?w=p-2*(0!==t||0!==e?t+e:Ke(l.left,l.right)):y=u-2*(0!==o||0!==i?o+i:Ke(l.top,l.bottom))}await n({...e,availableWidth:w,availableHeight:y});const _=await s.getDimensions(r.floating);return p!==_.width||u!==_.height?{reset:{rects:!0}}:{}}}},Xo=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:s,rects:r,platform:n,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=to(t,e)||{};if(null==c)return{};const d=co(h),p={x:o,y:i},u=no(s),f=so(u),b=await n.getDimensions(c),g="y"===u,m=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=r.reference[f]+r.reference[u]-p[u]-r.floating[f],_=p[u]-r.reference[u],x=await(null==n.getOffsetParent?void 0:n.getOffsetParent(c));let $=x?x[y]:0;$&&await(null==n.isElement?void 0:n.isElement(x))||($=a.floating[y]||r.floating[f]);const k=w/2-_/2,A=$/2-b[f]/2-1,C=qe(d[m],A),E=qe(d[v],A),S=C,z=$-b[f]-E,T=$/2-b[f]/2+k,P=Qe(S,T,z),L=!l.arrow&&null!=oo(s)&&T!=P&&r.reference[f]/2-(T{const i=new Map,s={platform:Wo,...o},r={...s.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:n}=o,a=r.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(e));let c=await n.getElementRects({reference:t,floating:e,strategy:s}),{x:h,y:d}=po(c,i,l),p=i,u={},f=0;for(let o=0;o{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let o=0,i=0,s=0,r=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=[fo({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Zo({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(Ko({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(qo({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Zo({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(Xo({element:this.arrowEl,padding:this.arrowPadding}));const e="absolute"===this.strategy?t=>Wo.getOffsetParent(t,Go):Wo.getOffsetParent;Yo(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:h(c({},Wo),{getOffsetParent:e})}).then((({x:t,y:e,middlewareData:o,placement:i})=>{const s="rtl"===getComputedStyle(this).direction,r={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=o.arrow.x,e=o.arrow.y;let i="",n="",a="",l="";if("start"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",n=s?o:"",l=s?"":o}else if("end"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n=s?"":o,l=s?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))":"",i="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",i="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:i,right:n,bottom:a,left:l,[r]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return nt`
- ${this.arrow?it``:""} + ${this.arrow?nt``:""}
- `}};function Zo(t,e){return new Promise((o=>{t.addEventListener(e,(function i(r){r.target===t&&(t.removeEventListener(e,i),o())}))}))}function Go(t,e,o){return new Promise((i=>{if((null==o?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const r=t.animate(e,c(l({},o),{duration:Yo()?0:o.duration}));r.addEventListener("cancel",i,{once:!0}),r.addEventListener("finish",i,{once:!0})}))}function Xo(t){return(t=t.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?1e3*parseFloat(t):parseFloat(t)}function Yo(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Jo(t){return Promise.all(t.getAnimations().map((t=>new Promise((e=>{t.cancel(),requestAnimationFrame(e)})))))}Ko.styles=[Ot,Ne],h([Nt(".popup")],Ko.prototype,"popup",2),h([Nt(".popup__arrow")],Ko.prototype,"arrowEl",2),h([Bt()],Ko.prototype,"anchor",2),h([Bt({type:Boolean,reflect:!0})],Ko.prototype,"active",2),h([Bt({reflect:!0})],Ko.prototype,"placement",2),h([Bt({reflect:!0})],Ko.prototype,"strategy",2),h([Bt({type:Number})],Ko.prototype,"distance",2),h([Bt({type:Number})],Ko.prototype,"skidding",2),h([Bt({type:Boolean})],Ko.prototype,"arrow",2),h([Bt({attribute:"arrow-placement"})],Ko.prototype,"arrowPlacement",2),h([Bt({attribute:"arrow-padding",type:Number})],Ko.prototype,"arrowPadding",2),h([Bt({type:Boolean})],Ko.prototype,"flip",2),h([Bt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],Ko.prototype,"flipFallbackPlacements",2),h([Bt({attribute:"flip-fallback-strategy"})],Ko.prototype,"flipFallbackStrategy",2),h([Bt({type:Object})],Ko.prototype,"flipBoundary",2),h([Bt({attribute:"flip-padding",type:Number})],Ko.prototype,"flipPadding",2),h([Bt({type:Boolean})],Ko.prototype,"shift",2),h([Bt({type:Object})],Ko.prototype,"shiftBoundary",2),h([Bt({attribute:"shift-padding",type:Number})],Ko.prototype,"shiftPadding",2),h([Bt({attribute:"auto-size"})],Ko.prototype,"autoSize",2),h([Bt()],Ko.prototype,"sync",2),h([Bt({type:Object})],Ko.prototype,"autoSizeBoundary",2),h([Bt({attribute:"auto-size-padding",type:Number})],Ko.prototype,"autoSizePadding",2),h([Bt({attribute:"hover-bridge",type:Boolean})],Ko.prototype,"hoverBridge",2);var Qo=class extends Ut{constructor(){super(),this.localize=new ze(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=Xo(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=Xo(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;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 Jo(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:o}=b(this,"tooltip.show",{dir:this.localize.dir()});await Go(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 Jo(this.body);const{keyframes:t,options:o}=b(this,"tooltip.hide",{dir:this.localize.dir()});await Go(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,Zo(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,Zo(this,"sl-after-hide")}render(){return it` + `}};function ti(t,e){return new Promise((o=>{t.addEventListener(e,(function i(s){s.target===t&&(t.removeEventListener(e,i),o())}))}))}function ei(t,e,o){return new Promise((i=>{if((null==o?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const s=t.animate(e,h(c({},o),{duration:ii()?0:o.duration}));s.addEventListener("cancel",i,{once:!0}),s.addEventListener("finish",i,{once:!0})}))}function oi(t){return(t=t.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?1e3*parseFloat(t):parseFloat(t)}function ii(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function si(t){return Promise.all(t.getAnimations().map((t=>new Promise((e=>{t.cancel(),requestAnimationFrame(e)})))))}Qo.styles=[Rt,je],d([Vt(".popup")],Qo.prototype,"popup",2),d([Vt(".popup__arrow")],Qo.prototype,"arrowEl",2),d([Nt()],Qo.prototype,"anchor",2),d([Nt({type:Boolean,reflect:!0})],Qo.prototype,"active",2),d([Nt({reflect:!0})],Qo.prototype,"placement",2),d([Nt({reflect:!0})],Qo.prototype,"strategy",2),d([Nt({type:Number})],Qo.prototype,"distance",2),d([Nt({type:Number})],Qo.prototype,"skidding",2),d([Nt({type:Boolean})],Qo.prototype,"arrow",2),d([Nt({attribute:"arrow-placement"})],Qo.prototype,"arrowPlacement",2),d([Nt({attribute:"arrow-padding",type:Number})],Qo.prototype,"arrowPadding",2),d([Nt({type:Boolean})],Qo.prototype,"flip",2),d([Nt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],Qo.prototype,"flipFallbackPlacements",2),d([Nt({attribute:"flip-fallback-strategy"})],Qo.prototype,"flipFallbackStrategy",2),d([Nt({type:Object})],Qo.prototype,"flipBoundary",2),d([Nt({attribute:"flip-padding",type:Number})],Qo.prototype,"flipPadding",2),d([Nt({type:Boolean})],Qo.prototype,"shift",2),d([Nt({type:Object})],Qo.prototype,"shiftBoundary",2),d([Nt({attribute:"shift-padding",type:Number})],Qo.prototype,"shiftPadding",2),d([Nt({attribute:"auto-size"})],Qo.prototype,"autoSize",2),d([Nt()],Qo.prototype,"sync",2),d([Nt({type:Object})],Qo.prototype,"autoSizeBoundary",2),d([Nt({attribute:"auto-size-padding",type:Number})],Qo.prototype,"autoSizePadding",2),d([Nt({attribute:"hover-bridge",type:Boolean})],Qo.prototype,"hoverBridge",2);var ri=class extends It{constructor(){super(),this.localize=new Le(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=oi(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=oi(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;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 si(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:o}=v(this,"tooltip.show",{dir:this.localize.dir()});await ei(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 si(this.body);const{keyframes:t,options:o}=v(this,"tooltip.hide",{dir:this.localize.dir()});await ei(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,ti(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ti(this,"sl-after-hide")}render(){return nt` {if(t?.r===pe)return t?._$litStatic$},fe=(t,...e)= ${this.content} - `}};Qo.styles=[Ot,Fe],Qo.dependencies={"sl-popup":Ko},h([Nt("slot:not([name])")],Qo.prototype,"defaultSlot",2),h([Nt(".tooltip__body")],Qo.prototype,"body",2),h([Nt("sl-popup")],Qo.prototype,"popup",2),h([Bt()],Qo.prototype,"content",2),h([Bt()],Qo.prototype,"placement",2),h([Bt({type:Boolean,reflect:!0})],Qo.prototype,"disabled",2),h([Bt({type:Number})],Qo.prototype,"distance",2),h([Bt({type:Boolean,reflect:!0})],Qo.prototype,"open",2),h([Bt({type:Number})],Qo.prototype,"skidding",2),h([Bt()],Qo.prototype,"trigger",2),h([Bt({type:Boolean})],Qo.prototype,"hoist",2),h([Lt("open",{waitUntilFirstUpdate:!0})],Qo.prototype,"handleOpenChange",1),h([Lt(["content","distance","hoist","placement","skidding"])],Qo.prototype,"handleOptionsChange",1),h([Lt("disabled")],Qo.prototype,"handleDisabledChange",1),f("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),f("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),Qo.define("sl-tooltip");var ti=_` + `}};ri.styles=[Rt,We],ri.dependencies={"sl-popup":Qo},d([Vt("slot:not([name])")],ri.prototype,"defaultSlot",2),d([Vt(".tooltip__body")],ri.prototype,"body",2),d([Vt("sl-popup")],ri.prototype,"popup",2),d([Nt()],ri.prototype,"content",2),d([Nt()],ri.prototype,"placement",2),d([Nt({type:Boolean,reflect:!0})],ri.prototype,"disabled",2),d([Nt({type:Number})],ri.prototype,"distance",2),d([Nt({type:Boolean,reflect:!0})],ri.prototype,"open",2),d([Nt({type:Number})],ri.prototype,"skidding",2),d([Nt()],ri.prototype,"trigger",2),d([Nt({type:Boolean})],ri.prototype,"hoist",2),d([Ft("open",{waitUntilFirstUpdate:!0})],ri.prototype,"handleOpenChange",1),d([Ft(["content","distance","hoist","placement","skidding"])],ri.prototype,"handleOptionsChange",1),d([Ft("disabled")],ri.prototype,"handleDisabledChange",1),m("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),m("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),ri.define("sl-tooltip");var ni=k` :host { --height: 1rem; --track-color: var(--sl-color-neutral-200); @@ -1054,19 +1054,180 @@ const pe=Symbol.for(""),ue=t=>{if(t?.r===pe)return t?._$litStatic$},fe=(t,...e)= * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;const ei="important",oi=" !"+ei,ii=jt(class extends Wt{constructor(t){if(super(t),t.type!==Ht||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ut)return this.ut=new Set(Object.keys(e)),this.render(e);for(const t of this.ut)null==e[t]&&(this.ut.delete(t),t.includes("-")?o.removeProperty(t):o[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ut.add(t);const e="string"==typeof i&&i.endsWith(oi);t.includes("-")||e?o.setProperty(t,e?i.slice(0,-11):i,e?ei:""):o[t]=i}}return rt}});var ri=class extends Ut{constructor(){super(...arguments),this.localize=new ze(this),this.value=0,this.indeterminate=!1,this.label=""}render(){return it` + */;const ai="important",li=" !"+ai,ci=Kt(class extends Zt{constructor(t){if(super(t),t.type!==Wt||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ut)return this.ut=new Set(Object.keys(e)),this.render(e);for(const t of this.ut)null==e[t]&&(this.ut.delete(t),t.includes("-")?o.removeProperty(t):o[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ut.add(t);const e="string"==typeof i&&i.endsWith(li);t.includes("-")||e?o.setProperty(t,e?i.slice(0,-11):i,e?ai:""):o[t]=i}}return at}});var hi=class extends It{constructor(){super(...arguments),this.localize=new Le(this),this.value=0,this.indeterminate=!1,this.label=""}render(){return nt`
0?this.label:this.localize.term("progress")} aria-valuemin="0" aria-valuemax="100" aria-valuenow=${this.indeterminate?0:this.value} > -
- ${this.indeterminate?"":it` `} +
+ ${this.indeterminate?"":nt` `}
- `}};ri.styles=[Ot,ti],h([Bt({type:Number,reflect:!0})],ri.prototype,"value",2),h([Bt({type:Boolean,reflect:!0})],ri.prototype,"indeterminate",2),h([Bt()],ri.prototype,"label",2),ri.define("sl-progress-bar");export{f as setDefaultAnimation}; + `}};hi.styles=[Rt,ni],d([Nt({type:Number,reflect:!0})],hi.prototype,"value",2),d([Nt({type:Boolean,reflect:!0})],hi.prototype,"indeterminate",2),d([Nt()],hi.prototype,"label",2),hi.define("sl-progress-bar");var di=new WeakMap;function pi(t){let e=di.get(t);return e||(e=window.getComputedStyle(t,null),di.set(t,e)),e}function ui(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")&&!t.hasAttribute("checked"))return!1;if(!function(t){if("function"==typeof t.checkVisibility)return t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});const e=pi(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=pi(t),{overflowY:o,overflowX:i}=e;return"scroll"===o||"scroll"===i||"auto"===o&&"auto"===i&&(t.scrollHeight>t.clientHeight&&"auto"===o||!(!(t.scrollWidth>t.clientWidth)||"auto"!==i))}(t)}function fi(t){const e=new WeakMap,o=[];return function i(s){if(s instanceof Element){if(s.hasAttribute("inert")||s.closest("[inert]"))return;if(e.has(s))return;e.set(s,!0),!o.includes(s)&&ui(s)&&o.push(s),s instanceof HTMLSlotElement&&function(t,e){var o;return(null==(o=t.getRootNode({composed:!0}))?void 0:o.host)!==e}(s,t)&&s.assignedElements({flatten:!0}).forEach((t=>{i(t)})),null!==s.shadowRoot&&"open"===s.shadowRoot.mode&&i(s.shadowRoot)}for(const t of s.children)i(t)}(t),o.sort(((t,e)=>{const o=Number(t.getAttribute("tabindex"))||0;return(Number(e.getAttribute("tabindex"))||0)-o}))}function*bi(t=document.activeElement){null!=t&&(yield t,"shadowRoot"in t&&t.shadowRoot&&"closed"!==t.shadowRoot.mode&&(yield*u(bi(t.shadowRoot.activeElement))))}var gi=[],mi=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=[...bi()].pop();if(this.previousFocus=o,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;t.shiftKey?this.tabDirection="backward":this.tabDirection="forward";const i=fi(this.element);let s=i.findIndex((t=>t===o));this.previousFocus=this.currentFocus;const r="forward"===this.tabDirection?1:-1;for(;;){s+r>=i.length?s=0:s+r<0?s=i.length-1:s+=r,this.previousFocus=this.currentFocus;const o=i[s];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=[...bi()];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(){gi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){gi=gi.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 gi[gi.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const t=fi(this.element);if(!this.element.matches(":focus-within")){const e=t[0],o=t[t.length-1],i="forward"===this.tabDirection?e:o;"function"==typeof(null==i?void 0:i.focus)&&(this.currentFocus=i,i.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(t){return this.elementsWithTabbableControls.includes(t.tagName.toLowerCase())||t.hasAttribute("controls")}},vi=k` + :host { + --width: 31rem; + --header-spacing: var(--sl-spacing-large); + --body-spacing: var(--sl-spacing-large); + --footer-spacing: var(--sl-spacing-large); + + display: contents; + } + + .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); + } + + .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); + } + + .dialog__panel:focus { + outline: none; + } + + /* 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; + } + } + + .dialog--open .dialog__panel { + display: flex; + opacity: 1; + } + + .dialog__header { + flex: 0 0 auto; + display: flex; + } + + .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; + } + + .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); + } + + .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); + } + + .dialog__body { + flex: 1 1 auto; + display: block; + padding: var(--body-spacing); + overflow: auto; + -webkit-overflow-scrolling: touch; + } + + .dialog__footer { + flex: 0 0 auto; + text-align: right; + padding: var(--footer-spacing); + } + + .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); + } + } +`,yi=class extends It{constructor(){super(...arguments),this.hasSlotController=new Dt(this,"footer"),this.localize=new Le(this),this.modal=new mi(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.modal.isActive()&&this.open&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Me(this))}disconnectedCallback(){var t;super.disconnectedCallback(),this.modal.deactivate(),Be(this),null==(t=this.closeWatcher)||t.destroy()}requestClose(t){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=v(this,"dialog.denyClose",{dir:this.localize.dir()});ei(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){var t;"CloseWatcher"in window?(null==(t=this.closeWatcher)||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard")):document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){var t;null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),Me(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([si(this.dialog),si(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=v(this,"dialog.show",{dir:this.localize.dir()}),o=v(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([ei(this.panel,e.keyframes,e.options),ei(this.overlay,o.keyframes,o.options)]),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([si(this.dialog),si(this.overlay)]);const t=v(this,"dialog.hide",{dir:this.localize.dir()}),e=v(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([ei(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),ei(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Be(this);const o=this.originalTrigger;"function"==typeof(null==o?void 0:o.focus)&&setTimeout((()=>o.focus())),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,ti(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ti(this,"sl-after-hide")}render(){return nt` +
+
this.requestClose("overlay")} tabindex="-1">
+ + +
+ `}};yi.styles=[Rt,vi],yi.dependencies={"sl-icon-button":we},d([Vt(".dialog")],yi.prototype,"dialog",2),d([Vt(".dialog__panel")],yi.prototype,"panel",2),d([Vt(".dialog__overlay")],yi.prototype,"overlay",2),d([Nt({type:Boolean,reflect:!0})],yi.prototype,"open",2),d([Nt({reflect:!0})],yi.prototype,"label",2),d([Nt({attribute:"no-header",type:Boolean,reflect:!0})],yi.prototype,"noHeader",2),d([Ft("open",{waitUntilFirstUpdate:!0})],yi.prototype,"handleOpenChange",1),m("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),m("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),m("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),m("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),m("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),yi.define("sl-dialog");export{m as setDefaultAnimation}; From 810e02a7360aa486e473abc2bc6b9c3fda96176c Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 4 Apr 2024 20:53:13 +0200 Subject: [PATCH 2/5] Move shoelace theme setup into own file --- app/javascript/alchemy_admin.js | 24 ++----------------- .../alchemy_admin/shoelace_theme.js | 22 +++++++++++++++++ 2 files changed, 24 insertions(+), 22 deletions(-) create mode 100644 app/javascript/alchemy_admin/shoelace_theme.js diff --git a/app/javascript/alchemy_admin.js b/app/javascript/alchemy_admin.js index 98bc0f864c..f88abd08c1 100644 --- a/app/javascript/alchemy_admin.js +++ b/app/javascript/alchemy_admin.js @@ -26,28 +26,8 @@ import { // Web Components import "alchemy_admin/components" -import { setDefaultAnimation } from "shoelace" - -// Change the default animation for all dialogs -setDefaultAnimation("tooltip.show", { - keyframes: [ - { transform: "translateY(10px)", opacity: "0" }, - { transform: "translateY(0)", opacity: "1" } - ], - options: { - duration: 100 - } -}) - -setDefaultAnimation("tooltip.hide", { - keyframes: [ - { transform: "translateY(0)", opacity: "1" }, - { transform: "translateY(10px)", opacity: "0" } - ], - options: { - duration: 100 - } -}) +// Shoelace Setup +import "alchemy_admin/shoelace_theme" // Global Alchemy object if (typeof window.Alchemy === "undefined") { diff --git a/app/javascript/alchemy_admin/shoelace_theme.js b/app/javascript/alchemy_admin/shoelace_theme.js new file mode 100644 index 0000000000..98bf5904fc --- /dev/null +++ b/app/javascript/alchemy_admin/shoelace_theme.js @@ -0,0 +1,22 @@ +import { setDefaultAnimation } from "shoelace" + +// Change the default animation for all tooltips +setDefaultAnimation("tooltip.show", { + keyframes: [ + { transform: "translateY(10px)", opacity: "0" }, + { transform: "translateY(0)", opacity: "1" } + ], + options: { + duration: 100 + } +}) + +setDefaultAnimation("tooltip.hide", { + keyframes: [ + { transform: "translateY(0)", opacity: "1" }, + { transform: "translateY(10px)", opacity: "0" } + ], + options: { + duration: 100 + } +}) From b33a4127421a54e307e52dfa0f64085857dceedc Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 4 Apr 2024 21:10:38 +0200 Subject: [PATCH 3/5] Adjust shoelace dialog style --- app/assets/stylesheets/alchemy/shoelace.scss | 13 ++++++------ .../alchemy_admin/shoelace_theme.js | 21 +++++++++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/alchemy/shoelace.scss b/app/assets/stylesheets/alchemy/shoelace.scss index 68cde74bc8..00bae2bb4d 100644 --- a/app/assets/stylesheets/alchemy/shoelace.scss +++ b/app/assets/stylesheets/alchemy/shoelace.scss @@ -96,7 +96,7 @@ --sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%); --sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%); --sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%); - --sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%); + --sl-shadow-x-large: 0 8px 16px rgba(35, 35, 35, 0.5); /* * Spacings @@ -255,7 +255,7 @@ * Overlays */ - --sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%); + --sl-overlay-background-color: hsl(0 0% 39.2% / 40%); /* * Panels @@ -347,6 +347,8 @@ sl-tooltip { sl-dialog { &::part(panel) { background-color: var(--color-grey_light); + --body-spacing: var(--spacing-4) var(--spacing-3); + --footer-spacing: var(--spacing-4) var(--spacing-3); } &::part(header) { @@ -366,12 +368,9 @@ sl-dialog { } &::part(close-button) { + --sl-color-primary-600: var(--color-white); + --sl-color-primary-700: var(--color-white); color: var(--color-white); fill: currentColor; } - - &::part(close-button):hover, - &::part(close-button__base):focus-visible { - --sl-color-primary-600: var(--color-white); - } } diff --git a/app/javascript/alchemy_admin/shoelace_theme.js b/app/javascript/alchemy_admin/shoelace_theme.js index 98bf5904fc..7c7765301a 100644 --- a/app/javascript/alchemy_admin/shoelace_theme.js +++ b/app/javascript/alchemy_admin/shoelace_theme.js @@ -20,3 +20,24 @@ setDefaultAnimation("tooltip.hide", { duration: 100 } }) + +// Change the default animation for all dialogs +setDefaultAnimation("dialog.show", { + keyframes: [ + { transform: "scale(0.98)", opacity: "0" }, + { transform: "scale(1)", opacity: "1" } + ], + options: { + duration: 150 + } +}) + +setDefaultAnimation("dialog.hide", { + keyframes: [ + { transform: "scale(1)", opacity: "1" }, + { transform: "scale(0.98)", opacity: "0" } + ], + options: { + duration: 150 + } +}) From 2cdc5f8163be4092a83a539443f2412e3da86f6c Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 4 Apr 2024 21:39:13 +0200 Subject: [PATCH 4/5] Add shoelace remixicon icon theme --- .../alchemy_admin/shoelace_theme.js | 19 +++++++- bundles/shoelace.js | 3 +- vendor/javascript/shoelace.min.js | 46 +++++++++---------- 3 files changed, 43 insertions(+), 25 deletions(-) diff --git a/app/javascript/alchemy_admin/shoelace_theme.js b/app/javascript/alchemy_admin/shoelace_theme.js index 7c7765301a..7f4c934cb1 100644 --- a/app/javascript/alchemy_admin/shoelace_theme.js +++ b/app/javascript/alchemy_admin/shoelace_theme.js @@ -1,4 +1,4 @@ -import { setDefaultAnimation } from "shoelace" +import { registerIconLibrary, setDefaultAnimation } from "shoelace" // Change the default animation for all tooltips setDefaultAnimation("tooltip.show", { @@ -41,3 +41,20 @@ setDefaultAnimation("dialog.hide", { duration: 150 } }) + +const spriteUrl = document + .querySelector('meta[name="alchemy-icon-sprite"]') + .getAttribute("content") + +const iconMap = { + "x-lg": "close" +} + +const options = { + resolver: (name) => `${spriteUrl}#ri-${iconMap[name] || name}-line`, + mutator: (svg) => svg.setAttribute("fill", "currentColor"), + spriteSheet: true +} + +registerIconLibrary("default", options) +registerIconLibrary("system", options) diff --git a/bundles/shoelace.js b/bundles/shoelace.js index 053589c414..0d07d14cbb 100644 --- a/bundles/shoelace.js +++ b/bundles/shoelace.js @@ -7,5 +7,6 @@ import "@shoelace-style/shoelace/dist/components/tab-panel/tab-panel.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 { registerIconLibrary } from "@shoelace-style/shoelace/dist/utilities/icon-library.js" import { setDefaultAnimation } from "@shoelace-style/shoelace/dist/utilities/animation-registry.js" -export { setDefaultAnimation } +export { registerIconLibrary, setDefaultAnimation } diff --git a/vendor/javascript/shoelace.min.js b/vendor/javascript/shoelace.min.js index fd3de2944c..b957238f0b 100644 --- a/vendor/javascript/shoelace.min.js +++ b/vendor/javascript/shoelace.min.js @@ -14,7 +14,7 @@ var t=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDes * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const U=globalThis,V=U.trustedTypes,I=V?V.createPolicy("lit-html",{createHTML:t=>t}):void 0,W="$lit$",j=`lit$${(Math.random()+"").slice(9)}$`,q="?"+j,K=`<${q}>`,Z=document,X=()=>Z.createComment(""),Y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,G=Array.isArray,J="[ \t\n\f\r]",Q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tt=/-->/g,et=/>/g,ot=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,st=/"/g,rt=/^(?:script|style|textarea|title)$/i,nt=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),at=Symbol.for("lit-noChange"),lt=Symbol.for("lit-nothing"),ct=new WeakMap,ht=Z.createTreeWalker(Z,129);function dt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==I?I.createHTML(e):e}const pt=(t,e)=>{const o=t.length-1,i=[];let s,r=2===e?"":"",n=Q;for(let e=0;e"===l[0]?(n=s??Q,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?ot:'"'===l[3]?st:it):n===st||n===it?n=ot:n===tt||n===et?n=Q:(n=ot,s=void 0);const d=n===ot&&t[e+1].startsWith("/>")?" ":"";r+=n===Q?o+K:c>=0?(i.push(a),o.slice(0,c)+W+o.slice(c)+j+d):o+j+(-2===c?e:d)}return[dt(t,r+(t[o]||"")+(2===e?"":"")),i]};class ut{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,c]=pt(t,e);if(this.el=ut.createElement(l,o),ht.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=ht.nextNode())&&a.length0){i.textContent=V?V.emptyScript:"";for(let o=0;oG(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==lt&&Y(this._$AH)?this._$AA.nextSibling.data=t:this.$(Z.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=ut.createElement(dt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new bt(i,this),o=t.u(this.options);t.p(e),this.$(o),this._$AH=t}}_$AC(t){let e=ct.get(t.strings);return void 0===e&&ct.set(t.strings,e=new ut(t)),e}T(t){G(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new gt(this.k(X()),this.k(X()),this,this.options)):o=e[i],o._$AI(s),i++;i2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=lt}_$AI(t,e=this,o,i){const s=this.strings;let r=!1;if(void 0===s)t=ft(this,t,e,0),r=!Y(t)||t!==this._$AH&&t!==at,r&&(this._$AH=t);else{const i=t;let n,a;for(t=s[0],n=0;nt}):void 0,W="$lit$",j=`lit$${(Math.random()+"").slice(9)}$`,q="?"+j,K=`<${q}>`,Z=document,X=()=>Z.createComment(""),Y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,G=Array.isArray,J="[ \t\n\f\r]",Q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tt=/-->/g,et=/>/g,ot=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,st=/"/g,rt=/^(?:script|style|textarea|title)$/i,nt=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),at=Symbol.for("lit-noChange"),lt=Symbol.for("lit-nothing"),ct=new WeakMap,ht=Z.createTreeWalker(Z,129);function dt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==V?V.createHTML(e):e}const pt=(t,e)=>{const o=t.length-1,i=[];let s,r=2===e?"":"",n=Q;for(let e=0;e"===l[0]?(n=s??Q,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?ot:'"'===l[3]?st:it):n===st||n===it?n=ot:n===tt||n===et?n=Q:(n=ot,s=void 0);const d=n===ot&&t[e+1].startsWith("/>")?" ":"";r+=n===Q?o+K:c>=0?(i.push(a),o.slice(0,c)+W+o.slice(c)+j+d):o+j+(-2===c?e:d)}return[dt(t,r+(t[o]||"")+(2===e?"":"")),i]};class ut{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,c]=pt(t,e);if(this.el=ut.createElement(l,o),ht.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=ht.nextNode())&&a.length0){i.textContent=I?I.emptyScript:"";for(let o=0;oG(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==lt&&Y(this._$AH)?this._$AA.nextSibling.data=t:this.$(Z.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=ut.createElement(dt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new bt(i,this),o=t.u(this.options);t.p(e),this.$(o),this._$AH=t}}_$AC(t){let e=ct.get(t.strings);return void 0===e&&ct.set(t.strings,e=new ut(t)),e}T(t){G(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new gt(this.k(X()),this.k(X()),this,this.options)):o=e[i],o._$AI(s),i++;i2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=lt}_$AI(t,e=this,o,i){const s=this.strings;let r=!1;if(void 0===s)t=ft(this,t,e,0),r=!Y(t)||t!==this._$AH&&t!==at,r&&(this._$AH=t);else{const i=t;let n,a;for(t=s[0],n=0;n{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof i?o:s??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return Ut(o,i,{get(){let o=t.call(this);return void 0===o&&(o=r(this),(null!==o||this.hasUpdated)&&e.call(this,o)),o}})}return Ut(o,i,{get(){return r(this)}})}}var It=class extends $t{constructor(){super(),Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}emit(t,e){const o=new CustomEvent(t,c({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const i=customElements.get(t);if(!i)return void customElements.define(t,class extends e{},o);let s=" (unknown version)",r=s;"version"in e&&e.version&&(s=" v"+e.version),"version"in i&&i.version&&(r=" v"+i.version),s&&r&&s===r||console.warn(`Attempted to register <${t}>${s}, but <${t}>${r} has already been registered.`)}};It.version="2.14.0",It.dependencies={},d([Nt()],It.prototype,"dir",2),d([Nt()],It.prototype,"lang",2); + */;function It(t,e){return(o,i,s)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof i?o:s??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return Ut(o,i,{get(){let o=t.call(this);return void 0===o&&(o=r(this),(null!==o||this.hasUpdated)&&e.call(this,o)),o}})}return Ut(o,i,{get(){return r(this)}})}}var Vt=class extends $t{constructor(){super(),Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}emit(t,e){const o=new CustomEvent(t,c({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const i=customElements.get(t);if(!i)return void customElements.define(t,class extends e{},o);let s=" (unknown version)",r=s;"version"in e&&e.version&&(s=" v"+e.version),"version"in i&&i.version&&(r=" v"+i.version),s&&r&&s===r||console.warn(`Attempted to register <${t}>${s}, but <${t}>${r} has already been registered.`)}};Vt.version="2.14.0",Vt.dependencies={},d([Nt()],Vt.prototype,"dir",2),d([Nt()],Vt.prototype,"lang",2); /** * @license * Copyright 2017 Google LLC @@ -300,7 +300,7 @@ const Wt=1,jt=3,qt=4,Kt=t=>(...e)=>({_$litDirective$:t,values:e});let Zt=class{c * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var Qt=class extends It{constructor(){super(...arguments),this.formControlController=new Lt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.hasSlotController=new Dt(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 nt` + */var Qt=class extends Vt{constructor(){super(...arguments),this.formControlController=new Lt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.hasSlotController=new Dt(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 nt`
@@ -346,7 +346,7 @@ const Wt=1,jt=3,qt=4,Kt=t=>(...e)=>({_$litDirective$:t,values:e});let Zt=class{c ${this.helpText}
- `}};Qt.styles=[Rt,Ct,At],d([Vt('input[type="checkbox"]')],Qt.prototype,"input",2),d([Ht()],Qt.prototype,"hasFocus",2),d([Nt()],Qt.prototype,"title",2),d([Nt()],Qt.prototype,"name",2),d([Nt()],Qt.prototype,"value",2),d([Nt({reflect:!0})],Qt.prototype,"size",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"disabled",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"checked",2),d([((t="value")=>(e,o)=>{const i=e.constructor,s=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(e,r,n){var a;const l=i.getPropertyOptions(t);if(e===("string"==typeof l.attribute?l.attribute:t)){const e=l.converter||M,i=("function"==typeof e?e:null!=(a=null==e?void 0:e.fromAttribute)?a:M.fromAttribute)(n,l.type);this[t]!==i&&(this[o]=i)}s.call(this,e,r,n)}})("checked")],Qt.prototype,"defaultChecked",2),d([Nt({reflect:!0})],Qt.prototype,"form",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"required",2),d([Nt({attribute:"help-text"})],Qt.prototype,"helpText",2),d([Ft("checked",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleCheckedChange",1),d([Ft("disabled",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleDisabledChange",1),Qt.define("sl-switch");var te=k` + `}};Qt.styles=[Rt,Ct,At],d([It('input[type="checkbox"]')],Qt.prototype,"input",2),d([Ht()],Qt.prototype,"hasFocus",2),d([Nt()],Qt.prototype,"title",2),d([Nt()],Qt.prototype,"name",2),d([Nt()],Qt.prototype,"value",2),d([Nt({reflect:!0})],Qt.prototype,"size",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"disabled",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"checked",2),d([((t="value")=>(e,o)=>{const i=e.constructor,s=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(e,r,n){var a;const l=i.getPropertyOptions(t);if(e===("string"==typeof l.attribute?l.attribute:t)){const e=l.converter||M,i=("function"==typeof e?e:null!=(a=null==e?void 0:e.fromAttribute)?a:M.fromAttribute)(n,l.type);this[t]!==i&&(this[o]=i)}s.call(this,e,r,n)}})("checked")],Qt.prototype,"defaultChecked",2),d([Nt({reflect:!0})],Qt.prototype,"form",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"required",2),d([Nt({attribute:"help-text"})],Qt.prototype,"helpText",2),d([Ft("checked",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleCheckedChange",1),d([Ft("disabled",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleDisabledChange",1),Qt.define("sl-switch");var te=k` :host { display: inline-block; } @@ -461,7 +461,7 @@ const Wt=1,jt=3,qt=4,Kt=t=>(...e)=>({_$litDirective$:t,values:e});let Zt=class{c .icon-button__icon { pointer-events: none; } -`,oe="";function ie(t){oe=t}var se={name:"default",resolver:t=>function(t=""){if(!oe){const t=[...document.getElementsByTagName("script")],e=t.find((t=>t.hasAttribute("data-shoelace")));if(e)ie(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")),ie(o.split("/").slice(0,-1).join("/"))}}return oe.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 '},ne=[se,{name:"system",resolver:t=>t in re?`data:image/svg+xml,${encodeURIComponent(re[t])}`:""}],ae=[];function le(t){return ne.find((e=>e.name===t))}var ce,he=k` +`,oe="";function ie(t){oe=t}var se={name:"default",resolver:t=>function(t=""){if(!oe){const t=[...document.getElementsByTagName("script")],e=t.find((t=>t.hasAttribute("data-shoelace")));if(e)ie(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")),ie(o.split("/").slice(0,-1).join("/"))}}return oe.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 '},ne=[se,{name:"system",resolver:t=>t in re?`data:image/svg+xml,${encodeURIComponent(re[t])}`:""}],ae=[];function le(t){return ne.find((e=>e.name===t))}function ce(t,e){!function(t){ne=ne.filter((e=>e.name!==t))}(t),ne.push({name:t,resolver:e.resolver,mutator:e.mutator,spriteSheet:e.spriteSheet}),ae.forEach((e=>{e.library===t&&e.setIcon()}))}var he,de=k` :host { display: inline-block; width: 1em; @@ -474,15 +474,15 @@ const Wt=1,jt=3,qt=4,Kt=t=>(...e)=>({_$litDirective$:t,values:e});let Zt=class{c height: 100%; width: 100%; } -`,de=Symbol(),pe=Symbol(),ue=new Map,fe=class extends It{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let i;if(null==e?void 0:e.spriteSheet)return nt` +`,pe=Symbol(),ue=Symbol(),fe=new Map,be=class extends Vt{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let i;if(null==e?void 0:e.spriteSheet)return nt` - `;try{if(i=await fetch(t,{mode:"cors"}),!i.ok)return 410===i.status?de:pe}catch(t){return pe}try{const t=document.createElement("div");t.innerHTML=await i.text();const e=t.firstElementChild;if("svg"!==(null==(o=null==e?void 0:e.tagName)?void 0:o.toLowerCase()))return de;ce||(ce=new DOMParser);const s=ce.parseFromString(e.outerHTML,"text/html").body.querySelector("svg");return s?(s.part.add("svg"),document.adoptNode(s)):de}catch(t){return de}}connectedCallback(){var t;super.connectedCallback(),t=this,ae.push(t)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,ae=ae.filter((e=>e!==t))}getIconSource(){const t=le(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(),i=o?le(this.library):void 0;if(!e)return void(this.svg=null);let s=ue.get(e);if(s||(s=this.resolveIcon(e,i),ue.set(e,s)),!this.initialRender)return;const r=await s;if(r===pe&&ue.delete(e),e===this.getIconSource().url)if(((t,e)=>void 0===e?void 0!==t?._$litType$:t?._$litType$===e)(r))this.svg=r;else switch(r){case pe:case de:this.svg=null,this.emit("sl-error");break;default:this.svg=r.cloneNode(!0),null==(t=null==i?void 0:i.mutator)||t.call(i,this.svg),this.emit("sl-load")}}render(){return this.svg}};fe.styles=[Rt,he],d([Ht()],fe.prototype,"svg",2),d([Nt({reflect:!0})],fe.prototype,"name",2),d([Nt()],fe.prototype,"src",2),d([Nt()],fe.prototype,"label",2),d([Nt({reflect:!0})],fe.prototype,"library",2),d([Ft("label")],fe.prototype,"handleLabelChange",1),d([Ft(["name","src","library"])],fe.prototype,"setIcon",1); + `;try{if(i=await fetch(t,{mode:"cors"}),!i.ok)return 410===i.status?pe:ue}catch(t){return ue}try{const t=document.createElement("div");t.innerHTML=await i.text();const e=t.firstElementChild;if("svg"!==(null==(o=null==e?void 0:e.tagName)?void 0:o.toLowerCase()))return pe;he||(he=new DOMParser);const s=he.parseFromString(e.outerHTML,"text/html").body.querySelector("svg");return s?(s.part.add("svg"),document.adoptNode(s)):pe}catch(t){return pe}}connectedCallback(){var t;super.connectedCallback(),t=this,ae.push(t)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,ae=ae.filter((e=>e!==t))}getIconSource(){const t=le(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(),i=o?le(this.library):void 0;if(!e)return void(this.svg=null);let s=fe.get(e);if(s||(s=this.resolveIcon(e,i),fe.set(e,s)),!this.initialRender)return;const r=await s;if(r===ue&&fe.delete(e),e===this.getIconSource().url)if(((t,e)=>void 0===e?void 0!==t?._$litType$:t?._$litType$===e)(r))this.svg=r;else switch(r){case ue:case pe:this.svg=null,this.emit("sl-error");break;default:this.svg=r.cloneNode(!0),null==(t=null==i?void 0:i.mutator)||t.call(i,this.svg),this.emit("sl-load")}}render(){return this.svg}};be.styles=[Rt,de],d([Ht()],be.prototype,"svg",2),d([Nt({reflect:!0})],be.prototype,"name",2),d([Nt()],be.prototype,"src",2),d([Nt()],be.prototype,"label",2),d([Nt({reflect:!0})],be.prototype,"library",2),d([Ft("label")],be.prototype,"handleLabelChange",1),d([Ft(["name","src","library"])],be.prototype,"setIcon",1); /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const be=Symbol.for(""),ge=t=>{if(t?.r===be)return t?._$litStatic$},me=(t,...e)=>({_$litStatic$:e.reduce(((e,o,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[i+1]),t[0]),r:be}),ve=new Map,ye=(t=>(e,...o)=>{const i=o.length;let s,r;const n=[],a=[];let l,c=0,h=!1;for(;c{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)=>({_$litStatic$:e.reduce(((e,o,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[i+1]),t[0]),r:ge}),ye=new Map,we=(t=>(e,...o)=>{const i=o.length;let s,r;const n=[],a=[];let l,c=0,h=!1;for(;c{if(t?.r===be)return t?._$litStatic$},me=(t,...e)= aria-hidden="true" > - `}};we.styles=[Rt,ee],we.dependencies={"sl-icon":fe},d([Vt(".icon-button")],we.prototype,"button",2),d([Ht()],we.prototype,"hasFocus",2),d([Nt()],we.prototype,"name",2),d([Nt()],we.prototype,"library",2),d([Nt()],we.prototype,"src",2),d([Nt()],we.prototype,"href",2),d([Nt()],we.prototype,"target",2),d([Nt()],we.prototype,"download",2),d([Nt()],we.prototype,"label",2),d([Nt({type:Boolean,reflect:!0})],we.prototype,"disabled",2);const _e=new Set,xe=new MutationObserver(Se),$e=new Map;let ke,Ae=document.documentElement.dir||"ltr",Ce=document.documentElement.lang||navigator.language;function Ee(...t){t.map((t=>{const e=t.$code.toLowerCase();$e.has(e)?$e.set(e,Object.assign(Object.assign({},$e.get(e)),t)):$e.set(e,t),ke||(ke=t)})),Se()}function Se(){Ae=document.documentElement.dir||"ltr",Ce=document.documentElement.lang||navigator.language,[..._e.keys()].map((t=>{"function"==typeof t.requestUpdate&&t.requestUpdate()}))}xe.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});let ze=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){_e.add(this.host)}hostDisconnected(){_e.delete(this.host)}dir(){return`${this.host.dir||Ae}`.toLowerCase()}lang(){return`${this.host.lang||Ce}`.toLowerCase()}getTranslationData(t){var e,o;const i=new Intl.Locale(t.replace(/_/g,"-")),s=null==i?void 0:i.language.toLowerCase(),r=null!==(o=null===(e=null==i?void 0:i.region)||void 0===e?void 0:e.toLowerCase())&&void 0!==o?o:"";return{locale:i,language:s,region:r,primary:$e.get(`${s}-${r}`),secondary:$e.get(s)}}exists(t,e){var o;const{primary:i,secondary:s}=this.getTranslationData(null!==(o=e.lang)&&void 0!==o?o:this.lang());return e=Object.assign({includeFallback:!1},e),!!(i&&i[t]||s&&s[t]||e.includeFallback&&ke&&ke[t])}term(t,...e){const{primary:o,secondary:i}=this.getTranslationData(this.lang());let s;if(o&&o[t])s=o[t];else if(i&&i[t])s=i[t];else{if(!ke||!ke[t])return console.error(`No translation found for: ${String(t)}`),String(t);s=ke[t]}return"function"==typeof s?s(...e):s}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 Te={$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"};Ee(Te);var Pe=Te,Le=class extends ze{};Ee(Pe);var Oe=0,De=class extends It{constructor(){super(...arguments),this.localize=new Le(this),this.attrId=++Oe,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1}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")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){return this.id=this.id.length>0?this.id:this.componentId,nt` + `}};_e.styles=[Rt,ee],_e.dependencies={"sl-icon":be},d([It(".icon-button")],_e.prototype,"button",2),d([Ht()],_e.prototype,"hasFocus",2),d([Nt()],_e.prototype,"name",2),d([Nt()],_e.prototype,"library",2),d([Nt()],_e.prototype,"src",2),d([Nt()],_e.prototype,"href",2),d([Nt()],_e.prototype,"target",2),d([Nt()],_e.prototype,"download",2),d([Nt()],_e.prototype,"label",2),d([Nt({type:Boolean,reflect:!0})],_e.prototype,"disabled",2);const xe=new Set,$e=new MutationObserver(ze),ke=new Map;let Ae,Ce=document.documentElement.dir||"ltr",Ee=document.documentElement.lang||navigator.language;function Se(...t){t.map((t=>{const e=t.$code.toLowerCase();ke.has(e)?ke.set(e,Object.assign(Object.assign({},ke.get(e)),t)):ke.set(e,t),Ae||(Ae=t)})),ze()}function ze(){Ce=document.documentElement.dir||"ltr",Ee=document.documentElement.lang||navigator.language,[...xe.keys()].map((t=>{"function"==typeof t.requestUpdate&&t.requestUpdate()}))}$e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});let Te=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){xe.add(this.host)}hostDisconnected(){xe.delete(this.host)}dir(){return`${this.host.dir||Ce}`.toLowerCase()}lang(){return`${this.host.lang||Ee}`.toLowerCase()}getTranslationData(t){var e,o;const i=new Intl.Locale(t.replace(/_/g,"-")),s=null==i?void 0:i.language.toLowerCase(),r=null!==(o=null===(e=null==i?void 0:i.region)||void 0===e?void 0:e.toLowerCase())&&void 0!==o?o:"";return{locale:i,language:s,region:r,primary:ke.get(`${s}-${r}`),secondary:ke.get(s)}}exists(t,e){var o;const{primary:i,secondary:s}=this.getTranslationData(null!==(o=e.lang)&&void 0!==o?o:this.lang());return e=Object.assign({includeFallback:!1},e),!!(i&&i[t]||s&&s[t]||e.includeFallback&&Ae&&Ae[t])}term(t,...e){const{primary:o,secondary:i}=this.getTranslationData(this.lang());let s;if(o&&o[t])s=o[t];else if(i&&i[t])s=i[t];else{if(!Ae||!Ae[t])return console.error(`No translation found for: ${String(t)}`),String(t);s=Ae[t]}return"function"==typeof s?s(...e):s}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 Pe={$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"};Se(Pe);var Le=Pe,Oe=class extends Te{};Se(Le);var De=0,Fe=class extends Vt{constructor(){super(...arguments),this.localize=new Oe(this),this.attrId=++De,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1}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")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){return this.id=this.id.length>0?this.id:this.componentId,nt`
{if(t?.r===be)return t?._$litStatic$},me=(t,...e)= > `:""}
- `}};De.styles=[Rt,te],De.dependencies={"sl-icon-button":we},d([Vt(".tab")],De.prototype,"tab",2),d([Nt({reflect:!0})],De.prototype,"panel",2),d([Nt({type:Boolean,reflect:!0})],De.prototype,"active",2),d([Nt({type:Boolean})],De.prototype,"closable",2),d([Nt({type:Boolean,reflect:!0})],De.prototype,"disabled",2),d([Ft("active")],De.prototype,"handleActiveChange",1),d([Ft("disabled")],De.prototype,"handleDisabledChange",1),De.define("sl-tab");var Fe=k` + `}};Fe.styles=[Rt,te],Fe.dependencies={"sl-icon-button":_e},d([It(".tab")],Fe.prototype,"tab",2),d([Nt({reflect:!0})],Fe.prototype,"panel",2),d([Nt({type:Boolean,reflect:!0})],Fe.prototype,"active",2),d([Nt({type:Boolean})],Fe.prototype,"closable",2),d([Nt({type:Boolean,reflect:!0})],Fe.prototype,"disabled",2),d([Ft("active")],Fe.prototype,"handleActiveChange",1),d([Ft("disabled")],Fe.prototype,"handleDisabledChange",1),Fe.define("sl-tab");var Re=k` :host { --indicator-color: var(--sl-color-primary-600); --track-color: var(--sl-color-neutral-200); @@ -757,7 +757,7 @@ const be=Symbol.for(""),ge=t=>{if(t?.r===be)return t?._$litStatic$},me=(t,...e)= .tab-group--end ::slotted(sl-tab-panel) { --padding: 0 var(--sl-spacing-medium); } -`;var Re=new Set;function Me(t){if(Re.add(t),!document.body.classList.contains("sl-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}();document.body.classList.add("sl-scroll-lock"),document.body.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function Be(t){Re.delete(t),0===Re.size&&(document.body.classList.remove("sl-scroll-lock"),document.body.style.removeProperty("--sl-scroll-lock-size"))}function Ne(t,e,o="vertical",i="smooth"){const s=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),r=s.top+e.scrollTop,n=s.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:i})),"vertical"!==o&&"both"!==o||(rh&&e.scrollTo({top:r-e.offsetHeight+t.clientHeight,behavior:i}))}var He=class extends It{constructor(){super(...arguments),this.localize=new Le(this),this.tabs=[],this.panels=[],this.hasScrollControls=!1,this.placement="top",this.activation="auto",this.noScrollControls=!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=>{t.some((t=>!["aria-labelledby","aria-controls"].includes(t.attributeName)))&&setTimeout((()=>this.setAriaLabels())),t.some((t=>"disabled"===t.attributeName))&&this.syncTabsAndPanels()})),this.updateComplete.then((()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,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(){super.disconnectedCallback(),this.mutationObserver.disconnect(),this.resizeObserver.unobserve(this.nav)}getAllTabs(t={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter((e=>t.includeDisabled?"sl-tab"===e.tagName.toLowerCase():"sl-tab"===e.tagName.toLowerCase()&&!e.disabled))}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();if("sl-tab"===(null==e?void 0:e.tagName.toLowerCase())){let i=this.tabs.indexOf(e);"Home"===t.key?i=0:"End"===t.key?i=this.tabs.length-1:["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&"ArrowUp"===t.key?i--:(["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&"ArrowDown"===t.key)&&i++,i<0&&(i=this.tabs.length-1),i>this.tabs.length-1&&(i=0),this.tabs[i].focus({preventScroll:!0}),"auto"===this.activation&&this.setActiveTab(this.tabs[i],{scrollBehavior:"smooth"}),["top","bottom"].includes(this.placement)&&Ne(this.tabs[i],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=c({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)),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)&&Ne(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,i="rtl"===this.localize.dir(),s=this.getAllTabs(),r=s.slice(0,s.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=i?-1*r.left+"px":`${r.left}px`;break;case"start":case"end":this.indicator.style.width="auto",this.indicator.style.height=`${o}px`,this.indicator.style.translate=`0 ${r.top}px`}}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then((()=>this.updateScrollControls()))}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth}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 nt` +`;var Me=new Set;function Be(t){if(Me.add(t),!document.body.classList.contains("sl-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}();document.body.classList.add("sl-scroll-lock"),document.body.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function Ne(t){Me.delete(t),0===Me.size&&(document.body.classList.remove("sl-scroll-lock"),document.body.style.removeProperty("--sl-scroll-lock-size"))}function He(t,e,o="vertical",i="smooth"){const s=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),r=s.top+e.scrollTop,n=s.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:i})),"vertical"!==o&&"both"!==o||(rh&&e.scrollTo({top:r-e.offsetHeight+t.clientHeight,behavior:i}))}var Ue=class extends Vt{constructor(){super(...arguments),this.localize=new Oe(this),this.tabs=[],this.panels=[],this.hasScrollControls=!1,this.placement="top",this.activation="auto",this.noScrollControls=!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=>{t.some((t=>!["aria-labelledby","aria-controls"].includes(t.attributeName)))&&setTimeout((()=>this.setAriaLabels())),t.some((t=>"disabled"===t.attributeName))&&this.syncTabsAndPanels()})),this.updateComplete.then((()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,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(){super.disconnectedCallback(),this.mutationObserver.disconnect(),this.resizeObserver.unobserve(this.nav)}getAllTabs(t={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter((e=>t.includeDisabled?"sl-tab"===e.tagName.toLowerCase():"sl-tab"===e.tagName.toLowerCase()&&!e.disabled))}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();if("sl-tab"===(null==e?void 0:e.tagName.toLowerCase())){let i=this.tabs.indexOf(e);"Home"===t.key?i=0:"End"===t.key?i=this.tabs.length-1:["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&"ArrowUp"===t.key?i--:(["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&"ArrowDown"===t.key)&&i++,i<0&&(i=this.tabs.length-1),i>this.tabs.length-1&&(i=0),this.tabs[i].focus({preventScroll:!0}),"auto"===this.activation&&this.setActiveTab(this.tabs[i],{scrollBehavior:"smooth"}),["top","bottom"].includes(this.placement)&&He(this.tabs[i],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=c({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)),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)&&He(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,i="rtl"===this.localize.dir(),s=this.getAllTabs(),r=s.slice(0,s.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=i?-1*r.left+"px":`${r.left}px`;break;case"start":case"end":this.indicator.style.width="auto",this.indicator.style.height=`${o}px`,this.indicator.style.translate=`0 ${r.top}px`}}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then((()=>this.updateScrollControls()))}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth}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 nt`
{if(t?.r===be)return t?._$litStatic$},me=(t,...e)=
- `}};He.styles=[Rt,Fe],He.dependencies={"sl-icon-button":we},d([Vt(".tab-group")],He.prototype,"tabGroup",2),d([Vt(".tab-group__body")],He.prototype,"body",2),d([Vt(".tab-group__nav")],He.prototype,"nav",2),d([Vt(".tab-group__indicator")],He.prototype,"indicator",2),d([Ht()],He.prototype,"hasScrollControls",2),d([Nt()],He.prototype,"placement",2),d([Nt()],He.prototype,"activation",2),d([Nt({attribute:"no-scroll-controls",type:Boolean})],He.prototype,"noScrollControls",2),d([Ft("noScrollControls",{waitUntilFirstUpdate:!0})],He.prototype,"updateScrollControls",1),d([Ft("placement",{waitUntilFirstUpdate:!0})],He.prototype,"syncIndicator",1),He.define("sl-tab-group");var Ue=k` + `}};Ue.styles=[Rt,Re],Ue.dependencies={"sl-icon-button":_e},d([It(".tab-group")],Ue.prototype,"tabGroup",2),d([It(".tab-group__body")],Ue.prototype,"body",2),d([It(".tab-group__nav")],Ue.prototype,"nav",2),d([It(".tab-group__indicator")],Ue.prototype,"indicator",2),d([Ht()],Ue.prototype,"hasScrollControls",2),d([Nt()],Ue.prototype,"placement",2),d([Nt()],Ue.prototype,"activation",2),d([Nt({attribute:"no-scroll-controls",type:Boolean})],Ue.prototype,"noScrollControls",2),d([Ft("noScrollControls",{waitUntilFirstUpdate:!0})],Ue.prototype,"updateScrollControls",1),d([Ft("placement",{waitUntilFirstUpdate:!0})],Ue.prototype,"syncIndicator",1),Ue.define("sl-tab-group");var Ie=k` :host { --padding: 0; @@ -814,12 +814,12 @@ const be=Symbol.for(""),ge=t=>{if(t?.r===be)return t?._$litStatic$},me=(t,...e)= display: block; padding: var(--padding); } -`,Ve=0,Ie=class extends It{constructor(){super(...arguments),this.attrId=++Ve,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 nt` +`,Ve=0,We=class extends Vt{constructor(){super(...arguments),this.attrId=++Ve,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 nt` - `}};Ie.styles=[Rt,Ue],d([Nt({reflect:!0})],Ie.prototype,"name",2),d([Nt({type:Boolean,reflect:!0})],Ie.prototype,"active",2),d([Ft("active")],Ie.prototype,"handleActiveChange",1),Ie.define("sl-tab-panel");var We=k` + `}};We.styles=[Rt,Ie],d([Nt({reflect:!0})],We.prototype,"name",2),d([Nt({type:Boolean,reflect:!0})],We.prototype,"active",2),d([Ft("active")],We.prototype,"handleActiveChange",1),We.define("sl-tab-panel");var je=k` :host { --max-width: 20rem; --hide-delay: 0ms; @@ -869,7 +869,7 @@ const be=Symbol.for(""),ge=t=>{if(t?.r===be)return t?._$litStatic$},me=(t,...e)= user-select: none; -webkit-user-select: none; } -`,je=k` +`,qe=k` :host { --arrow-color: var(--sl-color-neutral-1000); --arrow-size: 6px; @@ -927,7 +927,7 @@ const be=Symbol.for(""),ge=t=>{if(t?.r===be)return t?._$litStatic$},me=(t,...e)= var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0) ); } -`;const qe=Math.min,Ke=Math.max,Ze=Math.round,Xe=Math.floor,Ye=t=>({x:t,y:t}),Ge={left:"right",right:"left",bottom:"top",top:"bottom"},Je={start:"end",end:"start"};function Qe(t,e,o){return Ke(t,qe(e,o))}function to(t,e){return"function"==typeof t?t(e):t}function eo(t){return t.split("-")[0]}function oo(t){return t.split("-")[1]}function io(t){return"x"===t?"y":"x"}function so(t){return"y"===t?"height":"width"}function ro(t){return["top","bottom"].includes(eo(t))?"y":"x"}function no(t){return io(ro(t))}function ao(t){return t.replace(/start|end/g,(t=>Je[t]))}function lo(t){return t.replace(/left|right|bottom|top/g,(t=>Ge[t]))}function co(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 ho(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function po(t,e,o){let{reference:i,floating:s}=t;const r=ro(e),n=no(e),a=so(n),l=eo(e),c="y"===r,h=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,p=i[a]/2-s[a]/2;let u;switch(l){case"top":u={x:h,y:i.y-s.height};break;case"bottom":u={x:h,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:d};break;case"left":u={x:i.x-s.width,y:d};break;default:u={x:i.x,y:i.y}}switch(oo(e)){case"start":u[n]-=p*(o&&c?-1:1);break;case"end":u[n]+=p*(o&&c?-1:1)}return u}async function uo(t,e){var o;void 0===e&&(e={});const{x:i,y:s,platform:r,rects:n,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=to(e,t),f=co(u),b=a[p?"floating"===d?"reference":"floating":d],g=ho(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(b)))||o?b:b.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),m="floating"===d?{...n.floating,x:i,y:s}:n.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),y=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},w=ho(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-w.top+f.top)/y.y,bottom:(w.bottom-g.bottom+f.bottom)/y.y,left:(g.left-w.left+f.left)/y.x,right:(w.right-g.right+f.right)/y.x}}const fo=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var o,i;const{x:s,y:r,placement:n,middlewareData:a}=e,l=await async function(t,e){const{placement:o,platform:i,elements:s}=t,r=await(null==i.isRTL?void 0:i.isRTL(s.floating)),n=eo(o),a=oo(o),l="y"===ro(o),c=["left","top"].includes(n)?-1:1,h=r&&l?-1:1,d=to(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof f&&(u="end"===a?-1*f:f),l?{x:u*h,y:p*c}:{x:p*c,y:u*h}}(e,t);return n===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:n}}}}};function bo(t){return vo(t)?(t.nodeName||"").toLowerCase():"#document"}function go(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function mo(t){var e;return null==(e=(vo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function vo(t){return t instanceof Node||t instanceof go(t).Node}function yo(t){return t instanceof Element||t instanceof go(t).Element}function wo(t){return t instanceof HTMLElement||t instanceof go(t).HTMLElement}function _o(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof go(t).ShadowRoot)}function xo(t){const{overflow:e,overflowX:o,overflowY:i,display:s}=Eo(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(s)}function $o(t){return["table","td","th"].includes(bo(t))}function ko(t){const e=Ao(),o=Eo(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function Ao(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Co(t){return["html","body","#document"].includes(bo(t))}function Eo(t){return go(t).getComputedStyle(t)}function So(t){return yo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function zo(t){if("html"===bo(t))return t;const e=t.assignedSlot||t.parentNode||_o(t)&&t.host||mo(t);return _o(e)?e.host:e}function To(t){const e=zo(t);return Co(e)?t.ownerDocument?t.ownerDocument.body:t.body:wo(e)&&xo(e)?e:To(e)}function Po(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const s=To(t),r=s===(null==(i=t.ownerDocument)?void 0:i.body),n=go(s);return r?e.concat(n,n.visualViewport||[],xo(s)?s:[],n.frameElement&&o?Po(n.frameElement):[]):e.concat(s,Po(s,[],o))}function Lo(t){const e=Eo(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=wo(t),r=s?t.offsetWidth:o,n=s?t.offsetHeight:i,a=Ze(o)!==r||Ze(i)!==n;return a&&(o=r,i=n),{width:o,height:i,$:a}}function Oo(t){return yo(t)?t:t.contextElement}function Do(t){const e=Oo(t);if(!wo(e))return Ye(1);const o=e.getBoundingClientRect(),{width:i,height:s,$:r}=Lo(e);let n=(r?Ze(o.width):o.width)/i,a=(r?Ze(o.height):o.height)/s;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const Fo=Ye(0);function Ro(t){const e=go(t);return Ao()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Fo}function Mo(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const s=t.getBoundingClientRect(),r=Oo(t);let n=Ye(1);e&&(i?yo(i)&&(n=Do(i)):n=Do(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==go(t))&&e}(r,o,i)?Ro(r):Ye(0);let l=(s.left+a.x)/n.x,c=(s.top+a.y)/n.y,h=s.width/n.x,d=s.height/n.y;if(r){const t=go(r),e=i&&yo(i)?go(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=Do(o),e=o.getBoundingClientRect(),i=Eo(o),s=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,r=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,d*=t.y,l+=s,c+=r,o=go(o).frameElement}}return ho({width:h,height:d,x:l,y:c})}function Bo(t){return Mo(mo(t)).left+So(t).scrollLeft}function No(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=go(t),i=mo(t),s=o.visualViewport;let r=i.clientWidth,n=i.clientHeight,a=0,l=0;if(s){r=s.width,n=s.height;const t=Ao();(!t||t&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:n,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=mo(t),o=So(t),i=t.ownerDocument.body,s=Ke(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=Ke(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let n=-o.scrollLeft+Bo(t);const a=-o.scrollTop;return"rtl"===Eo(i).direction&&(n+=Ke(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:n,y:a}}(mo(t));else if(yo(e))i=function(t,e){const o=Mo(t,!0,"fixed"===e),i=o.top+t.clientTop,s=o.left+t.clientLeft,r=wo(t)?Do(t):Ye(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:s*r.x,y:i*r.y}}(e,o);else{const o=Ro(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return ho(i)}function Ho(t,e){const o=zo(t);return!(o===e||!yo(o)||Co(o))&&("fixed"===Eo(o).position||Ho(o,e))}function Uo(t,e,o){const i=wo(e),s=mo(e),r="fixed"===o,n=Mo(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=Ye(0);if(i||!i&&!r)if(("body"!==bo(e)||xo(s))&&(a=So(e)),i){const t=Mo(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else s&&(l.x=Bo(s));return{x:n.left+a.scrollLeft-l.x,y:n.top+a.scrollTop-l.y,width:n.width,height:n.height}}function Vo(t,e){return wo(t)&&"fixed"!==Eo(t).position?e?e(t):t.offsetParent:null}function Io(t,e){const o=go(t);if(!wo(t))return o;let i=Vo(t,e);for(;i&&$o(i)&&"static"===Eo(i).position;)i=Vo(i,e);return i&&("html"===bo(i)||"body"===bo(i)&&"static"===Eo(i).position&&!ko(i))?o:i||function(t){let e=zo(t);for(;wo(e)&&!Co(e);){if(ko(e))return e;e=zo(e)}return null}(t)||o}const Wo={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const s=wo(o),r=mo(o);if(o===r)return e;let n={scrollLeft:0,scrollTop:0},a=Ye(1);const l=Ye(0);if((s||!s&&"fixed"!==i)&&(("body"!==bo(o)||xo(r))&&(n=So(o)),wo(o))){const t=Mo(o);a=Do(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-n.scrollLeft*a.x+l.x,y:e.y*a.y-n.scrollTop*a.y+l.y}},getDocumentElement:mo,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:s}=t;const r=[..."clippingAncestors"===o?function(t,e){const o=e.get(t);if(o)return o;let i=Po(t,[],!1).filter((t=>yo(t)&&"body"!==bo(t))),s=null;const r="fixed"===Eo(t).position;let n=r?zo(t):t;for(;yo(n)&&!Co(n);){const e=Eo(n),o=ko(n);o||"fixed"!==e.position||(s=null),(r?!o&&!s:!o&&"static"===e.position&&s&&["absolute","fixed"].includes(s.position)||xo(n)&&!o&&Ho(t,n))?i=i.filter((t=>t!==n)):s=e,n=zo(n)}return e.set(t,i),i}(e,this._c):[].concat(o),i],n=r[0],a=r.reduce(((t,o)=>{const i=No(e,o,s);return t.top=Ke(i.top,t.top),t.right=qe(i.right,t.right),t.bottom=qe(i.bottom,t.bottom),t.left=Ke(i.left,t.left),t}),No(e,n,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Io,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const s=this.getOffsetParent||Io,r=this.getDimensions;return{reference:Uo(e,await s(o),i),floating:{x:0,y:0,...await r(o)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=Lo(t);return{width:e,height:o}},getScale:Do,isElement:yo,isRTL:function(t){return"rtl"===Eo(t).direction}};function jo(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Oo(t),h=s||r?[...c?Po(c):[],...Po(e)]:[];h.forEach((t=>{s&&t.addEventListener("scroll",o,{passive:!0}),r&&t.addEventListener("resize",o)}));const d=c&&a?function(t,e){let o,i=null;const s=mo(t);function r(){clearTimeout(o),i&&i.disconnect(),i=null}return function n(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const{left:c,top:h,width:d,height:p}=t.getBoundingClientRect();if(a||e(),!d||!p)return;const u={rootMargin:-Xe(h)+"px "+-Xe(s.clientWidth-(c+d))+"px "+-Xe(s.clientHeight-(h+p))+"px "+-Xe(c)+"px",threshold:Ke(0,qe(1,l))||1};let f=!0;function b(t){const e=t[0].intersectionRatio;if(e!==l){if(!f)return n();e?n(!1,e):o=setTimeout((()=>{n(!1,1e-7)}),100)}f=!1}try{i=new IntersectionObserver(b,{...u,root:s.ownerDocument})}catch(t){i=new IntersectionObserver(b,u)}i.observe(t)}(!0),r}(c,o):null;let p,u=-1,f=null;n&&(f=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{f&&f.observe(e)}))),o()})),c&&!l&&f.observe(c),f.observe(e));let b=l?Mo(t):null;return l&&function e(){const i=Mo(t);!b||i.x===b.x&&i.y===b.y&&i.width===b.width&&i.height===b.height||o();b=i,p=requestAnimationFrame(e)}(),o(),()=>{h.forEach((t=>{s&&t.removeEventListener("scroll",o),r&&t.removeEventListener("resize",o)})),d&&d(),f&&f.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const qo=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:n=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=to(t,e),c={x:o,y:i},h=await uo(e,l),d=ro(eo(s)),p=io(d);let u=c[p],f=c[d];if(r){const t="y"===p?"bottom":"right";u=Qe(u+h["y"===p?"top":"left"],u,u-h[t])}if(n){const t="y"===d?"bottom":"right";f=Qe(f+h["y"===d?"top":"left"],f,f-h[t])}const b=a.fn({...e,[p]:u,[d]:f});return{...b,data:{x:b.x-o,y:b.y-i}}}}},Ko=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:s,middlewareData:r,rects:n,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:b=!0,...g}=to(t,e);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const m=eo(s),v=eo(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(v||!b?[lo(a)]:function(t){const e=lo(t);return[ao(t),e,ao(e)]}(a));p||"none"===f||w.push(...function(t,e,o,i){const s=oo(t);let r=function(t,e,o){const i=["left","right"],s=["right","left"],r=["top","bottom"],n=["bottom","top"];switch(t){case"top":case"bottom":return o?e?s:i:e?i:s;case"left":case"right":return e?r:n;default:return[]}}(eo(t),"start"===o,i);return s&&(r=r.map((t=>t+"-"+s)),e&&(r=r.concat(r.map(ao)))),r}(a,b,f,y));const _=[a,...w],x=await uo(e,g),$=[];let k=(null==(i=r.flip)?void 0:i.overflows)||[];if(h&&$.push(x[m]),d){const t=function(t,e,o){void 0===o&&(o=!1);const i=oo(t),s=no(t),r=so(s);let n="x"===s?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(n=lo(n)),[n,lo(n)]}(s,n,y);$.push(x[t[0]],x[t[1]])}if(k=[...k,{placement:s,overflows:$}],!$.every((t=>t<=0))){var A,C;const t=((null==(A=r.flip)?void 0:A.index)||0)+1,e=_[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let o=null==(C=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!o)switch(u){case"bestFit":{var E;const t=null==(E=k.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:E[0];t&&(o=t);break}case"initialPlacement":o=a}if(s!==o)return{reset:{placement:o}}}return{}}}},Zo=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:i,platform:s,elements:r}=e,{apply:n=(()=>{}),...a}=to(t,e),l=await uo(e,a),c=eo(o),h=oo(o),d="y"===ro(o),{width:p,height:u}=i.floating;let f,b;"top"===c||"bottom"===c?(f=c,b=h===(await(null==s.isRTL?void 0:s.isRTL(r.floating))?"start":"end")?"left":"right"):(b=c,f="end"===h?"top":"bottom");const g=u-l[f],m=p-l[b],v=!e.middlewareData.shift;let y=g,w=m;if(d){const t=p-l.left-l.right;w=h||v?qe(m,t):t}else{const t=u-l.top-l.bottom;y=h||v?qe(g,t):t}if(v&&!h){const t=Ke(l.left,0),e=Ke(l.right,0),o=Ke(l.top,0),i=Ke(l.bottom,0);d?w=p-2*(0!==t||0!==e?t+e:Ke(l.left,l.right)):y=u-2*(0!==o||0!==i?o+i:Ke(l.top,l.bottom))}await n({...e,availableWidth:w,availableHeight:y});const _=await s.getDimensions(r.floating);return p!==_.width||u!==_.height?{reset:{rects:!0}}:{}}}},Xo=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:s,rects:r,platform:n,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=to(t,e)||{};if(null==c)return{};const d=co(h),p={x:o,y:i},u=no(s),f=so(u),b=await n.getDimensions(c),g="y"===u,m=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=r.reference[f]+r.reference[u]-p[u]-r.floating[f],_=p[u]-r.reference[u],x=await(null==n.getOffsetParent?void 0:n.getOffsetParent(c));let $=x?x[y]:0;$&&await(null==n.isElement?void 0:n.isElement(x))||($=a.floating[y]||r.floating[f]);const k=w/2-_/2,A=$/2-b[f]/2-1,C=qe(d[m],A),E=qe(d[v],A),S=C,z=$-b[f]-E,T=$/2-b[f]/2+k,P=Qe(S,T,z),L=!l.arrow&&null!=oo(s)&&T!=P&&r.reference[f]/2-(T{const i=new Map,s={platform:Wo,...o},r={...s.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:n}=o,a=r.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(e));let c=await n.getElementRects({reference:t,floating:e,strategy:s}),{x:h,y:d}=po(c,i,l),p=i,u={},f=0;for(let o=0;o{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let o=0,i=0,s=0,r=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=[fo({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Zo({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(Ko({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(qo({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Zo({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(Xo({element:this.arrowEl,padding:this.arrowPadding}));const e="absolute"===this.strategy?t=>Wo.getOffsetParent(t,Go):Wo.getOffsetParent;Yo(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:h(c({},Wo),{getOffsetParent:e})}).then((({x:t,y:e,middlewareData:o,placement:i})=>{const s="rtl"===getComputedStyle(this).direction,r={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=o.arrow.x,e=o.arrow.y;let i="",n="",a="",l="";if("start"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",n=s?o:"",l=s?"":o}else if("end"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n=s?"":o,l=s?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))":"",i="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",i="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:i,right:n,bottom:a,left:l,[r]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return nt` +`;const Ke=Math.min,Ze=Math.max,Xe=Math.round,Ye=Math.floor,Ge=t=>({x:t,y:t}),Je={left:"right",right:"left",bottom:"top",top:"bottom"},Qe={start:"end",end:"start"};function to(t,e,o){return Ze(t,Ke(e,o))}function eo(t,e){return"function"==typeof t?t(e):t}function oo(t){return t.split("-")[0]}function io(t){return t.split("-")[1]}function so(t){return"x"===t?"y":"x"}function ro(t){return"y"===t?"height":"width"}function no(t){return["top","bottom"].includes(oo(t))?"y":"x"}function ao(t){return so(no(t))}function lo(t){return t.replace(/start|end/g,(t=>Qe[t]))}function co(t){return t.replace(/left|right|bottom|top/g,(t=>Je[t]))}function ho(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 po(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function uo(t,e,o){let{reference:i,floating:s}=t;const r=no(e),n=ao(e),a=ro(n),l=oo(e),c="y"===r,h=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,p=i[a]/2-s[a]/2;let u;switch(l){case"top":u={x:h,y:i.y-s.height};break;case"bottom":u={x:h,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:d};break;case"left":u={x:i.x-s.width,y:d};break;default:u={x:i.x,y:i.y}}switch(io(e)){case"start":u[n]-=p*(o&&c?-1:1);break;case"end":u[n]+=p*(o&&c?-1:1)}return u}async function fo(t,e){var o;void 0===e&&(e={});const{x:i,y:s,platform:r,rects:n,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=eo(e,t),f=ho(u),b=a[p?"floating"===d?"reference":"floating":d],g=po(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(b)))||o?b:b.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),m="floating"===d?{...n.floating,x:i,y:s}:n.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),y=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},w=po(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-w.top+f.top)/y.y,bottom:(w.bottom-g.bottom+f.bottom)/y.y,left:(g.left-w.left+f.left)/y.x,right:(w.right-g.right+f.right)/y.x}}const bo=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var o,i;const{x:s,y:r,placement:n,middlewareData:a}=e,l=await async function(t,e){const{placement:o,platform:i,elements:s}=t,r=await(null==i.isRTL?void 0:i.isRTL(s.floating)),n=oo(o),a=io(o),l="y"===no(o),c=["left","top"].includes(n)?-1:1,h=r&&l?-1:1,d=eo(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof f&&(u="end"===a?-1*f:f),l?{x:u*h,y:p*c}:{x:p*c,y:u*h}}(e,t);return n===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:n}}}}};function go(t){return yo(t)?(t.nodeName||"").toLowerCase():"#document"}function mo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function vo(t){var e;return null==(e=(yo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function yo(t){return t instanceof Node||t instanceof mo(t).Node}function wo(t){return t instanceof Element||t instanceof mo(t).Element}function _o(t){return t instanceof HTMLElement||t instanceof mo(t).HTMLElement}function xo(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof mo(t).ShadowRoot)}function $o(t){const{overflow:e,overflowX:o,overflowY:i,display:s}=So(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(s)}function ko(t){return["table","td","th"].includes(go(t))}function Ao(t){const e=Co(),o=So(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function Co(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Eo(t){return["html","body","#document"].includes(go(t))}function So(t){return mo(t).getComputedStyle(t)}function zo(t){return wo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function To(t){if("html"===go(t))return t;const e=t.assignedSlot||t.parentNode||xo(t)&&t.host||vo(t);return xo(e)?e.host:e}function Po(t){const e=To(t);return Eo(e)?t.ownerDocument?t.ownerDocument.body:t.body:_o(e)&&$o(e)?e:Po(e)}function Lo(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const s=Po(t),r=s===(null==(i=t.ownerDocument)?void 0:i.body),n=mo(s);return r?e.concat(n,n.visualViewport||[],$o(s)?s:[],n.frameElement&&o?Lo(n.frameElement):[]):e.concat(s,Lo(s,[],o))}function Oo(t){const e=So(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=_o(t),r=s?t.offsetWidth:o,n=s?t.offsetHeight:i,a=Xe(o)!==r||Xe(i)!==n;return a&&(o=r,i=n),{width:o,height:i,$:a}}function Do(t){return wo(t)?t:t.contextElement}function Fo(t){const e=Do(t);if(!_o(e))return Ge(1);const o=e.getBoundingClientRect(),{width:i,height:s,$:r}=Oo(e);let n=(r?Xe(o.width):o.width)/i,a=(r?Xe(o.height):o.height)/s;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const Ro=Ge(0);function Mo(t){const e=mo(t);return Co()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Ro}function Bo(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const s=t.getBoundingClientRect(),r=Do(t);let n=Ge(1);e&&(i?wo(i)&&(n=Fo(i)):n=Fo(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==mo(t))&&e}(r,o,i)?Mo(r):Ge(0);let l=(s.left+a.x)/n.x,c=(s.top+a.y)/n.y,h=s.width/n.x,d=s.height/n.y;if(r){const t=mo(r),e=i&&wo(i)?mo(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=Fo(o),e=o.getBoundingClientRect(),i=So(o),s=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,r=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,d*=t.y,l+=s,c+=r,o=mo(o).frameElement}}return po({width:h,height:d,x:l,y:c})}function No(t){return Bo(vo(t)).left+zo(t).scrollLeft}function Ho(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=mo(t),i=vo(t),s=o.visualViewport;let r=i.clientWidth,n=i.clientHeight,a=0,l=0;if(s){r=s.width,n=s.height;const t=Co();(!t||t&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:n,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=vo(t),o=zo(t),i=t.ownerDocument.body,s=Ze(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=Ze(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let n=-o.scrollLeft+No(t);const a=-o.scrollTop;return"rtl"===So(i).direction&&(n+=Ze(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:n,y:a}}(vo(t));else if(wo(e))i=function(t,e){const o=Bo(t,!0,"fixed"===e),i=o.top+t.clientTop,s=o.left+t.clientLeft,r=_o(t)?Fo(t):Ge(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:s*r.x,y:i*r.y}}(e,o);else{const o=Mo(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return po(i)}function Uo(t,e){const o=To(t);return!(o===e||!wo(o)||Eo(o))&&("fixed"===So(o).position||Uo(o,e))}function Io(t,e,o){const i=_o(e),s=vo(e),r="fixed"===o,n=Bo(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=Ge(0);if(i||!i&&!r)if(("body"!==go(e)||$o(s))&&(a=zo(e)),i){const t=Bo(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else s&&(l.x=No(s));return{x:n.left+a.scrollLeft-l.x,y:n.top+a.scrollTop-l.y,width:n.width,height:n.height}}function Vo(t,e){return _o(t)&&"fixed"!==So(t).position?e?e(t):t.offsetParent:null}function Wo(t,e){const o=mo(t);if(!_o(t))return o;let i=Vo(t,e);for(;i&&ko(i)&&"static"===So(i).position;)i=Vo(i,e);return i&&("html"===go(i)||"body"===go(i)&&"static"===So(i).position&&!Ao(i))?o:i||function(t){let e=To(t);for(;_o(e)&&!Eo(e);){if(Ao(e))return e;e=To(e)}return null}(t)||o}const jo={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const s=_o(o),r=vo(o);if(o===r)return e;let n={scrollLeft:0,scrollTop:0},a=Ge(1);const l=Ge(0);if((s||!s&&"fixed"!==i)&&(("body"!==go(o)||$o(r))&&(n=zo(o)),_o(o))){const t=Bo(o);a=Fo(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-n.scrollLeft*a.x+l.x,y:e.y*a.y-n.scrollTop*a.y+l.y}},getDocumentElement:vo,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:s}=t;const r=[..."clippingAncestors"===o?function(t,e){const o=e.get(t);if(o)return o;let i=Lo(t,[],!1).filter((t=>wo(t)&&"body"!==go(t))),s=null;const r="fixed"===So(t).position;let n=r?To(t):t;for(;wo(n)&&!Eo(n);){const e=So(n),o=Ao(n);o||"fixed"!==e.position||(s=null),(r?!o&&!s:!o&&"static"===e.position&&s&&["absolute","fixed"].includes(s.position)||$o(n)&&!o&&Uo(t,n))?i=i.filter((t=>t!==n)):s=e,n=To(n)}return e.set(t,i),i}(e,this._c):[].concat(o),i],n=r[0],a=r.reduce(((t,o)=>{const i=Ho(e,o,s);return t.top=Ze(i.top,t.top),t.right=Ke(i.right,t.right),t.bottom=Ke(i.bottom,t.bottom),t.left=Ze(i.left,t.left),t}),Ho(e,n,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Wo,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const s=this.getOffsetParent||Wo,r=this.getDimensions;return{reference:Io(e,await s(o),i),floating:{x:0,y:0,...await r(o)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=Oo(t);return{width:e,height:o}},getScale:Fo,isElement:wo,isRTL:function(t){return"rtl"===So(t).direction}};function qo(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Do(t),h=s||r?[...c?Lo(c):[],...Lo(e)]:[];h.forEach((t=>{s&&t.addEventListener("scroll",o,{passive:!0}),r&&t.addEventListener("resize",o)}));const d=c&&a?function(t,e){let o,i=null;const s=vo(t);function r(){clearTimeout(o),i&&i.disconnect(),i=null}return function n(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const{left:c,top:h,width:d,height:p}=t.getBoundingClientRect();if(a||e(),!d||!p)return;const u={rootMargin:-Ye(h)+"px "+-Ye(s.clientWidth-(c+d))+"px "+-Ye(s.clientHeight-(h+p))+"px "+-Ye(c)+"px",threshold:Ze(0,Ke(1,l))||1};let f=!0;function b(t){const e=t[0].intersectionRatio;if(e!==l){if(!f)return n();e?n(!1,e):o=setTimeout((()=>{n(!1,1e-7)}),100)}f=!1}try{i=new IntersectionObserver(b,{...u,root:s.ownerDocument})}catch(t){i=new IntersectionObserver(b,u)}i.observe(t)}(!0),r}(c,o):null;let p,u=-1,f=null;n&&(f=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{f&&f.observe(e)}))),o()})),c&&!l&&f.observe(c),f.observe(e));let b=l?Bo(t):null;return l&&function e(){const i=Bo(t);!b||i.x===b.x&&i.y===b.y&&i.width===b.width&&i.height===b.height||o();b=i,p=requestAnimationFrame(e)}(),o(),()=>{h.forEach((t=>{s&&t.removeEventListener("scroll",o),r&&t.removeEventListener("resize",o)})),d&&d(),f&&f.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Ko=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:n=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=eo(t,e),c={x:o,y:i},h=await fo(e,l),d=no(oo(s)),p=so(d);let u=c[p],f=c[d];if(r){const t="y"===p?"bottom":"right";u=to(u+h["y"===p?"top":"left"],u,u-h[t])}if(n){const t="y"===d?"bottom":"right";f=to(f+h["y"===d?"top":"left"],f,f-h[t])}const b=a.fn({...e,[p]:u,[d]:f});return{...b,data:{x:b.x-o,y:b.y-i}}}}},Zo=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:s,middlewareData:r,rects:n,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:b=!0,...g}=eo(t,e);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const m=oo(s),v=oo(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(v||!b?[co(a)]:function(t){const e=co(t);return[lo(t),e,lo(e)]}(a));p||"none"===f||w.push(...function(t,e,o,i){const s=io(t);let r=function(t,e,o){const i=["left","right"],s=["right","left"],r=["top","bottom"],n=["bottom","top"];switch(t){case"top":case"bottom":return o?e?s:i:e?i:s;case"left":case"right":return e?r:n;default:return[]}}(oo(t),"start"===o,i);return s&&(r=r.map((t=>t+"-"+s)),e&&(r=r.concat(r.map(lo)))),r}(a,b,f,y));const _=[a,...w],x=await fo(e,g),$=[];let k=(null==(i=r.flip)?void 0:i.overflows)||[];if(h&&$.push(x[m]),d){const t=function(t,e,o){void 0===o&&(o=!1);const i=io(t),s=ao(t),r=ro(s);let n="x"===s?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(n=co(n)),[n,co(n)]}(s,n,y);$.push(x[t[0]],x[t[1]])}if(k=[...k,{placement:s,overflows:$}],!$.every((t=>t<=0))){var A,C;const t=((null==(A=r.flip)?void 0:A.index)||0)+1,e=_[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let o=null==(C=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!o)switch(u){case"bestFit":{var E;const t=null==(E=k.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:E[0];t&&(o=t);break}case"initialPlacement":o=a}if(s!==o)return{reset:{placement:o}}}return{}}}},Xo=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:i,platform:s,elements:r}=e,{apply:n=(()=>{}),...a}=eo(t,e),l=await fo(e,a),c=oo(o),h=io(o),d="y"===no(o),{width:p,height:u}=i.floating;let f,b;"top"===c||"bottom"===c?(f=c,b=h===(await(null==s.isRTL?void 0:s.isRTL(r.floating))?"start":"end")?"left":"right"):(b=c,f="end"===h?"top":"bottom");const g=u-l[f],m=p-l[b],v=!e.middlewareData.shift;let y=g,w=m;if(d){const t=p-l.left-l.right;w=h||v?Ke(m,t):t}else{const t=u-l.top-l.bottom;y=h||v?Ke(g,t):t}if(v&&!h){const t=Ze(l.left,0),e=Ze(l.right,0),o=Ze(l.top,0),i=Ze(l.bottom,0);d?w=p-2*(0!==t||0!==e?t+e:Ze(l.left,l.right)):y=u-2*(0!==o||0!==i?o+i:Ze(l.top,l.bottom))}await n({...e,availableWidth:w,availableHeight:y});const _=await s.getDimensions(r.floating);return p!==_.width||u!==_.height?{reset:{rects:!0}}:{}}}},Yo=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:s,rects:r,platform:n,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=eo(t,e)||{};if(null==c)return{};const d=ho(h),p={x:o,y:i},u=ao(s),f=ro(u),b=await n.getDimensions(c),g="y"===u,m=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=r.reference[f]+r.reference[u]-p[u]-r.floating[f],_=p[u]-r.reference[u],x=await(null==n.getOffsetParent?void 0:n.getOffsetParent(c));let $=x?x[y]:0;$&&await(null==n.isElement?void 0:n.isElement(x))||($=a.floating[y]||r.floating[f]);const k=w/2-_/2,A=$/2-b[f]/2-1,C=Ke(d[m],A),E=Ke(d[v],A),S=C,z=$-b[f]-E,T=$/2-b[f]/2+k,P=to(S,T,z),L=!l.arrow&&null!=io(s)&&T!=P&&r.reference[f]/2-(T{const i=new Map,s={platform:jo,...o},r={...s.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:n}=o,a=r.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(e));let c=await n.getElementRects({reference:t,floating:e,strategy:s}),{x:h,y:d}=uo(c,i,l),p=i,u={},f=0;for(let o=0;o{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let o=0,i=0,s=0,r=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=[bo({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Xo({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(Zo({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Ko({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Xo({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(Yo({element:this.arrowEl,padding:this.arrowPadding}));const e="absolute"===this.strategy?t=>jo.getOffsetParent(t,Jo):jo.getOffsetParent;Go(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:h(c({},jo),{getOffsetParent:e})}).then((({x:t,y:e,middlewareData:o,placement:i})=>{const s="rtl"===getComputedStyle(this).direction,r={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=o.arrow.x,e=o.arrow.y;let i="",n="",a="",l="";if("start"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",n=s?o:"",l=s?"":o}else if("end"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n=s?"":o,l=s?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))":"",i="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",i="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:i,right:n,bottom:a,left:l,[r]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return nt` {if(t?.r===be)return t?._$litStatic$},me=(t,...e)= ${this.arrow?nt``:""} - `}};function ti(t,e){return new Promise((o=>{t.addEventListener(e,(function i(s){s.target===t&&(t.removeEventListener(e,i),o())}))}))}function ei(t,e,o){return new Promise((i=>{if((null==o?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const s=t.animate(e,h(c({},o),{duration:ii()?0:o.duration}));s.addEventListener("cancel",i,{once:!0}),s.addEventListener("finish",i,{once:!0})}))}function oi(t){return(t=t.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?1e3*parseFloat(t):parseFloat(t)}function ii(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function si(t){return Promise.all(t.getAnimations().map((t=>new Promise((e=>{t.cancel(),requestAnimationFrame(e)})))))}Qo.styles=[Rt,je],d([Vt(".popup")],Qo.prototype,"popup",2),d([Vt(".popup__arrow")],Qo.prototype,"arrowEl",2),d([Nt()],Qo.prototype,"anchor",2),d([Nt({type:Boolean,reflect:!0})],Qo.prototype,"active",2),d([Nt({reflect:!0})],Qo.prototype,"placement",2),d([Nt({reflect:!0})],Qo.prototype,"strategy",2),d([Nt({type:Number})],Qo.prototype,"distance",2),d([Nt({type:Number})],Qo.prototype,"skidding",2),d([Nt({type:Boolean})],Qo.prototype,"arrow",2),d([Nt({attribute:"arrow-placement"})],Qo.prototype,"arrowPlacement",2),d([Nt({attribute:"arrow-padding",type:Number})],Qo.prototype,"arrowPadding",2),d([Nt({type:Boolean})],Qo.prototype,"flip",2),d([Nt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],Qo.prototype,"flipFallbackPlacements",2),d([Nt({attribute:"flip-fallback-strategy"})],Qo.prototype,"flipFallbackStrategy",2),d([Nt({type:Object})],Qo.prototype,"flipBoundary",2),d([Nt({attribute:"flip-padding",type:Number})],Qo.prototype,"flipPadding",2),d([Nt({type:Boolean})],Qo.prototype,"shift",2),d([Nt({type:Object})],Qo.prototype,"shiftBoundary",2),d([Nt({attribute:"shift-padding",type:Number})],Qo.prototype,"shiftPadding",2),d([Nt({attribute:"auto-size"})],Qo.prototype,"autoSize",2),d([Nt()],Qo.prototype,"sync",2),d([Nt({type:Object})],Qo.prototype,"autoSizeBoundary",2),d([Nt({attribute:"auto-size-padding",type:Number})],Qo.prototype,"autoSizePadding",2),d([Nt({attribute:"hover-bridge",type:Boolean})],Qo.prototype,"hoverBridge",2);var ri=class extends It{constructor(){super(),this.localize=new Le(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=oi(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=oi(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;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 si(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:o}=v(this,"tooltip.show",{dir:this.localize.dir()});await ei(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 si(this.body);const{keyframes:t,options:o}=v(this,"tooltip.hide",{dir:this.localize.dir()});await ei(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,ti(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ti(this,"sl-after-hide")}render(){return nt` + `}};function ei(t,e){return new Promise((o=>{t.addEventListener(e,(function i(s){s.target===t&&(t.removeEventListener(e,i),o())}))}))}function oi(t,e,o){return new Promise((i=>{if((null==o?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const s=t.animate(e,h(c({},o),{duration:si()?0:o.duration}));s.addEventListener("cancel",i,{once:!0}),s.addEventListener("finish",i,{once:!0})}))}function ii(t){return(t=t.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?1e3*parseFloat(t):parseFloat(t)}function si(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ri(t){return Promise.all(t.getAnimations().map((t=>new Promise((e=>{t.cancel(),requestAnimationFrame(e)})))))}ti.styles=[Rt,qe],d([It(".popup")],ti.prototype,"popup",2),d([It(".popup__arrow")],ti.prototype,"arrowEl",2),d([Nt()],ti.prototype,"anchor",2),d([Nt({type:Boolean,reflect:!0})],ti.prototype,"active",2),d([Nt({reflect:!0})],ti.prototype,"placement",2),d([Nt({reflect:!0})],ti.prototype,"strategy",2),d([Nt({type:Number})],ti.prototype,"distance",2),d([Nt({type:Number})],ti.prototype,"skidding",2),d([Nt({type:Boolean})],ti.prototype,"arrow",2),d([Nt({attribute:"arrow-placement"})],ti.prototype,"arrowPlacement",2),d([Nt({attribute:"arrow-padding",type:Number})],ti.prototype,"arrowPadding",2),d([Nt({type:Boolean})],ti.prototype,"flip",2),d([Nt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],ti.prototype,"flipFallbackPlacements",2),d([Nt({attribute:"flip-fallback-strategy"})],ti.prototype,"flipFallbackStrategy",2),d([Nt({type:Object})],ti.prototype,"flipBoundary",2),d([Nt({attribute:"flip-padding",type:Number})],ti.prototype,"flipPadding",2),d([Nt({type:Boolean})],ti.prototype,"shift",2),d([Nt({type:Object})],ti.prototype,"shiftBoundary",2),d([Nt({attribute:"shift-padding",type:Number})],ti.prototype,"shiftPadding",2),d([Nt({attribute:"auto-size"})],ti.prototype,"autoSize",2),d([Nt()],ti.prototype,"sync",2),d([Nt({type:Object})],ti.prototype,"autoSizeBoundary",2),d([Nt({attribute:"auto-size-padding",type:Number})],ti.prototype,"autoSizePadding",2),d([Nt({attribute:"hover-bridge",type:Boolean})],ti.prototype,"hoverBridge",2);var ni=class extends Vt{constructor(){super(),this.localize=new Oe(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=ii(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=ii(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;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 ri(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:o}=v(this,"tooltip.show",{dir:this.localize.dir()});await oi(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 ri(this.body);const{keyframes:t,options:o}=v(this,"tooltip.hide",{dir:this.localize.dir()});await oi(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,ei(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ei(this,"sl-after-hide")}render(){return nt` {if(t?.r===be)return t?._$litStatic$},me=(t,...e)= ${this.content} - `}};ri.styles=[Rt,We],ri.dependencies={"sl-popup":Qo},d([Vt("slot:not([name])")],ri.prototype,"defaultSlot",2),d([Vt(".tooltip__body")],ri.prototype,"body",2),d([Vt("sl-popup")],ri.prototype,"popup",2),d([Nt()],ri.prototype,"content",2),d([Nt()],ri.prototype,"placement",2),d([Nt({type:Boolean,reflect:!0})],ri.prototype,"disabled",2),d([Nt({type:Number})],ri.prototype,"distance",2),d([Nt({type:Boolean,reflect:!0})],ri.prototype,"open",2),d([Nt({type:Number})],ri.prototype,"skidding",2),d([Nt()],ri.prototype,"trigger",2),d([Nt({type:Boolean})],ri.prototype,"hoist",2),d([Ft("open",{waitUntilFirstUpdate:!0})],ri.prototype,"handleOpenChange",1),d([Ft(["content","distance","hoist","placement","skidding"])],ri.prototype,"handleOptionsChange",1),d([Ft("disabled")],ri.prototype,"handleDisabledChange",1),m("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),m("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),ri.define("sl-tooltip");var ni=k` + `}};ni.styles=[Rt,je],ni.dependencies={"sl-popup":ti},d([It("slot:not([name])")],ni.prototype,"defaultSlot",2),d([It(".tooltip__body")],ni.prototype,"body",2),d([It("sl-popup")],ni.prototype,"popup",2),d([Nt()],ni.prototype,"content",2),d([Nt()],ni.prototype,"placement",2),d([Nt({type:Boolean,reflect:!0})],ni.prototype,"disabled",2),d([Nt({type:Number})],ni.prototype,"distance",2),d([Nt({type:Boolean,reflect:!0})],ni.prototype,"open",2),d([Nt({type:Number})],ni.prototype,"skidding",2),d([Nt()],ni.prototype,"trigger",2),d([Nt({type:Boolean})],ni.prototype,"hoist",2),d([Ft("open",{waitUntilFirstUpdate:!0})],ni.prototype,"handleOpenChange",1),d([Ft(["content","distance","hoist","placement","skidding"])],ni.prototype,"handleOptionsChange",1),d([Ft("disabled")],ni.prototype,"handleDisabledChange",1),m("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),m("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),ni.define("sl-tooltip");var ai=k` :host { --height: 1rem; --track-color: var(--sl-color-neutral-200); @@ -1054,7 +1054,7 @@ const be=Symbol.for(""),ge=t=>{if(t?.r===be)return t?._$litStatic$},me=(t,...e)= * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;const ai="important",li=" !"+ai,ci=Kt(class extends Zt{constructor(t){if(super(t),t.type!==Wt||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ut)return this.ut=new Set(Object.keys(e)),this.render(e);for(const t of this.ut)null==e[t]&&(this.ut.delete(t),t.includes("-")?o.removeProperty(t):o[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ut.add(t);const e="string"==typeof i&&i.endsWith(li);t.includes("-")||e?o.setProperty(t,e?i.slice(0,-11):i,e?ai:""):o[t]=i}}return at}});var hi=class extends It{constructor(){super(...arguments),this.localize=new Le(this),this.value=0,this.indeterminate=!1,this.label=""}render(){return nt` + */;const li="important",ci=" !"+li,hi=Kt(class extends Zt{constructor(t){if(super(t),t.type!==Wt||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ut)return this.ut=new Set(Object.keys(e)),this.render(e);for(const t of this.ut)null==e[t]&&(this.ut.delete(t),t.includes("-")?o.removeProperty(t):o[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ut.add(t);const e="string"==typeof i&&i.endsWith(ci);t.includes("-")||e?o.setProperty(t,e?i.slice(0,-11):i,e?li:""):o[t]=i}}return at}});var di=class extends Vt{constructor(){super(...arguments),this.localize=new Oe(this),this.value=0,this.indeterminate=!1,this.label=""}render(){return nt`
{if(t?.r===be)return t?._$litStatic$},me=(t,...e)= aria-valuemax="100" aria-valuenow=${this.indeterminate?0:this.value} > -
+
${this.indeterminate?"":nt` `}
- `}};hi.styles=[Rt,ni],d([Nt({type:Number,reflect:!0})],hi.prototype,"value",2),d([Nt({type:Boolean,reflect:!0})],hi.prototype,"indeterminate",2),d([Nt()],hi.prototype,"label",2),hi.define("sl-progress-bar");var di=new WeakMap;function pi(t){let e=di.get(t);return e||(e=window.getComputedStyle(t,null),di.set(t,e)),e}function ui(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")&&!t.hasAttribute("checked"))return!1;if(!function(t){if("function"==typeof t.checkVisibility)return t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});const e=pi(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=pi(t),{overflowY:o,overflowX:i}=e;return"scroll"===o||"scroll"===i||"auto"===o&&"auto"===i&&(t.scrollHeight>t.clientHeight&&"auto"===o||!(!(t.scrollWidth>t.clientWidth)||"auto"!==i))}(t)}function fi(t){const e=new WeakMap,o=[];return function i(s){if(s instanceof Element){if(s.hasAttribute("inert")||s.closest("[inert]"))return;if(e.has(s))return;e.set(s,!0),!o.includes(s)&&ui(s)&&o.push(s),s instanceof HTMLSlotElement&&function(t,e){var o;return(null==(o=t.getRootNode({composed:!0}))?void 0:o.host)!==e}(s,t)&&s.assignedElements({flatten:!0}).forEach((t=>{i(t)})),null!==s.shadowRoot&&"open"===s.shadowRoot.mode&&i(s.shadowRoot)}for(const t of s.children)i(t)}(t),o.sort(((t,e)=>{const o=Number(t.getAttribute("tabindex"))||0;return(Number(e.getAttribute("tabindex"))||0)-o}))}function*bi(t=document.activeElement){null!=t&&(yield t,"shadowRoot"in t&&t.shadowRoot&&"closed"!==t.shadowRoot.mode&&(yield*u(bi(t.shadowRoot.activeElement))))}var gi=[],mi=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=[...bi()].pop();if(this.previousFocus=o,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;t.shiftKey?this.tabDirection="backward":this.tabDirection="forward";const i=fi(this.element);let s=i.findIndex((t=>t===o));this.previousFocus=this.currentFocus;const r="forward"===this.tabDirection?1:-1;for(;;){s+r>=i.length?s=0:s+r<0?s=i.length-1:s+=r,this.previousFocus=this.currentFocus;const o=i[s];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=[...bi()];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(){gi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){gi=gi.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 gi[gi.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const t=fi(this.element);if(!this.element.matches(":focus-within")){const e=t[0],o=t[t.length-1],i="forward"===this.tabDirection?e:o;"function"==typeof(null==i?void 0:i.focus)&&(this.currentFocus=i,i.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(t){return this.elementsWithTabbableControls.includes(t.tagName.toLowerCase())||t.hasAttribute("controls")}},vi=k` + `}};di.styles=[Rt,ai],d([Nt({type:Number,reflect:!0})],di.prototype,"value",2),d([Nt({type:Boolean,reflect:!0})],di.prototype,"indeterminate",2),d([Nt()],di.prototype,"label",2),di.define("sl-progress-bar");var pi=new WeakMap;function ui(t){let e=pi.get(t);return e||(e=window.getComputedStyle(t,null),pi.set(t,e)),e}function fi(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")&&!t.hasAttribute("checked"))return!1;if(!function(t){if("function"==typeof t.checkVisibility)return t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});const e=ui(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=ui(t),{overflowY:o,overflowX:i}=e;return"scroll"===o||"scroll"===i||"auto"===o&&"auto"===i&&(t.scrollHeight>t.clientHeight&&"auto"===o||!(!(t.scrollWidth>t.clientWidth)||"auto"!==i))}(t)}function bi(t){const e=new WeakMap,o=[];return function i(s){if(s instanceof Element){if(s.hasAttribute("inert")||s.closest("[inert]"))return;if(e.has(s))return;e.set(s,!0),!o.includes(s)&&fi(s)&&o.push(s),s instanceof HTMLSlotElement&&function(t,e){var o;return(null==(o=t.getRootNode({composed:!0}))?void 0:o.host)!==e}(s,t)&&s.assignedElements({flatten:!0}).forEach((t=>{i(t)})),null!==s.shadowRoot&&"open"===s.shadowRoot.mode&&i(s.shadowRoot)}for(const t of s.children)i(t)}(t),o.sort(((t,e)=>{const o=Number(t.getAttribute("tabindex"))||0;return(Number(e.getAttribute("tabindex"))||0)-o}))}function*gi(t=document.activeElement){null!=t&&(yield t,"shadowRoot"in t&&t.shadowRoot&&"closed"!==t.shadowRoot.mode&&(yield*u(gi(t.shadowRoot.activeElement))))}var mi=[],vi=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=[...gi()].pop();if(this.previousFocus=o,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;t.shiftKey?this.tabDirection="backward":this.tabDirection="forward";const i=bi(this.element);let s=i.findIndex((t=>t===o));this.previousFocus=this.currentFocus;const r="forward"===this.tabDirection?1:-1;for(;;){s+r>=i.length?s=0:s+r<0?s=i.length-1:s+=r,this.previousFocus=this.currentFocus;const o=i[s];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=[...gi()];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(){mi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){mi=mi.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 mi[mi.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const t=bi(this.element);if(!this.element.matches(":focus-within")){const e=t[0],o=t[t.length-1],i="forward"===this.tabDirection?e:o;"function"==typeof(null==i?void 0:i.focus)&&(this.currentFocus=i,i.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(t){return this.elementsWithTabbableControls.includes(t.tagName.toLowerCase())||t.hasAttribute("controls")}},yi=k` :host { --width: 31rem; --header-spacing: var(--sl-spacing-large); @@ -1186,7 +1186,7 @@ const be=Symbol.for(""),ge=t=>{if(t?.r===be)return t?._$litStatic$},me=(t,...e)= border: solid 1px var(--sl-color-neutral-0); } } -`,yi=class extends It{constructor(){super(...arguments),this.hasSlotController=new Dt(this,"footer"),this.localize=new Le(this),this.modal=new mi(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.modal.isActive()&&this.open&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Me(this))}disconnectedCallback(){var t;super.disconnectedCallback(),this.modal.deactivate(),Be(this),null==(t=this.closeWatcher)||t.destroy()}requestClose(t){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=v(this,"dialog.denyClose",{dir:this.localize.dir()});ei(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){var t;"CloseWatcher"in window?(null==(t=this.closeWatcher)||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard")):document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){var t;null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),Me(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([si(this.dialog),si(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=v(this,"dialog.show",{dir:this.localize.dir()}),o=v(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([ei(this.panel,e.keyframes,e.options),ei(this.overlay,o.keyframes,o.options)]),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([si(this.dialog),si(this.overlay)]);const t=v(this,"dialog.hide",{dir:this.localize.dir()}),e=v(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([ei(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),ei(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Be(this);const o=this.originalTrigger;"function"==typeof(null==o?void 0:o.focus)&&setTimeout((()=>o.focus())),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,ti(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ti(this,"sl-after-hide")}render(){return nt` +`,wi=class extends Vt{constructor(){super(...arguments),this.hasSlotController=new Dt(this,"footer"),this.localize=new Oe(this),this.modal=new vi(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.modal.isActive()&&this.open&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Be(this))}disconnectedCallback(){var t;super.disconnectedCallback(),this.modal.deactivate(),Ne(this),null==(t=this.closeWatcher)||t.destroy()}requestClose(t){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=v(this,"dialog.denyClose",{dir:this.localize.dir()});oi(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){var t;"CloseWatcher"in window?(null==(t=this.closeWatcher)||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard")):document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){var t;null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),Be(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([ri(this.dialog),ri(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=v(this,"dialog.show",{dir:this.localize.dir()}),o=v(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([oi(this.panel,e.keyframes,e.options),oi(this.overlay,o.keyframes,o.options)]),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([ri(this.dialog),ri(this.overlay)]);const t=v(this,"dialog.hide",{dir:this.localize.dir()}),e=v(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([oi(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),oi(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Ne(this);const o=this.originalTrigger;"function"==typeof(null==o?void 0:o.focus)&&setTimeout((()=>o.focus())),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,ei(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ei(this,"sl-after-hide")}render(){return nt`
{if(t?.r===be)return t?._$litStatic$},me=(t,...e)=
- `}};yi.styles=[Rt,vi],yi.dependencies={"sl-icon-button":we},d([Vt(".dialog")],yi.prototype,"dialog",2),d([Vt(".dialog__panel")],yi.prototype,"panel",2),d([Vt(".dialog__overlay")],yi.prototype,"overlay",2),d([Nt({type:Boolean,reflect:!0})],yi.prototype,"open",2),d([Nt({reflect:!0})],yi.prototype,"label",2),d([Nt({attribute:"no-header",type:Boolean,reflect:!0})],yi.prototype,"noHeader",2),d([Ft("open",{waitUntilFirstUpdate:!0})],yi.prototype,"handleOpenChange",1),m("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),m("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),m("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),m("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),m("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),yi.define("sl-dialog");export{m as setDefaultAnimation}; + `}};wi.styles=[Rt,yi],wi.dependencies={"sl-icon-button":_e},d([It(".dialog")],wi.prototype,"dialog",2),d([It(".dialog__panel")],wi.prototype,"panel",2),d([It(".dialog__overlay")],wi.prototype,"overlay",2),d([Nt({type:Boolean,reflect:!0})],wi.prototype,"open",2),d([Nt({reflect:!0})],wi.prototype,"label",2),d([Nt({attribute:"no-header",type:Boolean,reflect:!0})],wi.prototype,"noHeader",2),d([Ft("open",{waitUntilFirstUpdate:!0})],wi.prototype,"handleOpenChange",1),m("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),m("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),m("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),m("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),m("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),wi.define("sl-dialog");export{ce as registerIconLibrary,m as setDefaultAnimation}; From 88454b5a224474c961dbc57d993abbced925c550 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 4 Apr 2024 21:41:17 +0200 Subject: [PATCH 5/5] Update shoelace to 2.15.0 --- vendor/javascript/shoelace.min.js | 59 +++++++++---------- yarn.lock | 96 +++++++++++++++---------------- 2 files changed, 78 insertions(+), 77 deletions(-) diff --git a/vendor/javascript/shoelace.min.js b/vendor/javascript/shoelace.min.js index b957238f0b..314f18a957 100644 --- a/vendor/javascript/shoelace.min.js +++ b/vendor/javascript/shoelace.min.js @@ -1,4 +1,4 @@ -var t=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,a=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),l=(e,o,i)=>o in e?t(e,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[o]=i,c=(t,e)=>{for(var o in e||(e={}))r.call(e,o)&&l(t,o,e[o]);if(s)for(var o of s(e))n.call(e,o)&&l(t,o,e[o]);return t},h=(t,o)=>e(t,i(o)),d=(e,i,s,r)=>{for(var n,a=r>1?void 0:r?o(i,s):i,l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r?n(i,s,a):n(a))||a);return r&&a&&t(i,s,a),a},p=function(t,e){this[0]=t,this[1]=e},u=t=>{var e,o=t[a("asyncIterator")],i=!1,s={};return null==o?(o=t[a("iterator")](),e=t=>s[t]=e=>o[t](e)):(o=o.call(t),e=t=>s[t]=e=>{if(i){if(i=!1,"throw"===t)throw e;return e}return i=!0,{done:!1,value:new p(new Promise((i=>{var s=o[t](e);if(!(s instanceof Object))throw TypeError("Object expected");i(s)})),1)}}),s[a("iterator")]=()=>s,e("next"),"throw"in o?e("throw"):s.throw=t=>{throw t},"return"in o&&e("return"),s},f=new Map,b=new WeakMap;function g(t,e){return"rtl"===e.toLowerCase()?{keyframes:t.rtlKeyframes||t.keyframes,options:t.options}:t}function m(t,e){f.set(t,function(t){return null!=t?t:{keyframes:[],options:{duration:0}}}(e))}function v(t,e,o){const i=b.get(t);if(null==i?void 0:i[e])return g(i[e],o.dir);const s=f.get(e);return s?g(s,o.dir):{keyframes:[],options:{duration:0}}} +var t=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,a=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),l=(e,o,i)=>o in e?t(e,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[o]=i,c=(t,e)=>{for(var o in e||(e={}))r.call(e,o)&&l(t,o,e[o]);if(s)for(var o of s(e))n.call(e,o)&&l(t,o,e[o]);return t},h=(t,o)=>e(t,i(o)),d=(e,i,s,r)=>{for(var n,a=r>1?void 0:r?o(i,s):i,l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r?n(i,s,a):n(a))||a);return r&&a&&t(i,s,a),a},p=function(t,e){this[0]=t,this[1]=e},u=t=>{var e,o=t[a("asyncIterator")],i=!1,s={};return null==o?(o=t[a("iterator")](),e=t=>s[t]=e=>o[t](e)):(o=o.call(t),e=t=>s[t]=e=>{if(i){if(i=!1,"throw"===t)throw e;return e}return i=!0,{done:!1,value:new p(new Promise((i=>{var s=o[t](e);if(!(s instanceof Object))throw TypeError("Object expected");i(s)})),1)}}),s[a("iterator")]=()=>s,e("next"),"throw"in o?e("throw"):s.throw=t=>{throw t},"return"in o&&e("return"),s},f=new Map,m=new WeakMap;function b(t,e){return"rtl"===e.toLowerCase()?{keyframes:t.rtlKeyframes||t.keyframes,options:t.options}:t}function g(t,e){f.set(t,function(t){return null!=t?t:{keyframes:[],options:{duration:0}}}(e))}function v(t,e,o){const i=m.get(t);if(null==i?void 0:i[e])return b(i[e],o.dir);const s=f.get(e);return s?b(s,o.dir):{keyframes:[],options:{duration:0}}} /** * @license * Copyright 2019 Google LLC @@ -8,19 +8,19 @@ var t=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDes * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */,{is:C,defineProperty:E,getOwnPropertyDescriptor:S,getOwnPropertyNames:z,getOwnPropertySymbols:T,getPrototypeOf:P}=Object,L=globalThis,O=L.trustedTypes,D=O?O.emptyScript:"",F=L.reactiveElementPolyfillSupport,R=(t,e)=>t,M={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}},B=(t,e)=>!C(t,e),N={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:B};Symbol.metadata??=Symbol("metadata"),L.litPropertyMetadata??=new WeakMap;class H 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=N){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&E(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:s}=S(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);s.call(this,e),this.requestUpdate(t,r,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??N}static _$Ei(){if(this.hasOwnProperty(R("elementProperties")))return;const t=P(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(R("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(R("properties"))){const t=this.properties,e=[...z(t),...T(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(A(t))}else void 0!==t&&e.push(A(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._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){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(w)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of e){const e=document.createElement("style"),i=y.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=o.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EO(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const s=(void 0!==o.converter?.toAttribute?o.converter:M).toAttribute(e,o.type);this._$Em=t,null==s?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:M;this._$Em=i,this[i]=s.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,o,i=!1,s){if(void 0!==t){if(o??=this.constructor.getPropertyOptions(t),!(o.hasChanged??B)(i?s:this[t],e))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),!0===o.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}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)!0!==o.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}H.elementStyles=[],H.shadowRootOptions={mode:"open"},H[R("elementProperties")]=new Map,H[R("finalized")]=new Map,F?.({ReactiveElement:H}),(L.reactiveElementVersions??=[]).push("2.0.2"); + */,{is:C,defineProperty:E,getOwnPropertyDescriptor:S,getOwnPropertyNames:z,getOwnPropertySymbols:T,getPrototypeOf:P}=Object,L=globalThis,O=L.trustedTypes,R=O?O.emptyScript:"",D=L.reactiveElementPolyfillSupport,F=(t,e)=>t,M={toAttribute(t,e){switch(e){case Boolean:t=t?R: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}},B=(t,e)=>!C(t,e),N={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:B};Symbol.metadata??=Symbol("metadata"),L.litPropertyMetadata??=new WeakMap;class U 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=N){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&E(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:s}=S(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);s.call(this,e),this.requestUpdate(t,r,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??N}static _$Ei(){if(this.hasOwnProperty(F("elementProperties")))return;const t=P(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(F("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(F("properties"))){const t=this.properties,e=[...z(t),...T(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(A(t))}else void 0!==t&&e.push(A(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(w)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of e){const e=document.createElement("style"),i=y.litNonce;void 0!==i&&e.setAttribute("nonce",i),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)}_$EC(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const s=(void 0!==o.converter?.toAttribute?o.converter:M).toAttribute(e,o.type);this._$Em=t,null==s?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:M;this._$Em=i,this[i]=s.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){if(o??=this.constructor.getPropertyOptions(t),!(o.hasChanged??B)(this[t],e))return;this.P(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),!0===o.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t)!0!==o.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}U.elementStyles=[],U.shadowRootOptions={mode:"open"},U[F("elementProperties")]=new Map,U[F("finalized")]=new Map,D?.({ReactiveElement:U}),(L.reactiveElementVersions??=[]).push("2.0.4"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const U=globalThis,I=U.trustedTypes,V=I?I.createPolicy("lit-html",{createHTML:t=>t}):void 0,W="$lit$",j=`lit$${(Math.random()+"").slice(9)}$`,q="?"+j,K=`<${q}>`,Z=document,X=()=>Z.createComment(""),Y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,G=Array.isArray,J="[ \t\n\f\r]",Q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tt=/-->/g,et=/>/g,ot=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,st=/"/g,rt=/^(?:script|style|textarea|title)$/i,nt=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),at=Symbol.for("lit-noChange"),lt=Symbol.for("lit-nothing"),ct=new WeakMap,ht=Z.createTreeWalker(Z,129);function dt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==V?V.createHTML(e):e}const pt=(t,e)=>{const o=t.length-1,i=[];let s,r=2===e?"":"",n=Q;for(let e=0;e"===l[0]?(n=s??Q,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?ot:'"'===l[3]?st:it):n===st||n===it?n=ot:n===tt||n===et?n=Q:(n=ot,s=void 0);const d=n===ot&&t[e+1].startsWith("/>")?" ":"";r+=n===Q?o+K:c>=0?(i.push(a),o.slice(0,c)+W+o.slice(c)+j+d):o+j+(-2===c?e:d)}return[dt(t,r+(t[o]||"")+(2===e?"":"")),i]};class ut{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,c]=pt(t,e);if(this.el=ut.createElement(l,o),ht.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=ht.nextNode())&&a.length0){i.textContent=I?I.emptyScript:"";for(let o=0;oG(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==lt&&Y(this._$AH)?this._$AA.nextSibling.data=t:this.$(Z.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=ut.createElement(dt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new bt(i,this),o=t.u(this.options);t.p(e),this.$(o),this._$AH=t}}_$AC(t){let e=ct.get(t.strings);return void 0===e&&ct.set(t.strings,e=new ut(t)),e}T(t){G(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new gt(this.k(X()),this.k(X()),this,this.options)):o=e[i],o._$AI(s),i++;i2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=lt}_$AI(t,e=this,o,i){const s=this.strings;let r=!1;if(void 0===s)t=ft(this,t,e,0),r=!Y(t)||t!==this._$AH&&t!==at,r&&(this._$AH=t);else{const i=t;let n,a;for(t=s[0],n=0;nt}):void 0,W="$lit$",j=`lit$${(Math.random()+"").slice(9)}$`,q="?"+j,K=`<${q}>`,Z=document,X=()=>Z.createComment(""),Y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,G=Array.isArray,J="[ \t\n\f\r]",Q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tt=/-->/g,et=/>/g,ot=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,st=/"/g,rt=/^(?:script|style|textarea|title)$/i,nt=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),at=Symbol.for("lit-noChange"),lt=Symbol.for("lit-nothing"),ct=new WeakMap,ht=Z.createTreeWalker(Z,129);function dt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==I?I.createHTML(e):e}const pt=(t,e)=>{const o=t.length-1,i=[];let s,r=2===e?"":"",n=Q;for(let e=0;e"===l[0]?(n=s??Q,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?ot:'"'===l[3]?st:it):n===st||n===it?n=ot:n===tt||n===et?n=Q:(n=ot,s=void 0);const d=n===ot&&t[e+1].startsWith("/>")?" ":"";r+=n===Q?o+K:c>=0?(i.push(a),o.slice(0,c)+W+o.slice(c)+j+d):o+j+(-2===c?e:d)}return[dt(t,r+(t[o]||"")+(2===e?"":"")),i]};class ut{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,c]=pt(t,e);if(this.el=ut.createElement(l,o),ht.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=ht.nextNode())&&a.length0){i.textContent=V?V.emptyScript:"";for(let o=0;oG(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==lt&&Y(this._$AH)?this._$AA.nextSibling.data=t:this.T(Z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=ut.createElement(dt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new mt(i,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=ct.get(t.strings);return void 0===e&&ct.set(t.strings,e=new ut(t)),e}k(t){G(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new bt(this.S(X()),this.S(X()),this,this.options)):o=e[i],o._$AI(s),i++;i2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=lt}_$AI(t,e=this,o,i){const s=this.strings;let r=!1;if(void 0===s)t=ft(this,t,e,0),r=!Y(t)||t!==this._$AH&&t!==at,r&&(this._$AH=t);else{const i=t;let n,a;for(t=s[0],n=0;n{const i=o?.renderBefore??e;let s=i._$litPart$;if(void 0===s){const t=o?.renderBefore??null;i._$litPart$=s=new gt(e.insertBefore(X(),t),t,void 0,o??{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return at}};$t._$litElement$=!0,$t.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:$t});const kt=globalThis.litElementPolyfillSupport;kt?.({LitElement:$t}),(globalThis.litElementVersions??=[]).push("4.0.2");var At=k` +let $t=class extends U{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 i=o?.renderBefore??e;let s=i._$litPart$;if(void 0===s){const t=o?.renderBefore??null;i._$litPart$=s=new bt(e.insertBefore(X(),t),t,void 0,o??{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return at}};$t._$litElement$=!0,$t.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:$t});const kt=globalThis.litElementPolyfillSupport;kt?.({LitElement:$t}),(globalThis.litElementVersions??=[]).push("4.0.4");var At=k` :host { display: inline-block; } @@ -175,6 +175,7 @@ let $t=class extends H{constructor(){super(...arguments),this.renderOptions={hos :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); } @@ -240,7 +241,7 @@ let $t=class extends H{constructor(){super(...arguments),this.renderOptions={hos .form-control--has-help-text.form-control--radio-group .form-control__help-text { margin-top: var(--sl-spacing-2x-small); } -`,Et=new WeakMap,St=new WeakMap,zt=new WeakMap,Tt=new WeakSet,Pt=new WeakMap,Lt=class{constructor(t,e){this.handleFormData=t=>{const e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s="sl-button"===this.host.tagName.toLowerCase();this.host.isConnected&&!e&&!s&&"string"==typeof o&&o.length>0&&void 0!==i&&(Array.isArray(i)?i.forEach((e=>{t.formData.append(o,e.toString())})):t.formData.append(o,i.toString()))},this.handleFormSubmit=t=>{var e;const o=this.options.disabled(this.host),i=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(e=Et.get(this.form))||e.forEach((t=>{this.setUserInteracted(t,!0)}))),!this.form||this.form.noValidate||o||i(this.host)||(t.preventDefault(),t.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),Pt.set(this.host,[])},this.handleInteraction=t=>{const e=Pt.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=c({form:t=>{const e=t.form;if(e){const o=t.getRootNode().getElementById(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),Pt.set(this.host,[]),this.options.assumeInteractionOn.forEach((t=>{this.host.addEventListener(t,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),Pt.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,Et.has(this.form)?Et.get(this.form).add(this.host):Et.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),St.has(this.form)||(St.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),zt.has(this.form)||(zt.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const t=Et.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),St.has(this.form)&&(this.form.reportValidity=St.get(this.form),St.delete(this.form)),zt.has(this.form)&&(this.form.checkValidity=zt.get(this.form),zt.delete(this.form)),this.form=void 0))}setUserInteracted(t,e){e?Tt.add(t):Tt.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(Tt.has(e)),i=Boolean(e.required);e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),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()}},Ot=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(h(c({},Ot),{valid:!1,valueMissing:!0})),Object.freeze(h(c({},Ot),{valid:!1,customError:!0}));var Dt=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 Ft(t,e){const o=c({waitUntilFirstUpdate:!1},e);return(e,i)=>{const{update:s}=e,r=Array.isArray(t)?t:[t];e.update=function(t){r.forEach((e=>{const s=e;if(t.has(s)){const e=t.get(s),r=this[s];e!==r&&(o.waitUntilFirstUpdate&&!this.hasUpdated||this[i](e,r))}})),s.call(this,t)}}}var Rt=k` +`,Et=new WeakMap,St=new WeakMap,zt=new WeakMap,Tt=new WeakSet,Pt=new WeakMap,Lt=class{constructor(t,e){this.handleFormData=t=>{const e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s="sl-button"===this.host.tagName.toLowerCase();this.host.isConnected&&!e&&!s&&"string"==typeof o&&o.length>0&&void 0!==i&&(Array.isArray(i)?i.forEach((e=>{t.formData.append(o,e.toString())})):t.formData.append(o,i.toString()))},this.handleFormSubmit=t=>{var e;const o=this.options.disabled(this.host),i=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(e=Et.get(this.form))||e.forEach((t=>{this.setUserInteracted(t,!0)}))),!this.form||this.form.noValidate||o||i(this.host)||(t.preventDefault(),t.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),Pt.set(this.host,[])},this.handleInteraction=t=>{const e=Pt.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=c({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),Pt.set(this.host,[]),this.options.assumeInteractionOn.forEach((t=>{this.host.addEventListener(t,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),Pt.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,Et.has(this.form)?Et.get(this.form).add(this.host):Et.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),St.has(this.form)||(St.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),zt.has(this.form)||(zt.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const t=Et.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),St.has(this.form)&&(this.form.reportValidity=St.get(this.form),St.delete(this.form)),zt.has(this.form)&&(this.form.checkValidity=zt.get(this.form),zt.delete(this.form)),this.form=void 0))}setUserInteracted(t,e){e?Tt.add(t):Tt.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(Tt.has(e)),i=Boolean(e.required);e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),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()}},Ot=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(h(c({},Ot),{valid:!1,valueMissing:!0})),Object.freeze(h(c({},Ot),{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 Dt(t,e){const o=c({waitUntilFirstUpdate:!1},e);return(e,i)=>{const{update:s}=e,r=Array.isArray(t)?t:[t];e.update=function(t){r.forEach((e=>{const s=e;if(t.has(s)){const e=t.get(s),r=this[s];e!==r&&(o.waitUntilFirstUpdate&&!this.hasUpdated||this[i](e,r))}})),s.call(this,t)}}}var Ft=k` :host { box-sizing: border-box; } @@ -259,22 +260,22 @@ let $t=class extends H{constructor(){super(...arguments),this.renderOptions={hos * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;const Mt={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:B},Bt=(t=Mt,e,o)=>{const{kind:i,metadata:s}=o;let r=globalThis.litPropertyMetadata.get(s);if(void 0===r&&globalThis.litPropertyMetadata.set(s,r=new Map),r.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const s=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,s,t)},init(e){return void 0!==e&&this.C(i,void 0,t),e}}}if("setter"===i){const{name:i}=o;return function(o){const s=this[i];e.call(this,o),this.requestUpdate(i,s,t)}}throw Error("Unsupported decorator location: "+i)};function Nt(t){return(e,o)=>"object"==typeof o?Bt(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o) + */;const Mt={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:B},Bt=(t=Mt,e,o)=>{const{kind:i,metadata:s}=o;let r=globalThis.litPropertyMetadata.get(s);if(void 0===r&&globalThis.litPropertyMetadata.set(s,r=new Map),r.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const s=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,s,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=o;return function(o){const s=this[i];e.call(this,o),this.requestUpdate(i,s,t)}}throw Error("Unsupported decorator location: "+i)};function Nt(t){return(e,o)=>"object"==typeof o?Bt(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,i?{...t,wrapped:!0}:t),i?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})} + */}function Ut(t){return Nt({...t,state:!0,attribute:!1})} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Ut=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o) + */const Ht=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o) /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;function It(t,e){return(o,i,s)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof i?o:s??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return Ut(o,i,{get(){let o=t.call(this);return void 0===o&&(o=r(this),(null!==o||this.hasUpdated)&&e.call(this,o)),o}})}return Ut(o,i,{get(){return r(this)}})}}var Vt=class extends $t{constructor(){super(),Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}emit(t,e){const o=new CustomEvent(t,c({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const i=customElements.get(t);if(!i)return void customElements.define(t,class extends e{},o);let s=" (unknown version)",r=s;"version"in e&&e.version&&(s=" v"+e.version),"version"in i&&i.version&&(r=" v"+i.version),s&&r&&s===r||console.warn(`Attempted to register <${t}>${s}, but <${t}>${r} has already been registered.`)}};Vt.version="2.14.0",Vt.dependencies={},d([Nt()],Vt.prototype,"dir",2),d([Nt()],Vt.prototype,"lang",2); + */;function Vt(t,e){return(o,i,s)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof i?o:s??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return Ht(o,i,{get(){let o=t.call(this);return void 0===o&&(o=r(this),(null!==o||this.hasUpdated)&&e.call(this,o)),o}})}return Ht(o,i,{get(){return r(this)}})}}var It=class extends $t{constructor(){super(),Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}emit(t,e){const o=new CustomEvent(t,c({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const i=customElements.get(t);if(!i)return void customElements.define(t,class extends e{},o);let s=" (unknown version)",r=s;"version"in e&&e.version&&(s=" v"+e.version),"version"in i&&i.version&&(r=" v"+i.version),s&&r&&s===r||console.warn(`Attempted to register <${t}>${s}, but <${t}>${r} has already been registered.`)}};It.version="2.15.0",It.dependencies={},d([Nt()],It.prototype,"dir",2),d([Nt()],It.prototype,"lang",2); /** * @license * Copyright 2017 Google LLC @@ -285,7 +286,7 @@ const Wt=1,jt=3,qt=4,Kt=t=>(...e)=>({_$litDirective$:t,values:e});let Zt=class{c * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Xt=Kt(class extends Zt{constructor(t){if(super(t),t.type!==Wt||"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.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const o=t.element.classList;for(const t of this.it)t in e||(o.remove(t),this.it.delete(t));for(const t in e){const i=!!e[t];i===this.it.has(t)||this.st?.has(t)||(i?(o.add(t),this.it.add(t)):(o.remove(t),this.it.delete(t)))}return at}}),Yt=t=>t??lt + */const Xt=Kt(class extends Zt{constructor(t){if(super(t),t.type!==Wt||"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 i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(o.add(t),this.st.add(t)):(o.remove(t),this.st.delete(t)))}return at}}),Yt=t=>t??lt /** * @license * Copyright 2020 Google LLC @@ -300,7 +301,7 @@ const Wt=1,jt=3,qt=4,Kt=t=>(...e)=>({_$litDirective$:t,values:e});let Zt=class{c * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var Qt=class extends Vt{constructor(){super(...arguments),this.formControlController=new Lt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.hasSlotController=new Dt(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 nt` + */var Qt=class extends It{constructor(){super(...arguments),this.formControlController=new Lt(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 nt`
@@ -346,7 +347,7 @@ const Wt=1,jt=3,qt=4,Kt=t=>(...e)=>({_$litDirective$:t,values:e});let Zt=class{c ${this.helpText}
- `}};Qt.styles=[Rt,Ct,At],d([It('input[type="checkbox"]')],Qt.prototype,"input",2),d([Ht()],Qt.prototype,"hasFocus",2),d([Nt()],Qt.prototype,"title",2),d([Nt()],Qt.prototype,"name",2),d([Nt()],Qt.prototype,"value",2),d([Nt({reflect:!0})],Qt.prototype,"size",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"disabled",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"checked",2),d([((t="value")=>(e,o)=>{const i=e.constructor,s=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(e,r,n){var a;const l=i.getPropertyOptions(t);if(e===("string"==typeof l.attribute?l.attribute:t)){const e=l.converter||M,i=("function"==typeof e?e:null!=(a=null==e?void 0:e.fromAttribute)?a:M.fromAttribute)(n,l.type);this[t]!==i&&(this[o]=i)}s.call(this,e,r,n)}})("checked")],Qt.prototype,"defaultChecked",2),d([Nt({reflect:!0})],Qt.prototype,"form",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"required",2),d([Nt({attribute:"help-text"})],Qt.prototype,"helpText",2),d([Ft("checked",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleCheckedChange",1),d([Ft("disabled",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleDisabledChange",1),Qt.define("sl-switch");var te=k` + `}};Qt.styles=[Ft,Ct,At],d([Vt('input[type="checkbox"]')],Qt.prototype,"input",2),d([Ut()],Qt.prototype,"hasFocus",2),d([Nt()],Qt.prototype,"title",2),d([Nt()],Qt.prototype,"name",2),d([Nt()],Qt.prototype,"value",2),d([Nt({reflect:!0})],Qt.prototype,"size",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"disabled",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"checked",2),d([((t="value")=>(e,o)=>{const i=e.constructor,s=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(e,r,n){var a;const l=i.getPropertyOptions(t);if(e===("string"==typeof l.attribute?l.attribute:t)){const e=l.converter||M,i=("function"==typeof e?e:null!=(a=null==e?void 0:e.fromAttribute)?a:M.fromAttribute)(n,l.type);this[t]!==i&&(this[o]=i)}s.call(this,e,r,n)}})("checked")],Qt.prototype,"defaultChecked",2),d([Nt({reflect:!0})],Qt.prototype,"form",2),d([Nt({type:Boolean,reflect:!0})],Qt.prototype,"required",2),d([Nt({attribute:"help-text"})],Qt.prototype,"helpText",2),d([Dt("checked",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleCheckedChange",1),d([Dt("disabled",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleDisabledChange",1),Qt.define("sl-switch");var te=k` :host { display: inline-block; } @@ -474,15 +475,15 @@ const Wt=1,jt=3,qt=4,Kt=t=>(...e)=>({_$litDirective$:t,values:e});let Zt=class{c height: 100%; width: 100%; } -`,pe=Symbol(),ue=Symbol(),fe=new Map,be=class extends Vt{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let i;if(null==e?void 0:e.spriteSheet)return nt` +`,pe=Symbol(),ue=Symbol(),fe=new Map,me=class extends It{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let i;if(null==e?void 0:e.spriteSheet){this.svg=nt` - `;try{if(i=await fetch(t,{mode:"cors"}),!i.ok)return 410===i.status?pe:ue}catch(t){return ue}try{const t=document.createElement("div");t.innerHTML=await i.text();const e=t.firstElementChild;if("svg"!==(null==(o=null==e?void 0:e.tagName)?void 0:o.toLowerCase()))return pe;he||(he=new DOMParser);const s=he.parseFromString(e.outerHTML,"text/html").body.querySelector("svg");return s?(s.part.add("svg"),document.adoptNode(s)):pe}catch(t){return pe}}connectedCallback(){var t;super.connectedCallback(),t=this,ae.push(t)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,ae=ae.filter((e=>e!==t))}getIconSource(){const t=le(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(),i=o?le(this.library):void 0;if(!e)return void(this.svg=null);let s=fe.get(e);if(s||(s=this.resolveIcon(e,i),fe.set(e,s)),!this.initialRender)return;const r=await s;if(r===ue&&fe.delete(e),e===this.getIconSource().url)if(((t,e)=>void 0===e?void 0!==t?._$litType$:t?._$litType$===e)(r))this.svg=r;else switch(r){case ue:case pe:this.svg=null,this.emit("sl-error");break;default:this.svg=r.cloneNode(!0),null==(t=null==i?void 0:i.mutator)||t.call(i,this.svg),this.emit("sl-load")}}render(){return this.svg}};be.styles=[Rt,de],d([Ht()],be.prototype,"svg",2),d([Nt({reflect:!0})],be.prototype,"name",2),d([Nt()],be.prototype,"src",2),d([Nt()],be.prototype,"label",2),d([Nt({reflect:!0})],be.prototype,"library",2),d([Ft("label")],be.prototype,"handleLabelChange",1),d([Ft(["name","src","library"])],be.prototype,"setIcon",1); + `,await this.updateComplete;const o=this.shadowRoot.querySelector("[part='svg']");return"function"==typeof e.mutator&&e.mutator(o),this.svg}try{if(i=await fetch(t,{mode:"cors"}),!i.ok)return 410===i.status?pe:ue}catch(t){return ue}try{const t=document.createElement("div");t.innerHTML=await i.text();const e=t.firstElementChild;if("svg"!==(null==(o=null==e?void 0:e.tagName)?void 0:o.toLowerCase()))return pe;he||(he=new DOMParser);const s=he.parseFromString(e.outerHTML,"text/html").body.querySelector("svg");return s?(s.part.add("svg"),document.adoptNode(s)):pe}catch(t){return pe}}connectedCallback(){var t;super.connectedCallback(),t=this,ae.push(t)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,ae=ae.filter((e=>e!==t))}getIconSource(){const t=le(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(),i=o?le(this.library):void 0;if(!e)return void(this.svg=null);let s=fe.get(e);if(s||(s=this.resolveIcon(e,i),fe.set(e,s)),!this.initialRender)return;const r=await s;if(r===ue&&fe.delete(e),e===this.getIconSource().url)if(((t,e)=>void 0===e?void 0!==t?._$litType$:t?._$litType$===e)(r))this.svg=r;else switch(r){case ue:case pe:this.svg=null,this.emit("sl-error");break;default:this.svg=r.cloneNode(!0),null==(t=null==i?void 0:i.mutator)||t.call(i,this.svg),this.emit("sl-load")}}render(){return this.svg}};me.styles=[Ft,de],d([Ut()],me.prototype,"svg",2),d([Nt({reflect:!0})],me.prototype,"name",2),d([Nt()],me.prototype,"src",2),d([Nt()],me.prototype,"label",2),d([Nt({reflect:!0})],me.prototype,"library",2),d([Dt("label")],me.prototype,"handleLabelChange",1),d([Dt(["name","src","library"])],me.prototype,"setIcon",1); /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const ge=Symbol.for(""),me=t=>{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)=>({_$litStatic$:e.reduce(((e,o,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[i+1]),t[0]),r:ge}),ye=new Map,we=(t=>(e,...o)=>{const i=o.length;let s,r;const n=[],a=[];let l,c=0,h=!1;for(;c{if(t?.r===be)return t?._$litStatic$},ve=(t,...e)=>({_$litStatic$:e.reduce(((e,o,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[i+1]),t[0]),r:be}),ye=new Map,we=(t=>(e,...o)=>{const i=o.length;let s,r;const n=[],a=[];let l,c=0,h=!1;for(;c{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)= aria-hidden="true" > - `}};_e.styles=[Rt,ee],_e.dependencies={"sl-icon":be},d([It(".icon-button")],_e.prototype,"button",2),d([Ht()],_e.prototype,"hasFocus",2),d([Nt()],_e.prototype,"name",2),d([Nt()],_e.prototype,"library",2),d([Nt()],_e.prototype,"src",2),d([Nt()],_e.prototype,"href",2),d([Nt()],_e.prototype,"target",2),d([Nt()],_e.prototype,"download",2),d([Nt()],_e.prototype,"label",2),d([Nt({type:Boolean,reflect:!0})],_e.prototype,"disabled",2);const xe=new Set,$e=new MutationObserver(ze),ke=new Map;let Ae,Ce=document.documentElement.dir||"ltr",Ee=document.documentElement.lang||navigator.language;function Se(...t){t.map((t=>{const e=t.$code.toLowerCase();ke.has(e)?ke.set(e,Object.assign(Object.assign({},ke.get(e)),t)):ke.set(e,t),Ae||(Ae=t)})),ze()}function ze(){Ce=document.documentElement.dir||"ltr",Ee=document.documentElement.lang||navigator.language,[...xe.keys()].map((t=>{"function"==typeof t.requestUpdate&&t.requestUpdate()}))}$e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});let Te=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){xe.add(this.host)}hostDisconnected(){xe.delete(this.host)}dir(){return`${this.host.dir||Ce}`.toLowerCase()}lang(){return`${this.host.lang||Ee}`.toLowerCase()}getTranslationData(t){var e,o;const i=new Intl.Locale(t.replace(/_/g,"-")),s=null==i?void 0:i.language.toLowerCase(),r=null!==(o=null===(e=null==i?void 0:i.region)||void 0===e?void 0:e.toLowerCase())&&void 0!==o?o:"";return{locale:i,language:s,region:r,primary:ke.get(`${s}-${r}`),secondary:ke.get(s)}}exists(t,e){var o;const{primary:i,secondary:s}=this.getTranslationData(null!==(o=e.lang)&&void 0!==o?o:this.lang());return e=Object.assign({includeFallback:!1},e),!!(i&&i[t]||s&&s[t]||e.includeFallback&&Ae&&Ae[t])}term(t,...e){const{primary:o,secondary:i}=this.getTranslationData(this.lang());let s;if(o&&o[t])s=o[t];else if(i&&i[t])s=i[t];else{if(!Ae||!Ae[t])return console.error(`No translation found for: ${String(t)}`),String(t);s=Ae[t]}return"function"==typeof s?s(...e):s}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 Pe={$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"};Se(Pe);var Le=Pe,Oe=class extends Te{};Se(Le);var De=0,Fe=class extends Vt{constructor(){super(...arguments),this.localize=new Oe(this),this.attrId=++De,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1}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")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){return this.id=this.id.length>0?this.id:this.componentId,nt` + `}};_e.styles=[Ft,ee],_e.dependencies={"sl-icon":me},d([Vt(".icon-button")],_e.prototype,"button",2),d([Ut()],_e.prototype,"hasFocus",2),d([Nt()],_e.prototype,"name",2),d([Nt()],_e.prototype,"library",2),d([Nt()],_e.prototype,"src",2),d([Nt()],_e.prototype,"href",2),d([Nt()],_e.prototype,"target",2),d([Nt()],_e.prototype,"download",2),d([Nt()],_e.prototype,"label",2),d([Nt({type:Boolean,reflect:!0})],_e.prototype,"disabled",2);const xe=new Set,$e=new MutationObserver(ze),ke=new Map;let Ae,Ce=document.documentElement.dir||"ltr",Ee=document.documentElement.lang||navigator.language;function Se(...t){t.map((t=>{const e=t.$code.toLowerCase();ke.has(e)?ke.set(e,Object.assign(Object.assign({},ke.get(e)),t)):ke.set(e,t),Ae||(Ae=t)})),ze()}function ze(){Ce=document.documentElement.dir||"ltr",Ee=document.documentElement.lang||navigator.language,[...xe.keys()].map((t=>{"function"==typeof t.requestUpdate&&t.requestUpdate()}))}$e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});let Te=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){xe.add(this.host)}hostDisconnected(){xe.delete(this.host)}dir(){return`${this.host.dir||Ce}`.toLowerCase()}lang(){return`${this.host.lang||Ee}`.toLowerCase()}getTranslationData(t){var e,o;const i=new Intl.Locale(t.replace(/_/g,"-")),s=null==i?void 0:i.language.toLowerCase(),r=null!==(o=null===(e=null==i?void 0:i.region)||void 0===e?void 0:e.toLowerCase())&&void 0!==o?o:"";return{locale:i,language:s,region:r,primary:ke.get(`${s}-${r}`),secondary:ke.get(s)}}exists(t,e){var o;const{primary:i,secondary:s}=this.getTranslationData(null!==(o=e.lang)&&void 0!==o?o:this.lang());return e=Object.assign({includeFallback:!1},e),!!(i&&i[t]||s&&s[t]||e.includeFallback&&Ae&&Ae[t])}term(t,...e){const{primary:o,secondary:i}=this.getTranslationData(this.lang());let s;if(o&&o[t])s=o[t];else if(i&&i[t])s=i[t];else{if(!Ae||!Ae[t])return console.error(`No translation found for: ${String(t)}`),String(t);s=Ae[t]}return"function"==typeof s?s(...e):s}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 Pe={$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"};Se(Pe);var Le=Pe,Oe=class extends Te{};Se(Le);var Re=0,De=class extends It{constructor(){super(...arguments),this.localize=new Oe(this),this.attrId=++Re,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1}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")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){return this.id=this.id.length>0?this.id:this.componentId,nt`
{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)= > `:""}
- `}};Fe.styles=[Rt,te],Fe.dependencies={"sl-icon-button":_e},d([It(".tab")],Fe.prototype,"tab",2),d([Nt({reflect:!0})],Fe.prototype,"panel",2),d([Nt({type:Boolean,reflect:!0})],Fe.prototype,"active",2),d([Nt({type:Boolean})],Fe.prototype,"closable",2),d([Nt({type:Boolean,reflect:!0})],Fe.prototype,"disabled",2),d([Ft("active")],Fe.prototype,"handleActiveChange",1),d([Ft("disabled")],Fe.prototype,"handleDisabledChange",1),Fe.define("sl-tab");var Re=k` + `}};De.styles=[Ft,te],De.dependencies={"sl-icon-button":_e},d([Vt(".tab")],De.prototype,"tab",2),d([Nt({reflect:!0})],De.prototype,"panel",2),d([Nt({type:Boolean,reflect:!0})],De.prototype,"active",2),d([Nt({type:Boolean})],De.prototype,"closable",2),d([Nt({type:Boolean,reflect:!0})],De.prototype,"disabled",2),d([Dt("active")],De.prototype,"handleActiveChange",1),d([Dt("disabled")],De.prototype,"handleDisabledChange",1),De.define("sl-tab");var Fe=k` :host { --indicator-color: var(--sl-color-primary-600); --track-color: var(--sl-color-neutral-200); @@ -757,7 +758,7 @@ const ge=Symbol.for(""),me=t=>{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)= .tab-group--end ::slotted(sl-tab-panel) { --padding: 0 var(--sl-spacing-medium); } -`;var Me=new Set;function Be(t){if(Me.add(t),!document.body.classList.contains("sl-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}();document.body.classList.add("sl-scroll-lock"),document.body.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function Ne(t){Me.delete(t),0===Me.size&&(document.body.classList.remove("sl-scroll-lock"),document.body.style.removeProperty("--sl-scroll-lock-size"))}function He(t,e,o="vertical",i="smooth"){const s=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),r=s.top+e.scrollTop,n=s.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:i})),"vertical"!==o&&"both"!==o||(rh&&e.scrollTo({top:r-e.offsetHeight+t.clientHeight,behavior:i}))}var Ue=class extends Vt{constructor(){super(...arguments),this.localize=new Oe(this),this.tabs=[],this.panels=[],this.hasScrollControls=!1,this.placement="top",this.activation="auto",this.noScrollControls=!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=>{t.some((t=>!["aria-labelledby","aria-controls"].includes(t.attributeName)))&&setTimeout((()=>this.setAriaLabels())),t.some((t=>"disabled"===t.attributeName))&&this.syncTabsAndPanels()})),this.updateComplete.then((()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,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(){super.disconnectedCallback(),this.mutationObserver.disconnect(),this.resizeObserver.unobserve(this.nav)}getAllTabs(t={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter((e=>t.includeDisabled?"sl-tab"===e.tagName.toLowerCase():"sl-tab"===e.tagName.toLowerCase()&&!e.disabled))}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();if("sl-tab"===(null==e?void 0:e.tagName.toLowerCase())){let i=this.tabs.indexOf(e);"Home"===t.key?i=0:"End"===t.key?i=this.tabs.length-1:["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&"ArrowUp"===t.key?i--:(["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&"ArrowDown"===t.key)&&i++,i<0&&(i=this.tabs.length-1),i>this.tabs.length-1&&(i=0),this.tabs[i].focus({preventScroll:!0}),"auto"===this.activation&&this.setActiveTab(this.tabs[i],{scrollBehavior:"smooth"}),["top","bottom"].includes(this.placement)&&He(this.tabs[i],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=c({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)),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)&&He(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,i="rtl"===this.localize.dir(),s=this.getAllTabs(),r=s.slice(0,s.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=i?-1*r.left+"px":`${r.left}px`;break;case"start":case"end":this.indicator.style.width="auto",this.indicator.style.height=`${o}px`,this.indicator.style.translate=`0 ${r.top}px`}}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then((()=>this.updateScrollControls()))}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth}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 nt` +`;var Me=new Set;function Be(t){if(Me.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}();document.documentElement.classList.add("sl-scroll-lock"),document.documentElement.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function Ne(t){Me.delete(t),0===Me.size&&(document.documentElement.classList.remove("sl-scroll-lock"),document.documentElement.style.removeProperty("--sl-scroll-lock-size"))}function Ue(t,e,o="vertical",i="smooth"){const s=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),r=s.top+e.scrollTop,n=s.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:i})),"vertical"!==o&&"both"!==o||(rh&&e.scrollTo({top:r-e.offsetHeight+t.clientHeight,behavior:i}))}var He=class extends It{constructor(){super(...arguments),this.localize=new Oe(this),this.tabs=[],this.panels=[],this.hasScrollControls=!1,this.placement="top",this.activation="auto",this.noScrollControls=!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=>{t.some((t=>!["aria-labelledby","aria-controls"].includes(t.attributeName)))&&setTimeout((()=>this.setAriaLabels())),t.some((t=>"disabled"===t.attributeName))&&this.syncTabsAndPanels()})),this.updateComplete.then((()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,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(){super.disconnectedCallback(),this.mutationObserver.disconnect(),this.resizeObserver.unobserve(this.nav)}getAllTabs(t={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter((e=>t.includeDisabled?"sl-tab"===e.tagName.toLowerCase():"sl-tab"===e.tagName.toLowerCase()&&!e.disabled))}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();if("sl-tab"===(null==e?void 0:e.tagName.toLowerCase())){let i=this.tabs.indexOf(e);"Home"===t.key?i=0:"End"===t.key?i=this.tabs.length-1:["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&"ArrowUp"===t.key?i--:(["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&"ArrowDown"===t.key)&&i++,i<0&&(i=this.tabs.length-1),i>this.tabs.length-1&&(i=0),this.tabs[i].focus({preventScroll:!0}),"auto"===this.activation&&this.setActiveTab(this.tabs[i],{scrollBehavior:"smooth"}),["top","bottom"].includes(this.placement)&&Ue(this.tabs[i],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=c({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)),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)&&Ue(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,i="rtl"===this.localize.dir(),s=this.getAllTabs(),r=s.slice(0,s.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=i?-1*r.left+"px":`${r.left}px`;break;case"start":case"end":this.indicator.style.width="auto",this.indicator.style.height=`${o}px`,this.indicator.style.translate=`0 ${r.top}px`}}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then((()=>this.updateScrollControls()))}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth+1}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 nt`
{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)=
- `}};Ue.styles=[Rt,Re],Ue.dependencies={"sl-icon-button":_e},d([It(".tab-group")],Ue.prototype,"tabGroup",2),d([It(".tab-group__body")],Ue.prototype,"body",2),d([It(".tab-group__nav")],Ue.prototype,"nav",2),d([It(".tab-group__indicator")],Ue.prototype,"indicator",2),d([Ht()],Ue.prototype,"hasScrollControls",2),d([Nt()],Ue.prototype,"placement",2),d([Nt()],Ue.prototype,"activation",2),d([Nt({attribute:"no-scroll-controls",type:Boolean})],Ue.prototype,"noScrollControls",2),d([Ft("noScrollControls",{waitUntilFirstUpdate:!0})],Ue.prototype,"updateScrollControls",1),d([Ft("placement",{waitUntilFirstUpdate:!0})],Ue.prototype,"syncIndicator",1),Ue.define("sl-tab-group");var Ie=k` + `}};He.styles=[Ft,Fe],He.dependencies={"sl-icon-button":_e},d([Vt(".tab-group")],He.prototype,"tabGroup",2),d([Vt(".tab-group__body")],He.prototype,"body",2),d([Vt(".tab-group__nav")],He.prototype,"nav",2),d([Vt(".tab-group__indicator")],He.prototype,"indicator",2),d([Ut()],He.prototype,"hasScrollControls",2),d([Nt()],He.prototype,"placement",2),d([Nt()],He.prototype,"activation",2),d([Nt({attribute:"no-scroll-controls",type:Boolean})],He.prototype,"noScrollControls",2),d([Dt("noScrollControls",{waitUntilFirstUpdate:!0})],He.prototype,"updateScrollControls",1),d([Dt("placement",{waitUntilFirstUpdate:!0})],He.prototype,"syncIndicator",1),He.define("sl-tab-group");var Ve=k` :host { --padding: 0; @@ -814,12 +815,12 @@ const ge=Symbol.for(""),me=t=>{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)= display: block; padding: var(--padding); } -`,Ve=0,We=class extends Vt{constructor(){super(...arguments),this.attrId=++Ve,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 nt` +`,Ie=0,We=class extends It{constructor(){super(...arguments),this.attrId=++Ie,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 nt` - `}};We.styles=[Rt,Ie],d([Nt({reflect:!0})],We.prototype,"name",2),d([Nt({type:Boolean,reflect:!0})],We.prototype,"active",2),d([Ft("active")],We.prototype,"handleActiveChange",1),We.define("sl-tab-panel");var je=k` + `}};We.styles=[Ft,Ve],d([Nt({reflect:!0})],We.prototype,"name",2),d([Nt({type:Boolean,reflect:!0})],We.prototype,"active",2),d([Dt("active")],We.prototype,"handleActiveChange",1),We.define("sl-tab-panel");var je=k` :host { --max-width: 20rem; --hide-delay: 0ms; @@ -927,7 +928,7 @@ const ge=Symbol.for(""),me=t=>{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)= var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0) ); } -`;const Ke=Math.min,Ze=Math.max,Xe=Math.round,Ye=Math.floor,Ge=t=>({x:t,y:t}),Je={left:"right",right:"left",bottom:"top",top:"bottom"},Qe={start:"end",end:"start"};function to(t,e,o){return Ze(t,Ke(e,o))}function eo(t,e){return"function"==typeof t?t(e):t}function oo(t){return t.split("-")[0]}function io(t){return t.split("-")[1]}function so(t){return"x"===t?"y":"x"}function ro(t){return"y"===t?"height":"width"}function no(t){return["top","bottom"].includes(oo(t))?"y":"x"}function ao(t){return so(no(t))}function lo(t){return t.replace(/start|end/g,(t=>Qe[t]))}function co(t){return t.replace(/left|right|bottom|top/g,(t=>Je[t]))}function ho(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 po(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function uo(t,e,o){let{reference:i,floating:s}=t;const r=no(e),n=ao(e),a=ro(n),l=oo(e),c="y"===r,h=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,p=i[a]/2-s[a]/2;let u;switch(l){case"top":u={x:h,y:i.y-s.height};break;case"bottom":u={x:h,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:d};break;case"left":u={x:i.x-s.width,y:d};break;default:u={x:i.x,y:i.y}}switch(io(e)){case"start":u[n]-=p*(o&&c?-1:1);break;case"end":u[n]+=p*(o&&c?-1:1)}return u}async function fo(t,e){var o;void 0===e&&(e={});const{x:i,y:s,platform:r,rects:n,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=eo(e,t),f=ho(u),b=a[p?"floating"===d?"reference":"floating":d],g=po(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(b)))||o?b:b.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),m="floating"===d?{...n.floating,x:i,y:s}:n.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),y=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},w=po(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-w.top+f.top)/y.y,bottom:(w.bottom-g.bottom+f.bottom)/y.y,left:(g.left-w.left+f.left)/y.x,right:(w.right-g.right+f.right)/y.x}}const bo=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var o,i;const{x:s,y:r,placement:n,middlewareData:a}=e,l=await async function(t,e){const{placement:o,platform:i,elements:s}=t,r=await(null==i.isRTL?void 0:i.isRTL(s.floating)),n=oo(o),a=io(o),l="y"===no(o),c=["left","top"].includes(n)?-1:1,h=r&&l?-1:1,d=eo(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof f&&(u="end"===a?-1*f:f),l?{x:u*h,y:p*c}:{x:p*c,y:u*h}}(e,t);return n===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:n}}}}};function go(t){return yo(t)?(t.nodeName||"").toLowerCase():"#document"}function mo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function vo(t){var e;return null==(e=(yo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function yo(t){return t instanceof Node||t instanceof mo(t).Node}function wo(t){return t instanceof Element||t instanceof mo(t).Element}function _o(t){return t instanceof HTMLElement||t instanceof mo(t).HTMLElement}function xo(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof mo(t).ShadowRoot)}function $o(t){const{overflow:e,overflowX:o,overflowY:i,display:s}=So(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(s)}function ko(t){return["table","td","th"].includes(go(t))}function Ao(t){const e=Co(),o=So(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function Co(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Eo(t){return["html","body","#document"].includes(go(t))}function So(t){return mo(t).getComputedStyle(t)}function zo(t){return wo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function To(t){if("html"===go(t))return t;const e=t.assignedSlot||t.parentNode||xo(t)&&t.host||vo(t);return xo(e)?e.host:e}function Po(t){const e=To(t);return Eo(e)?t.ownerDocument?t.ownerDocument.body:t.body:_o(e)&&$o(e)?e:Po(e)}function Lo(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const s=Po(t),r=s===(null==(i=t.ownerDocument)?void 0:i.body),n=mo(s);return r?e.concat(n,n.visualViewport||[],$o(s)?s:[],n.frameElement&&o?Lo(n.frameElement):[]):e.concat(s,Lo(s,[],o))}function Oo(t){const e=So(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=_o(t),r=s?t.offsetWidth:o,n=s?t.offsetHeight:i,a=Xe(o)!==r||Xe(i)!==n;return a&&(o=r,i=n),{width:o,height:i,$:a}}function Do(t){return wo(t)?t:t.contextElement}function Fo(t){const e=Do(t);if(!_o(e))return Ge(1);const o=e.getBoundingClientRect(),{width:i,height:s,$:r}=Oo(e);let n=(r?Xe(o.width):o.width)/i,a=(r?Xe(o.height):o.height)/s;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const Ro=Ge(0);function Mo(t){const e=mo(t);return Co()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Ro}function Bo(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const s=t.getBoundingClientRect(),r=Do(t);let n=Ge(1);e&&(i?wo(i)&&(n=Fo(i)):n=Fo(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==mo(t))&&e}(r,o,i)?Mo(r):Ge(0);let l=(s.left+a.x)/n.x,c=(s.top+a.y)/n.y,h=s.width/n.x,d=s.height/n.y;if(r){const t=mo(r),e=i&&wo(i)?mo(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=Fo(o),e=o.getBoundingClientRect(),i=So(o),s=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,r=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,d*=t.y,l+=s,c+=r,o=mo(o).frameElement}}return po({width:h,height:d,x:l,y:c})}function No(t){return Bo(vo(t)).left+zo(t).scrollLeft}function Ho(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=mo(t),i=vo(t),s=o.visualViewport;let r=i.clientWidth,n=i.clientHeight,a=0,l=0;if(s){r=s.width,n=s.height;const t=Co();(!t||t&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:n,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=vo(t),o=zo(t),i=t.ownerDocument.body,s=Ze(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=Ze(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let n=-o.scrollLeft+No(t);const a=-o.scrollTop;return"rtl"===So(i).direction&&(n+=Ze(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:n,y:a}}(vo(t));else if(wo(e))i=function(t,e){const o=Bo(t,!0,"fixed"===e),i=o.top+t.clientTop,s=o.left+t.clientLeft,r=_o(t)?Fo(t):Ge(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:s*r.x,y:i*r.y}}(e,o);else{const o=Mo(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return po(i)}function Uo(t,e){const o=To(t);return!(o===e||!wo(o)||Eo(o))&&("fixed"===So(o).position||Uo(o,e))}function Io(t,e,o){const i=_o(e),s=vo(e),r="fixed"===o,n=Bo(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=Ge(0);if(i||!i&&!r)if(("body"!==go(e)||$o(s))&&(a=zo(e)),i){const t=Bo(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else s&&(l.x=No(s));return{x:n.left+a.scrollLeft-l.x,y:n.top+a.scrollTop-l.y,width:n.width,height:n.height}}function Vo(t,e){return _o(t)&&"fixed"!==So(t).position?e?e(t):t.offsetParent:null}function Wo(t,e){const o=mo(t);if(!_o(t))return o;let i=Vo(t,e);for(;i&&ko(i)&&"static"===So(i).position;)i=Vo(i,e);return i&&("html"===go(i)||"body"===go(i)&&"static"===So(i).position&&!Ao(i))?o:i||function(t){let e=To(t);for(;_o(e)&&!Eo(e);){if(Ao(e))return e;e=To(e)}return null}(t)||o}const jo={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const s=_o(o),r=vo(o);if(o===r)return e;let n={scrollLeft:0,scrollTop:0},a=Ge(1);const l=Ge(0);if((s||!s&&"fixed"!==i)&&(("body"!==go(o)||$o(r))&&(n=zo(o)),_o(o))){const t=Bo(o);a=Fo(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-n.scrollLeft*a.x+l.x,y:e.y*a.y-n.scrollTop*a.y+l.y}},getDocumentElement:vo,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:s}=t;const r=[..."clippingAncestors"===o?function(t,e){const o=e.get(t);if(o)return o;let i=Lo(t,[],!1).filter((t=>wo(t)&&"body"!==go(t))),s=null;const r="fixed"===So(t).position;let n=r?To(t):t;for(;wo(n)&&!Eo(n);){const e=So(n),o=Ao(n);o||"fixed"!==e.position||(s=null),(r?!o&&!s:!o&&"static"===e.position&&s&&["absolute","fixed"].includes(s.position)||$o(n)&&!o&&Uo(t,n))?i=i.filter((t=>t!==n)):s=e,n=To(n)}return e.set(t,i),i}(e,this._c):[].concat(o),i],n=r[0],a=r.reduce(((t,o)=>{const i=Ho(e,o,s);return t.top=Ze(i.top,t.top),t.right=Ke(i.right,t.right),t.bottom=Ke(i.bottom,t.bottom),t.left=Ze(i.left,t.left),t}),Ho(e,n,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Wo,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const s=this.getOffsetParent||Wo,r=this.getDimensions;return{reference:Io(e,await s(o),i),floating:{x:0,y:0,...await r(o)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=Oo(t);return{width:e,height:o}},getScale:Fo,isElement:wo,isRTL:function(t){return"rtl"===So(t).direction}};function qo(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Do(t),h=s||r?[...c?Lo(c):[],...Lo(e)]:[];h.forEach((t=>{s&&t.addEventListener("scroll",o,{passive:!0}),r&&t.addEventListener("resize",o)}));const d=c&&a?function(t,e){let o,i=null;const s=vo(t);function r(){clearTimeout(o),i&&i.disconnect(),i=null}return function n(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const{left:c,top:h,width:d,height:p}=t.getBoundingClientRect();if(a||e(),!d||!p)return;const u={rootMargin:-Ye(h)+"px "+-Ye(s.clientWidth-(c+d))+"px "+-Ye(s.clientHeight-(h+p))+"px "+-Ye(c)+"px",threshold:Ze(0,Ke(1,l))||1};let f=!0;function b(t){const e=t[0].intersectionRatio;if(e!==l){if(!f)return n();e?n(!1,e):o=setTimeout((()=>{n(!1,1e-7)}),100)}f=!1}try{i=new IntersectionObserver(b,{...u,root:s.ownerDocument})}catch(t){i=new IntersectionObserver(b,u)}i.observe(t)}(!0),r}(c,o):null;let p,u=-1,f=null;n&&(f=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{f&&f.observe(e)}))),o()})),c&&!l&&f.observe(c),f.observe(e));let b=l?Bo(t):null;return l&&function e(){const i=Bo(t);!b||i.x===b.x&&i.y===b.y&&i.width===b.width&&i.height===b.height||o();b=i,p=requestAnimationFrame(e)}(),o(),()=>{h.forEach((t=>{s&&t.removeEventListener("scroll",o),r&&t.removeEventListener("resize",o)})),d&&d(),f&&f.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Ko=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:n=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=eo(t,e),c={x:o,y:i},h=await fo(e,l),d=no(oo(s)),p=so(d);let u=c[p],f=c[d];if(r){const t="y"===p?"bottom":"right";u=to(u+h["y"===p?"top":"left"],u,u-h[t])}if(n){const t="y"===d?"bottom":"right";f=to(f+h["y"===d?"top":"left"],f,f-h[t])}const b=a.fn({...e,[p]:u,[d]:f});return{...b,data:{x:b.x-o,y:b.y-i}}}}},Zo=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:s,middlewareData:r,rects:n,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:b=!0,...g}=eo(t,e);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const m=oo(s),v=oo(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(v||!b?[co(a)]:function(t){const e=co(t);return[lo(t),e,lo(e)]}(a));p||"none"===f||w.push(...function(t,e,o,i){const s=io(t);let r=function(t,e,o){const i=["left","right"],s=["right","left"],r=["top","bottom"],n=["bottom","top"];switch(t){case"top":case"bottom":return o?e?s:i:e?i:s;case"left":case"right":return e?r:n;default:return[]}}(oo(t),"start"===o,i);return s&&(r=r.map((t=>t+"-"+s)),e&&(r=r.concat(r.map(lo)))),r}(a,b,f,y));const _=[a,...w],x=await fo(e,g),$=[];let k=(null==(i=r.flip)?void 0:i.overflows)||[];if(h&&$.push(x[m]),d){const t=function(t,e,o){void 0===o&&(o=!1);const i=io(t),s=ao(t),r=ro(s);let n="x"===s?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(n=co(n)),[n,co(n)]}(s,n,y);$.push(x[t[0]],x[t[1]])}if(k=[...k,{placement:s,overflows:$}],!$.every((t=>t<=0))){var A,C;const t=((null==(A=r.flip)?void 0:A.index)||0)+1,e=_[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let o=null==(C=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!o)switch(u){case"bestFit":{var E;const t=null==(E=k.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:E[0];t&&(o=t);break}case"initialPlacement":o=a}if(s!==o)return{reset:{placement:o}}}return{}}}},Xo=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:i,platform:s,elements:r}=e,{apply:n=(()=>{}),...a}=eo(t,e),l=await fo(e,a),c=oo(o),h=io(o),d="y"===no(o),{width:p,height:u}=i.floating;let f,b;"top"===c||"bottom"===c?(f=c,b=h===(await(null==s.isRTL?void 0:s.isRTL(r.floating))?"start":"end")?"left":"right"):(b=c,f="end"===h?"top":"bottom");const g=u-l[f],m=p-l[b],v=!e.middlewareData.shift;let y=g,w=m;if(d){const t=p-l.left-l.right;w=h||v?Ke(m,t):t}else{const t=u-l.top-l.bottom;y=h||v?Ke(g,t):t}if(v&&!h){const t=Ze(l.left,0),e=Ze(l.right,0),o=Ze(l.top,0),i=Ze(l.bottom,0);d?w=p-2*(0!==t||0!==e?t+e:Ze(l.left,l.right)):y=u-2*(0!==o||0!==i?o+i:Ze(l.top,l.bottom))}await n({...e,availableWidth:w,availableHeight:y});const _=await s.getDimensions(r.floating);return p!==_.width||u!==_.height?{reset:{rects:!0}}:{}}}},Yo=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:s,rects:r,platform:n,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=eo(t,e)||{};if(null==c)return{};const d=ho(h),p={x:o,y:i},u=ao(s),f=ro(u),b=await n.getDimensions(c),g="y"===u,m=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=r.reference[f]+r.reference[u]-p[u]-r.floating[f],_=p[u]-r.reference[u],x=await(null==n.getOffsetParent?void 0:n.getOffsetParent(c));let $=x?x[y]:0;$&&await(null==n.isElement?void 0:n.isElement(x))||($=a.floating[y]||r.floating[f]);const k=w/2-_/2,A=$/2-b[f]/2-1,C=Ke(d[m],A),E=Ke(d[v],A),S=C,z=$-b[f]-E,T=$/2-b[f]/2+k,P=to(S,T,z),L=!l.arrow&&null!=io(s)&&T!=P&&r.reference[f]/2-(T{const i=new Map,s={platform:jo,...o},r={...s.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:n}=o,a=r.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(e));let c=await n.getElementRects({reference:t,floating:e,strategy:s}),{x:h,y:d}=uo(c,i,l),p=i,u={},f=0;for(let o=0;o{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let o=0,i=0,s=0,r=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=[bo({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Xo({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(Zo({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Ko({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Xo({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(Yo({element:this.arrowEl,padding:this.arrowPadding}));const e="absolute"===this.strategy?t=>jo.getOffsetParent(t,Jo):jo.getOffsetParent;Go(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:h(c({},jo),{getOffsetParent:e})}).then((({x:t,y:e,middlewareData:o,placement:i})=>{const s="rtl"===getComputedStyle(this).direction,r={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=o.arrow.x,e=o.arrow.y;let i="",n="",a="",l="";if("start"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",n=s?o:"",l=s?"":o}else if("end"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n=s?"":o,l=s?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))":"",i="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",i="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:i,right:n,bottom:a,left:l,[r]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return nt` +`;const Ke=Math.min,Ze=Math.max,Xe=Math.round,Ye=Math.floor,Ge=t=>({x:t,y:t}),Je={left:"right",right:"left",bottom:"top",top:"bottom"},Qe={start:"end",end:"start"};function to(t,e,o){return Ze(t,Ke(e,o))}function eo(t,e){return"function"==typeof t?t(e):t}function oo(t){return t.split("-")[0]}function io(t){return t.split("-")[1]}function so(t){return"x"===t?"y":"x"}function ro(t){return"y"===t?"height":"width"}function no(t){return["top","bottom"].includes(oo(t))?"y":"x"}function ao(t){return so(no(t))}function lo(t){return t.replace(/start|end/g,(t=>Qe[t]))}function co(t){return t.replace(/left|right|bottom|top/g,(t=>Je[t]))}function ho(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 po(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function uo(t,e,o){let{reference:i,floating:s}=t;const r=no(e),n=ao(e),a=ro(n),l=oo(e),c="y"===r,h=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,p=i[a]/2-s[a]/2;let u;switch(l){case"top":u={x:h,y:i.y-s.height};break;case"bottom":u={x:h,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:d};break;case"left":u={x:i.x-s.width,y:d};break;default:u={x:i.x,y:i.y}}switch(io(e)){case"start":u[n]-=p*(o&&c?-1:1);break;case"end":u[n]+=p*(o&&c?-1:1)}return u}async function fo(t,e){var o;void 0===e&&(e={});const{x:i,y:s,platform:r,rects:n,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=eo(e,t),f=ho(u),m=a[p?"floating"===d?"reference":"floating":d],b=po(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(m)))||o?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),g="floating"===d?{...n.floating,x:i,y:s}:n.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),y=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},w=po(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:v,strategy:l}):g);return{top:(b.top-w.top+f.top)/y.y,bottom:(w.bottom-b.bottom+f.bottom)/y.y,left:(b.left-w.left+f.left)/y.x,right:(w.right-b.right+f.right)/y.x}}const mo=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var o,i;const{x:s,y:r,placement:n,middlewareData:a}=e,l=await async function(t,e){const{placement:o,platform:i,elements:s}=t,r=await(null==i.isRTL?void 0:i.isRTL(s.floating)),n=oo(o),a=io(o),l="y"===no(o),c=["left","top"].includes(n)?-1:1,h=r&&l?-1:1,d=eo(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof f&&(u="end"===a?-1*f:f),l?{x:u*h,y:p*c}:{x:p*c,y:u*h}}(e,t);return n===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:n}}}}};function bo(t){return yo(t)?(t.nodeName||"").toLowerCase():"#document"}function go(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function vo(t){var e;return null==(e=(yo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function yo(t){return t instanceof Node||t instanceof go(t).Node}function wo(t){return t instanceof Element||t instanceof go(t).Element}function _o(t){return t instanceof HTMLElement||t instanceof go(t).HTMLElement}function xo(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof go(t).ShadowRoot)}function $o(t){const{overflow:e,overflowX:o,overflowY:i,display:s}=So(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(s)}function ko(t){return["table","td","th"].includes(bo(t))}function Ao(t){const e=Co(),o=So(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function Co(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Eo(t){return["html","body","#document"].includes(bo(t))}function So(t){return go(t).getComputedStyle(t)}function zo(t){return wo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function To(t){if("html"===bo(t))return t;const e=t.assignedSlot||t.parentNode||xo(t)&&t.host||vo(t);return xo(e)?e.host:e}function Po(t){const e=To(t);return Eo(e)?t.ownerDocument?t.ownerDocument.body:t.body:_o(e)&&$o(e)?e:Po(e)}function Lo(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const s=Po(t),r=s===(null==(i=t.ownerDocument)?void 0:i.body),n=go(s);return r?e.concat(n,n.visualViewport||[],$o(s)?s:[],n.frameElement&&o?Lo(n.frameElement):[]):e.concat(s,Lo(s,[],o))}function Oo(t){const e=So(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=_o(t),r=s?t.offsetWidth:o,n=s?t.offsetHeight:i,a=Xe(o)!==r||Xe(i)!==n;return a&&(o=r,i=n),{width:o,height:i,$:a}}function Ro(t){return wo(t)?t:t.contextElement}function Do(t){const e=Ro(t);if(!_o(e))return Ge(1);const o=e.getBoundingClientRect(),{width:i,height:s,$:r}=Oo(e);let n=(r?Xe(o.width):o.width)/i,a=(r?Xe(o.height):o.height)/s;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const Fo=Ge(0);function Mo(t){const e=go(t);return Co()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Fo}function Bo(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const s=t.getBoundingClientRect(),r=Ro(t);let n=Ge(1);e&&(i?wo(i)&&(n=Do(i)):n=Do(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==go(t))&&e}(r,o,i)?Mo(r):Ge(0);let l=(s.left+a.x)/n.x,c=(s.top+a.y)/n.y,h=s.width/n.x,d=s.height/n.y;if(r){const t=go(r),e=i&&wo(i)?go(i):i;let o=t,s=o.frameElement;for(;s&&i&&e!==o;){const t=Do(s),e=s.getBoundingClientRect(),i=So(s),r=e.left+(s.clientLeft+parseFloat(i.paddingLeft))*t.x,n=e.top+(s.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,d*=t.y,l+=r,c+=n,o=go(s),s=o.frameElement}}return po({width:h,height:d,x:l,y:c})}const No=[":popover-open",":modal"];function Uo(t){return No.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function Ho(t){return Bo(vo(t)).left+zo(t).scrollLeft}function Vo(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=go(t),i=vo(t),s=o.visualViewport;let r=i.clientWidth,n=i.clientHeight,a=0,l=0;if(s){r=s.width,n=s.height;const t=Co();(!t||t&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:n,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=vo(t),o=zo(t),i=t.ownerDocument.body,s=Ze(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=Ze(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let n=-o.scrollLeft+Ho(t);const a=-o.scrollTop;return"rtl"===So(i).direction&&(n+=Ze(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:n,y:a}}(vo(t));else if(wo(e))i=function(t,e){const o=Bo(t,!0,"fixed"===e),i=o.top+t.clientTop,s=o.left+t.clientLeft,r=_o(t)?Do(t):Ge(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:s*r.x,y:i*r.y}}(e,o);else{const o=Mo(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return po(i)}function Io(t,e){const o=To(t);return!(o===e||!wo(o)||Eo(o))&&("fixed"===So(o).position||Io(o,e))}function Wo(t,e,o){const i=_o(e),s=vo(e),r="fixed"===o,n=Bo(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=Ge(0);if(i||!i&&!r)if(("body"!==bo(e)||$o(s))&&(a=zo(e)),i){const t=Bo(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else s&&(l.x=Ho(s));return{x:n.left+a.scrollLeft-l.x,y:n.top+a.scrollTop-l.y,width:n.width,height:n.height}}function jo(t,e){return _o(t)&&"fixed"!==So(t).position?e?e(t):t.offsetParent:null}function qo(t,e){const o=go(t);if(!_o(t)||Uo(t))return o;let i=jo(t,e);for(;i&&ko(i)&&"static"===So(i).position;)i=jo(i,e);return i&&("html"===bo(i)||"body"===bo(i)&&"static"===So(i).position&&!Ao(i))?o:i||function(t){let e=To(t);for(;_o(e)&&!Eo(e);){if(Ao(e))return e;e=To(e)}return null}(t)||o}const Ko={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:o,offsetParent:i,strategy:s}=t;const r="fixed"===s,n=vo(i),a=!!e&&Uo(e.floating);if(i===n||a&&r)return o;let l={scrollLeft:0,scrollTop:0},c=Ge(1);const h=Ge(0),d=_o(i);if((d||!d&&!r)&&(("body"!==bo(i)||$o(n))&&(l=zo(i)),_o(i))){const t=Bo(i);c=Do(i),h.x=t.x+i.clientLeft,h.y=t.y+i.clientTop}return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+h.x,y:o.y*c.y-l.scrollTop*c.y+h.y}},getDocumentElement:vo,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:s}=t;const r=[..."clippingAncestors"===o?function(t,e){const o=e.get(t);if(o)return o;let i=Lo(t,[],!1).filter((t=>wo(t)&&"body"!==bo(t))),s=null;const r="fixed"===So(t).position;let n=r?To(t):t;for(;wo(n)&&!Eo(n);){const e=So(n),o=Ao(n);o||"fixed"!==e.position||(s=null),(r?!o&&!s:!o&&"static"===e.position&&s&&["absolute","fixed"].includes(s.position)||$o(n)&&!o&&Io(t,n))?i=i.filter((t=>t!==n)):s=e,n=To(n)}return e.set(t,i),i}(e,this._c):[].concat(o),i],n=r[0],a=r.reduce(((t,o)=>{const i=Vo(e,o,s);return t.top=Ze(i.top,t.top),t.right=Ke(i.right,t.right),t.bottom=Ke(i.bottom,t.bottom),t.left=Ze(i.left,t.left),t}),Vo(e,n,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:qo,getElementRects:async function(t){const e=this.getOffsetParent||qo,o=this.getDimensions;return{reference:Wo(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await o(t.floating)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=Oo(t);return{width:e,height:o}},getScale:Do,isElement:wo,isRTL:function(t){return"rtl"===So(t).direction}};function Zo(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Ro(t),h=s||r?[...c?Lo(c):[],...Lo(e)]:[];h.forEach((t=>{s&&t.addEventListener("scroll",o,{passive:!0}),r&&t.addEventListener("resize",o)}));const d=c&&a?function(t,e){let o,i=null;const s=vo(t);function r(){var t;clearTimeout(o),null==(t=i)||t.disconnect(),i=null}return function n(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const{left:c,top:h,width:d,height:p}=t.getBoundingClientRect();if(a||e(),!d||!p)return;const u={rootMargin:-Ye(h)+"px "+-Ye(s.clientWidth-(c+d))+"px "+-Ye(s.clientHeight-(h+p))+"px "+-Ye(c)+"px",threshold:Ze(0,Ke(1,l))||1};let f=!0;function m(t){const e=t[0].intersectionRatio;if(e!==l){if(!f)return n();e?n(!1,e):o=setTimeout((()=>{n(!1,1e-7)}),100)}f=!1}try{i=new IntersectionObserver(m,{...u,root:s.ownerDocument})}catch(t){i=new IntersectionObserver(m,u)}i.observe(t)}(!0),r}(c,o):null;let p,u=-1,f=null;n&&(f=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{var t;null==(t=f)||t.observe(e)}))),o()})),c&&!l&&f.observe(c),f.observe(e));let m=l?Bo(t):null;return l&&function e(){const i=Bo(t);!m||i.x===m.x&&i.y===m.y&&i.width===m.width&&i.height===m.height||o();m=i,p=requestAnimationFrame(e)}(),o(),()=>{var t;h.forEach((t=>{s&&t.removeEventListener("scroll",o),r&&t.removeEventListener("resize",o)})),null==d||d(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Xo=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:n=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=eo(t,e),c={x:o,y:i},h=await fo(e,l),d=no(oo(s)),p=so(d);let u=c[p],f=c[d];if(r){const t="y"===p?"bottom":"right";u=to(u+h["y"===p?"top":"left"],u,u-h[t])}if(n){const t="y"===d?"bottom":"right";f=to(f+h["y"===d?"top":"left"],f,f-h[t])}const m=a.fn({...e,[p]:u,[d]:f});return{...m,data:{x:m.x-o,y:m.y-i}}}}},Yo=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:s,middlewareData:r,rects:n,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...b}=eo(t,e);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const g=oo(s),v=oo(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(v||!m?[co(a)]:function(t){const e=co(t);return[lo(t),e,lo(e)]}(a));p||"none"===f||w.push(...function(t,e,o,i){const s=io(t);let r=function(t,e,o){const i=["left","right"],s=["right","left"],r=["top","bottom"],n=["bottom","top"];switch(t){case"top":case"bottom":return o?e?s:i:e?i:s;case"left":case"right":return e?r:n;default:return[]}}(oo(t),"start"===o,i);return s&&(r=r.map((t=>t+"-"+s)),e&&(r=r.concat(r.map(lo)))),r}(a,m,f,y));const _=[a,...w],x=await fo(e,b),$=[];let k=(null==(i=r.flip)?void 0:i.overflows)||[];if(h&&$.push(x[g]),d){const t=function(t,e,o){void 0===o&&(o=!1);const i=io(t),s=ao(t),r=ro(s);let n="x"===s?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(n=co(n)),[n,co(n)]}(s,n,y);$.push(x[t[0]],x[t[1]])}if(k=[...k,{placement:s,overflows:$}],!$.every((t=>t<=0))){var A,C;const t=((null==(A=r.flip)?void 0:A.index)||0)+1,e=_[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let o=null==(C=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!o)switch(u){case"bestFit":{var E;const t=null==(E=k.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:E[0];t&&(o=t);break}case"initialPlacement":o=a}if(s!==o)return{reset:{placement:o}}}return{}}}},Go=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:i,platform:s,elements:r}=e,{apply:n=(()=>{}),...a}=eo(t,e),l=await fo(e,a),c=oo(o),h=io(o),d="y"===no(o),{width:p,height:u}=i.floating;let f,m;"top"===c||"bottom"===c?(f=c,m=h===(await(null==s.isRTL?void 0:s.isRTL(r.floating))?"start":"end")?"left":"right"):(m=c,f="end"===h?"top":"bottom");const b=u-l[f],g=p-l[m],v=!e.middlewareData.shift;let y=b,w=g;if(d){const t=p-l.left-l.right;w=h||v?Ke(g,t):t}else{const t=u-l.top-l.bottom;y=h||v?Ke(b,t):t}if(v&&!h){const t=Ze(l.left,0),e=Ze(l.right,0),o=Ze(l.top,0),i=Ze(l.bottom,0);d?w=p-2*(0!==t||0!==e?t+e:Ze(l.left,l.right)):y=u-2*(0!==o||0!==i?o+i:Ze(l.top,l.bottom))}await n({...e,availableWidth:w,availableHeight:y});const _=await s.getDimensions(r.floating);return p!==_.width||u!==_.height?{reset:{rects:!0}}:{}}}},Jo=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:s,rects:r,platform:n,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=eo(t,e)||{};if(null==c)return{};const d=ho(h),p={x:o,y:i},u=ao(s),f=ro(u),m=await n.getDimensions(c),b="y"===u,g=b?"top":"left",v=b?"bottom":"right",y=b?"clientHeight":"clientWidth",w=r.reference[f]+r.reference[u]-p[u]-r.floating[f],_=p[u]-r.reference[u],x=await(null==n.getOffsetParent?void 0:n.getOffsetParent(c));let $=x?x[y]:0;$&&await(null==n.isElement?void 0:n.isElement(x))||($=a.floating[y]||r.floating[f]);const k=w/2-_/2,A=$/2-m[f]/2-1,C=Ke(d[g],A),E=Ke(d[v],A),S=C,z=$-m[f]-E,T=$/2-m[f]/2+k,P=to(S,T,z),L=!l.arrow&&null!=io(s)&&T!==P&&r.reference[f]/2-(T{const i=new Map,s={platform:Ko,...o},r={...s.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:n}=o,a=r.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(e));let c=await n.getElementRects({reference:t,floating:e,strategy:s}),{x:h,y:d}=uo(c,i,l),p=i,u={},f=0;for(let o=0;o{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let o=0,i=0,s=0,r=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=[mo({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Go({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(Yo({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Xo({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Go({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(Jo({element:this.arrowEl,padding:this.arrowPadding}));const e="absolute"===this.strategy?t=>Ko.getOffsetParent(t,ti):Ko.getOffsetParent;Qo(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:h(c({},Ko),{getOffsetParent:e})}).then((({x:t,y:e,middlewareData:o,placement:i})=>{const s="rtl"===getComputedStyle(this).direction,r={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=o.arrow.x,e=o.arrow.y;let i="",n="",a="",l="";if("start"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",n=s?o:"",l=s?"":o}else if("end"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n=s?"":o,l=s?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))":"",i="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",i="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:i,right:n,bottom:a,left:l,[r]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return nt` {if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)= ${this.arrow?nt``:""} - `}};function ei(t,e){return new Promise((o=>{t.addEventListener(e,(function i(s){s.target===t&&(t.removeEventListener(e,i),o())}))}))}function oi(t,e,o){return new Promise((i=>{if((null==o?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const s=t.animate(e,h(c({},o),{duration:si()?0:o.duration}));s.addEventListener("cancel",i,{once:!0}),s.addEventListener("finish",i,{once:!0})}))}function ii(t){return(t=t.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?1e3*parseFloat(t):parseFloat(t)}function si(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ri(t){return Promise.all(t.getAnimations().map((t=>new Promise((e=>{t.cancel(),requestAnimationFrame(e)})))))}ti.styles=[Rt,qe],d([It(".popup")],ti.prototype,"popup",2),d([It(".popup__arrow")],ti.prototype,"arrowEl",2),d([Nt()],ti.prototype,"anchor",2),d([Nt({type:Boolean,reflect:!0})],ti.prototype,"active",2),d([Nt({reflect:!0})],ti.prototype,"placement",2),d([Nt({reflect:!0})],ti.prototype,"strategy",2),d([Nt({type:Number})],ti.prototype,"distance",2),d([Nt({type:Number})],ti.prototype,"skidding",2),d([Nt({type:Boolean})],ti.prototype,"arrow",2),d([Nt({attribute:"arrow-placement"})],ti.prototype,"arrowPlacement",2),d([Nt({attribute:"arrow-padding",type:Number})],ti.prototype,"arrowPadding",2),d([Nt({type:Boolean})],ti.prototype,"flip",2),d([Nt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],ti.prototype,"flipFallbackPlacements",2),d([Nt({attribute:"flip-fallback-strategy"})],ti.prototype,"flipFallbackStrategy",2),d([Nt({type:Object})],ti.prototype,"flipBoundary",2),d([Nt({attribute:"flip-padding",type:Number})],ti.prototype,"flipPadding",2),d([Nt({type:Boolean})],ti.prototype,"shift",2),d([Nt({type:Object})],ti.prototype,"shiftBoundary",2),d([Nt({attribute:"shift-padding",type:Number})],ti.prototype,"shiftPadding",2),d([Nt({attribute:"auto-size"})],ti.prototype,"autoSize",2),d([Nt()],ti.prototype,"sync",2),d([Nt({type:Object})],ti.prototype,"autoSizeBoundary",2),d([Nt({attribute:"auto-size-padding",type:Number})],ti.prototype,"autoSizePadding",2),d([Nt({attribute:"hover-bridge",type:Boolean})],ti.prototype,"hoverBridge",2);var ni=class extends Vt{constructor(){super(),this.localize=new Oe(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=ii(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=ii(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;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 ri(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:o}=v(this,"tooltip.show",{dir:this.localize.dir()});await oi(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 ri(this.body);const{keyframes:t,options:o}=v(this,"tooltip.hide",{dir:this.localize.dir()});await oi(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,ei(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ei(this,"sl-after-hide")}render(){return nt` + `}};function ii(t,e){return new Promise((o=>{t.addEventListener(e,(function i(s){s.target===t&&(t.removeEventListener(e,i),o())}))}))}function si(t,e,o){return new Promise((i=>{if((null==o?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const s=t.animate(e,h(c({},o),{duration:ni()?0:o.duration}));s.addEventListener("cancel",i,{once:!0}),s.addEventListener("finish",i,{once:!0})}))}function ri(t){return(t=t.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?1e3*parseFloat(t):parseFloat(t)}function ni(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ai(t){return Promise.all(t.getAnimations().map((t=>new Promise((e=>{t.cancel(),requestAnimationFrame(e)})))))}oi.styles=[Ft,qe],d([Vt(".popup")],oi.prototype,"popup",2),d([Vt(".popup__arrow")],oi.prototype,"arrowEl",2),d([Nt()],oi.prototype,"anchor",2),d([Nt({type:Boolean,reflect:!0})],oi.prototype,"active",2),d([Nt({reflect:!0})],oi.prototype,"placement",2),d([Nt({reflect:!0})],oi.prototype,"strategy",2),d([Nt({type:Number})],oi.prototype,"distance",2),d([Nt({type:Number})],oi.prototype,"skidding",2),d([Nt({type:Boolean})],oi.prototype,"arrow",2),d([Nt({attribute:"arrow-placement"})],oi.prototype,"arrowPlacement",2),d([Nt({attribute:"arrow-padding",type:Number})],oi.prototype,"arrowPadding",2),d([Nt({type:Boolean})],oi.prototype,"flip",2),d([Nt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],oi.prototype,"flipFallbackPlacements",2),d([Nt({attribute:"flip-fallback-strategy"})],oi.prototype,"flipFallbackStrategy",2),d([Nt({type:Object})],oi.prototype,"flipBoundary",2),d([Nt({attribute:"flip-padding",type:Number})],oi.prototype,"flipPadding",2),d([Nt({type:Boolean})],oi.prototype,"shift",2),d([Nt({type:Object})],oi.prototype,"shiftBoundary",2),d([Nt({attribute:"shift-padding",type:Number})],oi.prototype,"shiftPadding",2),d([Nt({attribute:"auto-size"})],oi.prototype,"autoSize",2),d([Nt()],oi.prototype,"sync",2),d([Nt({type:Object})],oi.prototype,"autoSizeBoundary",2),d([Nt({attribute:"auto-size-padding",type:Number})],oi.prototype,"autoSizePadding",2),d([Nt({attribute:"hover-bridge",type:Boolean})],oi.prototype,"hoverBridge",2);var li=class extends It{constructor(){super(),this.localize=new Oe(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=ri(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=ri(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;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 ai(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:o}=v(this,"tooltip.show",{dir:this.localize.dir()});await si(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 ai(this.body);const{keyframes:t,options:o}=v(this,"tooltip.hide",{dir:this.localize.dir()});await si(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,ii(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ii(this,"sl-after-hide")}render(){return nt` {if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)= ${this.content} - `}};ni.styles=[Rt,je],ni.dependencies={"sl-popup":ti},d([It("slot:not([name])")],ni.prototype,"defaultSlot",2),d([It(".tooltip__body")],ni.prototype,"body",2),d([It("sl-popup")],ni.prototype,"popup",2),d([Nt()],ni.prototype,"content",2),d([Nt()],ni.prototype,"placement",2),d([Nt({type:Boolean,reflect:!0})],ni.prototype,"disabled",2),d([Nt({type:Number})],ni.prototype,"distance",2),d([Nt({type:Boolean,reflect:!0})],ni.prototype,"open",2),d([Nt({type:Number})],ni.prototype,"skidding",2),d([Nt()],ni.prototype,"trigger",2),d([Nt({type:Boolean})],ni.prototype,"hoist",2),d([Ft("open",{waitUntilFirstUpdate:!0})],ni.prototype,"handleOpenChange",1),d([Ft(["content","distance","hoist","placement","skidding"])],ni.prototype,"handleOptionsChange",1),d([Ft("disabled")],ni.prototype,"handleDisabledChange",1),m("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),m("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),ni.define("sl-tooltip");var ai=k` + `}};li.styles=[Ft,je],li.dependencies={"sl-popup":oi},d([Vt("slot:not([name])")],li.prototype,"defaultSlot",2),d([Vt(".tooltip__body")],li.prototype,"body",2),d([Vt("sl-popup")],li.prototype,"popup",2),d([Nt()],li.prototype,"content",2),d([Nt()],li.prototype,"placement",2),d([Nt({type:Boolean,reflect:!0})],li.prototype,"disabled",2),d([Nt({type:Number})],li.prototype,"distance",2),d([Nt({type:Boolean,reflect:!0})],li.prototype,"open",2),d([Nt({type:Number})],li.prototype,"skidding",2),d([Nt()],li.prototype,"trigger",2),d([Nt({type:Boolean})],li.prototype,"hoist",2),d([Dt("open",{waitUntilFirstUpdate:!0})],li.prototype,"handleOpenChange",1),d([Dt(["content","distance","hoist","placement","skidding"])],li.prototype,"handleOptionsChange",1),d([Dt("disabled")],li.prototype,"handleDisabledChange",1),g("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),g("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),li.define("sl-tooltip");var ci=k` :host { --height: 1rem; --track-color: var(--sl-color-neutral-200); @@ -1054,7 +1055,7 @@ const ge=Symbol.for(""),me=t=>{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)= * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;const li="important",ci=" !"+li,hi=Kt(class extends Zt{constructor(t){if(super(t),t.type!==Wt||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ut)return this.ut=new Set(Object.keys(e)),this.render(e);for(const t of this.ut)null==e[t]&&(this.ut.delete(t),t.includes("-")?o.removeProperty(t):o[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ut.add(t);const e="string"==typeof i&&i.endsWith(ci);t.includes("-")||e?o.setProperty(t,e?i.slice(0,-11):i,e?li:""):o[t]=i}}return at}});var di=class extends Vt{constructor(){super(...arguments),this.localize=new Oe(this),this.value=0,this.indeterminate=!1,this.label=""}render(){return nt` + */;const hi="important",di=" !"+hi,pi=Kt(class extends Zt{constructor(t){if(super(t),t.type!==Wt||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?o.removeProperty(t):o[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ft.add(t);const e="string"==typeof i&&i.endsWith(di);t.includes("-")||e?o.setProperty(t,e?i.slice(0,-11):i,e?hi:""):o[t]=i}}return at}});var ui=class extends It{constructor(){super(...arguments),this.localize=new Oe(this),this.value=0,this.indeterminate=!1,this.label=""}render(){return nt`
{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)= aria-valuemax="100" aria-valuenow=${this.indeterminate?0:this.value} > -
+
${this.indeterminate?"":nt` `}
- `}};di.styles=[Rt,ai],d([Nt({type:Number,reflect:!0})],di.prototype,"value",2),d([Nt({type:Boolean,reflect:!0})],di.prototype,"indeterminate",2),d([Nt()],di.prototype,"label",2),di.define("sl-progress-bar");var pi=new WeakMap;function ui(t){let e=pi.get(t);return e||(e=window.getComputedStyle(t,null),pi.set(t,e)),e}function fi(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")&&!t.hasAttribute("checked"))return!1;if(!function(t){if("function"==typeof t.checkVisibility)return t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});const e=ui(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=ui(t),{overflowY:o,overflowX:i}=e;return"scroll"===o||"scroll"===i||"auto"===o&&"auto"===i&&(t.scrollHeight>t.clientHeight&&"auto"===o||!(!(t.scrollWidth>t.clientWidth)||"auto"!==i))}(t)}function bi(t){const e=new WeakMap,o=[];return function i(s){if(s instanceof Element){if(s.hasAttribute("inert")||s.closest("[inert]"))return;if(e.has(s))return;e.set(s,!0),!o.includes(s)&&fi(s)&&o.push(s),s instanceof HTMLSlotElement&&function(t,e){var o;return(null==(o=t.getRootNode({composed:!0}))?void 0:o.host)!==e}(s,t)&&s.assignedElements({flatten:!0}).forEach((t=>{i(t)})),null!==s.shadowRoot&&"open"===s.shadowRoot.mode&&i(s.shadowRoot)}for(const t of s.children)i(t)}(t),o.sort(((t,e)=>{const o=Number(t.getAttribute("tabindex"))||0;return(Number(e.getAttribute("tabindex"))||0)-o}))}function*gi(t=document.activeElement){null!=t&&(yield t,"shadowRoot"in t&&t.shadowRoot&&"closed"!==t.shadowRoot.mode&&(yield*u(gi(t.shadowRoot.activeElement))))}var mi=[],vi=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=[...gi()].pop();if(this.previousFocus=o,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;t.shiftKey?this.tabDirection="backward":this.tabDirection="forward";const i=bi(this.element);let s=i.findIndex((t=>t===o));this.previousFocus=this.currentFocus;const r="forward"===this.tabDirection?1:-1;for(;;){s+r>=i.length?s=0:s+r<0?s=i.length-1:s+=r,this.previousFocus=this.currentFocus;const o=i[s];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=[...gi()];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(){mi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){mi=mi.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 mi[mi.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const t=bi(this.element);if(!this.element.matches(":focus-within")){const e=t[0],o=t[t.length-1],i="forward"===this.tabDirection?e:o;"function"==typeof(null==i?void 0:i.focus)&&(this.currentFocus=i,i.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(t){return this.elementsWithTabbableControls.includes(t.tagName.toLowerCase())||t.hasAttribute("controls")}},yi=k` + `}};ui.styles=[Ft,ci],d([Nt({type:Number,reflect:!0})],ui.prototype,"value",2),d([Nt({type:Boolean,reflect:!0})],ui.prototype,"indeterminate",2),d([Nt()],ui.prototype,"label",2),ui.define("sl-progress-bar");var fi=new WeakMap;function mi(t){let e=fi.get(t);return e||(e=window.getComputedStyle(t,null),fi.set(t,e)),e}function bi(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")&&!t.hasAttribute("checked"))return!1;if(!function(t){if("function"==typeof t.checkVisibility)return t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});const e=mi(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=mi(t),{overflowY:o,overflowX:i}=e;return"scroll"===o||"scroll"===i||"auto"===o&&"auto"===i&&(t.scrollHeight>t.clientHeight&&"auto"===o||!(!(t.scrollWidth>t.clientWidth)||"auto"!==i))}(t)}function gi(t){const e=new WeakMap,o=[];return function i(s){if(s instanceof Element){if(s.hasAttribute("inert")||s.closest("[inert]"))return;if(e.has(s))return;e.set(s,!0),!o.includes(s)&&bi(s)&&o.push(s),s instanceof HTMLSlotElement&&function(t,e){var o;return(null==(o=t.getRootNode({composed:!0}))?void 0:o.host)!==e}(s,t)&&s.assignedElements({flatten:!0}).forEach((t=>{i(t)})),null!==s.shadowRoot&&"open"===s.shadowRoot.mode&&i(s.shadowRoot)}for(const t of s.children)i(t)}(t),o.sort(((t,e)=>{const o=Number(t.getAttribute("tabindex"))||0;return(Number(e.getAttribute("tabindex"))||0)-o}))}function*vi(t=document.activeElement){null!=t&&(yield t,"shadowRoot"in t&&t.shadowRoot&&"closed"!==t.shadowRoot.mode&&(yield*u(vi(t.shadowRoot.activeElement))))}var yi=[],wi=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=[...vi()].pop();if(this.previousFocus=o,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;t.shiftKey?this.tabDirection="backward":this.tabDirection="forward";const i=gi(this.element);let s=i.findIndex((t=>t===o));this.previousFocus=this.currentFocus;const r="forward"===this.tabDirection?1:-1;for(;;){s+r>=i.length?s=0:s+r<0?s=i.length-1:s+=r,this.previousFocus=this.currentFocus;const o=i[s];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=[...vi()];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(){yi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){yi=yi.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 yi[yi.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const t=gi(this.element);if(!this.element.matches(":focus-within")){const e=t[0],o=t[t.length-1],i="forward"===this.tabDirection?e:o;"function"==typeof(null==i?void 0:i.focus)&&(this.currentFocus=i,i.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(t){return this.elementsWithTabbableControls.includes(t.tagName.toLowerCase())||t.hasAttribute("controls")}},_i=k` :host { --width: 31rem; --header-spacing: var(--sl-spacing-large); @@ -1186,7 +1187,7 @@ const ge=Symbol.for(""),me=t=>{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)= border: solid 1px var(--sl-color-neutral-0); } } -`,wi=class extends Vt{constructor(){super(...arguments),this.hasSlotController=new Dt(this,"footer"),this.localize=new Oe(this),this.modal=new vi(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.modal.isActive()&&this.open&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Be(this))}disconnectedCallback(){var t;super.disconnectedCallback(),this.modal.deactivate(),Ne(this),null==(t=this.closeWatcher)||t.destroy()}requestClose(t){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=v(this,"dialog.denyClose",{dir:this.localize.dir()});oi(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){var t;"CloseWatcher"in window?(null==(t=this.closeWatcher)||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard")):document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){var t;null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),Be(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([ri(this.dialog),ri(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=v(this,"dialog.show",{dir:this.localize.dir()}),o=v(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([oi(this.panel,e.keyframes,e.options),oi(this.overlay,o.keyframes,o.options)]),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([ri(this.dialog),ri(this.overlay)]);const t=v(this,"dialog.hide",{dir:this.localize.dir()}),e=v(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([oi(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),oi(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Ne(this);const o=this.originalTrigger;"function"==typeof(null==o?void 0:o.focus)&&setTimeout((()=>o.focus())),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,ei(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ei(this,"sl-after-hide")}render(){return nt` +`,xi=class extends It{constructor(){super(...arguments),this.hasSlotController=new Rt(this,"footer"),this.localize=new Oe(this),this.modal=new wi(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.modal.isActive()&&this.open&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Be(this))}disconnectedCallback(){var t;super.disconnectedCallback(),this.modal.deactivate(),Ne(this),null==(t=this.closeWatcher)||t.destroy()}requestClose(t){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=v(this,"dialog.denyClose",{dir:this.localize.dir()});si(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){var t;"CloseWatcher"in window?(null==(t=this.closeWatcher)||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard")):document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){var t;null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),Be(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([ai(this.dialog),ai(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=v(this,"dialog.show",{dir:this.localize.dir()}),o=v(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([si(this.panel,e.keyframes,e.options),si(this.overlay,o.keyframes,o.options)]),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([ai(this.dialog),ai(this.overlay)]);const t=v(this,"dialog.hide",{dir:this.localize.dir()}),e=v(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([si(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),si(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Ne(this);const o=this.originalTrigger;"function"==typeof(null==o?void 0:o.focus)&&setTimeout((()=>o.focus())),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,ii(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ii(this,"sl-after-hide")}render(){return nt`
{if(t?.r===ge)return t?._$litStatic$},ve=(t,...e)=
- `}};wi.styles=[Rt,yi],wi.dependencies={"sl-icon-button":_e},d([It(".dialog")],wi.prototype,"dialog",2),d([It(".dialog__panel")],wi.prototype,"panel",2),d([It(".dialog__overlay")],wi.prototype,"overlay",2),d([Nt({type:Boolean,reflect:!0})],wi.prototype,"open",2),d([Nt({reflect:!0})],wi.prototype,"label",2),d([Nt({attribute:"no-header",type:Boolean,reflect:!0})],wi.prototype,"noHeader",2),d([Ft("open",{waitUntilFirstUpdate:!0})],wi.prototype,"handleOpenChange",1),m("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),m("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),m("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),m("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),m("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),wi.define("sl-dialog");export{ce as registerIconLibrary,m as setDefaultAnimation}; + `}};xi.styles=[Ft,_i],xi.dependencies={"sl-icon-button":_e},d([Vt(".dialog")],xi.prototype,"dialog",2),d([Vt(".dialog__panel")],xi.prototype,"panel",2),d([Vt(".dialog__overlay")],xi.prototype,"overlay",2),d([Nt({type:Boolean,reflect:!0})],xi.prototype,"open",2),d([Nt({reflect:!0})],xi.prototype,"label",2),d([Nt({attribute:"no-header",type:Boolean,reflect:!0})],xi.prototype,"noHeader",2),d([Dt("open",{waitUntilFirstUpdate:!0})],xi.prototype,"handleOpenChange",1),g("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),g("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),g("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),g("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),g("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),xi.define("sl-dialog");export{ce as registerIconLibrary,g as setDefaultAnimation}; diff --git a/yarn.lock b/yarn.lock index 30f19c040b..f01ae727e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -974,9 +974,9 @@ integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== "@ctrl/tinycolor@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@ctrl/tinycolor/-/tinycolor-4.0.2.tgz#7665b09c0163722ffc20ee885eb9a8ff80d9ebde" - integrity sha512-fKQinXE9pJ83J1n+C3rDl2xNLJwfoYNvXLRy5cYZA9hBJJw2q+sbb/AOSNKmLxnTWyNTmy4994dueSwP4opi5g== + version "4.0.3" + resolved "https://registry.yarnpkg.com/@ctrl/tinycolor/-/tinycolor-4.0.3.tgz#c56d96ef0d7be598cf68d1ab53f990849a79f5b4" + integrity sha512-e9nEVehVJwkymQpkGhdSNzLT2Lr9UTTby+JePq4Z2SxBbOQjY7pLgSouAaXvfaGQVSAaY0U4eJdwfSDmCbItcw== "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" @@ -1010,25 +1010,25 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== -"@floating-ui/core@^1.5.3": - version "1.5.3" - resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.5.3.tgz#b6aa0827708d70971c8679a16cf680a515b8a52a" - integrity sha512-O0WKDOo0yhJuugCx6trZQj5jVJ9yR0ystG2JaNAemYUWce+pmM6WUEFIibnWyEJKdrDxhm75NoSRME35FNaM/Q== +"@floating-ui/core@^1.0.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.0.tgz#fa41b87812a16bf123122bf945946bae3fdf7fc1" + integrity sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g== dependencies: - "@floating-ui/utils" "^0.2.0" + "@floating-ui/utils" "^0.2.1" "@floating-ui/dom@^1.5.3": - version "1.5.4" - resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.5.4.tgz#28df1e1cb373884224a463235c218dcbd81a16bb" - integrity sha512-jByEsHIY+eEdCjnTVu+E3ephzTOzkQ8hgUfGwos+bg7NlH33Zc5uO+QHz1mrQUOgIKKDD1RtS201P9NvAfq3XQ== + version "1.6.3" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.3.tgz#954e46c1dd3ad48e49db9ada7218b0985cee75ef" + integrity sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw== dependencies: - "@floating-ui/core" "^1.5.3" + "@floating-ui/core" "^1.0.0" "@floating-ui/utils" "^0.2.0" -"@floating-ui/utils@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.0.tgz#9740a4d43a6603a692cfd8f1ca0aeb2c33f2a203" - integrity sha512-T4jNeM6dMzXONGkSjk7+O+eFQTVbw7KHi5OYuvFaBer3Wcrmpwi6fHKcT/FdSf7boWC7H9eXTyYTFZOQdJ1AMA== +"@floating-ui/utils@^0.2.0", "@floating-ui/utils@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.1.tgz#16308cea045f0fc777b6ff20a9f25474dd8293d2" + integrity sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q== "@humanwhocodes/config-array@^0.11.14": version "0.11.14" @@ -1297,22 +1297,22 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@lit-labs/ssr-dom-shim@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.2.tgz#d693d972974a354034454ec1317eb6afd0b00312" - integrity sha512-jnOD+/+dSrfTWYfSXBXlo5l5f0q1UuJo3tkbMDCYA2lKUYq79jaxqtGEvnRoh049nt1vdo1+45RinipU6FGY2g== +"@lit-labs/ssr-dom-shim@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.0.tgz#353ce4a76c83fadec272ea5674ede767650762fd" + integrity sha512-yWJKmpGE6lUURKAaIltoPIE/wrbY3TEkqQt+X0m+7fQNnAv0keydnYvbiJFP1PnMhizmIWRWOG5KLhYyc/xl+g== "@lit/react@^1.0.0": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@lit/react/-/react-1.0.2.tgz#4951ff1590d69aad912d0a950b3518d19eb7e220" - integrity sha512-UJ5TQ46DPcJDIzyjbwbj6Iye0XcpCxL2yb03zcWq1BpWchpXS3Z0BPVhg7zDfZLF6JemPml8u/gt/+KwJ/23sg== + version "1.0.4" + resolved "https://registry.yarnpkg.com/@lit/react/-/react-1.0.4.tgz#85538bea5c04b812903122e597f33b652e302576" + integrity sha512-6HBvk3AwF46z17fTkZp5F7/EdCJW9xqqQgYKr3sQGgoEJv0TKV1voWydG4UQQA2RWkoD4SHjy08snSpzyoyd0w== -"@lit/reactive-element@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-2.0.2.tgz#779ae9d265407daaf7737cb892df5ec2a86e22a0" - integrity sha512-SVOwLAWUQg3Ji1egtOt1UiFe4zdDpnWHyc5qctSceJ5XIu0Uc76YmGpIjZgx9YJ0XtdW0Jm507sDvjOu+HnB8w== +"@lit/reactive-element@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-2.0.4.tgz#8f2ed950a848016383894a26180ff06c56ae001b" + integrity sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ== dependencies: - "@lit-labs/ssr-dom-shim" "^1.1.2" + "@lit-labs/ssr-dom-shim" "^1.2.0" "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -1458,9 +1458,9 @@ integrity sha512-Hf45HeO+vdQblabpyZOTxJ4ZeZsmIUYXXPmoYrrR4OJ5OKxL+bhMz5mK8JXgl7HsoEowfz7+e248UGi861de9Q== "@shoelace-style/shoelace@^2.14.0": - version "2.14.0" - resolved "https://registry.yarnpkg.com/@shoelace-style/shoelace/-/shoelace-2.14.0.tgz#050b1de2d0bb2668735d6644fbee53d9e9783c6e" - integrity sha512-b8HXsSMvKX/9D5yCygnCkAuwZfxYof1+owJx9fYggq/bOAQ8WQcZzMBPTI4amgfwEnFzhRF8ETT+V8w+sptlww== + version "2.15.0" + resolved "https://registry.yarnpkg.com/@shoelace-style/shoelace/-/shoelace-2.15.0.tgz#3410d6bb50811fad001b2c2fbd455cb60d6341a9" + integrity sha512-Lcg938Y8U2VsHqIYewzlt+H1rbrXC4GRSUkTJgXyF8/0YAOlI+srd5OSfIw+/LYmwLP2Peyh398Kae/6tg4PDA== dependencies: "@ctrl/tinycolor" "^4.0.2" "@floating-ui/dom" "^1.5.3" @@ -3288,30 +3288,30 @@ lines-and-columns@^1.1.6: resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -lit-element@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-4.0.2.tgz#1a519896d5ab7c7be7a8729f400499e38779c093" - integrity sha512-/W6WQZUa5VEXwC7H9tbtDMdSs9aWil3Ou8hU6z2cOKWbsm/tXPAcsoaHVEtrDo0zcOIE5GF6QgU55tlGL2Nihg== +lit-element@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-4.0.4.tgz#e0b37ebbe2394bcb9578d611a409f49475dff361" + integrity sha512-98CvgulX6eCPs6TyAIQoJZBCQPo80rgXR+dVBs61cstJXqtI+USQZAbA4gFHh6L/mxBx9MrgPLHLsUgDUHAcCQ== dependencies: - "@lit-labs/ssr-dom-shim" "^1.1.2" - "@lit/reactive-element" "^2.0.0" - lit-html "^3.1.0" + "@lit-labs/ssr-dom-shim" "^1.2.0" + "@lit/reactive-element" "^2.0.4" + lit-html "^3.1.2" -lit-html@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.1.0.tgz#a7b93dd682073f2e2029656f4e9cd91e8034c196" - integrity sha512-FwAjq3iNsaO6SOZXEIpeROlJLUlrbyMkn4iuv4f4u1H40Jw8wkeR/OUXZUHUoiYabGk8Y4Y0F/rgq+R4MrOLmA== +lit-html@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.1.2.tgz#6655ce82367472de7680c62b1bcb0beb0e426fa1" + integrity sha512-3OBZSUrPnAHoKJ9AMjRL/m01YJxQMf+TMHanNtTHG68ubjnZxK0RFl102DPzsw4mWnHibfZIBJm3LWCZ/LmMvg== dependencies: "@types/trusted-types" "^2.0.2" lit@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lit/-/lit-3.1.0.tgz#76429b85dc1f5169fed499a0f7e89e2e619010c9" - integrity sha512-rzo/hmUqX8zmOdamDAeydfjsGXbbdtAFqMhmocnh2j9aDYqbu0fjXygjCa0T99Od9VQ/2itwaGrjZz/ZELVl7w== + version "3.1.2" + resolved "https://registry.yarnpkg.com/lit/-/lit-3.1.2.tgz#f276258e8a56593f1d834a5fd00a7eb5e891ae73" + integrity sha512-VZx5iAyMtX7CV4K8iTLdCkMaYZ7ipjJZ0JcSdJ0zIdGxxyurjIn7yuuSxNBD7QmjvcNJwr0JS4cAdAtsy7gZ6w== dependencies: - "@lit/reactive-element" "^2.0.0" - lit-element "^4.0.0" - lit-html "^3.1.0" + "@lit/reactive-element" "^2.0.4" + lit-element "^4.0.4" + lit-html "^3.1.2" locate-path@^5.0.0: version "5.0.0"