@aurodesignsystem-dev/auro-dialog 0.0.0-pr106.4 → 0.0.0-pr106.5

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.
@@ -3426,6 +3426,9 @@ class ComponentBase extends i$2 {
3426
3426
  disconnectedCallback() {
3427
3427
  super.disconnectedCallback();
3428
3428
  this.floater.disconnect();
3429
+ this._restorePageScroll();
3430
+ this._unlockTouchScroll();
3431
+ clearTimeout(this._resizeTimer);
3429
3432
  }
3430
3433
 
3431
3434
  /**
@@ -1,4 +1,4 @@
1
- import{css as e,LitElement as t,html as o}from"lit";import{classMap as s}from"lit/directives/class-map.js";import{ifDefined as a}from"lit/directives/if-defined.js";import{unsafeStatic as r,literal as i,html as n}from"lit/static-html.js";class l{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,o=(t,s=t&&t.closest(e))=>t&&t!==document&&t!==window?s||o(t.getRootNode().host):null){return o(t)}handleComponentTagRename(e,t){const o=t.toLowerCase();e.tagName.toLowerCase()!==o&&e.setAttribute(o,!0)}elementMatch(e,t){const o=t.toLowerCase();return e.tagName.toLowerCase()===o||e.hasAttribute(o)}getSlotText(e,t){const o=e.shadowRoot?.querySelector(`slot[name="${t}"]`);return(o?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent?.trim()).join(" ").trim()||null}}class c{generateElementName(e,t){let o=e;return o+="-",o+=t.replace(/[.]/g,"_"),o}generateTag(e,t,o){const s=this.generateElementName(e,t),a=i`${r(s)}`;return customElements.get(s)||customElements.define(s,class extends o{}),a}}const d=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[role="tab"]:not([disabled])','[role="link"]:not([disabled])','[role="button"]:not([disabled])','[tabindex]:not([tabindex="-1"])','[contenteditable]:not([contenteditable="false"])'],h=["auro-checkbox","auro-radio","auro-dropdown","auro-button","auro-combobox","auro-input","auro-counter","auro-select","auro-datepicker","auro-hyperlink","auro-accordion"];function u(e){const t=e.getAttribute("tabindex");if(null==t)return null;const o=Number.parseInt(t,10);return Number.isNaN(o)?null:o}function p(e){const t=[],o=e=>{if(e.nodeType===Node.ELEMENT_NODE){if(function(e){const t=e.tagName.toLowerCase();return!(!h.some(o=>e.hasAttribute(o)||t===o)||e.hasAttribute("disabled")||t.match("hyperlink")&&!e.hasAttribute("href"))}(e))return void t.push(e);for(const o of d)if(e.matches?.(o)){t.push(e);break}if(e.shadowRoot&&e.shadowRoot.children&&Array.from(e.shadowRoot.children).forEach(e=>{o(e)}),"SLOT"===e.tagName){const t=e.assignedNodes({flatten:!0});for(const e of t)o(e)}else e.children&&Array.from(e.children).forEach(e=>{o(e)})}};o(e);const s=[],a=new Set;for(const e of t)a.has(e)||(a.add(e),s.push(e));const r=s.filter(e=>{const t=u(e);return null!==t&&t>0});r.sort((e,t)=>(u(e)??0)-(u(t)??0));const i=s.filter(e=>{const t=u(e);return null===t||0===t});return[...r,...i]}class b{constructor(e,t=!1){if(!(e&&e instanceof HTMLElement))throw new Error("FocusTrap requires a valid HTMLElement.");this.container=e,this.tabDirection="forward",this.controlTabOrder=t,this._init()}_init(){"inert"in HTMLElement.prototype&&(this.container.inert=!1,this.container.setAttribute("data-focus-trap-container",!0)),this.container.addEventListener("keydown",this._onKeydown)}_getActiveElements(){let{activeElement:e}=document;const t=[e];for(;e?.shadowRoot?.activeElement;)t.push(e.shadowRoot.activeElement),e=e.shadowRoot.activeElement;return t}_getNextFocusIndex(e,t,o){if(this.controlTabOrder){let o=e+("forward"===this.tabDirection?1:-1);return o<0&&(o=t.length-1),o>=t.length&&(o=0),o}const s=o.includes(t[0])||o.includes(this.container),a=o.includes(t[t.length-1]);return"backward"===this.tabDirection&&s?t.length-1:"forward"===this.tabDirection&&a?0:null}_handleTabKey(e){const t=this._getFocusableElements();if(!t.length)return;this.tabDirection=e.shiftKey?"backward":"forward";const o=this._getActiveElements();let s=t.findIndex(e=>o.includes(e));-1===s&&(s=0);const a=this._getNextFocusIndex(s,t,o);null!==a&&(e.preventDefault(),t[a].focus())}_onKeydown=e=>{"Tab"===e.key&&this._handleTabKey(e)};_getFocusableElements(){return p(this.container)}focusFirstElement(){const e=this._getFocusableElements();e.length&&e[0].focus()}focusLastElement(){const e=this._getFocusableElements();e.length&&e[e.length-1].focus()}disconnect(){this.container.hasAttribute("data-focus-trap-container")&&this.container.removeAttribute("data-focus-trap-container"),this.container.removeEventListener("keydown",this._onKeydown)}}const m=["start","end"],g=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-"+m[0],t+"-"+m[1]),[]),f=Math.min,v=Math.max,x=Math.round,y=Math.floor,w=e=>({x:e,y:e}),z={left:"right",right:"left",bottom:"top",top:"bottom"},k={start:"end",end:"start"};function S(e,t,o){return v(e,f(t,o))}function A(e,t){return"function"==typeof e?e(t):e}function B(e){return e.split("-")[0]}function T(e){return e.split("-")[1]}function E(e){return"x"===e?"y":"x"}function C(e){return"y"===e?"height":"width"}const H=new Set(["top","bottom"]);function R(e){return H.has(B(e))?"y":"x"}function L(e){return E(R(e))}function q(e,t,o){void 0===o&&(o=!1);const s=T(e),a=L(e),r=C(a);let i="x"===a?s===(o?"end":"start")?"right":"left":"start"===s?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=D(i)),[i,D(i)]}function _(e){return e.replace(/start|end/g,e=>k[e])}const F=["left","right"],M=["right","left"],N=["top","bottom"],P=["bottom","top"];function I(e,t,o,s){const a=T(e);let r=function(e,t,o){switch(e){case"top":case"bottom":return o?t?M:F:t?F:M;case"left":case"right":return t?N:P;default:return[]}}(B(e),"start"===o,s);return a&&(r=r.map(e=>e+"-"+a),t&&(r=r.concat(r.map(_)))),r}function D(e){return e.replace(/left|right|bottom|top/g,e=>z[e])}function U(e){const{x:t,y:o,width:s,height:a}=e;return{width:s,height:a,top:o,left:t,right:t+s,bottom:o+a,x:t,y:o}}function $(e,t,o){let{reference:s,floating:a}=e;const r=R(t),i=L(t),n=C(i),l=B(t),c="y"===r,d=s.x+s.width/2-a.width/2,h=s.y+s.height/2-a.height/2,u=s[n]/2-a[n]/2;let p;switch(l){case"top":p={x:d,y:s.y-a.height};break;case"bottom":p={x:d,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:h};break;case"left":p={x:s.x-a.width,y:h};break;default:p={x:s.x,y:s.y}}switch(T(t)){case"start":p[i]-=u*(o&&c?-1:1);break;case"end":p[i]+=u*(o&&c?-1:1)}return p}async function O(e,t){var o;void 0===t&&(t={});const{x:s,y:a,platform:r,rects:i,elements:n,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=A(t,e),b=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=n[u?"floating"===h?"reference":"floating":h],g=U(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(m)))||o?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(n.floating)),boundary:c,rootBoundary:d,strategy:l})),f="floating"===h?{x:s,y:a,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(n.floating)),x=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},y=U(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:f,offsetParent:v,strategy:l}):f);return{top:(g.top-y.top+b.top)/x.y,bottom:(y.bottom-g.bottom+b.bottom)/x.y,left:(g.left-y.left+b.left)/x.x,right:(y.right-g.right+b.right)/x.x}}const W=new Set(["left","top"]);function V(){return"undefined"!=typeof window}function X(e){return K(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function G(e){var t;return null==(t=(K(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function K(e){return!!V()&&(e instanceof Node||e instanceof j(e).Node)}function Y(e){return!!V()&&(e instanceof Element||e instanceof j(e).Element)}function J(e){return!!V()&&(e instanceof HTMLElement||e instanceof j(e).HTMLElement)}function Q(e){return!(!V()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof j(e).ShadowRoot)}const Z=new Set(["inline","contents"]);function ee(e){const{overflow:t,overflowX:o,overflowY:s,display:a}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+o)&&!Z.has(a)}const te=new Set(["table","td","th"]);function oe(e){return te.has(X(e))}const se=[":popover-open",":modal"];function ae(e){return se.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const re=["transform","translate","scale","rotate","perspective"],ie=["transform","translate","scale","rotate","perspective","filter"],ne=["paint","layout","strict","content"];function le(e){const t=ce(),o=Y(e)?ue(e):e;return re.some(e=>!!o[e]&&"none"!==o[e])||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||ie.some(e=>(o.willChange||"").includes(e))||ne.some(e=>(o.contain||"").includes(e))}function ce(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const de=new Set(["html","body","#document"]);function he(e){return de.has(X(e))}function ue(e){return j(e).getComputedStyle(e)}function pe(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function be(e){if("html"===X(e))return e;const t=e.assignedSlot||e.parentNode||Q(e)&&e.host||G(e);return Q(t)?t.host:t}function me(e){const t=be(e);return he(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&ee(t)?t:me(t)}function ge(e,t,o){var s;void 0===t&&(t=[]),void 0===o&&(o=!0);const a=me(e),r=a===(null==(s=e.ownerDocument)?void 0:s.body),i=j(a);if(r){const e=fe(i);return t.concat(i,i.visualViewport||[],ee(a)?a:[],e&&o?ge(e):[])}return t.concat(a,ge(a,[],o))}function fe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ve(e){const t=ue(e);let o=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=J(e),r=a?e.offsetWidth:o,i=a?e.offsetHeight:s,n=x(o)!==r||x(s)!==i;return n&&(o=r,s=i),{width:o,height:s,$:n}}function xe(e){return Y(e)?e:e.contextElement}function ye(e){const t=xe(e);if(!J(t))return w(1);const o=t.getBoundingClientRect(),{width:s,height:a,$:r}=ve(t);let i=(r?x(o.width):o.width)/s,n=(r?x(o.height):o.height)/a;return i&&Number.isFinite(i)||(i=1),n&&Number.isFinite(n)||(n=1),{x:i,y:n}}const we=w(0);function ze(e){const t=j(e);return ce()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:we}function ke(e,t,o,s){void 0===t&&(t=!1),void 0===o&&(o=!1);const a=e.getBoundingClientRect(),r=xe(e);let i=w(1);t&&(s?Y(s)&&(i=ye(s)):i=ye(e));const n=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==j(e))&&t}(r,o,s)?ze(r):w(0);let l=(a.left+n.x)/i.x,c=(a.top+n.y)/i.y,d=a.width/i.x,h=a.height/i.y;if(r){const e=j(r),t=s&&Y(s)?j(s):s;let o=e,a=fe(o);for(;a&&s&&t!==o;){const e=ye(a),t=a.getBoundingClientRect(),s=ue(a),r=t.left+(a.clientLeft+parseFloat(s.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(s.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,h*=e.y,l+=r,c+=i,o=j(a),a=fe(o)}}return U({width:d,height:h,x:l,y:c})}function Se(e,t){const o=pe(e).scrollLeft;return t?t.left+o:ke(G(e)).left+o}function Ae(e,t){const o=e.getBoundingClientRect();return{x:o.left+t.scrollLeft-Se(e,o),y:o.top+t.scrollTop}}const Be=new Set(["absolute","fixed"]);function Te(e,t,o){let s;if("viewport"===t)s=function(e,t){const o=j(e),s=G(e),a=o.visualViewport;let r=s.clientWidth,i=s.clientHeight,n=0,l=0;if(a){r=a.width,i=a.height;const e=ce();(!e||e&&"fixed"===t)&&(n=a.offsetLeft,l=a.offsetTop)}const c=Se(s);if(c<=0){const e=s.ownerDocument,t=e.body,o=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(o.marginLeft)+parseFloat(o.marginRight)||0,i=Math.abs(s.clientWidth-t.clientWidth-a);i<=25&&(r-=i)}else c<=25&&(r+=c);return{width:r,height:i,x:n,y:l}}(e,o);else if("document"===t)s=function(e){const t=G(e),o=pe(e),s=e.ownerDocument.body,a=v(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),r=v(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let i=-o.scrollLeft+Se(e);const n=-o.scrollTop;return"rtl"===ue(s).direction&&(i+=v(t.clientWidth,s.clientWidth)-a),{width:a,height:r,x:i,y:n}}(G(e));else if(Y(t))s=function(e,t){const o=ke(e,!0,"fixed"===t),s=o.top+e.clientTop,a=o.left+e.clientLeft,r=J(e)?ye(e):w(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:a*r.x,y:s*r.y}}(t,o);else{const o=ze(e);s={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return U(s)}function Ee(e,t){const o=be(e);return!(o===t||!Y(o)||he(o))&&("fixed"===ue(o).position||Ee(o,t))}function Ce(e,t,o){const s=J(t),a=G(t),r="fixed"===o,i=ke(e,!0,r,t);let n={scrollLeft:0,scrollTop:0};const l=w(0);function c(){l.x=Se(a)}if(s||!s&&!r)if(("body"!==X(t)||ee(a))&&(n=pe(t)),s){const e=ke(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();r&&!s&&a&&c();const d=!a||s||r?w(0):Ae(a,n);return{x:i.left+n.scrollLeft-l.x-d.x,y:i.top+n.scrollTop-l.y-d.y,width:i.width,height:i.height}}function He(e){return"static"===ue(e).position}function Re(e,t){if(!J(e)||"fixed"===ue(e).position)return null;if(t)return t(e);let o=e.offsetParent;return G(e)===o&&(o=o.ownerDocument.body),o}function Le(e,t){const o=j(e);if(ae(e))return o;if(!J(e)){let t=be(e);for(;t&&!he(t);){if(Y(t)&&!He(t))return t;t=be(t)}return o}let s=Re(e,t);for(;s&&oe(s)&&He(s);)s=Re(s,t);return s&&he(s)&&He(s)&&!le(s)?o:s||function(e){let t=be(e);for(;J(t)&&!he(t);){if(le(t))return t;if(ae(t))return null;t=be(t)}return null}(e)||o}const qe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:s,strategy:a}=e;const r="fixed"===a,i=G(s),n=!!t&&ae(t.floating);if(s===i||n&&r)return o;let l={scrollLeft:0,scrollTop:0},c=w(1);const d=w(0),h=J(s);if((h||!h&&!r)&&(("body"!==X(s)||ee(i))&&(l=pe(s)),J(s))){const e=ke(s);c=ye(s),d.x=e.x+s.clientLeft,d.y=e.y+s.clientTop}const u=!i||h||r?w(0):Ae(i,l);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+d.x+u.x,y:o.y*c.y-l.scrollTop*c.y+d.y+u.y}},getDocumentElement:G,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:s,strategy:a}=e;const r=[..."clippingAncestors"===o?ae(t)?[]:function(e,t){const o=t.get(e);if(o)return o;let s=ge(e,[],!1).filter(e=>Y(e)&&"body"!==X(e)),a=null;const r="fixed"===ue(e).position;let i=r?be(e):e;for(;Y(i)&&!he(i);){const t=ue(i),o=le(i);o||"fixed"!==t.position||(a=null),(r?!o&&!a:!o&&"static"===t.position&&a&&Be.has(a.position)||ee(i)&&!o&&Ee(e,i))?s=s.filter(e=>e!==i):a=t,i=be(i)}return t.set(e,s),s}(t,this._c):[].concat(o),s],i=r[0],n=r.reduce((e,o)=>{const s=Te(t,o,a);return e.top=v(s.top,e.top),e.right=f(s.right,e.right),e.bottom=f(s.bottom,e.bottom),e.left=v(s.left,e.left),e},Te(t,i,a));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:Le,getElementRects:async function(e){const t=this.getOffsetParent||Le,o=this.getDimensions,s=await o(e.floating);return{reference:Ce(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=ve(e);return{width:t,height:o}},getScale:ye,isElement:Y,isRTL:function(e){return"rtl"===ue(e).direction}};function _e(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fe(e,t,o,s){void 0===s&&(s={});const{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:l=!1}=s,c=xe(e),d=a||r?[...c?ge(c):[],...ge(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",o,{passive:!0}),r&&e.addEventListener("resize",o)});const h=c&&n?function(e,t){let o,s=null;const a=G(e);function r(){var e;clearTimeout(o),null==(e=s)||e.disconnect(),s=null}return function i(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),r();const c=e.getBoundingClientRect(),{left:d,top:h,width:u,height:p}=c;if(n||t(),!u||!p)return;const b={rootMargin:-y(h)+"px "+-y(a.clientWidth-(d+u))+"px "+-y(a.clientHeight-(h+p))+"px "+-y(d)+"px",threshold:v(0,f(1,l))||1};let m=!0;function g(t){const s=t[0].intersectionRatio;if(s!==l){if(!m)return i();s?i(!1,s):o=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==s||_e(c,e.getBoundingClientRect())||i(),m=!1}try{s=new IntersectionObserver(g,{...b,root:a.ownerDocument})}catch(e){s=new IntersectionObserver(g,b)}s.observe(e)}(!0),r}(c,o):null;let u,p=-1,b=null;i&&(b=new ResizeObserver(e=>{let[s]=e;s&&s.target===c&&b&&(b.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=b)||e.observe(t)})),o()}),c&&!l&&b.observe(c),b.observe(t));let m=l?ke(e):null;return l&&function t(){const s=ke(e);m&&!_e(m,s)&&o();m=s,u=requestAnimationFrame(t)}(),o(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",o),r&&e.removeEventListener("resize",o)}),null==h||h(),null==(e=b)||e.disconnect(),b=null,l&&cancelAnimationFrame(u)}}const Me=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,s;const{x:a,y:r,placement:i,middlewareData:n}=t,l=await async function(e,t){const{placement:o,platform:s,elements:a}=e,r=await(null==s.isRTL?void 0:s.isRTL(a.floating)),i=B(o),n=T(o),l="y"===R(o),c=W.has(i)?-1:1,d=r&&l?-1:1,h=A(t,e);let{mainAxis:u,crossAxis:p,alignmentAxis:b}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return n&&"number"==typeof b&&(p="end"===n?-1*b:b),l?{x:p*d,y:u*c}:{x:u*c,y:p*d}}(t,e);return i===(null==(o=n.offset)?void 0:o.placement)&&null!=(s=n.arrow)&&s.alignmentOffset?{}:{x:a+l.x,y:r+l.y,data:{...l,placement:i}}}}},Ne=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,s,a;const{rects:r,middlewareData:i,placement:n,platform:l,elements:c}=t,{crossAxis:d=!1,alignment:h,allowedPlacements:u=g,autoAlignment:p=!0,...b}=A(e,t),m=void 0!==h||u===g?function(e,t,o){return(e?[...o.filter(t=>T(t)===e),...o.filter(t=>T(t)!==e)]:o.filter(e=>B(e)===e)).filter(o=>!e||T(o)===e||!!t&&_(o)!==o)}(h||null,p,u):u,f=await O(t,b),v=(null==(o=i.autoPlacement)?void 0:o.index)||0,x=m[v];if(null==x)return{};const y=q(x,r,await(null==l.isRTL?void 0:l.isRTL(c.floating)));if(n!==x)return{reset:{placement:m[0]}};const w=[f[B(x)],f[y[0]],f[y[1]]],z=[...(null==(s=i.autoPlacement)?void 0:s.overflows)||[],{placement:x,overflows:w}],k=m[v+1];if(k)return{data:{index:v+1,overflows:z},reset:{placement:k}};const S=z.map(e=>{const t=T(e.placement);return[e.placement,t&&d?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),E=S.filter(e=>e[2].slice(0,T(e[0])?2:3).every(e=>e<=0)),C=(null==(a=E[0])?void 0:a[0])||S[0][0];return C!==n?{data:{index:v+1,overflows:z},reset:{placement:C}}:{}}}},Pe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:s,placement:a}=t,{mainAxis:r=!0,crossAxis:i=!1,limiter:n={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...l}=A(e,t),c={x:o,y:s},d=await O(t,l),h=R(B(a)),u=E(h);let p=c[u],b=c[h];if(r){const e="y"===u?"bottom":"right";p=S(p+d["y"===u?"top":"left"],p,p-d[e])}if(i){const e="y"===h?"bottom":"right";b=S(b+d["y"===h?"top":"left"],b,b-d[e])}const m=n.fn({...t,[u]:p,[h]:b});return{...m,data:{x:m.x-o,y:m.y-s,enabled:{[u]:r,[h]:i}}}}}},Ie=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,s;const{placement:a,middlewareData:r,rects:i,initialPlacement:n,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...g}=A(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const f=B(a),v=R(n),x=B(n)===n,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=u||(x||!m?[D(n)]:function(e){const t=D(e);return[_(e),t,_(t)]}(n)),z="none"!==b;!u&&z&&w.push(...I(n,m,b,y));const k=[n,...w],S=await O(t,g),T=[];let E=(null==(s=r.flip)?void 0:s.overflows)||[];if(d&&T.push(S[f]),h){const e=q(a,i,y);T.push(S[e[0]],S[e[1]])}if(E=[...E,{placement:a,overflows:T}],!T.every(e=>e<=0)){var C,H;const e=((null==(C=r.flip)?void 0:C.index)||0)+1,t=k[e];if(t){if(!("alignment"===h&&v!==R(t))||E.every(e=>R(e.placement)!==v||e.overflows[0]>0))return{data:{index:e,overflows:E},reset:{placement:t}}}let o=null==(H=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:H.placement;if(!o)switch(p){case"bestFit":{var L;const e=null==(L=E.filter(e=>{if(z){const t=R(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:L[0];e&&(o=e);break}case"initialPlacement":o=n}if(a!==o)return{reset:{placement:o}}}return{}}}},De=(e,t,o)=>{const s=new Map,a={platform:qe,...o},r={...a.platform,_c:s};return(async(e,t,o)=>{const{placement:s="bottom",strategy:a="absolute",middleware:r=[],platform:i}=o,n=r.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:h}=$(c,s,l),u=s,p={},b=0;for(let o=0;o<n.length;o++){const{name:r,fn:m}=n[o],{x:g,y:f,data:v,reset:x}=await m({x:d,y:h,initialPlacement:s,placement:u,strategy:a,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});d=null!=g?g:d,h=null!=f?f:h,p={...p,[r]:{...p[r],...v}},x&&b<=50&&(b++,"object"==typeof x&&(x.placement&&(u=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):x.rects),({x:d,y:h}=$(c,u,l))),o=-1)}return{x:d,y:h,placement:u,strategy:a,middlewareData:p}})(e,t,{...a,platform:r})};class Ue{static isMousePressed=!1;static isMousePressHandlerInitialized=!1;static setupMousePressChecker(){if(!Ue.isMousePressHandlerInitialized&&window&&window.addEventListener){Ue.isMousePressHandlerInitialized=!0,Ue._mousePressedTimeout||(Ue._mousePressedTimeout=null);const e=e=>{const t="mousedown"===e.type;t?(null!==Ue._mousePressedTimeout&&(clearTimeout(Ue._mousePressedTimeout),Ue._mousePressedTimeout=null),Ue.isMousePressed||(Ue.isMousePressed=!0)):Ue.isMousePressed&&!t&&(Ue._mousePressedTimeout=setTimeout(()=>{Ue.isMousePressed=!1,Ue._mousePressedTimeout=null},0))};window.addEventListener("mousedown",e),window.addEventListener("mouseup",e)}}constructor(e,t){this.element=e,this.behavior=t,this.focusHandler=null,this.clickHandler=null,this.keyDownHandler=null,this.touchHandler=null,this.enableKeyboardHandling=!0,this.configureTrial=0,this.eventPrefix=void 0,this.id=void 0,this.showing=!1,this.strategy=void 0}mirrorSize(){const e=this.element;if(e&&e.bibSizer&&e.matchWidth&&e.bib?.shadowRoot){const t=window.getComputedStyle(e.bibSizer),o=e.bib.shadowRoot.querySelector(".container");if(!o)return;"0px"!==t.width&&(o.style.width=t.width),"0px"!==t.height&&(o.style.height=t.height),o.style.maxWidth=t.maxWidth,o.style.maxHeight=t.maxHeight}}getPositioningStrategy(){const e=this.element;if(!e)return"floating";const t=e.bib?.mobileFullscreenBreakpoint||e.floaterConfig?.fullscreenBreakpoint;switch(this.behavior){case"tooltip":return"floating";case"dialog":case"drawer":if(t){const o=window.matchMedia(`(max-width: ${t})`).matches;e.expanded=o}return e.nested?"cover":"fullscreen";case"dropdown":case void 0:case null:if(t){if(window.matchMedia(`(max-width: ${t})`).matches)return"fullscreen"}return"floating";default:return this.behavior}}position(){const e=this.element;if(!e)return;const t=this.getPositioningStrategy();if(this.configureBibStrategy(t),"floating"===t){if(!e.trigger||!e.bib)return;this.mirrorSize();const t=[Me(e.floaterConfig?.offset||0),...e.floaterConfig?.shift?[Pe()]:[],...e.floaterConfig?.flip?[Ie()]:[],...e.floaterConfig?.autoPlacement?[Ne()]:[]];De(e.trigger,e.bib,{strategy:e.floaterConfig?.strategy||"fixed",placement:e.floaterConfig?.placement,middleware:t||[]}).then(({x:e,y:t})=>{const o=this.element;o?.bib&&Object.assign(o.bib.style,{left:`${e}px`,top:`${t}px`})})}else if("cover"===t){if(!e.parentNode||!e.bib)return;De(e.parentNode,e.bib,{placement:"bottom-start"}).then(({x:e,y:t})=>{const o=this.element;o?.bib&&o.parentNode&&Object.assign(o.bib.style,{left:`${e}px`,top:t-o.parentNode.offsetHeight+"px",width:`${o.parentNode.offsetWidth}px`,height:`${o.parentNode.offsetHeight}px`})})}}lockScroll(e=!0){const t=this.element;if(e){if(!t?.bib)return;document.body.style.overflow="hidden",t.bib.style.transform=`translateY(${window?.visualViewport?.offsetTop}px)`}else document.body.style.overflow=""}configureBibStrategy(e){const t=this.element;if(!t?.bib)return;if("fullscreen"===e){t.isBibFullscreen=!0,t.bib.setAttribute("isfullscreen",""),t.bib.style.position="fixed",t.bib.style.top="0px",t.bib.style.left="0px",t.bib.style.width="",t.bib.style.height="",t.style.contain="";const o=t.bib.shadowRoot?.querySelector(".container");o?(o.style.width="",o.style.height="",o.style.maxWidth="",o.style.maxHeight=`${window?.visualViewport?.height}px`,this.configureTrial=0):this.configureTrial<10&&(this.configureTrial+=1,setTimeout(()=>{this.configureBibStrategy(e)},0)),t.isPopoverVisible&&this.lockScroll(!0)}else t.bib.style.position="",t.bib.removeAttribute("isfullscreen"),t.isBibFullscreen=!1,t.style.contain="layout";const o=this.strategy&&this.strategy!==e;if(this.strategy=e,o){const o=new CustomEvent(this.eventPrefix?`${this.eventPrefix}-strategy-change`:"strategy-change",{detail:{value:e},composed:!0});t.dispatchEvent(o)}}updateState(){const e=this.element;if(!e)return;if(!e.isPopoverVisible){this.cleanupHideHandlers();try{e.cleanup?.()}catch(e){}}}handleFocusLoss(){const e=this.element;e?.bib&&(Ue.isMousePressed||e.noHideOnThisFocusLoss||e.hasAttribute("noHideOnThisFocusLoss")||e.matches(":focus")||e.matches(":focus-within")||e.bib.hasAttribute("isfullscreen")||this.hideBib("keydown"))}setupHideHandlers(){this.element&&(this.focusHandler=()=>this.handleFocusLoss(),this.clickHandler=e=>{const t=this.element;if(t?.bib&&!t.bib.hasAttribute("isfullscreen")&&(!e.composedPath().includes(t.trigger)&&!e.composedPath().includes(t.bib)||t.bib.backdrop&&e.composedPath().includes(t.bib.backdrop))){const e=document.expandedAuroFormkitDropdown||document.expandedAuroFloater;e&&e.element.isPopoverVisible?(e.hideBib(),document.expandedAuroFormkitDropdown=null,document.expandedAuroFloater=this):this.hideBib("click")}},this.keyDownHandler=e=>{const t=this.element;if(t&&"Escape"===e.key&&t.isPopoverVisible){const e=document.expandedAuroFormkitDropdown||document.expandedAuroFloater;if(e&&e!==this&&e.element.isPopoverVisible)return;this.hideBib("keydown")}},"drawer"!==this.behavior&&"dialog"!==this.behavior&&document.addEventListener("focusin",this.focusHandler),this.enableKeyboardHandling&&document.addEventListener("keydown",this.keyDownHandler),setTimeout(()=>{window.addEventListener("click",this.clickHandler)},0),this.touchHandler=e=>{const t=this.element;if(!t?.bib)return;if(t.bib.hasAttribute("isfullscreen"))return;const o=e.composedPath();o.includes(t.trigger)||o.includes(t.bib)||this.hideBib("click")},window.addEventListener("touchstart",this.touchHandler,{passive:!0}))}cleanupHideHandlers(){this.focusHandler&&(document.removeEventListener("focusin",this.focusHandler),this.focusHandler=null),this.clickHandler&&(window.removeEventListener("click",this.clickHandler),this.clickHandler=null),this.touchHandler&&(window.removeEventListener("touchstart",this.touchHandler),this.touchHandler=null),this.keyDownHandler&&(document.removeEventListener("keydown",this.keyDownHandler),this.keyDownHandler=null)}handleUpdate(e){e.has("isPopoverVisible")&&this.updateState()}updateCurrentExpandedDropdown(){if(!this.element)return;const e=document.expandedAuroFormkitDropdown||document.expandedAuroFloater;e&&e!==this&&e.element.isPopoverVisible&&e.eventPrefix===this.eventPrefix&&e.hideBib(),document.expandedAuroFloater=this}showBib(){const e=this.element;e&&e.bib&&(e.trigger||e.parentNode)&&(e.disabled||this.showing||(this.updateCurrentExpandedDropdown(),e.triggerChevron?.setAttribute("data-expanded",!0),this.showing||(e.modal||this.setupHideHandlers(),this.showing=!0,e.isPopoverVisible=!0,this.position(),this.dispatchEventDropdownToggle()),e.cleanup=Fe(e.trigger||e.parentNode,e.bib,()=>{this.position()})))}hideBib(e="unknown"){const t=this.element;t&&(t.disabled||t.noToggle&&"click"===e||(this.lockScroll(!1),t.triggerChevron?.removeAttribute("data-expanded"),t.isPopoverVisible&&(t.isPopoverVisible=!1),this.showing&&(this.cleanupHideHandlers(),this.showing=!1,this.dispatchEventDropdownToggle(e)),document.expandedAuroFloater=null))}dispatchEventDropdownToggle(e){const t=this.element;if(!t)return;const o=new CustomEvent(this.eventPrefix?`${this.eventPrefix}-toggled`:"toggled",{detail:{expanded:this.showing,eventType:e||"unknown"},composed:!0});t.dispatchEvent(o)}handleClick(){const e=this.element;if(!e)return;e.isPopoverVisible?this.hideBib("click"):this.showBib();const t=new CustomEvent(this.eventPrefix?`${this.eventPrefix}-triggerClick`:"triggerClick",{composed:!0,detail:{expanded:e.isPopoverVisible}});e.dispatchEvent(t)}handleEvent(e){const t=this.element;if(t&&!t.disableEventShow)switch(e.type){case"keydown":{const t=e.composedPath()[0];"Enter"!==e.key&&(" "!==e.key||t&&"INPUT"===t.tagName)||(e.preventDefault(),this.handleClick());break}case"mouseenter":t.hoverToggle&&this.showBib();break;case"mouseleave":t.hoverToggle&&this.hideBib("mouseleave");break;case"focus":t.focusShow&&this.showBib();break;case"blur":setTimeout(()=>this.handleFocusLoss(),0);break;case"click":document.activeElement===document.body&&e.currentTarget.focus(),this.handleClick()}}handleTriggerTabIndex(){const e=this.element;if(!e)return;const t=e.querySelectorAll('[slot="trigger"]')[0];if(!t)return;const o=t.tagName.toLowerCase();["a","button",'input:not([type="hidden"])',"select","textarea",'[tabindex]:not([tabindex="-1"])',"auro-button","auro-input","auro-hyperlink"].forEach(s=>{o!==s?t.querySelector(s)&&(e.tabIndex=-1):e.tabIndex=-1})}regenerateBibId(){const e=this.element;e&&(this.id=e.getAttribute("id"),this.id||(this.id=window.crypto.randomUUID(),e.setAttribute("id",this.id)),e.bib?.setAttribute("id",`${this.id}-floater-bib`))}configure(e,t,o=!0){Ue.setupMousePressChecker(),this.enableKeyboardHandling=o,this.eventPrefix=t,this.element!==e&&(this.element=e);const s=this.element;s&&(this.behavior!==s.behavior&&(this.behavior=s.behavior),s.trigger&&this.disconnect(),s.trigger=s.triggerElement||s.shadowRoot?.querySelector("#trigger")||s.trigger,s.bib=s.shadowRoot?.querySelector("#bib")||s.bib,s.bibSizer=s.shadowRoot?.querySelector("#bibSizer"),s.triggerChevron=s.shadowRoot?.querySelector("#showStateIcon"),s.floaterConfig&&(s.hoverToggle=s.floaterConfig.hoverToggle),this.regenerateBibId(),this.handleTriggerTabIndex(),this.handleEvent=this.handleEvent.bind(this),s.trigger&&(this.enableKeyboardHandling&&s.trigger.addEventListener("keydown",this.handleEvent),s.trigger.addEventListener("click",this.handleEvent),s.trigger.addEventListener("mouseenter",this.handleEvent),s.trigger.addEventListener("mouseleave",this.handleEvent),s.trigger.addEventListener("focus",this.handleEvent),s.trigger.addEventListener("blur",this.handleEvent)))}disconnect(){this.cleanupHideHandlers();const e=this.element;e&&(e.cleanup?.(),e.bib&&e.shadowRoot&&e.shadowRoot.append(e.bib),e.trigger&&(e.trigger.removeEventListener("keydown",this.handleEvent),e.trigger.removeEventListener("click",this.handleEvent),e.trigger.removeEventListener("mouseenter",this.handleEvent),e.trigger.removeEventListener("mouseleave",this.handleEvent),e.trigger.removeEventListener("focus",this.handleEvent),e.trigger.removeEventListener("blur",this.handleEvent)))}}class $e{generateElementName(e,t){let o=e;return o+="-",o+=t.replace(/[.]/g,"_"),o}generateTag(e,t,o){const s=this.generateElementName(e,t),a=i`${r(s)}`;return customElements.get(s)||customElements.define(s,class extends o{}),a}}class Oe{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,o=(t,s=t&&t.closest(e))=>t&&t!==document&&t!==window?s||o(t.getRootNode().host):null){return o(t)}handleComponentTagRename(e,t){const o=t.toLowerCase();e.tagName.toLowerCase()!==o&&e.setAttribute(o,!0)}elementMatch(e,t){const o=t.toLowerCase();return e.tagName.toLowerCase()===o||e.hasAttribute(o)}getSlotText(e,t){const o=e.shadowRoot?.querySelector(`slot[name="${t}"]`),s=(o?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent?.trim()).join(" ").trim();return s||null}}class We{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,o=(t,s=t&&t.closest(e))=>t&&t!==document&&t!==window?s||o(t.getRootNode().host):null){return o(t)}handleComponentTagRename(e,t){const o=t.toLowerCase();e.tagName.toLowerCase()!==o&&e.setAttribute(o,!0)}elementMatch(e,t){const o=t.toLowerCase();return e.tagName.toLowerCase()===o||e.hasAttribute(o)}}var Ve=e`: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}
1
+ import{css as e,LitElement as t,html as o}from"lit";import{classMap as s}from"lit/directives/class-map.js";import{ifDefined as a}from"lit/directives/if-defined.js";import{unsafeStatic as r,literal as i,html as n}from"lit/static-html.js";class l{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,o=(t,s=t&&t.closest(e))=>t&&t!==document&&t!==window?s||o(t.getRootNode().host):null){return o(t)}handleComponentTagRename(e,t){const o=t.toLowerCase();e.tagName.toLowerCase()!==o&&e.setAttribute(o,!0)}elementMatch(e,t){const o=t.toLowerCase();return e.tagName.toLowerCase()===o||e.hasAttribute(o)}getSlotText(e,t){const o=e.shadowRoot?.querySelector(`slot[name="${t}"]`);return(o?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent?.trim()).join(" ").trim()||null}}class c{generateElementName(e,t){let o=e;return o+="-",o+=t.replace(/[.]/g,"_"),o}generateTag(e,t,o){const s=this.generateElementName(e,t),a=i`${r(s)}`;return customElements.get(s)||customElements.define(s,class extends o{}),a}}const d=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[role="tab"]:not([disabled])','[role="link"]:not([disabled])','[role="button"]:not([disabled])','[tabindex]:not([tabindex="-1"])','[contenteditable]:not([contenteditable="false"])'],h=["auro-checkbox","auro-radio","auro-dropdown","auro-button","auro-combobox","auro-input","auro-counter","auro-select","auro-datepicker","auro-hyperlink","auro-accordion"];function u(e){const t=e.getAttribute("tabindex");if(null==t)return null;const o=Number.parseInt(t,10);return Number.isNaN(o)?null:o}function p(e){const t=[],o=e=>{if(e.nodeType===Node.ELEMENT_NODE){if(function(e){const t=e.tagName.toLowerCase();return!(!h.some(o=>e.hasAttribute(o)||t===o)||e.hasAttribute("disabled")||t.match("hyperlink")&&!e.hasAttribute("href"))}(e))return void t.push(e);for(const o of d)if(e.matches?.(o)){t.push(e);break}if(e.shadowRoot&&e.shadowRoot.children&&Array.from(e.shadowRoot.children).forEach(e=>{o(e)}),"SLOT"===e.tagName){const t=e.assignedNodes({flatten:!0});for(const e of t)o(e)}else e.children&&Array.from(e.children).forEach(e=>{o(e)})}};o(e);const s=[],a=new Set;for(const e of t)a.has(e)||(a.add(e),s.push(e));const r=s.filter(e=>{const t=u(e);return null!==t&&t>0});r.sort((e,t)=>(u(e)??0)-(u(t)??0));const i=s.filter(e=>{const t=u(e);return null===t||0===t});return[...r,...i]}class b{constructor(e,t=!1){if(!(e&&e instanceof HTMLElement))throw new Error("FocusTrap requires a valid HTMLElement.");this.container=e,this.tabDirection="forward",this.controlTabOrder=t,this._init()}_init(){"inert"in HTMLElement.prototype&&(this.container.inert=!1,this.container.setAttribute("data-focus-trap-container",!0)),this.container.addEventListener("keydown",this._onKeydown)}_getActiveElements(){let{activeElement:e}=document;const t=[e];for(;e?.shadowRoot?.activeElement;)t.push(e.shadowRoot.activeElement),e=e.shadowRoot.activeElement;return t}_getNextFocusIndex(e,t,o){if(this.controlTabOrder){let o=e+("forward"===this.tabDirection?1:-1);return o<0&&(o=t.length-1),o>=t.length&&(o=0),o}const s=o.includes(t[0])||o.includes(this.container),a=o.includes(t[t.length-1]);return"backward"===this.tabDirection&&s?t.length-1:"forward"===this.tabDirection&&a?0:null}_handleTabKey(e){const t=this._getFocusableElements();if(!t.length)return;this.tabDirection=e.shiftKey?"backward":"forward";const o=this._getActiveElements();let s=t.findIndex(e=>o.includes(e));-1===s&&(s=0);const a=this._getNextFocusIndex(s,t,o);null!==a&&(e.preventDefault(),t[a].focus())}_onKeydown=e=>{"Tab"===e.key&&this._handleTabKey(e)};_getFocusableElements(){return p(this.container)}focusFirstElement(){const e=this._getFocusableElements();e.length&&e[0].focus()}focusLastElement(){const e=this._getFocusableElements();e.length&&e[e.length-1].focus()}disconnect(){this.container.hasAttribute("data-focus-trap-container")&&this.container.removeAttribute("data-focus-trap-container"),this.container.removeEventListener("keydown",this._onKeydown)}}const m=["start","end"],g=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-"+m[0],t+"-"+m[1]),[]),f=Math.min,v=Math.max,x=Math.round,y=Math.floor,w=e=>({x:e,y:e}),z={left:"right",right:"left",bottom:"top",top:"bottom"},k={start:"end",end:"start"};function S(e,t,o){return v(e,f(t,o))}function A(e,t){return"function"==typeof e?e(t):e}function B(e){return e.split("-")[0]}function T(e){return e.split("-")[1]}function E(e){return"x"===e?"y":"x"}function C(e){return"y"===e?"height":"width"}const H=new Set(["top","bottom"]);function R(e){return H.has(B(e))?"y":"x"}function L(e){return E(R(e))}function _(e,t,o){void 0===o&&(o=!1);const s=T(e),a=L(e),r=C(a);let i="x"===a?s===(o?"end":"start")?"right":"left":"start"===s?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=D(i)),[i,D(i)]}function q(e){return e.replace(/start|end/g,e=>k[e])}const F=["left","right"],M=["right","left"],N=["top","bottom"],P=["bottom","top"];function I(e,t,o,s){const a=T(e);let r=function(e,t,o){switch(e){case"top":case"bottom":return o?t?M:F:t?F:M;case"left":case"right":return t?N:P;default:return[]}}(B(e),"start"===o,s);return a&&(r=r.map(e=>e+"-"+a),t&&(r=r.concat(r.map(q)))),r}function D(e){return e.replace(/left|right|bottom|top/g,e=>z[e])}function U(e){const{x:t,y:o,width:s,height:a}=e;return{width:s,height:a,top:o,left:t,right:t+s,bottom:o+a,x:t,y:o}}function $(e,t,o){let{reference:s,floating:a}=e;const r=R(t),i=L(t),n=C(i),l=B(t),c="y"===r,d=s.x+s.width/2-a.width/2,h=s.y+s.height/2-a.height/2,u=s[n]/2-a[n]/2;let p;switch(l){case"top":p={x:d,y:s.y-a.height};break;case"bottom":p={x:d,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:h};break;case"left":p={x:s.x-a.width,y:h};break;default:p={x:s.x,y:s.y}}switch(T(t)){case"start":p[i]-=u*(o&&c?-1:1);break;case"end":p[i]+=u*(o&&c?-1:1)}return p}async function O(e,t){var o;void 0===t&&(t={});const{x:s,y:a,platform:r,rects:i,elements:n,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=A(t,e),b=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=n[u?"floating"===h?"reference":"floating":h],g=U(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(m)))||o?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(n.floating)),boundary:c,rootBoundary:d,strategy:l})),f="floating"===h?{x:s,y:a,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(n.floating)),x=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},y=U(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:f,offsetParent:v,strategy:l}):f);return{top:(g.top-y.top+b.top)/x.y,bottom:(y.bottom-g.bottom+b.bottom)/x.y,left:(g.left-y.left+b.left)/x.x,right:(y.right-g.right+b.right)/x.x}}const W=new Set(["left","top"]);function V(){return"undefined"!=typeof window}function X(e){return K(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function G(e){var t;return null==(t=(K(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function K(e){return!!V()&&(e instanceof Node||e instanceof j(e).Node)}function Y(e){return!!V()&&(e instanceof Element||e instanceof j(e).Element)}function J(e){return!!V()&&(e instanceof HTMLElement||e instanceof j(e).HTMLElement)}function Q(e){return!(!V()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof j(e).ShadowRoot)}const Z=new Set(["inline","contents"]);function ee(e){const{overflow:t,overflowX:o,overflowY:s,display:a}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+o)&&!Z.has(a)}const te=new Set(["table","td","th"]);function oe(e){return te.has(X(e))}const se=[":popover-open",":modal"];function ae(e){return se.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const re=["transform","translate","scale","rotate","perspective"],ie=["transform","translate","scale","rotate","perspective","filter"],ne=["paint","layout","strict","content"];function le(e){const t=ce(),o=Y(e)?ue(e):e;return re.some(e=>!!o[e]&&"none"!==o[e])||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||ie.some(e=>(o.willChange||"").includes(e))||ne.some(e=>(o.contain||"").includes(e))}function ce(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const de=new Set(["html","body","#document"]);function he(e){return de.has(X(e))}function ue(e){return j(e).getComputedStyle(e)}function pe(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function be(e){if("html"===X(e))return e;const t=e.assignedSlot||e.parentNode||Q(e)&&e.host||G(e);return Q(t)?t.host:t}function me(e){const t=be(e);return he(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&ee(t)?t:me(t)}function ge(e,t,o){var s;void 0===t&&(t=[]),void 0===o&&(o=!0);const a=me(e),r=a===(null==(s=e.ownerDocument)?void 0:s.body),i=j(a);if(r){const e=fe(i);return t.concat(i,i.visualViewport||[],ee(a)?a:[],e&&o?ge(e):[])}return t.concat(a,ge(a,[],o))}function fe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ve(e){const t=ue(e);let o=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=J(e),r=a?e.offsetWidth:o,i=a?e.offsetHeight:s,n=x(o)!==r||x(s)!==i;return n&&(o=r,s=i),{width:o,height:s,$:n}}function xe(e){return Y(e)?e:e.contextElement}function ye(e){const t=xe(e);if(!J(t))return w(1);const o=t.getBoundingClientRect(),{width:s,height:a,$:r}=ve(t);let i=(r?x(o.width):o.width)/s,n=(r?x(o.height):o.height)/a;return i&&Number.isFinite(i)||(i=1),n&&Number.isFinite(n)||(n=1),{x:i,y:n}}const we=w(0);function ze(e){const t=j(e);return ce()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:we}function ke(e,t,o,s){void 0===t&&(t=!1),void 0===o&&(o=!1);const a=e.getBoundingClientRect(),r=xe(e);let i=w(1);t&&(s?Y(s)&&(i=ye(s)):i=ye(e));const n=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==j(e))&&t}(r,o,s)?ze(r):w(0);let l=(a.left+n.x)/i.x,c=(a.top+n.y)/i.y,d=a.width/i.x,h=a.height/i.y;if(r){const e=j(r),t=s&&Y(s)?j(s):s;let o=e,a=fe(o);for(;a&&s&&t!==o;){const e=ye(a),t=a.getBoundingClientRect(),s=ue(a),r=t.left+(a.clientLeft+parseFloat(s.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(s.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,h*=e.y,l+=r,c+=i,o=j(a),a=fe(o)}}return U({width:d,height:h,x:l,y:c})}function Se(e,t){const o=pe(e).scrollLeft;return t?t.left+o:ke(G(e)).left+o}function Ae(e,t){const o=e.getBoundingClientRect();return{x:o.left+t.scrollLeft-Se(e,o),y:o.top+t.scrollTop}}const Be=new Set(["absolute","fixed"]);function Te(e,t,o){let s;if("viewport"===t)s=function(e,t){const o=j(e),s=G(e),a=o.visualViewport;let r=s.clientWidth,i=s.clientHeight,n=0,l=0;if(a){r=a.width,i=a.height;const e=ce();(!e||e&&"fixed"===t)&&(n=a.offsetLeft,l=a.offsetTop)}const c=Se(s);if(c<=0){const e=s.ownerDocument,t=e.body,o=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(o.marginLeft)+parseFloat(o.marginRight)||0,i=Math.abs(s.clientWidth-t.clientWidth-a);i<=25&&(r-=i)}else c<=25&&(r+=c);return{width:r,height:i,x:n,y:l}}(e,o);else if("document"===t)s=function(e){const t=G(e),o=pe(e),s=e.ownerDocument.body,a=v(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),r=v(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let i=-o.scrollLeft+Se(e);const n=-o.scrollTop;return"rtl"===ue(s).direction&&(i+=v(t.clientWidth,s.clientWidth)-a),{width:a,height:r,x:i,y:n}}(G(e));else if(Y(t))s=function(e,t){const o=ke(e,!0,"fixed"===t),s=o.top+e.clientTop,a=o.left+e.clientLeft,r=J(e)?ye(e):w(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:a*r.x,y:s*r.y}}(t,o);else{const o=ze(e);s={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return U(s)}function Ee(e,t){const o=be(e);return!(o===t||!Y(o)||he(o))&&("fixed"===ue(o).position||Ee(o,t))}function Ce(e,t,o){const s=J(t),a=G(t),r="fixed"===o,i=ke(e,!0,r,t);let n={scrollLeft:0,scrollTop:0};const l=w(0);function c(){l.x=Se(a)}if(s||!s&&!r)if(("body"!==X(t)||ee(a))&&(n=pe(t)),s){const e=ke(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();r&&!s&&a&&c();const d=!a||s||r?w(0):Ae(a,n);return{x:i.left+n.scrollLeft-l.x-d.x,y:i.top+n.scrollTop-l.y-d.y,width:i.width,height:i.height}}function He(e){return"static"===ue(e).position}function Re(e,t){if(!J(e)||"fixed"===ue(e).position)return null;if(t)return t(e);let o=e.offsetParent;return G(e)===o&&(o=o.ownerDocument.body),o}function Le(e,t){const o=j(e);if(ae(e))return o;if(!J(e)){let t=be(e);for(;t&&!he(t);){if(Y(t)&&!He(t))return t;t=be(t)}return o}let s=Re(e,t);for(;s&&oe(s)&&He(s);)s=Re(s,t);return s&&he(s)&&He(s)&&!le(s)?o:s||function(e){let t=be(e);for(;J(t)&&!he(t);){if(le(t))return t;if(ae(t))return null;t=be(t)}return null}(e)||o}const _e={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:s,strategy:a}=e;const r="fixed"===a,i=G(s),n=!!t&&ae(t.floating);if(s===i||n&&r)return o;let l={scrollLeft:0,scrollTop:0},c=w(1);const d=w(0),h=J(s);if((h||!h&&!r)&&(("body"!==X(s)||ee(i))&&(l=pe(s)),J(s))){const e=ke(s);c=ye(s),d.x=e.x+s.clientLeft,d.y=e.y+s.clientTop}const u=!i||h||r?w(0):Ae(i,l);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+d.x+u.x,y:o.y*c.y-l.scrollTop*c.y+d.y+u.y}},getDocumentElement:G,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:s,strategy:a}=e;const r=[..."clippingAncestors"===o?ae(t)?[]:function(e,t){const o=t.get(e);if(o)return o;let s=ge(e,[],!1).filter(e=>Y(e)&&"body"!==X(e)),a=null;const r="fixed"===ue(e).position;let i=r?be(e):e;for(;Y(i)&&!he(i);){const t=ue(i),o=le(i);o||"fixed"!==t.position||(a=null),(r?!o&&!a:!o&&"static"===t.position&&a&&Be.has(a.position)||ee(i)&&!o&&Ee(e,i))?s=s.filter(e=>e!==i):a=t,i=be(i)}return t.set(e,s),s}(t,this._c):[].concat(o),s],i=r[0],n=r.reduce((e,o)=>{const s=Te(t,o,a);return e.top=v(s.top,e.top),e.right=f(s.right,e.right),e.bottom=f(s.bottom,e.bottom),e.left=v(s.left,e.left),e},Te(t,i,a));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:Le,getElementRects:async function(e){const t=this.getOffsetParent||Le,o=this.getDimensions,s=await o(e.floating);return{reference:Ce(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=ve(e);return{width:t,height:o}},getScale:ye,isElement:Y,isRTL:function(e){return"rtl"===ue(e).direction}};function qe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fe(e,t,o,s){void 0===s&&(s={});const{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:l=!1}=s,c=xe(e),d=a||r?[...c?ge(c):[],...ge(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",o,{passive:!0}),r&&e.addEventListener("resize",o)});const h=c&&n?function(e,t){let o,s=null;const a=G(e);function r(){var e;clearTimeout(o),null==(e=s)||e.disconnect(),s=null}return function i(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),r();const c=e.getBoundingClientRect(),{left:d,top:h,width:u,height:p}=c;if(n||t(),!u||!p)return;const b={rootMargin:-y(h)+"px "+-y(a.clientWidth-(d+u))+"px "+-y(a.clientHeight-(h+p))+"px "+-y(d)+"px",threshold:v(0,f(1,l))||1};let m=!0;function g(t){const s=t[0].intersectionRatio;if(s!==l){if(!m)return i();s?i(!1,s):o=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==s||qe(c,e.getBoundingClientRect())||i(),m=!1}try{s=new IntersectionObserver(g,{...b,root:a.ownerDocument})}catch(e){s=new IntersectionObserver(g,b)}s.observe(e)}(!0),r}(c,o):null;let u,p=-1,b=null;i&&(b=new ResizeObserver(e=>{let[s]=e;s&&s.target===c&&b&&(b.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=b)||e.observe(t)})),o()}),c&&!l&&b.observe(c),b.observe(t));let m=l?ke(e):null;return l&&function t(){const s=ke(e);m&&!qe(m,s)&&o();m=s,u=requestAnimationFrame(t)}(),o(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",o),r&&e.removeEventListener("resize",o)}),null==h||h(),null==(e=b)||e.disconnect(),b=null,l&&cancelAnimationFrame(u)}}const Me=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,s;const{x:a,y:r,placement:i,middlewareData:n}=t,l=await async function(e,t){const{placement:o,platform:s,elements:a}=e,r=await(null==s.isRTL?void 0:s.isRTL(a.floating)),i=B(o),n=T(o),l="y"===R(o),c=W.has(i)?-1:1,d=r&&l?-1:1,h=A(t,e);let{mainAxis:u,crossAxis:p,alignmentAxis:b}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return n&&"number"==typeof b&&(p="end"===n?-1*b:b),l?{x:p*d,y:u*c}:{x:u*c,y:p*d}}(t,e);return i===(null==(o=n.offset)?void 0:o.placement)&&null!=(s=n.arrow)&&s.alignmentOffset?{}:{x:a+l.x,y:r+l.y,data:{...l,placement:i}}}}},Ne=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,s,a;const{rects:r,middlewareData:i,placement:n,platform:l,elements:c}=t,{crossAxis:d=!1,alignment:h,allowedPlacements:u=g,autoAlignment:p=!0,...b}=A(e,t),m=void 0!==h||u===g?function(e,t,o){return(e?[...o.filter(t=>T(t)===e),...o.filter(t=>T(t)!==e)]:o.filter(e=>B(e)===e)).filter(o=>!e||T(o)===e||!!t&&q(o)!==o)}(h||null,p,u):u,f=await O(t,b),v=(null==(o=i.autoPlacement)?void 0:o.index)||0,x=m[v];if(null==x)return{};const y=_(x,r,await(null==l.isRTL?void 0:l.isRTL(c.floating)));if(n!==x)return{reset:{placement:m[0]}};const w=[f[B(x)],f[y[0]],f[y[1]]],z=[...(null==(s=i.autoPlacement)?void 0:s.overflows)||[],{placement:x,overflows:w}],k=m[v+1];if(k)return{data:{index:v+1,overflows:z},reset:{placement:k}};const S=z.map(e=>{const t=T(e.placement);return[e.placement,t&&d?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),E=S.filter(e=>e[2].slice(0,T(e[0])?2:3).every(e=>e<=0)),C=(null==(a=E[0])?void 0:a[0])||S[0][0];return C!==n?{data:{index:v+1,overflows:z},reset:{placement:C}}:{}}}},Pe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:s,placement:a}=t,{mainAxis:r=!0,crossAxis:i=!1,limiter:n={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...l}=A(e,t),c={x:o,y:s},d=await O(t,l),h=R(B(a)),u=E(h);let p=c[u],b=c[h];if(r){const e="y"===u?"bottom":"right";p=S(p+d["y"===u?"top":"left"],p,p-d[e])}if(i){const e="y"===h?"bottom":"right";b=S(b+d["y"===h?"top":"left"],b,b-d[e])}const m=n.fn({...t,[u]:p,[h]:b});return{...m,data:{x:m.x-o,y:m.y-s,enabled:{[u]:r,[h]:i}}}}}},Ie=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,s;const{placement:a,middlewareData:r,rects:i,initialPlacement:n,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...g}=A(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const f=B(a),v=R(n),x=B(n)===n,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=u||(x||!m?[D(n)]:function(e){const t=D(e);return[q(e),t,q(t)]}(n)),z="none"!==b;!u&&z&&w.push(...I(n,m,b,y));const k=[n,...w],S=await O(t,g),T=[];let E=(null==(s=r.flip)?void 0:s.overflows)||[];if(d&&T.push(S[f]),h){const e=_(a,i,y);T.push(S[e[0]],S[e[1]])}if(E=[...E,{placement:a,overflows:T}],!T.every(e=>e<=0)){var C,H;const e=((null==(C=r.flip)?void 0:C.index)||0)+1,t=k[e];if(t){if(!("alignment"===h&&v!==R(t))||E.every(e=>R(e.placement)!==v||e.overflows[0]>0))return{data:{index:e,overflows:E},reset:{placement:t}}}let o=null==(H=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:H.placement;if(!o)switch(p){case"bestFit":{var L;const e=null==(L=E.filter(e=>{if(z){const t=R(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:L[0];e&&(o=e);break}case"initialPlacement":o=n}if(a!==o)return{reset:{placement:o}}}return{}}}},De=(e,t,o)=>{const s=new Map,a={platform:_e,...o},r={...a.platform,_c:s};return(async(e,t,o)=>{const{placement:s="bottom",strategy:a="absolute",middleware:r=[],platform:i}=o,n=r.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:h}=$(c,s,l),u=s,p={},b=0;for(let o=0;o<n.length;o++){const{name:r,fn:m}=n[o],{x:g,y:f,data:v,reset:x}=await m({x:d,y:h,initialPlacement:s,placement:u,strategy:a,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});d=null!=g?g:d,h=null!=f?f:h,p={...p,[r]:{...p[r],...v}},x&&b<=50&&(b++,"object"==typeof x&&(x.placement&&(u=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):x.rects),({x:d,y:h}=$(c,u,l))),o=-1)}return{x:d,y:h,placement:u,strategy:a,middlewareData:p}})(e,t,{...a,platform:r})};class Ue{static isMousePressed=!1;static isMousePressHandlerInitialized=!1;static setupMousePressChecker(){if(!Ue.isMousePressHandlerInitialized&&window&&window.addEventListener){Ue.isMousePressHandlerInitialized=!0,Ue._mousePressedTimeout||(Ue._mousePressedTimeout=null);const e=e=>{const t="mousedown"===e.type;t?(null!==Ue._mousePressedTimeout&&(clearTimeout(Ue._mousePressedTimeout),Ue._mousePressedTimeout=null),Ue.isMousePressed||(Ue.isMousePressed=!0)):Ue.isMousePressed&&!t&&(Ue._mousePressedTimeout=setTimeout(()=>{Ue.isMousePressed=!1,Ue._mousePressedTimeout=null},0))};window.addEventListener("mousedown",e),window.addEventListener("mouseup",e)}}constructor(e,t){this.element=e,this.behavior=t,this.focusHandler=null,this.clickHandler=null,this.keyDownHandler=null,this.touchHandler=null,this.enableKeyboardHandling=!0,this.configureTrial=0,this.eventPrefix=void 0,this.id=void 0,this.showing=!1,this.strategy=void 0}mirrorSize(){const e=this.element;if(e&&e.bibSizer&&e.matchWidth&&e.bib?.shadowRoot){const t=window.getComputedStyle(e.bibSizer),o=e.bib.shadowRoot.querySelector(".container");if(!o)return;"0px"!==t.width&&(o.style.width=t.width),"0px"!==t.height&&(o.style.height=t.height),o.style.maxWidth=t.maxWidth,o.style.maxHeight=t.maxHeight}}getPositioningStrategy(){const e=this.element;if(!e)return"floating";const t=e.bib?.mobileFullscreenBreakpoint||e.floaterConfig?.fullscreenBreakpoint;switch(this.behavior){case"tooltip":return"floating";case"dialog":case"drawer":if(t){const o=window.matchMedia(`(max-width: ${t})`).matches;e.expanded=o}return e.nested?"cover":"fullscreen";case"dropdown":case void 0:case null:if(t){if(window.matchMedia(`(max-width: ${t})`).matches)return"fullscreen"}return"floating";default:return this.behavior}}position(){const e=this.element;if(!e)return;const t=this.getPositioningStrategy();if(this.configureBibStrategy(t),"floating"===t){if(!e.trigger||!e.bib)return;this.mirrorSize();const t=[Me(e.floaterConfig?.offset||0),...e.floaterConfig?.shift?[Pe()]:[],...e.floaterConfig?.flip?[Ie()]:[],...e.floaterConfig?.autoPlacement?[Ne()]:[]];De(e.trigger,e.bib,{strategy:e.floaterConfig?.strategy||"fixed",placement:e.floaterConfig?.placement,middleware:t||[]}).then(({x:e,y:t})=>{const o=this.element;o?.bib&&Object.assign(o.bib.style,{left:`${e}px`,top:`${t}px`})})}else if("cover"===t){if(!e.parentNode||!e.bib)return;De(e.parentNode,e.bib,{placement:"bottom-start"}).then(({x:e,y:t})=>{const o=this.element;o?.bib&&o.parentNode&&Object.assign(o.bib.style,{left:`${e}px`,top:t-o.parentNode.offsetHeight+"px",width:`${o.parentNode.offsetWidth}px`,height:`${o.parentNode.offsetHeight}px`})})}}lockScroll(e=!0){const t=this.element;if(e){if(!t?.bib)return;document.body.style.overflow="hidden",t.bib.style.transform=`translateY(${window?.visualViewport?.offsetTop}px)`}else document.body.style.overflow=""}configureBibStrategy(e){const t=this.element;if(!t?.bib)return;if("fullscreen"===e){t.isBibFullscreen=!0,t.bib.setAttribute("isfullscreen",""),t.bib.style.position="fixed",t.bib.style.top="0px",t.bib.style.left="0px",t.bib.style.width="",t.bib.style.height="",t.style.contain="";const o=t.bib.shadowRoot?.querySelector(".container");o?(o.style.width="",o.style.height="",o.style.maxWidth="",o.style.maxHeight=`${window?.visualViewport?.height}px`,this.configureTrial=0):this.configureTrial<10&&(this.configureTrial+=1,setTimeout(()=>{this.configureBibStrategy(e)},0)),t.isPopoverVisible&&this.lockScroll(!0)}else t.bib.style.position="",t.bib.removeAttribute("isfullscreen"),t.isBibFullscreen=!1,t.style.contain="layout";const o=this.strategy&&this.strategy!==e;if(this.strategy=e,o){const o=new CustomEvent(this.eventPrefix?`${this.eventPrefix}-strategy-change`:"strategy-change",{detail:{value:e},composed:!0});t.dispatchEvent(o)}}updateState(){const e=this.element;if(!e)return;if(!e.isPopoverVisible){this.cleanupHideHandlers();try{e.cleanup?.()}catch(e){}}}handleFocusLoss(){const e=this.element;e?.bib&&(Ue.isMousePressed||e.noHideOnThisFocusLoss||e.hasAttribute("noHideOnThisFocusLoss")||e.matches(":focus")||e.matches(":focus-within")||e.bib.hasAttribute("isfullscreen")||this.hideBib("keydown"))}setupHideHandlers(){this.element&&(this.focusHandler=()=>this.handleFocusLoss(),this.clickHandler=e=>{const t=this.element;if(t?.bib&&!t.bib.hasAttribute("isfullscreen")&&(!e.composedPath().includes(t.trigger)&&!e.composedPath().includes(t.bib)||t.bib.backdrop&&e.composedPath().includes(t.bib.backdrop))){const e=document.expandedAuroFormkitDropdown||document.expandedAuroFloater;e&&e.element.isPopoverVisible?(e.hideBib(),document.expandedAuroFormkitDropdown=null,document.expandedAuroFloater=this):this.hideBib("click")}},this.keyDownHandler=e=>{const t=this.element;if(t&&"Escape"===e.key&&t.isPopoverVisible){const e=document.expandedAuroFormkitDropdown||document.expandedAuroFloater;if(e&&e!==this&&e.element.isPopoverVisible)return;this.hideBib("keydown")}},"drawer"!==this.behavior&&"dialog"!==this.behavior&&document.addEventListener("focusin",this.focusHandler),this.enableKeyboardHandling&&document.addEventListener("keydown",this.keyDownHandler),setTimeout(()=>{window.addEventListener("click",this.clickHandler)},0),this.touchHandler=e=>{const t=this.element;if(!t?.bib)return;if(t.bib.hasAttribute("isfullscreen"))return;const o=e.composedPath();o.includes(t.trigger)||o.includes(t.bib)||this.hideBib("click")},window.addEventListener("touchstart",this.touchHandler,{passive:!0}))}cleanupHideHandlers(){this.focusHandler&&(document.removeEventListener("focusin",this.focusHandler),this.focusHandler=null),this.clickHandler&&(window.removeEventListener("click",this.clickHandler),this.clickHandler=null),this.touchHandler&&(window.removeEventListener("touchstart",this.touchHandler),this.touchHandler=null),this.keyDownHandler&&(document.removeEventListener("keydown",this.keyDownHandler),this.keyDownHandler=null)}handleUpdate(e){e.has("isPopoverVisible")&&this.updateState()}updateCurrentExpandedDropdown(){if(!this.element)return;const e=document.expandedAuroFormkitDropdown||document.expandedAuroFloater;e&&e!==this&&e.element.isPopoverVisible&&e.eventPrefix===this.eventPrefix&&e.hideBib(),document.expandedAuroFloater=this}showBib(){const e=this.element;e&&e.bib&&(e.trigger||e.parentNode)&&(e.disabled||this.showing||(this.updateCurrentExpandedDropdown(),e.triggerChevron?.setAttribute("data-expanded",!0),this.showing||(e.modal||this.setupHideHandlers(),this.showing=!0,e.isPopoverVisible=!0,this.position(),this.dispatchEventDropdownToggle()),e.cleanup=Fe(e.trigger||e.parentNode,e.bib,()=>{this.position()})))}hideBib(e="unknown"){const t=this.element;t&&(t.disabled||t.noToggle&&"click"===e||(this.lockScroll(!1),t.triggerChevron?.removeAttribute("data-expanded"),t.isPopoverVisible&&(t.isPopoverVisible=!1),this.showing&&(this.cleanupHideHandlers(),this.showing=!1,this.dispatchEventDropdownToggle(e)),document.expandedAuroFloater=null))}dispatchEventDropdownToggle(e){const t=this.element;if(!t)return;const o=new CustomEvent(this.eventPrefix?`${this.eventPrefix}-toggled`:"toggled",{detail:{expanded:this.showing,eventType:e||"unknown"},composed:!0});t.dispatchEvent(o)}handleClick(){const e=this.element;if(!e)return;e.isPopoverVisible?this.hideBib("click"):this.showBib();const t=new CustomEvent(this.eventPrefix?`${this.eventPrefix}-triggerClick`:"triggerClick",{composed:!0,detail:{expanded:e.isPopoverVisible}});e.dispatchEvent(t)}handleEvent(e){const t=this.element;if(t&&!t.disableEventShow)switch(e.type){case"keydown":{const t=e.composedPath()[0];"Enter"!==e.key&&(" "!==e.key||t&&"INPUT"===t.tagName)||(e.preventDefault(),this.handleClick());break}case"mouseenter":t.hoverToggle&&this.showBib();break;case"mouseleave":t.hoverToggle&&this.hideBib("mouseleave");break;case"focus":t.focusShow&&this.showBib();break;case"blur":setTimeout(()=>this.handleFocusLoss(),0);break;case"click":document.activeElement===document.body&&e.currentTarget.focus(),this.handleClick()}}handleTriggerTabIndex(){const e=this.element;if(!e)return;const t=e.querySelectorAll('[slot="trigger"]')[0];if(!t)return;const o=t.tagName.toLowerCase();["a","button",'input:not([type="hidden"])',"select","textarea",'[tabindex]:not([tabindex="-1"])',"auro-button","auro-input","auro-hyperlink"].forEach(s=>{o!==s?t.querySelector(s)&&(e.tabIndex=-1):e.tabIndex=-1})}regenerateBibId(){const e=this.element;e&&(this.id=e.getAttribute("id"),this.id||(this.id=window.crypto.randomUUID(),e.setAttribute("id",this.id)),e.bib?.setAttribute("id",`${this.id}-floater-bib`))}configure(e,t,o=!0){Ue.setupMousePressChecker(),this.enableKeyboardHandling=o,this.eventPrefix=t,this.element!==e&&(this.element=e);const s=this.element;s&&(this.behavior!==s.behavior&&(this.behavior=s.behavior),s.trigger&&this.disconnect(),s.trigger=s.triggerElement||s.shadowRoot?.querySelector("#trigger")||s.trigger,s.bib=s.shadowRoot?.querySelector("#bib")||s.bib,s.bibSizer=s.shadowRoot?.querySelector("#bibSizer"),s.triggerChevron=s.shadowRoot?.querySelector("#showStateIcon"),s.floaterConfig&&(s.hoverToggle=s.floaterConfig.hoverToggle),this.regenerateBibId(),this.handleTriggerTabIndex(),this.handleEvent=this.handleEvent.bind(this),s.trigger&&(this.enableKeyboardHandling&&s.trigger.addEventListener("keydown",this.handleEvent),s.trigger.addEventListener("click",this.handleEvent),s.trigger.addEventListener("mouseenter",this.handleEvent),s.trigger.addEventListener("mouseleave",this.handleEvent),s.trigger.addEventListener("focus",this.handleEvent),s.trigger.addEventListener("blur",this.handleEvent)))}disconnect(){this.cleanupHideHandlers();const e=this.element;e&&(e.cleanup?.(),e.bib&&e.shadowRoot&&e.shadowRoot.append(e.bib),e.trigger&&(e.trigger.removeEventListener("keydown",this.handleEvent),e.trigger.removeEventListener("click",this.handleEvent),e.trigger.removeEventListener("mouseenter",this.handleEvent),e.trigger.removeEventListener("mouseleave",this.handleEvent),e.trigger.removeEventListener("focus",this.handleEvent),e.trigger.removeEventListener("blur",this.handleEvent)))}}class $e{generateElementName(e,t){let o=e;return o+="-",o+=t.replace(/[.]/g,"_"),o}generateTag(e,t,o){const s=this.generateElementName(e,t),a=i`${r(s)}`;return customElements.get(s)||customElements.define(s,class extends o{}),a}}class Oe{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,o=(t,s=t&&t.closest(e))=>t&&t!==document&&t!==window?s||o(t.getRootNode().host):null){return o(t)}handleComponentTagRename(e,t){const o=t.toLowerCase();e.tagName.toLowerCase()!==o&&e.setAttribute(o,!0)}elementMatch(e,t){const o=t.toLowerCase();return e.tagName.toLowerCase()===o||e.hasAttribute(o)}getSlotText(e,t){const o=e.shadowRoot?.querySelector(`slot[name="${t}"]`),s=(o?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent?.trim()).join(" ").trim();return s||null}}class We{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,o=(t,s=t&&t.closest(e))=>t&&t!==document&&t!==window?s||o(t.getRootNode().host):null){return o(t)}handleComponentTagRename(e,t){const o=t.toLowerCase();e.tagName.toLowerCase()!==o&&e.setAttribute(o,!0)}elementMatch(e,t){const o=t.toLowerCase();return e.tagName.toLowerCase()===o||e.hasAttribute(o)}}var Ve=e`: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}
2
2
  `,Xe=e`.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}}
3
3
  `,je=e`:host{--ds-auro-loader-background-color: currentcolor;--ds-auro-loader-border-color: currentcolor;--ds-auro-loader-color: currentcolor}
4
4
  `;class Ge extends t{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 We,this.orbit=!1,this.ringworm=!1,this.laser=!1,this.pulse=!1}static get properties(){return{appearance:{type:String,reflect:!0},laser:{type:Boolean,reflect:!0},orbit:{type:Boolean,reflect:!0},pulse:{type:Boolean,reflect:!0},ringworm:{type:Boolean,reflect:!0}}}static get styles(){return[Xe,Ve,je]}static register(e="auro-loader"){We.prototype.registerComponent(e,Ge)}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-loader")}connectedCallback(){super.connectedCallback()}defineTemplate(){let e=Array.from(Array(this.mdCount).keys());return this.orbit||this.laser?e=Array.from(Array(this.smCount).keys()):this.ringworm&&(e=Array.from(Array(0).keys())),e}render(){return o`
@@ -79,7 +79,7 @@ import{css as e,LitElement as t,html as o}from"lit";import{classMap as s}from"li
79
79
  `,St=e`.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}: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)}.dialog{position:fixed;z-index:-1;top:unset;right:0;bottom:-100%;left:0;box-sizing:border-box;display:flex;flex-direction:column;visibility:hidden;overflow:visible;width:calc(100% - var(--insetPaddingXl) - var(--insetPaddingXl));max-height:90%;padding:var(--insetPaddingXl);opacity:0;border:0;margin:0;max-width:none}.dialog::backdrop{background:transparent}.dialog{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}
80
80
  `,At=e`[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)}}
81
81
  `,Bt=e`: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)}
82
- `;class Tt extends t{constructor(){super(),this._initializeDefaults()}_initializeDefaults(){this.modal=!1,this.unformatted=!1,this.closeButtonAppearance="default",this.isPopoverVisible=!1,this.isBibFullscreen=!1,this.floater=new Ue;const e=new c;this.buttonTag=e.generateTag("auro-button","12.3.2",pt),this.iconTag=e.generateTag("auro-icon","9.1.2",zt),this.runtimeUtils=new l}static get properties(){return{closeButtonAppearance:{type:String,attribute:"close-button-appearance",reflect:!0},lg:{type:Boolean,reflect:!0},md:{type:Boolean,reflect:!0},modal:{type:Boolean},onDark:{type:Boolean,reflect:!0},isPopoverVisible:{type:Boolean,reflect:!0,attribute:"open"},isBibFullscreen:{type:Boolean,reflect:!0},sm:{type:Boolean,reflect:!0},triggerElement:{type:Object,attribute:!1},unformatted:{type:Boolean,reflect:!0}}}get open(){return this.isPopoverVisible}set open(e){this.isPopoverVisible=e}get floaterConfig(){return{}}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-dialog");const e=this.shadowRoot.querySelector("#footer"),t=this.shadowRoot.querySelector("#footerWrapper");this.dialog=this.shadowRoot.getElementById("dialog"),this.unformatted||0!==e.assignedNodes().length||t.classList.remove("dialog-footer"),this.floater.configure(this,"auroDialog"),this.floater.position=()=>{},this.addEventListener("auroDialog-toggled",e=>{e.detail.expanded||this.dispatchToggleEvent()}),this.dialog.addEventListener("cancel",e=>{e.preventDefault(),this.modal||this.floater.hideBib()}),this.dialog.addEventListener("click",e=>{e.target===this.dialog&&this.handleOverlayClick()})}updated(e){this.floater.handleUpdate(e),e.has("isPopoverVisible")&&(this.isPopoverVisible?(this.floater.showing||this.floater.showBib(),this.openDialog()):(this.floater.showing&&this.floater.hideBib(),this.closeDialog())),e.has("triggerElement")&&(this.floater.configure(this,"auroDialog"),this.floater.position=()=>{})}connectedCallback(){if(super.connectedCallback(),!Tt._mobileBreakpointValue){const e=getComputedStyle(document.documentElement);Tt._mobileBreakpointValue=Number(e.getPropertyValue("--ds-grid-breakpoint-md").replace("px",""))}}disconnectedCallback(){super.disconnectedCallback(),this.floater.disconnect()}openDialog(){if(this.defaultTrigger=document.activeElement,this.modal)this._lockPageScroll(),this.dialog.showModal(),this._lockTouchScroll();else{this.dialog.showPopover();document.body.offsetWidth<Tt._mobileBreakpointValue&&this._lockPageScroll(),this._boundResizeHandler=()=>{clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(()=>{document.body.offsetWidth<Tt._mobileBreakpointValue?this._scrollLocked||this._lockPageScroll():this._restorePageScroll()},50)},window.addEventListener("resize",this._boundResizeHandler)}this.focusTrap=new b(this.dialog)}onDialogTransitionEnd(){this.isPopoverVisible&&this.focusTrap&&this.focusTrap.focusFirstElement()}closeDialog(){this._restorePageScroll(),this._unlockTouchScroll(),this.focusTrap&&(this.focusTrap.disconnect(),this.focusTrap=void 0),this.modal?this.dialog?.open&&this.dialog.close():(this._boundResizeHandler&&(window.removeEventListener("resize",this._boundResizeHandler),this._boundResizeHandler=void 0),clearTimeout(this._resizeTimer),setTimeout(()=>{this.dialog?.hidePopover?.()},300)),this.defaultTrigger&&(this.defaultTrigger.focus(),this.defaultTrigger=void 0)}_restorePageScroll(){this._scrollLocked&&(document.body.style.position="",document.body.style.top="",document.body.style.width="",document.body.style.overflow="",document.documentElement.style.overflow="",window.scrollTo(0,this._savedScrollY||0),this._savedScrollY=void 0,this._scrollLocked=!1)}_lockPageScroll(){this._scrollLocked||(this._savedScrollY=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${this._savedScrollY}px`,document.body.style.width="100%",document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",this._scrollLocked=!0)}_lockTouchScroll(){this._boundTouchMoveHandler||(this._boundTouchMoveHandler=e=>{e.composedPath().some(e=>e!==document&&e.scrollHeight>e.clientHeight)||e.preventDefault()},document.addEventListener("touchmove",this._boundTouchMoveHandler,{passive:!1}))}_unlockTouchScroll(){this._boundTouchMoveHandler&&(document.removeEventListener("touchmove",this._boundTouchMoveHandler,{passive:!1}),this._boundTouchMoveHandler=void 0)}dispatchToggleEvent(){const e=new Event("toggle",{bubbles:!0,cancelable:!1});this.dispatchEvent(e)}handleOverlayClick(){if(this.isPopoverVisible&&!this.modal){const e=[...this.querySelectorAll("auro-combobox, [auro-combobox], auro-select, [auro-select], auro-datepicker, [auro-datepicker]")];[...this.querySelectorAll("auro-dropdown, [auro-dropdown]"),...e.map(e=>e.dropdown)].some(e=>e.isPopoverVisible)||this.floater.hideBib()}}handleCloseButtonClick(){this.floater.hideBib()}focus(){this.isPopoverVisible&&this.dialog.focus()}show(){this.floater.showBib()}hide(){this.floater.hideBib()}static get styles(){return[St,At,kt,Bt]}getCloseButton(){return this.modal?n``:n`
82
+ `;class Tt extends t{constructor(){super(),this._initializeDefaults()}_initializeDefaults(){this.modal=!1,this.unformatted=!1,this.closeButtonAppearance="default",this.isPopoverVisible=!1,this.isBibFullscreen=!1,this.floater=new Ue;const e=new c;this.buttonTag=e.generateTag("auro-button","12.3.2",pt),this.iconTag=e.generateTag("auro-icon","9.1.2",zt),this.runtimeUtils=new l}static get properties(){return{closeButtonAppearance:{type:String,attribute:"close-button-appearance",reflect:!0},lg:{type:Boolean,reflect:!0},md:{type:Boolean,reflect:!0},modal:{type:Boolean},onDark:{type:Boolean,reflect:!0},isPopoverVisible:{type:Boolean,reflect:!0,attribute:"open"},isBibFullscreen:{type:Boolean,reflect:!0},sm:{type:Boolean,reflect:!0},triggerElement:{type:Object,attribute:!1},unformatted:{type:Boolean,reflect:!0}}}get open(){return this.isPopoverVisible}set open(e){this.isPopoverVisible=e}get floaterConfig(){return{}}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-dialog");const e=this.shadowRoot.querySelector("#footer"),t=this.shadowRoot.querySelector("#footerWrapper");this.dialog=this.shadowRoot.getElementById("dialog"),this.unformatted||0!==e.assignedNodes().length||t.classList.remove("dialog-footer"),this.floater.configure(this,"auroDialog"),this.floater.position=()=>{},this.addEventListener("auroDialog-toggled",e=>{e.detail.expanded||this.dispatchToggleEvent()}),this.dialog.addEventListener("cancel",e=>{e.preventDefault(),this.modal||this.floater.hideBib()}),this.dialog.addEventListener("click",e=>{e.target===this.dialog&&this.handleOverlayClick()})}updated(e){this.floater.handleUpdate(e),e.has("isPopoverVisible")&&(this.isPopoverVisible?(this.floater.showing||this.floater.showBib(),this.openDialog()):(this.floater.showing&&this.floater.hideBib(),this.closeDialog())),e.has("triggerElement")&&(this.floater.configure(this,"auroDialog"),this.floater.position=()=>{})}connectedCallback(){if(super.connectedCallback(),!Tt._mobileBreakpointValue){const e=getComputedStyle(document.documentElement);Tt._mobileBreakpointValue=Number(e.getPropertyValue("--ds-grid-breakpoint-md").replace("px",""))}}disconnectedCallback(){super.disconnectedCallback(),this.floater.disconnect(),this._restorePageScroll(),this._unlockTouchScroll(),clearTimeout(this._resizeTimer)}openDialog(){if(this.defaultTrigger=document.activeElement,this.modal)this._lockPageScroll(),this.dialog.showModal(),this._lockTouchScroll();else{this.dialog.showPopover();document.body.offsetWidth<Tt._mobileBreakpointValue&&this._lockPageScroll(),this._boundResizeHandler=()=>{clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(()=>{document.body.offsetWidth<Tt._mobileBreakpointValue?this._scrollLocked||this._lockPageScroll():this._restorePageScroll()},50)},window.addEventListener("resize",this._boundResizeHandler)}this.focusTrap=new b(this.dialog)}onDialogTransitionEnd(){this.isPopoverVisible&&this.focusTrap&&this.focusTrap.focusFirstElement()}closeDialog(){this._restorePageScroll(),this._unlockTouchScroll(),this.focusTrap&&(this.focusTrap.disconnect(),this.focusTrap=void 0),this.modal?this.dialog?.open&&this.dialog.close():(this._boundResizeHandler&&(window.removeEventListener("resize",this._boundResizeHandler),this._boundResizeHandler=void 0),clearTimeout(this._resizeTimer),setTimeout(()=>{this.dialog?.hidePopover?.()},300)),this.defaultTrigger&&(this.defaultTrigger.focus(),this.defaultTrigger=void 0)}_restorePageScroll(){this._scrollLocked&&(document.body.style.position="",document.body.style.top="",document.body.style.width="",document.body.style.overflow="",document.documentElement.style.overflow="",window.scrollTo(0,this._savedScrollY||0),this._savedScrollY=void 0,this._scrollLocked=!1)}_lockPageScroll(){this._scrollLocked||(this._savedScrollY=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${this._savedScrollY}px`,document.body.style.width="100%",document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",this._scrollLocked=!0)}_lockTouchScroll(){this._boundTouchMoveHandler||(this._boundTouchMoveHandler=e=>{e.composedPath().some(e=>e!==document&&e.scrollHeight>e.clientHeight)||e.preventDefault()},document.addEventListener("touchmove",this._boundTouchMoveHandler,{passive:!1}))}_unlockTouchScroll(){this._boundTouchMoveHandler&&(document.removeEventListener("touchmove",this._boundTouchMoveHandler,{passive:!1}),this._boundTouchMoveHandler=void 0)}dispatchToggleEvent(){const e=new Event("toggle",{bubbles:!0,cancelable:!1});this.dispatchEvent(e)}handleOverlayClick(){if(this.isPopoverVisible&&!this.modal){const e=[...this.querySelectorAll("auro-combobox, [auro-combobox], auro-select, [auro-select], auro-datepicker, [auro-datepicker]")];[...this.querySelectorAll("auro-dropdown, [auro-dropdown]"),...e.map(e=>e.dropdown)].some(e=>e.isPopoverVisible)||this.floater.hideBib()}}handleCloseButtonClick(){this.floater.hideBib()}focus(){this.isPopoverVisible&&this.dialog.focus()}show(){this.floater.showBib()}hide(){this.floater.hideBib()}static get styles(){return[St,At,kt,Bt]}getCloseButton(){return this.modal?n``:n`
83
83
  <${this.buttonTag}
84
84
  aria-label="${this.runtimeUtils.getSlotText(this,"ariaLabel.dialog.close")||"Close"}"
85
85
  variant="ghost"
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{A as AuroDialog}from"./auro-dialog-DMisOOkB.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";import"lit/static-html.js";
1
+ export{A as AuroDialog}from"./auro-dialog-CO6oy4Gv.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";import"lit/static-html.js";
@@ -1 +1 @@
1
- import{A as i}from"./auro-dialog-DMisOOkB.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";import"lit/static-html.js";i.register();
1
+ import{A as i}from"./auro-dialog-CO6oy4Gv.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";import"lit/static-html.js";i.register();
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "================================================================================"
8
8
  ],
9
9
  "name": "@aurodesignsystem-dev/auro-dialog",
10
- "version": "0.0.0-pr106.4",
10
+ "version": "0.0.0-pr106.5",
11
11
  "description": "auro-dialog HTML custom element",
12
12
  "repository": {
13
13
  "type": "git",