@aurodesignsystem/auro-dialog 4.2.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +3 -19
  2. package/README.md +8 -9
  3. package/demo/accessibility.html +42 -0
  4. package/demo/accessibility.js +21 -0
  5. package/demo/accessibility.md +129 -0
  6. package/demo/accessibility.min.js +3969 -0
  7. package/demo/api.html +16 -40
  8. package/demo/api.md +0 -750
  9. package/demo/customize.html +45 -0
  10. package/demo/{api.js → customize.js} +2 -14
  11. package/demo/customize.md +226 -0
  12. package/demo/customize.min.js +3974 -0
  13. package/demo/demo-nav.css +32 -0
  14. package/demo/design.html +42 -0
  15. package/demo/design.js +23 -0
  16. package/demo/design.md +306 -0
  17. package/demo/design.min.js +4041 -0
  18. package/demo/getting-started.html +38 -0
  19. package/demo/getting-started.md +295 -0
  20. package/demo/index.html +17 -36
  21. package/demo/index.js +2 -3
  22. package/demo/index.md +220 -144
  23. package/demo/index.min.js +3984 -7
  24. package/demo/keyboard-behavior.html +38 -0
  25. package/demo/keyboard-behavior.md +51 -0
  26. package/demo/pages.json +1 -0
  27. package/demo/readme.html +42 -0
  28. package/demo/readme.js +24 -0
  29. package/demo/readme.md +176 -0
  30. package/demo/{auro-dialog.min.js → readme.min.js} +434 -281
  31. package/demo/support/demo-support.js +140 -0
  32. package/demo/voiceover.html +38 -0
  33. package/demo/voiceover.md +19 -0
  34. package/demo/why-dialog.html +38 -0
  35. package/demo/why-dialog.md +36 -0
  36. package/dist/{auro-dialog-CWkXz5VA.js → auro-dialog-T9I85UZL.js} +20 -20
  37. package/dist/index.d.ts +198 -98
  38. package/dist/index.js +1 -1
  39. package/dist/registered.js +1 -1
  40. package/package.json +6 -6
  41. package/demo/api.min.js +0 -219
@@ -0,0 +1,3974 @@
1
+ function initEditCloseButtonExample() {
2
+ const button = document.querySelector("#openEditDialog");
3
+ const dialog = document.querySelector("#unformattedCustomMdDialog");
4
+
5
+ button.addEventListener("click", () => {
6
+ if (dialog.hasAttribute("open")) {
7
+ dialog.removeAttribute("open");
8
+ } else {
9
+ dialog.setAttribute("open", true);
10
+ }
11
+ });
12
+ }
13
+
14
+ function initPopoverAndDropdownExample() {
15
+ const buttons = [
16
+ document.querySelector("#openPopAndDrop"),
17
+ document.querySelector("#closePopAndDrop"),
18
+ ];
19
+ const dialog = document.querySelector("#popover-dialog");
20
+
21
+ buttons.forEach((button) => {
22
+ button.addEventListener("click", () => {
23
+ if (dialog.hasAttribute("open")) {
24
+ dialog.removeAttribute("open");
25
+ } else {
26
+ dialog.setAttribute("open", true);
27
+ }
28
+ });
29
+ });
30
+ }
31
+
32
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
33
+ // See LICENSE in the project root for license information.
34
+
35
+ // ---------------------------------------------------------------------
36
+
37
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
38
+
39
+ class AuroLibraryRuntimeUtils {
40
+
41
+ /* eslint-disable jsdoc/require-param */
42
+
43
+ /**
44
+ * This will register a new custom element with the browser.
45
+ * @param {String} name - The name of the custom element.
46
+ * @param {Object} componentClass - The class to register as a custom element.
47
+ * @returns {void}
48
+ */
49
+ registerComponent(name, componentClass) {
50
+ if (!customElements.get(name)) {
51
+ customElements.define(name, class extends componentClass {});
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Finds and returns the closest HTML Element based on a selector.
57
+ * @returns {void}
58
+ */
59
+ closestElement(
60
+ selector, // selector like in .closest()
61
+ base = this, // extra functionality to skip a parent
62
+ __Closest = (el, found = el && el.closest(selector)) =>
63
+ !el || el === document || el === window
64
+ ? null // standard .closest() returns null for non-found selectors also
65
+ : found
66
+ ? found // found a selector INside this element
67
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
68
+ ) {
69
+ return __Closest(base);
70
+ }
71
+ /* eslint-enable jsdoc/require-param */
72
+
73
+ /**
74
+ * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
75
+ * @param {Object} elem - The element to check.
76
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
77
+ * @returns {void}
78
+ */
79
+ handleComponentTagRename(elem, tagName) {
80
+ const tag = tagName.toLowerCase();
81
+ const elemTag = elem.tagName.toLowerCase();
82
+
83
+ if (elemTag !== tag) {
84
+ elem.setAttribute(tag, true);
85
+ }
86
+ }
87
+
88
+ /**
89
+ * Validates if an element is a specific Auro component.
90
+ * @param {Object} elem - The element to validate.
91
+ * @param {String} tagName - The name of the Auro component to check against.
92
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
93
+ */
94
+ elementMatch(elem, tagName) {
95
+ const tag = tagName.toLowerCase();
96
+ const elemTag = elem.tagName.toLowerCase();
97
+
98
+ return elemTag === tag || elem.hasAttribute(tag);
99
+ }
100
+
101
+ /**
102
+ * Gets the text content of a named slot.
103
+ * @returns {String}
104
+ * @private
105
+ */
106
+ getSlotText(elem, name) {
107
+ const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
108
+ const nodes = slot?.assignedNodes({ flatten: true }) || [];
109
+ const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
110
+
111
+ return text || null;
112
+ }
113
+ }
114
+
115
+ /**
116
+ * @license
117
+ * Copyright 2019 Google LLC
118
+ * SPDX-License-Identifier: BSD-3-Clause
119
+ */
120
+ const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$3=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$3)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$4&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$3("string"==typeof t?t:t+"",void 0,s$3),i$5=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1],t[0]);return new n$3(o,t,s$3)},S$2=(s,o)=>{if(e$4)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$3=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
121
+
122
+ /**
123
+ * @license
124
+ * Copyright 2017 Google LLC
125
+ * SPDX-License-Identifier: BSD-3-Clause
126
+ */const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$2,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$2=a$2.trustedTypes,l$3=c$2?c$2.emptyScript:"",p$3=a$2.reactiveElementPolyfillSupport,d$2=(t,s)=>t,u$4={toAttribute(t,s){switch(s){case Boolean:t=t?l$3:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$3=(t,s)=>!i$4(t,s),b$2={attribute:true,type:String,converter:u$4,reflect:false,useDefault:false,hasChanged:f$3};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$3 = class y 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,s=b$2){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$2(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b$2}static _$Ei(){if(this.hasOwnProperty(d$2("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$2("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$2("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$3(s));}else void 0!==s&&i.push(c$3(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,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,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$2(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.());}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.());}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$4).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$4;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i,e=false,h){if(void 0!==t){const r=this.constructor;if(false===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f$3)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;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,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM();}updated(t){}firstUpdated(t){}};y$3.elementStyles=[],y$3.shadowRootOptions={mode:"open"},y$3[d$2("elementProperties")]=new Map,y$3[d$2("finalized")]=new Map,p$3?.({ReactiveElement:y$3}),(a$2.reactiveElementVersions??=[]).push("2.1.2");
127
+
128
+ /**
129
+ * @license
130
+ * Copyright 2017 Google LLC
131
+ * SPDX-License-Identifier: BSD-3-Clause
132
+ */
133
+ const t$1=globalThis,i$3=t=>t,s$2=t$1.trustedTypes,e$2=s$2?s$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,h$1="$lit$",o$3=`lit$${Math.random().toFixed(9).slice(2)}$`,n$1="?"+o$3,r=`<${n$1}>`,l$2=document,c$1=()=>l$2.createComment(""),a$1=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u$3=Array.isArray,d$1=t=>u$3(t)||"function"==typeof t?.[Symbol.iterator],f$2="[ \t\n\f\r]",v$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_$1=/-->/g,m$2=/>/g,p$2=RegExp(`>|${f$2}(?:([^\\s"'>=/]+)(${f$2}*=${f$2}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g$2=/'/g,$=/"/g,y$2=/^(?:script|style|textarea|title)$/i,x$1=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b$1=x$1(1),E=Symbol.for("lit-noChange"),A$1=Symbol.for("lit-nothing"),C$1=new WeakMap,P=l$2.createTreeWalker(l$2,129);function V(t,i){if(!u$3(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e$2?e$2.createHTML(i):i}const N$1=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v$1;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v$1?"!--"===u[1]?c=_$1:void 0!==u[1]?c=m$2:void 0!==u[2]?(y$2.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p$2):void 0!==u[3]&&(c=p$2):c===p$2?">"===u[0]?(c=n??v$1,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p$2:'"'===u[3]?$:g$2):c===$||c===g$2?c=p$2:c===_$1||c===m$2?c=v$1:(c=p$2,n=void 0);const x=c===p$2&&t[i+1].startsWith("/>")?" ":"";l+=c===v$1?s+r:d>=0?(e.push(a),s.slice(0,d)+h$1+s.slice(d)+o$3+x):s+o$3+(-2===d?i:x);}return [V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};let S$1 = class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N$1(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h$1)){const i=v[a++],s=r.getAttribute(t).split(o$3),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z$2:H$1}),r.removeAttribute(t);}else t.startsWith(o$3)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y$2.test(r.tagName)){const t=r.textContent.split(o$3),i=t.length-1;if(i>0){r.textContent=s$2?s$2.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c$1()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c$1());}}}else if(8===r.nodeType)if(r.data===n$1)d.push({type:2,index:l});else {let t=-1;for(;-1!==(t=r.data.indexOf(o$3,t+1));)d.push({type:7,index:l}),t+=o$3.length-1;}l++;}}static createElement(t,i){const s=l$2.createElement("template");return s.innerHTML=t,s}};function M$2(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a$1(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M$2(t,h._$AS(t,i.values),h,e)),i}let R$1 = class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l$2).importNode(i,true);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k$2(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n];}o!==r?.index&&(h=P.nextNode(),o++);}return P.currentNode=l$2,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}};let k$2 = class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A$1,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M$2(this,t,i),a$1(t)?t===A$1||null==t||""===t?(this._$AH!==A$1&&this._$AR(),this._$AH=A$1):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d$1(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==A$1&&a$1(this._$AH)?this._$AA.nextSibling.data=t:this.T(l$2.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S$1.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new R$1(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=C$1.get(t.strings);return void 0===i&&C$1.set(t.strings,i=new S$1(t)),i}k(t){u$3(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c$1()),this.O(c$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(false,true,s);t!==this._$AB;){const s=i$3(t).nextSibling;i$3(t).remove(),t=s;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}};let H$1 = class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A$1,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A$1;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=M$2(this,t,i,0),o=!a$1(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M$2(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a$1(r)||r!==this._$AH[n],r===A$1?t=A$1:t!==A$1&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===A$1?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};class I extends H$1{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===A$1?void 0:t;}}class L extends H$1{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A$1);}}let z$2 = class z extends H$1{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=M$2(this,t,i,0)??A$1)===E)return;const s=this._$AH,e=t===A$1&&s!==A$1||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A$1&&(s===A$1||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}};class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){M$2(this,t);}}const B$1=t$1.litHtmlPolyfillSupport;B$1?.(S$1,k$2),(t$1.litHtmlVersions??=[]).push("3.3.3");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k$2(i.insertBefore(c$1(),t),t,void 0,s??{});}return h._$AI(t),h};
134
+
135
+ /**
136
+ * @license
137
+ * Copyright 2017 Google LLC
138
+ * SPDX-License-Identifier: BSD-3-Clause
139
+ */const s$1=globalThis;let i$2 = class i extends y$3{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 r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=D(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return E}};i$2._$litElement$=true,i$2["finalized"]=true,s$1.litElementHydrateSupport?.({LitElement:i$2});const o$2=s$1.litElementPolyfillSupport;o$2?.({LitElement:i$2});(s$1.litElementVersions??=[]).push("4.2.2");
140
+
141
+ /**
142
+ * @license
143
+ * Copyright 2017 Google LLC
144
+ * SPDX-License-Identifier: BSD-3-Clause
145
+ */
146
+ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
147
+
148
+ /**
149
+ * @license
150
+ * Copyright 2018 Google LLC
151
+ * SPDX-License-Identifier: BSD-3-Clause
152
+ */const e=e$1(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.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(s=>t[s]).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return E}});
153
+
154
+ /**
155
+ * @license
156
+ * Copyright 2018 Google LLC
157
+ * SPDX-License-Identifier: BSD-3-Clause
158
+ */const o$1=o=>o??A$1;
159
+
160
+ /**
161
+ * @license
162
+ * Copyright 2020 Google LLC
163
+ * SPDX-License-Identifier: BSD-3-Clause
164
+ */
165
+ const a=Symbol.for(""),o=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce((r,e,a)=>r+(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.`)})(e)+t[a+1],t[0]),r:a}),l$1=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l$1.get(t))&&(n.raw=n,l$1.set(t,r=n)),e=u;}return t(r,...e)},u$2=n(b$1);
166
+
167
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
168
+ // See LICENSE in the project root for license information.
169
+
170
+
171
+ class AuroDependencyVersioning {
172
+
173
+ /**
174
+ * Generates a unique string to be used for child auro element naming.
175
+ * @private
176
+ * @param {string} baseName - Defines the first part of the unique element name.
177
+ * @param {string} version - Version of the component that will be appended to the baseName.
178
+ * @returns {string} - Unique string to be used for naming.
179
+ */
180
+ generateElementName(baseName, version) {
181
+ let result = baseName;
182
+
183
+ result += '-';
184
+ result += version.replace(/[.]/g, '_');
185
+
186
+ return result;
187
+ }
188
+
189
+ /**
190
+ * Generates a unique string to be used for child auro element naming.
191
+ * @param {string} baseName - Defines the first part of the unique element name.
192
+ * @param {string} version - Version of the component that will be appended to the baseName.
193
+ * @returns {string} - Unique string to be used for naming.
194
+ */
195
+ generateTag(baseName, version, tagClass) {
196
+ const elementName = this.generateElementName(baseName, version);
197
+ const tag = i`${s(elementName)}`;
198
+
199
+ if (!customElements.get(elementName)) {
200
+ customElements.define(elementName, class extends tagClass {});
201
+ }
202
+
203
+ return tag;
204
+ }
205
+ }
206
+
207
+ // Selectors for focusable elements
208
+ const FOCUSABLE_SELECTORS = [
209
+ "a[href]",
210
+ "button:not([disabled])",
211
+ "textarea:not([disabled])",
212
+ "input:not([disabled])",
213
+ "select:not([disabled])",
214
+ '[role="tab"]:not([disabled])',
215
+ '[role="link"]:not([disabled])',
216
+ '[role="button"]:not([disabled])',
217
+ '[tabindex]:not([tabindex="-1"])',
218
+ '[contenteditable]:not([contenteditable="false"])',
219
+ ];
220
+
221
+ // List of custom components that are known to be focusable
222
+ const FOCUSABLE_COMPONENTS = [
223
+ "auro-checkbox",
224
+ "auro-radio",
225
+ "auro-dropdown",
226
+ "auro-button",
227
+ "auro-combobox",
228
+ "auro-input",
229
+ "auro-counter",
230
+ // 'auro-menu', // Auro menu is not focusable by default, it uses a different interaction model
231
+ "auro-select",
232
+ "auro-datepicker",
233
+ "auro-hyperlink",
234
+ "auro-accordion",
235
+ ];
236
+
237
+ /**
238
+ * Determines if a given element is a custom focusable component.
239
+ * Returns true if the element matches a known focusable component and is not disabled.
240
+ *
241
+ * @param {HTMLElement} element The element to check for focusability.
242
+ * @returns {boolean} True if the element is a focusable custom component, false otherwise.
243
+ */
244
+ function isFocusableComponent(element) {
245
+ const componentName = element.tagName.toLowerCase();
246
+
247
+ // Guard Clause: Element is a focusable component
248
+ if (
249
+ !FOCUSABLE_COMPONENTS.some(
250
+ (name) => element.hasAttribute(name) || componentName === name,
251
+ )
252
+ )
253
+ return false;
254
+
255
+ // Guard Clause: Element is not disabled
256
+ if (element.hasAttribute("disabled")) return false;
257
+
258
+ // Guard Clause: The element is a hyperlink and has no href attribute
259
+ if (componentName.match("hyperlink") && !element.hasAttribute("href"))
260
+ return false;
261
+
262
+ // If all guard clauses pass, the element is a focusable component
263
+ return true;
264
+ }
265
+
266
+ /**
267
+ * Safely get a numeric tabindex for an element.
268
+ * Returns a number if the tabindex is a valid integer, otherwise null.
269
+ *
270
+ * @param {HTMLElement} element The element whose tabindex to read.
271
+ * @returns {?number} The numeric tabindex or null if missing/invalid.
272
+ */
273
+ function getNumericTabIndex(element) {
274
+ const raw = element.getAttribute("tabindex");
275
+ if (raw == null) return null;
276
+
277
+ const value = Number.parseInt(raw, 10);
278
+ return Number.isNaN(value) ? null : value;
279
+ }
280
+
281
+ /**
282
+ * Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
283
+ * Returns a unique, ordered array of elements that can receive focus.
284
+ * Also sorts elements with tabindex first, preserving their order.
285
+ *
286
+ * @param {HTMLElement} container The container to search within
287
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
288
+ */
289
+ function getFocusableElements(container) {
290
+ // Get elements in DOM order by walking the tree
291
+ const orderedFocusableElements = [];
292
+
293
+ // Define a recursive function to collect focusable elements in DOM order
294
+ const collectFocusableElements = (root) => {
295
+ // Check if current element is focusable
296
+ if (root.nodeType === Node.ELEMENT_NODE) {
297
+ // Check if this is a custom component that is focusable
298
+ const isComponentFocusable = isFocusableComponent(root);
299
+
300
+ if (isComponentFocusable) {
301
+ // Add the component itself as a focusable element and don't traverse its shadow DOM
302
+ orderedFocusableElements.push(root);
303
+ return; // Skip traversing inside this component
304
+ }
305
+
306
+ // Check if the element itself matches any selector
307
+ for (const selector of FOCUSABLE_SELECTORS) {
308
+ if (root.matches?.(selector)) {
309
+ orderedFocusableElements.push(root);
310
+ break; // Once we know it's focusable, no need to check other selectors
311
+ }
312
+ }
313
+
314
+ // Process shadow DOM only for non-Auro components
315
+ if (root.shadowRoot) {
316
+ // Process shadow DOM children in order
317
+ if (root.shadowRoot.children) {
318
+ Array.from(root.shadowRoot.children).forEach((child) => {
319
+ collectFocusableElements(child);
320
+ });
321
+ }
322
+ }
323
+
324
+ // Process slots and their assigned nodes in order
325
+ if (root.tagName === "SLOT") {
326
+ const assignedNodes = root.assignedNodes({ flatten: true });
327
+ for (const node of assignedNodes) {
328
+ collectFocusableElements(node);
329
+ }
330
+ } else {
331
+ // Process light DOM children in order
332
+ if (root.children) {
333
+ Array.from(root.children).forEach((child) => {
334
+ collectFocusableElements(child);
335
+ });
336
+ }
337
+ }
338
+ }
339
+ };
340
+
341
+ // Start the traversal from the container
342
+ collectFocusableElements(container);
343
+
344
+ // Remove duplicates that might have been collected through different paths
345
+ // while preserving order
346
+ const uniqueElements = [];
347
+ const seen = new Set();
348
+
349
+ for (const element of orderedFocusableElements) {
350
+ if (!seen.has(element)) {
351
+ seen.add(element);
352
+ uniqueElements.push(element);
353
+ }
354
+ }
355
+
356
+ // Move tab-indexed elements to the front while preserving their order
357
+ // This ensures that elements with tabindex are prioritized in the focus order
358
+
359
+ // First extract elements with valid positive tabindex
360
+ const elementsWithTabindex = uniqueElements.filter((el) => {
361
+ const tabindex = getNumericTabIndex(el);
362
+ return tabindex !== null && tabindex > 0;
363
+ });
364
+
365
+ // Sort these elements by their tabindex value
366
+ elementsWithTabindex.sort((a, b) => {
367
+ const aIndex = getNumericTabIndex(a) ?? 0;
368
+ const bIndex = getNumericTabIndex(b) ?? 0;
369
+ return aIndex - bIndex;
370
+ });
371
+
372
+ // Elements without tabindex (preserving their original order)
373
+ const elementsWithoutTabindex = uniqueElements.filter((el) => {
374
+ const tabindex = getNumericTabIndex(el);
375
+
376
+ // Elements without tabindex or with tabindex of 0 stay in DOM order
377
+ return tabindex === null || tabindex === 0;
378
+ });
379
+
380
+ // Combine both arrays with tabindex elements first
381
+ const tabIndexedUniqueElements = [
382
+ ...elementsWithTabindex,
383
+ ...elementsWithoutTabindex,
384
+ ];
385
+
386
+ return tabIndexedUniqueElements;
387
+ }
388
+
389
+ /**
390
+ * FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
391
+ * It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
392
+ */
393
+ class FocusTrap {
394
+ /**
395
+ * Creates a new FocusTrap instance for the given container element.
396
+ * Initializes event listeners and prepares the container for focus management.
397
+ *
398
+ * @param {HTMLElement} container The DOM element to trap focus within.
399
+ * @param {boolean} [controlTabOrder=false] If true enables manual control of the tab order by the FocusTrap.
400
+ * @throws {Error} If the provided container is not a valid HTMLElement.
401
+ */
402
+ constructor(container, controlTabOrder = false) {
403
+ if (!container || !(container instanceof HTMLElement)) {
404
+ throw new Error("FocusTrap requires a valid HTMLElement.");
405
+ }
406
+
407
+ this.container = container;
408
+ this.tabDirection = "forward"; // or 'backward';
409
+ this.controlTabOrder = controlTabOrder;
410
+
411
+ this._init();
412
+ }
413
+
414
+ /**
415
+ * Initializes the focus trap by setting up event listeners and attributes on the container.
416
+ * Prepares the container for focus management, including support for shadow DOM and inert attributes.
417
+ *
418
+ * @private
419
+ */
420
+ _init() {
421
+ // Add inert attribute to prevent focusing programmatically as well (if supported)
422
+ if ("inert" in HTMLElement.prototype) {
423
+ this.container.inert = false; // Ensure the container isn't inert
424
+ this.container.setAttribute("data-focus-trap-container", true); // Mark for identification
425
+ }
426
+
427
+ // Track tab direction
428
+ this.container.addEventListener("keydown", this._onKeydown);
429
+ }
430
+
431
+ /**
432
+ * Gets an array of currently active (focused) elements in the document and shadow DOM.
433
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
434
+ * @private
435
+ */
436
+ _getActiveElements() {
437
+ // Get the active element(s) in the document and shadow root
438
+ // This will include the active element in the shadow DOM if it exists
439
+ // Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
440
+ let { activeElement } = document;
441
+ const actives = [activeElement];
442
+ while (activeElement?.shadowRoot?.activeElement) {
443
+ actives.push(activeElement.shadowRoot.activeElement);
444
+ activeElement = activeElement.shadowRoot.activeElement;
445
+ }
446
+ return actives;
447
+ }
448
+
449
+ /**
450
+ * Gets the next focus index based on the current index and focusable elements.
451
+ * @param {number} currentIndex The current index of the focused element.
452
+ * @param {Array<HTMLElement>} focusables The array of focusable elements.
453
+ * @returns {number|null} The next focus index or null if not determined.
454
+ */
455
+ _getNextFocusIndex(currentIndex, focusables, actives) {
456
+ if (this.controlTabOrder) {
457
+ // Calculate the new index based on the current index and tab direction
458
+ let newFocusIndex =
459
+ currentIndex + (this.tabDirection === "forward" ? 1 : -1);
460
+
461
+ // Wrap-around logic
462
+ if (newFocusIndex < 0) newFocusIndex = focusables.length - 1;
463
+ if (newFocusIndex >= focusables.length) newFocusIndex = 0;
464
+
465
+ // Early return with the new index
466
+ return newFocusIndex;
467
+ }
468
+
469
+ // Determine if we need to wrap
470
+ const atFirst =
471
+ actives.includes(focusables[0]) || actives.includes(this.container);
472
+ const atLast = actives.includes(focusables[focusables.length - 1]);
473
+
474
+ // Only wrap if at the ends
475
+ if (this.tabDirection === "backward" && atFirst) {
476
+ return focusables.length - 1;
477
+ }
478
+
479
+ if (this.tabDirection === "forward" && atLast) {
480
+ return 0;
481
+ }
482
+
483
+ // No wrap, so don't change focus, return early
484
+ return null;
485
+ }
486
+
487
+ /**
488
+ * Handles the Tab key press event to manage focus within the container.
489
+ * @param {KeyboardEvent} e The keyboard event triggered by the user.
490
+ * @returns {void}
491
+ */
492
+ _handleTabKey(e) {
493
+ // Update the focusable elements
494
+ const focusables = this._getFocusableElements();
495
+
496
+ // If there are no focusable elements, exit
497
+ if (!focusables.length) return;
498
+
499
+ // Set the tab direction based on the key pressed
500
+ this.tabDirection = e.shiftKey ? "backward" : "forward";
501
+
502
+ // Get the active elements that are currently focused
503
+ const actives = this._getActiveElements();
504
+
505
+ // If we're at either end of the focusable elements, wrap around to the other end
506
+ let focusIndex = focusables.findIndex((el) => actives.includes(el));
507
+
508
+ // Fallback if we have no focused element
509
+ if (focusIndex === -1) focusIndex = 0;
510
+
511
+ // Get the next focus index based on the current focus index, tab direction, and controlTabOrder setting
512
+ // Is null if no new focus index is determined
513
+ const newFocusIndex = this._getNextFocusIndex(
514
+ focusIndex,
515
+ focusables,
516
+ actives,
517
+ );
518
+
519
+ // If we have a new focus index, set focus to that element
520
+ if (newFocusIndex !== null) {
521
+ e.preventDefault();
522
+ focusables[newFocusIndex].focus();
523
+ }
524
+ }
525
+
526
+ /**
527
+ * Catches the keydown event
528
+ * @param {KeyboardEvent} e The keyboard event triggered by user interaction.
529
+ * @private
530
+ */
531
+ _onKeydown = (e) => {
532
+ // Handle tab
533
+ if (e.key === "Tab") this._handleTabKey(e);
534
+ };
535
+
536
+ /**
537
+ * Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
538
+ * Returns a unique, ordered array of elements that can receive focus.
539
+ *
540
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
541
+ * @private
542
+ */
543
+ _getFocusableElements() {
544
+ // Use the imported utility function to get focusable elements
545
+ const elements = getFocusableElements(this.container);
546
+
547
+ // Return the elements found
548
+ return elements;
549
+ }
550
+
551
+ /**
552
+ * Moves focus to the first focusable element within the container.
553
+ * Useful for setting initial focus when activating the focus trap.
554
+ */
555
+ focusFirstElement() {
556
+ const focusables = this._getFocusableElements();
557
+ if (focusables.length) focusables[0].focus();
558
+ }
559
+
560
+ /**
561
+ * Moves focus to the last focusable element within the container.
562
+ * Useful for setting focus when deactivating or cycling focus in reverse.
563
+ */
564
+ focusLastElement() {
565
+ const focusables = this._getFocusableElements();
566
+ if (focusables.length) focusables[focusables.length - 1].focus();
567
+ }
568
+
569
+ /**
570
+ * Removes event listeners and attributes added by the focus trap.
571
+ * Call this method to clean up when the focus trap is no longer needed.
572
+ */
573
+ disconnect() {
574
+ if (this.container.hasAttribute("data-focus-trap-container")) {
575
+ this.container.removeAttribute("data-focus-trap-container");
576
+ }
577
+
578
+ this.container.removeEventListener("keydown", this._onKeydown);
579
+ }
580
+ }
581
+
582
+ /**
583
+ * Custom positioning reference element.
584
+ * @see https://floating-ui.com/docs/virtual-elements
585
+ */
586
+
587
+ const sides = ['top', 'right', 'bottom', 'left'];
588
+ const alignments = ['start', 'end'];
589
+ const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
590
+ const min = Math.min;
591
+ const max = Math.max;
592
+ const round = Math.round;
593
+ const floor = Math.floor;
594
+ const createCoords = v => ({
595
+ x: v,
596
+ y: v
597
+ });
598
+ const oppositeSideMap = {
599
+ left: 'right',
600
+ right: 'left',
601
+ bottom: 'top',
602
+ top: 'bottom'
603
+ };
604
+ function clamp(start, value, end) {
605
+ return max(start, min(value, end));
606
+ }
607
+ function evaluate(value, param) {
608
+ return typeof value === 'function' ? value(param) : value;
609
+ }
610
+ function getSide(placement) {
611
+ return placement.split('-')[0];
612
+ }
613
+ function getAlignment(placement) {
614
+ return placement.split('-')[1];
615
+ }
616
+ function getOppositeAxis(axis) {
617
+ return axis === 'x' ? 'y' : 'x';
618
+ }
619
+ function getAxisLength(axis) {
620
+ return axis === 'y' ? 'height' : 'width';
621
+ }
622
+ function getSideAxis(placement) {
623
+ const firstChar = placement[0];
624
+ return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
625
+ }
626
+ function getAlignmentAxis(placement) {
627
+ return getOppositeAxis(getSideAxis(placement));
628
+ }
629
+ function getAlignmentSides(placement, rects, rtl) {
630
+ if (rtl === void 0) {
631
+ rtl = false;
632
+ }
633
+ const alignment = getAlignment(placement);
634
+ const alignmentAxis = getAlignmentAxis(placement);
635
+ const length = getAxisLength(alignmentAxis);
636
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
637
+ if (rects.reference[length] > rects.floating[length]) {
638
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
639
+ }
640
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
641
+ }
642
+ function getExpandedPlacements(placement) {
643
+ const oppositePlacement = getOppositePlacement(placement);
644
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
645
+ }
646
+ function getOppositeAlignmentPlacement(placement) {
647
+ return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
648
+ }
649
+ const lrPlacement = ['left', 'right'];
650
+ const rlPlacement = ['right', 'left'];
651
+ const tbPlacement = ['top', 'bottom'];
652
+ const btPlacement = ['bottom', 'top'];
653
+ function getSideList(side, isStart, rtl) {
654
+ switch (side) {
655
+ case 'top':
656
+ case 'bottom':
657
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
658
+ return isStart ? lrPlacement : rlPlacement;
659
+ case 'left':
660
+ case 'right':
661
+ return isStart ? tbPlacement : btPlacement;
662
+ default:
663
+ return [];
664
+ }
665
+ }
666
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
667
+ const alignment = getAlignment(placement);
668
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
669
+ if (alignment) {
670
+ list = list.map(side => side + "-" + alignment);
671
+ if (flipAlignment) {
672
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
673
+ }
674
+ }
675
+ return list;
676
+ }
677
+ function getOppositePlacement(placement) {
678
+ const side = getSide(placement);
679
+ return oppositeSideMap[side] + placement.slice(side.length);
680
+ }
681
+ function expandPaddingObject(padding) {
682
+ var _padding$top, _padding$right, _padding$bottom, _padding$left;
683
+ return {
684
+ top: (_padding$top = padding.top) != null ? _padding$top : 0,
685
+ right: (_padding$right = padding.right) != null ? _padding$right : 0,
686
+ bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
687
+ left: (_padding$left = padding.left) != null ? _padding$left : 0
688
+ };
689
+ }
690
+ function getPaddingObject(padding) {
691
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
692
+ top: padding,
693
+ right: padding,
694
+ bottom: padding,
695
+ left: padding
696
+ };
697
+ }
698
+ function rectToClientRect(rect) {
699
+ const {
700
+ x,
701
+ y,
702
+ width,
703
+ height
704
+ } = rect;
705
+ return {
706
+ width,
707
+ height,
708
+ top: y,
709
+ left: x,
710
+ right: x + width,
711
+ bottom: y + height,
712
+ x,
713
+ y
714
+ };
715
+ }
716
+
717
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
718
+ let {
719
+ reference,
720
+ floating
721
+ } = _ref;
722
+ const sideAxis = getSideAxis(placement);
723
+ const alignmentAxis = getAlignmentAxis(placement);
724
+ const alignLength = getAxisLength(alignmentAxis);
725
+ const side = getSide(placement);
726
+ const isVertical = sideAxis === 'y';
727
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
728
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
729
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
730
+ let coords;
731
+ switch (side) {
732
+ case 'top':
733
+ coords = {
734
+ x: commonX,
735
+ y: reference.y - floating.height
736
+ };
737
+ break;
738
+ case 'bottom':
739
+ coords = {
740
+ x: commonX,
741
+ y: reference.y + reference.height
742
+ };
743
+ break;
744
+ case 'right':
745
+ coords = {
746
+ x: reference.x + reference.width,
747
+ y: commonY
748
+ };
749
+ break;
750
+ case 'left':
751
+ coords = {
752
+ x: reference.x - floating.width,
753
+ y: commonY
754
+ };
755
+ break;
756
+ default:
757
+ coords = {
758
+ x: reference.x,
759
+ y: reference.y
760
+ };
761
+ }
762
+ const alignment = getAlignment(placement);
763
+ if (alignment) {
764
+ coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);
765
+ }
766
+ return coords;
767
+ }
768
+
769
+ /**
770
+ * Resolves with an object of overflow side offsets that determine how much the
771
+ * element is overflowing a given clipping boundary on each side.
772
+ * - positive = overflowing the boundary by that number of pixels
773
+ * - negative = how many pixels left before it will overflow
774
+ * - 0 = lies flush with the boundary
775
+ * @see https://floating-ui.com/docs/detectOverflow
776
+ */
777
+ async function detectOverflow(state, options) {
778
+ var _await$platform$isEle;
779
+ if (options === void 0) {
780
+ options = {};
781
+ }
782
+ const {
783
+ x,
784
+ y,
785
+ platform,
786
+ rects,
787
+ elements,
788
+ strategy
789
+ } = state;
790
+ const {
791
+ boundary = 'clippingAncestors',
792
+ rootBoundary = 'viewport',
793
+ elementContext = 'floating',
794
+ altBoundary = false,
795
+ padding = 0
796
+ } = evaluate(options, state);
797
+ const paddingObject = getPaddingObject(padding);
798
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
799
+ const element = elements[altBoundary ? altContext : elementContext];
800
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
801
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
802
+ boundary,
803
+ rootBoundary,
804
+ strategy
805
+ }));
806
+ const rect = elementContext === 'floating' ? {
807
+ x,
808
+ y,
809
+ width: rects.floating.width,
810
+ height: rects.floating.height
811
+ } : rects.reference;
812
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
813
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) && (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
814
+ x: 1,
815
+ y: 1
816
+ };
817
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
818
+ elements,
819
+ rect,
820
+ offsetParent,
821
+ strategy
822
+ }) : rect);
823
+ return {
824
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
825
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
826
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
827
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
828
+ };
829
+ }
830
+
831
+ // Maximum number of resets that can occur before bailing to avoid infinite reset loops.
832
+ const MAX_RESET_COUNT = 50;
833
+
834
+ /**
835
+ * Computes the `x` and `y` coordinates that will place the floating element
836
+ * next to a given reference element.
837
+ *
838
+ * This export does not have any `platform` interface logic. You will need to
839
+ * write one for the platform you are using Floating UI with.
840
+ */
841
+ const computePosition$1 = async (reference, floating, config) => {
842
+ const {
843
+ placement = 'bottom',
844
+ strategy = 'absolute',
845
+ middleware = [],
846
+ platform
847
+ } = config;
848
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
849
+ ...platform,
850
+ detectOverflow
851
+ };
852
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
853
+ let rects = await platform.getElementRects({
854
+ reference,
855
+ floating,
856
+ strategy
857
+ });
858
+ let {
859
+ x,
860
+ y
861
+ } = computeCoordsFromPlacement(rects, placement, rtl);
862
+ let statefulPlacement = placement;
863
+ let resetCount = 0;
864
+ const middlewareData = {};
865
+ for (let i = 0; i < middleware.length; i++) {
866
+ const currentMiddleware = middleware[i];
867
+ if (!currentMiddleware) {
868
+ continue;
869
+ }
870
+ const {
871
+ name,
872
+ fn
873
+ } = currentMiddleware;
874
+ const {
875
+ x: nextX,
876
+ y: nextY,
877
+ data,
878
+ reset
879
+ } = await fn({
880
+ x,
881
+ y,
882
+ initialPlacement: placement,
883
+ placement: statefulPlacement,
884
+ strategy,
885
+ middlewareData,
886
+ rects,
887
+ platform: platformWithDetectOverflow,
888
+ elements: {
889
+ reference,
890
+ floating
891
+ }
892
+ });
893
+ x = nextX != null ? nextX : x;
894
+ y = nextY != null ? nextY : y;
895
+ middlewareData[name] = {
896
+ ...middlewareData[name],
897
+ ...data
898
+ };
899
+ if (reset && resetCount < MAX_RESET_COUNT) {
900
+ resetCount++;
901
+ if (typeof reset === 'object') {
902
+ if (reset.placement) {
903
+ statefulPlacement = reset.placement;
904
+ }
905
+ if (reset.rects) {
906
+ rects = reset.rects === true ? await platform.getElementRects({
907
+ reference,
908
+ floating,
909
+ strategy
910
+ }) : reset.rects;
911
+ }
912
+ ({
913
+ x,
914
+ y
915
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
916
+ }
917
+ i = -1;
918
+ }
919
+ }
920
+ return {
921
+ x,
922
+ y,
923
+ placement: statefulPlacement,
924
+ strategy,
925
+ middlewareData
926
+ };
927
+ };
928
+
929
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
930
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
931
+ return allowedPlacementsSortedByAlignment.filter(placement => {
932
+ if (alignment) {
933
+ return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
934
+ }
935
+ return true;
936
+ });
937
+ }
938
+ /**
939
+ * Optimizes the visibility of the floating element by choosing the placement
940
+ * that has the most space available automatically, without needing to specify a
941
+ * preferred placement. Alternative to `flip`.
942
+ * @see https://floating-ui.com/docs/autoPlacement
943
+ */
944
+ const autoPlacement$1 = function (options) {
945
+ if (options === void 0) {
946
+ options = {};
947
+ }
948
+ return {
949
+ name: 'autoPlacement',
950
+ options,
951
+ async fn(state) {
952
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
953
+ const {
954
+ rects,
955
+ middlewareData,
956
+ placement,
957
+ platform,
958
+ elements
959
+ } = state;
960
+ const {
961
+ crossAxis = false,
962
+ alignment,
963
+ allowedPlacements = placements,
964
+ autoAlignment = true,
965
+ ...detectOverflowOptions
966
+ } = evaluate(options, state);
967
+ const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
968
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
969
+ const currentPlacement = placements$1[currentIndex];
970
+ if (currentPlacement == null) {
971
+ return {};
972
+ }
973
+
974
+ // Make `computeCoords` start from the right place.
975
+ if (placement !== currentPlacement) {
976
+ return {
977
+ reset: {
978
+ placement: placements$1[0]
979
+ }
980
+ };
981
+ }
982
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
983
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
984
+ const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
985
+ const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
986
+ placement: currentPlacement,
987
+ overflows: currentOverflows
988
+ }];
989
+ const nextPlacement = placements$1[currentIndex + 1];
990
+
991
+ // There are more placements to check.
992
+ if (nextPlacement) {
993
+ return {
994
+ data: {
995
+ index: currentIndex + 1,
996
+ overflows: allOverflows
997
+ },
998
+ reset: {
999
+ placement: nextPlacement
1000
+ }
1001
+ };
1002
+ }
1003
+ const placementsSortedByMostSpace = allOverflows.map(d => {
1004
+ const alignment = getAlignment(d.placement);
1005
+ return [d.placement, alignment && crossAxis ?
1006
+ // Check along the mainAxis and main crossAxis side.
1007
+ d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
1008
+ // Check only the mainAxis.
1009
+ d.overflows[0], d.overflows];
1010
+ }).sort((a, b) => a[1] - b[1]);
1011
+ const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
1012
+ // Aligned placements should not check their opposite crossAxis
1013
+ // side.
1014
+ getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
1015
+ const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
1016
+ if (resetPlacement !== placement) {
1017
+ return {
1018
+ data: {
1019
+ index: currentIndex + 1,
1020
+ overflows: allOverflows
1021
+ },
1022
+ reset: {
1023
+ placement: resetPlacement
1024
+ }
1025
+ };
1026
+ }
1027
+ return {};
1028
+ }
1029
+ };
1030
+ };
1031
+
1032
+ /**
1033
+ * Optimizes the visibility of the floating element by flipping the `placement`
1034
+ * in order to keep it in view when the preferred placement(s) will overflow the
1035
+ * clipping boundary. Alternative to `autoPlacement`.
1036
+ * @see https://floating-ui.com/docs/flip
1037
+ */
1038
+ const flip$1 = function (options) {
1039
+ if (options === void 0) {
1040
+ options = {};
1041
+ }
1042
+ return {
1043
+ name: 'flip',
1044
+ options,
1045
+ async fn(state) {
1046
+ var _middlewareData$arrow, _middlewareData$flip;
1047
+ const {
1048
+ placement,
1049
+ middlewareData,
1050
+ rects,
1051
+ initialPlacement,
1052
+ platform,
1053
+ elements
1054
+ } = state;
1055
+ const {
1056
+ mainAxis: checkMainAxis = true,
1057
+ crossAxis: checkCrossAxis = true,
1058
+ fallbackPlacements: specifiedFallbackPlacements,
1059
+ fallbackStrategy = 'bestFit',
1060
+ fallbackAxisSideDirection = 'none',
1061
+ flipAlignment = true,
1062
+ ...detectOverflowOptions
1063
+ } = evaluate(options, state);
1064
+
1065
+ // If a reset by the arrow was caused due to an alignment offset being
1066
+ // added, we should skip any logic now since `flip()` has already done its
1067
+ // work.
1068
+ // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
1069
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
1070
+ return {};
1071
+ }
1072
+ const side = getSide(placement);
1073
+ const initialSideAxis = getSideAxis(initialPlacement);
1074
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
1075
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1076
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
1077
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
1078
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
1079
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
1080
+ }
1081
+ const placements = [initialPlacement, ...fallbackPlacements];
1082
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
1083
+ const overflows = [];
1084
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
1085
+ if (checkMainAxis) {
1086
+ overflows.push(overflow[side]);
1087
+ }
1088
+ if (checkCrossAxis) {
1089
+ const sides = getAlignmentSides(placement, rects, rtl);
1090
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
1091
+ }
1092
+ overflowsData = [...overflowsData, {
1093
+ placement,
1094
+ overflows
1095
+ }];
1096
+
1097
+ // One or more sides is overflowing.
1098
+ if (!overflows.every(side => side <= 0)) {
1099
+ var _middlewareData$flip2, _overflowsData$filter;
1100
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
1101
+ const nextPlacement = placements[nextIndex];
1102
+ if (nextPlacement) {
1103
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
1104
+ if (!ignoreCrossAxisOverflow ||
1105
+ // We leave the current main axis only if every placement on that axis
1106
+ // overflows the main axis.
1107
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
1108
+ // Try next placement and re-run the lifecycle.
1109
+ return {
1110
+ data: {
1111
+ index: nextIndex,
1112
+ overflows: overflowsData
1113
+ },
1114
+ reset: {
1115
+ placement: nextPlacement
1116
+ }
1117
+ };
1118
+ }
1119
+ }
1120
+
1121
+ // First, find the candidates that fit on the mainAxis side of overflow,
1122
+ // then find the placement that fits the best on the main crossAxis side.
1123
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
1124
+
1125
+ // Otherwise fallback.
1126
+ if (!resetPlacement) {
1127
+ switch (fallbackStrategy) {
1128
+ case 'bestFit':
1129
+ {
1130
+ var _overflowsData$filter2;
1131
+ const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
1132
+ if (hasFallbackAxisSideDirection) {
1133
+ const currentSideAxis = getSideAxis(d.placement);
1134
+ return currentSideAxis === initialSideAxis ||
1135
+ // Create a bias to the `y` side axis due to horizontal
1136
+ // reading directions favoring greater width.
1137
+ currentSideAxis === 'y';
1138
+ }
1139
+ return true;
1140
+ }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
1141
+ if (placement) {
1142
+ resetPlacement = placement;
1143
+ }
1144
+ break;
1145
+ }
1146
+ case 'initialPlacement':
1147
+ resetPlacement = initialPlacement;
1148
+ break;
1149
+ }
1150
+ }
1151
+ if (placement !== resetPlacement) {
1152
+ return {
1153
+ reset: {
1154
+ placement: resetPlacement
1155
+ }
1156
+ };
1157
+ }
1158
+ }
1159
+ return {};
1160
+ }
1161
+ };
1162
+ };
1163
+
1164
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
1165
+
1166
+ // For type backwards-compatibility, the `OffsetOptions` type was also
1167
+ // Derivable.
1168
+
1169
+ async function convertValueToCoords(state, options) {
1170
+ const {
1171
+ placement,
1172
+ platform,
1173
+ elements
1174
+ } = state;
1175
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1176
+ const side = getSide(placement);
1177
+ const alignment = getAlignment(placement);
1178
+ const isVertical = getSideAxis(placement) === 'y';
1179
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
1180
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
1181
+ const rawValue = evaluate(options, state);
1182
+
1183
+ // eslint-disable-next-line prefer-const
1184
+ let {
1185
+ mainAxis,
1186
+ crossAxis,
1187
+ alignmentAxis
1188
+ } = typeof rawValue === 'number' ? {
1189
+ mainAxis: rawValue,
1190
+ crossAxis: 0,
1191
+ alignmentAxis: null
1192
+ } : {
1193
+ mainAxis: rawValue.mainAxis || 0,
1194
+ crossAxis: rawValue.crossAxis || 0,
1195
+ alignmentAxis: rawValue.alignmentAxis
1196
+ };
1197
+ if (alignment && typeof alignmentAxis === 'number') {
1198
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
1199
+ }
1200
+ return isVertical ? {
1201
+ x: crossAxis * crossAxisMulti,
1202
+ y: mainAxis * mainAxisMulti
1203
+ } : {
1204
+ x: mainAxis * mainAxisMulti,
1205
+ y: crossAxis * crossAxisMulti
1206
+ };
1207
+ }
1208
+
1209
+ /**
1210
+ * Modifies the placement by translating the floating element along the
1211
+ * specified axes.
1212
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1213
+ * object may be passed.
1214
+ * @see https://floating-ui.com/docs/offset
1215
+ */
1216
+ const offset$1 = function (options) {
1217
+ if (options === void 0) {
1218
+ options = 0;
1219
+ }
1220
+ return {
1221
+ name: 'offset',
1222
+ options,
1223
+ async fn(state) {
1224
+ var _middlewareData$offse, _middlewareData$arrow;
1225
+ const {
1226
+ x,
1227
+ y,
1228
+ placement,
1229
+ middlewareData
1230
+ } = state;
1231
+ const diffCoords = await convertValueToCoords(state, options);
1232
+
1233
+ // If the placement is the same and the arrow caused an alignment offset
1234
+ // then we don't need to change the positioning coordinates.
1235
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
1236
+ return {};
1237
+ }
1238
+ return {
1239
+ x: x + diffCoords.x,
1240
+ y: y + diffCoords.y,
1241
+ data: {
1242
+ ...diffCoords,
1243
+ placement
1244
+ }
1245
+ };
1246
+ }
1247
+ };
1248
+ };
1249
+
1250
+ /**
1251
+ * Optimizes the visibility of the floating element by shifting it in order to
1252
+ * keep it in view when it will overflow the clipping boundary.
1253
+ * @see https://floating-ui.com/docs/shift
1254
+ */
1255
+ const shift$1 = function (options) {
1256
+ if (options === void 0) {
1257
+ options = {};
1258
+ }
1259
+ return {
1260
+ name: 'shift',
1261
+ options,
1262
+ async fn(state) {
1263
+ const {
1264
+ x,
1265
+ y,
1266
+ placement,
1267
+ platform
1268
+ } = state;
1269
+ const {
1270
+ mainAxis: checkMainAxis = true,
1271
+ crossAxis: checkCrossAxis = false,
1272
+ limiter = {
1273
+ fn: _ref => {
1274
+ let {
1275
+ x,
1276
+ y
1277
+ } = _ref;
1278
+ return {
1279
+ x,
1280
+ y
1281
+ };
1282
+ }
1283
+ },
1284
+ ...detectOverflowOptions
1285
+ } = evaluate(options, state);
1286
+ const coords = {
1287
+ x,
1288
+ y
1289
+ };
1290
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
1291
+ const crossAxis = getSideAxis(placement);
1292
+ const mainAxis = getOppositeAxis(crossAxis);
1293
+ let mainAxisCoord = coords[mainAxis];
1294
+ let crossAxisCoord = coords[crossAxis];
1295
+ const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);
1296
+ if (checkMainAxis) {
1297
+ mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
1298
+ }
1299
+ if (checkCrossAxis) {
1300
+ crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
1301
+ }
1302
+ const limitedCoords = limiter.fn({
1303
+ ...state,
1304
+ [mainAxis]: mainAxisCoord,
1305
+ [crossAxis]: crossAxisCoord
1306
+ });
1307
+ return {
1308
+ ...limitedCoords,
1309
+ data: {
1310
+ x: limitedCoords.x - x,
1311
+ y: limitedCoords.y - y,
1312
+ enabled: {
1313
+ [mainAxis]: checkMainAxis,
1314
+ [crossAxis]: checkCrossAxis
1315
+ }
1316
+ }
1317
+ };
1318
+ }
1319
+ };
1320
+ };
1321
+
1322
+ function hasWindow() {
1323
+ return typeof window !== 'undefined';
1324
+ }
1325
+ function getNodeName(node) {
1326
+ if (isNode(node)) {
1327
+ return (node.nodeName || '').toLowerCase();
1328
+ }
1329
+ // Mocked nodes in testing environments may not be instances of Node. By
1330
+ // returning `#document` an infinite loop won't occur.
1331
+ // https://github.com/floating-ui/floating-ui/issues/2317
1332
+ return '#document';
1333
+ }
1334
+ function getWindow(node) {
1335
+ var _node$ownerDocument;
1336
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1337
+ }
1338
+ function getDocumentElement(node) {
1339
+ var _ref;
1340
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1341
+ }
1342
+ function isNode(value) {
1343
+ if (!hasWindow()) {
1344
+ return false;
1345
+ }
1346
+ return value instanceof Node || value instanceof getWindow(value).Node;
1347
+ }
1348
+ function isElement(value) {
1349
+ if (!hasWindow()) {
1350
+ return false;
1351
+ }
1352
+ return value instanceof Element || value instanceof getWindow(value).Element;
1353
+ }
1354
+ function isHTMLElement(value) {
1355
+ if (!hasWindow()) {
1356
+ return false;
1357
+ }
1358
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1359
+ }
1360
+ function isShadowRoot(value) {
1361
+ if (!hasWindow() || typeof ShadowRoot === 'undefined') {
1362
+ return false;
1363
+ }
1364
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1365
+ }
1366
+ function isOverflowElement(element) {
1367
+ const {
1368
+ overflow,
1369
+ overflowX,
1370
+ overflowY,
1371
+ display
1372
+ } = getComputedStyle$1(element);
1373
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
1374
+ }
1375
+ function isTableElement(element) {
1376
+ return /^(table|td|th)$/.test(getNodeName(element));
1377
+ }
1378
+ function isTopLayer(element) {
1379
+ try {
1380
+ if (element.matches(':popover-open')) {
1381
+ return true;
1382
+ }
1383
+ } catch (_e) {
1384
+ // no-op
1385
+ }
1386
+ try {
1387
+ return element.matches(':modal');
1388
+ } catch (_e) {
1389
+ return false;
1390
+ }
1391
+ }
1392
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1393
+ const containRe = /paint|layout|strict|content/;
1394
+ const isNotNone = value => !!value && value !== 'none';
1395
+ let isWebKitValue;
1396
+ function isContainingBlock(elementOrCss) {
1397
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
1398
+
1399
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1400
+ // https://drafts.csswg.org/css-transforms-2/#individual-transforms
1401
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
1402
+ }
1403
+ function getContainingBlock(element) {
1404
+ let currentNode = getParentNode(element);
1405
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1406
+ if (isContainingBlock(currentNode)) {
1407
+ return currentNode;
1408
+ } else if (isTopLayer(currentNode)) {
1409
+ return null;
1410
+ }
1411
+ currentNode = getParentNode(currentNode);
1412
+ }
1413
+ return null;
1414
+ }
1415
+ function isWebKit() {
1416
+ if (isWebKitValue == null) {
1417
+ isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
1418
+ }
1419
+ return isWebKitValue;
1420
+ }
1421
+ function isLastTraversableNode(node) {
1422
+ return /^(html|body|#document)$/.test(getNodeName(node));
1423
+ }
1424
+ function getComputedStyle$1(element) {
1425
+ return getWindow(element).getComputedStyle(element);
1426
+ }
1427
+ function getNodeScroll(element) {
1428
+ if (isElement(element)) {
1429
+ return {
1430
+ scrollLeft: element.scrollLeft,
1431
+ scrollTop: element.scrollTop
1432
+ };
1433
+ }
1434
+ return {
1435
+ scrollLeft: element.scrollX,
1436
+ scrollTop: element.scrollY
1437
+ };
1438
+ }
1439
+ function getParentNode(node) {
1440
+ if (getNodeName(node) === 'html') {
1441
+ return node;
1442
+ }
1443
+ const result =
1444
+ // Step into the shadow DOM of the parent of a slotted node.
1445
+ node.assignedSlot ||
1446
+ // DOM Element detected.
1447
+ node.parentNode ||
1448
+ // ShadowRoot detected.
1449
+ isShadowRoot(node) && node.host ||
1450
+ // Fallback.
1451
+ getDocumentElement(node);
1452
+ return isShadowRoot(result) ? result.host : result;
1453
+ }
1454
+ function getNearestOverflowAncestor(node) {
1455
+ const parentNode = getParentNode(node);
1456
+ if (isLastTraversableNode(parentNode)) {
1457
+ return (node.ownerDocument || node).body;
1458
+ }
1459
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1460
+ return parentNode;
1461
+ }
1462
+ return getNearestOverflowAncestor(parentNode);
1463
+ }
1464
+ function getOverflowAncestors(node, list, traverseIframes) {
1465
+ var _node$ownerDocument2;
1466
+ if (list === void 0) {
1467
+ list = [];
1468
+ }
1469
+ if (traverseIframes === void 0) {
1470
+ traverseIframes = true;
1471
+ }
1472
+ const scrollableAncestor = getNearestOverflowAncestor(node);
1473
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1474
+ const win = getWindow(scrollableAncestor);
1475
+ if (isBody) {
1476
+ const frameElement = getFrameElement(win);
1477
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1478
+ } else {
1479
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1480
+ }
1481
+ }
1482
+ function getFrameElement(win) {
1483
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1484
+ }
1485
+
1486
+ function getCssDimensions(element) {
1487
+ const css = getComputedStyle$1(element);
1488
+ // In testing environments, the `width` and `height` properties are empty
1489
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
1490
+ let width = parseFloat(css.width) || 0;
1491
+ let height = parseFloat(css.height) || 0;
1492
+ const hasOffset = isHTMLElement(element);
1493
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
1494
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
1495
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
1496
+ if (shouldFallback) {
1497
+ width = offsetWidth;
1498
+ height = offsetHeight;
1499
+ }
1500
+ return {
1501
+ width,
1502
+ height,
1503
+ $: shouldFallback
1504
+ };
1505
+ }
1506
+
1507
+ function unwrapElement(element) {
1508
+ return !isElement(element) ? element.contextElement : element;
1509
+ }
1510
+
1511
+ function getScale(element) {
1512
+ const domElement = unwrapElement(element);
1513
+ if (!isHTMLElement(domElement)) {
1514
+ return createCoords(1);
1515
+ }
1516
+ const rect = domElement.getBoundingClientRect();
1517
+ const {
1518
+ width,
1519
+ height,
1520
+ $
1521
+ } = getCssDimensions(domElement);
1522
+ let x = ($ ? round(rect.width) : rect.width) / width;
1523
+ let y = ($ ? round(rect.height) : rect.height) / height;
1524
+
1525
+ // 0, NaN, or Infinity should always fallback to 1.
1526
+
1527
+ if (!x || !Number.isFinite(x)) {
1528
+ x = 1;
1529
+ }
1530
+ if (!y || !Number.isFinite(y)) {
1531
+ y = 1;
1532
+ }
1533
+ return {
1534
+ x,
1535
+ y
1536
+ };
1537
+ }
1538
+
1539
+ const noOffsets = /*#__PURE__*/createCoords(0);
1540
+ function getVisualOffsets(element) {
1541
+ const win = getWindow(element);
1542
+ if (!isWebKit() || !win.visualViewport) {
1543
+ return noOffsets;
1544
+ }
1545
+ return {
1546
+ x: win.visualViewport.offsetLeft,
1547
+ y: win.visualViewport.offsetTop
1548
+ };
1549
+ }
1550
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
1551
+ if (isFixed === void 0) {
1552
+ isFixed = false;
1553
+ }
1554
+ return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
1555
+ }
1556
+
1557
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1558
+ if (includeScale === void 0) {
1559
+ includeScale = false;
1560
+ }
1561
+ if (isFixedStrategy === void 0) {
1562
+ isFixedStrategy = false;
1563
+ }
1564
+ const clientRect = element.getBoundingClientRect();
1565
+ const domElement = unwrapElement(element);
1566
+ let scale = createCoords(1);
1567
+ if (includeScale) {
1568
+ if (offsetParent) {
1569
+ if (isElement(offsetParent)) {
1570
+ scale = getScale(offsetParent);
1571
+ }
1572
+ } else {
1573
+ scale = getScale(element);
1574
+ }
1575
+ }
1576
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
1577
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
1578
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
1579
+ let width = clientRect.width / scale.x;
1580
+ let height = clientRect.height / scale.y;
1581
+ if (domElement && offsetParent) {
1582
+ const win = getWindow(domElement);
1583
+ const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1584
+ let currentWin = win;
1585
+ let currentIFrame = getFrameElement(currentWin);
1586
+ while (currentIFrame && offsetWin !== currentWin) {
1587
+ const iframeScale = getScale(currentIFrame);
1588
+ const iframeRect = currentIFrame.getBoundingClientRect();
1589
+ const css = getComputedStyle$1(currentIFrame);
1590
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1591
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1592
+ x *= iframeScale.x;
1593
+ y *= iframeScale.y;
1594
+ width *= iframeScale.x;
1595
+ height *= iframeScale.y;
1596
+ x += left;
1597
+ y += top;
1598
+ currentWin = getWindow(currentIFrame);
1599
+ currentIFrame = getFrameElement(currentWin);
1600
+ }
1601
+ }
1602
+ return rectToClientRect({
1603
+ width,
1604
+ height,
1605
+ x,
1606
+ y
1607
+ });
1608
+ }
1609
+
1610
+ // If <html> has a CSS width greater than the viewport, then this will be
1611
+ // incorrect for RTL.
1612
+ function getWindowScrollBarX(element, rect) {
1613
+ const leftScroll = getNodeScroll(element).scrollLeft;
1614
+ if (!rect) {
1615
+ return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
1616
+ }
1617
+ return rect.left + leftScroll;
1618
+ }
1619
+
1620
+ function getHTMLOffset(documentElement, scroll) {
1621
+ const htmlRect = documentElement.getBoundingClientRect();
1622
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
1623
+ const y = htmlRect.top + scroll.scrollTop;
1624
+ return {
1625
+ x,
1626
+ y
1627
+ };
1628
+ }
1629
+
1630
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1631
+ let {
1632
+ elements,
1633
+ rect,
1634
+ offsetParent,
1635
+ strategy
1636
+ } = _ref;
1637
+ const isFixed = strategy === 'fixed';
1638
+ const documentElement = getDocumentElement(offsetParent);
1639
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
1640
+ if (offsetParent === documentElement || topLayer && isFixed) {
1641
+ return rect;
1642
+ }
1643
+ let scroll = {
1644
+ scrollLeft: 0,
1645
+ scrollTop: 0
1646
+ };
1647
+ let scale = createCoords(1);
1648
+ const offsets = createCoords(0);
1649
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1650
+ if (isOffsetParentAnElement || !isFixed) {
1651
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1652
+ scroll = getNodeScroll(offsetParent);
1653
+ }
1654
+ if (isOffsetParentAnElement) {
1655
+ const offsetRect = getBoundingClientRect(offsetParent);
1656
+ scale = getScale(offsetParent);
1657
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1658
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1659
+ }
1660
+ }
1661
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1662
+ return {
1663
+ width: rect.width * scale.x,
1664
+ height: rect.height * scale.y,
1665
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
1666
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
1667
+ };
1668
+ }
1669
+
1670
+ function getClientRects(element) {
1671
+ return element.getClientRects ? Array.from(element.getClientRects()) : [];
1672
+ }
1673
+
1674
+ // Gets the entire size of the scrollable document area, even extending outside
1675
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
1676
+ function getDocumentRect(html) {
1677
+ const scroll = getNodeScroll(html);
1678
+ const body = html.ownerDocument.body;
1679
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1680
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1681
+ let x = -scroll.scrollLeft + getWindowScrollBarX(html);
1682
+ const y = -scroll.scrollTop;
1683
+ if (getComputedStyle$1(body).direction === 'rtl') {
1684
+ x += max(html.clientWidth, body.clientWidth) - width;
1685
+ }
1686
+ return {
1687
+ width,
1688
+ height,
1689
+ x,
1690
+ y
1691
+ };
1692
+ }
1693
+
1694
+ // Safety check: ensure the scrollbar space is reasonable in case this
1695
+ // calculation is affected by unusual styles.
1696
+ // Most scrollbars leave 15-18px of space.
1697
+ const SCROLLBAR_MAX = 25;
1698
+ function getViewportRect(element, strategy, rootBoundary) {
1699
+ if (rootBoundary === void 0) {
1700
+ rootBoundary = 'viewport';
1701
+ }
1702
+ const isLayoutViewport = rootBoundary === 'layoutViewport';
1703
+ const win = getWindow(element);
1704
+ const html = getDocumentElement(element);
1705
+ const visualViewport = win.visualViewport;
1706
+ let width = html.clientWidth;
1707
+ let height = html.clientHeight;
1708
+ let x = 0;
1709
+ let y = 0;
1710
+ if (visualViewport) {
1711
+ // Client coordinates are relative to the layout viewport, except in
1712
+ // WebKit with an `absolute` strategy, where they are relative to the
1713
+ // visual viewport.
1714
+ const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';
1715
+ if (isLayoutViewport) {
1716
+ if (!layoutRelativeClientCoords) {
1717
+ x = -visualViewport.offsetLeft;
1718
+ y = -visualViewport.offsetTop;
1719
+ }
1720
+ } else {
1721
+ width = visualViewport.width;
1722
+ height = visualViewport.height;
1723
+ if (layoutRelativeClientCoords) {
1724
+ x = visualViewport.offsetLeft;
1725
+ y = visualViewport.offsetTop;
1726
+ }
1727
+ }
1728
+ }
1729
+ const windowScrollbarX = getWindowScrollBarX(html);
1730
+ // `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks
1731
+ // the visual width but isn't reflected in `html.clientWidth`, so subtract it.
1732
+ // Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also
1733
+ // reserves an empty inline-start gutter that clips nothing, so exclude just
1734
+ // the one scrollbar-side gutter — halve the measured (two-gutter) total. A
1735
+ // left-side scrollbar (`windowScrollbarX > 0`) is already handled by
1736
+ // `getHTMLOffset`/`visualViewport.width`; skip it here.
1737
+ if (windowScrollbarX <= 0) {
1738
+ const doc = html.ownerDocument;
1739
+ const body = doc.body;
1740
+ const bodyStyles = getComputedStyle(body);
1741
+ const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
1742
+ const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
1743
+ const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;
1744
+ if (gutter <= SCROLLBAR_MAX) {
1745
+ width -= gutter;
1746
+ }
1747
+ }
1748
+ return {
1749
+ width,
1750
+ height,
1751
+ x,
1752
+ y
1753
+ };
1754
+ }
1755
+
1756
+ // Returns the inner client rect, subtracting scrollbars if present.
1757
+ function getInnerBoundingClientRect(element, strategy) {
1758
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
1759
+ const top = clientRect.top + element.clientTop;
1760
+ const left = clientRect.left + element.clientLeft;
1761
+ const scale = getScale(element);
1762
+ const width = element.clientWidth * scale.x;
1763
+ const height = element.clientHeight * scale.y;
1764
+ const x = left * scale.x;
1765
+ const y = top * scale.y;
1766
+ return {
1767
+ width,
1768
+ height,
1769
+ x,
1770
+ y
1771
+ };
1772
+ }
1773
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1774
+ let rect;
1775
+ if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') {
1776
+ rect = getViewportRect(element, strategy, clippingAncestor);
1777
+ } else if (clippingAncestor === 'document') {
1778
+ rect = getDocumentRect(getDocumentElement(element));
1779
+ } else if (isElement(clippingAncestor)) {
1780
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
1781
+ } else {
1782
+ const visualOffsets = getVisualOffsets(element);
1783
+ rect = {
1784
+ x: clippingAncestor.x - visualOffsets.x,
1785
+ y: clippingAncestor.y - visualOffsets.y,
1786
+ width: clippingAncestor.width,
1787
+ height: clippingAncestor.height
1788
+ };
1789
+ }
1790
+ return rectToClientRect(rect);
1791
+ }
1792
+
1793
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
1794
+ // clipping (or hiding) child elements. This returns all clipping ancestors
1795
+ // of the given element up the tree.
1796
+ function getClippingElementAncestors(element, cache) {
1797
+ const cachedResult = cache.get(element);
1798
+ if (cachedResult) {
1799
+ return cachedResult;
1800
+ }
1801
+ let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
1802
+ let lastKeptComputedStyle = null;
1803
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1804
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1805
+
1806
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1807
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1808
+ const computedStyle = getComputedStyle$1(currentNode);
1809
+ const currentNodeIsContaining = isContainingBlock(currentNode);
1810
+ // Position of the containing block chain below the current node. A fixed
1811
+ // element whose containing block hasn't been found yet is a fixed chain.
1812
+ const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';
1813
+
1814
+ // A non-containing ancestor does not clip the element when the chain
1815
+ // below it escapes it: a fixed chain escapes all ancestors up to the
1816
+ // next containing block, an absolute chain escapes static ancestors.
1817
+ const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');
1818
+ if (shouldDropCurrentNode) {
1819
+ // Drop non-containing blocks.
1820
+ result = result.filter(ancestor => ancestor !== currentNode);
1821
+ } else {
1822
+ // The kept node carries the chain position for the next iteration.
1823
+ lastKeptComputedStyle = computedStyle;
1824
+ }
1825
+ currentNode = getParentNode(currentNode);
1826
+ }
1827
+ cache.set(element, result);
1828
+ return result;
1829
+ }
1830
+
1831
+ // Gets the maximum area that the element is visible in due to any number of
1832
+ // clipping ancestors.
1833
+ function getClippingRect(_ref) {
1834
+ let {
1835
+ element,
1836
+ boundary,
1837
+ rootBoundary,
1838
+ strategy
1839
+ } = _ref;
1840
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
1841
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1842
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
1843
+ let top = firstRect.top;
1844
+ let right = firstRect.right;
1845
+ let bottom = firstRect.bottom;
1846
+ let left = firstRect.left;
1847
+ for (let i = 1; i < clippingAncestors.length; i++) {
1848
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
1849
+ top = max(rect.top, top);
1850
+ right = min(rect.right, right);
1851
+ bottom = min(rect.bottom, bottom);
1852
+ left = max(rect.left, left);
1853
+ }
1854
+ return {
1855
+ width: right - left,
1856
+ height: bottom - top,
1857
+ x: left,
1858
+ y: top
1859
+ };
1860
+ }
1861
+
1862
+ function getDimensions(element) {
1863
+ const {
1864
+ width,
1865
+ height
1866
+ } = getCssDimensions(element);
1867
+ return {
1868
+ width,
1869
+ height
1870
+ };
1871
+ }
1872
+
1873
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1874
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1875
+ const documentElement = getDocumentElement(offsetParent);
1876
+ const isFixed = strategy === 'fixed';
1877
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1878
+ let scroll = {
1879
+ scrollLeft: 0,
1880
+ scrollTop: 0
1881
+ };
1882
+ const offsets = createCoords(0);
1883
+ if (isOffsetParentAnElement || !isFixed) {
1884
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1885
+ scroll = getNodeScroll(offsetParent);
1886
+ }
1887
+ if (isOffsetParentAnElement) {
1888
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1889
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1890
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1891
+ }
1892
+ }
1893
+
1894
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1895
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1896
+ if (!isOffsetParentAnElement && documentElement) {
1897
+ offsets.x = getWindowScrollBarX(documentElement);
1898
+ }
1899
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1900
+ const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1901
+ const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
1902
+ return {
1903
+ x,
1904
+ y,
1905
+ width: rect.width,
1906
+ height: rect.height
1907
+ };
1908
+ }
1909
+
1910
+ function isStaticPositioned(element) {
1911
+ return getComputedStyle$1(element).position === 'static';
1912
+ }
1913
+
1914
+ function getTrueOffsetParent(element, polyfill) {
1915
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
1916
+ return null;
1917
+ }
1918
+ if (polyfill) {
1919
+ return polyfill(element);
1920
+ }
1921
+ let rawOffsetParent = element.offsetParent;
1922
+
1923
+ // Firefox returns the <html> element as the offsetParent if it's non-static,
1924
+ // while Chrome and Safari return the <body> element. The <body> element must
1925
+ // be used to perform the correct calculations even if the <html> element is
1926
+ // non-static.
1927
+ if (getDocumentElement(element) === rawOffsetParent) {
1928
+ rawOffsetParent = rawOffsetParent.ownerDocument.body;
1929
+ }
1930
+ return rawOffsetParent;
1931
+ }
1932
+
1933
+ // Gets the closest ancestor positioned element. Handles some edge cases,
1934
+ // such as table ancestors and cross browser bugs.
1935
+ function getOffsetParent(element, polyfill) {
1936
+ const win = getWindow(element);
1937
+ if (isTopLayer(element)) {
1938
+ return win;
1939
+ }
1940
+ if (!isHTMLElement(element)) {
1941
+ let svgOffsetParent = getParentNode(element);
1942
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
1943
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
1944
+ return svgOffsetParent;
1945
+ }
1946
+ svgOffsetParent = getParentNode(svgOffsetParent);
1947
+ }
1948
+ return win;
1949
+ }
1950
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1951
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
1952
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1953
+ }
1954
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
1955
+ return win;
1956
+ }
1957
+ return offsetParent || getContainingBlock(element) || win;
1958
+ }
1959
+
1960
+ const getElementRects = async function (data) {
1961
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1962
+ const getDimensionsFn = this.getDimensions;
1963
+ const floatingDimensions = await getDimensionsFn(data.floating);
1964
+ return {
1965
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
1966
+ floating: {
1967
+ x: 0,
1968
+ y: 0,
1969
+ width: floatingDimensions.width,
1970
+ height: floatingDimensions.height
1971
+ }
1972
+ };
1973
+ };
1974
+
1975
+ function isRTL(element) {
1976
+ return getComputedStyle$1(element).direction === 'rtl';
1977
+ }
1978
+
1979
+ const platform = {
1980
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1981
+ getDocumentElement,
1982
+ getClippingRect,
1983
+ getOffsetParent,
1984
+ getElementRects,
1985
+ getClientRects,
1986
+ getDimensions,
1987
+ getScale,
1988
+ isElement,
1989
+ isRTL
1990
+ };
1991
+
1992
+ function rectsAreEqual(a, b) {
1993
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
1994
+ }
1995
+
1996
+ // https://samthor.au/2021/observing-dom/
1997
+ function observeMove(element, onMove, ancestorResize) {
1998
+ let io = null;
1999
+ let timeoutId;
2000
+ const root = getDocumentElement(element);
2001
+ function cleanup() {
2002
+ var _io;
2003
+ clearTimeout(timeoutId);
2004
+ (_io = io) == null || _io.disconnect();
2005
+ io = null;
2006
+ }
2007
+ function refresh(skip, threshold) {
2008
+ if (skip === void 0) {
2009
+ skip = false;
2010
+ }
2011
+ if (threshold === void 0) {
2012
+ threshold = 1;
2013
+ }
2014
+ cleanup();
2015
+ const elementRectForRootMargin = element.getBoundingClientRect();
2016
+ const {
2017
+ left,
2018
+ top,
2019
+ width,
2020
+ height
2021
+ } = elementRectForRootMargin;
2022
+ if (!skip) {
2023
+ onMove();
2024
+ }
2025
+ if (!width || !height) {
2026
+ return;
2027
+ }
2028
+ const insetTop = floor(top);
2029
+ const insetRight = floor(root.clientWidth - (left + width));
2030
+ const insetBottom = floor(root.clientHeight - (top + height));
2031
+ const insetLeft = floor(left);
2032
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
2033
+ const options = {
2034
+ rootMargin,
2035
+ threshold: max(0, min(1, threshold)) || 1
2036
+ };
2037
+ let isFirstUpdate = true;
2038
+ function handleObserve(entries) {
2039
+ const ratio = entries[0].intersectionRatio;
2040
+
2041
+ // The entry is a snapshot, so the reference may have moved since the
2042
+ // intersection was computed (under performance constraints, or between
2043
+ // consecutive frames of a multi-frame layout shift). The reported ratio
2044
+ // and the observed area are stale in that case and cannot be trusted to
2045
+ // detect subsequent movement, so refresh regardless of the ratio.
2046
+ if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
2047
+ return refresh();
2048
+ }
2049
+ if (ratio !== threshold) {
2050
+ if (!isFirstUpdate) {
2051
+ return refresh();
2052
+ }
2053
+ if (!ratio) {
2054
+ // If the reference is clipped in place, the ratio is 0. Throttle
2055
+ // the refresh to prevent an infinite loop of updates.
2056
+ timeoutId = setTimeout(() => {
2057
+ refresh(false, 1e-7);
2058
+ }, 1000);
2059
+ } else {
2060
+ refresh(false, ratio);
2061
+ }
2062
+ }
2063
+ isFirstUpdate = false;
2064
+ }
2065
+
2066
+ // Older browsers don't support a `document` as the root and will throw an
2067
+ // error.
2068
+ try {
2069
+ io = new IntersectionObserver(handleObserve, {
2070
+ ...options,
2071
+ // Handle <iframe>s
2072
+ root: root.ownerDocument
2073
+ });
2074
+ } catch (_e) {
2075
+ io = new IntersectionObserver(handleObserve, options);
2076
+ }
2077
+ io.observe(element);
2078
+ }
2079
+ const win = getWindow(element);
2080
+ // The window is a resize ancestor, so when `ancestorResize` is enabled its
2081
+ // listener already runs the update on resize. Here we only need to rebuild
2082
+ // the `IntersectionObserver` for the new root size, skipping a redundant
2083
+ // update. When `ancestorResize` is disabled, this becomes the sole update.
2084
+ const handleResize = () => refresh(ancestorResize);
2085
+ win.addEventListener('resize', handleResize);
2086
+ refresh(true);
2087
+ return () => {
2088
+ win.removeEventListener('resize', handleResize);
2089
+ cleanup();
2090
+ };
2091
+ }
2092
+
2093
+ /**
2094
+ * Automatically updates the position of the floating element when necessary.
2095
+ * Should only be called when the floating element is mounted on the DOM or
2096
+ * visible on the screen.
2097
+ * @returns cleanup function that should be invoked when the floating element is
2098
+ * removed from the DOM or hidden from the screen.
2099
+ * @see https://floating-ui.com/docs/autoUpdate
2100
+ */
2101
+ function autoUpdate(reference, floating, update, options) {
2102
+ if (options === void 0) {
2103
+ options = {};
2104
+ }
2105
+ const {
2106
+ ancestorScroll = true,
2107
+ ancestorResize = true,
2108
+ elementResize = typeof ResizeObserver === 'function',
2109
+ layoutShift = typeof IntersectionObserver === 'function',
2110
+ animationFrame = false
2111
+ } = options;
2112
+ const referenceEl = unwrapElement(reference);
2113
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
2114
+ ancestors.forEach(ancestor => {
2115
+ ancestorScroll && ancestor.addEventListener('scroll', update);
2116
+ ancestorResize && ancestor.addEventListener('resize', update);
2117
+ });
2118
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;
2119
+ let reobserveFrame = -1;
2120
+ let resizeObserver = null;
2121
+ if (elementResize) {
2122
+ resizeObserver = new ResizeObserver(_ref => {
2123
+ let [firstEntry] = _ref;
2124
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
2125
+ // Prevent update loops when using the `size` middleware.
2126
+ // https://github.com/floating-ui/floating-ui/issues/1740
2127
+ resizeObserver.unobserve(floating);
2128
+ cancelAnimationFrame(reobserveFrame);
2129
+ reobserveFrame = requestAnimationFrame(() => {
2130
+ var _resizeObserver;
2131
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
2132
+ });
2133
+ }
2134
+ update();
2135
+ });
2136
+ if (referenceEl && !animationFrame) {
2137
+ resizeObserver.observe(referenceEl);
2138
+ }
2139
+ if (floating) {
2140
+ resizeObserver.observe(floating);
2141
+ }
2142
+ }
2143
+ let frameId;
2144
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
2145
+ if (animationFrame) {
2146
+ frameLoop();
2147
+ }
2148
+ function frameLoop() {
2149
+ const nextRefRect = getBoundingClientRect(reference);
2150
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
2151
+ update();
2152
+ }
2153
+ prevRefRect = nextRefRect;
2154
+ frameId = requestAnimationFrame(frameLoop);
2155
+ }
2156
+ update();
2157
+ return () => {
2158
+ var _resizeObserver2;
2159
+ ancestors.forEach(ancestor => {
2160
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
2161
+ ancestorResize && ancestor.removeEventListener('resize', update);
2162
+ });
2163
+ cleanupIo == null || cleanupIo();
2164
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
2165
+ resizeObserver = null;
2166
+ if (animationFrame) {
2167
+ cancelAnimationFrame(frameId);
2168
+ }
2169
+ };
2170
+ }
2171
+
2172
+ /**
2173
+ * Modifies the placement by translating the floating element along the
2174
+ * specified axes.
2175
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
2176
+ * object may be passed.
2177
+ * @see https://floating-ui.com/docs/offset
2178
+ */
2179
+ const offset = offset$1;
2180
+
2181
+ /**
2182
+ * Optimizes the visibility of the floating element by choosing the placement
2183
+ * that has the most space available automatically, without needing to specify a
2184
+ * preferred placement. Alternative to `flip`.
2185
+ * @see https://floating-ui.com/docs/autoPlacement
2186
+ */
2187
+ const autoPlacement = autoPlacement$1;
2188
+
2189
+ /**
2190
+ * Optimizes the visibility of the floating element by shifting it in order to
2191
+ * keep it in view when it will overflow the clipping boundary.
2192
+ * @see https://floating-ui.com/docs/shift
2193
+ */
2194
+ const shift = shift$1;
2195
+
2196
+ /**
2197
+ * Optimizes the visibility of the floating element by flipping the `placement`
2198
+ * in order to keep it in view when the preferred placement(s) will overflow the
2199
+ * clipping boundary. Alternative to `autoPlacement`.
2200
+ * @see https://floating-ui.com/docs/flip
2201
+ */
2202
+ const flip = flip$1;
2203
+
2204
+ /**
2205
+ * Computes the `x` and `y` coordinates that will place the floating element
2206
+ * next to a given reference element.
2207
+ */
2208
+ const computePosition = (reference, floating, options) => {
2209
+ // This caches the expensive `getClippingElementAncestors` function so that
2210
+ // multiple lifecycle resets re-use the same result. It only lives for a
2211
+ // single call. If other functions become expensive, we can add them as well.
2212
+ const cache = new Map();
2213
+ const mergedOptions = options != null ? options : {};
2214
+ const platformWithCache = {
2215
+ ...platform,
2216
+ ...mergedOptions.platform,
2217
+ _c: cache
2218
+ };
2219
+ return computePosition$1(reference, floating, {
2220
+ ...mergedOptions,
2221
+ platform: platformWithCache
2222
+ });
2223
+ };
2224
+
2225
+ /* eslint-disable line-comment-position, no-inline-comments */
2226
+
2227
+
2228
+ const MAX_CONFIGURATION_COUNT = 10;
2229
+
2230
+ class AuroFloatingUI {
2231
+ /**
2232
+ * @private
2233
+ */
2234
+ static isMousePressed = false;
2235
+
2236
+ /**
2237
+ * @private
2238
+ */
2239
+ static isMousePressHandlerInitialized = false;
2240
+
2241
+ /**
2242
+ * @private
2243
+ */
2244
+ static setupMousePressChecker() {
2245
+ if (
2246
+ !AuroFloatingUI.isMousePressHandlerInitialized &&
2247
+ window &&
2248
+ window.addEventListener
2249
+ ) {
2250
+ AuroFloatingUI.isMousePressHandlerInitialized = true;
2251
+
2252
+ // Track timeout for isMousePressed reset to avoid race conditions
2253
+ if (!AuroFloatingUI._mousePressedTimeout) {
2254
+ AuroFloatingUI._mousePressedTimeout = null;
2255
+ }
2256
+ const mouseEventGlobalHandler = (event) => {
2257
+ const isPressed = event.type === "mousedown";
2258
+ if (isPressed) {
2259
+ // Clear any pending timeout to prevent race condition
2260
+ if (AuroFloatingUI._mousePressedTimeout !== null) {
2261
+ clearTimeout(AuroFloatingUI._mousePressedTimeout);
2262
+ AuroFloatingUI._mousePressedTimeout = null;
2263
+ }
2264
+ if (!AuroFloatingUI.isMousePressed) {
2265
+ AuroFloatingUI.isMousePressed = true;
2266
+ }
2267
+ } else if (AuroFloatingUI.isMousePressed && !isPressed) {
2268
+ // Schedule reset and track timeout ID
2269
+ AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
2270
+ AuroFloatingUI.isMousePressed = false;
2271
+ AuroFloatingUI._mousePressedTimeout = null;
2272
+ }, 0);
2273
+ }
2274
+ };
2275
+
2276
+ window.addEventListener("mousedown", mouseEventGlobalHandler);
2277
+ window.addEventListener("mouseup", mouseEventGlobalHandler);
2278
+ }
2279
+ }
2280
+
2281
+ static openingQueue = [];
2282
+
2283
+ /**
2284
+ * Returns the currently active floating UI instance that should be considered "on top".
2285
+ * Prefers any globally tracked expanded dropdown or floater, falling back to the last entry in the local opening queue.
2286
+ *
2287
+ * This getter first checks the global document references for a visible floating UI and returns it if found.
2288
+ * If the global reference is stale or not visible, it clears those references and instead returns the most recently opened instance from `openingQueue`, or `null` if none exist.
2289
+ *
2290
+ * Side effect: clears stale global refs so callers don't need a separate cleanup step.
2291
+ */
2292
+ static get topOpeningFloatingUI() {
2293
+ const existedVisibleFloatingUI =
2294
+ document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
2295
+ if (
2296
+ existedVisibleFloatingUI &&
2297
+ existedVisibleFloatingUI.element.isPopoverVisible
2298
+ ) {
2299
+ return existedVisibleFloatingUI;
2300
+ }
2301
+
2302
+ // clear existedVisibleFloatingUI in case it's not flushed well when it hidden by other reasons (e.g. noToggle + click)
2303
+ document.expandedAuroFormkitDropdown = null;
2304
+ document.expandedAuroFloater = null;
2305
+
2306
+ return AuroFloatingUI.openingQueue.length > 0
2307
+ ? AuroFloatingUI.openingQueue[AuroFloatingUI.openingQueue.length - 1]
2308
+ : null;
2309
+ }
2310
+
2311
+ constructor(element, behavior) {
2312
+ this.element = element;
2313
+ this.behavior = behavior;
2314
+
2315
+ // Store event listener references for cleanup
2316
+ this.focusHandler = null;
2317
+ this.clickHandler = null;
2318
+ this.keyDownHandler = null;
2319
+ this.touchHandler = null;
2320
+
2321
+ /**
2322
+ * @private
2323
+ */
2324
+ this.enableKeyboardHandling = true;
2325
+
2326
+ /**
2327
+ * @private
2328
+ */
2329
+ this.configureTrial = 0;
2330
+
2331
+ /**
2332
+ * @private
2333
+ */
2334
+ this.eventPrefix = undefined;
2335
+
2336
+ /**
2337
+ * @private
2338
+ */
2339
+ this.id = undefined;
2340
+
2341
+ /**
2342
+ * @private
2343
+ */
2344
+ this.showing = false;
2345
+
2346
+ /**
2347
+ * @private
2348
+ */
2349
+ this.strategy = undefined;
2350
+ }
2351
+
2352
+ /**
2353
+ * Mirrors the size of the bibSizer element to the bib content.
2354
+ * Copies the width, height, max-width, and max-height styles from the bibSizer element to the bib content container.
2355
+ * This ensures that the bib content has the same dimensions as the sizer element.
2356
+ */
2357
+ mirrorSize() {
2358
+ const element = this.element;
2359
+ if (!element) {
2360
+ return;
2361
+ }
2362
+
2363
+ // mirror the boxsize from bibSizer
2364
+ if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
2365
+ const sizerStyle = window.getComputedStyle(element.bibSizer);
2366
+ const bibContent = element.bib.shadowRoot.querySelector(".container");
2367
+ if (!bibContent) {
2368
+ return;
2369
+ }
2370
+
2371
+ if (sizerStyle.width !== "0px") {
2372
+ bibContent.style.width = sizerStyle.width;
2373
+ }
2374
+ if (sizerStyle.height !== "0px") {
2375
+ bibContent.style.height = sizerStyle.height;
2376
+ }
2377
+ bibContent.style.maxWidth = sizerStyle.maxWidth;
2378
+ bibContent.style.maxHeight = sizerStyle.maxHeight;
2379
+ }
2380
+ }
2381
+
2382
+ /**
2383
+ * @private
2384
+ * Determines the positioning strategy based on the current viewport size and mobile breakpoint.
2385
+ *
2386
+ * This method checks if the current viewport width is less than or equal to the specified mobile fullscreen breakpoint
2387
+ * defined in the bib element. If it is, the strategy is set to 'fullscreen'; otherwise, it defaults to 'floating'.
2388
+ *
2389
+ * @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
2390
+ */
2391
+ getPositioningStrategy() {
2392
+ const element = this.element;
2393
+ if (!element) {
2394
+ return "floating";
2395
+ }
2396
+
2397
+ const breakpoint =
2398
+ element.bib?.mobileFullscreenBreakpoint ||
2399
+ element.floaterConfig?.fullscreenBreakpoint;
2400
+ switch (this.behavior) {
2401
+ case "tooltip":
2402
+ return "floating";
2403
+ case "dialog":
2404
+ case "drawer":
2405
+ if (breakpoint) {
2406
+ const smallerThanBreakpoint = window.matchMedia(
2407
+ `(max-width: ${breakpoint})`,
2408
+ ).matches;
2409
+
2410
+ this.element.expanded = smallerThanBreakpoint;
2411
+
2412
+ if (this.element.nested) {
2413
+ return "cover";
2414
+ }
2415
+ return smallerThanBreakpoint || this.element.modal
2416
+ ? "fullscreen"
2417
+ : "dialog";
2418
+ }
2419
+ return "dialog";
2420
+ case "dropdown":
2421
+ case undefined:
2422
+ case null:
2423
+ if (breakpoint) {
2424
+ const smallerThanBreakpoint = window.matchMedia(
2425
+ `(max-width: ${breakpoint})`,
2426
+ ).matches;
2427
+ if (smallerThanBreakpoint) {
2428
+ return "fullscreen";
2429
+ }
2430
+ }
2431
+ return "floating";
2432
+ default:
2433
+ return this.behavior;
2434
+ }
2435
+ }
2436
+
2437
+ /**
2438
+ * @private
2439
+ * Positions the bib element based on the current configuration and positioning strategy.
2440
+ *
2441
+ * This method determines the appropriate positioning strategy (fullscreen or not) and configures the bib accordingly.
2442
+ * It also sets up middleware for the floater configuration, computes the position of the bib relative to the trigger element,
2443
+ * and applies the calculated position to the bib's style.
2444
+ */
2445
+ position() {
2446
+ const element = this.element;
2447
+ if (!element) {
2448
+ return;
2449
+ }
2450
+
2451
+ const strategy = this.getPositioningStrategy();
2452
+ this.configureBibStrategy(strategy);
2453
+
2454
+ if (strategy === "floating") {
2455
+ if (!element.trigger || !element.bib) {
2456
+ return;
2457
+ }
2458
+
2459
+ this.mirrorSize();
2460
+ // Define the middlware for the floater configuration
2461
+ const middleware = [
2462
+ offset(element.floaterConfig?.offset || 0),
2463
+ ...(element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
2464
+ ...(element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
2465
+ ...(element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
2466
+ ];
2467
+
2468
+ // Compute the position of the bib
2469
+ computePosition(element.trigger, element.bib, {
2470
+ strategy: element.floaterConfig?.strategy || "fixed",
2471
+ placement: element.floaterConfig?.placement,
2472
+ middleware: middleware || [],
2473
+ }).then(({ x, y }) => {
2474
+ // eslint-disable-line id-length
2475
+ const currentElement = this.element;
2476
+ if (!currentElement?.bib) {
2477
+ return;
2478
+ }
2479
+
2480
+ Object.assign(currentElement.bib.style, {
2481
+ left: `${x}px`,
2482
+ top: `${y}px`,
2483
+ });
2484
+ });
2485
+ } else if (strategy === "cover") {
2486
+ if (!element.parentNode || !element.bib) {
2487
+ return;
2488
+ }
2489
+
2490
+ // Compute the position of the bib
2491
+ computePosition(element.parentNode, element.bib, {
2492
+ placement: "bottom-start",
2493
+ }).then(({ x, y }) => {
2494
+ // eslint-disable-line id-length
2495
+ const currentElement = this.element;
2496
+ if (!currentElement?.bib || !currentElement.parentNode) {
2497
+ return;
2498
+ }
2499
+
2500
+ Object.assign(currentElement.bib.style, {
2501
+ left: `${x}px`,
2502
+ top: `${y - currentElement.parentNode.offsetHeight}px`,
2503
+ width: `${currentElement.parentNode.offsetWidth}px`,
2504
+ height: `${currentElement.parentNode.offsetHeight}px`,
2505
+ });
2506
+ });
2507
+ }
2508
+ }
2509
+
2510
+ /**
2511
+ * @private
2512
+ * Controls whether to lock the scrolling for the document's body.
2513
+ * @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
2514
+ */
2515
+ lockScroll(lock = true) {
2516
+ const element = this.element;
2517
+
2518
+ if (!element?.bib) {
2519
+ return;
2520
+ }
2521
+
2522
+ const dialog = (
2523
+ element.bib?.shadowRoot ||
2524
+ element.bib ||
2525
+ element
2526
+ ).querySelector("dialog");
2527
+ if (dialog) {
2528
+ if (lock) {
2529
+ dialog.setAttribute("aria-modal", "true");
2530
+ } else {
2531
+ dialog.removeAttribute("aria-modal");
2532
+ }
2533
+ }
2534
+
2535
+ if (lock) {
2536
+ if (!this._scrollLocked) {
2537
+ this._scrollLocked = true;
2538
+ this._savedScrollY = window.scrollY;
2539
+ this._savedScrollStyles = {
2540
+ rootScrollbarGutter: document.documentElement.style.scrollbarGutter,
2541
+ rootOverflow: document.documentElement.style.overflow,
2542
+ bodyOverflow: document.body.style.overflow,
2543
+ bodyPosition: document.body.style.position,
2544
+ bodyTop: document.body.style.top,
2545
+ bodyWidth: document.body.style.width,
2546
+ bibTransform: element?.bib?.style.transform,
2547
+ };
2548
+ document.documentElement.style.scrollbarGutter = "stable";
2549
+ document.documentElement.style.overflow = "hidden";
2550
+ document.body.style.overflow = "hidden";
2551
+
2552
+ // position:fixed is the only way to block VoiceOver three-finger swipe,
2553
+ // which bypasses both overflow:hidden and touchmove preventDefault.
2554
+ document.body.style.position = "fixed";
2555
+ document.body.style.top = `-${this._savedScrollY}px`;
2556
+ document.body.style.width = "100%";
2557
+
2558
+ // Keep the bib aligned with the visual viewport as the VKB opens.
2559
+ // A one-shot offsetTop check at lock time is stale by the time the user
2560
+ // taps an input mid-drawer — iOS then pans visualViewport upward and the
2561
+ // bib drifts off-screen. Listen continuously so the transform tracks the pan.
2562
+ // RAF-throttled to avoid a style recalc on every scroll tick during the
2563
+ // keyboard animation; the pending frame is canceled on unlock so it cannot
2564
+ // reapply a translate after bibTransform has been restored.
2565
+ if (window.visualViewport) {
2566
+ this._viewportRafId = undefined;
2567
+ this._viewportHandler = () => {
2568
+ if (this._viewportRafId !== undefined) {
2569
+ return;
2570
+ }
2571
+ this._viewportRafId = requestAnimationFrame(() => {
2572
+ this._viewportRafId = undefined;
2573
+ if (element?.bib) {
2574
+ element.bib.style.transform = `translateY(${window.visualViewport.offsetTop}px)`;
2575
+ }
2576
+ });
2577
+ };
2578
+ window.visualViewport.addEventListener(
2579
+ "resize",
2580
+ this._viewportHandler,
2581
+ );
2582
+ window.visualViewport.addEventListener(
2583
+ "scroll",
2584
+ this._viewportHandler,
2585
+ );
2586
+ this._viewportHandler();
2587
+ }
2588
+
2589
+ this.lockTouchScroll(true);
2590
+ }
2591
+ } else {
2592
+ if (this._scrollLocked) {
2593
+ if (this._viewportHandler && window.visualViewport) {
2594
+ window.visualViewport.removeEventListener(
2595
+ "resize",
2596
+ this._viewportHandler,
2597
+ );
2598
+ window.visualViewport.removeEventListener(
2599
+ "scroll",
2600
+ this._viewportHandler,
2601
+ );
2602
+ this._viewportHandler = undefined;
2603
+ }
2604
+ if (this._viewportRafId !== undefined) {
2605
+ cancelAnimationFrame(this._viewportRafId);
2606
+ this._viewportRafId = undefined;
2607
+ }
2608
+
2609
+ document.documentElement.style.scrollbarGutter =
2610
+ this._savedScrollStyles?.rootScrollbarGutter ?? "";
2611
+ document.documentElement.style.overflow =
2612
+ this._savedScrollStyles?.rootOverflow ?? "";
2613
+ document.body.style.overflow =
2614
+ this._savedScrollStyles?.bodyOverflow ?? "";
2615
+ document.body.style.position =
2616
+ this._savedScrollStyles?.bodyPosition ?? "";
2617
+ document.body.style.top = this._savedScrollStyles?.bodyTop ?? "";
2618
+ document.body.style.width = this._savedScrollStyles?.bodyWidth ?? "";
2619
+ if (element?.bib) {
2620
+ element.bib.style.transform =
2621
+ this._savedScrollStyles?.bibTransform ?? "";
2622
+ }
2623
+ window.scrollTo(0, this._savedScrollY || 0);
2624
+ this._savedScrollY = undefined;
2625
+ this._savedScrollStyles = undefined;
2626
+ this._scrollLocked = false;
2627
+
2628
+ this.lockTouchScroll(false);
2629
+ }
2630
+ }
2631
+ }
2632
+
2633
+ /**
2634
+ * Locks page-level touch scroll while bib is open.
2635
+ * Walks composedPath() so scrollable children inside the dialog still scroll.
2636
+ * @private
2637
+ */
2638
+ lockTouchScroll(lock = true) {
2639
+ if (lock) {
2640
+ if (this._boundTouchMoveHandler) {
2641
+ return;
2642
+ }
2643
+ this._boundTouchMoveHandler = (e) => {
2644
+ const path = e.composedPath();
2645
+ const insideScrollable = path.some(
2646
+ (el) =>
2647
+ el !== document &&
2648
+ el !== document.documentElement &&
2649
+ el !== document.body &&
2650
+ (el.scrollHeight > el.clientHeight ||
2651
+ el.scrollWidth > el.clientWidth),
2652
+ );
2653
+ if (!insideScrollable) {
2654
+ e.preventDefault();
2655
+ }
2656
+ };
2657
+ document.addEventListener("touchmove", this._boundTouchMoveHandler, {
2658
+ passive: false,
2659
+ });
2660
+ } else if (this._boundTouchMoveHandler) {
2661
+ document.removeEventListener("touchmove", this._boundTouchMoveHandler, {
2662
+ passive: false,
2663
+ });
2664
+ this._boundTouchMoveHandler = undefined;
2665
+ }
2666
+ }
2667
+
2668
+ /**
2669
+ * @private
2670
+ * Configures the bib element's display strategy.
2671
+ *
2672
+ * Sets the bib to fullscreen or floating mode based on the provided strategy.
2673
+ * Dispatches a 'strategy-change' event if the strategy changes.
2674
+ *
2675
+ * @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
2676
+ */
2677
+ configureBibStrategy(value) {
2678
+ const element = this.element;
2679
+ if (!element?.bib) {
2680
+ return;
2681
+ }
2682
+
2683
+ if (value === "fullscreen" || value === "dialog") {
2684
+ element.isBibFullscreen = true;
2685
+ // reset the prev position
2686
+ element.bib.setAttribute("isfullscreen", "");
2687
+ element.bib.style.position = "fixed";
2688
+ element.bib.style.top = "0px";
2689
+ element.bib.style.left = "0px";
2690
+ element.bib.style.width = "";
2691
+ element.bib.style.height = "";
2692
+ element.style.contain = "";
2693
+
2694
+ // reset the size that was mirroring `size` css-part
2695
+ const bibContent = element.bib.shadowRoot?.querySelector(".container");
2696
+ if (bibContent) {
2697
+ bibContent.style.width = "";
2698
+ bibContent.style.height = "";
2699
+ bibContent.style.maxWidth = "";
2700
+ bibContent.style.maxHeight = "";
2701
+ this.configureTrial = 0;
2702
+ } else if (this.configureTrial < MAX_CONFIGURATION_COUNT) {
2703
+ this.configureTrial += 1;
2704
+
2705
+ setTimeout(() => {
2706
+ this.configureBibStrategy(value);
2707
+ }, 0);
2708
+ }
2709
+
2710
+ if (element.isPopoverVisible) {
2711
+ this.lockScroll(value === "fullscreen");
2712
+ }
2713
+ } else {
2714
+ element.bib.style.position = "";
2715
+ element.bib.removeAttribute("isfullscreen");
2716
+ element.isBibFullscreen = false;
2717
+ element.style.contain = "layout";
2718
+ }
2719
+
2720
+ const isChanged = this.strategy && this.strategy !== value;
2721
+ this.strategy = value;
2722
+ if (isChanged) {
2723
+ const event = new CustomEvent(
2724
+ this.eventPrefix
2725
+ ? `${this.eventPrefix}-strategy-change`
2726
+ : "strategy-change",
2727
+ {
2728
+ detail: {
2729
+ value,
2730
+ },
2731
+ composed: true,
2732
+ },
2733
+ );
2734
+
2735
+ element.dispatchEvent(event);
2736
+ }
2737
+ }
2738
+
2739
+ updateState() {
2740
+ const element = this.element;
2741
+ if (!element) {
2742
+ return;
2743
+ }
2744
+
2745
+ const isVisible = element.isPopoverVisible;
2746
+ if (!isVisible) {
2747
+ this.cleanupHideHandlers();
2748
+ try {
2749
+ element.cleanup?.();
2750
+ } catch (error) {
2751
+ // Do nothing
2752
+ }
2753
+ }
2754
+ }
2755
+
2756
+ /**
2757
+ * @private
2758
+ * getting called on 'blur' in trigger or `focusin` in document
2759
+ *
2760
+ * Hides the bib if focus moves outside of the trigger or bib, unless a 'noHideOnThisFocusLoss' flag is set.
2761
+ * This method checks if the currently active element is still within the trigger or bib.
2762
+ * If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
2763
+ */
2764
+ handleFocusLoss() {
2765
+ const element = this.element;
2766
+ if (!element?.bib) {
2767
+ return;
2768
+ }
2769
+
2770
+ // if mouse is being pressed, skip and let click event to handle the action
2771
+ if (AuroFloatingUI.isMousePressed) {
2772
+ return;
2773
+ }
2774
+
2775
+ if (
2776
+ element.noHideOnThisFocusLoss ||
2777
+ element.hasAttribute("noHideOnThisFocusLoss")
2778
+ ) {
2779
+ return;
2780
+ }
2781
+
2782
+ // if focus is still inside of trigger or bib, do not close
2783
+ if (element.matches(":focus") || element.matches(":focus-within")) {
2784
+ return;
2785
+ }
2786
+
2787
+ // Chrome-specific: during popover top-layer promotion after a click on a
2788
+ // slotted focusable, :focus-within can briefly evaluate false while the
2789
+ // active element is still structurally inside the trigger/bib. Fall back
2790
+ // to a shadow-piercing ancestry walk from the deep active element before
2791
+ // treating this as a real focus loss.
2792
+ try {
2793
+ let active = document.activeElement;
2794
+ while (active && active.shadowRoot && active.shadowRoot.activeElement) {
2795
+ active = active.shadowRoot.activeElement;
2796
+ }
2797
+ const targets = [element, element.trigger, element.bib].filter(Boolean);
2798
+ let node = active;
2799
+ while (node) {
2800
+ if (targets.includes(node)) {
2801
+ return;
2802
+ }
2803
+ node =
2804
+ node.parentElement ||
2805
+ (node.getRootNode && node.getRootNode().host) ||
2806
+ null;
2807
+ }
2808
+ } catch (e) {
2809
+ // Defensive: fall through to the existing close path if traversal fails.
2810
+ }
2811
+
2812
+ // if fullscreen bib is in fullscreen mode, do not close
2813
+ if (element.bib.hasAttribute("isfullscreen")) {
2814
+ return;
2815
+ }
2816
+
2817
+ // eventType "focusloss" distinguishes a Tab/click-driven close from an
2818
+ // Escape keydown close. Consumers use this to decide whether to restore
2819
+ // focus to the trigger (Escape) or let it advance naturally (Tab).
2820
+ this.hideBib("focusloss");
2821
+ }
2822
+
2823
+ setupHideHandlers() {
2824
+ const element = this.element;
2825
+ if (!element) {
2826
+ return;
2827
+ }
2828
+
2829
+ // Define handlers & store references
2830
+ this.focusHandler = () => this.handleFocusLoss();
2831
+
2832
+ this.clickHandler = (evt) => {
2833
+ const element = this.element;
2834
+ if (!element?.bib) {
2835
+ return;
2836
+ }
2837
+
2838
+ // When the bib is fullscreen (modal dialog), don't close on outside
2839
+ // clicks. VoiceOver's synthetic click events inside a top-layer modal
2840
+ // <dialog> may not include the bib in composedPath(), causing false
2841
+ // positives. This mirrors the fullscreen guard in handleFocusLoss().
2842
+ if (element.bib.hasAttribute("isfullscreen")) {
2843
+ return;
2844
+ }
2845
+
2846
+ if (
2847
+ (!evt.composedPath().includes(element.trigger) &&
2848
+ !evt.composedPath().includes(element.bib)) ||
2849
+ (element.bib.backdrop &&
2850
+ evt.composedPath().includes(element.bib.backdrop))
2851
+ ) {
2852
+ const existedVisibleFloatingUI =
2853
+ document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
2854
+
2855
+ if (
2856
+ existedVisibleFloatingUI &&
2857
+ existedVisibleFloatingUI.element.isPopoverVisible
2858
+ ) {
2859
+ // if something else is open, close that
2860
+ existedVisibleFloatingUI.hideBib();
2861
+ document.expandedAuroFormkitDropdown = null;
2862
+ document.expandedAuroFloater = this;
2863
+ } else {
2864
+ this.hideBib("click");
2865
+ }
2866
+ }
2867
+ };
2868
+
2869
+ // ESC key handler
2870
+ this.keyDownHandler = (evt) => {
2871
+ const element = this.element;
2872
+ if (!element) {
2873
+ return;
2874
+ }
2875
+
2876
+ if (evt.key === "Escape" && element.isPopoverVisible) {
2877
+ const existedVisibleFloatingUI =
2878
+ document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
2879
+ if (
2880
+ existedVisibleFloatingUI &&
2881
+ existedVisibleFloatingUI !== this &&
2882
+ existedVisibleFloatingUI.element.isPopoverVisible
2883
+ ) {
2884
+ // if something else is open, let it handle itself
2885
+ return;
2886
+ }
2887
+ this.hideBib("keydown");
2888
+ }
2889
+ };
2890
+
2891
+ if (this.behavior !== "drawer" && this.behavior !== "dialog") {
2892
+ // Add event listeners using the stored references
2893
+ document.addEventListener("focusin", this.focusHandler);
2894
+ }
2895
+
2896
+ if (this.enableKeyboardHandling) {
2897
+ document.addEventListener("keydown", this.keyDownHandler);
2898
+ }
2899
+
2900
+ // send this task to the end of queue to prevent conflicting
2901
+ // it conflicts if showBib gets call from a button that's not this.element.trigger
2902
+ setTimeout(() => {
2903
+ window.addEventListener("click", this.clickHandler);
2904
+ }, 0);
2905
+
2906
+ // iOS Safari does not fire `click` on non-interactive elements, so
2907
+ // tapping an inert backdrop never reaches the click handler above.
2908
+ // Mirror the same outside-tap logic with a passive touchstart listener.
2909
+ this.touchHandler = (evt) => {
2910
+ const element = this.element;
2911
+ if (!element?.bib) {
2912
+ return;
2913
+ }
2914
+
2915
+ // fullscreen (modal) dialog handles its own dismissal
2916
+ if (element.bib.hasAttribute("isfullscreen")) {
2917
+ return;
2918
+ }
2919
+
2920
+ const path = evt.composedPath();
2921
+ if (!path.includes(element.trigger) && !path.includes(element.bib)) {
2922
+ this.hideBib("click");
2923
+ }
2924
+ };
2925
+
2926
+ window.addEventListener("touchstart", this.touchHandler, { passive: true });
2927
+ }
2928
+
2929
+ cleanupHideHandlers() {
2930
+ // Remove event listeners if they exist
2931
+
2932
+ if (this.focusHandler) {
2933
+ document.removeEventListener("focusin", this.focusHandler);
2934
+ this.focusHandler = null;
2935
+ }
2936
+
2937
+ if (this.clickHandler) {
2938
+ window.removeEventListener("click", this.clickHandler);
2939
+ this.clickHandler = null;
2940
+ }
2941
+
2942
+ if (this.touchHandler) {
2943
+ window.removeEventListener("touchstart", this.touchHandler);
2944
+ this.touchHandler = null;
2945
+ }
2946
+
2947
+ if (this.keyDownHandler) {
2948
+ document.removeEventListener("keydown", this.keyDownHandler);
2949
+ this.keyDownHandler = null;
2950
+ }
2951
+ }
2952
+
2953
+ handleUpdate(changedProperties) {
2954
+ if (changedProperties.has("isPopoverVisible")) {
2955
+ this.updateState();
2956
+ }
2957
+ }
2958
+
2959
+ updateCurrentExpandedDropdown() {
2960
+ if (!this.element) {
2961
+ return;
2962
+ }
2963
+
2964
+ // Close any other dropdown that is already open
2965
+ const existedVisibleFloatingUI =
2966
+ document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
2967
+ if (
2968
+ existedVisibleFloatingUI &&
2969
+ existedVisibleFloatingUI !== this &&
2970
+ existedVisibleFloatingUI.element.isPopoverVisible &&
2971
+ existedVisibleFloatingUI.eventPrefix === this.eventPrefix
2972
+ ) {
2973
+ existedVisibleFloatingUI.hideBib();
2974
+ }
2975
+
2976
+ document.expandedAuroFloater = this;
2977
+ }
2978
+
2979
+ showBib() {
2980
+ const element = this.element;
2981
+ if (!element) {
2982
+ return;
2983
+ }
2984
+
2985
+ if (!element.bib || (!element.trigger && !element.parentNode)) {
2986
+ return;
2987
+ }
2988
+
2989
+ if (!element.disabled && !this.showing) {
2990
+ this.updateCurrentExpandedDropdown();
2991
+ element.triggerChevron?.setAttribute("data-expanded", true);
2992
+
2993
+ // prevent double showing: isPopovervisible gets first and showBib gets called later
2994
+ if (!this.showing) {
2995
+ if (!element.modal) {
2996
+ this.setupHideHandlers();
2997
+ } else {
2998
+ if (this.keyDownHandler) {
2999
+ document.removeEventListener("keydown", this.keyDownHandler);
3000
+ }
3001
+ this.keyDownHandler = (evt) => {
3002
+ if (evt.key === "Escape" && element.isPopoverVisible) {
3003
+ // Intercept at keydown so CloseWatcher never sees the keystroke.
3004
+ // Canceling `cancel` alone is insufficient — a second Esc with no
3005
+ // intervening user activation triggers the anti-trap and fires `close`
3006
+ // directly, bypassing any `cancel` preventDefault (AB#1613688).
3007
+ // stopImmediatePropagation is intentional: it prevents other document
3008
+ // keydown handlers (e.g. consumer code, auro-dialog) from also acting
3009
+ // on Escape while the modal owns the key.
3010
+ evt.preventDefault();
3011
+ evt.stopImmediatePropagation();
3012
+ }
3013
+ };
3014
+ document.addEventListener("keydown", this.keyDownHandler);
3015
+ }
3016
+ this.showing = true;
3017
+ element.isPopoverVisible = true;
3018
+ this.position();
3019
+ this.dispatchEventDropdownToggle();
3020
+ }
3021
+
3022
+ // Setup auto update to handle resize and scroll
3023
+ element.cleanup = autoUpdate(
3024
+ element.trigger || element.parentNode,
3025
+ element.bib,
3026
+ () => {
3027
+ this.position();
3028
+ },
3029
+ );
3030
+
3031
+ const idx = AuroFloatingUI.openingQueue.indexOf(this);
3032
+ if (idx > -1) {
3033
+ AuroFloatingUI.openingQueue.splice(idx, 1);
3034
+ }
3035
+ AuroFloatingUI.openingQueue.push(this);
3036
+ }
3037
+ }
3038
+
3039
+ /**
3040
+ * Hides the floating UI element.
3041
+ * @param {String} eventType - The event type that triggered the hiding action.
3042
+ */
3043
+ hideBib(eventType = "unknown") {
3044
+ const element = this.element;
3045
+ if (!element) {
3046
+ return;
3047
+ }
3048
+
3049
+ if (element.disabled) {
3050
+ return;
3051
+ }
3052
+
3053
+ // noToggle dropdowns should not close when the trigger is clicked (the
3054
+ // "toggle" behavior), but they CAN still close via other interactions like
3055
+ // Escape key or focus loss.
3056
+ if (element.noToggle && eventType === "click") {
3057
+ return;
3058
+ }
3059
+
3060
+ this.lockScroll(false);
3061
+ element.triggerChevron?.removeAttribute("data-expanded");
3062
+
3063
+ if (element.isPopoverVisible) {
3064
+ element.isPopoverVisible = false;
3065
+ }
3066
+ if (this.showing) {
3067
+ this.cleanupHideHandlers();
3068
+ this.showing = false;
3069
+ this.dispatchEventDropdownToggle(eventType);
3070
+ }
3071
+
3072
+ // Only clear the global reference if the bib was actually hidden.
3073
+ // Clearing it when hideBib is blocked (e.g. noToggle + click) corrupts
3074
+ // the singleton state so other dropdowns can't detect this one is still open.
3075
+ document.expandedAuroFloater = null;
3076
+ const idx = AuroFloatingUI.openingQueue.indexOf(this);
3077
+ if (idx > -1) {
3078
+ AuroFloatingUI.openingQueue.splice(idx, 1);
3079
+ }
3080
+ }
3081
+
3082
+ /**
3083
+ * @private
3084
+ * @returns {void} Dispatches event with an object showing the state of the dropdown.
3085
+ * @param {String} eventType - The event type that triggered the toggle action.
3086
+ */
3087
+ dispatchEventDropdownToggle(eventType) {
3088
+ const element = this.element;
3089
+ if (!element) {
3090
+ return;
3091
+ }
3092
+
3093
+ const event = new CustomEvent(
3094
+ this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
3095
+ {
3096
+ detail: {
3097
+ expanded: this.showing,
3098
+ eventType: eventType || "unknown",
3099
+ },
3100
+ composed: true,
3101
+ },
3102
+ );
3103
+
3104
+ element.dispatchEvent(event);
3105
+ }
3106
+
3107
+ handleClick() {
3108
+ const element = this.element;
3109
+ if (!element) {
3110
+ return;
3111
+ }
3112
+
3113
+ if (element.isPopoverVisible) {
3114
+ this.hideBib("click");
3115
+ } else {
3116
+ this.showBib();
3117
+ }
3118
+
3119
+ const event = new CustomEvent(
3120
+ this.eventPrefix ? `${this.eventPrefix}-triggerClick` : "triggerClick",
3121
+ {
3122
+ composed: true,
3123
+ detail: {
3124
+ expanded: element.isPopoverVisible,
3125
+ },
3126
+ },
3127
+ );
3128
+
3129
+ element.dispatchEvent(event);
3130
+ }
3131
+
3132
+ handleEvent(event) {
3133
+ const element = this.element;
3134
+ if (!element || element.disableEventShow) {
3135
+ return;
3136
+ }
3137
+
3138
+ switch (event.type) {
3139
+ case "keydown": {
3140
+ // Support both Enter and Space keys for accessibility
3141
+ // Space is included as it's expected behavior for interactive elements
3142
+
3143
+ const origin = event.composedPath()[0];
3144
+ if (
3145
+ event.key === "Enter" ||
3146
+ (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3147
+ ) {
3148
+ event.preventDefault();
3149
+ this.handleClick();
3150
+ }
3151
+ break;
3152
+ }
3153
+ case "mouseenter":
3154
+ if (element.hoverToggle) {
3155
+ this.showBib();
3156
+ }
3157
+ break;
3158
+ case "mouseleave":
3159
+ if (element.hoverToggle) {
3160
+ this.hideBib("mouseleave");
3161
+ }
3162
+ break;
3163
+ case "focus":
3164
+ if (element.focusShow) {
3165
+ /*
3166
+ This needs to better handle clicking that gives focus -
3167
+ currently it shows and then immediately hides the bib
3168
+ */
3169
+ this.showBib();
3170
+ }
3171
+ break;
3172
+ case "blur":
3173
+ // send this task 100ms later queue to
3174
+ // wait a frame in case focus moves within the floating element/bib
3175
+ setTimeout(() => this.handleFocusLoss(), 0);
3176
+ break;
3177
+ case "click":
3178
+ if (document.activeElement === document.body) {
3179
+ event.currentTarget.focus();
3180
+ }
3181
+ this.handleClick();
3182
+ break;
3183
+ // Do nothing
3184
+ }
3185
+ }
3186
+
3187
+ /**
3188
+ * Manages the tabIndex of the trigger element based on its focusability.
3189
+ *
3190
+ * If the trigger element or any of its children are inherently focusable, the tabIndex of the component is set to -1.
3191
+ * This prevents the component itself from being focusable when the trigger element already handles focus.
3192
+ */
3193
+ handleTriggerTabIndex() {
3194
+ const element = this.element;
3195
+ if (!element) {
3196
+ return;
3197
+ }
3198
+
3199
+ const focusableElementSelectors = [
3200
+ "a",
3201
+ "button",
3202
+ 'input:not([type="hidden"])',
3203
+ "select",
3204
+ "textarea",
3205
+ '[tabindex]:not([tabindex="-1"])',
3206
+ "auro-button",
3207
+ "auro-input",
3208
+ "auro-hyperlink",
3209
+ ];
3210
+
3211
+ const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
3212
+ if (!triggerNode) {
3213
+ return;
3214
+ }
3215
+ const triggerNodeTagName = triggerNode.tagName.toLowerCase();
3216
+
3217
+ focusableElementSelectors.forEach((selector) => {
3218
+ // Check if the trigger node element is focusable
3219
+ if (triggerNodeTagName === selector) {
3220
+ element.tabIndex = -1;
3221
+ return;
3222
+ }
3223
+
3224
+ // Check if any child is focusable
3225
+ if (triggerNode.querySelector(selector)) {
3226
+ element.tabIndex = -1;
3227
+ }
3228
+ });
3229
+ }
3230
+
3231
+ /**
3232
+ *
3233
+ * @param {*} eventPrefix
3234
+ */
3235
+ regenerateBibId() {
3236
+ const element = this.element;
3237
+ if (!element) {
3238
+ return;
3239
+ }
3240
+
3241
+ this.id = element.getAttribute("id");
3242
+ if (!this.id) {
3243
+ this.id = window.crypto.randomUUID();
3244
+ element.setAttribute("id", this.id);
3245
+ }
3246
+
3247
+ element.bib?.setAttribute("id", `${this.id}-floater-bib`);
3248
+ }
3249
+
3250
+ configure(elem, eventPrefix, enableKeyboardHandling = true) {
3251
+ AuroFloatingUI.setupMousePressChecker();
3252
+ this.enableKeyboardHandling = enableKeyboardHandling;
3253
+
3254
+ this.eventPrefix = eventPrefix;
3255
+ if (this.element !== elem) {
3256
+ this.element = elem;
3257
+ }
3258
+
3259
+ const element = this.element;
3260
+ if (!element) {
3261
+ return;
3262
+ }
3263
+
3264
+ if (this.behavior !== element.behavior) {
3265
+ this.behavior = element.behavior;
3266
+ }
3267
+
3268
+ if (element.trigger) {
3269
+ this.disconnect();
3270
+ }
3271
+ element.trigger =
3272
+ element.triggerElement ||
3273
+ element.shadowRoot?.querySelector("#trigger") ||
3274
+ element.trigger;
3275
+ element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
3276
+ element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
3277
+ element.triggerChevron =
3278
+ element.shadowRoot?.querySelector("#showStateIcon");
3279
+
3280
+ if (element.floaterConfig) {
3281
+ element.hoverToggle = element.floaterConfig.hoverToggle;
3282
+ }
3283
+
3284
+ this.regenerateBibId();
3285
+ this.handleTriggerTabIndex();
3286
+
3287
+ this.handleEvent = this.handleEvent.bind(this);
3288
+ if (element.trigger) {
3289
+ if (this.enableKeyboardHandling) {
3290
+ element.trigger.addEventListener("keydown", this.handleEvent);
3291
+ }
3292
+ element.trigger.addEventListener("click", this.handleEvent);
3293
+ element.trigger.addEventListener("mouseenter", this.handleEvent);
3294
+ element.trigger.addEventListener("mouseleave", this.handleEvent);
3295
+ element.trigger.addEventListener("focus", this.handleEvent);
3296
+ element.trigger.addEventListener("blur", this.handleEvent);
3297
+ }
3298
+ }
3299
+
3300
+ disconnect() {
3301
+ this.cleanupHideHandlers();
3302
+
3303
+ const element = this.element;
3304
+ if (!element) {
3305
+ return;
3306
+ }
3307
+
3308
+ element.cleanup?.();
3309
+
3310
+ if (element.bib && element.shadowRoot) {
3311
+ element.shadowRoot.append(element.bib);
3312
+ }
3313
+
3314
+ // Remove event & keyboard listeners
3315
+ if (element.trigger) {
3316
+ element.trigger.removeEventListener("keydown", this.handleEvent);
3317
+ element.trigger.removeEventListener("click", this.handleEvent);
3318
+ element.trigger.removeEventListener("mouseenter", this.handleEvent);
3319
+ element.trigger.removeEventListener("mouseleave", this.handleEvent);
3320
+ element.trigger.removeEventListener("focus", this.handleEvent);
3321
+ element.trigger.removeEventListener("blur", this.handleEvent);
3322
+ }
3323
+ }
3324
+ }
3325
+
3326
+ class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[.]/g,"_"),o}generateTag(o,s$1,a){const r=this.generateElementName(o,s$1),i$1=i`${s(r)}`;return customElements.get(r)||customElements.define(r,class extends a{}),i$1}}class d{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}getSlotText(t,e){const o=t.shadowRoot?.querySelector(`slot[name="${e}"]`),s=(o?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim();return s||null}}class h{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}}var c=i$5`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]),:host([appearance=brand]){--ds-auro-loader-color: var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]),:host([appearance=inverse]){--ds-auro-loader-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color: transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color: currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color: currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}
3327
+ `,u$1=i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0;box-sizing:border-box}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin: .375rem;--margin-xs: .2rem;--margin-sm: .5rem;--margin-md: .75rem;--margin-lg: 1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin) * 6);height:calc(1rem + var(--margin) * 2)}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(1.95rem + var(--margin-xs) * 6);height:calc(.65rem + var(--margin-xs) * 2)}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm) * 6);height:calc(2rem + var(--margin-sm) * 2)}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md) * 6);height:calc(3rem + var(--margin-md) * 2)}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg) * 6);height:calc(5rem + var(--margin-lg) * 2)}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-.4s}:host([pulse])>span:nth-child(2){animation-delay:-.2s}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,to{opacity:.1;transform:scale(.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}to{left:110%}}:host>.no-animation{display:none}@media (prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}
3328
+ `,p$1=i$5`:host{--ds-auro-loader-background-color: currentcolor;--ds-auro-loader-border-color: currentcolor;--ds-auro-loader-color: currentcolor}
3329
+ `;class b extends i$2{constructor(){super(),this.appearance="default",this.keys=[0,1,2,3,4,5,6,7,8,9],this.mdCount=3,this.smCount=2,this.runtimeUtils=new h,this.orbit=false,this.ringworm=false,this.laser=false,this.pulse=false;}static get properties(){return {appearance:{type:String,reflect:true},laser:{type:Boolean,reflect:true},orbit:{type:Boolean,reflect:true},pulse:{type:Boolean,reflect:true},ringworm:{type:Boolean,reflect:true}}}static get styles(){return [u$1,c,p$1]}static register(t="auro-loader"){h.prototype.registerComponent(t,b);}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-loader");}connectedCallback(){super.connectedCallback();}defineTemplate(){let t=Array.from(Array(this.mdCount).keys());return this.orbit||this.laser?t=Array.from(Array(this.smCount).keys()):this.ringworm&&(t=Array.from(Array(0).keys())),t}render(){return b$1`
3330
+ ${this.defineTemplate().map(t=>b$1`
3331
+ <span part="element" class="loader node-${t}"></span>
3332
+ `)}
3333
+
3334
+ <div class="no-animation body-default">Loading...</div>
3335
+
3336
+ ${this.ringworm?b$1`
3337
+ <svg part="element" class="circular" viewBox="25 25 50 50">
3338
+ <circle class="path" cx="50" cy="50" r="20" fill="none"/>
3339
+ </svg>`:""}
3340
+ `}}const m$1=new WeakMap,v=new WeakMap,x=({host:t,target:e,matcher:o,removeOriginal:s=true})=>{v.has(t)||v.set(t,{matchers:new Set,targets:new Map});const a=v.get(t);return a.matchers.add(o),a.targets.has(e)||a.targets.set(e,new Map),a.targets.get(e).set(o,{removeOriginal:s,currentAttributes:new Map}),f$1({host:t,target:e,matcher:o,removeOriginal:s}),y$1(t),{cleanup:()=>g$1(t,e,o),getObservedAttributes:()=>A(t,e,o),getObservedAttribute:s=>S(t,e,o,s)}},g$1=(t,e,o)=>{const s=v.get(t);if(!s)return;const a=s.targets.get(e);a&&(a.delete(o),0===a.size&&s.targets.delete(e));let r=false;for(const t of s.targets.values())if(t.has(o)){r=true;break}r||s.matchers.delete(o),0!==s.targets.size&&0!==s.matchers.size||w$1(t);},f$1=({host:t,target:e,matcher:o,removeOriginal:s=true})=>{const a=t.getAttributeNames().filter(t=>o(t)).reduce((e,o)=>(e[o]=t.getAttribute(o),e),{});Object.entries(a).forEach(([a,r])=>{k$1(t,e,o,a,r),e.setAttribute(a,r),s&&t.removeAttribute(a);});},y$1=t=>{if(m$1.has(t))return m$1.get(t);const e=new MutationObserver(e=>{const o=v.get(t);o&&e.filter(t=>"attributes"===t.type).forEach(e=>{const s=e.attributeName;for(const e of o.matchers)if(e(s))for(const[s,a]of o.targets.entries())if(a.has(e)){const{removeOriginal:o}=a.get(e);f$1({host:t,target:s,matcher:e,removeOriginal:o});}});});return e.observe(t,{attributes:true}),m$1.set(t,e),e},w$1=t=>{if(m$1.has(t)){m$1.get(t).disconnect(),m$1.delete(t);}v.has(t)&&v.delete(t);},z$1=(t,e,o)=>{const s=v.get(t);if(!s)return;const a=s.targets.get(e);return a?a.get(o):void 0},k$1=(t,e,o,s,a)=>{const r=z$1(t,e,o);r&&r.currentAttributes.set(s,a);},S=(t,e,o,s)=>{const a=z$1(t,e,o);if(a)return a.currentAttributes.get(s)},A=(t,e,o)=>{const s=z$1(t,e,o);return s?Array.from(s.currentAttributes.entries()):[]},q={"aria-":t=>t.startsWith("aria-"),role:t=>t.match(/^role$/)},B=({host:t,target:e,removeOriginal:o=true})=>(({host:t,target:e,match:o,removeOriginal:s=true})=>{if("object"!=typeof t||!(t instanceof HTMLElement))throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');if("object"!=typeof e||!(e instanceof HTMLElement))throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');if("function"!=typeof o)throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');if("boolean"!=typeof s)throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');return x({host:t,target:e,matcher:o,removeOriginal:s})})({host:t,target:e,match:t=>{for(const e in q)if(q[e](t))return true;return false},removeOriginal:o});class C extends i$2{attributeWatcher;static get properties(){return {layout:{type:String,attribute:"layout",reflect:true},shape:{type:String,attribute:"shape",reflect:true},size:{type:String,attribute:"size",reflect:true},appearance:{type:String,reflect:true},onDark:{type:Boolean,attribute:"ondark",reflect:true},wrapper:{attribute:false,reflect:false}}}constructor(){super(),this.onDark=false,this.appearance="default";}resetShapeClasses(){this.shape&&this.size&&this.wrapper&&(this.wrapper.classList.forEach(t=>{t.startsWith("shape-")&&this.wrapper.classList.remove(t);}),this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`));}resetLayoutClasses(){this.layout&&this.wrapper&&(this.wrapper.classList.forEach(t=>{t.startsWith("layout-")&&this.wrapper.classList.remove(t);}),this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`));}updateComponentArchitecture(){this.resetLayoutClasses(),this.resetShapeClasses();}updated(t){(t.has("layout")||t.has("shape")||t.has("size"))&&this.updateComponentArchitecture();}firstUpdated(){super.firstUpdated(),this.wrapper=this.shadowRoot.querySelector(".wrapper"),this.attributeWatcher=B({host:this,target:this.shadowRoot.querySelector(".wrapper")});}disconnectedCallback(){super.disconnectedCallback(),this.attributeWatcher&&(this.attributeWatcher.cleanup(),this.attributeWatcher=null);}render(){try{return this.renderLayout()}catch(t){return console.error("Failed to get the defined layout - using the default layout",t),this.getLayout("default")}}}var U=i$5`[auro-loader]{color:var(--ds-auro-button-loader-color, #ffffff)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image),var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}:host(:focus-within) .auro-button{outline-color:var(--ds-auro-button-border-inset-color)}:host(:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-hover, #00274a)}:host([disabled]){--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}:host([variant=secondary]){--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-secondary-text, #01426a)}:host([variant=secondary]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text-hover, #00274a)}:host([variant=secondary]:focus-within){--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}:host([variant=secondary][disabled]){--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([variant=tertiary]){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, .05));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, .05));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-tertiary-text, #01426a)}:host([variant=tertiary]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, .1));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, .1));--ds-auro-button-border-color: transparent}:host([variant=tertiary]:focus-within){--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}:host([variant=tertiary][disabled]){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, .05));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, .05));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([variant=ghost]){--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-ghost-text, #01426a)}:host([variant=ghost]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, .05));--ds-auro-button-container-image: var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, .05));--ds-auro-button-border-color: transparent}:host([variant=ghost]:focus-within){--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}:host([variant=ghost][disabled]){--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([variant=flat]) .auro-button{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}:host([variant=flat]) .auro-button:active:not(:disabled),:host([variant=flat]) .auro-button:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}:host([variant=flat]) .auro-button:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}:host([variant=flat]:focus-within){--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a)}:host([ondark]:not([disabled]):is([data-hover],[data-active])),:host([appearance=inverse]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}:host([ondark]:focus-within),:host([appearance=inverse]:focus-within){--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}:host([ondark][disabled]),:host([appearance=inverse][disabled]){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, .75));--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, .75));--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, .75));--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([ondark][variant=secondary]),:host([appearance=inverse][variant=secondary]){--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}:host([ondark][variant=secondary]:not([disabled]):is([data-hover],[data-active])),:host([appearance=inverse][variant=secondary]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, .1));--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, .1))}:host([ondark][variant=secondary]:focus-within),:host([appearance=inverse][variant=secondary]:focus-within){--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([ondark][variant=secondary][disabled]),:host([appearance=inverse][variant=secondary][disabled]){--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}:host([ondark][variant=tertiary]),:host([appearance=inverse][variant=tertiary]){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, .05));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, .05));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}:host([ondark][variant=tertiary]:not([disabled]):is([data-hover],[data-active])),:host([appearance=inverse][variant=tertiary]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, .1));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, .1))}:host([ondark][variant=tertiary]:focus-within),:host([appearance=inverse][variant=tertiary]:focus-within){--ds-auro-button-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([ondark][variant=tertiary][disabled]),:host([appearance=inverse][variant=tertiary][disabled]){--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([ondark][variant=ghost]),:host([appearance=inverse][variant=ghost]){--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}:host([ondark][variant=ghost]:not([disabled]):is([data-hover],[data-active])),:host([appearance=inverse][variant=ghost]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, .05));--ds-auro-button-container-image: var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, .05));--ds-auro-button-border-color: transparent}:host([ondark][variant=ghost]:focus-within),:host([appearance=inverse][variant=ghost]:focus-within){border-color:transparent;--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([ondark][variant=ghost][disabled]),:host([appearance=inverse][variant=ghost][disabled]){--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([ondark][variant=flat]) .auro-button,:host([appearance=inverse][variant=flat]) .auro-button{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}:host([ondark][variant=flat]) .auro-button:active:not(:disabled),:host([ondark][variant=flat]) .auro-button:hover:not(:disabled),:host([appearance=inverse][variant=flat]) .auro-button:active:not(:disabled),:host([appearance=inverse][variant=flat]) .auro-button:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}:host([ondark][variant=flat]) .auro-button:disabled,:host([appearance=inverse][variant=flat]) .auro-button:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}:host([ondark][variant=flat]:focus-within),:host([appearance=inverse][variant=flat]:focus-within){--ds-auro-button-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}
3341
+ `,H=i$5`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-rounded-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-rounded-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-circle-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:50%;min-width:72px;max-width:72px;padding:0}.shape-circle-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-circle-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-circle-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-square-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px;min-width:72px;max-width:72px;padding:0}.shape-square-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-square-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-square-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px}.shape-pill-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px 0 0 28px}.shape-pill-left-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-left-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-left-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:0 28px 28px 0}.shape-pill-right-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-right-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-right-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-circle-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:50%;min-width:56px;max-width:56px;padding:0}.shape-circle-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-circle-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-circle-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-square-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:6px;min-width:56px;max-width:56px;padding:0}.shape-square-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-square-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-square-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-rounded-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-rounded-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:24px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:24px 0 0 24px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:0 24px 24px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-circle-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:50%;min-width:48px;max-width:48px;padding:0}.shape-circle-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-circle-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-circle-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-square-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px;min-width:48px;max-width:48px;padding:0}.shape-square-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-square-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-square-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-rounded-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-rounded-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px}.shape-pill-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px 0 0 18px}.shape-pill-left-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-left-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-left-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:0 18px 18px 0}.shape-pill-right-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-right-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-right-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-circle-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:50%;min-width:36px;max-width:36px;padding:0}.shape-circle-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-circle-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-circle-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-square-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px;min-width:36px;max-width:36px;padding:0}.shape-square-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-square-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-square-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:4px}.shape-rounded-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-rounded-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-rounded-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px}.shape-pill-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px 0 0 12px}.shape-pill-left-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-left-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-left-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:0 12px 12px 0}.shape-pill-right-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-right-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-right-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-circle-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:50%;min-width:24px;max-width:24px;padding:0}.shape-circle-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-circle-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-circle-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-square-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:6px;min-width:24px;max-width:24px;padding:0}.shape-square-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-square-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-square-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}
3342
+ `,M$1=i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host([size=xs][shape=rounded]) ::slotted(auro-icon),:host([size=xs][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill]) ::slotted(auro-icon),:host([size=xs][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left]) ::slotted(auro-icon),:host([size=xs][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right]) ::slotted(auro-icon),:host([size=xs][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle]) ::slotted(auro-icon),:host([size=xs][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=flat]) .auro-button:focus,:host([size=xs][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square]) ::slotted(auro-icon),:host([size=xs][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=square][variant=secondary]) .auro-button:focus,:host([size=xs][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=flat]) .auro-button:focus,:host([size=xs][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=ghost]) .auro-button:focus,:host([size=xs][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded]) ::slotted(auro-icon),:host([size=sm][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill]) ::slotted(auro-icon),:host([size=sm][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left]) ::slotted(auro-icon),:host([size=sm][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right]) ::slotted(auro-icon),:host([size=sm][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle]) ::slotted(auro-icon),:host([size=sm][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus,:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=flat]) .auro-button:focus,:host([size=sm][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus,:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square]) ::slotted(auro-icon),:host([size=sm][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=square][variant=secondary]) .auro-button:focus,:host([size=sm][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=flat]) .auro-button:focus,:host([size=sm][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=ghost]) .auro-button:focus,:host([size=sm][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded]) ::slotted(auro-icon),:host([size=md][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill]) ::slotted(auro-icon),:host([size=md][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left]) ::slotted(auro-icon),:host([size=md][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right]) ::slotted(auro-icon),:host([size=md][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle]) ::slotted(auro-icon),:host([size=md][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=circle][variant=secondary]) .auro-button:focus,:host([size=md][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=flat]) .auro-button:focus,:host([size=md][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=ghost]) .auro-button:focus,:host([size=md][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square]) ::slotted(auro-icon),:host([size=md][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=square][variant=primary]) .auro-button:focus,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=primary]) .auro-button:focus:after,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=square][variant=secondary]) .auro-button:focus,:host([size=md][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=tertiary]) .auro-button:focus,:host([size=md][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=flat]) .auro-button:focus,:host([size=md][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=ghost]) .auro-button:focus,:host([size=md][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded]) ::slotted(auro-icon),:host([size=lg][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill]) ::slotted(auro-icon),:host([size=lg][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left]) ::slotted(auro-icon),:host([size=lg][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right]) ::slotted(auro-icon),:host([size=lg][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle]) ::slotted(auro-icon),:host([size=lg][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, .25rem))}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus,:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=flat]) .auro-button:focus,:host([size=lg][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus,:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square]) ::slotted(auro-icon),:host([size=lg][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, .25rem))}:host([size=lg][shape=square][variant=primary]) .auro-button:focus,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=square][variant=secondary]) .auro-button:focus,:host([size=lg][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=flat]) .auro-button:focus,:host([size=lg][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=ghost]) .auro-button:focus,:host([size=lg][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded]) ::slotted(auro-icon),:host([size=xl][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill]) ::slotted(auro-icon),:host([size=xl][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left]) ::slotted(auro-icon),:host([size=xl][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right]) ::slotted(auro-icon),:host([size=xl][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle]) ::slotted(auro-icon),:host([size=xl][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, .25rem))}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=flat]) .auro-button:focus,:host([size=xl][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square]) ::slotted(auro-icon),:host([size=xl][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, .25rem))}:host([size=xl][shape=square][variant=primary]) .auro-button:focus,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=square][variant=secondary]) .auro-button:focus,:host([size=xl][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=flat]) .auro-button:focus,:host([size=xl][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=ghost]) .auro-button:focus,:host([size=xl][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-150, .75rem)}:host([size=sm]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-200, 1rem)}:host([size=md]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-300, 1.5rem)}:host([size=lg]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-400, 2rem)}:host([size=xl]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-500, 2.5rem)}:host([shape=circle]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host([shape=square]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}.textSlot{display:inline-flex;align-items:center;gap:var(--ds-size-100, .5rem)}.contentWrapper{font-size:0}slot{pointer-events:none}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}:host{display:inline-block;overflow:hidden}.auro-button{position:relative;cursor:pointer;padding:0 var(--ds-size-300, 1.5rem);padding-inline:unset;padding-block:unset;box-sizing:content-box;overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;outline:none;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, .5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding .3s ease-out}.auro-button:focus,.auro-button:focus-visible{outline:none}.auro-button:active{transform:scale(.95)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}:host([fluid]){display:block}:host([fluid]) .auro-button:not(.thin):not(.simple){width:calc(100% - 4px)}:host([fluid]) .auro-button.thin{width:calc(100% - 2px)}:host([fluid]) .auro-button.simple{width:100%}:host([static]) .auro-button{pointer-events:none;cursor:default;display:inline-flex}:host([static]) .auro-button .contentWrapper{display:inline-flex}
3343
+ `,R=i$5`:host{--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color: var(--ds-advanced-color-button-primary-text, #ffffff)}
3344
+ `;const N=["circle","square"];class T extends C{static get formAssociated(){return true}constructor(){super(),this.autofocus=false,this.disabled=false,this.loading=false,this.static=false,this.size="md",this.shape="rounded",this.fluid=false,this.loadingText=this.loadingText||"Loading...",this.variant="primary",this.runtimeUtils=new d,"function"==typeof this.attachInternals?this.internals=this.attachInternals():(this.internals=null,console.warn("This browser does not support form association features. Some form-related functionality may not work as expected. Consider using a polyfill or handling click events manually."));const t=new l;this.loaderTag=t.generateTag("auro-loader","6.1.0",b),this.buttonHref=void 0,this.buttonTarget=void 0,this.buttonRel=void 0;}static get styles(){return [R,M$1,U,H]}static get properties(){return {...C.properties,layout:{type:Boolean,attribute:false,reflect:false},autofocus:{type:Boolean,reflect:true},disabled:{type:Boolean,reflect:true},fluid:{type:Boolean,reflect:true},loading:{type:Boolean,reflect:true},loadingText:{type:String},tIndex:{type:String,reflect:true},tabindex:{type:String,reflect:false},title:{type:String,reflect:true},type:{type:String,reflect:true},value:{type:String,reflect:true},variant:{type:String,reflect:true},buttonHref:{type:String},buttonTarget:{type:String},buttonRel:{type:String},static:{type:Boolean,reflect:true},onHover:{attribute:"data-hover",type:Boolean,reflect:true},onActive:{attribute:"data-active",type:Boolean,reflect:true}}}static register(t="auro-button"){d.prototype.registerComponent(t,T);}focus(){this.renderRoot.querySelector("button").focus();}surfaceSubmitEvent(){this.form&&this.form.requestSubmit();}get form(){return this.internals?this.internals.form:null}get showText(){return !N.includes(this.shape)}get currentAriaLabel(){if(!this.attributeWatcher)return;return this.attributeWatcher.getObservedAttribute("aria-label")||void 0}get currentAriaLabelledBy(){if(!this.attributeWatcher)return;return this.attributeWatcher.getObservedAttribute("aria-labelledby")||void 0}get iconOnly(){return N.includes(this.shape)}getFontSize(){return (this.iconOnly?{xs:"heading-xs",sm:"heading-sm",md:"heading-sm",lg:"heading-md",xl:"heading-lg"}:{xs:"body-xs",sm:"body-sm",md:"body-default",lg:"body-lg",xl:"body-lg"})[this.size]||"body-default"}get _renderTag(){return this.static?i`span`:this.buttonHref?i`a`:i`button`}firstUpdated(){super.firstUpdated(),this.runtimeUtils.handleComponentTagRename(this,"auro-button");}generateAriaLabel(){return this.loading?this.runtimeUtils.getSlotText(this,"ariaLabel.loading")||this.loadingText:this.runtimeUtils.getSlotText(this,"ariaLabel")||this.currentAriaLabel}onPointerEvent(t){switch(t.type){case "pointerenter":this.onHover=true;break;case "pointerleave":this.onHover=false;break;case "pointerdown":this.onActive=true;break;case "pointerup":case "blur":this.onActive=false;}}renderLayoutDefault(){const t=this.getFontSize(),e$1=this.buttonHref?"link":"button",s={"auro-button":true,inset:this.showText,wrapper:true,loading:this.loading,simple:!["secondary"].includes(this.variant),thin:["secondary"].includes(this.variant)},a={contentWrapper:true,loading:this.loading},r={textSlot:true,[t]:this.showText},l=this.tIndex||this.tabindex;return u$2`
3345
+ <!-- Hidden slots for aria labels -->
3346
+ <slot name="ariaLabel" hidden @slotchange="${this.requestUpdate}"></slot>
3347
+ <slot name="ariaLabel.loading" hidden @slotchange="${this.requestUpdate}"></slot>
3348
+
3349
+ <${this._renderTag}
3350
+ part="${e$1}"
3351
+ aria-label="${o$1(this.generateAriaLabel())}"
3352
+ aria-labelledby="${o$1(this.loading?void 0:this.currentAriaLabelledBy||void 0)}"
3353
+ tabindex="${o$1(this.static?-1:l)}"
3354
+ ?autofocus="${this.autofocus}"
3355
+ class=${e(s)}
3356
+ ?disabled="${this.disabled||this.loading}"
3357
+ ?onDark="${this.onDark}"
3358
+ title="${o$1(this.title?this.title:void 0)}"
3359
+ name="${o$1(this.name?this.name:void 0)}"
3360
+ type="${o$1(this.type?this.type:void 0)}"
3361
+ variant="${o$1(this.variant?this.variant:void 0)}"
3362
+ .value="${o$1(this.value?this.value:void 0)}"
3363
+ @click="${this.static||"submit"!==this.type?void 0:this.surfaceSubmitEvent}"
3364
+ @pointerenter="${this.onPointerEvent}"
3365
+ @pointerleave="${this.onPointerEvent}"
3366
+ @pointerdown="${this.onPointerEvent}"
3367
+ @pointerup="${this.onPointerEvent}"
3368
+ @blur="${this.onPointerEvent}"
3369
+ href="${o$1(this.buttonHref||void 0)}"
3370
+ target="${o$1(this.buttonTarget||void 0)}"
3371
+ rel="${o$1(this.buttonRel||void 0)}"
3372
+ >
3373
+ ${o$1(this.loading?u$2`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>`:void 0)}
3374
+
3375
+ <span class="${e(a)}" part="contentWrapper">
3376
+ <span class="${e(r)}" part="text">
3377
+ <slot></slot>
3378
+ </span>
3379
+ </span>
3380
+ </${this._renderTag}>
3381
+ `}renderLayout(){return this.renderLayoutDefault()}}
3382
+
3383
+ class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,class extends a{});}closestElement(t,a=this,e=(a,s=a&&a.closest(t))=>a&&a!==document&&a!==window?s||e(a.getRootNode().host):null){return e(a)}handleComponentTagRename(t,a){const e=a.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,a){const e=a.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}getSlotText(t,a){const e=t.shadowRoot?.querySelector(`slot[name="${a}"]`);return (e?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim()||null}}var u='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>',g='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" style="min-width:100%;height:auto;fill:currentColor" viewBox="0 0 142 138" part="svg"><title id="tail-DEFAULT__title">Airplane tail default image with light gray color</title><path fill="url(#paint0_linear_9225_2069)" fill-rule="evenodd" d="M124.093 14.665a3.26 3.26 0 0 1 3.208 3.829L101.097 119.85c-.47 1.087-2.211 3.398-5.692 3.471l-.106.001-80.65.013A659230 659230 0 0 1 99.08 17.412c1.214-1.497 3.275-2.722 5.372-2.747z" clip-rule="evenodd"/><defs><linearGradient id="paint0_linear_9225_2069" x1="114.823" x2="60.061" y1="14.665" y2="123.335" gradientUnits="userSpaceOnUse"><stop offset=".5" stop-color="#707984"/><stop offset=".5" stop-color="#646E7B"/></linearGradient></defs></svg>';class m extends i$2{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}}const f=new Map,w=(t,a={})=>{const e=a.responseParser||(t=>t.text());return f.has(t)||f.set(t,fetch(t).then(e)),f.get(t)};var z=i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem)!important;width:var(--ds-auro-icon-size, 1.5rem)!important;height:var(--ds-auro-icon-size, 1.5rem)!important}.componentWrapper{display:flex;line-height:var(--ds-auro-icon-size)}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.svgWrapper [part=svg]{display:flex}.labelWrapper{margin-left:var(--ds-size-50, .25rem)}.labelWrapper ::slotted(*){line-height:inherit!important}
3384
+ `;class y extends m{constructor(){super(),this._initializeDefaults();}_initializeDefaults(){this.onDark=false,this.appearance="default";}static get properties(){return {...m.properties,onDark:{type:Boolean,reflect:true},appearance:{type:String,reflect:true},svg:{attribute:false,reflect:true}}}static get styles(){return z}async fetchIcon(t,a){let e="";e="logos"===t?await w(`${this.uri}/${t}/${a}.svg`):await w(`${this.uri}/icons/${t}/${a}.svg`);return (new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const t=await this.fetchIcon(this.category,this.name);if(t)this.svg=t;else if(!t){const t=this.name?.startsWith("tail-")?g:u;this.svg=(new DOMParser).parseFromString(t,"text/html").body.querySelector("svg");}}}catch(t){this.svg=void 0;}}}i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:inline-block;--ds-auro-icon-size: 100%;width:100%;height:100%}:host .logo{color:var(--ds-auro-alaska-color)}:host([onDark]),:host([appearance=inverse]){--ds-auro-alaska-color: #FFF}
3385
+ `;var M=i$5`:host{--ds-auro-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color: #02426D;--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}
3386
+ `;var _=i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]),:host(:not([appearance=inverse])[variant=accent1]){--ds-auro-icon-color: var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]),:host(:not([appearance=inverse])[variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]),:host(:not([appearance=inverse])[variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]),:host(:not([appearance=inverse])[variant=statusDefault]){--ds-auro-icon-color: var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]),:host(:not([appearance=inverse])[variant=statusInfo]){--ds-auro-icon-color: var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]),:host(:not([appearance=inverse])[variant=statusSuccess]){--ds-auro-icon-color: var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]),:host(:not([appearance=inverse])[variant=statusWarning]){--ds-auro-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]),:host(:not([appearance=inverse])[variant=statusError]){--ds-auro-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]),:host(:not([appearance=inverse])[variant=statusInfoSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]),:host(:not([appearance=inverse])[variant=statusSuccessSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]),:host(:not([appearance=inverse])[variant=statusWarningSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]),:host(:not([appearance=inverse])[variant=statusErrorSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]),:host(:not([appearance=inverse])[variant=fareBasicEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]),:host(:not([appearance=inverse])[variant=fareBusiness]){--ds-auro-icon-color: var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]),:host(:not([appearance=inverse])[variant=fareEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]),:host(:not([appearance=inverse])[variant=fareFirst]){--ds-auro-icon-color: var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]),:host(:not([appearance=inverse])[variant=farePremiumEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]),:host(:not([appearance=inverse])[variant=tierOneWorldEmerald]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]),:host(:not([appearance=inverse])[variant=tierOneWorldSapphire]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]),:host(:not([appearance=inverse])[variant=tierOneWorldRuby]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]),:host([appearance=inverse][variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]),:host([appearance=inverse][variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]),:host([appearance=inverse][variant=statusError]){--ds-auro-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}
3387
+ `;class k extends y{constructor(){super(),this._initializeDefaults();}_initializeDefaults(){this.variant=void 0,this.uri="https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist",this.runtimeUtils=new p;}static get properties(){return {...y.properties,ariaHidden:{type:String,reflect:true},category:{type:String,reflect:true},customColor:{type:Boolean,reflect:true},customSvg:{type:Boolean},label:{type:Boolean,reflect:true},name:{type:String,reflect:true},variant:{type:String,reflect:true}}}static get styles(){return [y.styles,M,z,_]}static register(t="auro-icon"){p.prototype.registerComponent(t,k);}connectedCallback(){super.connectedCallback(),this.runtimeUtils.handleComponentTagRename(this,"auro-icon");}exposeCssParts(){this.setAttribute("exportparts","svg:iconSvg");}async firstUpdated(){if(await super.firstUpdated(),this.hasAttribute("ariaHidden")&&this.svg){const t=this.svg.querySelector("desc");t&&(t.remove(),this.svg.removeAttribute("aria-labelledby"));}}render(){const t={labelWrapper:true,util_displayHiddenVisually:!this.label};return b$1`
3388
+ <div class="componentWrapper">
3389
+ <div
3390
+ class="${e({svgWrapper:true})}"
3391
+ title="${o$1(this.title||void 0)}">
3392
+ <span aria-hidden="${o$1(this.ariaHidden||true)}" part="svg">
3393
+ ${this.customSvg?b$1`
3394
+ <slot name="svg"></slot>
3395
+ `:b$1`
3396
+ ${this.svg}
3397
+ `}
3398
+ </span>
3399
+ </div>
3400
+
3401
+ <div class="${e(t)}" part="label">
3402
+ <slot></slot>
3403
+ </div>
3404
+ </div>
3405
+ `}}
3406
+
3407
+ var buttonVersion = "12.3.2";
3408
+
3409
+ var iconVersion = "9.2.0";
3410
+
3411
+ var colorCss = i$5`dialog.container .wrapper{background:var(--ds-auro-dialog-container-color);color:var(--ds-auro-dialog-text-color)}dialog.container::backdrop{background:var(--ds-auro-dialog-overlay-open-background-color)}dialog.container:not([popover])::backdrop{background:var(--ds-auro-dialog-overlay-modal-background-color)}@media screen and (min-width:768px){dialog.container{box-shadow:var(--ds-auro-dialog-boxshadow-color)}}.dialog-header--action{border:2px solid transparent;border-radius:var(--ds-border-radius, .375rem);background-color:transparent}
3412
+ `;
3413
+
3414
+ var styleCss = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-size:var(--wcss-body-sm-emphasized-font-size, .875rem);font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-size:var(--wcss-body-xs-emphasized-font-size, .75rem);font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, .875rem)}.body-2xs,.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-size:var(--wcss-body-2xs-emphasized-font-size, .625rem);font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{--insetPaddingXl: 0 var(--ds-size-400, 2rem) var(--ds-size-400, 2rem) var(--ds-size-400, 2rem);--insetPaddingXxl: 0 var(--ds-size-600, 3rem) var(--ds-size-600, 3rem) var(--ds-size-600, 3rem);--insetPaddingXxxl: 0 var(--ds-size-800, 4rem) var(--ds-size-800, 4rem) var(--ds-size-800, 4rem)}[auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.dialogOverlay{position:fixed;z-index:-1;bottom:0;left:0;width:100%;height:100%;pointer-events:none}.dialogOverlay--open{z-index:var(--ds-depth-overlay);pointer-events:unset;transition:background .3s cubic-bezier(.4,0,.2,0)}.dialogOverlay--modal{z-index:var(--ds-depth-overlay);transition:background .3s cubic-bezier(.4,0,.5,0)}.bib{position:fixed;inset:0;visibility:hidden;overflow:hidden}.bib dialog.container{display:inline-block;width:100%;max-width:none;height:100%;max-height:none;padding:0;border-width:medium;border-style:none;border-color:currentcolor;border-image:initial;margin:0;background-color:transparent;outline:none;transform:translateZ(0);overflow:hidden}:host([open]) .bib{visibility:visible}.dialog{position:fixed;z-index:-1;top:unset;right:0;bottom:-100%;left:0;box-sizing:border-box;display:flex;flex-direction:column;overflow:visible;width:calc(100% - var(--insetPaddingXl) - var(--insetPaddingXl));max-height:90%;padding:var(--insetPaddingXl);opacity:0;border:0;margin:0;max-width:none;transition:opacity .3s ease-in-out,visibility .3s ease-in-out,bottom .3s ease-in-out}.dialog--open{z-index:var(--ds-depth-modal, 300);visibility:visible;bottom:0;opacity:1}@media screen and (min-width:768px){.dialog{top:10%;bottom:unset;left:0;right:0;max-width:80%;max-height:80%;margin:auto;padding:var(--insetPaddingXxxl);opacity:0;width:calc(100% - var(--insetPaddingXxxl) - var(--insetPaddingXxxl));height:auto;overflow:visible}.dialog--open{opacity:1}}@media screen and (min-width:1024px){.dialog{max-width:986px}}.dialog-footer{padding-top:var(--ds-size-400, 2rem)}@media screen and (min-width:768px){.dialog-footer ::slotted(*){display:flex;justify-content:flex-end}}.dialog-header{display:flex;align-items:flex-start;justify-content:space-between;padding-top:var(--ds-size-800, 4rem);margin-bottom:var(--ds-size-300, 1.5rem)}.dialog-header--action{margin:0;padding:0}.dialog-header--action:hover{cursor:pointer}.dialog-header .heading{flex:1;margin-block:0}.dialog-content{flex:1;overflow:auto;overscroll-behavior:contain;margin:calc(-1 * var(--ds-size-100));padding:var(--ds-size-100)}::slotted([slot=content]){position:relative}:host([unformatted]) .dialog-header--action{position:absolute;top:var(--ds-size-400, 2rem);bottom:unset;right:var(--ds-size-400, 2rem)}@media screen and (min-width:768px){:host([unformatted]) .dialog-header--action{top:var(--ds-size-800, 4rem);bottom:unset;right:var(--ds-size-800, 4rem)}}:host([sm]) .dialog{max-height:30%}@media screen and (min-width:768px){:host([sm]) .dialog{top:10%;bottom:unset;max-width:40%;max-height:80%;padding:var(--insetPaddingXxl)}}@media screen and (min-width:1024px){:host([sm]) .dialog{max-width:740px}}:host([md]) .dialog{max-height:50%}@media screen and (min-width:768px){:host([md]) .dialog{top:10%;bottom:unset;max-width:70%;max-height:80%}}@media screen and (min-width:1024px){:host([md]) .dialog{top:10%;bottom:unset;max-width:986px}}@media screen and (min-width:768px){:host([sm][lg]) .dialog,:host([md][lg]) .dialog{max-height:80%}}:host([sm][lg]) .dialog,:host([md][lg]) .dialog{max-height:90%}:host([unformatted]) .dialog{padding:0}
3415
+ `;
3416
+
3417
+ var styleUnformattedCss = i$5`[unformatted] .unformattedWrapper{padding:var(--ds-size-400, 2rem)}@media screen and (min-width:768px){[unformatted] .unformattedWrapper{padding:var(--ds-size-800, 4rem);padding-top:var(--ds-size-400, 2rem)}}
3418
+ `;
3419
+
3420
+ var tokensCss = i$5`:host{--ds-auro-dialog-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dialog-boxshadow-color: var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, .2));--ds-auro-dialog-overlay-modal-background-color: var(--ds-advanced-color-shared-scrim, rgba(0, 0, 0, .5));--ds-auro-dialog-overlay-open-background-color: var(--ds-advanced-color-shared-scrim, rgba(0, 0, 0, .5));--ds-auro-dialog-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}
3421
+ `;
3422
+
3423
+ // Copyright (c) 2024 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3424
+ // See LICENSE in the project root for license information.
3425
+
3426
+
3427
+ const MOBILE_BREAKPOINT = '--ds-grid-breakpoint-md';
3428
+ /**
3429
+ * @slot header - Text to display as the header of the modal
3430
+ * @slot content - Injects content into the body of the modal
3431
+ * @slot footer - Used for action options, e.g. buttons
3432
+ * @slot ariaLabel.dialog.close - Text to describe the "x" icon close button for screen readers. Default: "Close".
3433
+ * @event toggle - Event fires when the element is closed
3434
+ * @csspart close-button - adjust position of the close X icon in the dialog window
3435
+ * @csspart dialog-overlay - DEPRECATED. Use `--ds-auro-dialog-overlay-modal-background-color` or `--ds-auro-dialog-overlay-open-background-color` for backdrop styling instead.
3436
+ * @csspart dialog - apply CSS to the entire dialog
3437
+ * @csspart dialog-header - apply CSS to the header of the dialog
3438
+ * @csspart dialog-content - apply CSS to the content of the dialog
3439
+ * @csspart dialog-footer - apply CSS to the footer of the dialog
3440
+ */
3441
+ class ComponentBase extends i$2 {
3442
+ constructor() {
3443
+ super();
3444
+
3445
+ this._initializeDefaults();
3446
+ }
3447
+
3448
+ _initializeDefaults() {
3449
+ this.modal = false;
3450
+ this.unformatted = false;
3451
+ this.closeButtonAppearance = 'default';
3452
+
3453
+ this.isPopoverVisible = false;
3454
+ this.isBibFullscreen = false;
3455
+ this.floater = new AuroFloatingUI(this, 'dialog');
3456
+
3457
+ const versioning = new AuroDependencyVersioning();
3458
+
3459
+ /**
3460
+ * @private
3461
+ */
3462
+ this.buttonTag = versioning.generateTag(
3463
+ "auro-button",
3464
+ buttonVersion,
3465
+ T,
3466
+ );
3467
+
3468
+ /**
3469
+ * @private
3470
+ */
3471
+ this.iconTag = versioning.generateTag("auro-icon", iconVersion, k);
3472
+
3473
+ /**
3474
+ * @private
3475
+ */
3476
+ this.runtimeUtils = new AuroLibraryRuntimeUtils();
3477
+ }
3478
+
3479
+ static get properties() {
3480
+ return {
3481
+
3482
+ /**
3483
+ * Defines whether the close button should be light colored for use on dark backgrounds.
3484
+ * @type {'default'|'inverse'}
3485
+ * @default 'default'
3486
+ */
3487
+ closeButtonAppearance: {
3488
+ type: String,
3489
+ attribute: 'close-button-appearance',
3490
+ reflect: true
3491
+ },
3492
+
3493
+ /**
3494
+ * Sets dialog box to large style. Adding both lg and sm/md will set the dialog to lg for mobile and sm/md for desktop.
3495
+ * Must be used in conjunction with sm or md to have an effect.
3496
+ */
3497
+ lg: {
3498
+ type: Boolean,
3499
+ reflect: true
3500
+ },
3501
+
3502
+ /**
3503
+ * Sets dialog box to medium style. Adding both md and lg will set the dialog to md for desktop and lg for mobile.
3504
+ */
3505
+ md: {
3506
+ type: Boolean,
3507
+ reflect: true
3508
+ },
3509
+
3510
+ /**
3511
+ * Modal dialog restricts the user to take an action (no default close actions).
3512
+ */
3513
+ modal: { type: Boolean },
3514
+
3515
+ /**
3516
+ * DEPRECATED - use `close-button-appearance="inverse" instead.
3517
+ */
3518
+ onDark: {
3519
+ type: Boolean,
3520
+ reflect: true
3521
+ },
3522
+
3523
+ /**
3524
+ * Sets state of dialog to open.
3525
+ */
3526
+ isPopoverVisible: {
3527
+ type: Boolean,
3528
+ reflect: true,
3529
+ attribute: 'open'
3530
+ },
3531
+
3532
+ /**
3533
+ * If true, the dialog bib is in fullscreen mode.
3534
+ * @private
3535
+ */
3536
+ isBibFullscreen: {
3537
+ type: Boolean,
3538
+ reflect: true
3539
+ },
3540
+
3541
+ /**
3542
+ * Sets dialog box to small style. Adding both sm and lg will set the dialog to sm for desktop and lg for mobile.
3543
+ */
3544
+ sm: {
3545
+ type: Boolean,
3546
+ reflect: true
3547
+ },
3548
+
3549
+ /**
3550
+ * The element to focus when the dialog is closed. If not set, defaults to the value of document.activeElement when the dialog is opened.
3551
+ * @type {HTMLElement}
3552
+ */
3553
+ triggerElement: {
3554
+ type: Object,
3555
+ attribute: false
3556
+ },
3557
+
3558
+ /**
3559
+ * Unformatted dialog window, edge-to-edge fill for content.
3560
+ */
3561
+ unformatted: {
3562
+ type: Boolean,
3563
+ reflect: true
3564
+ }
3565
+ };
3566
+ }
3567
+
3568
+ get open() {
3569
+ return this.isPopoverVisible;
3570
+ }
3571
+
3572
+ set open(value) {
3573
+ this.isPopoverVisible = Boolean(value);
3574
+ }
3575
+
3576
+ /**
3577
+ * @ignore
3578
+ */
3579
+ get floaterConfig() {
3580
+ if (!ComponentBase._mobileBreakpointValue) {
3581
+ const docStyle = getComputedStyle(document.documentElement);
3582
+ ComponentBase._mobileBreakpointValue = docStyle.getPropertyValue(MOBILE_BREAKPOINT).trim();
3583
+ }
3584
+ return {
3585
+ prefix: 'auroDialog',
3586
+ fullscreenBreakpoint: ComponentBase._mobileBreakpointValue,
3587
+ };
3588
+ }
3589
+
3590
+ get behavior() {
3591
+ return 'dialog';
3592
+ }
3593
+
3594
+ firstUpdated() {
3595
+ // Add the tag name as an attribute if it is different than the component name
3596
+ this.runtimeUtils.handleComponentTagRename(this, "auro-dialog");
3597
+
3598
+ const slot = this.shadowRoot.querySelector("#footer");
3599
+ const slotWrapper = this.shadowRoot.querySelector("#footerWrapper");
3600
+
3601
+ this.dialog = this.shadowRoot.getElementById("dialog");
3602
+
3603
+ if (!this.unformatted && slot.assignedNodes().length === 0) {
3604
+ slotWrapper.classList.remove("dialog-footer");
3605
+ }
3606
+
3607
+ this.floater.configure(this, this.floaterConfig.prefix);
3608
+
3609
+ // Forward FloatingUI toggle event to backward-compatible 'toggle' event
3610
+ this.addEventListener('auroDialog-toggled', (event) => {
3611
+ if (!event.detail.expanded) {
3612
+ this.dispatchToggleEvent();
3613
+ }
3614
+ });
3615
+
3616
+ // Always intercept the native ESC/cancel event so we can decide
3617
+ // whether to honour it based on `modal`. Re-dispatch via FloatingUI
3618
+ // for non-modal so the hide lifecycle runs correctly.
3619
+ this.dialog.addEventListener('cancel', (e) => {
3620
+ e.preventDefault();
3621
+ if (!this.modal) {
3622
+ this.hide();
3623
+ }
3624
+ });
3625
+
3626
+ // Clicks that land directly on the <dialog> element (not on a child) are
3627
+ // backdrop clicks. With the dialog in the top layer the ::backdrop sits above
3628
+ // the deprecated overlay div, so this listener replaces the overlay div's
3629
+ // click handler for backdrop-area interactions.
3630
+ this.dialog.addEventListener('click', (e) => {
3631
+ if (e.target !== this.dialog) {
3632
+ return;
3633
+ }
3634
+ if (this.modal) {
3635
+ return; // Modal drawers require an explicit action to close.
3636
+ }
3637
+ if (AuroFloatingUI.topOpeningFloatingUI !== this.floater) {
3638
+ return; // there is another floatingUI that is currently visible, so ignore backdrop clicks on this one
3639
+ }
3640
+ this.hide();
3641
+ });
3642
+ }
3643
+
3644
+ /**
3645
+ * LitElement lifecycle method. Called after the DOM has been updated.
3646
+ * @param {Map<string, any>} changedProperties - Keys are the names of changed properties, values are the corresponding previous values.
3647
+ * @returns {void}
3648
+ */
3649
+ updated(changedProperties) {
3650
+ this.floater.handleUpdate(changedProperties);
3651
+
3652
+ if (changedProperties.has('isPopoverVisible')) {
3653
+ if (this.isPopoverVisible) {
3654
+ if (!this.floater.showing) {
3655
+ this.show();
3656
+ }
3657
+ } else {
3658
+ if (this.floater.showing) {
3659
+ this.hide();
3660
+ }
3661
+ }
3662
+ }
3663
+
3664
+ if (changedProperties.has('triggerElement')) {
3665
+ this.floater.configure(this, this.floaterConfig.prefix);
3666
+ }
3667
+ }
3668
+
3669
+ disconnectedCallback() {
3670
+ super.disconnectedCallback();
3671
+ if (this._hidePopoverTimerId) {
3672
+ clearTimeout(this._hidePopoverTimerId);
3673
+ this._hidePopoverTimerId = undefined;
3674
+ }
3675
+ if (this._focusFallbackTimerId) {
3676
+ clearTimeout(this._focusFallbackTimerId);
3677
+ this._focusFallbackTimerId = undefined;
3678
+ }
3679
+ if (this.focusTrap) {
3680
+ this.focusTrap.disconnect();
3681
+ this.focusTrap = undefined;
3682
+ }
3683
+ this._focusTrapActivated = false;
3684
+ this.floater.disconnect();
3685
+ }
3686
+
3687
+ /**
3688
+ * @private
3689
+ * @returns {void}
3690
+ */
3691
+ openDialog() {
3692
+ this.defaultTrigger = document.activeElement || this.triggerElement;
3693
+
3694
+ if (this._hidePopoverTimerId) {
3695
+ clearTimeout(this._hidePopoverTimerId);
3696
+ this._hidePopoverTimerId = undefined;
3697
+ }
3698
+
3699
+ if (this.modal) {
3700
+ this.dialog.showModal();
3701
+ } else {
3702
+ this.dialog.showPopover();
3703
+ }
3704
+
3705
+ if (this._focusFallbackTimerId) {
3706
+ clearTimeout(this._focusFallbackTimerId);
3707
+ this._focusFallbackTimerId = undefined;
3708
+ }
3709
+ if (this.focusTrap) {
3710
+ this.focusTrap.disconnect();
3711
+ }
3712
+
3713
+ this.focusTrap = new FocusTrap(this.dialog);
3714
+ this._focusTrapActivated = false;
3715
+
3716
+ // Fallback: if transitionend never fires (dialog mounted already-open,
3717
+ // reduced motion, or interrupted transition), engage the focus trap after
3718
+ // the transition duration elapses. 350ms = CSS open transition (300ms in
3719
+ // style.scss) + 50ms buffer.
3720
+ this._focusFallbackTimerId = setTimeout(() => {
3721
+ this._focusFallbackTimerId = undefined;
3722
+ if (this.isPopoverVisible && this.focusTrap && !this._focusTrapActivated) {
3723
+ this.focusTrap.focusFirstElement();
3724
+ this._focusTrapActivated = true;
3725
+ }
3726
+ }, 350);
3727
+ }
3728
+
3729
+ /**
3730
+ * Cancels the focus-trap fallback timer (if pending) and moves focus into
3731
+ * the dialog once the open CSS transition completes. No-ops when the
3732
+ * fallback timer already activated the trap (_focusTrapActivated === true).
3733
+ * @private
3734
+ */
3735
+ onDialogTransitionEnd() {
3736
+ if (this._focusFallbackTimerId) {
3737
+ clearTimeout(this._focusFallbackTimerId);
3738
+ this._focusFallbackTimerId = undefined;
3739
+ }
3740
+ if (this.isPopoverVisible && this.focusTrap && !this._focusTrapActivated) {
3741
+ this.focusTrap.focusFirstElement();
3742
+ this._focusTrapActivated = true;
3743
+ }
3744
+ }
3745
+
3746
+ /**
3747
+ * @private
3748
+ * @returns {void}
3749
+ */
3750
+ closeDialog() {
3751
+ if (this._focusFallbackTimerId) {
3752
+ clearTimeout(this._focusFallbackTimerId);
3753
+ this._focusFallbackTimerId = undefined;
3754
+ }
3755
+ this._focusTrapActivated = false;
3756
+
3757
+ if (this.focusTrap) {
3758
+ this.focusTrap.disconnect();
3759
+ this.focusTrap = undefined;
3760
+ }
3761
+
3762
+ if (this.modal) {
3763
+ // Dialog spec: close() immediately so the top-layer focus restriction is
3764
+ // lifted before we attempt to restore focus to the trigger.
3765
+ if (this.dialog?.open) {
3766
+ this.dialog.close();
3767
+ }
3768
+ } else {
3769
+ // Popover spec: delay hidePopover() so the dialog stays in the top layer
3770
+ // during the CSS close animation before leaving it.
3771
+ if (!this._hidePopoverTimerId) {
3772
+ this._hidePopoverTimerId = setTimeout(() => {
3773
+ this.dialog?.hidePopover?.();
3774
+ this._hidePopoverTimerId = undefined;
3775
+ }, 300);
3776
+ }
3777
+ }
3778
+
3779
+ if (this.defaultTrigger) {
3780
+ this.defaultTrigger.focus();
3781
+ this.defaultTrigger = undefined;
3782
+ }
3783
+ }
3784
+
3785
+ /**
3786
+ * @private
3787
+ * @returns {void}
3788
+ */
3789
+ dispatchToggleEvent() {
3790
+ const toggleEvent = new Event("toggle", {
3791
+ bubbles: true,
3792
+ cancelable: false
3793
+ });
3794
+
3795
+ this.dispatchEvent(toggleEvent);
3796
+ }
3797
+
3798
+ /**
3799
+ * @private
3800
+ * @returns {void}
3801
+ */
3802
+ handleCloseButtonClick() {
3803
+ this.hide();
3804
+ }
3805
+
3806
+ /**
3807
+ * Focus the dialog.
3808
+ * @private
3809
+ * @returns {void}
3810
+ */
3811
+ focus() {
3812
+ if (this.isPopoverVisible) {
3813
+ this.dialog.focus();
3814
+ }
3815
+ }
3816
+
3817
+ /**
3818
+ * Opens the dialog.
3819
+ * @returns {void}
3820
+ */
3821
+ show() {
3822
+ this.floater.showBib();
3823
+ this.openDialog();
3824
+ }
3825
+
3826
+ /**
3827
+ * Closes the dialog.
3828
+ * @returns {void}
3829
+ */
3830
+ hide() {
3831
+ this.floater.hideBib();
3832
+ this.closeDialog();
3833
+ }
3834
+
3835
+ static get styles() {
3836
+ return [styleCss, styleUnformattedCss, colorCss, tokensCss];
3837
+ }
3838
+
3839
+ /**
3840
+ * @private
3841
+ * @returns {TemplateResult} - The close button template.
3842
+ */
3843
+ getCloseButton() {
3844
+ return this.modal
3845
+ ? u$2``
3846
+ : u$2`
3847
+ <${this.buttonTag}
3848
+ aria-label="${this.runtimeUtils.getSlotText(this, 'ariaLabel.dialog.close') || 'Close'}"
3849
+ variant="ghost"
3850
+ shape="circle"
3851
+ size="sm"
3852
+ appearance=${this.hasAttribute("ondark") ? 'inverse' : this.closeButtonAppearance}
3853
+ class="dialog-header--action"
3854
+ id="dialog-close"
3855
+ @click="${this.handleCloseButtonClick}"
3856
+ part="close-button"
3857
+ >
3858
+ <${this.iconTag} customColor category="interface" name="x-lg"></${this.iconTag}>
3859
+ </${this.buttonTag}>
3860
+ `;
3861
+ }
3862
+
3863
+ render() {
3864
+ const classes = {
3865
+ dialogOverlay: true,
3866
+ "dialogOverlay--modal": this.modal && this.isPopoverVisible,
3867
+ "dialogOverlay--open": this.isPopoverVisible,
3868
+ util_displayHidden: !this.isPopoverVisible,
3869
+ };
3870
+ const wrapperClasses = {
3871
+ dialog: true,
3872
+ wrapper: true,
3873
+ "dialog--open": this.isPopoverVisible,
3874
+ };
3875
+
3876
+ return u$2`
3877
+ <!-- Hidden slot for close button aria-label -->
3878
+ <slot name="ariaLabel.dialog.close" hidden @slotchange=${this.requestUpdate}></slot>
3879
+
3880
+ <!-- @deprecated dialog-overlay: backdrop styling is now provided by ::backdrop on the dialog element.
3881
+ Retained for backward compatibility; part="dialog-overlay" remains available for custom CSS. -->
3882
+ <div class="${e(classes)}" id="dialog-overlay" part="dialog-overlay"></div>
3883
+
3884
+ <div id="bib" class="bib">
3885
+ <dialog
3886
+ id="dialog"
3887
+ popover="${o$1(this.modal ? undefined : 'manual')}"
3888
+ class="container"
3889
+ aria-labelledby="dialog-header"
3890
+ aria-describedby="dialog-content">
3891
+ <div class="${e(wrapperClasses)}"
3892
+ part="dialog"
3893
+ @transitionend="${this.onDialogTransitionEnd}">
3894
+ ${
3895
+ this.unformatted
3896
+ ? u$2`
3897
+ <slot name="content"></slot>
3898
+ ${this.getCloseButton()}
3899
+ `
3900
+ : u$2`
3901
+ <div class="dialog-header" part="dialog-header">
3902
+ <h1 class="heading heading-lg util_stackMarginNone--top" id="dialog-header">
3903
+ <slot name="header">Default header...</slot>
3904
+ </h1>
3905
+ ${this.getCloseButton()}
3906
+ </div>
3907
+ <div id="dialog-content" class="dialog-content body-default" part="dialog-content">
3908
+ <slot name="content"></slot>
3909
+ </div>
3910
+ <div class="dialog-footer" id="footerWrapper" part="dialog-footer">
3911
+ <slot name="footer" id="footer"></slot>
3912
+ </div>
3913
+ `
3914
+ }
3915
+ </div>
3916
+ </dialog>
3917
+ </div>
3918
+ `;
3919
+ }
3920
+ }
3921
+
3922
+ // Copyright (c) 2024 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3923
+ // See LICENSE in the project root for license information.
3924
+
3925
+
3926
+ /**
3927
+ * The `auro-dialog` appears on top of the page and presents information that requires the users immediate attention.
3928
+ * @customElement auro-dialog
3929
+ */
3930
+ class AuroDialog extends ComponentBase {
3931
+
3932
+ static get properties() {
3933
+ return {
3934
+ ...ComponentBase.properties,
3935
+ };
3936
+ }
3937
+
3938
+ static get styles() {
3939
+ return [ComponentBase.styles];
3940
+ }
3941
+
3942
+ /**
3943
+ * This will register this element with the browser.
3944
+ * @param {string} [name="auro-dialog"] - The name of the element that you want to register.
3945
+ *
3946
+ * @example
3947
+ * AuroDialog.register("custom-dialog") // this will register this element to <custom-dialog/>
3948
+ *
3949
+ */
3950
+ static register(name = "auro-dialog") {
3951
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroDialog);
3952
+ }
3953
+ }
3954
+
3955
+ AuroDialog.register();
3956
+
3957
+ function initExamples(initCount) {
3958
+ // biome-ignore lint/style/noParameterAssign: legacy error handling
3959
+ initCount = initCount || 0;
3960
+
3961
+ try {
3962
+ initEditCloseButtonExample();
3963
+ initPopoverAndDropdownExample();
3964
+ } catch (_err) {
3965
+ if (initCount <= 20) {
3966
+ // setTimeout handles issue where content is sometimes loaded after the functions get called
3967
+ setTimeout(() => {
3968
+ initExamples(initCount + 1);
3969
+ }, 100);
3970
+ }
3971
+ }
3972
+ }
3973
+
3974
+ export { initExamples };