@aurodesignsystem/auro-dropdown
Advanced tools
Comparing version 2.5.0 to 2.6.0
# Semantic Release Automated Changelog | ||
# [2.6.0](https://github.com/AlaskaAirlines/auro-dropdown/compare/v2.5.0...v2.6.0) (2022-05-24) | ||
### Features | ||
* **readiness:** add readiness check and event notification [#125](https://github.com/AlaskaAirlines/auro-dropdown/issues/125) ([19265f0](https://github.com/AlaskaAirlines/auro-dropdown/commit/19265f003cc6ae5de0eb65370a0d97ffc80b5dcc)) | ||
# [2.5.0](https://github.com/AlaskaAirlines/auro-dropdown/compare/v2.4.0...v2.5.0) (2022-05-17) | ||
@@ -4,0 +11,0 @@ |
@@ -21,2 +21,3 @@ | ||
| [isPopoverVisible](#isPopoverVisible) | `isPopoverVisible` | ` Boolean ` | false | If true, the dropdown bib is displayed. | | ||
| [ready](#ready) | `ready` | `Boolean` | | When false the component API should not be called. | | ||
| [rounded](#rounded) | `rounded` | ` Boolean ` | | If declared, will apply border-radius to trigger and default slots. | | ||
@@ -37,2 +38,3 @@ | [toggle](#toggle) | `toggle` | ` Boolean ` | | If declared, the trigger will toggle the show/hide state of the dropdown. | | ||
|-----------------------------|---------------------------------------|--------------------------------------------------| | ||
| `auroDropdown-ready` | `CustomEvent<any>` | Notifies that the component has finished initializing. | | ||
| `auroDropdown-toggled` | `CustomEvent<{ expanded: boolean; }>` | Notifies that the visibility of the dropdown bib has changed. | | ||
@@ -39,0 +41,0 @@ | `auroDropdown-triggerClick` | `CustomEvent<any>` | Notifies that the trigger has been clicked. | |
@@ -55,3 +55,3 @@ /** | ||
* http://polymer.github.io/PATENTS.txt | ||
*/const b=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),y=` ${r} `;class w{constructor(e,t,r,o){this.strings=e,this.values=t,this.type=r,this.processor=o}getHTML(){const e=this.strings.length-1;let t="",i=!1;for(let n=0;n<e;n++){const e=this.strings[n],s=e.lastIndexOf("\x3c!--");i=(s>-1||i)&&-1===e.indexOf("--\x3e",s+1);const a=l.exec(e);t+=null===a?e+(i?y:o):e.substr(0,a.index)+a[1]+a[2]+"$lit$"+a[3]+r}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return void 0!==b&&(t=b.createHTML(t)),e.innerHTML=t,e}} | ||
*/const y=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),b=` ${r} `;class w{constructor(e,t,r,o){this.strings=e,this.values=t,this.type=r,this.processor=o}getHTML(){const e=this.strings.length-1;let t="",i=!1;for(let n=0;n<e;n++){const e=this.strings[n],s=e.lastIndexOf("\x3c!--");i=(s>-1||i)&&-1===e.indexOf("--\x3e",s+1);const a=l.exec(e);t+=null===a?e+(i?b:o):e.substr(0,a.index)+a[1]+a[2]+"$lit$"+a[3]+r}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return void 0!==y&&(t=y.createHTML(t)),e.innerHTML=t,e}} | ||
/** | ||
@@ -69,3 +69,3 @@ * @license | ||
* http://polymer.github.io/PATENTS.txt | ||
*/const x=e=>null===e||!("object"==typeof e||"function"==typeof e),_=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class S{constructor(e,t,r){this.dirty=!0,this.element=e,this.name=t,this.strings=r,this.parts=[];for(let e=0;e<r.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new O(this)}_getValue(){const e=this.strings,t=e.length-1,r=this.parts;if(1===t&&""===e[0]&&""===e[1]){const e=r[0].value;if("symbol"==typeof e)return String(e);if("string"==typeof e||!_(e))return e}let o="";for(let i=0;i<t;i++){o+=e[i];const t=r[i];if(void 0!==t){const e=t.value;if(x(e)||!_(e))o+="string"==typeof e?e:String(e);else for(const t of e)o+="string"==typeof t?t:String(t)}}return o+=e[t],o}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class O{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===g||x(e)&&e===this.value||(this.value=e,f(e)||(this.committer.dirty=!0))}commit(){for(;f(this.value);){const e=this.value;this.value=g,e(this)}this.value!==g&&this.committer.commit()}}class P{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(d()),this.endNode=e.appendChild(d())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=d()),e.__insert(this.endNode=d())}insertAfterPart(e){e.__insert(this.startNode=d()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(null===this.startNode.parentNode)return;for(;f(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=g,e(this)}const e=this.__pendingValue;e!==g&&(x(e)?e!==this.value&&this.__commitText(e):e instanceof w?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):_(e)?this.__commitIterable(e):e===m?(this.value=m,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,r="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=r:this.__commitNode(document.createTextNode(r)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof v&&this.value.template===t)this.value.update(e.values);else{const r=new v(t,e.processor,this.options),o=r._clone();r.update(e.values),this.__commitNode(o),this.value=r}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let r,o=0;for(const i of e)r=t[o],void 0===r&&(r=new P(this.options),t.push(r),0===o?r.appendIntoPart(this):r.insertAfterPart(t[o-1])),r.setValue(i),r.commit(),o++;o<t.length&&(t.length=o,this.clear(r&&r.endNode))}clear(e=this.startNode){t(this.startNode.parentNode,e.nextSibling,this.endNode)}}class C{constructor(e,t,r){if(this.value=void 0,this.__pendingValue=void 0,2!==r.length||""!==r[0]||""!==r[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=r}setValue(e){this.__pendingValue=e}commit(){for(;f(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=g,e(this)}if(this.__pendingValue===g)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=g}}class k extends S{constructor(e,t,r){super(e,t,r),this.single=2===r.length&&""===r[0]&&""===r[1]}_createPart(){return new E(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class E extends O{}let A=!1;(()=>{try{const e={get capture(){return A=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class T{constructor(e,t,r){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=r,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;f(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=g,e(this)}if(this.__pendingValue===g)return;const e=this.__pendingValue,t=this.value,r=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),o=null!=e&&(null==t||r);r&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),o&&(this.__options=N(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=g}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const N=e=>e&&(A?{capture:e.capture,passive:e.passive,once:e.once}:e.capture) | ||
*/const x=e=>null===e||!("object"==typeof e||"function"==typeof e),_=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class S{constructor(e,t,r){this.dirty=!0,this.element=e,this.name=t,this.strings=r,this.parts=[];for(let e=0;e<r.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new O(this)}_getValue(){const e=this.strings,t=e.length-1,r=this.parts;if(1===t&&""===e[0]&&""===e[1]){const e=r[0].value;if("symbol"==typeof e)return String(e);if("string"==typeof e||!_(e))return e}let o="";for(let i=0;i<t;i++){o+=e[i];const t=r[i];if(void 0!==t){const e=t.value;if(x(e)||!_(e))o+="string"==typeof e?e:String(e);else for(const t of e)o+="string"==typeof t?t:String(t)}}return o+=e[t],o}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class O{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===g||x(e)&&e===this.value||(this.value=e,f(e)||(this.committer.dirty=!0))}commit(){for(;f(this.value);){const e=this.value;this.value=g,e(this)}this.value!==g&&this.committer.commit()}}class P{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(d()),this.endNode=e.appendChild(d())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=d()),e.__insert(this.endNode=d())}insertAfterPart(e){e.__insert(this.startNode=d()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(null===this.startNode.parentNode)return;for(;f(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=g,e(this)}const e=this.__pendingValue;e!==g&&(x(e)?e!==this.value&&this.__commitText(e):e instanceof w?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):_(e)?this.__commitIterable(e):e===m?(this.value=m,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,r="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=r:this.__commitNode(document.createTextNode(r)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof v&&this.value.template===t)this.value.update(e.values);else{const r=new v(t,e.processor,this.options),o=r._clone();r.update(e.values),this.__commitNode(o),this.value=r}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let r,o=0;for(const i of e)r=t[o],void 0===r&&(r=new P(this.options),t.push(r),0===o?r.appendIntoPart(this):r.insertAfterPart(t[o-1])),r.setValue(i),r.commit(),o++;o<t.length&&(t.length=o,this.clear(r&&r.endNode))}clear(e=this.startNode){t(this.startNode.parentNode,e.nextSibling,this.endNode)}}class C{constructor(e,t,r){if(this.value=void 0,this.__pendingValue=void 0,2!==r.length||""!==r[0]||""!==r[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=r}setValue(e){this.__pendingValue=e}commit(){for(;f(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=g,e(this)}if(this.__pendingValue===g)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=g}}class E extends S{constructor(e,t,r){super(e,t,r),this.single=2===r.length&&""===r[0]&&""===r[1]}_createPart(){return new k(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class k extends O{}let A=!1;(()=>{try{const e={get capture(){return A=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class T{constructor(e,t,r){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=r,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;f(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=g,e(this)}if(this.__pendingValue===g)return;const e=this.__pendingValue,t=this.value,r=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),o=null!=e&&(null==t||r);r&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),o&&(this.__options=N(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=g}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const N=e=>e&&(A?{capture:e.capture,passive:e.passive,once:e.once}:e.capture) | ||
/** | ||
@@ -110,3 +110,3 @@ * @license | ||
*/ | ||
class{handleAttributeExpressions(e,t,r,o){const i=t[0];if("."===i){return new k(e,t.slice(1),r).parts}if("@"===i)return[new T(e,t.slice(1),o.eventContext)];if("?"===i)return[new C(e,t.slice(1),r)];return new S(e,t,r).parts}handleTextExpression(e){return new P(e)}}; | ||
class{handleAttributeExpressions(e,t,r,o){const i=t[0];if("."===i){return new E(e,t.slice(1),r).parts}if("@"===i)return[new T(e,t.slice(1),o.eventContext)];if("?"===i)return[new C(e,t.slice(1),r)];return new S(e,t,r).parts}handleTextExpression(e){return new P(e)}}; | ||
/** | ||
@@ -162,2 +162,2 @@ * @license | ||
*/ | ||
(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const K={};class Q extends F{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,r)=>e.reduceRight(((e,r)=>Array.isArray(r)?t(r,e):(e.add(r),e)),r),r=t(e,new Set),o=[];r.forEach((e=>o.unshift(e))),this._styles=o}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map((e=>{if(e instanceof CSSStyleSheet&&!J){const t=Array.prototype.slice.call(e.cssRules).reduce(((e,t)=>e+t.cssText),"");return new Y(String(t),X)}return e}))}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?J?this.renderRoot.adoptedStyleSheets=e.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map((e=>e.cssText)),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==K&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)})))}render(){return K}}Q.finalized=!0,Q.render=(e,r,o)=>{if(!o||"object"!=typeof o||!o.scopeName)throw new Error("The `scopeName` option is required.");const i=o.scopeName,n=L.has(r),s=U&&11===r.nodeType&&!!r.host,a=s&&!I.has(i),d=a?document.createDocumentFragment():r;if(((e,r,o)=>{let i=L.get(r);void 0===i&&(t(r,r.firstChild),L.set(r,i=new P(Object.assign({templateFactory:D},o))),i.appendInto(r)),i.setValue(e),i.commit()})(e,d,Object.assign({templateFactory:B(i)},o)),a){const e=L.get(d);L.delete(d);const o=e.value instanceof v?e.value.template:void 0;H(i,d,o),t(r,r.firstChild),r.appendChild(d),L.set(r,e)}!n&&s&&window.ShadyCSS.styleElement(r.host)},Q.shadowRootOptions={mode:"open"};var Z=G`.popover{display:inline-block;box-sizing:border-box;border-width:1px;border-style:solid;border-color:transparent;background-color:var(--auro-color-background-lightest);box-shadow:-2px 0 5px 2px rgba(0,0,0,.08),0 2px 5px 1px rgba(0,0,0,.08);color:var(--auro-color-text-primary-on-light)}.label{color:var(--auro-color-text-secondary-on-light);font-size:var(--auro-text-body-size-xs);line-height:var(--auro-text-body-size-default)}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid;border-color:transparent;color:var(--auro-color-text-primary-on-light)}.trigger:focus-within{border-color:var(--auro-color-border-active-on-light)}.trigger:active{border-color:var(--auro-color-border-active-on-light);box-shadow:inset 0 0 0 1px var(--auro-color-border-active-on-light)}@media(hover:hover){.trigger:hover{background-color:var(--auro-color-ui-bkg-hover-on-light);cursor:pointer}}.triggerContentWrapper{flex:1}#showStateIcon{display:flex;height:100%;align-items:center;margin-left:var(--auro-size-xs);color:var(--auro-color-icon-primary-on-light)}#showStateIcon auro-icon{height:1.5rem;line-height:1.5rem}#showStateIcon[data-expanded=true] auro-icon{transform:rotate(-180deg)}.helpText{margin-top:4px;color:var(--auro-color-text-secondary-on-light);font-size:var(--auro-text-body-size-xs);line-height:var(--auro-text-body-size-default)}:host(:not([data-show])) .popover{display:none}:host([data-show]) .popover{z-index:var(--auro-depth-tooltip)}:host([rounded]) .popover,:host([rounded]) .trigger{overflow:hidden;border-radius:var(--auro-border-radius)}:host([inset]) .trigger{padding:var(--auro-size-xs) var(--auro-size-sm)}:host([disabled]){pointer-events:none}:host([disabled]) #showStateIcon,:host([disabled]) .label,:host([disabled]) .trigger{color:var(--auro-color-text-disabled-on-light)}:host([bordered]) .trigger{border-color:var(--auro-color-border-primary-on-light)}:host([bordered]) .trigger:focus-within{border-color:var(--auro-color-border-active-on-light)}:host([error]) .helpText{color:var(--auro-color-text-error-on-light)}:host([error]) .trigger{border-color:var(--auro-color-border-error-on-light);box-shadow:inset 0 0 0 1px var(--auro-color-border-error-on-light)}:host([error]) .trigger:focus-within{border-color:var(--auro-color-border-active-on-light);box-shadow:none}:host([error]) .trigger:active{border-color:var(--auro-color-border-active-on-light);box-shadow:inset 0 0 0 1px var(--auro-color-border-active-on-light)}:host([disabled][bordered]) .trigger{border-color:var(--auro-color-border-disabled)}:host([bordered][error]) .trigger{border-color:var(--auro-color-border-error-on-light);box-shadow:inset 0 0 0 1px var(--auro-color-border-error-on-light)}:host([bordered][error]) .trigger:focus-within{border-color:var(--auro-color-border-active-on-light);box-shadow:none}:host([bordered][error]) .trigger:active{border-color:var(--auro-color-border-active-on-light);box-shadow:inset 0 0 0 1px var(--auro-color-border-active-on-light)}:host([onDark]) .trigger{color:var(--auro-color-text-primary-on-dark)}:host([onDark]) .trigger:focus-within{border-color:var(--auro-color-border-active-on-dark);box-shadow:none}:host([onDark]) .trigger:active{border-color:var(--auro-color-border-active-on-dark);box-shadow:inset 0 0 0 1px var(--auro-color-border-active-on-dark)}:host([onDark]) .helpText,:host([onDark]) .label{color:var(--auro-color-text-secondary-on-dark)}:host([onDark]) #showStateIcon{color:var(--auro-color-icon-primary-on-dark)}@media(hover:hover){:host([onDark]) .trigger:hover{background-color:rgba(178,178,178,.1)}}:host([onDark][error]) .helpText{color:var(--auro-color-text-error-on-dark)}:host([onDark][error]) .trigger{border-color:var(--auro-color-border-error-on-dark);box-shadow:inset 0 0 0 1px var(--auro-color-border-error-on-dark)}:host([onDark][error]) .trigger:focus-within{border-color:var(--auro-color-border-active-on-dark);box-shadow:none}:host([onDark][error]) .trigger:active{border-color:var(--auro-color-border-active-on-dark);box-shadow:inset 0 0 0 1px var(--auro-color-border-active-on-dark)}:host([onDark][disabled]) .helpText,:host([onDark][disabled]) .label,:host([onDark][disabled]) .trigger{color:var(--auro-color-text-disabled-on-dark)}:host([onDark][disabled][bordered]) .trigger{border-color:var(--auro-color-border-disabled-on-dark)}`;function ee(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function te(e){return e instanceof ee(e).Element||e instanceof Element}function re(e){return e instanceof ee(e).HTMLElement||e instanceof HTMLElement}function oe(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ee(e).ShadowRoot||e instanceof ShadowRoot)}var ie=Math.max,ne=Math.min,se=Math.round;function ae(e,t){void 0===t&&(t=!1);var r=e.getBoundingClientRect(),o=1,i=1;if(re(e)&&t){var n=e.offsetHeight,s=e.offsetWidth;s>0&&(o=se(r.width)/s||1),n>0&&(i=se(r.height)/n||1)}return{width:r.width/o,height:r.height/i,top:r.top/i,right:r.right/o,bottom:r.bottom/i,left:r.left/o,x:r.left/o,y:r.top/i}}function de(e){var t=ee(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function le(e){return e?(e.nodeName||"").toLowerCase():null}function ce(e){return((te(e)?e.ownerDocument:e.document)||window.document).documentElement}function pe(e){return ae(ce(e)).left+de(e).scrollLeft}function he(e){return ee(e).getComputedStyle(e)}function ue(e){var t=he(e),r=t.overflow,o=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+o)}function fe(e,t,r){void 0===r&&(r=!1);var o,i,n=re(t),s=re(t)&&function(e){var t=e.getBoundingClientRect(),r=se(t.width)/e.offsetWidth||1,o=se(t.height)/e.offsetHeight||1;return 1!==r||1!==o}(t),a=ce(t),d=ae(e,s),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&(("body"!==le(t)||ue(a))&&(l=(o=t)!==ee(o)&&re(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:de(o)),re(t)?((c=ae(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=pe(a))),{x:d.left+l.scrollLeft-c.x,y:d.top+l.scrollTop-c.y,width:d.width,height:d.height}}function ge(e){var t=ae(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function me(e){return"html"===le(e)?e:e.assignedSlot||e.parentNode||(oe(e)?e.host:null)||ce(e)}function ve(e){return["html","body","#document"].indexOf(le(e))>=0?e.ownerDocument.body:re(e)&&ue(e)?e:ve(me(e))}function be(e,t){var r;void 0===t&&(t=[]);var o=ve(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),n=ee(o),s=i?[n].concat(n.visualViewport||[],ue(o)?o:[]):o,a=t.concat(s);return i?a:a.concat(be(me(s)))}function ye(e){return["table","td","th"].indexOf(le(e))>=0}function we(e){return re(e)&&"fixed"!==he(e).position?e.offsetParent:null}function xe(e){for(var t=ee(e),r=we(e);r&&ye(r)&&"static"===he(r).position;)r=we(r);return r&&("html"===le(r)||"body"===le(r)&&"static"===he(r).position)?t:r||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&re(e)&&"fixed"===he(e).position)return null;for(var r=me(e);re(r)&&["html","body"].indexOf(le(r))<0;){var o=he(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(e)||t}var _e="top",Se="bottom",Oe="right",Pe="left",Ce=[_e,Se,Oe,Pe],ke=Ce.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),Ee=[].concat(Ce,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),Ae=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Te(e){var t=new Map,r=new Set,o=[];function i(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var o=t.get(e);o&&i(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||i(e)})),o}function Ne(e){return e.split("-")[0]}function De(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&oe(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Ve(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Le(e,t){return"viewport"===t?Ve(function(e){var t=ee(e),r=ce(e),o=t.visualViewport,i=r.clientWidth,n=r.clientHeight,s=0,a=0;return o&&(i=o.width,n=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=o.offsetLeft,a=o.offsetTop)),{width:i,height:n,x:s+pe(e),y:a}}(e)):te(t)?function(e){var t=ae(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Ve(function(e){var t,r=ce(e),o=de(e),i=null==(t=e.ownerDocument)?void 0:t.body,n=ie(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=ie(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-o.scrollLeft+pe(e),d=-o.scrollTop;return"rtl"===he(i||r).direction&&(a+=ie(r.clientWidth,i?i.clientWidth:0)-n),{width:n,height:s,x:a,y:d}}(ce(e)))}function je(e,t,r){var o="clippingParents"===t?function(e){var t=be(me(e)),r=["absolute","fixed"].indexOf(he(e).position)>=0&&re(e)?xe(e):e;return te(r)?t.filter((function(e){return te(e)&&De(e,r)&&"body"!==le(e)})):[]}(e):[].concat(t),i=[].concat(o,[r]),n=i[0],s=i.reduce((function(t,r){var o=Le(e,r);return t.top=ie(o.top,t.top),t.right=ne(o.right,t.right),t.bottom=ne(o.bottom,t.bottom),t.left=ie(o.left,t.left),t}),Le(e,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Re(e){return e.split("-")[1]}function Me(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ue(e){var t,r=e.reference,o=e.element,i=e.placement,n=i?Ne(i):null,s=i?Re(i):null,a=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2;switch(n){case _e:t={x:a,y:r.y-o.height};break;case Se:t={x:a,y:r.y+r.height};break;case Oe:t={x:r.x+r.width,y:d};break;case Pe:t={x:r.x-o.width,y:d};break;default:t={x:r.x,y:r.y}}var l=n?Me(n):null;if(null!=l){var c="y"===l?"height":"width";switch(s){case"start":t[l]=t[l]-(r[c]/2-o[c]/2);break;case"end":t[l]=t[l]+(r[c]/2-o[c]/2)}}return t}function Be(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function We(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function Ie(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,n=r.boundary,s=void 0===n?"clippingParents":n,a=r.rootBoundary,d=void 0===a?"viewport":a,l=r.elementContext,c=void 0===l?"popper":l,p=r.altBoundary,h=void 0!==p&&p,u=r.padding,f=void 0===u?0:u,g=Be("number"!=typeof f?f:We(f,Ce)),m="popper"===c?"reference":"popper",v=e.rects.popper,b=e.elements[h?m:c],y=je(te(b)?b:b.contextElement||ce(e.elements.popper),s,d),w=ae(e.elements.reference),x=Ue({reference:w,element:v,strategy:"absolute",placement:i}),_=Ve(Object.assign({},v,x)),S="popper"===c?_:w,O={top:y.top-S.top+g.top,bottom:S.bottom-y.bottom+g.bottom,left:y.left-S.left+g.left,right:S.right-y.right+g.right},P=e.modifiersData.offset;if("popper"===c&&P){var C=P[i];Object.keys(O).forEach((function(e){var t=[Oe,Se].indexOf(e)>=0?1:-1,r=[_e,Se].indexOf(e)>=0?"y":"x";O[e]+=C[r]*t}))}return O}var He={placement:"bottom",modifiers:[],strategy:"absolute"};function qe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function $e(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,o=void 0===r?[]:r,i=t.defaultOptions,n=void 0===i?He:i;return function(e,t,r){void 0===r&&(r=n);var i,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},He,n),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},d=[],l=!1,c={state:a,setOptions:function(r){var i="function"==typeof r?r(a.options):r;p(),a.options=Object.assign({},n,a.options,i),a.scrollParents={reference:te(e)?be(e):e.contextElement?be(e.contextElement):[],popper:be(t)};var s,l,h=function(e){var t=Te(e);return Ae.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}((s=[].concat(o,a.options.modifiers),l=s.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e}),{}),Object.keys(l).map((function(e){return l[e]}))));return a.orderedModifiers=h.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,o=void 0===r?{}:r,i=e.effect;if("function"==typeof i){var n=i({state:a,name:t,instance:c,options:o}),s=function(){};d.push(n||s)}})),c.update()},forceUpdate:function(){if(!l){var e=a.elements,t=e.reference,r=e.popper;if(qe(t,r)){a.rects={reference:fe(t,xe(r),"fixed"===a.options.strategy),popper:ge(r)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var o=0;o<a.orderedModifiers.length;o++)if(!0!==a.reset){var i=a.orderedModifiers[o],n=i.fn,s=i.options,d=void 0===s?{}:s,p=i.name;"function"==typeof n&&(a=n({state:a,options:d,name:p,instance:c})||a)}else a.reset=!1,o=-1}}},update:(i=function(){return new Promise((function(e){c.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){p(),l=!0}};if(!qe(e,t))return c;function p(){d.forEach((function(e){return e()})),d=[]}return c.setOptions(r).then((function(e){!l&&r.onFirstUpdate&&r.onFirstUpdate(e)})),c}}var ze={passive:!0};var Fe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Je(e){var t,r=e.popper,o=e.popperRect,i=e.placement,n=e.variation,s=e.offsets,a=e.position,d=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,p=e.isFixed,h=s.x,u=void 0===h?0:h,f=s.y,g=void 0===f?0:f,m="function"==typeof c?c({x:u,y:g}):{x:u,y:g};u=m.x,g=m.y;var v=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),y=Pe,w=_e,x=window;if(l){var _=xe(r),S="clientHeight",O="clientWidth";if(_===ee(r)&&"static"!==he(_=ce(r)).position&&"absolute"===a&&(S="scrollHeight",O="scrollWidth"),_=_,i===_e||(i===Pe||i===Oe)&&"end"===n)w=Se,g-=(p&&x.visualViewport?x.visualViewport.height:_[S])-o.height,g*=d?1:-1;if(i===Pe||(i===_e||i===Se)&&"end"===n)y=Oe,u-=(p&&x.visualViewport?x.visualViewport.width:_[O])-o.width,u*=d?1:-1}var P,C=Object.assign({position:a},l&&Fe),k=!0===c?function(e){var t=e.x,r=e.y,o=window.devicePixelRatio||1;return{x:se(t*o)/o||0,y:se(r*o)/o||0}}({x:u,y:g}):{x:u,y:g};return u=k.x,g=k.y,d?Object.assign({},C,((P={})[w]=b?"0":"",P[y]=v?"0":"",P.transform=(x.devicePixelRatio||1)<=1?"translate("+u+"px, "+g+"px)":"translate3d("+u+"px, "+g+"px, 0)",P)):Object.assign({},C,((t={})[w]=b?g+"px":"",t[y]=v?u+"px":"",t.transform="",t))}var Xe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,o=e.name,i=r.offset,n=void 0===i?[0,0]:i,s=Ee.reduce((function(e,r){return e[r]=function(e,t,r){var o=Ne(e),i=[Pe,_e].indexOf(o)>=0?-1:1,n="function"==typeof r?r(Object.assign({},t,{placement:e})):r,s=n[0],a=n[1];return s=s||0,a=(a||0)*i,[Pe,Oe].indexOf(o)>=0?{x:a,y:s}:{x:s,y:a}}(r,t.rects,n),e}),{}),a=s[t.placement],d=a.x,l=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=l),t.modifiersData[o]=s}},Ye={left:"right",right:"left",bottom:"top",top:"bottom"};function Ge(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ye[e]}))}var Ke={start:"end",end:"start"};function Qe(e){return e.replace(/start|end/g,(function(e){return Ke[e]}))}function Ze(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=r.boundary,n=r.rootBoundary,s=r.padding,a=r.flipVariations,d=r.allowedAutoPlacements,l=void 0===d?Ee:d,c=Re(o),p=c?a?ke:ke.filter((function(e){return Re(e)===c})):Ce,h=p.filter((function(e){return l.indexOf(e)>=0}));0===h.length&&(h=p);var u=h.reduce((function(t,r){return t[r]=Ie(e,{placement:r,boundary:i,rootBoundary:n,padding:s})[Ne(r)],t}),{});return Object.keys(u).sort((function(e,t){return u[e]-u[t]}))}var et={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var i=r.mainAxis,n=void 0===i||i,s=r.altAxis,a=void 0===s||s,d=r.fallbackPlacements,l=r.padding,c=r.boundary,p=r.rootBoundary,h=r.altBoundary,u=r.flipVariations,f=void 0===u||u,g=r.allowedAutoPlacements,m=t.options.placement,v=Ne(m),b=d||(v===m||!f?[Ge(m)]:function(e){if("auto"===Ne(e))return[];var t=Ge(e);return[Qe(e),t,Qe(t)]}(m)),y=[m].concat(b).reduce((function(e,r){return e.concat("auto"===Ne(r)?Ze(t,{placement:r,boundary:c,rootBoundary:p,padding:l,flipVariations:f,allowedAutoPlacements:g}):r)}),[]),w=t.rects.reference,x=t.rects.popper,_=new Map,S=!0,O=y[0],P=0;P<y.length;P++){var C=y[P],k=Ne(C),E="start"===Re(C),A=[_e,Se].indexOf(k)>=0,T=A?"width":"height",N=Ie(t,{placement:C,boundary:c,rootBoundary:p,altBoundary:h,padding:l}),D=A?E?Oe:Pe:E?Se:_e;w[T]>x[T]&&(D=Ge(D));var V=Ge(D),L=[];if(n&&L.push(N[k]<=0),a&&L.push(N[D]<=0,N[V]<=0),L.every((function(e){return e}))){O=C,S=!1;break}_.set(C,L)}if(S)for(var j=function(e){var t=y.find((function(t){var r=_.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return O=t,"break"},R=f?3:1;R>0;R--){if("break"===j(R))break}t.placement!==O&&(t.modifiersData[o]._skip=!0,t.placement=O,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function tt(e,t,r){return ie(e,ne(t,r))}var rt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,o=e.name,i=r.mainAxis,n=void 0===i||i,s=r.altAxis,a=void 0!==s&&s,d=r.boundary,l=r.rootBoundary,c=r.altBoundary,p=r.padding,h=r.tether,u=void 0===h||h,f=r.tetherOffset,g=void 0===f?0:f,m=Ie(t,{boundary:d,rootBoundary:l,padding:p,altBoundary:c}),v=Ne(t.placement),b=Re(t.placement),y=!b,w=Me(v),x="x"===w?"y":"x",_=t.modifiersData.popperOffsets,S=t.rects.reference,O=t.rects.popper,P="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,C="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(_){if(n){var A,T="y"===w?_e:Pe,N="y"===w?Se:Oe,D="y"===w?"height":"width",V=_[w],L=V+m[T],j=V-m[N],R=u?-O[D]/2:0,M="start"===b?S[D]:O[D],U="start"===b?-O[D]:-S[D],B=t.elements.arrow,W=u&&B?ge(B):{width:0,height:0},I=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=I[T],q=I[N],$=tt(0,S[D],W[D]),z=y?S[D]/2-R-$-H-C.mainAxis:M-$-H-C.mainAxis,F=y?-S[D]/2+R+$+q+C.mainAxis:U+$+q+C.mainAxis,J=t.elements.arrow&&xe(t.elements.arrow),X=J?"y"===w?J.clientTop||0:J.clientLeft||0:0,Y=null!=(A=null==k?void 0:k[w])?A:0,G=V+F-Y,K=tt(u?ne(L,V+z-Y-X):L,V,u?ie(j,G):j);_[w]=K,E[w]=K-V}if(a){var Q,Z="x"===w?_e:Pe,ee="x"===w?Se:Oe,te=_[x],re="y"===x?"height":"width",oe=te+m[Z],se=te-m[ee],ae=-1!==[_e,Pe].indexOf(v),de=null!=(Q=null==k?void 0:k[x])?Q:0,le=ae?oe:te-S[re]-O[re]-de+C.altAxis,ce=ae?te+S[re]+O[re]-de-C.altAxis:se,pe=u&&ae?function(e,t,r){var o=tt(e,t,r);return o>r?r:o}(le,te,ce):tt(u?le:oe,te,u?ce:se);_[x]=pe,E[x]=pe-te}t.modifiersData[o]=E}},requiresIfExists:["offset"]};var ot={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,o=e.name,i=e.options,n=r.elements.arrow,s=r.modifiersData.popperOffsets,a=Ne(r.placement),d=Me(a),l=[Pe,Oe].indexOf(a)>=0?"height":"width";if(n&&s){var c=function(e,t){return Be("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:We(e,Ce))}(i.padding,r),p=ge(n),h="y"===d?_e:Pe,u="y"===d?Se:Oe,f=r.rects.reference[l]+r.rects.reference[d]-s[d]-r.rects.popper[l],g=s[d]-r.rects.reference[d],m=xe(n),v=m?"y"===d?m.clientHeight||0:m.clientWidth||0:0,b=f/2-g/2,y=c[h],w=v-p[l]-c[u],x=v/2-p[l]/2+b,_=tt(y,x,w),S=d;r.modifiersData[o]=((t={})[S]=_,t.centerOffset=_-x,t)}},effect:function(e){var t=e.state,r=e.options.element,o=void 0===r?"[data-popper-arrow]":r;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&De(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function it(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function nt(e){return[_e,Oe,Se,Pe].some((function(t){return e[t]>=0}))}var st=$e({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,o=e.options,i=o.scroll,n=void 0===i||i,s=o.resize,a=void 0===s||s,d=ee(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return n&&l.forEach((function(e){e.addEventListener("scroll",r.update,ze)})),a&&d.addEventListener("resize",r.update,ze),function(){n&&l.forEach((function(e){e.removeEventListener("scroll",r.update,ze)})),a&&d.removeEventListener("resize",r.update,ze)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=Ue({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,o=r.gpuAcceleration,i=void 0===o||o,n=r.adaptive,s=void 0===n||n,a=r.roundOffsets,d=void 0===a||a,l={placement:Ne(t.placement),variation:Re(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Je(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:d})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Je(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];re(i)&&le(i)&&(Object.assign(i.style,r),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},n=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});re(o)&&le(o)&&(Object.assign(o.style,n),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]},Xe,et,rt,ot,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,o=t.rects.reference,i=t.rects.popper,n=t.modifiersData.preventOverflow,s=Ie(t,{elementContext:"reference"}),a=Ie(t,{altBoundary:!0}),d=it(s,o),l=it(a,i,n),c=nt(d),p=nt(l);t.modifiersData[r]={referenceClippingOffsets:d,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":p})}}]});class at{constructor(e,t,r){this.anchor=e,this.popover=t,this.options={placement:r,visibleClass:"data-show"},this.popover.classList.remove(this.options.visibleClass)}show(){this.popper&&this.popper.destroy(),this.popper=st(this.anchor,this.popover,{tooltip:this.anchor,placement:this.options.placement,strategy:"absolute"})}hide(){this.popover.classList.remove(this.options.visibleClass)}triggerUpdate(){this.popper.update()}}class dt extends Q{constructor(){super(),this.isPopoverVisible=!1,this.privateDefaults()}privateDefaults(){this.placement="bottom-start",this.bordered=!1,this.chevron=!1,this.disabled=!1,this.error=!1,this.inset=!1,this.rounded=!1,this.tabIndex=0,this.toggle=!1}static get properties(){return{bordered:{type:Boolean},chevron:{type:Boolean},disabled:{type:Boolean},error:{type:Boolean},inset:{type:Boolean},rounded:{type:Boolean},toggle:{type:Boolean},isPopoverVisible:{type:Boolean},dropdownWidth:{type:Number},placement:{type:String},tabIndex:{type:Number}}}static get styles(){return G`${Z}`}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}fixWidth(){this.dropdownWidth=this.getBoundingClientRect().width}handleTriggerTabIndex(){const e=this.querySelector('[slot="trigger"');if(!e.getAttribute("tabindex")){["a","button",'input:not([type="hidden])',"select","textarea",'[tabindex]:not([tabindex="-1"])',"auro-button","auro-input","auro-hyperlink"].forEach((t=>{(e.matches(t)||e.querySelector(t))&&(this.tabIndex=-1)}))}}firstUpdated(){this.fixWidth(),this.setAttribute("aria-expanded",this.isPopoverVisible),this.trigger=this.shadowRoot.querySelector("#trigger"),this.triggerChevron=this.shadowRoot.querySelector("#showStateIcon"),this.popover=this.shadowRoot.querySelector("#popover"),this.popper=new at(this.trigger,this.popover,this.placement);const e=()=>{this.toggleShow()},t=()=>{this.isPopoverVisible?this.toggleHide():e()},r=e=>{"escape"===e.key.toLowerCase()&&this.toggleHide()},o=t=>{const r=t.key.toLowerCase();" "!==r&&"enter"!==r||(t.preventDefault(),e())},i=e=>{const r=e.key.toLowerCase();" "!==r&&"enter"!==r||(e.preventDefault(),t())},n=()=>{const e=new CustomEvent("auroDropdown-triggerClick",{composed:!0});this.dispatchEvent(e)};this.hasAttribute("disableEventShow")?(this.trigger.addEventListener("click",n),this.trigger.addEventListener("keydown",n)):this.toggle?(this.trigger.addEventListener("click",t),this.trigger.addEventListener("keydown",i)):(this.trigger.addEventListener("click",e),this.trigger.addEventListener("keydown",o)),this.trigger.addEventListener("keydown",r),this.popover.addEventListener("keydown",r)}toggleHide(){this.popper.hide(),this.isPopoverVisible=!1,this.removeAttribute("data-show"),this.chevron&&this.triggerChevron.removeAttribute("data-expanded"),this.dispatchEventDropdownToggle()}toggleShow(){this.hasAttribute("disabled")||(document.expandedAuroDropdown&&document.expandedAuroDropdown.hide(),document.expandedAuroDropdown=this,this.fixWidth(),this.popper.show(),this.isPopoverVisible=!0,this.setAttribute("data-show",!0),this.chevron&&this.triggerChevron.setAttribute("data-expanded",!0),this.dispatchEventDropdownToggle())}hide(){this.toggleHide()}show(){this.toggleShow()}dispatchEventDropdownToggle(){const e=new CustomEvent("dropdownToggled",{detail:{expanded:this.isPopoverVisible},composed:!0});this.dispatchEvent(e);const t=new CustomEvent("auroDropdown-toggled",{detail:{expanded:this.isPopoverVisible},composed:!0});this.dispatchEvent(t)}outsideClick(e){-1===e.composedPath().indexOf(document.expandedAuroDropdown)&&document.expandedAuroDropdown.hide()}updated(e){e.has("isPopoverVisible")&&(this.setAttribute("aria-expanded",this.isPopoverVisible),this.isPopoverVisible?document.addEventListener("click",document.expandedAuroDropdown.outsideClick):document.expandedAuroDropdown&&document.removeEventListener("click",document.expandedAuroDropdown.outsideClick))}render(){return R`<div id="trigger" class="trigger" part="trigger" role="button" data-trigger-placement="${this.placement}" tabindex="${this.tabIndex}"><div class="triggerContentWrapper"><label class="label" id="triggerLabel"><slot name="label"></slot></label><div class="triggerContent" chevron="${this.chevron}" aria-labelledby="triggerLabel"><slot name="trigger" @slotchange="${this.handleTriggerTabIndex()}"></slot></div></div>${this.chevron?R`<div id="showStateIcon" part="chevron"><auro-icon category="interface" name="chevron-down" customColor></auro-icon></div>`:void 0}</div><div class="helpText" part="helpText"><slot name="helpText"></slot></div><div id="popover" class="popover" part="popover" aria-live="polite" style="${`min-width: ${this.dropdownWidth}px;`}"><slot role="tooltip"></slot></div>`}}customElements.get("auro-dropdown")||customElements.define("auro-dropdown",dt); | ||
(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const K={};class Q extends F{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,r)=>e.reduceRight(((e,r)=>Array.isArray(r)?t(r,e):(e.add(r),e)),r),r=t(e,new Set),o=[];r.forEach((e=>o.unshift(e))),this._styles=o}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map((e=>{if(e instanceof CSSStyleSheet&&!J){const t=Array.prototype.slice.call(e.cssRules).reduce(((e,t)=>e+t.cssText),"");return new Y(String(t),X)}return e}))}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?J?this.renderRoot.adoptedStyleSheets=e.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map((e=>e.cssText)),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==K&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)})))}render(){return K}}Q.finalized=!0,Q.render=(e,r,o)=>{if(!o||"object"!=typeof o||!o.scopeName)throw new Error("The `scopeName` option is required.");const i=o.scopeName,n=L.has(r),s=U&&11===r.nodeType&&!!r.host,a=s&&!I.has(i),d=a?document.createDocumentFragment():r;if(((e,r,o)=>{let i=L.get(r);void 0===i&&(t(r,r.firstChild),L.set(r,i=new P(Object.assign({templateFactory:D},o))),i.appendInto(r)),i.setValue(e),i.commit()})(e,d,Object.assign({templateFactory:B(i)},o)),a){const e=L.get(d);L.delete(d);const o=e.value instanceof v?e.value.template:void 0;H(i,d,o),t(r,r.firstChild),r.appendChild(d),L.set(r,e)}!n&&s&&window.ShadyCSS.styleElement(r.host)},Q.shadowRootOptions={mode:"open"};var Z=G`.popover{display:inline-block;box-sizing:border-box;border-width:1px;border-style:solid;border-color:transparent;background-color:var(--auro-color-background-lightest);box-shadow:-2px 0 5px 2px rgba(0,0,0,.08),0 2px 5px 1px rgba(0,0,0,.08);color:var(--auro-color-text-primary-on-light)}.label{color:var(--auro-color-text-secondary-on-light);font-size:var(--auro-text-body-size-xs);line-height:var(--auro-text-body-size-default)}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid;border-color:transparent;color:var(--auro-color-text-primary-on-light)}.trigger:focus-within{border-color:var(--auro-color-border-active-on-light)}.trigger:active{border-color:var(--auro-color-border-active-on-light);box-shadow:inset 0 0 0 1px var(--auro-color-border-active-on-light)}@media(hover:hover){.trigger:hover{background-color:var(--auro-color-ui-bkg-hover-on-light);cursor:pointer}}.triggerContentWrapper{flex:1}#showStateIcon{display:flex;height:100%;align-items:center;margin-left:var(--auro-size-xs);color:var(--auro-color-icon-primary-on-light)}#showStateIcon auro-icon{height:1.5rem;line-height:1.5rem}#showStateIcon[data-expanded=true] auro-icon{transform:rotate(-180deg)}.helpText{margin-top:4px;color:var(--auro-color-text-secondary-on-light);font-size:var(--auro-text-body-size-xs);line-height:var(--auro-text-body-size-default)}:host(:not([data-show])) .popover{display:none}:host([data-show]) .popover{z-index:var(--auro-depth-tooltip)}:host([rounded]) .popover,:host([rounded]) .trigger{overflow:hidden;border-radius:var(--auro-border-radius)}:host([inset]) .trigger{padding:var(--auro-size-xs) var(--auro-size-sm)}:host([disabled]){pointer-events:none}:host([disabled]) #showStateIcon,:host([disabled]) .label,:host([disabled]) .trigger{color:var(--auro-color-text-disabled-on-light)}:host([bordered]) .trigger{border-color:var(--auro-color-border-primary-on-light)}:host([bordered]) .trigger:focus-within{border-color:var(--auro-color-border-active-on-light)}:host([error]) .helpText{color:var(--auro-color-text-error-on-light)}:host([error]) .trigger{border-color:var(--auro-color-border-error-on-light);box-shadow:inset 0 0 0 1px var(--auro-color-border-error-on-light)}:host([error]) .trigger:focus-within{border-color:var(--auro-color-border-active-on-light);box-shadow:none}:host([error]) .trigger:active{border-color:var(--auro-color-border-active-on-light);box-shadow:inset 0 0 0 1px var(--auro-color-border-active-on-light)}:host([disabled][bordered]) .trigger{border-color:var(--auro-color-border-disabled)}:host([bordered][error]) .trigger{border-color:var(--auro-color-border-error-on-light);box-shadow:inset 0 0 0 1px var(--auro-color-border-error-on-light)}:host([bordered][error]) .trigger:focus-within{border-color:var(--auro-color-border-active-on-light);box-shadow:none}:host([bordered][error]) .trigger:active{border-color:var(--auro-color-border-active-on-light);box-shadow:inset 0 0 0 1px var(--auro-color-border-active-on-light)}:host([onDark]) .trigger{color:var(--auro-color-text-primary-on-dark)}:host([onDark]) .trigger:focus-within{border-color:var(--auro-color-border-active-on-dark);box-shadow:none}:host([onDark]) .trigger:active{border-color:var(--auro-color-border-active-on-dark);box-shadow:inset 0 0 0 1px var(--auro-color-border-active-on-dark)}:host([onDark]) .helpText,:host([onDark]) .label{color:var(--auro-color-text-secondary-on-dark)}:host([onDark]) #showStateIcon{color:var(--auro-color-icon-primary-on-dark)}@media(hover:hover){:host([onDark]) .trigger:hover{background-color:rgba(178,178,178,.1)}}:host([onDark][error]) .helpText{color:var(--auro-color-text-error-on-dark)}:host([onDark][error]) .trigger{border-color:var(--auro-color-border-error-on-dark);box-shadow:inset 0 0 0 1px var(--auro-color-border-error-on-dark)}:host([onDark][error]) .trigger:focus-within{border-color:var(--auro-color-border-active-on-dark);box-shadow:none}:host([onDark][error]) .trigger:active{border-color:var(--auro-color-border-active-on-dark);box-shadow:inset 0 0 0 1px var(--auro-color-border-active-on-dark)}:host([onDark][disabled]) .helpText,:host([onDark][disabled]) .label,:host([onDark][disabled]) .trigger{color:var(--auro-color-text-disabled-on-dark)}:host([onDark][disabled][bordered]) .trigger{border-color:var(--auro-color-border-disabled-on-dark)}`;function ee(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function te(e){return e instanceof ee(e).Element||e instanceof Element}function re(e){return e instanceof ee(e).HTMLElement||e instanceof HTMLElement}function oe(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ee(e).ShadowRoot||e instanceof ShadowRoot)}var ie=Math.max,ne=Math.min,se=Math.round;function ae(e,t){void 0===t&&(t=!1);var r=e.getBoundingClientRect(),o=1,i=1;if(re(e)&&t){var n=e.offsetHeight,s=e.offsetWidth;s>0&&(o=se(r.width)/s||1),n>0&&(i=se(r.height)/n||1)}return{width:r.width/o,height:r.height/i,top:r.top/i,right:r.right/o,bottom:r.bottom/i,left:r.left/o,x:r.left/o,y:r.top/i}}function de(e){var t=ee(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function le(e){return e?(e.nodeName||"").toLowerCase():null}function ce(e){return((te(e)?e.ownerDocument:e.document)||window.document).documentElement}function pe(e){return ae(ce(e)).left+de(e).scrollLeft}function he(e){return ee(e).getComputedStyle(e)}function ue(e){var t=he(e),r=t.overflow,o=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+o)}function fe(e,t,r){void 0===r&&(r=!1);var o,i,n=re(t),s=re(t)&&function(e){var t=e.getBoundingClientRect(),r=se(t.width)/e.offsetWidth||1,o=se(t.height)/e.offsetHeight||1;return 1!==r||1!==o}(t),a=ce(t),d=ae(e,s),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&(("body"!==le(t)||ue(a))&&(l=(o=t)!==ee(o)&&re(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:de(o)),re(t)?((c=ae(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=pe(a))),{x:d.left+l.scrollLeft-c.x,y:d.top+l.scrollTop-c.y,width:d.width,height:d.height}}function ge(e){var t=ae(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function me(e){return"html"===le(e)?e:e.assignedSlot||e.parentNode||(oe(e)?e.host:null)||ce(e)}function ve(e){return["html","body","#document"].indexOf(le(e))>=0?e.ownerDocument.body:re(e)&&ue(e)?e:ve(me(e))}function ye(e,t){var r;void 0===t&&(t=[]);var o=ve(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),n=ee(o),s=i?[n].concat(n.visualViewport||[],ue(o)?o:[]):o,a=t.concat(s);return i?a:a.concat(ye(me(s)))}function be(e){return["table","td","th"].indexOf(le(e))>=0}function we(e){return re(e)&&"fixed"!==he(e).position?e.offsetParent:null}function xe(e){for(var t=ee(e),r=we(e);r&&be(r)&&"static"===he(r).position;)r=we(r);return r&&("html"===le(r)||"body"===le(r)&&"static"===he(r).position)?t:r||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&re(e)&&"fixed"===he(e).position)return null;for(var r=me(e);re(r)&&["html","body"].indexOf(le(r))<0;){var o=he(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(e)||t}var _e="top",Se="bottom",Oe="right",Pe="left",Ce=[_e,Se,Oe,Pe],Ee=Ce.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),ke=[].concat(Ce,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),Ae=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Te(e){var t=new Map,r=new Set,o=[];function i(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var o=t.get(e);o&&i(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||i(e)})),o}function Ne(e){return e.split("-")[0]}function De(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&oe(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Ve(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Le(e,t){return"viewport"===t?Ve(function(e){var t=ee(e),r=ce(e),o=t.visualViewport,i=r.clientWidth,n=r.clientHeight,s=0,a=0;return o&&(i=o.width,n=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=o.offsetLeft,a=o.offsetTop)),{width:i,height:n,x:s+pe(e),y:a}}(e)):te(t)?function(e){var t=ae(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Ve(function(e){var t,r=ce(e),o=de(e),i=null==(t=e.ownerDocument)?void 0:t.body,n=ie(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=ie(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-o.scrollLeft+pe(e),d=-o.scrollTop;return"rtl"===he(i||r).direction&&(a+=ie(r.clientWidth,i?i.clientWidth:0)-n),{width:n,height:s,x:a,y:d}}(ce(e)))}function je(e,t,r){var o="clippingParents"===t?function(e){var t=ye(me(e)),r=["absolute","fixed"].indexOf(he(e).position)>=0&&re(e)?xe(e):e;return te(r)?t.filter((function(e){return te(e)&&De(e,r)&&"body"!==le(e)})):[]}(e):[].concat(t),i=[].concat(o,[r]),n=i[0],s=i.reduce((function(t,r){var o=Le(e,r);return t.top=ie(o.top,t.top),t.right=ne(o.right,t.right),t.bottom=ne(o.bottom,t.bottom),t.left=ie(o.left,t.left),t}),Le(e,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Re(e){return e.split("-")[1]}function Me(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ue(e){var t,r=e.reference,o=e.element,i=e.placement,n=i?Ne(i):null,s=i?Re(i):null,a=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2;switch(n){case _e:t={x:a,y:r.y-o.height};break;case Se:t={x:a,y:r.y+r.height};break;case Oe:t={x:r.x+r.width,y:d};break;case Pe:t={x:r.x-o.width,y:d};break;default:t={x:r.x,y:r.y}}var l=n?Me(n):null;if(null!=l){var c="y"===l?"height":"width";switch(s){case"start":t[l]=t[l]-(r[c]/2-o[c]/2);break;case"end":t[l]=t[l]+(r[c]/2-o[c]/2)}}return t}function Be(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function We(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function Ie(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,n=r.boundary,s=void 0===n?"clippingParents":n,a=r.rootBoundary,d=void 0===a?"viewport":a,l=r.elementContext,c=void 0===l?"popper":l,p=r.altBoundary,h=void 0!==p&&p,u=r.padding,f=void 0===u?0:u,g=Be("number"!=typeof f?f:We(f,Ce)),m="popper"===c?"reference":"popper",v=e.rects.popper,y=e.elements[h?m:c],b=je(te(y)?y:y.contextElement||ce(e.elements.popper),s,d),w=ae(e.elements.reference),x=Ue({reference:w,element:v,strategy:"absolute",placement:i}),_=Ve(Object.assign({},v,x)),S="popper"===c?_:w,O={top:b.top-S.top+g.top,bottom:S.bottom-b.bottom+g.bottom,left:b.left-S.left+g.left,right:S.right-b.right+g.right},P=e.modifiersData.offset;if("popper"===c&&P){var C=P[i];Object.keys(O).forEach((function(e){var t=[Oe,Se].indexOf(e)>=0?1:-1,r=[_e,Se].indexOf(e)>=0?"y":"x";O[e]+=C[r]*t}))}return O}var He={placement:"bottom",modifiers:[],strategy:"absolute"};function qe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function $e(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,o=void 0===r?[]:r,i=t.defaultOptions,n=void 0===i?He:i;return function(e,t,r){void 0===r&&(r=n);var i,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},He,n),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},d=[],l=!1,c={state:a,setOptions:function(r){var i="function"==typeof r?r(a.options):r;p(),a.options=Object.assign({},n,a.options,i),a.scrollParents={reference:te(e)?ye(e):e.contextElement?ye(e.contextElement):[],popper:ye(t)};var s,l,h=function(e){var t=Te(e);return Ae.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}((s=[].concat(o,a.options.modifiers),l=s.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e}),{}),Object.keys(l).map((function(e){return l[e]}))));return a.orderedModifiers=h.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,o=void 0===r?{}:r,i=e.effect;if("function"==typeof i){var n=i({state:a,name:t,instance:c,options:o}),s=function(){};d.push(n||s)}})),c.update()},forceUpdate:function(){if(!l){var e=a.elements,t=e.reference,r=e.popper;if(qe(t,r)){a.rects={reference:fe(t,xe(r),"fixed"===a.options.strategy),popper:ge(r)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var o=0;o<a.orderedModifiers.length;o++)if(!0!==a.reset){var i=a.orderedModifiers[o],n=i.fn,s=i.options,d=void 0===s?{}:s,p=i.name;"function"==typeof n&&(a=n({state:a,options:d,name:p,instance:c})||a)}else a.reset=!1,o=-1}}},update:(i=function(){return new Promise((function(e){c.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){p(),l=!0}};if(!qe(e,t))return c;function p(){d.forEach((function(e){return e()})),d=[]}return c.setOptions(r).then((function(e){!l&&r.onFirstUpdate&&r.onFirstUpdate(e)})),c}}var ze={passive:!0};var Fe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Je(e){var t,r=e.popper,o=e.popperRect,i=e.placement,n=e.variation,s=e.offsets,a=e.position,d=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,p=e.isFixed,h=s.x,u=void 0===h?0:h,f=s.y,g=void 0===f?0:f,m="function"==typeof c?c({x:u,y:g}):{x:u,y:g};u=m.x,g=m.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=Pe,w=_e,x=window;if(l){var _=xe(r),S="clientHeight",O="clientWidth";if(_===ee(r)&&"static"!==he(_=ce(r)).position&&"absolute"===a&&(S="scrollHeight",O="scrollWidth"),_=_,i===_e||(i===Pe||i===Oe)&&"end"===n)w=Se,g-=(p&&x.visualViewport?x.visualViewport.height:_[S])-o.height,g*=d?1:-1;if(i===Pe||(i===_e||i===Se)&&"end"===n)b=Oe,u-=(p&&x.visualViewport?x.visualViewport.width:_[O])-o.width,u*=d?1:-1}var P,C=Object.assign({position:a},l&&Fe),E=!0===c?function(e){var t=e.x,r=e.y,o=window.devicePixelRatio||1;return{x:se(t*o)/o||0,y:se(r*o)/o||0}}({x:u,y:g}):{x:u,y:g};return u=E.x,g=E.y,d?Object.assign({},C,((P={})[w]=y?"0":"",P[b]=v?"0":"",P.transform=(x.devicePixelRatio||1)<=1?"translate("+u+"px, "+g+"px)":"translate3d("+u+"px, "+g+"px, 0)",P)):Object.assign({},C,((t={})[w]=y?g+"px":"",t[b]=v?u+"px":"",t.transform="",t))}var Xe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,o=e.name,i=r.offset,n=void 0===i?[0,0]:i,s=ke.reduce((function(e,r){return e[r]=function(e,t,r){var o=Ne(e),i=[Pe,_e].indexOf(o)>=0?-1:1,n="function"==typeof r?r(Object.assign({},t,{placement:e})):r,s=n[0],a=n[1];return s=s||0,a=(a||0)*i,[Pe,Oe].indexOf(o)>=0?{x:a,y:s}:{x:s,y:a}}(r,t.rects,n),e}),{}),a=s[t.placement],d=a.x,l=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=l),t.modifiersData[o]=s}},Ye={left:"right",right:"left",bottom:"top",top:"bottom"};function Ge(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ye[e]}))}var Ke={start:"end",end:"start"};function Qe(e){return e.replace(/start|end/g,(function(e){return Ke[e]}))}function Ze(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=r.boundary,n=r.rootBoundary,s=r.padding,a=r.flipVariations,d=r.allowedAutoPlacements,l=void 0===d?ke:d,c=Re(o),p=c?a?Ee:Ee.filter((function(e){return Re(e)===c})):Ce,h=p.filter((function(e){return l.indexOf(e)>=0}));0===h.length&&(h=p);var u=h.reduce((function(t,r){return t[r]=Ie(e,{placement:r,boundary:i,rootBoundary:n,padding:s})[Ne(r)],t}),{});return Object.keys(u).sort((function(e,t){return u[e]-u[t]}))}var et={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var i=r.mainAxis,n=void 0===i||i,s=r.altAxis,a=void 0===s||s,d=r.fallbackPlacements,l=r.padding,c=r.boundary,p=r.rootBoundary,h=r.altBoundary,u=r.flipVariations,f=void 0===u||u,g=r.allowedAutoPlacements,m=t.options.placement,v=Ne(m),y=d||(v===m||!f?[Ge(m)]:function(e){if("auto"===Ne(e))return[];var t=Ge(e);return[Qe(e),t,Qe(t)]}(m)),b=[m].concat(y).reduce((function(e,r){return e.concat("auto"===Ne(r)?Ze(t,{placement:r,boundary:c,rootBoundary:p,padding:l,flipVariations:f,allowedAutoPlacements:g}):r)}),[]),w=t.rects.reference,x=t.rects.popper,_=new Map,S=!0,O=b[0],P=0;P<b.length;P++){var C=b[P],E=Ne(C),k="start"===Re(C),A=[_e,Se].indexOf(E)>=0,T=A?"width":"height",N=Ie(t,{placement:C,boundary:c,rootBoundary:p,altBoundary:h,padding:l}),D=A?k?Oe:Pe:k?Se:_e;w[T]>x[T]&&(D=Ge(D));var V=Ge(D),L=[];if(n&&L.push(N[E]<=0),a&&L.push(N[D]<=0,N[V]<=0),L.every((function(e){return e}))){O=C,S=!1;break}_.set(C,L)}if(S)for(var j=function(e){var t=b.find((function(t){var r=_.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return O=t,"break"},R=f?3:1;R>0;R--){if("break"===j(R))break}t.placement!==O&&(t.modifiersData[o]._skip=!0,t.placement=O,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function tt(e,t,r){return ie(e,ne(t,r))}var rt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,o=e.name,i=r.mainAxis,n=void 0===i||i,s=r.altAxis,a=void 0!==s&&s,d=r.boundary,l=r.rootBoundary,c=r.altBoundary,p=r.padding,h=r.tether,u=void 0===h||h,f=r.tetherOffset,g=void 0===f?0:f,m=Ie(t,{boundary:d,rootBoundary:l,padding:p,altBoundary:c}),v=Ne(t.placement),y=Re(t.placement),b=!y,w=Me(v),x="x"===w?"y":"x",_=t.modifiersData.popperOffsets,S=t.rects.reference,O=t.rects.popper,P="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,C="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(_){if(n){var A,T="y"===w?_e:Pe,N="y"===w?Se:Oe,D="y"===w?"height":"width",V=_[w],L=V+m[T],j=V-m[N],R=u?-O[D]/2:0,M="start"===y?S[D]:O[D],U="start"===y?-O[D]:-S[D],B=t.elements.arrow,W=u&&B?ge(B):{width:0,height:0},I=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=I[T],q=I[N],$=tt(0,S[D],W[D]),z=b?S[D]/2-R-$-H-C.mainAxis:M-$-H-C.mainAxis,F=b?-S[D]/2+R+$+q+C.mainAxis:U+$+q+C.mainAxis,J=t.elements.arrow&&xe(t.elements.arrow),X=J?"y"===w?J.clientTop||0:J.clientLeft||0:0,Y=null!=(A=null==E?void 0:E[w])?A:0,G=V+F-Y,K=tt(u?ne(L,V+z-Y-X):L,V,u?ie(j,G):j);_[w]=K,k[w]=K-V}if(a){var Q,Z="x"===w?_e:Pe,ee="x"===w?Se:Oe,te=_[x],re="y"===x?"height":"width",oe=te+m[Z],se=te-m[ee],ae=-1!==[_e,Pe].indexOf(v),de=null!=(Q=null==E?void 0:E[x])?Q:0,le=ae?oe:te-S[re]-O[re]-de+C.altAxis,ce=ae?te+S[re]+O[re]-de-C.altAxis:se,pe=u&&ae?function(e,t,r){var o=tt(e,t,r);return o>r?r:o}(le,te,ce):tt(u?le:oe,te,u?ce:se);_[x]=pe,k[x]=pe-te}t.modifiersData[o]=k}},requiresIfExists:["offset"]};var ot={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,o=e.name,i=e.options,n=r.elements.arrow,s=r.modifiersData.popperOffsets,a=Ne(r.placement),d=Me(a),l=[Pe,Oe].indexOf(a)>=0?"height":"width";if(n&&s){var c=function(e,t){return Be("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:We(e,Ce))}(i.padding,r),p=ge(n),h="y"===d?_e:Pe,u="y"===d?Se:Oe,f=r.rects.reference[l]+r.rects.reference[d]-s[d]-r.rects.popper[l],g=s[d]-r.rects.reference[d],m=xe(n),v=m?"y"===d?m.clientHeight||0:m.clientWidth||0:0,y=f/2-g/2,b=c[h],w=v-p[l]-c[u],x=v/2-p[l]/2+y,_=tt(b,x,w),S=d;r.modifiersData[o]=((t={})[S]=_,t.centerOffset=_-x,t)}},effect:function(e){var t=e.state,r=e.options.element,o=void 0===r?"[data-popper-arrow]":r;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&De(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function it(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function nt(e){return[_e,Oe,Se,Pe].some((function(t){return e[t]>=0}))}var st=$e({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,o=e.options,i=o.scroll,n=void 0===i||i,s=o.resize,a=void 0===s||s,d=ee(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return n&&l.forEach((function(e){e.addEventListener("scroll",r.update,ze)})),a&&d.addEventListener("resize",r.update,ze),function(){n&&l.forEach((function(e){e.removeEventListener("scroll",r.update,ze)})),a&&d.removeEventListener("resize",r.update,ze)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=Ue({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,o=r.gpuAcceleration,i=void 0===o||o,n=r.adaptive,s=void 0===n||n,a=r.roundOffsets,d=void 0===a||a,l={placement:Ne(t.placement),variation:Re(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Je(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:d})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Je(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];re(i)&&le(i)&&(Object.assign(i.style,r),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},n=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});re(o)&&le(o)&&(Object.assign(o.style,n),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]},Xe,et,rt,ot,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,o=t.rects.reference,i=t.rects.popper,n=t.modifiersData.preventOverflow,s=Ie(t,{elementContext:"reference"}),a=Ie(t,{altBoundary:!0}),d=it(s,o),l=it(a,i,n),c=nt(d),p=nt(l);t.modifiersData[r]={referenceClippingOffsets:d,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":p})}}]});class at{constructor(e,t,r){this.anchor=e,this.popover=t,this.options={placement:r,visibleClass:"data-show"},this.popover.classList.remove(this.options.visibleClass)}show(){this.popper&&this.popper.destroy(),this.popper=st(this.anchor,this.popover,{tooltip:this.anchor,placement:this.options.placement,strategy:"absolute"})}hide(){this.popover.classList.remove(this.options.visibleClass)}triggerUpdate(){this.popper.update()}}class dt extends Q{constructor(){super(),this.isPopoverVisible=!1,this.privateDefaults()}privateDefaults(){this.bordered=!1,this.chevron=!1,this.disabled=!1,this.error=!1,this.inset=!1,this.placement="bottom-start",this.rounded=!1,this.ready=!1,this.tabIndex=0,this.toggle=!1}static get properties(){return{bordered:{type:Boolean},chevron:{type:Boolean},disabled:{type:Boolean},error:{type:Boolean},inset:{type:Boolean},isPopoverVisible:{type:Boolean},ready:{type:Boolean},rounded:{type:Boolean},toggle:{type:Boolean},dropdownWidth:{type:Number},placement:{type:String},tabIndex:{type:Number}}}static get styles(){return G`${Z}`}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}fixWidth(){this.dropdownWidth=this.getBoundingClientRect().width}handleTriggerTabIndex(){const e=this.querySelector('[slot="trigger"');if(!e.getAttribute("tabindex")){["a","button",'input:not([type="hidden])',"select","textarea",'[tabindex]:not([tabindex="-1"])',"auro-button","auro-input","auro-hyperlink"].forEach((t=>{(e.matches(t)||e.querySelector(t))&&(this.tabIndex=-1)}))}}firstUpdated(){this.fixWidth(),this.setAttribute("aria-expanded",this.isPopoverVisible),this.trigger=this.shadowRoot.querySelector("#trigger"),this.triggerChevron=this.shadowRoot.querySelector("#showStateIcon"),this.popover=this.shadowRoot.querySelector("#popover"),this.popper=new at(this.trigger,this.popover,this.placement);const e=()=>{this.toggleShow()},t=()=>{this.isPopoverVisible?this.toggleHide():e()},r=e=>{"escape"===e.key.toLowerCase()&&this.toggleHide()},o=t=>{const r=t.key.toLowerCase();" "!==r&&"enter"!==r||(t.preventDefault(),e())},i=e=>{const r=e.key.toLowerCase();" "!==r&&"enter"!==r||(e.preventDefault(),t())},n=()=>{const e=new CustomEvent("auroDropdown-triggerClick",{composed:!0});this.dispatchEvent(e)};this.hasAttribute("disableEventShow")?(this.trigger.addEventListener("click",n),this.trigger.addEventListener("keydown",n)):this.toggle?(this.trigger.addEventListener("click",t),this.trigger.addEventListener("keydown",i)):(this.trigger.addEventListener("click",e),this.trigger.addEventListener("keydown",o)),this.trigger.addEventListener("keydown",r),this.popover.addEventListener("keydown",r),this.notifyReady()}notifyReady(){this.ready=!0,this.dispatchEvent(new CustomEvent("auroDropdown-ready",{bubbles:!0,cancelable:!1,composed:!0}))}toggleHide(){this.popper.hide(),this.isPopoverVisible=!1,this.removeAttribute("data-show"),this.chevron&&this.triggerChevron.removeAttribute("data-expanded"),this.dispatchEventDropdownToggle()}toggleShow(){this.hasAttribute("disabled")||(document.expandedAuroDropdown&&document.expandedAuroDropdown.hide(),document.expandedAuroDropdown=this,this.fixWidth(),this.popper.show(),this.isPopoverVisible=!0,this.setAttribute("data-show",!0),this.chevron&&this.triggerChevron.setAttribute("data-expanded",!0),this.dispatchEventDropdownToggle())}hide(){this.toggleHide()}show(){this.toggleShow()}dispatchEventDropdownToggle(){const e=new CustomEvent("dropdownToggled",{detail:{expanded:this.isPopoverVisible},composed:!0});this.dispatchEvent(e);const t=new CustomEvent("auroDropdown-toggled",{detail:{expanded:this.isPopoverVisible},composed:!0});this.dispatchEvent(t)}outsideClick(e){-1===e.composedPath().indexOf(document.expandedAuroDropdown)&&document.expandedAuroDropdown.hide()}updated(e){e.has("isPopoverVisible")&&(this.setAttribute("aria-expanded",this.isPopoverVisible),this.isPopoverVisible?document.addEventListener("click",document.expandedAuroDropdown.outsideClick):document.expandedAuroDropdown&&document.removeEventListener("click",document.expandedAuroDropdown.outsideClick))}render(){return R`<div id="trigger" class="trigger" part="trigger" role="button" data-trigger-placement="${this.placement}" tabindex="${this.tabIndex}"><div class="triggerContentWrapper"><label class="label" id="triggerLabel"><slot name="label"></slot></label><div class="triggerContent" chevron="${this.chevron}" aria-labelledby="triggerLabel"><slot name="trigger" @slotchange="${this.handleTriggerTabIndex()}"></slot></div></div>${this.chevron?R`<div id="showStateIcon" part="chevron"><auro-icon category="interface" name="chevron-down" customColor></auro-icon></div>`:void 0}</div><div class="helpText" part="helpText"><slot name="helpText"></slot></div><div id="popover" class="popover" part="popover" aria-live="polite" style="${`min-width: ${this.dropdownWidth}px;`}"><slot role="tooltip"></slot></div>`}}customElements.get("auro-dropdown")||customElements.define("auro-dropdown",dt); |
@@ -22,2 +22,3 @@ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license | ||
* @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed. | ||
* @prop {Boolean} ready - When false the component API should not be called. | ||
* @slot - Default slot for the popover content. | ||
@@ -33,2 +34,3 @@ * @slot label - Defines the content of the label. | ||
* @fires dropdownToggled - (DEPRECATED) Notifies that the visibility of the dropdown bib has changed. | ||
* @fires auroDropdown-ready - Notifies that the component has finished initializing. | ||
* @fires auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed. | ||
@@ -50,3 +52,2 @@ */ | ||
privateDefaults() { | ||
this.placement = 'bottom-start'; | ||
this.bordered = false; | ||
@@ -57,3 +58,5 @@ this.chevron = false; | ||
this.inset = false; | ||
this.placement = 'bottom-start'; | ||
this.rounded = false; | ||
this.ready = false; | ||
this.tabIndex = 0; | ||
@@ -71,5 +74,6 @@ this.toggle = false; | ||
inset: { type: Boolean }, | ||
isPopoverVisible: { type: Boolean }, | ||
ready: { type: Boolean }, | ||
rounded: { type: Boolean }, | ||
toggle: { type: Boolean }, | ||
isPopoverVisible: { type: Boolean }, | ||
@@ -221,2 +225,4 @@ /** | ||
this.popover.addEventListener('keydown', hideByKeyboard); | ||
this.notifyReady(); | ||
} | ||
@@ -226,2 +232,16 @@ | ||
* @private | ||
* @returns {void} Marks the component as ready and sends event. | ||
*/ | ||
notifyReady() { | ||
this.ready = true; | ||
this.dispatchEvent(new CustomEvent('auroDropdown-ready', { | ||
bubbles: true, | ||
cancelable: false, | ||
composed: true, | ||
})); | ||
} | ||
/** | ||
* @private | ||
* @returns {void} Hides the popover. Fires an update lifecycle. | ||
@@ -228,0 +248,0 @@ */ |
@@ -10,3 +10,3 @@ { | ||
"name": "@aurodesignsystem/auro-dropdown", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "auro-dropdown HTML custom element", | ||
@@ -13,0 +13,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
155948
762