kemet-ui 2.0.1 → 2.0.3

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.
@@ -14,13 +14,13 @@
14
14
  * Copyright 2017 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- var y;g.finalized=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:g}),(null!==(d=c.reactiveElementVersions)&&void 0!==d?d:c.reactiveElementVersions=[]).push("1.6.1");const b=window,k=b.trustedTypes,x=k?k.createPolicy("lit-html",{createHTML:t=>t}):void 0,w="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,S="?"+$,E=`<${S}>`,_=document,A=()=>_.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,C=Array.isArray,z="[ \t\n\f\r]",L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,I=/>/g,D=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),P=/'/g,T=/"/g,M=/^(?:script|style|textarea|title)$/i,N=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),U=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),X=new WeakMap,j=_.createTreeWalker(_,129,null,!1),R=(t,e)=>{const o=t.length-1,i=[];let s,r=2===e?"<svg>":"",n=L;for(let e=0;e<o;e++){const o=t[e];let a,l,d=-1,c=0;for(;c<o.length&&(n.lastIndex=c,l=n.exec(o),null!==l);)c=n.lastIndex,n===L?"!--"===l[1]?n=B:void 0!==l[1]?n=I:void 0!==l[2]?(M.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=D):void 0!==l[3]&&(n=D):n===D?">"===l[0]?(n=null!=s?s:L,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?D:'"'===l[3]?T:P):n===T||n===P?n=D:n===B||n===I?n=L:(n=D,s=void 0);const h=n===D&&t[e+1].startsWith("/>")?" ":"";r+=n===L?o+E:d>=0?(i.push(a),o.slice(0,d)+w+o.slice(d)+$+h):o+$+(-2===d?(i.push(void 0),e):h)}const a=r+(t[o]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==x?x.createHTML(a):a,i]};class H{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,d]=R(t,e);if(this.el=H.createElement(l,o),j.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=j.nextNode())&&a.length<n;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith(w)||e.startsWith($)){const o=d[r++];if(t.push(e),void 0!==o){const t=i.getAttribute(o.toLowerCase()+w).split($),e=/([.?@])?(.*)/.exec(o);a.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?K:"?"===e[1]?Z:"@"===e[1]?G:W})}else a.push({type:6,index:s})}for(const e of t)i.removeAttribute(e)}if(M.test(i.tagName)){const t=i.textContent.split($),e=t.length-1;if(e>0){i.textContent=k?k.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],A()),j.nextNode(),a.push({type:2,index:++s});i.append(t[e],A())}}}else if(8===i.nodeType)if(i.data===S)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf($,t+1));)a.push({type:7,index:s}),t+=$.length-1}s++}}static createElement(t,e){const o=_.createElement("template");return o.innerHTML=t,o}}function V(t,e,o=t,i){var s,r,n,a;if(e===U)return e;let l=void 0!==i?null===(s=o._$Co)||void 0===s?void 0:s[i]:o._$Cl;const d=O(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==d&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===d?l=void 0:(l=new d(t),l._$AT(t,o,i)),void 0!==i?(null!==(n=(a=o)._$Co)&&void 0!==n?n:a._$Co=[])[i]=l:o._$Cl=l),void 0!==l&&(e=V(t,l._$AS(t,e.values),l,i)),e}class Y{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:o},parts:i}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:_).importNode(o,!0);j.currentNode=s;let r=j.nextNode(),n=0,a=0,l=i[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new F(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new Q(r,this,t)),this._$AV.push(e),l=i[++a]}n!==(null==l?void 0:l.index)&&(r=j.nextNode(),n++)}return s}v(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class F{constructor(t,e,o,i){var s;this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cp=null===(s=null==i?void 0:i.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=V(this,t,e),O(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>C(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==q&&O(this._$AH)?this._$AA.nextSibling.data=t:this.$(_.createTextNode(t)),this._$AH=t}g(t){var e;const{values:o,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=H.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(o);else{const t=new Y(s,this),e=t.u(this.options);t.v(o),this.$(e),this._$AH=t}}_$AC(t){let e=X.get(t.strings);return void 0===e&&X.set(t.strings,e=new H(t)),e}T(t){C(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new F(this.k(A()),this.k(A()),this,this.options)):o=e[i],o._$AI(s),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class W{constructor(t,e,o,i,s){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,o,i){const s=this.strings;let r=!1;if(void 0===s)t=V(this,t,e,0),r=!O(t)||t!==this._$AH&&t!==U,r&&(this._$AH=t);else{const i=t;let n,a;for(t=s[0],n=0;n<s.length-1;n++)a=V(this,i[o+n],e,n),a===U&&(a=this._$AH[n]),r||(r=!O(a)||a!==this._$AH[n]),a===q?t=q:t!==q&&(t+=(null!=a?a:"")+s[n+1]),this._$AH[n]=a}r&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class K extends W{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}const J=k?k.emptyScript:"";class Z extends W{constructor(){super(...arguments),this.type=4}j(t){t&&t!==q?this.element.setAttribute(this.name,J):this.element.removeAttribute(this.name)}}class G extends W{constructor(t,e,o,i,s){super(t,e,o,i,s),this.type=5}_$AI(t,e=this){var o;if((t=null!==(o=V(this,t,e,0))&&void 0!==o?o:q)===U)return;const i=this._$AH,s=t===q&&i!==q||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==q&&(i===q||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class Q{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){V(this,t)}}const tt=b.litHtmlPolyfillSupport;null==tt||tt(H,F),(null!==(y=b.litHtmlVersions)&&void 0!==y?y:b.litHtmlVersions=[]).push("2.7.1");
17
+ var y;g.finalized=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:g}),(null!==(d=c.reactiveElementVersions)&&void 0!==d?d:c.reactiveElementVersions=[]).push("1.6.1");const b=window,k=b.trustedTypes,x=k?k.createPolicy("lit-html",{createHTML:t=>t}):void 0,w="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,S="?"+$,E=`<${S}>`,_=document,A=()=>_.createComment(""),C=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,z="[ \t\n\f\r]",L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,I=/>/g,D=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),P=/'/g,T=/"/g,M=/^(?:script|style|textarea|title)$/i,U=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),N=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),q=new WeakMap,R=_.createTreeWalker(_,129,null,!1),j=(t,e)=>{const o=t.length-1,i=[];let s,r=2===e?"<svg>":"",n=L;for(let e=0;e<o;e++){const o=t[e];let a,l,d=-1,c=0;for(;c<o.length&&(n.lastIndex=c,l=n.exec(o),null!==l);)c=n.lastIndex,n===L?"!--"===l[1]?n=B:void 0!==l[1]?n=I:void 0!==l[2]?(M.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=D):void 0!==l[3]&&(n=D):n===D?">"===l[0]?(n=null!=s?s:L,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?D:'"'===l[3]?T:P):n===T||n===P?n=D:n===B||n===I?n=L:(n=D,s=void 0);const h=n===D&&t[e+1].startsWith("/>")?" ":"";r+=n===L?o+E:d>=0?(i.push(a),o.slice(0,d)+w+o.slice(d)+$+h):o+$+(-2===d?(i.push(void 0),e):h)}const a=r+(t[o]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==x?x.createHTML(a):a,i]};class H{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,d]=j(t,e);if(this.el=H.createElement(l,o),R.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=R.nextNode())&&a.length<n;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith(w)||e.startsWith($)){const o=d[r++];if(t.push(e),void 0!==o){const t=i.getAttribute(o.toLowerCase()+w).split($),e=/([.?@])?(.*)/.exec(o);a.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?K:"?"===e[1]?Z:"@"===e[1]?G:W})}else a.push({type:6,index:s})}for(const e of t)i.removeAttribute(e)}if(M.test(i.tagName)){const t=i.textContent.split($),e=t.length-1;if(e>0){i.textContent=k?k.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],A()),R.nextNode(),a.push({type:2,index:++s});i.append(t[e],A())}}}else if(8===i.nodeType)if(i.data===S)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf($,t+1));)a.push({type:7,index:s}),t+=$.length-1}s++}}static createElement(t,e){const o=_.createElement("template");return o.innerHTML=t,o}}function Y(t,e,o=t,i){var s,r,n,a;if(e===N)return e;let l=void 0!==i?null===(s=o._$Co)||void 0===s?void 0:s[i]:o._$Cl;const d=C(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==d&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===d?l=void 0:(l=new d(t),l._$AT(t,o,i)),void 0!==i?(null!==(n=(a=o)._$Co)&&void 0!==n?n:a._$Co=[])[i]=l:o._$Cl=l),void 0!==l&&(e=Y(t,l._$AS(t,e.values),l,i)),e}class V{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:o},parts:i}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:_).importNode(o,!0);R.currentNode=s;let r=R.nextNode(),n=0,a=0,l=i[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new F(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new Q(r,this,t)),this._$AV.push(e),l=i[++a]}n!==(null==l?void 0:l.index)&&(r=R.nextNode(),n++)}return s}v(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class F{constructor(t,e,o,i){var s;this.type=2,this._$AH=X,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cp=null===(s=null==i?void 0:i.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Y(this,t,e),C(t)?t===X||null==t||""===t?(this._$AH!==X&&this._$AR(),this._$AH=X):t!==this._$AH&&t!==N&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>O(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==X&&C(this._$AH)?this._$AA.nextSibling.data=t:this.$(_.createTextNode(t)),this._$AH=t}g(t){var e;const{values:o,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=H.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(o);else{const t=new V(s,this),e=t.u(this.options);t.v(o),this.$(e),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new H(t)),e}T(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new F(this.k(A()),this.k(A()),this,this.options)):o=e[i],o._$AI(s),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class W{constructor(t,e,o,i,s){this.type=1,this._$AH=X,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=X}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,o,i){const s=this.strings;let r=!1;if(void 0===s)t=Y(this,t,e,0),r=!C(t)||t!==this._$AH&&t!==N,r&&(this._$AH=t);else{const i=t;let n,a;for(t=s[0],n=0;n<s.length-1;n++)a=Y(this,i[o+n],e,n),a===N&&(a=this._$AH[n]),r||(r=!C(a)||a!==this._$AH[n]),a===X?t=X:t!==X&&(t+=(null!=a?a:"")+s[n+1]),this._$AH[n]=a}r&&!i&&this.j(t)}j(t){t===X?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class K extends W{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===X?void 0:t}}const J=k?k.emptyScript:"";class Z extends W{constructor(){super(...arguments),this.type=4}j(t){t&&t!==X?this.element.setAttribute(this.name,J):this.element.removeAttribute(this.name)}}class G extends W{constructor(t,e,o,i,s){super(t,e,o,i,s),this.type=5}_$AI(t,e=this){var o;if((t=null!==(o=Y(this,t,e,0))&&void 0!==o?o:X)===N)return;const i=this._$AH,s=t===X&&i!==X||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==X&&(i===X||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class Q{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const tt=b.litHtmlPolyfillSupport;null==tt||tt(H,F),(null!==(y=b.litHtmlVersions)&&void 0!==y?y:b.litHtmlVersions=[]).push("2.7.1");
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
21
21
  * SPDX-License-Identifier: BSD-3-Clause
22
22
  */
23
- var et,ot;let it=class extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{var i,s;const r=null!==(i=null==o?void 0:o.renderBefore)&&void 0!==i?i:e;let n=r._$litPart$;if(void 0===n){const t=null!==(s=null==o?void 0:o.renderBefore)&&void 0!==s?s:null;r._$litPart$=n=new F(e.insertBefore(A(),t),t,void 0,null!=o?o:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return U}};it.finalized=!0,it._$litElement$=!0,null===(et=globalThis.litElementHydrateSupport)||void 0===et||et.call(globalThis,{LitElement:it});const st=globalThis.litElementPolyfillSupport;null==st||st({LitElement:it}),(null!==(ot=globalThis.litElementVersions)&&void 0!==ot?ot:globalThis.litElementVersions=[]).push("3.3.1");
23
+ var et,ot;let it=class extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{var i,s;const r=null!==(i=null==o?void 0:o.renderBefore)&&void 0!==i?i:e;let n=r._$litPart$;if(void 0===n){const t=null!==(s=null==o?void 0:o.renderBefore)&&void 0!==s?s:null;r._$litPart$=n=new F(e.insertBefore(A(),t),t,void 0,null!=o?o:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return N}};it.finalized=!0,it._$litElement$=!0,null===(et=globalThis.litElementHydrateSupport)||void 0===et||et.call(globalThis,{LitElement:it});const st=globalThis.litElementPolyfillSupport;null==st||st({LitElement:it}),(null!==(ot=globalThis.litElementVersions)&&void 0!==ot?ot:globalThis.litElementVersions=[]).push("3.3.1");
24
24
  /**
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
@@ -57,32 +57,31 @@ const rt=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e)
57
57
  * Copyright 2021 Google LLC
58
58
  * SPDX-License-Identifier: BSD-3-Clause
59
59
  */
60
- var ht;null===(ht=window.HTMLSlotElement)||void 0===ht||ht.prototype.assignedElements;const pt=(t,e,o,i=!0,s=!0)=>{t.dispatchEvent(new CustomEvent(e,{bubbles:i,composed:s,detail:o}))},ut=a`:host{display:block}`,ft=a`*,::after,::before{box-sizing:border-box}:host{display:block;padding:1.5rem 1rem;border-bottom:1px solid var(--kemet-color-background)}.trigger{color:inherit;cursor:pointer;display:grid;gap:1rem;grid-template-columns:1fr auto;width:100%;text-align:left;padding:0;border:none;background:0 0}.body{overflow:hidden;transition:all var(--kemet-accordion-panel-transition-speed,300ms) ease}::slotted([slot=body]){padding:1rem 0}`;let mt=class extends it{constructor(){super(...arguments),this.opened=void 0,this.maxHeight="0px",this.slug="panel"}firstUpdated(){var t,e;this.focusableSelector="body, a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",this.bodyElement=this.querySelector('[slot="body"]'),this.bodyElementFirst=null===(t=this.bodyElement)||void 0===t?void 0:t.querySelector(":first-child"),this.bodyElementLast=null===(e=this.bodyElement)||void 0===e?void 0:e.querySelector(":last-child"),this.bodyElementFirst&&(this.bodyElementFirst.style.marginTop="0"),this.bodyElementLast&&(this.bodyElementLast.style.marginBottom="0")}updated(t){var e;t.get("opened")||!0!==this.opened||(this.maxHeight=`${null===(e=this.bodyElement)||void 0===e?void 0:e.offsetHeight}px`,pt(this,"kemet-accordion-panel-opened",this)),t.get("opened")&&!1===this.opened&&(this.maxHeight="0px",pt(this,"kemet-accordion-panel-closed",this)),this.a11y(),this.focusableBodyElements()}render(){return N`<button class="trigger" part="trigger" @click="${()=>this.toggle()}" @keydown="${t=>this.handleKeyDown(t)}"><slot name="trigger"></slot><slot name="icon"></slot></button><section class="body" part="body" style="max-height:${this.maxHeight}"><slot name="body"></slot></section>`}toggle(){this.opened=!this.opened}focusableBodyElements(){var t;const e=null===(t=this.bodyElement)||void 0===t?void 0:t.querySelectorAll(this.focusableSelector);this.opened?null==e||e.forEach((t=>{t.removeAttribute("tabindex")})):null==e||e.forEach((t=>{t.setAttribute("tabindex","-1")}))}a11y(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".trigger"),i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".body");null==o||o.setAttribute("id",`${this.slug}-button`),null==o||o.setAttribute("aria-controls",`${this.slug}-content`),null==i||i.setAttribute("id",`${this.slug}-content`),null==i||i.setAttribute("aria-labelledby",`${this.slug}-button`),null==i||i.setAttribute("aria-hidden",`${!this.opened}`)}handleKeyDown(t){"Space"!==t.key&&"Enter"!==t.key||this.toggle()}};mt.styles=[ft],t([at({type:Boolean,reflect:!0})],mt.prototype,"opened",void 0),t([at({type:String,attribute:"max-height"})],mt.prototype,"maxHeight",void 0),t([at({type:String})],mt.prototype,"slug",void 0),t([lt()],mt.prototype,"focusableSelector",void 0),t([lt()],mt.prototype,"bodyElement",void 0),t([lt()],mt.prototype,"bodyElementFirst",void 0),t([lt()],mt.prototype,"bodyElementLast",void 0),mt=t([rt("kemet-accordion-panel")],mt);const vt=a`:host{--kemet-alert-padding:1rem;--kemet-alert-border-thickness:4px;--kemet-alert-status-color:inherit;display:flex;grid-template-columns:auto 1fr auto;gap:var(--kemet-alert-gap,var(--kemet-alert-padding));align-items:var(--kemet-alert-align-items,center);opacity:0;padding:var(--kemet-alert-padding);border:var(--kemet-alert-border,1px solid var(--kemet-alert-status-color));transition:opacity .3s ease}:host([opened]){opacity:1}:host([border-status=top]){border-top:var(--kemet-alert-border-thickness) solid var(--kemet-alert-status-color)}:host([border-status=right]){border-right:var(--kemet-alert-border-thickness) solid var(--kemet-alert-status-color)}:host([border-status=bottom]){border-bottom:var(--kemet-alert-border-thickness) solid var(--kemet-alert-status-color)}:host([border-status=left]){border-left:var(--kemet-alert-border-thickness) solid var(--kemet-alert-status-color)}:host([status=standard]){--kemet-alert-status-color:var(--kemet-color-text)}:host([status=primary]){--kemet-alert-status-color:var(--kemet-color-primary)}:host([status=success]){--kemet-alert-status-color:var(--kemet-color-success)}:host([status=warning]){--kemet-alert-status-color:var(--kemet-color-warning)}:host([status=error]){--kemet-alert-status-color:var(--kemet-color-error)}:host([hidden]){display:none}:host([reveal]){animation:fadeIn .3s ease forwards}:host([overlay]){position:fixed}:host([overlay*=full]){width:100%}:host([overlay*=top]){top:0}:host([overlay*=bottom]){bottom:0}:host([overlay*=left]){left:0}:host([overlay*=right]){right:0}.close{cursor:pointer;margin-left:auto}::slotted(kemet-icon){color:var(--kemet-alert-status-color)}@keyframes fadeIn{from{opacity:0}to{opacity:1}}`;let gt=class extends it{shouldUpdate(t){return t.has("opened")&&!t.get("opened")&&(this.hidden=!1,this.reveal=!0),!0}firstUpdated(){this.handleMotion()}updated(t){t.get("opened")||!0!==this.opened?pt(this,"kemet-alert-closed",this):pt(this,"kemet-alert-opened",this)}render(){return N`<slot name="icon"></slot><div><slot></slot></div><div class="close" part="close">${this.makeCloseBtn()}</div>`}makeCloseBtn(){return this.closable?N`<kemet-icon icon="x-lg" @click="${()=>{this.opened=!1}}"></kemet-icon>`:null}handleMotion(){this.addEventListener("transitionend",(()=>{this.opened||(this.hidden=!0)})),this.addEventListener("animationend",(()=>{this.reveal=!1}))}};gt.styles=[vt],t([at({type:Boolean,reflect:!0})],gt.prototype,"opened",void 0),t([at({type:Boolean,reflect:!0})],gt.prototype,"reveal",void 0),t([at({type:Boolean,reflect:!0})],gt.prototype,"closable",void 0),t([at({type:String,reflect:!0})],gt.prototype,"status",void 0),t([at({type:String,reflect:!0,attribute:"border-status"})],gt.prototype,"borderStatus",void 0),t([at({type:Boolean,reflect:!0})],gt.prototype,"hidden",void 0),t([at({type:String,reflect:!0})],gt.prototype,"overlay",void 0),gt=t([rt("kemet-alert")],gt);const yt=a`*,::after,::before{box-sizing:border-box}:host{display:inline-flex;color:var(--kemet-avatar-color,var(--kemet-color-white));position:relative;background-color:var(--kemet-avatar-background-color,var(--kemet-color-gray4))}:host([circle]){border-radius:50%}:host([circle])>*{border-radius:50%}:host([rounded]){border-radius:var(--kemet-avatar-rounded-radius,1rem)}:host([rounded])>*{border-radius:var(--kemet-avatar-rounded-radius,1rem)}.initials{margin:var(--kemet-avatar-initials-margin,1rem)}::slotted(kemet-badge){position:absolute;bottom:0;right:0;border-radius:50%}`,bt=a`*,::after,::before{box-sizing:border-box}:host{display:inline-flex}::slotted(kemet-avatar:not(:first-of-type)){margin-left:var(--kemet-avatars-squeeze,-1.5rem)}`;let kt=class extends it{render(){return N`<slot></slot>`}};kt.styles=[bt],kt=t([rt("kemet-avatars")],kt);let xt=class extends it{constructor(){super(),this.togglePanels=!1,this.addEventListener("kemet-accordion-panel-opened",this.handlePanelOpened.bind(this))}firstUpdated(){this.onKeyDown=t=>this.handleKeyDown(t)}render(){return N`<slot @slotchange="${()=>this.handleSlotChange()}"></slot>`}handleSlotChange(){this.panels=this.querySelectorAll("kemet-accordion-panel"),this.panels.forEach((t=>{t.removeEventListener("keydown",this.onKeyDown),t.addEventListener("keydown",this.onKeyDown)}))}handlePanelOpened(t){this.togglePanels&&this.panels.forEach((e=>{e!==t.detail&&(e.opened=!1)}))}navigatePanels(t){switch(t){case"home":this.currentPanel=0;break;case"end":this.currentPanel=this.panels.length-1;break;case"next":this.currentPanel+=1;break;case"prev":this.currentPanel-=1;break;default:this.currentPanelFocus=0}this.currentPanel>this.panels.length-1&&(this.currentPanel=0),this.currentPanel<0&&(this.currentPanel=this.panels.length-1),this.panels[this.currentPanel].shadowRoot.querySelector("button").focus()}handleKeyDown(t){switch(t.key){case"Enter":case"Space":t.preventDefault(),t.target.click();break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.navigatePanels("prev");break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.navigatePanels("next");break;case"End":t.preventDefault(),this.navigatePanels("end");break;case"Home":t.preventDefault(),this.navigatePanels("home")}}expandAll(){this.panels.forEach((t=>{t.opened=!0}))}collapseAll(){this.panels.forEach((t=>{t.opened=!1}))}};xt.styles=[ut],t([at({type:Number})],xt.prototype,"currentPanel",void 0),t([at({type:Boolean,attribute:"toggle-panels "})],xt.prototype,"togglePanels",void 0),t([lt()],xt.prototype,"panels",void 0),t([lt()],xt.prototype,"onKeyDown",void 0),t([lt()],xt.prototype,"currentPanelFocus",void 0),xt=t([rt("kemet-accordion")],xt);let wt=class extends it{firstUpdated(){this.makeSize()}render(){return N`${this.makeContent()}<slot name="status"></slot>`}makeSize(){this.size&&(this.style.width=`${this.size}px`,this.style.height=`${this.size}px`)}makeContent(){return this.image?N`<img src="${this.image}" alt="${this.label}">`:this.initials?N`<div part="initials" class="initials">${this.initials}</div>`:N`<slot></slot>`}};wt.styles=[yt],t([at({type:String})],wt.prototype,"size",void 0),t([at({type:String})],wt.prototype,"image",void 0),t([at({type:String})],wt.prototype,"label",void 0),t([at({type:String})],wt.prototype,"initials",void 0),t([at({type:Boolean,reflect:!0})],wt.prototype,"circle",void 0),t([at({type:Boolean,reflect:!0})],wt.prototype,"rounded",void 0),wt=t([rt("kemet-avatar")],wt);const $t=a`:host{display:inline-flex;align-items:center;justify-content:center;padding:var(--kemet-badge-padding,10px);line-height:1;color:var(--kemet-color-white)}:host([status=primary]){background-color:var(--kemet-color-primary)}:host([status=success]){background-color:var(--kemet-color-success)}:host([status=standard]){background-color:var(--kemet-color-gray6)}:host([status=warning]){background-color:var(--kemet-color-warning)}:host([status=error]){background-color:var(--kemet-color-error)}:host([circle]){border-radius:50%}:host([pill]){border-radius:99rem}`;let St=class extends it{constructor(){super(...arguments),this.status="primary",this.circle=!1,this.pill=!1,this.circlePadding=0}render(){return N`<slot @slotchange="${()=>this.handleSlotChange()}"></slot>`}handleSlotChange(){this.circle&&(this.style.height=`${this.offsetWidth+this.circlePadding}px`,this.style.width=`${this.offsetWidth+this.circlePadding}px`)}};St.styles=[$t],t([at({type:String,reflect:!0})],St.prototype,"status",void 0),t([at({type:Boolean,reflect:!0})],St.prototype,"circle",void 0),t([at({type:Boolean,reflect:!0})],St.prototype,"pill",void 0),t([at({type:Number,attribute:"circle-padding"})],St.prototype,"circlePadding",void 0),St=t([rt("kemet-badge")],St);const Et=a`:host{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:var(--kemet-button-font-size,inherit);color:var(--kemet-button-color,var(--kemet-color-foreground));width:var(--kemet-button-width,auto);height:var(--kemet-button-height,auto);border:var(--kemet-button-border,0);border-radius:var(--kemet-button-border-radius,0);transition:filter var(--kemet-button-transition-speed,300ms) ease;background-color:var(--kemet-button-background-color,var(--kemet-color-background))}:host(:hover:not([disabled])){filter:brightness(var(--kemet-button-hover-brightness, 1.25))}:host([disabled]){opacity:var(--kemet-button-disabled-opacity,.5)}.button{cursor:pointer;text-decoration:none;display:flex;gap:var(--kemet-button-gap,.5rem);align-items:center;color:inherit;font-size:inherit;width:100%;padding:var(--kemet-button-padding,1rem 1.25rem);border:0;background:0 0}:host([disabled]) .button{cursor:not-allowed}:host([type=text]){--kemet-button-color:var(--kemet-color-text);--kemet-button-background-color:none}:host([type=text]:hover){text-decoration:var(--kemet-button-hover-decoration,underline)}:host([type=circle]){--kemet-button-border-radius:50%;--kemet-button-width:var(--kemet-button-circle-size, 50px);--kemet-button-height:var(--kemet-button-circle-size, 50px)}:host([type=rounded]){--kemet-button-border-radius:var(--kemet-button-rounded-amount, 6px)}:host([type=pill]){--kemet-button-border-radius:10rem}:host([outlined]){--kemet-button-color:var(--kemet-color-background);--kemet-button-background-color:transparent;--kemet-button-border:var(--kemet-button-border-width, 1px) var(--kemet-button-border-style, solid) var(--kemet-button-border-color, var(--kemet-color-background))}`;class _t{constructor(t,e=undefined){(this.host=t).addController(this),this.options={form:t=>t.closest("form"),name:t=>t.name,value:t=>t.value,disabled:t=>t.disabled,checkValidity:t=>"function"!=typeof t.checkValidity||t.checkValidity(),...e},this.handleFormData=this.handleFormData.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this)}hostConnected(){this.form=this.options.form(this.host),this.form&&(this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit))}hostDisconnected(){this.form&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form=void 0)}handleFormData(t){var e;const o=this.options.disabled(this.host),i=this.options.name(this.host),s=this.options.value(this.host);o||"string"!=typeof i||void 0===s||(Array.isArray(s)?s.forEach((e=>{var o;null===(o=t.formData)||void 0===o||o.append(i,e.toString())})):null===(e=t.formData)||void 0===e||e.append(i,s.toString()))}handleFormSubmit(t){const e=this.options.disabled(this.host),o=this.options.checkValidity;if(this.form=this.options.form(this.host),this.form&&!this.form.noValidate&&!e&&!o(this.host)){t.preventDefault(),t.stopImmediatePropagation();this.form.querySelectorAll("kemet-input, kemet-textarea, kemet-select, kemet-checkbox, kemet-radios").forEach((t=>{t.checkValidity(),t.checkValidity()||(t.status="error",t.invalid=!0,t.dispatchEvent(new CustomEvent("kemet-input-status",{bubbles:!0,composed:!0,detail:{status:"error",validity:t.validity?t.validity:{},element:t}}))),t.checkLimitValidity&&!t.checkLimitValidity()&&(t.status="error",t.invalid=!0,t.dispatchEvent(new CustomEvent("kemet-input-status",{bubbles:!0,composed:!0,detail:{status:"error",validity:{passedLimit:!0},element:t}})))}))}}submit(){const t=document.createElement("button");this.form&&(t.type="submit",t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.clip="rect(0 0 0 0)",t.style.clipPath="inset(50%)",t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.form.append(t),t.click(),t.remove())}}const At=a`:host{display:inline-flex;align-items:center;justify-content:center}`;let Ot=class extends it{constructor(){super(...arguments),this.icon="alarm",this.set="bootstrap",this.size=16}updated(){this.getIcon(),this.style.width=`${this.size}px`,this.style.height=`${this.size}px`}render(){return N``}async getIcon(){var t,e,o;const i=new DOMParser;let s;try{if(s=await fetch(`${this.getUrl()}/${this.icon}.svg`).then((t=>t.text())),s.indexOf("</svg>")<0)throw new Error("Not a valid svg.")}catch(t){s="",console.error(t)}const r=i.parseFromString(s,"image/svg+xml").documentElement,n=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("svg");if("svg"===r.tagName)r.setAttribute("id",this.icon),r.setAttribute("width",`${this.size}px`),r.setAttribute("height",`${this.size}px`),r.setAttribute("fill","currentColor"),n&&n.remove(),null===(e=this.shadowRoot)||void 0===e||e.appendChild(r);else{console.error(`Could not find icon "${this.icon}" in set "${this.set}"`);const t=`\n <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="kemet-error" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" xml:space="preserve" width="${this.size}" height="${this.size}">\n <style type="text/css">\n .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}\n .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#EC1C24;}\n </style>\n <g>\n <path class="st0" d="M256,0c70.7,0,134.7,28.7,181,75c46.3,46.3,75,110.3,75,181c0,70.7-28.7,134.7-75,181 c-46.3,46.3-110.3,75-181,75c-70.7,0-134.7-28.7-181-75C28.7,390.7,0,326.7,0,256c0-70.7,28.7-134.7,75-181S185.3,0,256,0z"/>\n <path class="st1" d="M512,256c0-70.7-28.7-134.7-75-181C390.7,28.7,326.7,0,256,0C193,0,135.5,22.8,90.9,60.6l-0.1-0.1 C85.3,65.1,80,69.9,75,75c-5,5.1-9.9,10.3-14.5,15.8l0.1,0.1C22.8,135.5,0,193,0,256c0,70.7,28.7,134.7,75,181 c46.3,46.3,110.3,75,181,75c63,0,120.5-22.8,165.1-60.6l0.1,0.1c5.4-4.6,10.7-9.5,15.8-14.5c5-5,9.9-10.3,14.5-15.8l-0.1-0.1 C489.2,376.6,512,319,512,256z M256,42.9c58.9,0,112.1,23.9,150.7,62.4c38.6,38.6,62.4,91.9,62.4,150.7c0,51.1-18.1,98-48.1,134.8 L121.2,90.9C158,60.9,204.9,42.9,256,42.9z M256,469.1c-58.8,0-112.1-23.9-150.7-62.4C66.7,368.1,42.9,314.9,42.9,256 c0-51.1,18.1-98,48.1-134.8l299.8,299.8C354,451.1,307.1,469.1,256,469.1z"/>\n </g>\n </svg>\n `,e=i.parseFromString(t,"image/svg+xml").documentElement;n&&n.remove(),null===(o=this.shadowRoot)||void 0===o||o.appendChild(e)}}getUrl(){let t;switch(this.set){case"bootstrap":default:t="https://unpkg.com/bootstrap-icons@latest/icons";break;case"font-awesome-brands":t="https://unpkg.com/@fortawesome/fontawesome-free@latest/svgs/brands";break;case"font-awesome-regular":t="https://unpkg.com/@fortawesome/fontawesome-free@latest/svgs/regular";break;case"font-awesome-solid":t="https://unpkg.com/@fortawesome/fontawesome-free@latest/svgs/solid"}return t}};Ot.styles=[At],t([at({type:String})],Ot.prototype,"icon",void 0),t([at({type:String})],Ot.prototype,"set",void 0),t([at({type:Number})],Ot.prototype,"size",void 0),Ot=t([rt("kemet-icon")],Ot);let Ct=class extends it{constructor(){super(),this.outlined=!1,this.disabled=!1,this.type="standard",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("mouseover",this.handleMouseOver.bind(this)),this.addEventListener("mouseout",this.handleMouseOut.bind(this)),this.addEventListener("blur",this.handleBlur.bind(this)),this.addEventListener("keyup",(t=>this.handleKeyUp(t))),this.formSubmitController=new _t(this)}render(){return this.link&&!this.disabled?N`<a href="${this.link}" class="button" role="button" part="button"><slot name="left"></slot><slot></slot><slot name="right"></slot></a>`:N`<button class="button" part="button" ?disabled="${this.disabled}" aria-disabled="${this.disabled?"true":"false"}"><slot name="left"></slot><slot></slot><slot name="right"></slot></button>`}handleMouseOver(){this.hover=!0}handleMouseOut(){this.hover=!1}handleClick(){this.hover=!1,this.active=!0,setTimeout((()=>{this.active=!1}),300),this.shadowRoot.querySelector("button")&&this.formSubmitController.submit()}handleBlur(){this.focused=!1,this.active=!1,this.hover=!1}handleKeyUp(t){"Tab"===t.key&&(this.focused=!0)}};Ct.styles=[Et],t([at({type:Boolean,reflect:!0})],Ct.prototype,"active",void 0),t([at({type:Boolean,reflect:!0})],Ct.prototype,"hover",void 0),t([at({type:Boolean,reflect:!0})],Ct.prototype,"focused",void 0),t([at({type:String})],Ct.prototype,"link",void 0),t([at({type:Boolean,reflect:!0})],Ct.prototype,"outlined",void 0),t([at({type:Boolean,reflect:!0})],Ct.prototype,"disabled",void 0),t([at({type:String,reflect:!0})],Ct.prototype,"type",void 0),Ct=t([rt("kemet-button")],Ct);const zt=a`*,::after,::before{box-sizing:border-box}:host{--kemet-card-padding:1rem;--kemet-card-border-color:var(--kemet-color-gray4);color:var(--kemet-card-color,var(--kemet-color-black));display:inline-flex;flex-direction:column;max-width:var(--kemet-card-max-width,360px);border:var(--kemet-card-border,1px solid var(--kemet-card-border-color));border-radius:var(--kemet-card-border-radius,0);background-color:var(--kemet-card-background-color,var(--kemet-color-white))}:host([center]){align-items:center;text-align:center}.body{padding:var(--kemet-card-body-padding,var(--kemet-card-padding))}.media{position:relative}::slotted(*){max-width:100%}::slotted(img){display:flex;max-width:100%}::slotted([slot=header]){padding:var(--kemet-card-header-padding,var(--kemet-card-padding));border-bottom:var(--kemet-card-header-border-bottom,1px solid var(--kemet-card-border-color))}::slotted([slot=caption]){color:var(--kemet-card-caption-color,var(--kemet-color-white));position:absolute;bottom:0;width:100%;padding:var(--kemet-card-caption-padding,calc(var(--kemet-card-padding)/ 2) var(--kemet-card-padding));background-color:var(--kemet-card-caption-background-color,rgba(0,0,0,.35))}::slotted([slot=footer]){padding:var(--kemet-card-footer-padding,var(--kemet-card-padding));border-top:var(--kemet-card-footer-border-top,1px solid var(--kemet-card-border-color))}`;let Lt=class extends it{render(){return N`<slot name="header"></slot><div class="media" part="media"><slot name="media"></slot><slot name="caption"></slot></div><div class="body" part="body"><slot></slot></div><slot name="footer"></slot>`}};Lt.styles=[zt],t([at({type:Boolean,reflect:!0})],Lt.prototype,"center",void 0),Lt=t([rt("kemet-card")],Lt);let Bt=class extends it{firstUpdated(){this.carousel=this.closest("kemet-carousel")}updated(){var t;this.current=(null===(t=this.carousel)||void 0===t?void 0:t.index)+1}render(){return N`${this.current}`}};Bt.styles=[a`:host{display:inline-block}`],t([at({type:Number})],Bt.prototype,"current",void 0),t([lt()],Bt.prototype,"carousel",void 0),Bt=t([rt("kemet-carousel-current")],Bt);let It=class extends it{render(){return N`<span tabindex="0" @keyup="${()=>this.last()}" @click="${()=>this.last()}"><slot></slot></span>`}last(){this.disabled||pt(this,"kemet-carousel-last",this)}};It.styles=[a`:host{cursor:pointer}:host([disabled]){cursor:not-allowed}`],t([at({type:Boolean,reflect:!0})],It.prototype,"disabled",void 0),It=t([rt("kemet-carousel-last")],It);let Dt=class extends it{render(){return N`<span tabindex="0" @keyup="${()=>this.first()}" @click="${()=>this.first()}"><slot></slot></span>`}first(){this.disabled||pt(this,"kemet-carousel-first",this)}};Dt.styles=[a`:host{cursor:pointer}:host([disabled]){cursor:not-allowed}`],t([at({type:Boolean,reflect:!0})],Dt.prototype,"disabled",void 0),Dt=t([rt("kemet-carousel-first")],Dt);let Pt=class extends it{render(){return N`<span tabindex="0" @keyup="${()=>this.changed()}" @click="${()=>this.changed()}"><slot></slot></span>`}changed(){this.disabled||pt(this,"kemet-carousel-link",this)}};Pt.styles=[a`:host([selected]){color:var(--kemet-carousel-link-selected-color,var(--kemet-color-primary))}:host(:not([selected])){cursor:pointer}:host([disabled]){cursor:not-allowed}`],t([at({type:Number,reflect:!0})],Pt.prototype,"slide",void 0),t([at({type:Boolean,reflect:!0})],Pt.prototype,"selected",void 0),t([at({type:Boolean,reflect:!0})],Pt.prototype,"disabled",void 0),Pt=t([rt("kemet-carousel-link")],Pt);let Tt=class extends it{render(){return N`<span tabindex="0" @keyup="${()=>this.next()}" @click="${()=>this.next()}"><slot></slot></span>`}next(){this.disabled||pt(this,"kemet-carousel-next",this)}};Tt.styles=[a`:host{cursor:pointer}:host([disabled]){cursor:not-allowed}`],t([at({type:Boolean,reflect:!0})],Tt.prototype,"disabled",void 0),Tt=t([rt("kemet-carousel-next")],Tt);let Mt=class extends it{render(){return N`<span tabindex="0" @keyup="${()=>this.prev()}" @click="${()=>this.prev()}"><slot></slot></span>`}prev(){this.disabled||pt(this,"kemet-carousel-prev",this)}};Mt.styles=[a`:host{cursor:pointer}:host([disabled]){cursor:not-allowed}`],t([at({type:Boolean,reflect:!0})],Mt.prototype,"disabled",void 0),Mt=t([rt("kemet-carousel-prev")],Mt);let Nt=class extends it{constructor(){super(),this.selected=!1,this["aria-hidden"]="true"}static get properties(){return{"aria-hidden":{type:String,reflect:!0}}}render(){return N`<slot></slot>`}};Nt.styles=[a`::after,:host,:host *,:host ::before{box-sizing:border-box}:host{flex:0 0 auto}`],t([at({type:Boolean,reflect:!0})],Nt.prototype,"selected",void 0),Nt=t([rt("kemet-carousel-slide")],Nt);let Ut=class extends it{firstUpdated(){this.carousel=this.closest("kemet-carousel")}updated(){var t;this.total=null===(t=this.carousel)||void 0===t?void 0:t.total}render(){return N`${this.total}`}};Ut.styles=[a`:host{display:inline-block}`],t([at({type:Number})],Ut.prototype,"total",void 0),t([lt()],Ut.prototype,"carousel",void 0),Ut=t([rt("kemet-carousel-total")],Ut);const qt=a`*,::after,::before,:host{box-sizing:border-box}:host{position:relative;display:grid;grid-template-columns:minmax(0,1fr);align-items:center;width:var(--kemet-carousel-width,100%);height:var(--kemet-carousel-height,auto);overflow:visible}:host([arrows]){grid-template-columns:auto minmax(0,1fr) auto}.toolbar{display:flex;gap:var(--kemet-carousel-toolbar-gap,1rem);align-items:center;justify-content:var(--kemet-carousel-toolbar-justify-content,center);line-height:1;padding:var(--kemet-carousel-toolbar-padding,1rem)}:host([inner]) .toolbar{width:var(--kemet-carousel-toolbar-inner-width,100%);position:absolute;bottom:var(--kemet-carousel-toolbar-inner-bottom,0);top:var(--kemet-carousel-toolbar-inner-top,auto);color:var(--kemet-carousel-toolbar-inner-color,var(--kemet-color-white));background-color:var(--kemet-carousel-toolbar-inner-background-color,rgba(0,0,0,.4))}.slides{overflow:hidden;position:relative;padding:1rem 0;border:var(--kemet-carousel-slides-border,1px solid var(--kemet-color-gray1))}.slider{display:flex;flex-wrap:nowrap;transition:transform var(--kemet-carousel-transition-speed,300ms) ease}::slotted([slot=next]),::slotted([slot=prev]){opacity:var(--kemet-carousel-arrows-opacity,.25);transition:opacity var(--kemet-carousel-arrows-transition-speed,300ms) ease-in-out}:host(:hover) ::slotted([slot=next]),:host(:hover) ::slotted([slot=prev]){opacity:var(--kemet-carousel-arrows-opacity-hover,1)}`;let Xt=class extends it{constructor(){super(),this.index=0,this.total=0,this.sliderWidth="auto",this.sliderTranslateX="0",this.inner=!1,this.arrows=!1,this.options={perView:1,perMove:1,gap:12,slideshow:0,rewind:!0,center:!1},this.breakpoints={768:{perView:2,gap:24,rewind:!1},1280:{perView:2.5,center:!0}},this.slides=[],this.links=[],this.addEventListener("kemet-carousel-first",this.handleFirst.bind(this)),this.addEventListener("kemet-carousel-last",this.handleLast.bind(this)),this.addEventListener("kemet-carousel-next",this.handleNext.bind(this)),this.addEventListener("kemet-carousel-prev",this.handlePrev.bind(this)),this.addEventListener("kemet-carousel-link",this.handleLink.bind(this))}firstUpdated(){var t;this.toolbarSlotElement=this.querySelector('[slot="toolbar"]'),this.informationElement=this.querySelector("kemet-carousel-information"),window.addEventListener("resize",(()=>{this.setSlideSize(),this.setToolbarSize(),this.updateIndex(this.index)})),null===(t=this.sliderElement)||void 0===t||t.addEventListener("transitionend",this.handleTransitionEnd.bind(this)),this.swipeMove=t=>{t.preventDefault();const e=t.touches?t.touches[0].pageX:t.pageX,o=this.slides[this.index];this.sliderTranslateX=e-this.startX-o.offsetLeft+"px"},this.handleSlideShow=()=>{this.getOption("slideshow")>0&&(this.updateIndex(this.index+1),clearTimeout(this.handleSlideShow))},this.setSlideSize(),this.goToSlide(this.index)}updated(t){this.setSlideSize(),this.setToolbarSize(),t.has("index")&&(this.updateIndex(this.index),setTimeout(this.handleSlideShow,1e3*this.getOption("slideshow")))}render(){return N`<slot name="prev" @slotchange="${this.handleArrows}"></slot><div id="container" class="container" part="container"><section id="slides" class="slides" part="slides" @mousedown="${this.swipeStart}" @mouseup="${this.swipeEnd}" @touchstart="${this.swipeStart}" @touchend="${this.swipeEnd}" @mouseleave="${this.swipeLeave}"><div id="slider" class="slider" part="slider" style="width:${this.sliderWidth};transform:translateX(${this.sliderTranslateX})"><slot name="slides" @slotchange="${this.handleSlotChange}"></slot></div></section>${this.makeToolbar()}</div><slot name="next" @slotchange="${this.handleArrows}"></slot>`}swipeStart(t){this.startX=t.touches?t.touches[0].pageX:t.pageX,this.addEventListener("mousemove",this.swipeMove),this.addEventListener("touchmove",this.swipeMove)}swipeEnd(t){this.updateIndex(this.swipeUpdate(t)),this.removeEventListener("mousemove",this.swipeMove,!1),this.removeEventListener("touchmove",this.swipeMove,!1)}swipeUpdate(t){const e=t.changedTouches?t.changedTouches[0].pageX:t.pageX,o=this.startX>e?"right":"left",i=this.slidesElement.offsetWidth/3,s=this.startX-e,r=Math.abs(s)>i;let{index:n}=this;return r&&"right"===o&&(n=this.index>=this.slides.length-1?this.index:this.index+1),r&&"left"===o&&(n=this.index<1?0:this.index-1),n}swipeLeave(){this.updateIndex(this.index),this.removeEventListener("mousemove",this.swipeMove,!1),this.removeEventListener("touchmove",this.swipeMove,!1)}setSlideSize(){var t;this.slideWidth=(null===(t=this.containerElement)||void 0===t?void 0:t.offsetWidth)/this.getOption("perView"),this.slides.forEach((t=>{t.style.marginLeft=this.getOption("gap")/2+"px",t.style.marginRight=this.getOption("gap")/2+"px",t.style.width=this.slideWidth-this.getOption("gap")+"px"})),this.sliderWidth=this.slideWidth*this.slides.length+"px"}setToolbarSize(){if(this.inner&&this.toolbarElement){const t=this.slidesElement.offsetWidth;this.toolbarElement.style.width=`${t}px`}}makeToolbar(){return this.toolbarSlotElement?N`<section id="toolbar" class="toolbar" part="toolbar"><slot name="toolbar"></slot></section>`:null}handleSlotChange(){const t=this.querySelectorAll("kemet-carousel-slide"),e=this.querySelectorAll("kemet-carousel-link");t.forEach((t=>{this.slides.push(t)})),this.updateInformation(),this.total=t.length,t[this.index].selected=!0,e.forEach((t=>{this.links.push(t)}))}handleArrows(){this.arrows=!0}handleFirst(){this.updateIndex(0)}handleLast(){this.updateIndex(this.slides.length-1)}handleNext(){let t=this.index+this.getOption("perMove");t>=this.slides.length&&(t=this.getOption("rewind")?0:this.index),this.updateIndex(t)}handlePrev(){let t=this.index-this.getOption("perMove");t<0&&(t=this.getOption("rewind")?this.slides.length-1:this.index),this.updateIndex(t)}updateIndex(t){let e=this.slides[this.index],o=this.links[t];this.links.forEach((t=>{t.selected=!1})),o||([o]=this.links),o&&(o.selected=!0),e&&(e.setAttribute("aria-hidden","true"),t>-1&&t<this.slides.length?this.index=t:(console.warn("An invalid index number was entered. The kemet-carousel has been reset to the first slide."),this.index=0),this.goToSlide(this.index),e=this.slides[this.index],e.setAttribute("aria-hidden","false"),this.slides.forEach((t=>{t.selected=!1})),e.selected=!0,pt(this,"kemet-carousel-change-start",this),this.updateInformation())}updateInformation(){this.informationSlot=this.slides[this.index].querySelector('[slot="information"]'),this.informationElement&&(this.informationSlot?this.informationElement.innerHTML=this.informationSlot.outerHTML:this.informationElement.innerHTML="")}goToSlide(t){if(!0===this.getOption("center")){const e=this.slidesElement.offsetWidth/2,o=this.slideWidth*t;this.sliderTranslateX=o-(o-e)-this.slideWidth/2-o+"px"}else this.sliderTranslateX=this.slideWidth*t*-1+"px"}handleTransitionEnd(){const t=this.querySelector("kemet-carousel-current");t&&(t.current=this.index+1),pt(this,"kemet-carousel-change-finished",this)}handleLink(t){this.updateIndex(t.detail.slide)}getOption(t){const e=Object.keys(this.breakpoints);let o=this.options[t];return e.forEach((e=>(window.matchMedia(`(min-width: ${e}px)`).matches&&void 0!==this.breakpoints[e][t]&&(o=this.breakpoints[e][t]),o))),o}};Xt.styles=[qt],t([at({type:Number,reflect:!0})],Xt.prototype,"index",void 0),t([at({type:Number})],Xt.prototype,"total",void 0),t([at({type:String})],Xt.prototype,"sliderWidth",void 0),t([at({type:String})],Xt.prototype,"sliderTranslateX",void 0),t([at({type:Boolean,reflect:!0})],Xt.prototype,"inner",void 0),t([at({type:Boolean,reflect:!0})],Xt.prototype,"arrows",void 0),t([at({type:Object})],Xt.prototype,"options",void 0),t([at({type:Object})],Xt.prototype,"breakpoints",void 0),t([lt()],Xt.prototype,"slides",void 0),t([lt()],Xt.prototype,"links",void 0),t([lt()],Xt.prototype,"toolbarSlotElement",void 0),t([lt()],Xt.prototype,"informationElement",void 0),t([lt()],Xt.prototype,"swipeMove",void 0),t([lt()],Xt.prototype,"handleSlideShow",void 0),t([lt()],Xt.prototype,"startX",void 0),t([lt()],Xt.prototype,"slideWidth",void 0),t([lt()],Xt.prototype,"informationSlot",void 0),t([ct("#container")],Xt.prototype,"containerElement",void 0),t([ct("#slides")],Xt.prototype,"slidesElement",void 0),t([ct("#slider")],Xt.prototype,"sliderElement",void 0),t([ct("#toolbar")],Xt.prototype,"toolbarElement",void 0),Xt=t([rt("kemet-carousel")],Xt);
60
+ var ht;null===(ht=window.HTMLSlotElement)||void 0===ht||ht.prototype.assignedElements;const pt=a`:host{display:block}`,ut=a`*,::after,::before{box-sizing:border-box}:host{display:block;padding:1.5rem 1rem;border-bottom:1px solid var(--kemet-color-background)}.trigger{color:inherit;cursor:pointer;display:grid;gap:1rem;grid-template-columns:1fr auto;width:100%;text-align:left;padding:0;border:none;background:0 0}.body{overflow:hidden;transition:all var(--kemet-accordion-panel-transition-speed,300ms) ease}::slotted([slot=body]){padding:1rem 0}`;let ft=class extends it{constructor(){super(),this.togglePanels=!1,this.addEventListener("kemet-accordion-panel-opened",this.handlePanelOpened.bind(this))}firstUpdated(){this.onKeyDown=t=>this.handleKeyDown(t)}render(){return U`<slot @slotchange="${()=>this.handleSlotChange()}"></slot>`}handleSlotChange(){this.panels=this.querySelectorAll("kemet-accordion-panel"),this.panels.forEach((t=>{t.removeEventListener("keydown",this.onKeyDown),t.addEventListener("keydown",this.onKeyDown)}))}handlePanelOpened(t){this.togglePanels&&this.panels.forEach((e=>{e!==t.detail&&(e.opened=!1)}))}navigatePanels(t){switch(t){case"home":this.currentPanel=0;break;case"end":this.currentPanel=this.panels.length-1;break;case"next":this.currentPanel+=1;break;case"prev":this.currentPanel-=1;break;default:this.currentPanelFocus=0}this.currentPanel>this.panels.length-1&&(this.currentPanel=0),this.currentPanel<0&&(this.currentPanel=this.panels.length-1),this.panels[this.currentPanel].shadowRoot.querySelector("button").focus()}handleKeyDown(t){switch(t.key){case"Enter":case"Space":t.preventDefault(),t.target.click();break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.navigatePanels("prev");break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.navigatePanels("next");break;case"End":t.preventDefault(),this.navigatePanels("end");break;case"Home":t.preventDefault(),this.navigatePanels("home")}}expandAll(){this.panels.forEach((t=>{t.opened=!0}))}collapseAll(){this.panels.forEach((t=>{t.opened=!1}))}};ft.styles=[pt],t([at({type:Number})],ft.prototype,"currentPanel",void 0),t([at({type:Boolean,attribute:"toggle-panels "})],ft.prototype,"togglePanels",void 0),t([lt()],ft.prototype,"panels",void 0),t([lt()],ft.prototype,"onKeyDown",void 0),t([lt()],ft.prototype,"currentPanelFocus",void 0),ft=t([rt("kemet-accordion")],ft);const mt=a`*,::after,::before{box-sizing:border-box}:host{display:inline-flex;color:var(--kemet-avatar-color,var(--kemet-color-white));position:relative;background-color:var(--kemet-avatar-background-color,var(--kemet-color-gray4))}:host([circle]){border-radius:50%}:host([circle])>*{border-radius:50%}:host([rounded]){border-radius:var(--kemet-avatar-rounded-radius,1rem)}:host([rounded])>*{border-radius:var(--kemet-avatar-rounded-radius,1rem)}.initials{margin:var(--kemet-avatar-initials-margin,1rem)}::slotted(kemet-badge){position:absolute;bottom:0;right:0;border-radius:50%}`,vt=a`*,::after,::before{box-sizing:border-box}:host{display:inline-flex}::slotted(kemet-avatar:not(:first-of-type)){margin-left:var(--kemet-avatars-squeeze,-1.5rem)}`;let gt=class extends it{firstUpdated(){this.makeSize()}render(){return U`${this.makeContent()}<slot name="status"></slot>`}makeSize(){this.size&&(this.style.width=`${this.size}px`,this.style.height=`${this.size}px`)}makeContent(){return this.image?U`<img src="${this.image}" alt="${this.label}">`:this.initials?U`<div part="initials" class="initials">${this.initials}</div>`:U`<slot></slot>`}};gt.styles=[mt],t([at({type:String})],gt.prototype,"size",void 0),t([at({type:String})],gt.prototype,"image",void 0),t([at({type:String})],gt.prototype,"label",void 0),t([at({type:String})],gt.prototype,"initials",void 0),t([at({type:Boolean,reflect:!0})],gt.prototype,"circle",void 0),t([at({type:Boolean,reflect:!0})],gt.prototype,"rounded",void 0),gt=t([rt("kemet-avatar")],gt);const yt=(t,e,o,i=!0,s=!0)=>{t.dispatchEvent(new CustomEvent(e,{bubbles:i,composed:s,detail:o}))},bt=a`:host{--kemet-alert-padding:1rem;--kemet-alert-border-thickness:4px;--kemet-alert-status-color:inherit;display:flex;grid-template-columns:auto 1fr auto;gap:var(--kemet-alert-gap,var(--kemet-alert-padding));align-items:var(--kemet-alert-align-items,center);opacity:0;padding:var(--kemet-alert-padding);border:var(--kemet-alert-border,1px solid var(--kemet-alert-status-color));transition:opacity .3s ease}:host([opened]){opacity:1}:host([border-status=top]){border-top:var(--kemet-alert-border-thickness) solid var(--kemet-alert-status-color)}:host([border-status=right]){border-right:var(--kemet-alert-border-thickness) solid var(--kemet-alert-status-color)}:host([border-status=bottom]){border-bottom:var(--kemet-alert-border-thickness) solid var(--kemet-alert-status-color)}:host([border-status=left]){border-left:var(--kemet-alert-border-thickness) solid var(--kemet-alert-status-color)}:host([status=standard]){--kemet-alert-status-color:var(--kemet-color-text)}:host([status=primary]){--kemet-alert-status-color:var(--kemet-color-primary)}:host([status=success]){--kemet-alert-status-color:var(--kemet-color-success)}:host([status=warning]){--kemet-alert-status-color:var(--kemet-color-warning)}:host([status=error]){--kemet-alert-status-color:var(--kemet-color-error)}:host([hidden]){display:none}:host([reveal]){animation:fadeIn .3s ease forwards}:host([overlay]){position:fixed}:host([overlay*=full]){width:100%}:host([overlay*=top]){top:0}:host([overlay*=bottom]){bottom:0}:host([overlay*=left]){left:0}:host([overlay*=right]){right:0}.close{cursor:pointer;margin-left:auto}::slotted(kemet-icon){color:var(--kemet-alert-status-color)}@keyframes fadeIn{from{opacity:0}to{opacity:1}}`;let kt=class extends it{shouldUpdate(t){return t.has("opened")&&!t.get("opened")&&(this.hidden=!1,this.reveal=!0),!0}firstUpdated(){this.handleMotion()}updated(t){t.get("opened")||!0!==this.opened?yt(this,"kemet-alert-closed",this):yt(this,"kemet-alert-opened",this)}render(){return U`<slot name="icon"></slot><div><slot></slot></div><div class="close" part="close">${this.makeCloseBtn()}</div>`}makeCloseBtn(){return this.closable?U`<kemet-icon icon="x-lg" @click="${()=>{this.opened=!1}}"></kemet-icon>`:null}handleMotion(){this.addEventListener("transitionend",(()=>{this.opened||(this.hidden=!0)})),this.addEventListener("animationend",(()=>{this.reveal=!1}))}};kt.styles=[bt],t([at({type:Boolean,reflect:!0})],kt.prototype,"opened",void 0),t([at({type:Boolean,reflect:!0})],kt.prototype,"reveal",void 0),t([at({type:Boolean,reflect:!0})],kt.prototype,"closable",void 0),t([at({type:String,reflect:!0})],kt.prototype,"status",void 0),t([at({type:String,reflect:!0,attribute:"border-status"})],kt.prototype,"borderStatus",void 0),t([at({type:Boolean,reflect:!0})],kt.prototype,"hidden",void 0),t([at({type:String,reflect:!0})],kt.prototype,"overlay",void 0),kt=t([rt("kemet-alert")],kt);let xt=class extends it{constructor(){super(...arguments),this.opened=void 0,this.maxHeight="0px",this.slug="panel"}firstUpdated(){var t,e;this.focusableSelector="body, a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",this.bodyElement=this.querySelector('[slot="body"]'),this.bodyElementFirst=null===(t=this.bodyElement)||void 0===t?void 0:t.querySelector(":first-child"),this.bodyElementLast=null===(e=this.bodyElement)||void 0===e?void 0:e.querySelector(":last-child"),this.bodyElementFirst&&(this.bodyElementFirst.style.marginTop="0"),this.bodyElementLast&&(this.bodyElementLast.style.marginBottom="0")}updated(t){var e;t.get("opened")||!0!==this.opened||(this.maxHeight=`${null===(e=this.bodyElement)||void 0===e?void 0:e.offsetHeight}px`,yt(this,"kemet-accordion-panel-opened",this)),t.get("opened")&&!1===this.opened&&(this.maxHeight="0px",yt(this,"kemet-accordion-panel-closed",this)),this.a11y(),this.focusableBodyElements()}render(){return U`<button class="trigger" part="trigger" @click="${()=>this.toggle()}" @keydown="${t=>this.handleKeyDown(t)}"><slot name="trigger"></slot><slot name="icon"></slot></button><section class="body" part="body" style="max-height:${this.maxHeight}"><slot name="body"></slot></section>`}toggle(){this.opened=!this.opened}focusableBodyElements(){var t;const e=null===(t=this.bodyElement)||void 0===t?void 0:t.querySelectorAll(this.focusableSelector);this.opened?null==e||e.forEach((t=>{t.removeAttribute("tabindex")})):null==e||e.forEach((t=>{t.setAttribute("tabindex","-1")}))}a11y(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".trigger"),i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".body");null==o||o.setAttribute("id",`${this.slug}-button`),null==o||o.setAttribute("aria-controls",`${this.slug}-content`),null==i||i.setAttribute("id",`${this.slug}-content`),null==i||i.setAttribute("aria-labelledby",`${this.slug}-button`),null==i||i.setAttribute("aria-hidden",`${!this.opened}`)}handleKeyDown(t){"Space"!==t.key&&"Enter"!==t.key||this.toggle()}};xt.styles=[ut],t([at({type:Boolean,reflect:!0})],xt.prototype,"opened",void 0),t([at({type:String,attribute:"max-height"})],xt.prototype,"maxHeight",void 0),t([at({type:String})],xt.prototype,"slug",void 0),t([lt()],xt.prototype,"focusableSelector",void 0),t([lt()],xt.prototype,"bodyElement",void 0),t([lt()],xt.prototype,"bodyElementFirst",void 0),t([lt()],xt.prototype,"bodyElementLast",void 0),xt=t([rt("kemet-accordion-panel")],xt);const wt=a`:host{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:var(--kemet-button-font-size,inherit);color:var(--kemet-button-color,var(--kemet-color-foreground));width:var(--kemet-button-width,auto);height:var(--kemet-button-height,auto);border:var(--kemet-button-border,0);border-radius:var(--kemet-button-border-radius,0);transition:filter var(--kemet-button-transition-speed,300ms) ease;background-color:var(--kemet-button-background-color,var(--kemet-color-background))}:host(:hover:not([disabled])){filter:brightness(var(--kemet-button-hover-brightness, 1.25))}:host([disabled]){opacity:var(--kemet-button-disabled-opacity,.5)}.button{cursor:pointer;text-decoration:none;display:flex;gap:var(--kemet-button-gap,.5rem);align-items:center;color:inherit;font-size:inherit;width:100%;padding:var(--kemet-button-padding,1rem 1.25rem);border:0;background:0 0}:host([disabled]) .button{cursor:not-allowed}:host([type=text]){--kemet-button-color:var(--kemet-color-text);--kemet-button-background-color:none}:host([type=text]:hover){text-decoration:var(--kemet-button-hover-decoration,underline)}:host([type=circle]){--kemet-button-border-radius:50%;--kemet-button-width:var(--kemet-button-circle-size, 50px);--kemet-button-height:var(--kemet-button-circle-size, 50px)}:host([type=rounded]){--kemet-button-border-radius:var(--kemet-button-rounded-amount, 6px)}:host([type=pill]){--kemet-button-border-radius:10rem}:host([outlined]){--kemet-button-color:var(--kemet-color-background);--kemet-button-background-color:transparent;--kemet-button-border:var(--kemet-button-border-width, 1px) var(--kemet-button-border-style, solid) var(--kemet-button-border-color, var(--kemet-color-background))}`;class $t{constructor(t,e=undefined){(this.host=t).addController(this),this.options={form:t=>t.closest("form"),name:t=>t.name,value:t=>t.value,disabled:t=>t.disabled,checkValidity:t=>"function"!=typeof t.checkValidity||t.checkValidity(),...e},this.handleFormData=this.handleFormData.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this)}hostConnected(){this.form=this.options.form(this.host),this.form&&(this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit))}hostDisconnected(){this.form&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form=void 0)}handleFormData(t){var e;const o=this.options.disabled(this.host),i=this.options.name(this.host),s=this.options.value(this.host);o||"string"!=typeof i||void 0===s||(Array.isArray(s)?s.forEach((e=>{var o;null===(o=t.formData)||void 0===o||o.append(i,e.toString())})):null===(e=t.formData)||void 0===e||e.append(i,s.toString()))}handleFormSubmit(t){const e=this.options.disabled(this.host),o=this.options.checkValidity;if(this.form=this.options.form(this.host),this.form&&!this.form.noValidate&&!e&&!o(this.host)){t.preventDefault(),t.stopImmediatePropagation();this.form.querySelectorAll("kemet-input, kemet-textarea, kemet-select, kemet-checkbox, kemet-radios").forEach((t=>{t.checkValidity(),t.checkValidity()||(t.status="error",t.invalid=!0,t.dispatchEvent(new CustomEvent("kemet-input-status",{bubbles:!0,composed:!0,detail:{status:"error",validity:t.validity?t.validity:{},element:t}}))),t.checkLimitValidity&&!t.checkLimitValidity()&&(t.status="error",t.invalid=!0,t.dispatchEvent(new CustomEvent("kemet-input-status",{bubbles:!0,composed:!0,detail:{status:"error",validity:{passedLimit:!0},element:t}})))}))}}submit(){const t=document.createElement("button");this.form&&(t.type="submit",t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.clip="rect(0 0 0 0)",t.style.clipPath="inset(50%)",t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.form.append(t),t.click(),t.remove())}}const St=a`:host{display:inline-flex;align-items:center;justify-content:center}`;let Et=class extends it{constructor(){super(...arguments),this.icon="alarm",this.set="bootstrap",this.size=16}updated(){this.getIcon(),this.style.width=`${this.size}px`,this.style.height=`${this.size}px`}render(){return U``}async getIcon(){var t,e,o;const i=new DOMParser;let s;try{if(s=await fetch(`${this.getUrl()}/${this.icon}.svg`).then((t=>t.text())),s.indexOf("</svg>")<0)throw new Error("Not a valid svg.")}catch(t){s="",console.error(t)}const r=i.parseFromString(s,"image/svg+xml").documentElement,n=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("svg");if("svg"===r.tagName)r.setAttribute("id",this.icon),r.setAttribute("width",`${this.size}px`),r.setAttribute("height",`${this.size}px`),r.setAttribute("fill","currentColor"),n&&n.remove(),null===(e=this.shadowRoot)||void 0===e||e.appendChild(r);else{console.error(`Could not find icon "${this.icon}" in set "${this.set}"`);const t=`\n <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="kemet-error" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" xml:space="preserve" width="${this.size}" height="${this.size}">\n <style type="text/css">\n .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}\n .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#EC1C24;}\n </style>\n <g>\n <path class="st0" d="M256,0c70.7,0,134.7,28.7,181,75c46.3,46.3,75,110.3,75,181c0,70.7-28.7,134.7-75,181 c-46.3,46.3-110.3,75-181,75c-70.7,0-134.7-28.7-181-75C28.7,390.7,0,326.7,0,256c0-70.7,28.7-134.7,75-181S185.3,0,256,0z"/>\n <path class="st1" d="M512,256c0-70.7-28.7-134.7-75-181C390.7,28.7,326.7,0,256,0C193,0,135.5,22.8,90.9,60.6l-0.1-0.1 C85.3,65.1,80,69.9,75,75c-5,5.1-9.9,10.3-14.5,15.8l0.1,0.1C22.8,135.5,0,193,0,256c0,70.7,28.7,134.7,75,181 c46.3,46.3,110.3,75,181,75c63,0,120.5-22.8,165.1-60.6l0.1,0.1c5.4-4.6,10.7-9.5,15.8-14.5c5-5,9.9-10.3,14.5-15.8l-0.1-0.1 C489.2,376.6,512,319,512,256z M256,42.9c58.9,0,112.1,23.9,150.7,62.4c38.6,38.6,62.4,91.9,62.4,150.7c0,51.1-18.1,98-48.1,134.8 L121.2,90.9C158,60.9,204.9,42.9,256,42.9z M256,469.1c-58.8,0-112.1-23.9-150.7-62.4C66.7,368.1,42.9,314.9,42.9,256 c0-51.1,18.1-98,48.1-134.8l299.8,299.8C354,451.1,307.1,469.1,256,469.1z"/>\n </g>\n </svg>\n `,e=i.parseFromString(t,"image/svg+xml").documentElement;n&&n.remove(),null===(o=this.shadowRoot)||void 0===o||o.appendChild(e)}}getUrl(){let t;switch(this.set){case"bootstrap":default:t="https://unpkg.com/bootstrap-icons@latest/icons";break;case"font-awesome-brands":t="https://unpkg.com/@fortawesome/fontawesome-free@latest/svgs/brands";break;case"font-awesome-regular":t="https://unpkg.com/@fortawesome/fontawesome-free@latest/svgs/regular";break;case"font-awesome-solid":t="https://unpkg.com/@fortawesome/fontawesome-free@latest/svgs/solid"}return t}};Et.styles=[St],t([at({type:String})],Et.prototype,"icon",void 0),t([at({type:String})],Et.prototype,"set",void 0),t([at({type:Number})],Et.prototype,"size",void 0),Et=t([rt("kemet-icon")],Et);let _t=class extends it{constructor(){super(),this.outlined=!1,this.disabled=!1,this.type="standard",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("mouseover",this.handleMouseOver.bind(this)),this.addEventListener("mouseout",this.handleMouseOut.bind(this)),this.addEventListener("blur",this.handleBlur.bind(this)),this.addEventListener("keyup",(t=>this.handleKeyUp(t))),this.formSubmitController=new $t(this)}render(){return this.link&&!this.disabled?U`<a href="${this.link}" class="button" role="button" part="button"><slot name="left"></slot><slot></slot><slot name="right"></slot></a>`:U`<button class="button" part="button" ?disabled="${this.disabled}" aria-disabled="${this.disabled?"true":"false"}"><slot name="left"></slot><slot></slot><slot name="right"></slot></button>`}handleMouseOver(){this.hover=!0}handleMouseOut(){this.hover=!1}handleClick(){this.hover=!1,this.active=!0,setTimeout((()=>{this.active=!1}),300),this.shadowRoot.querySelector("button")&&this.formSubmitController.submit()}handleBlur(){this.focused=!1,this.active=!1,this.hover=!1}handleKeyUp(t){"Tab"===t.key&&(this.focused=!0)}};_t.styles=[wt],t([at({type:Boolean,reflect:!0})],_t.prototype,"active",void 0),t([at({type:Boolean,reflect:!0})],_t.prototype,"hover",void 0),t([at({type:Boolean,reflect:!0})],_t.prototype,"focused",void 0),t([at({type:String})],_t.prototype,"link",void 0),t([at({type:Boolean,reflect:!0})],_t.prototype,"outlined",void 0),t([at({type:Boolean,reflect:!0})],_t.prototype,"disabled",void 0),t([at({type:String,reflect:!0})],_t.prototype,"type",void 0),_t=t([rt("kemet-button")],_t);
61
61
  /**
62
62
  * @license
63
63
  * Copyright 2018 Google LLC
64
64
  * SPDX-License-Identifier: BSD-3-Clause
65
65
  */
66
- const jt=t=>null!=t?t:q
66
+ const At=t=>null!=t?t:X
67
67
  /**
68
68
  * @license
69
69
  * Copyright 2017 Google LLC
70
70
  * SPDX-License-Identifier: BSD-3-Clause
71
- */,Rt=1,Ht=2,Vt=3,Yt=4,Ft=t=>(...e)=>({_$litDirective$:t,values:e});class Wt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
71
+ */,Ct=1,Ot=2,zt=3,Lt=4,Bt=t=>(...e)=>({_$litDirective$:t,values:e});class It{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
72
72
  /**
73
73
  * @license
74
74
  * Copyright 2020 Google LLC
75
75
  * SPDX-License-Identifier: BSD-3-Clause
76
- */const Kt={},Jt=Ft(class extends Wt{constructor(t){if(super(t),t.type!==Vt&&t.type!==Rt&&t.type!==Yt)throw Error("The `live` directive is not allowed on child or event bindings");if(!(t=>void 0===t.strings)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===U||e===q)return e;const o=t.element,i=t.name;if(t.type===Vt){if(e===o[i])return U}else if(t.type===Yt){if(!!e===o.hasAttribute(i))return U}else if(t.type===Rt&&o.getAttribute(i)===e+"")return U;return((t,e=Kt)=>{t._$AH=e;
76
+ */const Dt={},Pt=Bt(class extends It{constructor(t){if(super(t),t.type!==zt&&t.type!==Ct&&t.type!==Lt)throw Error("The `live` directive is not allowed on child or event bindings");if(!(t=>void 0===t.strings)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===N||e===X)return e;const o=t.element,i=t.name;if(t.type===zt){if(e===o[i])return N}else if(t.type===Lt){if(!!e===o.hasAttribute(i))return N}else if(t.type===Ct&&o.getAttribute(i)===e+"")return N;return((t,e=Dt)=>{t._$AH=e;
77
77
  /**
78
78
  * @license
79
79
  * Copyright 2020 Google LLC
80
80
  * SPDX-License-Identifier: BSD-3-Clause
81
- */})(t),e}}),Zt=a`*,::after,::before{box-sizing:border-box}:host{display:inline-block}:host([disabled]){opacity:.5}label{display:inline-flex;gap:.5rem;align-items:center}input{cursor:pointer;margin:0;padding:0;width:var(--kemet-checkbox-size,18px);height:var(--kemet-checkbox-size,18px);position:absolute;opacity:0}button{margin:0;border:none;background:0 0}[part=checkbox]{color:var(--kemet-checkbox-color,var(--kemet-color-background));display:flex;align-items:center;justify-content:center;width:var(--kemet-checkbox-size,18px);height:var(--kemet-checkbox-size,18px);border:var(--kemet-checkbox-border,1px solid var(--kemet-color-background))}:host([rounded]) [part=checkbox]{border-radius:var(--kemet-checkbox-border-radius,4px)}:host([filled][checked]) [part=checkbox],:host([filled][indeterminate]) [part=checkbox]{border:none;background-color:var(--kemet-checkbox-filled-background-color,var(--kemet-color-primary))}[part=mark]{display:flex;width:calc(var(--kemet-checkbox-size,18px) - 4px);height:calc(var(--kemet-checkbox-size,18px) - 4px)}:host([filled][checked]) [part=mark],:host([filled][indeterminate]) [part=mark]{color:var(--kemet-checkbox-filled-color,var(--kemet-color-white))}[part=message]{display:block;margin-top:.5rem}:host([status=error]) [part=message]{color:var(--kemet-color-error)}:host([status=warning]) [part=message]{color:var(--kemet-color-error)}`;let Gt=class extends it{constructor(){super(),this.label="",this.name="checkbox",this.disabled=!1,this.required=!1,this.rounded=!1,this.filled=!1,this.status="standard",this.formSubmitController=new _t(this)}render(){return N`<label part="label"><input type="checkbox" name="${jt(this.name)}" .value="${this.value}" .indeterminate="${Jt(this.indeterminate)}" .checked="${Jt(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" @click="${()=>this.handleClick()}" @blur="${()=>this.handleBlur()}" @focus="${()=>this.handleFocus()}" @change="${()=>this.handleChange()}"> <button part="checkbox" aria-label="${this.label}">${this.makeCheckMark()}</button> <span part="text">${this.label}</span></label> ${this.makeMessage()}`}click(){this.input.click()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,pt(this,"kemet-checkbox-change",this)}handleBlur(){this.focused=!1,pt(this,"kemet-checkbox-focused",!1)}handleFocus(){this.focused=!0,pt(this,"kemet-checkbox-focused",!0)}handleChange(){this.value=this.checked,this.input.checkValidity()&&(this.status="standard")}makeMessage(){return"error"===this.status||"warning"===this.status?N`<span part="message">${this.message}</span>`:null}makeCheckMark(){return this.checked?N`<span part="mark"><svg viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round"><g stroke="currentColor" stroke-width="2"><g transform="translate(3.428571, 3.428571)"><path d="M0,5.71428571 L3.42857143,9.14285714"></path><path d="M9.14285714,0 L3.42857143,9.14285714"></path></g></g></g></svg></span>`:!this.checked&&this.indeterminate?N`<span part="mark"><svg viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round"><g stroke="currentColor" stroke-width="2"><g transform="translate(2.285714, 6.857143)"><path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path></g></g></g></svg></span>`:null}checkValidity(){return this.input.checkValidity()}};Gt.styles=[Zt],t([at({type:String})],Gt.prototype,"label",void 0),t([at({type:Boolean,reflect:!0})],Gt.prototype,"checked",void 0),t([at({type:Boolean,reflect:!0})],Gt.prototype,"indeterminate",void 0),t([at({type:String})],Gt.prototype,"name",void 0),t([at({type:String})],Gt.prototype,"value",void 0),t([at({type:Boolean,reflect:!0})],Gt.prototype,"disabled",void 0),t([at({type:Boolean,reflect:!0})],Gt.prototype,"required",void 0),t([at({type:Boolean,reflect:!0})],Gt.prototype,"focused",void 0),t([at({type:Boolean,reflect:!0})],Gt.prototype,"rounded",void 0),t([at({type:Boolean,reflect:!0})],Gt.prototype,"filled",void 0),t([at({type:String,reflect:!0})],Gt.prototype,"status",void 0),t([at({type:String})],Gt.prototype,"message",void 0),t([ct("input")],Gt.prototype,"input",void 0),Gt=t([rt("kemet-checkbox")],Gt);const Qt=a`:host{opacity:0;width:var(--kemet-combo-width,calc(100% - 2px));margin:var(--kemet-combo-margin,1rem auto);pointer-events:none;display:block;position:relative;transition:opacity .3s ease-in-out}:host([show]){opacity:1;pointer-events:auto}ul{width:100%;max-height:var(--kemet-combo-max-height,calc(5 * 3rem));position:absolute;z-index:1;list-style:none;margin:0;padding:0;overflow-y:scroll;border:var(--kemet-combo-border,1px solid var(--kemet-color-background));border-radius:var(--kemet-combo-border-radius,var(--kemet-border-radius));background-color:var(--kemet-combo-background-color,var(--kemet-color-white-to-black));box-shadow:var(--kemet-combo-shadow,var(--kemet-elevation-layer5))}li{line-height:3rem;padding:0 1.5rem;cursor:pointer}li:focus,li:hover{color:var(--kemet-combo-hover-color,var(--kemet-color-white));outline:0;background-color:var(--kemet-combo-hover-background-color,var(--kemet-color-primary))}`;let te=class extends it{constructor(){super(...arguments),this.options=[]}firstUpdated(){this.field=this.closest("kemet-field"),this.input=this.field.querySelector('[slot="input"]'),this.slug=this.field.slug||"slug",this.input.addEventListener("kemet-input-input",this.handleInput.bind(this)),this.input.addEventListener("keydown",(t=>this.handleInputKeyDown(t)))}render(){var t;return N`<div role="combobox" part="combobox" aria-expanded="${this.show}" aria-controls="${this.slug}-listbox" aria-haspopup="listbox" id="${this.slug}-combobox" aria-label="${null===(t=this.field)||void 0===t?void 0:t.label}"><ul role="listbox" aria-labelledby="${this.slug}-label" id="${this.slug}-listbox" part="listbox">${this.makeOptions()}</ul></div>`}makeOptions(){if(this.input){this.filteredOptions=this.options.filter((t=>{var e;return-1!==t.toLowerCase().indexOf(null===(e=this.input.value)||void 0===e?void 0:e.toLowerCase())}));return this.filteredOptions.map(((t,e)=>N`<li id="${this.slug}-option-${e}" role="option" tabindex="0" aria-selected="false" @click="${t=>this.handleSelection(t)}" @keydown="${t=>this.handleOptionKeyDown(t)}">${t}</li>`))}return null}handleInput(t){this.makeOptions(),t.detail.length>0?this.show=!0:this.show=!1}handleSelection(t){this.input.value=t.target.innerText,this.show=!1,pt(this,"kemet-combo-section",{element:t.target,text:t.target.innerText,id:t.target.getAttribute("id")})}handleOptionKeyDown(t){if(t.preventDefault(),"ArrowDown"===t.code){const e=t.target.nextElementSibling;e?e.focus():this.shadowRoot.querySelector("li").focus()}if("ArrowUp"===t.code){const e=t.target.previousElementSibling,o=this.shadowRoot.querySelector("li:last-child");e?e.focus():o.focus()}"Escape"!==t.code&&"Tab"!==t.code||(this.show=!1,this.input.focus()),"Enter"!==t.code&&"Space"!==t.code||this.handleSelection(t)}handleInputKeyDown(t){"ArrowDown"===t.code&&this.shadowRoot.querySelector("li").focus(),"Escape"===t.code&&(this.show=!1)}};te.styles=[Qt],t([at({type:String})],te.prototype,"slug",void 0),t([at({type:Array})],te.prototype,"options",void 0),t([at({type:Boolean,reflect:!0})],te.prototype,"show",void 0),t([lt()],te.prototype,"filteredOptions",void 0),t([lt()],te.prototype,"field",void 0),t([lt()],te.prototype,"input",void 0),te=t([rt("kemet-combo")],te);let ee=class extends it{firstUpdated(){this.field=this.closest("kemet-field"),this.inputSlot=this.field.querySelector('[slot="input"]'),this.remaining=this.limit-this.field.length,this.field.addEventListener("kemet-field-input",(t=>{this.remaining=this.limit-t.detail;const e=this.input||this.textarea;e&&(this.remaining<0?this.validateImmediately&&(this.inputSlot.status="error",this.inputSlot.invalid=!0,pt(this,"kemet-count-status",{status:"error",validity:e.validity,element:this.inputSlot})):(this.inputSlot.status="standard",e.checkValidity(),pt(this,"kemet-count-status",{status:"standard",validity:e.validity,element:this.inputSlot})))})),this.input=this.inputSlot.shadowRoot.querySelector("input"),this.textarea=this.inputSlot.shadowRoot.querySelector("textarea")}render(){return N`${this.remaining} ${this.message}`}};ee.styles=[a`:host{display:block;font-size:var(--kemet-count-font-size,90%);margin-top:.8rem}`],t([at({type:String})],ee.prototype,"message",void 0),t([at({type:Number})],ee.prototype,"remaining",void 0),t([at({type:Number})],ee.prototype,"limit",void 0),t([at({type:Boolean,attribute:"validate-immediately"})],ee.prototype,"validateImmediately",void 0),t([lt()],ee.prototype,"field",void 0),t([lt()],ee.prototype,"inputSlot",void 0),t([lt()],ee.prototype,"input",void 0),t([lt()],ee.prototype,"textarea",void 0),ee=t([rt("kemet-count")],ee);let oe=class extends it{constructor(){super(...arguments),this.top="auto",this.left="auto",this.measure=!1}firstUpdated(){this.position1=0,this.position2=0,this.position3=0,this.position4=0,this.mouseMove=t=>this.drag(t),this.mouseUp=()=>this.stopDrag();const t=JSON.parse(localStorage.getItem(this.memory));t&&(this.top=t.top,this.left=t.left),this.measure&&this.measureContent()}render(){return N`<div id="draggable" @mousedown="${t=>this.startDrag(t)}" style="top:${this.top};left:${this.left}"><slot></slot></div>`}startDrag(t){t&&(t.preventDefault(),this.position3=t.clientX,this.position4=t.clientY),document.addEventListener("mouseup",this.mouseUp),document.addEventListener("mousemove",this.mouseMove),pt(this,"kemet-draggable-start",this)}drag(t){var e,o;t.preventDefault(),this.position1=this.position3-t.clientX,this.position2=this.position4-t.clientY,this.position3=t.clientX,this.position4=t.clientY,this.top=(null===(e=this.draggableElement)||void 0===e?void 0:e.offsetTop)-this.position2+"px",this.left=(null===(o=this.draggableElement)||void 0===o?void 0:o.offsetLeft)-this.position1+"px"}stopDrag(){if(document.removeEventListener("mouseup",this.mouseUp),document.removeEventListener("mousemove",this.mouseMove),this.memory){const t={top:this.top,left:this.left};localStorage.setItem(this.memory,JSON.stringify(t))}pt(this,"kemet-draggable-stop",this)}measureContent(){var t,e;this.style.width=`${null===(t=this.draggableElement)||void 0===t?void 0:t.offsetWidth}px`,this.style.height=`${null===(e=this.draggableElement)||void 0===e?void 0:e.offsetHeight}px`}};oe.styles=[a`:host{display:inline-block}#draggable{position:absolute}`],t([at({type:String})],oe.prototype,"memory",void 0),t([at({type:String})],oe.prototype,"top",void 0),t([at({type:String})],oe.prototype,"left",void 0),t([at({type:Boolean})],oe.prototype,"measure",void 0),t([lt()],oe.prototype,"position1",void 0),t([lt()],oe.prototype,"position2",void 0),t([lt()],oe.prototype,"position3",void 0),t([lt()],oe.prototype,"position4",void 0),t([lt()],oe.prototype,"mouseMove",void 0),t([lt()],oe.prototype,"mouseUp",void 0),t([ct("#draggable")],oe.prototype,"draggableElement",void 0),oe=t([rt("kemet-draggable")],oe);const ie=a`:host{--kemet-fab-size:50px;display:inline-block;position:relative}button{color:var(--kemet-fab-color,var(--kemet-color-white));font-size:inherit;display:inline-flex;padding:0;position:relative;min-height:var(--kemet-fab-size);min-width:var(--kemet-fab-size);max-width:var(--kemet-fab-size);align-items:center;justify-content:flex-start;transition:all .4s ease;border:none;background-color:var(--kemet-fab-background-color,var(--kemet-color-primary))}:host([outlined]) button{color:var(--kemet-fab-outlined-color,var(--kemet-color-background));border:var(--kemet-fab-outlined-border,1px solid var(--kemet-color-background));background-color:transparent}:host([pill]) button{border-radius:var(--kemet-fab-pill-radius,10rem)}button::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;width:100%;height:100%;transition:background-color .3s ease-in-out;background-color:var(--kemet-fab-background-color,var(--kemet-color-primary))}:host([pill]) button::before{border-radius:var(--kemet-fab-pill-radius,10rem)}:host([outlined]) button::before{border:var(--kemet-fab-outline-border,1px solid var(--kemet-color-primary));background-color:transparent}:host([expanded]) button{max-width:99rem;padding:0 1.35rem 0 .25rem}:host([disabled]) button{opacity:.5;cursor:not-allowed}.icon{width:var(--kemet-fab-size);height:var(--kemet-fab-size);display:flex;flex:0 0 auto;align-items:center;justify-content:center}.text{color:var(--kemet-fab-color,var(--kemet-color-white));z-index:1;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .2s ease-in-out}:host([outlined]) .text{color:var(--kemet-fab-outlined-color,var(--kemet-color-background))}:host([expanded]) .text{opacity:1}`;let se=class extends it{constructor(){super(...arguments),this.expanded=!1,this.outlined=!1,this.disabled=!1}firstUpdated(){window.addEventListener("scroll",this.handleScroll.bind(this)),this.addEventListener("mouseover",this.handleMouseOver.bind(this)),this.addEventListener("mouseout",this.handleMouseOut.bind(this))}render(){return N`<button class="button" part="button" ?disabled="${this.disabled}" aria-disabled="${this.disabled?"true":"false"}"><span class="icon" part="icon"><slot name="icon"></slot></span><span class="text" part="text"><slot></slot></span></button>`}handleMouseOver(){this.disabled||(this.expanded=!0)}handleMouseOut(){this.disabled||(this.expanded=!1)}handleScroll(){window.scrollY>this.expandPoint&&(this.expanded=!0),window.scrollY<this.expandPoint&&(this.expanded=!1),window.scrollY>this.collapsePoint&&(this.expanded=!1),window.scrollY<this.collapsePoint&&(this.expanded=!0)}};se.styles=[ie],t([at({type:Boolean,reflect:!0})],se.prototype,"expanded",void 0),t([at({type:Boolean,reflect:!0})],se.prototype,"outlined",void 0),t([at({type:Boolean,reflect:!0})],se.prototype,"disabled",void 0),t([at({type:Boolean,reflect:!0})],se.prototype,"pill",void 0),t([at({type:Number,attribute:"expand-point"})],se.prototype,"expandPoint",void 0),t([at({type:Number,attribute:"collapse-point"})],se.prototype,"collapsePoint",void 0),se=t([rt("kemet-fab")],se);const re=a`*,::after,::before{box-sizing:border-box}:host{display:block}:host([disabled]){opacity:.5}label{position:relative;display:block}label span{color:inherit;display:inline-flex;gap:.5rem;align-items:center;margin-bottom:.8rem}:host([status=error]) kemet-icon{color:var(--kemet-color-error)}:host([status=success]) kemet-icon{color:var(--kemet-color-success)}:host([status=warning]) kemet-icon{color:var(--kemet-color-warning)}.message{font-size:.9rem;line-height:1;display:block;margin-top:.8rem}:host([status=error]) .message{color:var(--kemet-color-error)}:host([status=success]) .message{color:var(--kemet-color-success)}:host([status=warning]) .message{color:var(--kemet-color-warning)}`;let ne=class extends it{constructor(){super(),this.status="standard",this.errorIcon="exclamation-triangle-fill",this.successIcon="check-lg",this.addEventListener("kemet-input-focused",(t=>this.handleFocused(t))),this.addEventListener("kemet-input-status",(t=>this.handleStatus(t))),this.addEventListener("kemet-input-input",(t=>this.handleInput(t))),this.addEventListener("kemet-count-status",(t=>this.handleStatus(t))),this.addEventListener("kemet-combo-selection",(t=>this.handleSelection(t)))}firstUpdated(){this.slotInput=this.querySelector('[slot="input"]'),this.slotCombo=this.querySelector('[slot="combo"]'),this.slotInput.value?this.length=this.slotInput.value.length:this.length=0}render(){return N`<label for="${this.slug}" id="${this.slug}-label" part="label"><span part="text">${this.label}${this.makeStatusIcon()}</span><slot name="input"></slot></label> ${this.makeStatusMessage()}<slot name="component"></slot>`}makeStatusIcon(){return"error"===this.status||"warning"===this.status?N`<kemet-icon icon="${this.errorIcon}" size="16"></kemet-icon>`:"success"===this.status?N`<kemet-icon icon="${this.successIcon}" size="16"></kemet-icon>`:null}makeStatusMessage(){return"standard"!==this.status?N`<span class="message" part="message">${this.message}</span>`:null}handleFocused(t){this.focused=t.detail,!this.focused&&this.slotCombo&&this.slotCombo.options.length<1&&(this.slotCombo.show=!1)}handleStatus(t){this.status=t.detail.status}handleInput(t){pt(this,"kemet-field-input",t.detail.length),""===t.detail?this.filled=!1:this.filled=!0}handleSelection(t){this.slotInput.setAttribute("aria-activedescendant",t.detail)}};ne.styles=[re],t([at({type:String})],ne.prototype,"slug",void 0),t([at({type:String})],ne.prototype,"label",void 0),t([at({type:String})],ne.prototype,"message",void 0),t([at({type:Boolean,reflect:!0})],ne.prototype,"focused",void 0),t([at({type:String,reflect:!0})],ne.prototype,"status",void 0),t([at({type:Boolean,reflect:!0})],ne.prototype,"filled",void 0),t([at({type:Number})],ne.prototype,"length",void 0),t([at({type:Boolean,reflect:!0})],ne.prototype,"disabled",void 0),t([at({type:String,attribute:"error-icon"})],ne.prototype,"errorIcon",void 0),t([at({type:String,attribute:"success-icon"})],ne.prototype,"successIcon",void 0),t([lt()],ne.prototype,"slotInput",void 0),t([lt()],ne.prototype,"slotCombo",void 0),ne=t([rt("kemet-field")],ne);const ae=`${document.documentElement.scrollHeight}px`,le=a`*,::after,::before{box-sizing:border-box}:host{width:100%}.off-canvas{position:relative;overflow:hidden}.off-canvas__nav{position:fixed;top:0;left:0;z-index:100;visibility:hidden;height:100%;transition:all .5s}.off-canvas__nav::after{position:absolute;top:0;right:0;width:100%;height:100%;background:rgba(0,0,0,.2);content:'';opacity:1;transition:opacity .5s}:host([opened]) .off-canvas__nav::after{width:0;height:0;opacity:0;transition:opacity .5s,width .1s .5s,height .1s .5s}.off-canvas__pusher{position:relative;left:0;z-index:99;height:100%;transition:transform .5s}:host([overlay]) .off-canvas__pusher::after{position:absolute;top:0;right:0;width:0;height:0;background:var(--kemet-drawer-overlay-color,rgba(0,0,0,.2));content:'';opacity:0;transition:opacity .5s,width .1s .5s,height .1s .5s}:host([opened]) .off-canvas__pusher::after{width:100%;height:100%;opacity:1;transition:opacity .5s;transform:scale(2)}.off-canvas__content{position:relative;min-height:100vh}.off-canvas__wrapper{position:relative}::slotted([slot=content]){min-height:100vh}.off-canvas__nav{width:var(--kemet-drawer-width,300px);height:var(--kemet-drawer-height,100%);color:var(--kemet-drawer-color,#fafafa);background:var(--kemet-drawer-background-color,#202020)}`,de=a`:host([effect=slide]) .off-canvas__nav{visibility:visible;transform:translate3d(-100%,0,0)}:host([effect=slide][opened]) .off-canvas__nav{visibility:visible;transform:translate3d(0,0,0)}:host([effect=slide]) .off-canvas__nav:after{display:none}:host([effect=slide][side=right]) .off-canvas__nav{transform:translate3d(100vw,0,0)}:host([effect=slide][side=right][opened]) .off-canvas__nav{transform:translate3d(calc(100vw - var(--kemet-drawer-width,300px)),0,0)}:host([effect=slide][side=top]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=slide][side=top][opened]) .off-canvas__nav{transform:translate3d(0,0,0)}:host([effect=slide][side=bottom]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,${n(ae)},0)}:host([effect=slide][side=bottom][opened]) .off-canvas__nav{transform:translate3d(0,calc(100vh - var(--kemet-drawer-height,100vh)),0)}:host([effect=reveal][opened]) .off-canvas__pusher{transform:translate3d(var(--kemet-drawer-width,300px),0,0)}:host([effect=reveal]) .off-canvas__nav{z-index:1}:host([effect=reveal][opened]) .off-canvas__nav{visibility:visible;transition:transform .5s}:host([effect=reveal]) .off-canvas__nav::after{display:none}:host([effect=reveal][side=right][opened]) .off-canvas__pusher{transform:translate3d(0,0,0)}:host([effect=reveal][side=right]) .off-canvas__nav{transform:translate3d(100vw,0,0)}:host([effect=reveal][side=right][opened]) .off-canvas__nav{transform:translate3d(calc(100vw - var(--kemet-drawer-width,300px)),0,0)}:host([effect=reveal][side=top]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=reveal][side=top][opened]) .off-canvas__nav{transform:translate3d(0,0,0)}:host([effect=reveal][side=top][opened]) .off-canvas__pusher{transform:translate3d(0,var(--kemet-drawer-height,100vh),0)}:host([effect=reveal][side=bottom]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,${n(ae)},0)}:host([effect=reveal][side=bottom][opened]) .off-canvas__nav{transform:translate3d(0,calc(100vh - var(--kemet-drawer-height,100vh)),0)}:host([effect=reveal][side=bottom][opened]) .off-canvas__pusher{transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=push][opened]) .off-canvas__pusher{transform:translate3d(var(--kemet-drawer-width,300px),0,0)}:host([effect=push]) .off-canvas__nav{transform:translate3d(-100%,0,0)}:host([effect=push][opened]) .off-canvas__nav{visibility:visible;transition:transform .5s;transform:translate3d(0,0,0)}:host([effect=push]) .off-canvas__nav::after{display:none}:host([effect=push][side=right][opened]) .off-canvas__pusher{transform:translate3d(calc(var(--kemet-drawer-width,300px) * -1),0,0)}:host([effect=push][side=right]) .off-canvas__nav{transform:translate3d(100vw,0,0)}:host([effect=push][side=right][opened]) .off-canvas__nav{transform:translate3d(calc(100vw - var(--kemet-drawer-width,300px)),0,0)}:host([effect=push][side=top]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=push][side=top][opened]) .off-canvas__nav{transform:translate3d(0,0,0)}:host([effect=push][side=top][opened]) .off-canvas__pusher{transform:translate3d(0,var(--kemet-drawer-height,100vh),0)}:host([effect=push][side=bottom]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,${n(ae)},0)}:host([effect=push][side=bottom][opened]) .off-canvas__nav{transform:translate3d(0,calc(100vh - var(--kemet-drawer-height,100vh)),0)}:host([effect=push][side=bottom][opened]) .off-canvas__pusher{transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=scale]) .off-canvas__pusher{transform-style:preserve-3d}:host([effect=scale][opened]) .off-canvas__pusher{transform:translate3d(0,0,0) scale(.95)}:host([effect=scale]) .off-canvas__nav{opacity:1;transform:translate3d(-100%,0,0)}:host([effect=scale][opened]) .off-canvas__nav{visibility:visible;transition:transform .5s;transform:translate3d(0,0,0)}:host([effect=scale]) .off-canvas__nav::after{display:none}:host([effect=scale][side=right]) .off-canvas__nav{transform:translate3d(100vw,0,0)}:host([effect=scale][side=right][opened]) .off-canvas__nav{transform:translate3d(calc(100vw - var(--kemet-drawer-width,300px)),0,0)}:host([effect=scale][side=top]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=scale][side=top][opened]) .off-canvas__nav{transform:translate3d(0,0,0)}:host([effect=scale][side=bottom]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,${n(ae)},0)}:host([effect=scale][side=bottom][opened]) .off-canvas__nav{transform:translate3d(0,calc(100vh - var(--kemet-drawer-height,100vh)),0)}`;let ce=class extends it{constructor(){super(...arguments),this.opened=void 0,this.effect="slide",this.side="left",this.overlay=!1}firstUpdated(){this.addEventListener("click",(t=>{const e=t.target;this.opened&&"kemet-drawer"===e.tagName.toLowerCase()&&(this.opened=!1)}))}updated(t){t.get("opened")||!0!==this.opened||pt(this,"kemet-drawer-opened",this),t.get("opened")&&!1===this.opened&&pt(this,"kemet-drawer-closed",this)}render(){return N`<section class="off-canvas" part="container"><nav class="off-canvas__nav" part="drawer" title="Drawer"><slot name="navigation"></slot></nav><div class="off-canvas__pusher" part="pusher"><div class="off-canvas__content" part="content"><div class="off-canvas__wrapper" part="wrapper"><slot name="content"></slot></div></div></div></section>`}};ce.styles=[le,de],t([at({type:Boolean,reflect:!0})],ce.prototype,"opened",void 0),t([at({type:String,reflect:!0})],ce.prototype,"effect",void 0),t([at({type:String,reflect:!0})],ce.prototype,"side",void 0),t([at({type:Boolean,reflect:!0})],ce.prototype,"overlay",void 0),ce=t([rt("kemet-drawer")],ce);const he=13,pe=32,ue=27;let fe=class extends it{render(){return N`<slot tabindex="0" @click="${()=>this.trigger()}" @keypress="${t=>this.handleKeyup(t)}"></slot>`}trigger(){pt(this,"kemet-flipcard-flipped",this)}handleKeyup(t){t.preventDefault(),t.keyCode===he&&this.trigger()}};fe.styles=[a`:host{cursor:pointer}`],fe=t([rt("kemet-flipcard-trigger")],fe);const me=a`*,::after,::before{box-sizing:border-box}:host{display:inline-block;width:var(--kemet-flipcard-width,100%);height:var(--kemet-flipcard-height,auto);aspect-ratio:var(--kemet-flipcard-ratio,16/9);perspective:1000px}section{position:relative;width:100%;height:100%;transition:transform .8s;transform-style:preserve-3d}.back,.front{position:absolute;display:flex;width:100%;height:100%;backface-visibility:hidden;border-radius:var(--kemet-flipcard-border-radius,0);border:var(--kemet-flipcard-border,2px solid var(--kemet-color-primary))}:host([rounded]) .back,:host([rounded]) .front{border-radius:var(--kemet-border-radius)}.front{color:var(--kemet-flipcard-front-color,#202020);background-color:var(--kemet-flipcard-front-background-color,#fafafa)}:host([flipped]) .front{z-index:-1}.back{color:var(--kemet-flipcard-back-color,#202020);background-color:var(--kemet-flipcard-back-background-color,#fafafa)}:host([axis=horizontal]) .back{transform:rotateY(180deg)}:host([flipped][axis=horizontal]) section{transform:rotateY(180deg)}:host([axis=vertical]) .back{transform:rotateX(180deg)}:host([flipped][axis=vertical]) section{transform:rotateX(180deg)}:host([flip-on-hover]) section{cursor:pointer}::slotted([slot=back]),::slotted([slot=front]){display:inline-block;margin:auto;position:relative;width:100%;height:100%}`;let ve=class extends it{constructor(){super(),this.axis="horizontal",this.flipped=!1,this.flipOnHover=!1,this.height="auto",this.measure=!1,this.addEventListener("kemet-flipcard-flipped",(()=>{this.flipped=!this.flipped}))}firstUpdated(){this.frontChildren&&([this.frontElement]=this.frontChildren.assignedNodes({flatten:!0})),this.backChildren&&([this.backElement]=this.backChildren.assignedNodes({flatten:!0})),window.addEventListener("resize",this.determineHeight.bind(this))}updated(){this.determineHeight()}render(){return N`<section tabindex="0" part="wrapper" @blur="${()=>{this.flipOnHover&&(this.flipped=!1)}}" @focus="${()=>{this.flipOnHover&&(this.flipped=!0)}}" @mouseover="${()=>{this.flipOnHover&&(this.flipped=!0)}}" @mouseout="${()=>{this.flipOnHover&&(this.flipped=!1)}}"><div id="front" class="front" part="front"><slot name="front" @slotchange="${()=>this.determineHeight()}"></slot></div><div id="back" class="back" part="back"><slot name="back" @slotchange="${()=>this.determineHeight()}"></slot></div></section>`}determineHeight(){setTimeout((()=>{var t,e,o,i;this.measure?((null===(t=this.frontElement)||void 0===t?void 0:t.offsetHeight)>(null===(e=this.backElement)||void 0===e?void 0:e.offsetHeight)?this.height=`${null===(o=this.frontElement)||void 0===o?void 0:o.offsetHeight}px`:this.height=`${null===(i=this.backElement)||void 0===i?void 0:i.offsetHeight}px`,this.style.height=this.height):this.style.removeProperty("height")}),0)}};ve.styles=[me],t([at({type:String,reflect:!0})],ve.prototype,"axis",void 0),t([at({type:Boolean,reflect:!0})],ve.prototype,"flipped",void 0),t([at({type:Boolean,attribute:"flip-on-hover"})],ve.prototype,"flipOnHover",void 0),t([at({type:String})],ve.prototype,"height",void 0),t([at({type:Boolean})],ve.prototype,"measure",void 0),t([ct('[name="front"]')],ve.prototype,"frontChildren",void 0),t([ct('[name="back"]')],ve.prototype,"backChildren",void 0),t([lt()],ve.prototype,"frontElement",void 0),t([lt()],ve.prototype,"backElement",void 0),ve=t([rt("kemet-flipcard")],ve);const ge=a`:host{position:relative;display:block}input{color:var(--kemet-color-text);display:block;font-size:1rem;width:100%;height:var(--kemet-input-height,50px);padding:var(--kemet-input-padding,.5rem 1rem);border:var(--kemet-input-border,1px solid var(--kemet-color-background));appearance:none;box-sizing:border-box;background-color:transparent}input[type=color]{min-width:10rem}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}:host([status=error]) input{border:var(--kemet-input-border-color-error,1px solid var(--kemet-color-error))}:host([status=success]) input{border:var(--kemet-input-border-color-success,1px solid var(--kemet-color-success))}:host([status=warning]) input{border:var(--kemet-input-border-color-warning,1px solid var(--kemet-color-warning))}:host([disabled]) input{opacity:.5}:host([icon-left]) input{padding-left:var(--kemet-input-icon-left-padding,3rem)}:host([icon-right]) input{padding-right:var(--kemet-input-icon-right-padding,3rem)}:host([rounded]) input{border-radius:var(--kemet-input-border-radius-rounded,var(--kemet-border-radius))}:host([filled]) input{border:var(--kemet-input-border-filled,none);color:var(--kemet-input-color-filled,var(--kemet-color-white));background-color:var(--kemet-input-background-color-filled,var(--kemet-color-primary))}:host([filled]) input::placeholder,:host([filled]) kemet-icon{color:var(--kemet-input-color-filled,var(--kemet-color-white))}:host([status=error][filled]) input{background-color:var(--kemet-input-background-color-error,var(--kemet-color-error))}:host([status=success][filled]) input{background-color:var(--kemet-input-background-color-success,var(--kemet-color-success))}:host([status=warning][filled]) input{background-color:var(--kemet-input-background-color-warning,var(--kemet-color-warning))}kemet-icon{color:var(--kemet-color-text);position:absolute;top:50%;transform:translateY(-50%)}kemet-icon.left{left:1rem}kemet-icon.right{right:1rem}kemet-icon.eye,kemet-icon.search{cursor:pointer}:host([status=error]) kemet-icon{color:var(--kemet-color-error)}:host([status=warning]) kemet-icon{color:var(--kemet-color-error)}:host([status=success]) kemet-icon{color:var(--kemet-color-success)}`;let ye=class extends it{constructor(){super(),this.name="input",this.type="text",this.value="",this.status="standard",this.validateOnBlur=!1,this.iconSize=20,this.isPasswordVisible=!1,this.focused=!1,this.formSubmitController=new _t(this)}firstUpdated(){this.input=this.shadowRoot.querySelector("input"),this.field=this.closest("kemet-field"),this.form=this.closest("form"),this.slug=this.field?this.field.slug:"input",this.field&&this.field.addEventListener("fmc-password-status",(t=>this.handleStatus(t)))}render(){return N`<div>${this.makeIconLeft()} <input part="input" id="${this.slug}" name="${this.name}" placeholder="${jt(this.placeholder)}" minlength="${jt(this.minlength)}" maxlength="${jt(this.maxlength)}" min="${jt(this.min)}" max="${jt(this.max)}" step="${jt(this.step)}" autocomplete="${jt(this.autocomplete)}" aria-autocomplete="${jt(this.ariaAutoComplete)}" aria-controls="${jt(this.ariaControls)}" aria-activedescendant="${jt(this.ariaActiveDescendant)}" pattern="${jt(this.pattern)}" inputmode="${jt(this.inputmode)}" aria-invalid="${this.invalid?"true":"false"}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" .type="${"password"===this.type&&this.isPasswordVisible?"text":this.type}" .value="${Jt(this.value)}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.makeIconRight()} ${this.makeIconClear()} ${this.makeVisibilityToggle()}</div>`}makeIconRight(){return this.iconRight?N`<kemet-icon class="right" icon="${this.iconRight}" size="${this.iconSize?this.iconSize:20}"></kemet-icon>`:null}makeIconLeft(){return this.iconLeft?N`<kemet-icon class="left" icon="${this.iconLeft}" size="${this.iconSize?this.iconSize:16}"></kemet-icon>`:null}makeIconClear(){return"search"===this.type&&""!==this.value?N`<kemet-icon class="search right" icon="x-lg" size="${this.iconSize}" @click="${()=>this.handleClear()}"></kemet-icon>`:null}makeVisibilityToggle(){return"password"===this.type?N`<kemet-icon class="eye right" icon="${this.setPasswordIcon()}" @click="${()=>this.togglePasswordVisibility()}"></kemet-icon>`:null}setPasswordIcon(){return this.isPasswordVisible?"eye":"eye-slash"}handleFocus(){this.focused=!0,pt(this,"kemet-input-focused",!0)}handleBlur(){var t,e;this.validateOnBlur&&this.form&&!this.form.noValidate&&(null===(t=this.input)||void 0===t||t.checkValidity(),this.validity=null===(e=this.input)||void 0===e?void 0:e.validity),this.focused=!1,pt(this,"kemet-input-focused",!1)}handleChange(){this.value=this.input.value,this.input.checkValidity()&&this.checkLimitValidity()&&"success"!==this.status&&(this.invalid=!1,this.status="standard",this.validity=this.input.validity,pt(this,"kemet-input-status",{status:"standard",validity:this.input.validity,element:this}))}handleInput(){this.value=this.input.value,pt(this,"kemet-input-input",this.value)}handleInvalid(){var t,e;this.validity=null===(t=this.input)||void 0===t?void 0:t.validity,this.validateOnBlur&&(this.invalid=!0,this.status="error",pt(this,"kemet-input-status",{status:"error",validity:null===(e=this.input)||void 0===e?void 0:e.validity,element:this}))}handleStatus(t){this.status=t.detail.status}togglePasswordVisibility(){this.isPasswordVisible=!this.isPasswordVisible}handleClear(){this.value="",pt(this,"kemet-input-input",this.value)}checkLimitValidity(){if(this.field){const t=this.field.querySelector("kemet-count");if(t)return this.value.length<t.limit}return!0}checkValidity(){var t;return null===(t=this.input)||void 0===t?void 0:t.checkValidity()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}};ye.styles=[ge],t([at({type:String})],ye.prototype,"slug",void 0),t([at({type:String})],ye.prototype,"name",void 0),t([at({type:String})],ye.prototype,"placeholder",void 0),t([at({type:Number})],ye.prototype,"minlength",void 0),t([at({type:Number})],ye.prototype,"maxlength",void 0),t([at({type:String})],ye.prototype,"min",void 0),t([at({type:String})],ye.prototype,"max",void 0),t([at({type:Number})],ye.prototype,"step",void 0),t([at({type:String})],ye.prototype,"autocomplete",void 0),t([at({type:String})],ye.prototype,"pattern",void 0),t([at({type:String})],ye.prototype,"inputmode",void 0),t([at({type:Boolean})],ye.prototype,"autofocus",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"disabled",void 0),t([at({type:Boolean})],ye.prototype,"readonly",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"required",void 0),t([at({type:String})],ye.prototype,"type",void 0),t([at({type:String,reflect:!0})],ye.prototype,"value",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"invalid",void 0),t([at({type:String,reflect:!0})],ye.prototype,"status",void 0),t([at({type:Boolean,attribute:"validate-on-blur"})],ye.prototype,"validateOnBlur",void 0),t([at({type:String,attribute:"aria-autocomplete"})],ye.prototype,"ariaAutoComplete",void 0),t([at({type:String,attribute:"aria-controls"})],ye.prototype,"ariaControls",void 0),t([at({type:String,attribute:"aria-activedescendant"})],ye.prototype,"ariaActiveDescendant",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"rounded",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"filled",void 0),t([at({type:String,reflect:!0,attribute:"icon-right"})],ye.prototype,"iconRight",void 0),t([at({type:String,reflect:!0,attribute:"icon-left"})],ye.prototype,"iconLeft",void 0),t([at({type:Number})],ye.prototype,"iconSize",void 0),t([at({type:Object})],ye.prototype,"validity",void 0),t([at({type:Boolean})],ye.prototype,"isPasswordVisible",void 0),t([at({type:String})],ye.prototype,"inputType",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"focused",void 0),t([lt()],ye.prototype,"field",void 0),t([lt()],ye.prototype,"form",void 0),t([lt()],ye.prototype,"input",void 0),ye=t([rt("kemet-input")],ye);let be=class extends it{render(){return N`<slot @keyup="${()=>this.close()}" @click="${()=>this.close()}"></slot>`}close(){pt(this,"kemet-modal-close-pressed",this)}};be.styles=[a`:host{position:absolute;top:.5rem;right:.5rem;border-radius:50%;cursor:pointer}`],be=t([rt("kemet-modal-close")],be);const ke=a`*,::after,::before{box-sizing:border-box}:host{position:fixed;display:flex;top:0;left:0;z-index:99;width:100%;height:100vh;visibility:hidden;backface-visibility:hidden}:host([opened]){visibility:visible}.content{position:relative;z-index:3;margin:auto;min-width:var(--kemet-modal-content-min-width,0);max-width:var(--kemet-modal-content-max-width,none);background-color:var(--kemet-modal-content-background-color,var(--kemet-color-white-to-primary))}:host([mobile]) .content{min-width:var(--kemet-modal-content-mobile-min-width,100%);min-height:var(--kemet-modal-content-mobile-min-height,80vh);padding:var(--kemet-modal-content-mobile-padding,1rem)}.overlay{position:fixed;width:100%;height:100%;visibility:hidden;top:0;left:0;z-index:1;opacity:0;background:var(--kemet-modal-overlay-background-color,rgba(0,0,0,.2));transition:all var(--kemet-modal-transition-speed,.3s)}:host([opened]) .overlay{opacity:1;visibility:visible}`,xe=a`:host([effect=fadein-scaleup]) .content{transform:scale(.7);opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=fadein-scaleup][opened]) .content{transform:scale(1);opacity:1}:host([effect=slide-right]) .content{transform:translateX(20%);opacity:0;transition:all var(--kemet-modal-transition-speed,.3s) cubic-bezier(.25,.5,.5,.9)}:host([effect=slide-right][opened]) .content{transform:translateX(0);opacity:1}:host([effect=slide-bottom]) .content{transform:translateY(20%);opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=slide-bottom][opened]) .content{transform:translateY(0);opacity:1}:host([effect=newspaper]) .content{transform:scale(0) rotate(720deg);opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=newspaper][opened]) .content{transform:scale(1) rotate(0);opacity:1}:host([effect=fall]){perspective:1300px}:host([effect=fall]) .content{transform-style:preserve-3d;transform:translateZ(600px) rotateX(20deg);opacity:0}:host([effect=fall][opened]) .content{transition:all var(--kemet-modal-transition-speed,.3s) ease-in;transform:translateZ(0) rotateX(0);opacity:1}:host([effect=side-fall]){perspective:1300px}:host([effect=side-fall]) .content{transform-style:preserve-3d;transform:translate(30%) translateZ(600px) rotate(10deg);opacity:0}:host([effect=side-fall][opened]) .content{transition:all var(--kemet-modal-transition-speed,.3s) ease-in;transform:translate(0) translateZ(0) rotate(0);opacity:1}:host([effect=flip-horizontal]){perspective:1300px}:host([effect=flip-horizontal]) .content{transform-style:preserve-3d;transform:rotateY(-70deg);transition:all var(--kemet-modal-transition-speed,.3s);opacity:0}:host([effect=flip-horizontal][opened]) .content{transform:rotateY(0);opacity:1}:host([effect=flip-vertical]){perspective:1300px}:host([effect=flip-vertical]) .content{transform-style:preserve-3d;transform:rotateX(-70deg);transition:all var(--kemet-modal-transition-speed,.3s);opacity:0}:host([effect=flip-vertical][opened]) .content{transform:rotateX(0);opacity:1}:host([effect=sign-3d]){perspective:1300px}:host([effect=sign-3d]) .content{transform-style:preserve-3d;transform:rotateX(-60deg);transform-origin:50% 0;opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=sign-3d][opened]) .content{transform:rotateX(0);opacity:1}:host([effect=super-scaled]) .content{transform:scale(2);opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=super-scaled][opened]) .content{transform:scale(1);opacity:1}:host([effect=slit]){perspective:1300px}:host([effect=slit]) .content{transform-style:preserve-3d;transform:translateZ(-3000px) rotateY(90deg);opacity:0}:host([effect=slit][opened]) .content{animation:slit .7s forwards ease-out}@keyframes slit{50%{transform:translateZ(-250px) rotateY(89deg);opacity:1;animation-timing-function:ease-in}100%{transform:translateZ(0) rotateY(0);opacity:1}}:host([effect=rotate-bottom]){perspective:1300px}:host([effect=rotate-bottom]) .content{transform-style:preserve-3d;transform:translateY(100%) rotateX(90deg);transform-origin:0 100%;opacity:0;transition:all var(--kemet-modal-transition-speed,.3s) ease-out}:host([effect=rotate-bottom][opened]) .content{transform:translateY(0) rotateX(0);opacity:1}:host([effect=rotate-left]){perspective:1300px}:host([effect=rotate-left]) .content{transform-style:preserve-3d;transform:translateZ(100px) translateX(-30%) rotateY(90deg);transform-origin:0 100%;opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=rotate-left][opened]) .content{transform:translateZ(0) translateX(0) rotateY(0);opacity:1}`;let we=class extends it{constructor(){super(),this.opened=!1,this.closeOnClick=!1,this.breakpoint="600px",this.addEventListener("kemet-modal-close-pressed",(()=>{this.opened=!1}))}firstUpdated(){this.focusableSelector="body, a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",this.focusableElements=this.querySelectorAll(this.focusableSelector),this.addEventListener("keyup",(t=>{"Escape"===t.key&&(this.opened=!1)})),this.addEventListener("click",(t=>{const e=t.target;this.opened&&this.closeOnClick&&"kemet-modal"===e.tagName.toLowerCase()&&(this.opened=!1)})),window.addEventListener("resize",(()=>{this.isMobile()})),this.focusableElements.forEach((t=>{t.addEventListener("keydown",(t=>this.handleFocusableDown(t)))}))}updated(t){t.get("opened")||!0!==this.opened||(setTimeout((()=>{var t;null===(t=this.focusableElements[0])||void 0===t||t.focus()}),100),pt(this,"kemet-modal-opened",this)),t.get("opened")&&!1===this.opened&&pt(this,"kemet-modal-closed",this),this.isMobile()}render(){return N`<div class="content" part="content"><slot></slot></div><div class="overlay" part="overlay"></div>`}isMobile(){const t=window.matchMedia(`(max-width: ${this.breakpoint})`);this.mobile=t.matches}handleFocusableDown(t){const e=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1];"Tab"===t.key&&(t.shiftKey&&document.activeElement===e?(t.preventDefault(),o.focus()):t.shiftKey||document.activeElement!==o||(t.preventDefault(),e.focus()))}};we.styles=[ke,xe],t([at({type:Boolean,reflect:!0})],we.prototype,"opened",void 0),t([at({type:String,reflect:!0})],we.prototype,"effect",void 0),t([at({type:Boolean,attribute:"close-on-click"})],we.prototype,"closeOnClick",void 0),t([at({type:String})],we.prototype,"breakpoint",void 0),t([at({type:Boolean,reflect:!0})],we.prototype,"mobile",void 0),t([lt()],we.prototype,"focusableSelector",void 0),t([lt()],we.prototype,"focusableElements",void 0),we=t([rt("kemet-modal")],we);const $e=a`:host{color:inherit;display:none}:host([show]){display:block}p{margin:1.6rem 0}.status{display:grid;align-items:center;grid-template-columns:1fr auto;line-height:1;margin-top:.8rem}.status>span{text-transform:capitalize}.status--better,.status--weak{color:var(--kemet-color-error)}.status--strong{color:var(--kemet-color-success)}.indicator{display:flex;gap:.4rem;margin:0;list-style:none}.indicator li{width:1.6rem;height:.2rem}.status--weak .indicator li:nth-child(1){background-color:var(--kemet-color-error)}.status--better .indicator li:nth-child(1),.status--better .indicator li:nth-child(2){background-color:var(--kemet-color-error)}.status--strong .indicator li{background-color:var(--kemet-color-success)}.rules{color:var(--kemet-color-background);line-height:1.5;list-style:none;font-size:90%;padding-left:2rem}.rules li{position:relative}.rules kemet-icon{color:var(--kemet-color-success);position:absolute;left:-2rem}`;let Se=class extends it{constructor(){super(...arguments),this.rules=[{pattern:"(?=.{8,}$)",message:"At least 8 characters long"},{pattern:"(?=.*[a-z])(?=.*[A-Z])",message:"Uppercase and lowercase"},{pattern:"(?=.*[0-9])",message:"At least one number (0-9)"}],this.message="Please make sure you meet all the requirements.",this.icon="check2",this.iconSize=16}firstUpdated(){this.field=this.closest("kemet-field"),this.input=this.field.querySelector('[slot="input"]'),this.input.addEventListener("kemet-input-input",this.handleInput.bind(this))}render(){return N`<div role="alert" aria-live="assertive"><div class="status status--${this.strength}" part="status"><span>${this.strength}</span><ul class="indicator" part="indicator"><li></li><li></li><li></li></ul></div><p class="message" part="message">${this.message}</p><ul class="rules" part="rules">${this.makeRules()}</ul></div>`}makeRules(){if(this.input){return this.rules.map(((t,e)=>{const o=new RegExp(t.pattern).test(this.input.value);return this.rules[e].meetsCriteria=o,N`<li>${this.makeCheckIcon(o)} ${t.message}</li>`}))}return null}makeCheckIcon(t){return t?N`<kemet-icon icon="${this.icon}" size="${this.iconSize}"></kemet-icon>`:null}handleInput(t){this.value=t.detail,this.setStrength(),this.visibility()}setStrength(){setTimeout((()=>{const t=this.rules.length,e=this.rules.filter((t=>t.meetsCriteria)).length,o=Math.round(e/t*100)/100;o<=.33&&(this.strength="weak",this.status="error"),o>.33&&o<=.67&&(this.strength="better",this.status="error"),o>.67&&(this.strength="strong",this.status="success"),pt(this,"kemet-password-status",{status:this.status,validity:{meetsPasswordCriteria:"success"===this.status},element:this})}),1)}visibility(){this.value.length>0?this.show=!0:this.show=!1}};Se.styles=[$e],t([at({type:Array})],Se.prototype,"rules",void 0),t([at({type:Boolean,reflect:!0})],Se.prototype,"show",void 0),t([at({type:String})],Se.prototype,"value",void 0),t([at({type:String})],Se.prototype,"message",void 0),t([at({type:String})],Se.prototype,"strength",void 0),t([at({type:String})],Se.prototype,"icon",void 0),t([at({type:Number})],Se.prototype,"iconSize",void 0),t([lt()],Se.prototype,"status",void 0),t([lt()],Se.prototype,"field",void 0),t([lt()],Se.prototype,"input",void 0),Se=t([rt("kemet-password")],Se);let Ee=class extends it{render(){return N`<button @click="${()=>this.close()}" @keyup="${t=>this.handleKeyboard(t)}"><slot></slot></button>`}close(){pt(this,"kemet-popper-close-btn",this)}handleKeyboard(t){t.preventDefault(),t.keyCode!==pe&&t.keyCode!==he||this.close()}};Ee.styles=[a`button{font:inherit;color:inherit;cursor:pointer;border:0;background:0 0}`],Ee=t([rt("kemet-popper-close")],Ee);var _e="top",Ae="bottom",Oe="right",Ce="left",ze="auto",Le=[_e,Ae,Oe,Ce],Be="start",Ie="end",De="clippingParents",Pe="viewport",Te="popper",Me="reference",Ne=Le.reduce((function(t,e){return t.concat([e+"-"+Be,e+"-"+Ie])}),[]),Ue=[].concat(Le,[ze]).reduce((function(t,e){return t.concat([e,e+"-"+Be,e+"-"+Ie])}),[]),qe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Xe(t){return t?(t.nodeName||"").toLowerCase():null}function je(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Re(t){return t instanceof je(t).Element||t instanceof Element}function He(t){return t instanceof je(t).HTMLElement||t instanceof HTMLElement}function Ve(t){return"undefined"!=typeof ShadowRoot&&(t instanceof je(t).ShadowRoot||t instanceof ShadowRoot)}var Ye={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var o=e.styles[t]||{},i=e.attributes[t]||{},s=e.elements[t];He(s)&&Xe(s)&&(Object.assign(s.style,o),Object.keys(i).forEach((function(t){var e=i[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,o={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,o.popper),e.styles=o,e.elements.arrow&&Object.assign(e.elements.arrow.style,o.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],s=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:o[t]).reduce((function(t,e){return t[e]="",t}),{});He(i)&&Xe(i)&&(Object.assign(i.style,r),Object.keys(s).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};function Fe(t){return t.split("-")[0]}var We=Math.max,Ke=Math.min,Je=Math.round;function Ze(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function Ge(){return!/^((?!chrome|android).)*safari/i.test(Ze())}function Qe(t,e,o){void 0===e&&(e=!1),void 0===o&&(o=!1);var i=t.getBoundingClientRect(),s=1,r=1;e&&He(t)&&(s=t.offsetWidth>0&&Je(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&Je(i.height)/t.offsetHeight||1);var n=(Re(t)?je(t):window).visualViewport,a=!Ge()&&o,l=(i.left+(a&&n?n.offsetLeft:0))/s,d=(i.top+(a&&n?n.offsetTop:0))/r,c=i.width/s,h=i.height/r;return{width:c,height:h,top:d,right:l+c,bottom:d+h,left:l,x:l,y:d}}function to(t){var e=Qe(t),o=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-o)<=1&&(o=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:i}}function eo(t,e){var o=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(o&&Ve(o)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function oo(t){return je(t).getComputedStyle(t)}function io(t){return["table","td","th"].indexOf(Xe(t))>=0}function so(t){return((Re(t)?t.ownerDocument:t.document)||window.document).documentElement}function ro(t){return"html"===Xe(t)?t:t.assignedSlot||t.parentNode||(Ve(t)?t.host:null)||so(t)}function no(t){return He(t)&&"fixed"!==oo(t).position?t.offsetParent:null}function ao(t){for(var e=je(t),o=no(t);o&&io(o)&&"static"===oo(o).position;)o=no(o);return o&&("html"===Xe(o)||"body"===Xe(o)&&"static"===oo(o).position)?e:o||function(t){var e=/firefox/i.test(Ze());if(/Trident/i.test(Ze())&&He(t)&&"fixed"===oo(t).position)return null;var o=ro(t);for(Ve(o)&&(o=o.host);He(o)&&["html","body"].indexOf(Xe(o))<0;){var i=oo(o);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return o;o=o.parentNode}return null}(t)||e}function lo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function co(t,e,o){return We(t,Ke(e,o))}function ho(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function po(t,e){return e.reduce((function(e,o){return e[o]=t,e}),{})}var uo={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,o=t.state,i=t.name,s=t.options,r=o.elements.arrow,n=o.modifiersData.popperOffsets,a=Fe(o.placement),l=lo(a),d=[Ce,Oe].indexOf(a)>=0?"height":"width";if(r&&n){var c=function(t,e){return ho("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:po(t,Le))}(s.padding,o),h=to(r),p="y"===l?_e:Ce,u="y"===l?Ae:Oe,f=o.rects.reference[d]+o.rects.reference[l]-n[l]-o.rects.popper[d],m=n[l]-o.rects.reference[l],v=ao(r),g=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,y=f/2-m/2,b=c[p],k=g-h[d]-c[u],x=g/2-h[d]/2+y,w=co(b,x,k),$=l;o.modifiersData[i]=((e={})[$]=w,e.centerOffset=w-x,e)}},effect:function(t){var e=t.state,o=t.options.element,i=void 0===o?"[data-popper-arrow]":o;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&("production"!==process.env.NODE_ENV&&(He(i)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),eo(e.elements.popper,i)?e.elements.arrow=i:"production"!==process.env.NODE_ENV&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" ")))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fo(t){return t.split("-")[1]}var mo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vo(t){var e,o=t.popper,i=t.popperRect,s=t.placement,r=t.variation,n=t.offsets,a=t.position,l=t.gpuAcceleration,d=t.adaptive,c=t.roundOffsets,h=t.isFixed,p=n.x,u=void 0===p?0:p,f=n.y,m=void 0===f?0:f,v="function"==typeof c?c({x:u,y:m}):{x:u,y:m};u=v.x,m=v.y;var g=n.hasOwnProperty("x"),y=n.hasOwnProperty("y"),b=Ce,k=_e,x=window;if(d){var w=ao(o),$="clientHeight",S="clientWidth";if(w===je(o)&&"static"!==oo(w=so(o)).position&&"absolute"===a&&($="scrollHeight",S="scrollWidth"),s===_e||(s===Ce||s===Oe)&&r===Ie)k=Ae,m-=(h&&w===x&&x.visualViewport?x.visualViewport.height:w[$])-i.height,m*=l?1:-1;if(s===Ce||(s===_e||s===Ae)&&r===Ie)b=Oe,u-=(h&&w===x&&x.visualViewport?x.visualViewport.width:w[S])-i.width,u*=l?1:-1}var E,_=Object.assign({position:a},d&&mo),A=!0===c?function(t,e){var o=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:Je(o*s)/s||0,y:Je(i*s)/s||0}}({x:u,y:m},je(o)):{x:u,y:m};return u=A.x,m=A.y,l?Object.assign({},_,((E={})[k]=y?"0":"",E[b]=g?"0":"",E.transform=(x.devicePixelRatio||1)<=1?"translate("+u+"px, "+m+"px)":"translate3d("+u+"px, "+m+"px, 0)",E)):Object.assign({},_,((e={})[k]=y?m+"px":"",e[b]=g?u+"px":"",e.transform="",e))}var go={passive:!0};var yo={left:"right",right:"left",bottom:"top",top:"bottom"};function bo(t){return t.replace(/left|right|bottom|top/g,(function(t){return yo[t]}))}var ko={start:"end",end:"start"};function xo(t){return t.replace(/start|end/g,(function(t){return ko[t]}))}function wo(t){var e=je(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function $o(t){return Qe(so(t)).left+wo(t).scrollLeft}function So(t){var e=oo(t),o=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(o+s+i)}function Eo(t){return["html","body","#document"].indexOf(Xe(t))>=0?t.ownerDocument.body:He(t)&&So(t)?t:Eo(ro(t))}function _o(t,e){var o;void 0===e&&(e=[]);var i=Eo(t),s=i===(null==(o=t.ownerDocument)?void 0:o.body),r=je(i),n=s?[r].concat(r.visualViewport||[],So(i)?i:[]):i,a=e.concat(n);return s?a:a.concat(_o(ro(n)))}function Ao(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Oo(t,e,o){return e===Pe?Ao(function(t,e){var o=je(t),i=so(t),s=o.visualViewport,r=i.clientWidth,n=i.clientHeight,a=0,l=0;if(s){r=s.width,n=s.height;var d=Ge();(d||!d&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:n,x:a+$o(t),y:l}}(t,o)):Re(e)?function(t,e){var o=Qe(t,!1,"fixed"===e);return o.top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o}(e,o):Ao(function(t){var e,o=so(t),i=wo(t),s=null==(e=t.ownerDocument)?void 0:e.body,r=We(o.scrollWidth,o.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),n=We(o.scrollHeight,o.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+$o(t),l=-i.scrollTop;return"rtl"===oo(s||o).direction&&(a+=We(o.clientWidth,s?s.clientWidth:0)-r),{width:r,height:n,x:a,y:l}}(so(t)))}function Co(t,e,o,i){var s="clippingParents"===e?function(t){var e=_o(ro(t)),o=["absolute","fixed"].indexOf(oo(t).position)>=0&&He(t)?ao(t):t;return Re(o)?e.filter((function(t){return Re(t)&&eo(t,o)&&"body"!==Xe(t)})):[]}(t):[].concat(e),r=[].concat(s,[o]),n=r[0],a=r.reduce((function(e,o){var s=Oo(t,o,i);return e.top=We(s.top,e.top),e.right=Ke(s.right,e.right),e.bottom=Ke(s.bottom,e.bottom),e.left=We(s.left,e.left),e}),Oo(t,n,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function zo(t){var e,o=t.reference,i=t.element,s=t.placement,r=s?Fe(s):null,n=s?fo(s):null,a=o.x+o.width/2-i.width/2,l=o.y+o.height/2-i.height/2;switch(r){case _e:e={x:a,y:o.y-i.height};break;case Ae:e={x:a,y:o.y+o.height};break;case Oe:e={x:o.x+o.width,y:l};break;case Ce:e={x:o.x-i.width,y:l};break;default:e={x:o.x,y:o.y}}var d=r?lo(r):null;if(null!=d){var c="y"===d?"height":"width";switch(n){case Be:e[d]=e[d]-(o[c]/2-i[c]/2);break;case Ie:e[d]=e[d]+(o[c]/2-i[c]/2)}}return e}function Lo(t,e){void 0===e&&(e={});var o=e,i=o.placement,s=void 0===i?t.placement:i,r=o.strategy,n=void 0===r?t.strategy:r,a=o.boundary,l=void 0===a?De:a,d=o.rootBoundary,c=void 0===d?Pe:d,h=o.elementContext,p=void 0===h?Te:h,u=o.altBoundary,f=void 0!==u&&u,m=o.padding,v=void 0===m?0:m,g=ho("number"!=typeof v?v:po(v,Le)),y=p===Te?Me:Te,b=t.rects.popper,k=t.elements[f?y:p],x=Co(Re(k)?k:k.contextElement||so(t.elements.popper),l,c,n),w=Qe(t.elements.reference),$=zo({reference:w,element:b,strategy:"absolute",placement:s}),S=Ao(Object.assign({},b,$)),E=p===Te?S:w,_={top:x.top-E.top+g.top,bottom:E.bottom-x.bottom+g.bottom,left:x.left-E.left+g.left,right:E.right-x.right+g.right},A=t.modifiersData.offset;if(p===Te&&A){var O=A[s];Object.keys(_).forEach((function(t){var e=[Oe,Ae].indexOf(t)>=0?1:-1,o=[_e,Ae].indexOf(t)>=0?"y":"x";_[t]+=O[o]*e}))}return _}function Bo(t,e){void 0===e&&(e={});var o=e,i=o.placement,s=o.boundary,r=o.rootBoundary,n=o.padding,a=o.flipVariations,l=o.allowedAutoPlacements,d=void 0===l?Ue:l,c=fo(i),h=c?a?Ne:Ne.filter((function(t){return fo(t)===c})):Le,p=h.filter((function(t){return d.indexOf(t)>=0}));0===p.length&&(p=h,"production"!==process.env.NODE_ENV&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var u=p.reduce((function(e,o){return e[o]=Lo(t,{placement:o,boundary:s,rootBoundary:r,padding:n})[Fe(o)],e}),{});return Object.keys(u).sort((function(t,e){return u[t]-u[e]}))}var Io={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,o=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=o.mainAxis,r=void 0===s||s,n=o.altAxis,a=void 0===n||n,l=o.fallbackPlacements,d=o.padding,c=o.boundary,h=o.rootBoundary,p=o.altBoundary,u=o.flipVariations,f=void 0===u||u,m=o.allowedAutoPlacements,v=e.options.placement,g=Fe(v),y=l||(g===v||!f?[bo(v)]:function(t){if(Fe(t)===ze)return[];var e=bo(t);return[xo(t),e,xo(e)]}(v)),b=[v].concat(y).reduce((function(t,o){return t.concat(Fe(o)===ze?Bo(e,{placement:o,boundary:c,rootBoundary:h,padding:d,flipVariations:f,allowedAutoPlacements:m}):o)}),[]),k=e.rects.reference,x=e.rects.popper,w=new Map,$=!0,S=b[0],E=0;E<b.length;E++){var _=b[E],A=Fe(_),O=fo(_)===Be,C=[_e,Ae].indexOf(A)>=0,z=C?"width":"height",L=Lo(e,{placement:_,boundary:c,rootBoundary:h,altBoundary:p,padding:d}),B=C?O?Oe:Ce:O?Ae:_e;k[z]>x[z]&&(B=bo(B));var I=bo(B),D=[];if(r&&D.push(L[A]<=0),a&&D.push(L[B]<=0,L[I]<=0),D.every((function(t){return t}))){S=_,$=!1;break}w.set(_,D)}if($)for(var P=function(t){var e=b.find((function(e){var o=w.get(e);if(o)return o.slice(0,t).every((function(t){return t}))}));if(e)return S=e,"break"},T=f?3:1;T>0;T--){if("break"===P(T))break}e.placement!==S&&(e.modifiersData[i]._skip=!0,e.placement=S,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Do(t,e,o){return void 0===o&&(o={x:0,y:0}),{top:t.top-e.height-o.y,right:t.right-e.width+o.x,bottom:t.bottom-e.height+o.y,left:t.left-e.width-o.x}}function Po(t){return[_e,Oe,Ae,Ce].some((function(e){return t[e]>=0}))}var To={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,o=t.options,i=t.name,s=o.offset,r=void 0===s?[0,0]:s,n=Ue.reduce((function(t,o){return t[o]=function(t,e,o){var i=Fe(t),s=[Ce,_e].indexOf(i)>=0?-1:1,r="function"==typeof o?o(Object.assign({},e,{placement:t})):o,n=r[0],a=r[1];return n=n||0,a=(a||0)*s,[Ce,Oe].indexOf(i)>=0?{x:a,y:n}:{x:n,y:a}}(o,e.rects,r),t}),{}),a=n[e.placement],l=a.x,d=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=d),e.modifiersData[i]=n}};var Mo={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,o=t.options,i=t.name,s=o.mainAxis,r=void 0===s||s,n=o.altAxis,a=void 0!==n&&n,l=o.boundary,d=o.rootBoundary,c=o.altBoundary,h=o.padding,p=o.tether,u=void 0===p||p,f=o.tetherOffset,m=void 0===f?0:f,v=Lo(e,{boundary:l,rootBoundary:d,padding:h,altBoundary:c}),g=Fe(e.placement),y=fo(e.placement),b=!y,k=lo(g),x="x"===k?"y":"x",w=e.modifiersData.popperOffsets,$=e.rects.reference,S=e.rects.popper,E="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,_="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),A=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,O={x:0,y:0};if(w){if(r){var C,z="y"===k?_e:Ce,L="y"===k?Ae:Oe,B="y"===k?"height":"width",I=w[k],D=I+v[z],P=I-v[L],T=u?-S[B]/2:0,M=y===Be?$[B]:S[B],N=y===Be?-S[B]:-$[B],U=e.elements.arrow,q=u&&U?to(U):{width:0,height:0},X=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},j=X[z],R=X[L],H=co(0,$[B],q[B]),V=b?$[B]/2-T-H-j-_.mainAxis:M-H-j-_.mainAxis,Y=b?-$[B]/2+T+H+R+_.mainAxis:N+H+R+_.mainAxis,F=e.elements.arrow&&ao(e.elements.arrow),W=F?"y"===k?F.clientTop||0:F.clientLeft||0:0,K=null!=(C=null==A?void 0:A[k])?C:0,J=I+Y-K,Z=co(u?Ke(D,I+V-K-W):D,I,u?We(P,J):P);w[k]=Z,O[k]=Z-I}if(a){var G,Q="x"===k?_e:Ce,tt="x"===k?Ae:Oe,et=w[x],ot="y"===x?"height":"width",it=et+v[Q],st=et-v[tt],rt=-1!==[_e,Ce].indexOf(g),nt=null!=(G=null==A?void 0:A[x])?G:0,at=rt?it:et-$[ot]-S[ot]-nt+_.altAxis,lt=rt?et+$[ot]+S[ot]-nt-_.altAxis:st,dt=u&&rt?function(t,e,o){var i=co(t,e,o);return i>o?o:i}(at,et,lt):co(u?at:it,et,u?lt:st);w[x]=dt,O[x]=dt-et}e.modifiersData[i]=O}},requiresIfExists:["offset"]};function No(t,e,o){void 0===o&&(o=!1);var i,s,r=He(e),n=He(e)&&function(t){var e=t.getBoundingClientRect(),o=Je(e.width)/t.offsetWidth||1,i=Je(e.height)/t.offsetHeight||1;return 1!==o||1!==i}(e),a=so(e),l=Qe(t,n,o),d={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!o)&&(("body"!==Xe(e)||So(a))&&(d=(i=e)!==je(i)&&He(i)?{scrollLeft:(s=i).scrollLeft,scrollTop:s.scrollTop}:wo(i)),He(e)?((c=Qe(e,!0)).x+=e.clientLeft,c.y+=e.clientTop):a&&(c.x=$o(a))),{x:l.left+d.scrollLeft-c.x,y:l.top+d.scrollTop-c.y,width:l.width,height:l.height}}function Uo(t){var e=new Map,o=new Set,i=[];function s(t){o.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!o.has(t)){var i=e.get(t);i&&s(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){o.has(t.name)||s(t)})),i}function qo(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return[].concat(o).reduce((function(t,e){return t.replace(/%s/,e)}),t)}var Xo='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',jo='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',Ro=["name","enabled","phase","fn","effect","requires","options"];var Ho="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Vo={placement:"bottom",modifiers:[],strategy:"absolute"};function Yo(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Fo(t){void 0===t&&(t={});var e=t,o=e.defaultModifiers,i=void 0===o?[]:o,s=e.defaultOptions,r=void 0===s?Vo:s;return function(t,e,o){void 0===o&&(o=r);var s,n,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Vo,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],d=!1,c={state:a,setOptions:function(o){var s="function"==typeof o?o(a.options):o;h(),a.options=Object.assign({},r,a.options,s),a.scrollParents={reference:Re(t)?_o(t):t.contextElement?_o(t.contextElement):[],popper:_o(e)};var n,d,p,u=function(t){var e=Uo(t);return qe.reduce((function(t,o){return t.concat(e.filter((function(t){return t.phase===o})))}),[])}(function(t){var e=t.reduce((function(t,e){var o=t[e.name];return t[e.name]=o?Object.assign({},o,e,{options:Object.assign({},o.options,e.options),data:Object.assign({},o.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(i,a.options.modifiers)));if(a.orderedModifiers=u.filter((function(t){return t.enabled})),"production"!==process.env.NODE_ENV){if(function(t){t.forEach((function(e){[].concat(Object.keys(e),Ro).filter((function(t,e,o){return o.indexOf(t)===e})).forEach((function(o){switch(o){case"name":"string"!=typeof e.name&&console.error(qo(Xo,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":"boolean"!=typeof e.enabled&&console.error(qo(Xo,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":qe.indexOf(e.phase)<0&&console.error(qo(Xo,e.name,'"phase"',"either "+qe.join(", "),'"'+String(e.phase)+'"'));break;case"fn":"function"!=typeof e.fn&&console.error(qo(Xo,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":null!=e.effect&&"function"!=typeof e.effect&&console.error(qo(Xo,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":null==e.requires||Array.isArray(e.requires)||console.error(qo(Xo,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(qo(Xo,e.name,'"requiresIfExists"','"array"','"'+String(e.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+e.name+'" modifier, valid properties are '+Ro.map((function(t){return'"'+t+'"'})).join(", ")+'; but "'+o+'" was provided.')}e.requires&&e.requires.forEach((function(o){null==t.find((function(t){return t.name===o}))&&console.error(qo(jo,String(e.name),o,o))}))}))}))}((n=[].concat(u,a.options.modifiers),d=function(t){return t.name},p=new Set,n.filter((function(t){var e=d(t);if(!p.has(e))return p.add(e),!0})))),Fe(a.options.placement)===ze)a.orderedModifiers.find((function(t){return"flip"===t.name}))||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "));var f=oo(e);[f.marginTop,f.marginRight,f.marginBottom,f.marginLeft].some((function(t){return parseFloat(t)}))&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return a.orderedModifiers.forEach((function(t){var e=t.name,o=t.options,i=void 0===o?{}:o,s=t.effect;if("function"==typeof s){var r=s({state:a,name:e,instance:c,options:i}),n=function(){};l.push(r||n)}})),c.update()},forceUpdate:function(){if(!d){var t=a.elements,e=t.reference,o=t.popper;if(Yo(e,o)){a.rects={reference:No(e,ao(o),"fixed"===a.options.strategy),popper:to(o)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0,s=0;s<a.orderedModifiers.length;s++){if("production"!==process.env.NODE_ENV&&(i+=1)>100){console.error("Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.");break}if(!0!==a.reset){var r=a.orderedModifiers[s],n=r.fn,l=r.options,h=void 0===l?{}:l,p=r.name;"function"==typeof n&&(a=n({state:a,options:h,name:p,instance:c})||a)}else a.reset=!1,s=-1}}else"production"!==process.env.NODE_ENV&&console.error(Ho)}},update:(s=function(){return new Promise((function(t){c.forceUpdate(),t(a)}))},function(){return n||(n=new Promise((function(t){Promise.resolve().then((function(){n=void 0,t(s())}))}))),n}),destroy:function(){h(),d=!0}};if(!Yo(t,e))return"production"!==process.env.NODE_ENV&&console.error(Ho),c;function h(){l.forEach((function(t){return t()})),l=[]}return c.setOptions(o).then((function(t){!d&&o.onFirstUpdate&&o.onFirstUpdate(t)})),c}}var Wo=Fo({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,o=t.instance,i=t.options,s=i.scroll,r=void 0===s||s,n=i.resize,a=void 0===n||n,l=je(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&d.forEach((function(t){t.addEventListener("scroll",o.update,go)})),a&&l.addEventListener("resize",o.update,go),function(){r&&d.forEach((function(t){t.removeEventListener("scroll",o.update,go)})),a&&l.removeEventListener("resize",o.update,go)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,o=t.name;e.modifiersData[o]=zo({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,o=t.options,i=o.gpuAcceleration,s=void 0===i||i,r=o.adaptive,n=void 0===r||r,a=o.roundOffsets,l=void 0===a||a;if("production"!==process.env.NODE_ENV){var d=oo(e.elements.popper).transitionProperty||"";n&&["transform","top","right","bottom","left"].some((function(t){return d.indexOf(t)>=0}))&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',"\n\n",'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.","\n\n","We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var c={placement:Fe(e.placement),variation:fo(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,vo(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:n,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,vo(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},Ye,To,Io,Mo,uo,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,o=t.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,n=Lo(e,{elementContext:"reference"}),a=Lo(e,{altBoundary:!0}),l=Do(n,i),d=Do(a,s,r),c=Po(l),h=Po(d);e.modifiersData[o]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}}]});const Ko=a`:host{display:inline-block}#content{visibility:hidden;pointer-events:none;width:var(--kemet-popper-width,auto);height:var(--kemet-popper-height,auto);position:absolute;z-index:-1}:host([opened]) #content{visibility:visible;z-index:9;pointer-events:auto}::slotted([slot=content]){padding:var(--kemet-popper-padding,1rem);border:1px solid var(--kemet-popper-border-color,var(--kemet-color-background));background-color:var(--kemet-popper-background-color,var(--kemet-color-foreground))}`,Jo=a`:host([effect=fade]) #content{opacity:0;transition:all var(--kemet-popover-transition-speed,.3s)}:host([effect=fade][opened]) #content{opacity:1}`,Zo=a`:host([effect=scale]) #content{opacity:0;transition:all var(--kemet-popover-transition-speed,.3s)}:host([effect=scale][opened]) #content{opacity:1}:host([effect=scale][position=bottom]) #content,:host([effect=scale][position=top]) #content{transform:translateX(-50%) scale(.7)}:host([effect=scale][position=bottom][opened]) #content,:host([effect=scale][position=top][opened]) #content{transform:translateX(-50%) scale(1)}:host([effect=scale][position=left]) #content,:host([effect=scale][position=right]) #content{transform:translateY(-50%) scale(.7)}:host([effect=scale][position=left][opened]) #content,:host([effect=scale][position=right][opened]) #content{transform:translateY(-50%) scale(1)}`,Go=a`:host([effect=slide]) #content{opacity:0;transition:all var(--kemet-popover-transition-speed,.3s) cubic-bezier(.25,.5,.5,.9)}:host([effect=slide][opened]) #content{opacity:1}:host([effect=slide][position=top]) #content{transform:translateX(-50%) translateY(20%)}:host([effect=slide][position=top][opened]) #content{transform:translateX(-50%) translateY(0)}:host([effect=slide][position=bottom]) #content{transform:translateX(-50%) translateY(-20%)}:host([effect=slide][position=bottom][opened]) #content{transform:translateX(-50%) translateY(0)}:host([effect=slide][position=right]) #content{transform:translateY(-50%) translateX(-20%)}:host([effect=slide][position=right][opened]) #content{transform:translateY(-50%) translateX(0)}:host([effect=slide][position=left]) #content{transform:translateY(-50%) translateX(20%)}:host([effect=slide][position=left][opened]) #content{transform:translateY(-50%) translateX(0)}`,Qo=a`:host([effect=fall]){perspective:1300px}:host([effect=fall]) #content{transform-style:preserve-3d;opacity:0}:host([effect=fall][opened]) #content{transition:all var(--kemet-popover-transition-speed,.3s) ease-in;opacity:1}:host([effect=fall][position=top]) #content{transform:translateX(-50%) translateZ(600px) rotateX(20deg)}:host([effect=fall][position=top][opened]) #content{transform:translateX(-50%) translateZ(0) rotateX(0)}:host([effect=fall][position=bottom]) #content{transform:translateX(-50%) translateZ(600px) rotateX(20deg)}:host([effect=fall][position=bottom][opened]) #content{transform:translateX(-50%) translateZ(0) rotateX(0)}:host([effect=fall][position=right]) #content{transform:translateY(-50%) translateZ(600px) rotateX(20deg)}:host([effect=fall][position=right][opened]) #content{transform:translateY(-50%) translateZ(0) rotateX(0)}:host([effect=fall][position=left]) #content{transform:translateY(-50%) translateZ(600px) rotateX(20deg)}:host([effect=fall][position=left][opened]) #content{transform:translateY(-50%) translateZ(0) rotateX(0)}`,ti=a`:host([effect=flip-horizontal]){perspective:1300px}:host([effect=flip-horizontal]) #content{transform-style:preserve-3d;transition:all var(--kemet-popover-transition-speed,.3s);opacity:0}:host([effect=flip-horizontal][opened]) #content{opacity:1}:host([effect=flip-horizontal][position=top]) #content{transform:translateX(-50%) rotateY(-70deg)}:host([effect=flip-horizontal][position=top][opened]) #content{transform:translateX(-50%) rotateY(0)}:host([effect=flip-horizontal][position=bottom]) #content{transform:translateX(-50%) rotateY(-70deg)}:host([effect=flip-horizontal][position=bottom][opened]) #content{transform:translateX(-50%) rotateY(0)}:host([effect=flip-horizontal][position=right]) #content{transform:translateY(-50%) rotateY(-70deg)}:host([effect=flip-horizontal][position=right][opened]) #content{transform:translateY(-50%) rotateY(0)}:host([effect=flip-horizontal][position=left]) #content{transform:translateY(-50%) rotateY(-70deg)}:host([effect=flip-horizontal][position=left][opened]) #content{transform:translateY(-50%) rotateY(0)}`,ei=a`:host([effect=flip-vertical]){perspective:1300px}:host([effect=flip-vertical]) #content{transform-style:preserve-3d;transition:all var(--kemet-popover-transition-speed,.3s);opacity:0}:host([effect=flip-vertical][opened]) #content{opacity:1}:host([effect=flip-vertical][position=top]) #content{transform:translateX(-50%) rotateX(-70deg)}:host([effect=flip-vertical][position=top][opened]) #content{transform:translateX(-50%) rotateX(0)}:host([effect=flip-vertical][position=bottom]) #content{transform:translateX(-50%) rotateX(-70deg)}:host([effect=flip-vertical][position=bottom][opened]) #content{transform:translateX(-50%) rotateX(0)}:host([effect=flip-vertical][position=right]) #content{transform:translateY(-50%) rotateX(-70deg)}:host([effect=flip-vertical][position=right][opened]) #content{transform:translateY(-50%) rotateX(0)}:host([effect=flip-vertical][position=left]) #content{transform:translateY(-50%) rotateX(-70deg)}:host([effect=flip-vertical][position=left][opened]) #content{transform:translateY(-50%) rotateX(0)}`,oi=a`:host([effect=sign]){perspective:1300px}:host([effect=sign]) #content{transform-style:preserve-3d;transition:all var(--kemet-popover-transition-speed,.3s);opacity:0}:host([effect=sign][opened]) #content{opacity:1}:host([effect=sign][position=top]) #content{transform-origin:0 100%;transform:translateX(-50%) rotateX(90deg)}:host([effect=sign][position=top][opened]) #content{transform:translateX(-50%) rotateX(0)}:host([effect=sign][position=bottom]) #content{transform-origin:100% 0;transform:translateX(-50%) rotateX(90deg)}:host([effect=sign][position=bottom][opened]) #content{transform:translateX(-50%) rotateX(0)}:host([effect=sign][position=right]) #content{transform-origin:0 100%;transform:translateY(-50%) rotateY(90deg)}:host([effect=sign][position=right][opened]) #content{transform:translateY(-50%) rotateY(0)}:host([effect=sign][position=left]) #content{transform-origin:100% 0;transform:translateY(-50%) rotateY(90deg)}:host([effect=sign][position=left][opened]) #content{transform:translateY(-50%) rotateY(0)}`,ii=a`:host([effect=super-scaled]) #content{opacity:0;transition:all var(--kemet-popover-transition-speed,.3s)}:host([effect=super-scaled][opened]) #content{opacity:1}:host([effect=super-scaled][position=bottom]) #content,:host([effect=super-scaled][position=top]) #content{transform:translateX(-50%) scale(2)}:host([effect=super-scaled][position=bottom][opened]) #content,:host([effect=super-scaled][position=top][opened]) #content{transform:translateX(-50%) scale(1)}:host([effect=super-scaled][position=left]) #content,:host([effect=super-scaled][position=right]) #content{transform:translateY(-50%) scale(2)}:host([effect=super-scaled][position=left][opened]) #content,:host([effect=super-scaled][position=right][opened]) #content{transform:translateY(-50%) scale(1)}`;let si=class extends it{constructor(){super(),this.placement="top",this.effect="fade",this.fireOn="hover",this.strategy="fixed",this.skidding=0,this.distance=0,this.addEventListener("kemet-popper-close-btn",(()=>this.opened=!1))}firstUpdated(){"click"===this.fireOn&&this.focusableElements.forEach((t=>{t.addEventListener("keydown",(t=>this.handleFocusableDown(t)))}))}updated(t){this.refresh(),t.get("opened")||!0!==this.opened||pt(this,"kemet-popper-opened",this),t.get("opened")&&!1===this.opened&&pt(this,"kemet-popper-closed",this)}render(){return N`<div id="trigger" part="trigger" tabIndex="0" @click="${"click"===this.fireOn?t=>this.toggle(t):null}" @keyup="${"click"===this.fireOn?t=>this.handleKeyUp(t):null}" @mouseover="${"click"!==this.fireOn?()=>this.opened=!0:null}" @focus="${"click"!==this.fireOn?()=>this.opened=!0:null}" @mouseout="${"click"!==this.fireOn?()=>this.opened=!1:null}" @blur="${"click"!==this.fireOn?()=>this.opened=!1:null}"><slot name="trigger"></slot></div><div id="content" @mouseover="${"click"!==this.fireOn?()=>this.opened=!0:null}" @mouseout="${"click"!==this.fireOn?()=>this.opened=!1:null}"><slot name="content" @slotchange="${()=>this.makePopper()}"></slot></div>`}refresh(){var t;null===(t=this.popperInstance)||void 0===t||t.setOptions({placement:this.placement,strategy:this.strategy,modifiers:[{name:"offset",options:{offset:[this.skidding,this.distance]}}]})}makePopper(){this.popperInstance=Wo(this.triggerElement,this.contentElement,{placement:this.placement,strategy:this.strategy,modifiers:[{name:"offset",options:{offset:[this.skidding,this.distance]}}]})}toggle(t){const e="trigger"===t.target.getAttribute("slot"),o="trigger"===t.target.getAttribute("part");(e||o)&&(this.opened?this.opened=!1:this.opened=!0)}handleKeyUp(t){t.preventDefault(),t.keyCode===ue&&(this.opened=!1),t.keyCode!==he&&t.keyCode!==pe||this.toggle(t)}handleFocusableDown(t){const e=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1];"Tab"===t.key&&(t.shiftKey&&document.activeElement===e?(t.preventDefault(),o.focus()):t.shiftKey||document.activeElement!==o||(t.preventDefault(),e.focus()))}};si.styles=[Ko,Jo,Zo,Go,Qo,ti,ei,oi,ii],t([at({type:String,reflect:!0})],si.prototype,"placement",void 0),t([at({type:Boolean,reflect:!0})],si.prototype,"opened",void 0),t([at({type:String,reflect:!0})],si.prototype,"effect",void 0),t([at({type:String,attribute:"fire-on"})],si.prototype,"fireOn",void 0),t([at({type:String})],si.prototype,"strategy",void 0),t([at({type:Number})],si.prototype,"skidding",void 0),t([at({type:Number})],si.prototype,"distance",void 0),t([lt()],si.prototype,"popperInstance",void 0),t([ct("#trigger")],si.prototype,"triggerElement",void 0),t([ct("#content")],si.prototype,"contentElement",void 0),t([function(t){return dt({descriptor:e=>({get(){var e,o;return null!==(o=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==o?o:[]},enumerable:!0,configurable:!0})})}("body, a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable], kemet-popper-close")],si.prototype,"focusableElements",void 0),si=t([rt("kemet-popper")],si);var ri=si;const ni=a`*,::after,::before{box-sizing:border-box}:host{display:inline-block}:host([disabled]){opacity:.5}label{cursor:pointer;display:inline-flex;gap:.5rem;align-items:center;margin-right:.5rem}input{cursor:pointer;margin:0;padding:0;width:var(--kemet-radio-size,18px);height:var(--kemet-radio-size,18px);position:absolute;opacity:0}button{display:inline-flex;align-items:center;justify-content:center;width:var(--kemet-radio-size,18px);height:var(--kemet-radio-size,18px);padding:0;border-radius:50%;background:0 0;border:var(--kemet-radio-border,1px solid var(--kemet-color-background))}[part=dot]{display:inline-flex;border-radius:50%;width:var(--kemet-radio-size,18px);height:var(--kemet-radio-size,18px);background:var(--kemet-radio-dot-color,var(--kemet-color-primary));border:var(--kemet-radio-border,1px solid var(--kemet-color-primary));box-shadow:inset 0 0 0 var(--kemet-radio-dot-border-width,3px) var(--kemet-radio-dot-border-color,var(--kemet-color-white))}:host([filled]) [part=dot]{background:var(--kemet-radio-dot-color-filled,var(--kemet-color-white));box-shadow:inset 0 0 0 var(--kemet-radio-dot-border-width,4px) var(--kemet-radio-dot-border-color,var(--kemet-color-primary))}`,ai=a`*,::after,::before{box-sizing:border-box}:host{display:block}fieldset{border:0;margin:0;padding:0;display:flex;gap:.5rem}legend{margin-bottom:1rem}:host([axis=vertical]) fieldset{flex-direction:column}[part=message]{display:block;margin-top:.5rem}:host([status=error]) [part=message]{color:var(--kemet-color-error)}:host([status=warning]) [part=message]{color:var(--kemet-color-error)}`;let li=class extends it{constructor(){super(...arguments),this.label="",this.disabled=!1}firstUpdated(){const t=this.closest("kemet-radios");this.name=t.name||"radio-button",this.input=this.shadowRoot.querySelector("input"),this.setAttribute("role","radio"),this.checked?this.setAttribute("aria-checked","true"):this.setAttribute("aria-checked","false")}render(){return N`<label part="label"><input type="radio" name="${jt(this.name)}" .value="${this.value}" .checked="${Jt(this.checked)}" .disabled="${this.disabled}" @blur="${()=>this.handleBlur()}" @focus="${()=>this.handleFocus()}"> <button part="button" aria-label="${this.label}">${this.makeDot()}</button> <span part="text">${this.label}</span></label>`}click(){this.input.click()}blur(){this.input.blur()}focus(){this.input.focus()}handleBlur(){this.focused=!1,pt(this,"kemet-radio-focused",!1)}handleFocus(){this.focused=!0,pt(this,"kemet-radio-focused",!0)}makeDot(){return this.checked?N`<span part="dot"></span>`:null}};li.styles=[ni],t([at({type:String})],li.prototype,"label",void 0),t([at({type:Boolean,reflect:!0})],li.prototype,"checked",void 0),t([at({type:String})],li.prototype,"name",void 0),t([at({type:String})],li.prototype,"value",void 0),t([at({type:Boolean,reflect:!0})],li.prototype,"disabled",void 0),t([at({type:Boolean,reflect:!0})],li.prototype,"focused",void 0),t([at({type:Boolean,reflect:!0})],li.prototype,"filled",void 0),t([lt()],li.prototype,"input",void 0),li=t([rt("kemet-radio")],li);let di=class extends it{constructor(){super(),this.legend="",this.axis="horizontal",this.name="radios",this.status="standard",this.formSubmitController=new _t(this)}firstUpdated(){this.radios=this.querySelectorAll("kemet-radio"),this.setAttribute("role","radiogroup")}render(){return N`<fieldset part="fieldset">${""!==this.legend?N`<legend part="legend">${this.legend}</legend>`:null}<slot @click="${t=>this.handleClick(t)}" @keydown="${t=>this.handleKeyDown(t)}" @slotchange="${()=>this.handleSlotChange()}"></slot></fieldset>${this.makeMessage()}`}handleClick(t){const{target:e}=t;this.radios.forEach((t=>{t.checked=!1,t.tabIndex=t===e?0:-1,t.setAttribute("aria-checked","false")})),e.disabled||(e.checked=!0,e.setAttribute("aria-checked","true"),this.value=e.value,this.status="standard",pt(this,"kemet-radios-change",e))}handleKeyDown(t){var e;const o=Array.from(this.radios),i=["ArrowRight","ArrowDown"].includes(t.key)?1:-1;let s=(null!==(e=o.findIndex((t=>t.checked)))&&void 0!==e?e:o[0])+i;["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"].includes(t.key)&&(s<0&&(s=o.length-1),s>o.length-1&&(s=0),this.radios.forEach((t=>{t.checked=!1,t.tabIndex=-1})),this.radios[s].focus(),this.radios[s].checked=!0,this.radios[s].tabIndex=0)}handleSlotChange(){const t=Array.from(this.radios).find((t=>t.checked));this.radios.forEach((t=>{t.tabIndex=-1,t.input.tabIndex=-1})),t&&(t.tabIndex=0)}makeMessage(){return"error"===this.status||"warning"===this.status?N`<span part="message">${this.message}</span>`:null}checkValidity(){return!this.required||!!this.value}};di.styles=[ai],t([at({type:String})],di.prototype,"legend",void 0),t([at({type:String,reflect:!0})],di.prototype,"axis",void 0),t([at({type:String})],di.prototype,"value",void 0),t([at({type:String})],di.prototype,"name",void 0),t([at({type:String,reflect:!0})],di.prototype,"status",void 0),t([at({type:String})],di.prototype,"message",void 0),t([at({type:String})],di.prototype,"required",void 0),t([lt()],di.prototype,"radios",void 0),di=t([rt("kemet-radios")],di);
81
+ */})(t),e}}),Tt=a`*,::after,::before{box-sizing:border-box}:host{display:inline-block}:host([disabled]){opacity:.5}label{display:inline-flex;gap:.5rem;align-items:center}input{cursor:pointer;margin:0;padding:0;width:var(--kemet-checkbox-size,18px);height:var(--kemet-checkbox-size,18px);position:absolute;opacity:0}button{margin:0;border:none;background:0 0}[part=checkbox]{color:var(--kemet-checkbox-color,var(--kemet-color-background));display:flex;align-items:center;justify-content:center;width:var(--kemet-checkbox-size,18px);height:var(--kemet-checkbox-size,18px);border:var(--kemet-checkbox-border,1px solid var(--kemet-color-background))}:host([rounded]) [part=checkbox]{border-radius:var(--kemet-checkbox-border-radius,4px)}:host([filled][checked]) [part=checkbox],:host([filled][indeterminate]) [part=checkbox]{border:none;background-color:var(--kemet-checkbox-filled-background-color,var(--kemet-color-primary))}[part=mark]{display:flex;width:calc(var(--kemet-checkbox-size,18px) - 4px);height:calc(var(--kemet-checkbox-size,18px) - 4px)}:host([filled][checked]) [part=mark],:host([filled][indeterminate]) [part=mark]{color:var(--kemet-checkbox-filled-color,var(--kemet-color-white))}[part=message]{display:block;margin-top:.5rem}:host([status=error]) [part=message]{color:var(--kemet-color-error)}:host([status=warning]) [part=message]{color:var(--kemet-color-error)}`;let Mt=class extends it{constructor(){super(),this.label="",this.name="checkbox",this.disabled=!1,this.required=!1,this.rounded=!1,this.filled=!1,this.status="standard",this.formSubmitController=new $t(this)}render(){return U`<label part="label"><input type="checkbox" name="${At(this.name)}" .value="${this.value}" .indeterminate="${Pt(this.indeterminate)}" .checked="${Pt(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" @click="${()=>this.handleClick()}" @blur="${()=>this.handleBlur()}" @focus="${()=>this.handleFocus()}" @change="${()=>this.handleChange()}"> <button part="checkbox" aria-label="${this.label}">${this.makeCheckMark()}</button> <span part="text">${this.label}</span></label> ${this.makeMessage()}`}click(){this.input.click()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,yt(this,"kemet-checkbox-change",this)}handleBlur(){this.focused=!1,yt(this,"kemet-checkbox-focused",!1)}handleFocus(){this.focused=!0,yt(this,"kemet-checkbox-focused",!0)}handleChange(){this.value=this.checked,this.input.checkValidity()&&(this.status="standard")}makeMessage(){return"error"===this.status||"warning"===this.status?U`<span part="message">${this.message}</span>`:null}makeCheckMark(){return this.checked?U`<span part="mark"><svg viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round"><g stroke="currentColor" stroke-width="2"><g transform="translate(3.428571, 3.428571)"><path d="M0,5.71428571 L3.42857143,9.14285714"></path><path d="M9.14285714,0 L3.42857143,9.14285714"></path></g></g></g></svg></span>`:!this.checked&&this.indeterminate?U`<span part="mark"><svg viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round"><g stroke="currentColor" stroke-width="2"><g transform="translate(2.285714, 6.857143)"><path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path></g></g></g></svg></span>`:null}checkValidity(){return this.input.checkValidity()}};Mt.styles=[Tt],t([at({type:String})],Mt.prototype,"label",void 0),t([at({type:Boolean,reflect:!0})],Mt.prototype,"checked",void 0),t([at({type:Boolean,reflect:!0})],Mt.prototype,"indeterminate",void 0),t([at({type:String})],Mt.prototype,"name",void 0),t([at({type:String})],Mt.prototype,"value",void 0),t([at({type:Boolean,reflect:!0})],Mt.prototype,"disabled",void 0),t([at({type:Boolean,reflect:!0})],Mt.prototype,"required",void 0),t([at({type:Boolean,reflect:!0})],Mt.prototype,"focused",void 0),t([at({type:Boolean,reflect:!0})],Mt.prototype,"rounded",void 0),t([at({type:Boolean,reflect:!0})],Mt.prototype,"filled",void 0),t([at({type:String,reflect:!0})],Mt.prototype,"status",void 0),t([at({type:String})],Mt.prototype,"message",void 0),t([ct("input")],Mt.prototype,"input",void 0),Mt=t([rt("kemet-checkbox")],Mt);let Ut=class extends it{render(){return U`<slot></slot>`}};Ut.styles=[vt],Ut=t([rt("kemet-avatars")],Ut);const Nt=a`:host{display:inline-flex;align-items:center;justify-content:center;padding:var(--kemet-badge-padding,10px);line-height:1;color:var(--kemet-color-white)}:host([status=primary]){background-color:var(--kemet-color-primary)}:host([status=success]){background-color:var(--kemet-color-success)}:host([status=standard]){background-color:var(--kemet-color-gray6)}:host([status=warning]){background-color:var(--kemet-color-warning)}:host([status=error]){background-color:var(--kemet-color-error)}:host([circle]){border-radius:50%}:host([pill]){border-radius:99rem}`;let Xt=class extends it{constructor(){super(...arguments),this.status="primary",this.circle=!1,this.pill=!1,this.circlePadding=0}render(){return U`<slot @slotchange="${()=>this.handleSlotChange()}"></slot>`}handleSlotChange(){this.circle&&(this.style.height=`${this.offsetWidth+this.circlePadding}px`,this.style.width=`${this.offsetWidth+this.circlePadding}px`)}};Xt.styles=[Nt],t([at({type:String,reflect:!0})],Xt.prototype,"status",void 0),t([at({type:Boolean,reflect:!0})],Xt.prototype,"circle",void 0),t([at({type:Boolean,reflect:!0})],Xt.prototype,"pill",void 0),t([at({type:Number,attribute:"circle-padding"})],Xt.prototype,"circlePadding",void 0),Xt=t([rt("kemet-badge")],Xt);const qt=a`:host{opacity:0;width:var(--kemet-combo-width,calc(100% - 2px));margin:var(--kemet-combo-margin,1rem auto);pointer-events:none;display:block;position:relative;transition:opacity .3s ease-in-out}:host([show]){opacity:1;pointer-events:auto}ul{width:100%;max-height:var(--kemet-combo-max-height,calc(5 * 3rem));position:absolute;z-index:1;list-style:none;margin:0;padding:0;overflow-y:scroll;border:var(--kemet-combo-border,1px solid var(--kemet-color-background));border-radius:var(--kemet-combo-border-radius,var(--kemet-border-radius));background-color:var(--kemet-combo-background-color,var(--kemet-color-white-to-black));box-shadow:var(--kemet-combo-shadow,var(--kemet-elevation-layer5))}li{line-height:3rem;padding:0 1.5rem;cursor:pointer}li:focus,li:hover{color:var(--kemet-combo-hover-color,var(--kemet-color-white));outline:0;background-color:var(--kemet-combo-hover-background-color,var(--kemet-color-primary))}`;let Rt=class extends it{constructor(){super(...arguments),this.options=[]}firstUpdated(){this.field=this.closest("kemet-field"),this.input=this.field.querySelector('[slot="input"]'),this.slug=this.field.slug||"slug",this.input.addEventListener("kemet-input-input",this.handleInput.bind(this)),this.input.addEventListener("keydown",(t=>this.handleInputKeyDown(t)))}render(){var t;return U`<div role="combobox" part="combobox" aria-expanded="${this.show}" aria-controls="${this.slug}-listbox" aria-haspopup="listbox" id="${this.slug}-combobox" aria-label="${null===(t=this.field)||void 0===t?void 0:t.label}"><ul role="listbox" aria-labelledby="${this.slug}-label" id="${this.slug}-listbox" part="listbox">${this.makeOptions()}</ul></div>`}makeOptions(){if(this.input){this.filteredOptions=this.options.filter((t=>{var e;return-1!==t.toLowerCase().indexOf(null===(e=this.input.value)||void 0===e?void 0:e.toLowerCase())}));return this.filteredOptions.map(((t,e)=>U`<li id="${this.slug}-option-${e}" role="option" tabindex="0" aria-selected="false" @click="${t=>this.handleSelection(t)}" @keydown="${t=>this.handleOptionKeyDown(t)}">${t}</li>`))}return null}handleInput(t){this.makeOptions(),t.detail.length>0?this.show=!0:this.show=!1}handleSelection(t){this.input.value=t.target.innerText,this.show=!1,yt(this,"kemet-combo-section",{element:t.target,text:t.target.innerText,id:t.target.getAttribute("id")})}handleOptionKeyDown(t){if(t.preventDefault(),"ArrowDown"===t.code){const e=t.target.nextElementSibling;e?e.focus():this.shadowRoot.querySelector("li").focus()}if("ArrowUp"===t.code){const e=t.target.previousElementSibling,o=this.shadowRoot.querySelector("li:last-child");e?e.focus():o.focus()}"Escape"!==t.code&&"Tab"!==t.code||(this.show=!1,this.input.focus()),"Enter"!==t.code&&"Space"!==t.code||this.handleSelection(t)}handleInputKeyDown(t){"ArrowDown"===t.code&&this.shadowRoot.querySelector("li").focus(),"Escape"===t.code&&(this.show=!1)}};Rt.styles=[qt],t([at({type:String})],Rt.prototype,"slug",void 0),t([at({type:Array})],Rt.prototype,"options",void 0),t([at({type:Boolean,reflect:!0})],Rt.prototype,"show",void 0),t([lt()],Rt.prototype,"filteredOptions",void 0),t([lt()],Rt.prototype,"field",void 0),t([lt()],Rt.prototype,"input",void 0),Rt=t([rt("kemet-combo")],Rt);const jt=a`*,::after,::before{box-sizing:border-box}:host{--kemet-card-padding:1rem;--kemet-card-border-color:var(--kemet-color-gray4);color:var(--kemet-card-color,var(--kemet-color-black));display:inline-flex;flex-direction:column;max-width:var(--kemet-card-max-width,360px);border:var(--kemet-card-border,1px solid var(--kemet-card-border-color));border-radius:var(--kemet-card-border-radius,0);background-color:var(--kemet-card-background-color,var(--kemet-color-white))}:host([center]){align-items:center;text-align:center}.body{padding:var(--kemet-card-body-padding,var(--kemet-card-padding))}.media{position:relative}::slotted(*){max-width:100%}::slotted(img){display:flex;max-width:100%}::slotted([slot=header]){padding:var(--kemet-card-header-padding,var(--kemet-card-padding));border-bottom:var(--kemet-card-header-border-bottom,1px solid var(--kemet-card-border-color))}::slotted([slot=caption]){color:var(--kemet-card-caption-color,var(--kemet-color-white));position:absolute;bottom:0;width:100%;padding:var(--kemet-card-caption-padding,calc(var(--kemet-card-padding)/ 2) var(--kemet-card-padding));background-color:var(--kemet-card-caption-background-color,rgba(0,0,0,.35))}::slotted([slot=footer]){padding:var(--kemet-card-footer-padding,var(--kemet-card-padding));border-top:var(--kemet-card-footer-border-top,1px solid var(--kemet-card-border-color))}`;let Ht=class extends it{render(){return U`<slot name="header"></slot><div class="media" part="media"><slot name="media"></slot><slot name="caption"></slot></div><div class="body" part="body"><slot></slot></div><slot name="footer"></slot>`}};Ht.styles=[jt],t([at({type:Boolean,reflect:!0})],Ht.prototype,"center",void 0),Ht=t([rt("kemet-card")],Ht);let Yt=class extends it{firstUpdated(){this.field=this.closest("kemet-field"),this.inputSlot=this.field.querySelector('[slot="input"]'),this.remaining=this.limit-this.field.length,this.field.addEventListener("kemet-field-input",(t=>{this.remaining=this.limit-t.detail;const e=this.input||this.textarea;e&&(this.remaining<0?this.validateImmediately&&(this.inputSlot.status="error",this.inputSlot.invalid=!0,yt(this,"kemet-count-status",{status:"error",validity:e.validity,element:this.inputSlot})):(this.inputSlot.status="standard",e.checkValidity(),yt(this,"kemet-count-status",{status:"standard",validity:e.validity,element:this.inputSlot})))})),this.input=this.inputSlot.shadowRoot.querySelector("input"),this.textarea=this.inputSlot.shadowRoot.querySelector("textarea")}render(){return U`${this.remaining} ${this.message}`}};Yt.styles=[a`:host{display:block;font-size:var(--kemet-count-font-size,90%);margin-top:.8rem}`],t([at({type:String})],Yt.prototype,"message",void 0),t([at({type:Number})],Yt.prototype,"remaining",void 0),t([at({type:Number})],Yt.prototype,"limit",void 0),t([at({type:Boolean,attribute:"validate-immediately"})],Yt.prototype,"validateImmediately",void 0),t([lt()],Yt.prototype,"field",void 0),t([lt()],Yt.prototype,"inputSlot",void 0),t([lt()],Yt.prototype,"input",void 0),t([lt()],Yt.prototype,"textarea",void 0),Yt=t([rt("kemet-count")],Yt);let Vt=class extends it{firstUpdated(){this.carousel=this.closest("kemet-carousel")}updated(){var t;this.current=(null===(t=this.carousel)||void 0===t?void 0:t.index)+1}render(){return U`${this.current}`}};Vt.styles=[a`:host{display:inline-block}`],t([at({type:Number})],Vt.prototype,"current",void 0),t([lt()],Vt.prototype,"carousel",void 0),Vt=t([rt("kemet-carousel-current")],Vt);let Ft=class extends it{constructor(){super(...arguments),this.top="auto",this.left="auto",this.measure=!1}firstUpdated(){this.position1=0,this.position2=0,this.position3=0,this.position4=0,this.mouseMove=t=>this.drag(t),this.mouseUp=()=>this.stopDrag();const t=JSON.parse(localStorage.getItem(this.memory));t&&(this.top=t.top,this.left=t.left),this.measure&&this.measureContent()}render(){return U`<div id="draggable" @mousedown="${t=>this.startDrag(t)}" style="top:${this.top};left:${this.left}"><slot></slot></div>`}startDrag(t){t&&(t.preventDefault(),this.position3=t.clientX,this.position4=t.clientY),document.addEventListener("mouseup",this.mouseUp),document.addEventListener("mousemove",this.mouseMove),yt(this,"kemet-draggable-start",this)}drag(t){var e,o;t.preventDefault(),this.position1=this.position3-t.clientX,this.position2=this.position4-t.clientY,this.position3=t.clientX,this.position4=t.clientY,this.top=(null===(e=this.draggableElement)||void 0===e?void 0:e.offsetTop)-this.position2+"px",this.left=(null===(o=this.draggableElement)||void 0===o?void 0:o.offsetLeft)-this.position1+"px"}stopDrag(){if(document.removeEventListener("mouseup",this.mouseUp),document.removeEventListener("mousemove",this.mouseMove),this.memory){const t={top:this.top,left:this.left};localStorage.setItem(this.memory,JSON.stringify(t))}yt(this,"kemet-draggable-stop",this)}measureContent(){var t,e;this.style.width=`${null===(t=this.draggableElement)||void 0===t?void 0:t.offsetWidth}px`,this.style.height=`${null===(e=this.draggableElement)||void 0===e?void 0:e.offsetHeight}px`}};Ft.styles=[a`:host{display:inline-block}#draggable{position:absolute}`],t([at({type:String})],Ft.prototype,"memory",void 0),t([at({type:String})],Ft.prototype,"top",void 0),t([at({type:String})],Ft.prototype,"left",void 0),t([at({type:Boolean})],Ft.prototype,"measure",void 0),t([lt()],Ft.prototype,"position1",void 0),t([lt()],Ft.prototype,"position2",void 0),t([lt()],Ft.prototype,"position3",void 0),t([lt()],Ft.prototype,"position4",void 0),t([lt()],Ft.prototype,"mouseMove",void 0),t([lt()],Ft.prototype,"mouseUp",void 0),t([ct("#draggable")],Ft.prototype,"draggableElement",void 0),Ft=t([rt("kemet-draggable")],Ft);const Wt=`${document.documentElement.scrollHeight}px`,Kt=a`*,::after,::before{box-sizing:border-box}:host{width:100%}.off-canvas{position:relative;overflow:hidden}.off-canvas__nav{position:fixed;top:0;left:0;z-index:100;visibility:hidden;height:100%;transition:all .5s}.off-canvas__nav::after{position:absolute;top:0;right:0;width:100%;height:100%;background:rgba(0,0,0,.2);content:'';opacity:1;transition:opacity .5s}:host([opened]) .off-canvas__nav::after{width:0;height:0;opacity:0;transition:opacity .5s,width .1s .5s,height .1s .5s}.off-canvas__pusher{position:relative;left:0;z-index:99;height:100%;transition:transform .5s}:host([overlay]) .off-canvas__pusher::after{position:absolute;top:0;right:0;width:0;height:0;background:var(--kemet-drawer-overlay-color,rgba(0,0,0,.2));content:'';opacity:0;transition:opacity .5s,width .1s .5s,height .1s .5s}:host([opened]) .off-canvas__pusher::after{width:100%;height:100%;opacity:1;transition:opacity .5s;transform:scale(2)}.off-canvas__content{position:relative;min-height:100vh}.off-canvas__wrapper{position:relative}::slotted([slot=content]){min-height:100vh}.off-canvas__nav{width:var(--kemet-drawer-width,300px);height:var(--kemet-drawer-height,100%);color:var(--kemet-drawer-color,#fafafa);background:var(--kemet-drawer-background-color,#202020)}`,Jt=a`:host([effect=slide]) .off-canvas__nav{visibility:visible;transform:translate3d(-100%,0,0)}:host([effect=slide][opened]) .off-canvas__nav{visibility:visible;transform:translate3d(0,0,0)}:host([effect=slide]) .off-canvas__nav:after{display:none}:host([effect=slide][side=right]) .off-canvas__nav{transform:translate3d(100vw,0,0)}:host([effect=slide][side=right][opened]) .off-canvas__nav{transform:translate3d(calc(100vw - var(--kemet-drawer-width,300px)),0,0)}:host([effect=slide][side=top]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=slide][side=top][opened]) .off-canvas__nav{transform:translate3d(0,0,0)}:host([effect=slide][side=bottom]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,${n(Wt)},0)}:host([effect=slide][side=bottom][opened]) .off-canvas__nav{transform:translate3d(0,calc(100vh - var(--kemet-drawer-height,100vh)),0)}:host([effect=reveal][opened]) .off-canvas__pusher{transform:translate3d(var(--kemet-drawer-width,300px),0,0)}:host([effect=reveal]) .off-canvas__nav{z-index:1}:host([effect=reveal][opened]) .off-canvas__nav{visibility:visible;transition:transform .5s}:host([effect=reveal]) .off-canvas__nav::after{display:none}:host([effect=reveal][side=right][opened]) .off-canvas__pusher{transform:translate3d(0,0,0)}:host([effect=reveal][side=right]) .off-canvas__nav{transform:translate3d(100vw,0,0)}:host([effect=reveal][side=right][opened]) .off-canvas__nav{transform:translate3d(calc(100vw - var(--kemet-drawer-width,300px)),0,0)}:host([effect=reveal][side=top]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=reveal][side=top][opened]) .off-canvas__nav{transform:translate3d(0,0,0)}:host([effect=reveal][side=top][opened]) .off-canvas__pusher{transform:translate3d(0,var(--kemet-drawer-height,100vh),0)}:host([effect=reveal][side=bottom]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,${n(Wt)},0)}:host([effect=reveal][side=bottom][opened]) .off-canvas__nav{transform:translate3d(0,calc(100vh - var(--kemet-drawer-height,100vh)),0)}:host([effect=reveal][side=bottom][opened]) .off-canvas__pusher{transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=push][opened]) .off-canvas__pusher{transform:translate3d(var(--kemet-drawer-width,300px),0,0)}:host([effect=push]) .off-canvas__nav{transform:translate3d(-100%,0,0)}:host([effect=push][opened]) .off-canvas__nav{visibility:visible;transition:transform .5s;transform:translate3d(0,0,0)}:host([effect=push]) .off-canvas__nav::after{display:none}:host([effect=push][side=right][opened]) .off-canvas__pusher{transform:translate3d(calc(var(--kemet-drawer-width,300px) * -1),0,0)}:host([effect=push][side=right]) .off-canvas__nav{transform:translate3d(100vw,0,0)}:host([effect=push][side=right][opened]) .off-canvas__nav{transform:translate3d(calc(100vw - var(--kemet-drawer-width,300px)),0,0)}:host([effect=push][side=top]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=push][side=top][opened]) .off-canvas__nav{transform:translate3d(0,0,0)}:host([effect=push][side=top][opened]) .off-canvas__pusher{transform:translate3d(0,var(--kemet-drawer-height,100vh),0)}:host([effect=push][side=bottom]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,${n(Wt)},0)}:host([effect=push][side=bottom][opened]) .off-canvas__nav{transform:translate3d(0,calc(100vh - var(--kemet-drawer-height,100vh)),0)}:host([effect=push][side=bottom][opened]) .off-canvas__pusher{transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=scale]) .off-canvas__pusher{transform-style:preserve-3d}:host([effect=scale][opened]) .off-canvas__pusher{transform:translate3d(0,0,0) scale(.95)}:host([effect=scale]) .off-canvas__nav{opacity:1;transform:translate3d(-100%,0,0)}:host([effect=scale][opened]) .off-canvas__nav{visibility:visible;transition:transform .5s;transform:translate3d(0,0,0)}:host([effect=scale]) .off-canvas__nav::after{display:none}:host([effect=scale][side=right]) .off-canvas__nav{transform:translate3d(100vw,0,0)}:host([effect=scale][side=right][opened]) .off-canvas__nav{transform:translate3d(calc(100vw - var(--kemet-drawer-width,300px)),0,0)}:host([effect=scale][side=top]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,calc(var(--kemet-drawer-height,100vh) * -1),0)}:host([effect=scale][side=top][opened]) .off-canvas__nav{transform:translate3d(0,0,0)}:host([effect=scale][side=bottom]) .off-canvas__nav{width:100vw;height:var(--kemet-drawer-height,100vh);transform:translate3d(0,${n(Wt)},0)}:host([effect=scale][side=bottom][opened]) .off-canvas__nav{transform:translate3d(0,calc(100vh - var(--kemet-drawer-height,100vh)),0)}`;let Zt=class extends it{constructor(){super(...arguments),this.opened=void 0,this.effect="slide",this.side="left",this.overlay=!1}firstUpdated(){this.addEventListener("click",(t=>{const e=t.target;this.opened&&"kemet-drawer"===e.tagName.toLowerCase()&&(this.opened=!1)}))}updated(t){t.get("opened")||!0!==this.opened||yt(this,"kemet-drawer-opened",this),t.get("opened")&&!1===this.opened&&yt(this,"kemet-drawer-closed",this)}render(){return U`<section class="off-canvas" part="container"><nav class="off-canvas__nav" part="drawer" title="Drawer"><slot name="navigation"></slot></nav><div class="off-canvas__pusher" part="pusher"><div class="off-canvas__content" part="content"><div class="off-canvas__wrapper" part="wrapper"><slot name="content"></slot></div></div></div></section>`}};Zt.styles=[Kt,Jt],t([at({type:Boolean,reflect:!0})],Zt.prototype,"opened",void 0),t([at({type:String,reflect:!0})],Zt.prototype,"effect",void 0),t([at({type:String,reflect:!0})],Zt.prototype,"side",void 0),t([at({type:Boolean,reflect:!0})],Zt.prototype,"overlay",void 0),Zt=t([rt("kemet-drawer")],Zt);let Gt=class extends it{render(){return U`<span tabindex="0" @keyup="${()=>this.last()}" @click="${()=>this.last()}"><slot></slot></span>`}last(){this.disabled||yt(this,"kemet-carousel-last",this)}};Gt.styles=[a`:host{cursor:pointer}:host([disabled]){cursor:not-allowed}`],t([at({type:Boolean,reflect:!0})],Gt.prototype,"disabled",void 0),Gt=t([rt("kemet-carousel-last")],Gt);let Qt=class extends it{render(){return U`<span tabindex="0" @keyup="${()=>this.first()}" @click="${()=>this.first()}"><slot></slot></span>`}first(){this.disabled||yt(this,"kemet-carousel-first",this)}};Qt.styles=[a`:host{cursor:pointer}:host([disabled]){cursor:not-allowed}`],t([at({type:Boolean,reflect:!0})],Qt.prototype,"disabled",void 0),Qt=t([rt("kemet-carousel-first")],Qt);let te=class extends it{render(){return U`<span tabindex="0" @keyup="${()=>this.changed()}" @click="${()=>this.changed()}"><slot></slot></span>`}changed(){this.disabled||yt(this,"kemet-carousel-link",this)}};te.styles=[a`:host([selected]){color:var(--kemet-carousel-link-selected-color,var(--kemet-color-primary))}:host(:not([selected])){cursor:pointer}:host([disabled]){cursor:not-allowed}`],t([at({type:Number,reflect:!0})],te.prototype,"slide",void 0),t([at({type:Boolean,reflect:!0})],te.prototype,"selected",void 0),t([at({type:Boolean,reflect:!0})],te.prototype,"disabled",void 0),te=t([rt("kemet-carousel-link")],te);let ee=class extends it{render(){return U`<span tabindex="0" @keyup="${()=>this.next()}" @click="${()=>this.next()}"><slot></slot></span>`}next(){this.disabled||yt(this,"kemet-carousel-next",this)}};ee.styles=[a`:host{cursor:pointer}:host([disabled]){cursor:not-allowed}`],t([at({type:Boolean,reflect:!0})],ee.prototype,"disabled",void 0),ee=t([rt("kemet-carousel-next")],ee);let oe=class extends it{render(){return U`<span tabindex="0" @keyup="${()=>this.prev()}" @click="${()=>this.prev()}"><slot></slot></span>`}prev(){this.disabled||yt(this,"kemet-carousel-prev",this)}};oe.styles=[a`:host{cursor:pointer}:host([disabled]){cursor:not-allowed}`],t([at({type:Boolean,reflect:!0})],oe.prototype,"disabled",void 0),oe=t([rt("kemet-carousel-prev")],oe);let ie=class extends it{constructor(){super(),this.selected=!1,this["aria-hidden"]="true"}static get properties(){return{"aria-hidden":{type:String,reflect:!0}}}render(){return U`<slot></slot>`}};ie.styles=[a`::after,:host,:host *,:host ::before{box-sizing:border-box}:host{flex:0 0 auto}`],t([at({type:Boolean,reflect:!0})],ie.prototype,"selected",void 0),ie=t([rt("kemet-carousel-slide")],ie);let se=class extends it{firstUpdated(){this.carousel=this.closest("kemet-carousel")}updated(){var t;this.total=null===(t=this.carousel)||void 0===t?void 0:t.total}render(){return U`${this.total}`}};se.styles=[a`:host{display:inline-block}`],t([at({type:Number})],se.prototype,"total",void 0),t([lt()],se.prototype,"carousel",void 0),se=t([rt("kemet-carousel-total")],se);const re=a`*,::after,::before,:host{box-sizing:border-box}:host{position:relative;display:grid;grid-template-columns:minmax(0,1fr);align-items:center;width:var(--kemet-carousel-width,100%);height:var(--kemet-carousel-height,auto);overflow:visible}:host([arrows]){grid-template-columns:auto minmax(0,1fr) auto}.toolbar{display:flex;gap:var(--kemet-carousel-toolbar-gap,1rem);align-items:center;justify-content:var(--kemet-carousel-toolbar-justify-content,center);line-height:1;padding:var(--kemet-carousel-toolbar-padding,1rem)}:host([inner]) .toolbar{width:var(--kemet-carousel-toolbar-inner-width,100%);position:absolute;bottom:var(--kemet-carousel-toolbar-inner-bottom,0);top:var(--kemet-carousel-toolbar-inner-top,auto);color:var(--kemet-carousel-toolbar-inner-color,var(--kemet-color-white));background-color:var(--kemet-carousel-toolbar-inner-background-color,rgba(0,0,0,.4))}.slides{overflow:hidden;position:relative;padding:1rem 0;border:var(--kemet-carousel-slides-border,1px solid var(--kemet-color-gray1))}.slider{display:flex;flex-wrap:nowrap;transition:transform var(--kemet-carousel-transition-speed,300ms) ease}::slotted([slot=next]),::slotted([slot=prev]){opacity:var(--kemet-carousel-arrows-opacity,.25);transition:opacity var(--kemet-carousel-arrows-transition-speed,300ms) ease-in-out}:host(:hover) ::slotted([slot=next]),:host(:hover) ::slotted([slot=prev]){opacity:var(--kemet-carousel-arrows-opacity-hover,1)}`;let ne=class extends it{constructor(){super(),this.index=0,this.total=0,this.sliderWidth="auto",this.sliderTranslateX="0",this.inner=!1,this.arrows=!1,this.options={perView:1,perMove:1,gap:12,slideshow:0,rewind:!0,center:!1},this.breakpoints={768:{perView:2,gap:24,rewind:!1},1280:{perView:2.5,center:!0}},this.slides=[],this.links=[],this.addEventListener("kemet-carousel-first",this.handleFirst.bind(this)),this.addEventListener("kemet-carousel-last",this.handleLast.bind(this)),this.addEventListener("kemet-carousel-next",this.handleNext.bind(this)),this.addEventListener("kemet-carousel-prev",this.handlePrev.bind(this)),this.addEventListener("kemet-carousel-link",this.handleLink.bind(this))}firstUpdated(){var t;this.toolbarSlotElement=this.querySelector('[slot="toolbar"]'),this.informationElement=this.querySelector("kemet-carousel-information"),window.addEventListener("resize",(()=>{this.setSlideSize(),this.setToolbarSize(),this.updateIndex(this.index)})),null===(t=this.sliderElement)||void 0===t||t.addEventListener("transitionend",this.handleTransitionEnd.bind(this)),this.swipeMove=t=>{t.preventDefault();const e=t.touches?t.touches[0].pageX:t.pageX,o=this.slides[this.index];this.sliderTranslateX=e-this.startX-o.offsetLeft+"px"},this.handleSlideShow=()=>{this.getOption("slideshow")>0&&(this.updateIndex(this.index+1),clearTimeout(this.handleSlideShow))},this.setSlideSize(),this.goToSlide(this.index)}updated(t){this.setSlideSize(),this.setToolbarSize(),t.has("index")&&(this.updateIndex(this.index),setTimeout(this.handleSlideShow,1e3*this.getOption("slideshow")))}render(){return U`<slot name="prev" @slotchange="${this.handleArrows}"></slot><div id="container" class="container" part="container"><section id="slides" class="slides" part="slides" @mousedown="${this.swipeStart}" @mouseup="${this.swipeEnd}" @touchstart="${this.swipeStart}" @touchend="${this.swipeEnd}" @mouseleave="${this.swipeLeave}"><div id="slider" class="slider" part="slider" style="width:${this.sliderWidth};transform:translateX(${this.sliderTranslateX})"><slot name="slides" @slotchange="${this.handleSlotChange}"></slot></div></section>${this.makeToolbar()}</div><slot name="next" @slotchange="${this.handleArrows}"></slot>`}swipeStart(t){this.startX=t.touches?t.touches[0].pageX:t.pageX,this.addEventListener("mousemove",this.swipeMove),this.addEventListener("touchmove",this.swipeMove)}swipeEnd(t){this.updateIndex(this.swipeUpdate(t)),this.removeEventListener("mousemove",this.swipeMove,!1),this.removeEventListener("touchmove",this.swipeMove,!1)}swipeUpdate(t){const e=t.changedTouches?t.changedTouches[0].pageX:t.pageX,o=this.startX>e?"right":"left",i=this.slidesElement.offsetWidth/3,s=this.startX-e,r=Math.abs(s)>i;let{index:n}=this;return r&&"right"===o&&(n=this.index>=this.slides.length-1?this.index:this.index+1),r&&"left"===o&&(n=this.index<1?0:this.index-1),n}swipeLeave(){this.updateIndex(this.index),this.removeEventListener("mousemove",this.swipeMove,!1),this.removeEventListener("touchmove",this.swipeMove,!1)}setSlideSize(){var t;this.slideWidth=(null===(t=this.containerElement)||void 0===t?void 0:t.offsetWidth)/this.getOption("perView"),this.slides.forEach((t=>{t.style.marginLeft=this.getOption("gap")/2+"px",t.style.marginRight=this.getOption("gap")/2+"px",t.style.width=this.slideWidth-this.getOption("gap")+"px"})),this.sliderWidth=this.slideWidth*this.slides.length+"px"}setToolbarSize(){if(this.inner&&this.toolbarElement){const t=this.slidesElement.offsetWidth;this.toolbarElement.style.width=`${t}px`}}makeToolbar(){return this.toolbarSlotElement?U`<section id="toolbar" class="toolbar" part="toolbar"><slot name="toolbar"></slot></section>`:null}handleSlotChange(){const t=this.querySelectorAll("kemet-carousel-slide"),e=this.querySelectorAll("kemet-carousel-link");t.forEach((t=>{this.slides.push(t)})),this.updateInformation(),this.total=t.length,t[this.index].selected=!0,e.forEach((t=>{this.links.push(t)}))}handleArrows(){this.arrows=!0}handleFirst(){this.updateIndex(0)}handleLast(){this.updateIndex(this.slides.length-1)}handleNext(){let t=this.index+this.getOption("perMove");t>=this.slides.length&&(t=this.getOption("rewind")?0:this.index),this.updateIndex(t)}handlePrev(){let t=this.index-this.getOption("perMove");t<0&&(t=this.getOption("rewind")?this.slides.length-1:this.index),this.updateIndex(t)}updateIndex(t){let e=this.slides[this.index],o=this.links[t];this.links.forEach((t=>{t.selected=!1})),o||([o]=this.links),o&&(o.selected=!0),e&&(e.setAttribute("aria-hidden","true"),t>-1&&t<this.slides.length?this.index=t:(console.warn("An invalid index number was entered. The kemet-carousel has been reset to the first slide."),this.index=0),this.goToSlide(this.index),e=this.slides[this.index],e.setAttribute("aria-hidden","false"),this.slides.forEach((t=>{t.selected=!1})),e.selected=!0,yt(this,"kemet-carousel-change-start",this),this.updateInformation())}updateInformation(){this.informationSlot=this.slides[this.index].querySelector('[slot="information"]'),this.informationElement&&(this.informationSlot?this.informationElement.innerHTML=this.informationSlot.outerHTML:this.informationElement.innerHTML="")}goToSlide(t){if(!0===this.getOption("center")){const e=this.slidesElement.offsetWidth/2,o=this.slideWidth*t;this.sliderTranslateX=o-(o-e)-this.slideWidth/2-o+"px"}else this.sliderTranslateX=this.slideWidth*t*-1+"px"}handleTransitionEnd(){const t=this.querySelector("kemet-carousel-current");t&&(t.current=this.index+1),yt(this,"kemet-carousel-change-finished",this)}handleLink(t){this.updateIndex(t.detail.slide)}getOption(t){const e=Object.keys(this.breakpoints);let o=this.options[t];return e.forEach((e=>(window.matchMedia(`(min-width: ${e}px)`).matches&&void 0!==this.breakpoints[e][t]&&(o=this.breakpoints[e][t]),o))),o}};ne.styles=[re],t([at({type:Number,reflect:!0})],ne.prototype,"index",void 0),t([at({type:Number})],ne.prototype,"total",void 0),t([at({type:String})],ne.prototype,"sliderWidth",void 0),t([at({type:String})],ne.prototype,"sliderTranslateX",void 0),t([at({type:Boolean,reflect:!0})],ne.prototype,"inner",void 0),t([at({type:Boolean,reflect:!0})],ne.prototype,"arrows",void 0),t([at({type:Object})],ne.prototype,"options",void 0),t([at({type:Object})],ne.prototype,"breakpoints",void 0),t([lt()],ne.prototype,"slides",void 0),t([lt()],ne.prototype,"links",void 0),t([lt()],ne.prototype,"toolbarSlotElement",void 0),t([lt()],ne.prototype,"informationElement",void 0),t([lt()],ne.prototype,"swipeMove",void 0),t([lt()],ne.prototype,"handleSlideShow",void 0),t([lt()],ne.prototype,"startX",void 0),t([lt()],ne.prototype,"slideWidth",void 0),t([lt()],ne.prototype,"informationSlot",void 0),t([ct("#container")],ne.prototype,"containerElement",void 0),t([ct("#slides")],ne.prototype,"slidesElement",void 0),t([ct("#slider")],ne.prototype,"sliderElement",void 0),t([ct("#toolbar")],ne.prototype,"toolbarElement",void 0),ne=t([rt("kemet-carousel")],ne);const ae=a`*,::after,::before{box-sizing:border-box}:host{display:block}:host([disabled]){opacity:.5}label{position:relative;display:block}label span{color:inherit;display:inline-flex;gap:.5rem;align-items:center;margin-bottom:.8rem}:host([status=error]) kemet-icon{color:var(--kemet-color-error)}:host([status=success]) kemet-icon{color:var(--kemet-color-success)}:host([status=warning]) kemet-icon{color:var(--kemet-color-warning)}.message{font-size:.9rem;line-height:1;display:block;margin-top:.8rem}:host([status=error]) .message{color:var(--kemet-color-error)}:host([status=success]) .message{color:var(--kemet-color-success)}:host([status=warning]) .message{color:var(--kemet-color-warning)}`;let le=class extends it{constructor(){super(),this.status="standard",this.errorIcon="exclamation-triangle-fill",this.successIcon="check-lg",this.addEventListener("kemet-input-focused",(t=>this.handleFocused(t))),this.addEventListener("kemet-input-status",(t=>this.handleStatus(t))),this.addEventListener("kemet-input-input",(t=>this.handleInput(t))),this.addEventListener("kemet-count-status",(t=>this.handleStatus(t))),this.addEventListener("kemet-combo-selection",(t=>this.handleSelection(t)))}firstUpdated(){this.slotInput=this.querySelector('[slot="input"]'),this.slotCombo=this.querySelector('[slot="combo"]'),this.slotInput.value?this.length=this.slotInput.value.length:this.length=0}render(){return U`<label for="${this.slug}" id="${this.slug}-label" part="label"><span part="text">${this.label}${this.makeStatusIcon()}</span><slot name="input"></slot></label> ${this.makeStatusMessage()}<slot name="component"></slot>`}makeStatusIcon(){return"error"===this.status||"warning"===this.status?U`<kemet-icon icon="${this.errorIcon}" size="16"></kemet-icon>`:"success"===this.status?U`<kemet-icon icon="${this.successIcon}" size="16"></kemet-icon>`:null}makeStatusMessage(){return"standard"!==this.status?U`<span class="message" part="message">${this.message}</span>`:null}handleFocused(t){this.focused=t.detail,!this.focused&&this.slotCombo&&this.slotCombo.options.length<1&&(this.slotCombo.show=!1)}handleStatus(t){this.status=t.detail.status}handleInput(t){yt(this,"kemet-field-input",t.detail.length),""===t.detail?this.filled=!1:this.filled=!0}handleSelection(t){this.slotInput.setAttribute("aria-activedescendant",t.detail)}};le.styles=[ae],t([at({type:String})],le.prototype,"slug",void 0),t([at({type:String})],le.prototype,"label",void 0),t([at({type:String})],le.prototype,"message",void 0),t([at({type:Boolean,reflect:!0})],le.prototype,"focused",void 0),t([at({type:String,reflect:!0})],le.prototype,"status",void 0),t([at({type:Boolean,reflect:!0})],le.prototype,"filled",void 0),t([at({type:Number})],le.prototype,"length",void 0),t([at({type:Boolean,reflect:!0})],le.prototype,"disabled",void 0),t([at({type:String,attribute:"error-icon"})],le.prototype,"errorIcon",void 0),t([at({type:String,attribute:"success-icon"})],le.prototype,"successIcon",void 0),t([lt()],le.prototype,"slotInput",void 0),t([lt()],le.prototype,"slotCombo",void 0),le=t([rt("kemet-field")],le);const de=13,ce=32,he=27;let pe=class extends it{render(){return U`<slot tabindex="0" @click="${()=>this.trigger()}" @keypress="${t=>this.handleKeyup(t)}"></slot>`}trigger(){yt(this,"kemet-flipcard-flipped",this)}handleKeyup(t){t.preventDefault(),t.keyCode===de&&this.trigger()}};pe.styles=[a`:host{cursor:pointer}`],pe=t([rt("kemet-flipcard-trigger")],pe);const ue=a`*,::after,::before{box-sizing:border-box}:host{display:inline-block;width:var(--kemet-flipcard-width,100%);height:var(--kemet-flipcard-height,auto);aspect-ratio:var(--kemet-flipcard-ratio,16/9);perspective:1000px}section{position:relative;width:100%;height:100%;transition:transform .8s;transform-style:preserve-3d}.back,.front{position:absolute;display:flex;width:100%;height:100%;backface-visibility:hidden;border-radius:var(--kemet-flipcard-border-radius,0);border:var(--kemet-flipcard-border,2px solid var(--kemet-color-primary))}:host([rounded]) .back,:host([rounded]) .front{border-radius:var(--kemet-border-radius)}.front{color:var(--kemet-flipcard-front-color,#202020);background-color:var(--kemet-flipcard-front-background-color,#fafafa)}:host([flipped]) .front{z-index:-1}.back{color:var(--kemet-flipcard-back-color,#202020);background-color:var(--kemet-flipcard-back-background-color,#fafafa)}:host([axis=horizontal]) .back{transform:rotateY(180deg)}:host([flipped][axis=horizontal]) section{transform:rotateY(180deg)}:host([axis=vertical]) .back{transform:rotateX(180deg)}:host([flipped][axis=vertical]) section{transform:rotateX(180deg)}:host([flip-on-hover]) section{cursor:pointer}::slotted([slot=back]),::slotted([slot=front]){display:inline-block;margin:auto;position:relative;width:100%;height:100%}`;let fe=class extends it{constructor(){super(),this.axis="horizontal",this.flipped=!1,this.flipOnHover=!1,this.height="auto",this.measure=!1,this.addEventListener("kemet-flipcard-flipped",(()=>{this.flipped=!this.flipped}))}firstUpdated(){this.frontChildren&&([this.frontElement]=this.frontChildren.assignedNodes({flatten:!0})),this.backChildren&&([this.backElement]=this.backChildren.assignedNodes({flatten:!0})),window.addEventListener("resize",this.determineHeight.bind(this))}updated(){this.determineHeight()}render(){return U`<section tabindex="0" part="wrapper" @blur="${()=>{this.flipOnHover&&(this.flipped=!1)}}" @focus="${()=>{this.flipOnHover&&(this.flipped=!0)}}" @mouseover="${()=>{this.flipOnHover&&(this.flipped=!0)}}" @mouseout="${()=>{this.flipOnHover&&(this.flipped=!1)}}"><div id="front" class="front" part="front"><slot name="front" @slotchange="${()=>this.determineHeight()}"></slot></div><div id="back" class="back" part="back"><slot name="back" @slotchange="${()=>this.determineHeight()}"></slot></div></section>`}determineHeight(){setTimeout((()=>{var t,e,o,i;this.measure?((null===(t=this.frontElement)||void 0===t?void 0:t.offsetHeight)>(null===(e=this.backElement)||void 0===e?void 0:e.offsetHeight)?this.height=`${null===(o=this.frontElement)||void 0===o?void 0:o.offsetHeight}px`:this.height=`${null===(i=this.backElement)||void 0===i?void 0:i.offsetHeight}px`,this.style.height=this.height):this.style.removeProperty("height")}),0)}};fe.styles=[ue],t([at({type:String,reflect:!0})],fe.prototype,"axis",void 0),t([at({type:Boolean,reflect:!0})],fe.prototype,"flipped",void 0),t([at({type:Boolean,attribute:"flip-on-hover"})],fe.prototype,"flipOnHover",void 0),t([at({type:String})],fe.prototype,"height",void 0),t([at({type:Boolean})],fe.prototype,"measure",void 0),t([ct('[name="front"]')],fe.prototype,"frontChildren",void 0),t([ct('[name="back"]')],fe.prototype,"backChildren",void 0),t([lt()],fe.prototype,"frontElement",void 0),t([lt()],fe.prototype,"backElement",void 0),fe=t([rt("kemet-flipcard")],fe);const me=a`:host{--kemet-fab-size:50px;display:inline-block;position:relative}button{color:var(--kemet-fab-color,var(--kemet-color-white));font-size:inherit;display:inline-flex;padding:0;position:relative;min-height:var(--kemet-fab-size);min-width:var(--kemet-fab-size);max-width:var(--kemet-fab-size);align-items:center;justify-content:flex-start;transition:all .4s ease;border:none;background-color:var(--kemet-fab-background-color,var(--kemet-color-primary))}:host([outlined]) button{color:var(--kemet-fab-outlined-color,var(--kemet-color-background));border:var(--kemet-fab-outlined-border,1px solid var(--kemet-color-background));background-color:transparent}:host([pill]) button{border-radius:var(--kemet-fab-pill-radius,10rem)}button::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;width:100%;height:100%;transition:background-color .3s ease-in-out;background-color:var(--kemet-fab-background-color,var(--kemet-color-primary))}:host([pill]) button::before{border-radius:var(--kemet-fab-pill-radius,10rem)}:host([outlined]) button::before{border:var(--kemet-fab-outline-border,1px solid var(--kemet-color-primary));background-color:transparent}:host([expanded]) button{max-width:99rem;padding:0 1.35rem 0 .25rem}:host([disabled]) button{opacity:.5;cursor:not-allowed}.icon{width:var(--kemet-fab-size);height:var(--kemet-fab-size);display:flex;flex:0 0 auto;align-items:center;justify-content:center}.text{color:var(--kemet-fab-color,var(--kemet-color-white));z-index:1;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .2s ease-in-out}:host([outlined]) .text{color:var(--kemet-fab-outlined-color,var(--kemet-color-background))}:host([expanded]) .text{opacity:1}`;let ve=class extends it{constructor(){super(...arguments),this.expanded=!1,this.outlined=!1,this.disabled=!1}firstUpdated(){window.addEventListener("scroll",this.handleScroll.bind(this)),this.addEventListener("mouseover",this.handleMouseOver.bind(this)),this.addEventListener("mouseout",this.handleMouseOut.bind(this))}render(){return U`<button class="button" part="button" ?disabled="${this.disabled}" aria-disabled="${this.disabled?"true":"false"}"><span class="icon" part="icon"><slot name="icon"></slot></span><span class="text" part="text"><slot></slot></span></button>`}handleMouseOver(){this.disabled||(this.expanded=!0)}handleMouseOut(){this.disabled||(this.expanded=!1)}handleScroll(){window.scrollY>this.expandPoint&&(this.expanded=!0),window.scrollY<this.expandPoint&&(this.expanded=!1),window.scrollY>this.collapsePoint&&(this.expanded=!1),window.scrollY<this.collapsePoint&&(this.expanded=!0)}};ve.styles=[me],t([at({type:Boolean,reflect:!0})],ve.prototype,"expanded",void 0),t([at({type:Boolean,reflect:!0})],ve.prototype,"outlined",void 0),t([at({type:Boolean,reflect:!0})],ve.prototype,"disabled",void 0),t([at({type:Boolean,reflect:!0})],ve.prototype,"pill",void 0),t([at({type:Number,attribute:"expand-point"})],ve.prototype,"expandPoint",void 0),t([at({type:Number,attribute:"collapse-point"})],ve.prototype,"collapsePoint",void 0),ve=t([rt("kemet-fab")],ve);const ge=a`:host{position:relative;display:block}input{color:var(--kemet-color-text);display:block;font-size:1rem;width:100%;height:var(--kemet-input-height,50px);padding:var(--kemet-input-padding,.5rem 1rem);border:var(--kemet-input-border,1px solid var(--kemet-color-background));appearance:none;box-sizing:border-box;background-color:transparent}input[type=color]{min-width:10rem}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}:host([status=error]) input{border:var(--kemet-input-border-color-error,1px solid var(--kemet-color-error))}:host([status=success]) input{border:var(--kemet-input-border-color-success,1px solid var(--kemet-color-success))}:host([status=warning]) input{border:var(--kemet-input-border-color-warning,1px solid var(--kemet-color-warning))}:host([disabled]) input{opacity:.5}:host([icon-left]) input{padding-left:var(--kemet-input-icon-left-padding,3rem)}:host([icon-right]) input{padding-right:var(--kemet-input-icon-right-padding,3rem)}:host([rounded]) input{border-radius:var(--kemet-input-border-radius-rounded,var(--kemet-border-radius))}:host([filled]) input{border:var(--kemet-input-border-filled,none);color:var(--kemet-input-color-filled,var(--kemet-color-white));background-color:var(--kemet-input-background-color-filled,var(--kemet-color-primary))}:host([filled]) input::placeholder,:host([filled]) kemet-icon{color:var(--kemet-input-color-filled,var(--kemet-color-white))}:host([status=error][filled]) input{background-color:var(--kemet-input-background-color-error,var(--kemet-color-error))}:host([status=success][filled]) input{background-color:var(--kemet-input-background-color-success,var(--kemet-color-success))}:host([status=warning][filled]) input{background-color:var(--kemet-input-background-color-warning,var(--kemet-color-warning))}kemet-icon{color:var(--kemet-color-text);position:absolute;top:50%;transform:translateY(-50%)}kemet-icon.left{left:1rem}kemet-icon.right{right:1rem}kemet-icon.eye,kemet-icon.search{cursor:pointer}:host([status=error]) kemet-icon{color:var(--kemet-color-error)}:host([status=warning]) kemet-icon{color:var(--kemet-color-error)}:host([status=success]) kemet-icon{color:var(--kemet-color-success)}`;let ye=class extends it{constructor(){super(),this.name="input",this.type="text",this.value="",this.status="standard",this.validateOnBlur=!1,this.iconSize=20,this.isPasswordVisible=!1,this.focused=!1,this.formSubmitController=new $t(this)}firstUpdated(){this.input=this.shadowRoot.querySelector("input"),this.field=this.closest("kemet-field"),this.form=this.closest("form"),this.slug=this.field?this.field.slug:"input",this.field&&this.field.addEventListener("fmc-password-status",(t=>this.handleStatus(t)))}render(){return U`<div>${this.makeIconLeft()} <input part="input" id="${this.slug}" name="${this.name}" placeholder="${At(this.placeholder)}" minlength="${At(this.minlength)}" maxlength="${At(this.maxlength)}" min="${At(this.min)}" max="${At(this.max)}" step="${At(this.step)}" autocomplete="${At(this.autocomplete)}" aria-autocomplete="${At(this.ariaAutoComplete)}" aria-controls="${At(this.ariaControls)}" aria-activedescendant="${At(this.ariaActiveDescendant)}" pattern="${At(this.pattern)}" inputmode="${At(this.inputmode)}" aria-invalid="${this.invalid?"true":"false"}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" .type="${"password"===this.type&&this.isPasswordVisible?"text":this.type}" .value="${Pt(this.value)}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.makeIconRight()} ${this.makeIconClear()} ${this.makeVisibilityToggle()}</div>`}makeIconRight(){return this.iconRight?U`<kemet-icon class="right" icon="${this.iconRight}" size="${this.iconSize?this.iconSize:20}"></kemet-icon>`:null}makeIconLeft(){return this.iconLeft?U`<kemet-icon class="left" icon="${this.iconLeft}" size="${this.iconSize?this.iconSize:16}"></kemet-icon>`:null}makeIconClear(){return"search"===this.type&&""!==this.value?U`<kemet-icon class="search right" icon="x-lg" size="${this.iconSize}" @click="${()=>this.handleClear()}"></kemet-icon>`:null}makeVisibilityToggle(){return"password"===this.type?U`<kemet-icon class="eye right" icon="${this.setPasswordIcon()}" @click="${()=>this.togglePasswordVisibility()}"></kemet-icon>`:null}setPasswordIcon(){return this.isPasswordVisible?"eye":"eye-slash"}handleFocus(){this.focused=!0,yt(this,"kemet-input-focused",!0)}handleBlur(){var t,e;this.validateOnBlur&&this.form&&!this.form.noValidate&&(null===(t=this.input)||void 0===t||t.checkValidity(),this.validity=null===(e=this.input)||void 0===e?void 0:e.validity),this.focused=!1,yt(this,"kemet-input-focused",!1)}handleChange(){this.value=this.input.value,this.input.checkValidity()&&this.checkLimitValidity()&&"success"!==this.status&&(this.invalid=!1,this.status="standard",this.validity=this.input.validity,yt(this,"kemet-input-status",{status:"standard",validity:this.input.validity,element:this}))}handleInput(){this.value=this.input.value,yt(this,"kemet-input-input",this.value)}handleInvalid(){var t,e;this.validity=null===(t=this.input)||void 0===t?void 0:t.validity,this.validateOnBlur&&(this.invalid=!0,this.status="error",yt(this,"kemet-input-status",{status:"error",validity:null===(e=this.input)||void 0===e?void 0:e.validity,element:this}))}handleStatus(t){this.status=t.detail.status}togglePasswordVisibility(){this.isPasswordVisible=!this.isPasswordVisible}handleClear(){this.value="",yt(this,"kemet-input-input",this.value)}checkLimitValidity(){if(this.field){const t=this.field.querySelector("kemet-count");if(t)return this.value.length<t.limit}return!0}checkValidity(){var t;return null===(t=this.input)||void 0===t?void 0:t.checkValidity()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}};ye.styles=[ge],t([at({type:String})],ye.prototype,"slug",void 0),t([at({type:String})],ye.prototype,"name",void 0),t([at({type:String})],ye.prototype,"placeholder",void 0),t([at({type:Number})],ye.prototype,"minlength",void 0),t([at({type:Number})],ye.prototype,"maxlength",void 0),t([at({type:String})],ye.prototype,"min",void 0),t([at({type:String})],ye.prototype,"max",void 0),t([at({type:Number})],ye.prototype,"step",void 0),t([at({type:String})],ye.prototype,"autocomplete",void 0),t([at({type:String})],ye.prototype,"pattern",void 0),t([at({type:String})],ye.prototype,"inputmode",void 0),t([at({type:Boolean})],ye.prototype,"autofocus",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"disabled",void 0),t([at({type:Boolean})],ye.prototype,"readonly",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"required",void 0),t([at({type:String})],ye.prototype,"type",void 0),t([at({type:String,reflect:!0})],ye.prototype,"value",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"invalid",void 0),t([at({type:String,reflect:!0})],ye.prototype,"status",void 0),t([at({type:Boolean,attribute:"validate-on-blur"})],ye.prototype,"validateOnBlur",void 0),t([at({type:String,attribute:"aria-autocomplete"})],ye.prototype,"ariaAutoComplete",void 0),t([at({type:String,attribute:"aria-controls"})],ye.prototype,"ariaControls",void 0),t([at({type:String,attribute:"aria-activedescendant"})],ye.prototype,"ariaActiveDescendant",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"rounded",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"filled",void 0),t([at({type:String,reflect:!0,attribute:"icon-right"})],ye.prototype,"iconRight",void 0),t([at({type:String,reflect:!0,attribute:"icon-left"})],ye.prototype,"iconLeft",void 0),t([at({type:Number})],ye.prototype,"iconSize",void 0),t([at({type:Object})],ye.prototype,"validity",void 0),t([at({type:Boolean})],ye.prototype,"isPasswordVisible",void 0),t([at({type:String})],ye.prototype,"inputType",void 0),t([at({type:Boolean,reflect:!0})],ye.prototype,"focused",void 0),t([lt()],ye.prototype,"field",void 0),t([lt()],ye.prototype,"form",void 0),t([lt()],ye.prototype,"input",void 0),ye=t([rt("kemet-input")],ye);let be=class extends it{render(){return U`<slot @keyup="${()=>this.close()}" @click="${()=>this.close()}"></slot>`}close(){yt(this,"kemet-modal-close-pressed",this)}};be.styles=[a`:host{position:absolute;top:.5rem;right:.5rem;border-radius:50%;cursor:pointer}`],be=t([rt("kemet-modal-close")],be);const ke=a`*,::after,::before{box-sizing:border-box}:host{position:fixed;display:flex;top:0;left:0;z-index:99;width:100%;height:100vh;visibility:hidden;backface-visibility:hidden}:host([opened]){visibility:visible}.content{position:relative;z-index:3;margin:auto;min-width:var(--kemet-modal-content-min-width,0);max-width:var(--kemet-modal-content-max-width,none);background-color:var(--kemet-modal-content-background-color,var(--kemet-color-white-to-primary))}:host([mobile]) .content{min-width:var(--kemet-modal-content-mobile-min-width,100%);min-height:var(--kemet-modal-content-mobile-min-height,80vh);padding:var(--kemet-modal-content-mobile-padding,1rem)}.overlay{position:fixed;width:100%;height:100%;visibility:hidden;top:0;left:0;z-index:1;opacity:0;background:var(--kemet-modal-overlay-background-color,rgba(0,0,0,.2));transition:all var(--kemet-modal-transition-speed,.3s)}:host([opened]) .overlay{opacity:1;visibility:visible}`,xe=a`:host([effect=fadein-scaleup]) .content{transform:scale(.7);opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=fadein-scaleup][opened]) .content{transform:scale(1);opacity:1}:host([effect=slide-right]) .content{transform:translateX(20%);opacity:0;transition:all var(--kemet-modal-transition-speed,.3s) cubic-bezier(.25,.5,.5,.9)}:host([effect=slide-right][opened]) .content{transform:translateX(0);opacity:1}:host([effect=slide-bottom]) .content{transform:translateY(20%);opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=slide-bottom][opened]) .content{transform:translateY(0);opacity:1}:host([effect=newspaper]) .content{transform:scale(0) rotate(720deg);opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=newspaper][opened]) .content{transform:scale(1) rotate(0);opacity:1}:host([effect=fall]){perspective:1300px}:host([effect=fall]) .content{transform-style:preserve-3d;transform:translateZ(600px) rotateX(20deg);opacity:0}:host([effect=fall][opened]) .content{transition:all var(--kemet-modal-transition-speed,.3s) ease-in;transform:translateZ(0) rotateX(0);opacity:1}:host([effect=side-fall]){perspective:1300px}:host([effect=side-fall]) .content{transform-style:preserve-3d;transform:translate(30%) translateZ(600px) rotate(10deg);opacity:0}:host([effect=side-fall][opened]) .content{transition:all var(--kemet-modal-transition-speed,.3s) ease-in;transform:translate(0) translateZ(0) rotate(0);opacity:1}:host([effect=flip-horizontal]){perspective:1300px}:host([effect=flip-horizontal]) .content{transform-style:preserve-3d;transform:rotateY(-70deg);transition:all var(--kemet-modal-transition-speed,.3s);opacity:0}:host([effect=flip-horizontal][opened]) .content{transform:rotateY(0);opacity:1}:host([effect=flip-vertical]){perspective:1300px}:host([effect=flip-vertical]) .content{transform-style:preserve-3d;transform:rotateX(-70deg);transition:all var(--kemet-modal-transition-speed,.3s);opacity:0}:host([effect=flip-vertical][opened]) .content{transform:rotateX(0);opacity:1}:host([effect=sign-3d]){perspective:1300px}:host([effect=sign-3d]) .content{transform-style:preserve-3d;transform:rotateX(-60deg);transform-origin:50% 0;opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=sign-3d][opened]) .content{transform:rotateX(0);opacity:1}:host([effect=super-scaled]) .content{transform:scale(2);opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=super-scaled][opened]) .content{transform:scale(1);opacity:1}:host([effect=slit]){perspective:1300px}:host([effect=slit]) .content{transform-style:preserve-3d;transform:translateZ(-3000px) rotateY(90deg);opacity:0}:host([effect=slit][opened]) .content{animation:slit .7s forwards ease-out}@keyframes slit{50%{transform:translateZ(-250px) rotateY(89deg);opacity:1;animation-timing-function:ease-in}100%{transform:translateZ(0) rotateY(0);opacity:1}}:host([effect=rotate-bottom]){perspective:1300px}:host([effect=rotate-bottom]) .content{transform-style:preserve-3d;transform:translateY(100%) rotateX(90deg);transform-origin:0 100%;opacity:0;transition:all var(--kemet-modal-transition-speed,.3s) ease-out}:host([effect=rotate-bottom][opened]) .content{transform:translateY(0) rotateX(0);opacity:1}:host([effect=rotate-left]){perspective:1300px}:host([effect=rotate-left]) .content{transform-style:preserve-3d;transform:translateZ(100px) translateX(-30%) rotateY(90deg);transform-origin:0 100%;opacity:0;transition:all var(--kemet-modal-transition-speed,.3s)}:host([effect=rotate-left][opened]) .content{transform:translateZ(0) translateX(0) rotateY(0);opacity:1}`;let we=class extends it{constructor(){super(),this.opened=!1,this.closeOnClick=!1,this.breakpoint="600px",this.addEventListener("kemet-modal-close-pressed",(()=>{this.opened=!1}))}firstUpdated(){this.focusableSelector="body, a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",this.focusableElements=this.querySelectorAll(this.focusableSelector),this.addEventListener("keyup",(t=>{"Escape"===t.key&&(this.opened=!1)})),this.addEventListener("click",(t=>{const e=t.target;this.opened&&this.closeOnClick&&"kemet-modal"===e.tagName.toLowerCase()&&(this.opened=!1)})),window.addEventListener("resize",(()=>{this.isMobile()})),this.focusableElements.forEach((t=>{t.addEventListener("keydown",(t=>this.handleFocusableDown(t)))}))}updated(t){t.get("opened")||!0!==this.opened||(setTimeout((()=>{var t;null===(t=this.focusableElements[0])||void 0===t||t.focus()}),100),yt(this,"kemet-modal-opened",this)),t.get("opened")&&!1===this.opened&&yt(this,"kemet-modal-closed",this),this.isMobile()}render(){return U`<div class="content" part="content"><slot></slot></div><div class="overlay" part="overlay"></div>`}isMobile(){const t=window.matchMedia(`(max-width: ${this.breakpoint})`);this.mobile=t.matches}handleFocusableDown(t){const e=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1];"Tab"===t.key&&(t.shiftKey&&document.activeElement===e?(t.preventDefault(),o.focus()):t.shiftKey||document.activeElement!==o||(t.preventDefault(),e.focus()))}};we.styles=[ke,xe],t([at({type:Boolean,reflect:!0})],we.prototype,"opened",void 0),t([at({type:String,reflect:!0})],we.prototype,"effect",void 0),t([at({type:Boolean,attribute:"close-on-click"})],we.prototype,"closeOnClick",void 0),t([at({type:String})],we.prototype,"breakpoint",void 0),t([at({type:Boolean,reflect:!0})],we.prototype,"mobile",void 0),t([lt()],we.prototype,"focusableSelector",void 0),t([lt()],we.prototype,"focusableElements",void 0),we=t([rt("kemet-modal")],we);const $e=a`:host{color:inherit;display:none}:host([show]){display:block}p{margin:1.6rem 0}.status{display:grid;align-items:center;grid-template-columns:1fr auto;line-height:1;margin-top:.8rem}.status>span{text-transform:capitalize}.status--better,.status--weak{color:var(--kemet-color-error)}.status--strong{color:var(--kemet-color-success)}.indicator{display:flex;gap:.4rem;margin:0;list-style:none}.indicator li{width:1.6rem;height:.2rem}.status--weak .indicator li:nth-child(1){background-color:var(--kemet-color-error)}.status--better .indicator li:nth-child(1),.status--better .indicator li:nth-child(2){background-color:var(--kemet-color-error)}.status--strong .indicator li{background-color:var(--kemet-color-success)}.rules{color:var(--kemet-color-background);line-height:1.5;list-style:none;font-size:90%;padding-left:2rem}.rules li{position:relative}.rules kemet-icon{color:var(--kemet-color-success);position:absolute;left:-2rem}`;let Se=class extends it{constructor(){super(...arguments),this.rules=[{pattern:"(?=.{8,}$)",message:"At least 8 characters long"},{pattern:"(?=.*[a-z])(?=.*[A-Z])",message:"Uppercase and lowercase"},{pattern:"(?=.*[0-9])",message:"At least one number (0-9)"}],this.message="Please make sure you meet all the requirements.",this.icon="check2",this.iconSize=16}firstUpdated(){this.field=this.closest("kemet-field"),this.input=this.field.querySelector('[slot="input"]'),this.input.addEventListener("kemet-input-input",this.handleInput.bind(this))}render(){return U`<div role="alert" aria-live="assertive"><div class="status status--${this.strength}" part="status"><span>${this.strength}</span><ul class="indicator" part="indicator"><li></li><li></li><li></li></ul></div><p class="message" part="message">${this.message}</p><ul class="rules" part="rules">${this.makeRules()}</ul></div>`}makeRules(){if(this.input){return this.rules.map(((t,e)=>{const o=new RegExp(t.pattern).test(this.input.value);return this.rules[e].meetsCriteria=o,U`<li>${this.makeCheckIcon(o)} ${t.message}</li>`}))}return null}makeCheckIcon(t){return t?U`<kemet-icon icon="${this.icon}" size="${this.iconSize}"></kemet-icon>`:null}handleInput(t){this.value=t.detail,this.setStrength(),this.visibility()}setStrength(){setTimeout((()=>{const t=this.rules.length,e=this.rules.filter((t=>t.meetsCriteria)).length,o=Math.round(e/t*100)/100;o<=.33&&(this.strength="weak",this.status="error"),o>.33&&o<=.67&&(this.strength="better",this.status="error"),o>.67&&(this.strength="strong",this.status="success"),yt(this,"kemet-password-status",{status:this.status,validity:{meetsPasswordCriteria:"success"===this.status},element:this})}),1)}visibility(){this.value.length>0?this.show=!0:this.show=!1}};Se.styles=[$e],t([at({type:Array})],Se.prototype,"rules",void 0),t([at({type:Boolean,reflect:!0})],Se.prototype,"show",void 0),t([at({type:String})],Se.prototype,"value",void 0),t([at({type:String})],Se.prototype,"message",void 0),t([at({type:String})],Se.prototype,"strength",void 0),t([at({type:String})],Se.prototype,"icon",void 0),t([at({type:Number})],Se.prototype,"iconSize",void 0),t([lt()],Se.prototype,"status",void 0),t([lt()],Se.prototype,"field",void 0),t([lt()],Se.prototype,"input",void 0),Se=t([rt("kemet-password")],Se);let Ee=class extends it{render(){return U`<button @click="${()=>this.close()}" @keyup="${t=>this.handleKeyboard(t)}"><slot></slot></button>`}close(){yt(this,"kemet-popper-close-btn",this)}handleKeyboard(t){t.preventDefault(),t.keyCode!==ce&&t.keyCode!==de||this.close()}};Ee.styles=[a`button{font:inherit;color:inherit;cursor:pointer;border:0;background:0 0}`],Ee=t([rt("kemet-popper-close")],Ee);var _e="top",Ae="bottom",Ce="right",Oe="left",ze="auto",Le=[_e,Ae,Ce,Oe],Be="start",Ie="end",De="clippingParents",Pe="viewport",Te="popper",Me="reference",Ue=Le.reduce((function(t,e){return t.concat([e+"-"+Be,e+"-"+Ie])}),[]),Ne=[].concat(Le,[ze]).reduce((function(t,e){return t.concat([e,e+"-"+Be,e+"-"+Ie])}),[]),Xe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function qe(t){return t?(t.nodeName||"").toLowerCase():null}function Re(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function je(t){return t instanceof Re(t).Element||t instanceof Element}function He(t){return t instanceof Re(t).HTMLElement||t instanceof HTMLElement}function Ye(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Re(t).ShadowRoot||t instanceof ShadowRoot)}var Ve={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var o=e.styles[t]||{},i=e.attributes[t]||{},s=e.elements[t];He(s)&&qe(s)&&(Object.assign(s.style,o),Object.keys(i).forEach((function(t){var e=i[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,o={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,o.popper),e.styles=o,e.elements.arrow&&Object.assign(e.elements.arrow.style,o.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],s=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:o[t]).reduce((function(t,e){return t[e]="",t}),{});He(i)&&qe(i)&&(Object.assign(i.style,r),Object.keys(s).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};function Fe(t){return t.split("-")[0]}var We=Math.max,Ke=Math.min,Je=Math.round;function Ze(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function Ge(){return!/^((?!chrome|android).)*safari/i.test(Ze())}function Qe(t,e,o){void 0===e&&(e=!1),void 0===o&&(o=!1);var i=t.getBoundingClientRect(),s=1,r=1;e&&He(t)&&(s=t.offsetWidth>0&&Je(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&Je(i.height)/t.offsetHeight||1);var n=(je(t)?Re(t):window).visualViewport,a=!Ge()&&o,l=(i.left+(a&&n?n.offsetLeft:0))/s,d=(i.top+(a&&n?n.offsetTop:0))/r,c=i.width/s,h=i.height/r;return{width:c,height:h,top:d,right:l+c,bottom:d+h,left:l,x:l,y:d}}function to(t){var e=Qe(t),o=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-o)<=1&&(o=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:i}}function eo(t,e){var o=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(o&&Ye(o)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function oo(t){return Re(t).getComputedStyle(t)}function io(t){return["table","td","th"].indexOf(qe(t))>=0}function so(t){return((je(t)?t.ownerDocument:t.document)||window.document).documentElement}function ro(t){return"html"===qe(t)?t:t.assignedSlot||t.parentNode||(Ye(t)?t.host:null)||so(t)}function no(t){return He(t)&&"fixed"!==oo(t).position?t.offsetParent:null}function ao(t){for(var e=Re(t),o=no(t);o&&io(o)&&"static"===oo(o).position;)o=no(o);return o&&("html"===qe(o)||"body"===qe(o)&&"static"===oo(o).position)?e:o||function(t){var e=/firefox/i.test(Ze());if(/Trident/i.test(Ze())&&He(t)&&"fixed"===oo(t).position)return null;var o=ro(t);for(Ye(o)&&(o=o.host);He(o)&&["html","body"].indexOf(qe(o))<0;){var i=oo(o);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return o;o=o.parentNode}return null}(t)||e}function lo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function co(t,e,o){return We(t,Ke(e,o))}function ho(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function po(t,e){return e.reduce((function(e,o){return e[o]=t,e}),{})}var uo={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,o=t.state,i=t.name,s=t.options,r=o.elements.arrow,n=o.modifiersData.popperOffsets,a=Fe(o.placement),l=lo(a),d=[Oe,Ce].indexOf(a)>=0?"height":"width";if(r&&n){var c=function(t,e){return ho("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:po(t,Le))}(s.padding,o),h=to(r),p="y"===l?_e:Oe,u="y"===l?Ae:Ce,f=o.rects.reference[d]+o.rects.reference[l]-n[l]-o.rects.popper[d],m=n[l]-o.rects.reference[l],v=ao(r),g=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,y=f/2-m/2,b=c[p],k=g-h[d]-c[u],x=g/2-h[d]/2+y,w=co(b,x,k),$=l;o.modifiersData[i]=((e={})[$]=w,e.centerOffset=w-x,e)}},effect:function(t){var e=t.state,o=t.options.element,i=void 0===o?"[data-popper-arrow]":o;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&eo(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fo(t){return t.split("-")[1]}var mo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vo(t){var e,o=t.popper,i=t.popperRect,s=t.placement,r=t.variation,n=t.offsets,a=t.position,l=t.gpuAcceleration,d=t.adaptive,c=t.roundOffsets,h=t.isFixed,p=n.x,u=void 0===p?0:p,f=n.y,m=void 0===f?0:f,v="function"==typeof c?c({x:u,y:m}):{x:u,y:m};u=v.x,m=v.y;var g=n.hasOwnProperty("x"),y=n.hasOwnProperty("y"),b=Oe,k=_e,x=window;if(d){var w=ao(o),$="clientHeight",S="clientWidth";if(w===Re(o)&&"static"!==oo(w=so(o)).position&&"absolute"===a&&($="scrollHeight",S="scrollWidth"),s===_e||(s===Oe||s===Ce)&&r===Ie)k=Ae,m-=(h&&w===x&&x.visualViewport?x.visualViewport.height:w[$])-i.height,m*=l?1:-1;if(s===Oe||(s===_e||s===Ae)&&r===Ie)b=Ce,u-=(h&&w===x&&x.visualViewport?x.visualViewport.width:w[S])-i.width,u*=l?1:-1}var E,_=Object.assign({position:a},d&&mo),A=!0===c?function(t,e){var o=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:Je(o*s)/s||0,y:Je(i*s)/s||0}}({x:u,y:m},Re(o)):{x:u,y:m};return u=A.x,m=A.y,l?Object.assign({},_,((E={})[k]=y?"0":"",E[b]=g?"0":"",E.transform=(x.devicePixelRatio||1)<=1?"translate("+u+"px, "+m+"px)":"translate3d("+u+"px, "+m+"px, 0)",E)):Object.assign({},_,((e={})[k]=y?m+"px":"",e[b]=g?u+"px":"",e.transform="",e))}var go={passive:!0};var yo={left:"right",right:"left",bottom:"top",top:"bottom"};function bo(t){return t.replace(/left|right|bottom|top/g,(function(t){return yo[t]}))}var ko={start:"end",end:"start"};function xo(t){return t.replace(/start|end/g,(function(t){return ko[t]}))}function wo(t){var e=Re(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function $o(t){return Qe(so(t)).left+wo(t).scrollLeft}function So(t){var e=oo(t),o=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(o+s+i)}function Eo(t){return["html","body","#document"].indexOf(qe(t))>=0?t.ownerDocument.body:He(t)&&So(t)?t:Eo(ro(t))}function _o(t,e){var o;void 0===e&&(e=[]);var i=Eo(t),s=i===(null==(o=t.ownerDocument)?void 0:o.body),r=Re(i),n=s?[r].concat(r.visualViewport||[],So(i)?i:[]):i,a=e.concat(n);return s?a:a.concat(_o(ro(n)))}function Ao(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Co(t,e,o){return e===Pe?Ao(function(t,e){var o=Re(t),i=so(t),s=o.visualViewport,r=i.clientWidth,n=i.clientHeight,a=0,l=0;if(s){r=s.width,n=s.height;var d=Ge();(d||!d&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:n,x:a+$o(t),y:l}}(t,o)):je(e)?function(t,e){var o=Qe(t,!1,"fixed"===e);return o.top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o}(e,o):Ao(function(t){var e,o=so(t),i=wo(t),s=null==(e=t.ownerDocument)?void 0:e.body,r=We(o.scrollWidth,o.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),n=We(o.scrollHeight,o.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+$o(t),l=-i.scrollTop;return"rtl"===oo(s||o).direction&&(a+=We(o.clientWidth,s?s.clientWidth:0)-r),{width:r,height:n,x:a,y:l}}(so(t)))}function Oo(t,e,o,i){var s="clippingParents"===e?function(t){var e=_o(ro(t)),o=["absolute","fixed"].indexOf(oo(t).position)>=0&&He(t)?ao(t):t;return je(o)?e.filter((function(t){return je(t)&&eo(t,o)&&"body"!==qe(t)})):[]}(t):[].concat(e),r=[].concat(s,[o]),n=r[0],a=r.reduce((function(e,o){var s=Co(t,o,i);return e.top=We(s.top,e.top),e.right=Ke(s.right,e.right),e.bottom=Ke(s.bottom,e.bottom),e.left=We(s.left,e.left),e}),Co(t,n,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function zo(t){var e,o=t.reference,i=t.element,s=t.placement,r=s?Fe(s):null,n=s?fo(s):null,a=o.x+o.width/2-i.width/2,l=o.y+o.height/2-i.height/2;switch(r){case _e:e={x:a,y:o.y-i.height};break;case Ae:e={x:a,y:o.y+o.height};break;case Ce:e={x:o.x+o.width,y:l};break;case Oe:e={x:o.x-i.width,y:l};break;default:e={x:o.x,y:o.y}}var d=r?lo(r):null;if(null!=d){var c="y"===d?"height":"width";switch(n){case Be:e[d]=e[d]-(o[c]/2-i[c]/2);break;case Ie:e[d]=e[d]+(o[c]/2-i[c]/2)}}return e}function Lo(t,e){void 0===e&&(e={});var o=e,i=o.placement,s=void 0===i?t.placement:i,r=o.strategy,n=void 0===r?t.strategy:r,a=o.boundary,l=void 0===a?De:a,d=o.rootBoundary,c=void 0===d?Pe:d,h=o.elementContext,p=void 0===h?Te:h,u=o.altBoundary,f=void 0!==u&&u,m=o.padding,v=void 0===m?0:m,g=ho("number"!=typeof v?v:po(v,Le)),y=p===Te?Me:Te,b=t.rects.popper,k=t.elements[f?y:p],x=Oo(je(k)?k:k.contextElement||so(t.elements.popper),l,c,n),w=Qe(t.elements.reference),$=zo({reference:w,element:b,strategy:"absolute",placement:s}),S=Ao(Object.assign({},b,$)),E=p===Te?S:w,_={top:x.top-E.top+g.top,bottom:E.bottom-x.bottom+g.bottom,left:x.left-E.left+g.left,right:E.right-x.right+g.right},A=t.modifiersData.offset;if(p===Te&&A){var C=A[s];Object.keys(_).forEach((function(t){var e=[Ce,Ae].indexOf(t)>=0?1:-1,o=[_e,Ae].indexOf(t)>=0?"y":"x";_[t]+=C[o]*e}))}return _}function Bo(t,e){void 0===e&&(e={});var o=e,i=o.placement,s=o.boundary,r=o.rootBoundary,n=o.padding,a=o.flipVariations,l=o.allowedAutoPlacements,d=void 0===l?Ne:l,c=fo(i),h=c?a?Ue:Ue.filter((function(t){return fo(t)===c})):Le,p=h.filter((function(t){return d.indexOf(t)>=0}));0===p.length&&(p=h);var u=p.reduce((function(e,o){return e[o]=Lo(t,{placement:o,boundary:s,rootBoundary:r,padding:n})[Fe(o)],e}),{});return Object.keys(u).sort((function(t,e){return u[t]-u[e]}))}var Io={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,o=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=o.mainAxis,r=void 0===s||s,n=o.altAxis,a=void 0===n||n,l=o.fallbackPlacements,d=o.padding,c=o.boundary,h=o.rootBoundary,p=o.altBoundary,u=o.flipVariations,f=void 0===u||u,m=o.allowedAutoPlacements,v=e.options.placement,g=Fe(v),y=l||(g===v||!f?[bo(v)]:function(t){if(Fe(t)===ze)return[];var e=bo(t);return[xo(t),e,xo(e)]}(v)),b=[v].concat(y).reduce((function(t,o){return t.concat(Fe(o)===ze?Bo(e,{placement:o,boundary:c,rootBoundary:h,padding:d,flipVariations:f,allowedAutoPlacements:m}):o)}),[]),k=e.rects.reference,x=e.rects.popper,w=new Map,$=!0,S=b[0],E=0;E<b.length;E++){var _=b[E],A=Fe(_),C=fo(_)===Be,O=[_e,Ae].indexOf(A)>=0,z=O?"width":"height",L=Lo(e,{placement:_,boundary:c,rootBoundary:h,altBoundary:p,padding:d}),B=O?C?Ce:Oe:C?Ae:_e;k[z]>x[z]&&(B=bo(B));var I=bo(B),D=[];if(r&&D.push(L[A]<=0),a&&D.push(L[B]<=0,L[I]<=0),D.every((function(t){return t}))){S=_,$=!1;break}w.set(_,D)}if($)for(var P=function(t){var e=b.find((function(e){var o=w.get(e);if(o)return o.slice(0,t).every((function(t){return t}))}));if(e)return S=e,"break"},T=f?3:1;T>0;T--){if("break"===P(T))break}e.placement!==S&&(e.modifiersData[i]._skip=!0,e.placement=S,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Do(t,e,o){return void 0===o&&(o={x:0,y:0}),{top:t.top-e.height-o.y,right:t.right-e.width+o.x,bottom:t.bottom-e.height+o.y,left:t.left-e.width-o.x}}function Po(t){return[_e,Ce,Ae,Oe].some((function(e){return t[e]>=0}))}var To={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,o=t.options,i=t.name,s=o.offset,r=void 0===s?[0,0]:s,n=Ne.reduce((function(t,o){return t[o]=function(t,e,o){var i=Fe(t),s=[Oe,_e].indexOf(i)>=0?-1:1,r="function"==typeof o?o(Object.assign({},e,{placement:t})):o,n=r[0],a=r[1];return n=n||0,a=(a||0)*s,[Oe,Ce].indexOf(i)>=0?{x:a,y:n}:{x:n,y:a}}(o,e.rects,r),t}),{}),a=n[e.placement],l=a.x,d=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=d),e.modifiersData[i]=n}};var Mo={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,o=t.options,i=t.name,s=o.mainAxis,r=void 0===s||s,n=o.altAxis,a=void 0!==n&&n,l=o.boundary,d=o.rootBoundary,c=o.altBoundary,h=o.padding,p=o.tether,u=void 0===p||p,f=o.tetherOffset,m=void 0===f?0:f,v=Lo(e,{boundary:l,rootBoundary:d,padding:h,altBoundary:c}),g=Fe(e.placement),y=fo(e.placement),b=!y,k=lo(g),x="x"===k?"y":"x",w=e.modifiersData.popperOffsets,$=e.rects.reference,S=e.rects.popper,E="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,_="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),A=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,C={x:0,y:0};if(w){if(r){var O,z="y"===k?_e:Oe,L="y"===k?Ae:Ce,B="y"===k?"height":"width",I=w[k],D=I+v[z],P=I-v[L],T=u?-S[B]/2:0,M=y===Be?$[B]:S[B],U=y===Be?-S[B]:-$[B],N=e.elements.arrow,X=u&&N?to(N):{width:0,height:0},q=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},R=q[z],j=q[L],H=co(0,$[B],X[B]),Y=b?$[B]/2-T-H-R-_.mainAxis:M-H-R-_.mainAxis,V=b?-$[B]/2+T+H+j+_.mainAxis:U+H+j+_.mainAxis,F=e.elements.arrow&&ao(e.elements.arrow),W=F?"y"===k?F.clientTop||0:F.clientLeft||0:0,K=null!=(O=null==A?void 0:A[k])?O:0,J=I+V-K,Z=co(u?Ke(D,I+Y-K-W):D,I,u?We(P,J):P);w[k]=Z,C[k]=Z-I}if(a){var G,Q="x"===k?_e:Oe,tt="x"===k?Ae:Ce,et=w[x],ot="y"===x?"height":"width",it=et+v[Q],st=et-v[tt],rt=-1!==[_e,Oe].indexOf(g),nt=null!=(G=null==A?void 0:A[x])?G:0,at=rt?it:et-$[ot]-S[ot]-nt+_.altAxis,lt=rt?et+$[ot]+S[ot]-nt-_.altAxis:st,dt=u&&rt?function(t,e,o){var i=co(t,e,o);return i>o?o:i}(at,et,lt):co(u?at:it,et,u?lt:st);w[x]=dt,C[x]=dt-et}e.modifiersData[i]=C}},requiresIfExists:["offset"]};function Uo(t,e,o){void 0===o&&(o=!1);var i,s,r=He(e),n=He(e)&&function(t){var e=t.getBoundingClientRect(),o=Je(e.width)/t.offsetWidth||1,i=Je(e.height)/t.offsetHeight||1;return 1!==o||1!==i}(e),a=so(e),l=Qe(t,n,o),d={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!o)&&(("body"!==qe(e)||So(a))&&(d=(i=e)!==Re(i)&&He(i)?{scrollLeft:(s=i).scrollLeft,scrollTop:s.scrollTop}:wo(i)),He(e)?((c=Qe(e,!0)).x+=e.clientLeft,c.y+=e.clientTop):a&&(c.x=$o(a))),{x:l.left+d.scrollLeft-c.x,y:l.top+d.scrollTop-c.y,width:l.width,height:l.height}}function No(t){var e=new Map,o=new Set,i=[];function s(t){o.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!o.has(t)){var i=e.get(t);i&&s(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){o.has(t.name)||s(t)})),i}var Xo={placement:"bottom",modifiers:[],strategy:"absolute"};function qo(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Ro(t){void 0===t&&(t={});var e=t,o=e.defaultModifiers,i=void 0===o?[]:o,s=e.defaultOptions,r=void 0===s?Xo:s;return function(t,e,o){void 0===o&&(o=r);var s,n,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xo,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],d=!1,c={state:a,setOptions:function(o){var s="function"==typeof o?o(a.options):o;h(),a.options=Object.assign({},r,a.options,s),a.scrollParents={reference:je(t)?_o(t):t.contextElement?_o(t.contextElement):[],popper:_o(e)};var n,d,p=function(t){var e=No(t);return Xe.reduce((function(t,o){return t.concat(e.filter((function(t){return t.phase===o})))}),[])}((n=[].concat(i,a.options.modifiers),d=n.reduce((function(t,e){var o=t[e.name];return t[e.name]=o?Object.assign({},o,e,{options:Object.assign({},o.options,e.options),data:Object.assign({},o.data,e.data)}):e,t}),{}),Object.keys(d).map((function(t){return d[t]}))));return a.orderedModifiers=p.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,o=t.options,i=void 0===o?{}:o,s=t.effect;if("function"==typeof s){var r=s({state:a,name:e,instance:c,options:i}),n=function(){};l.push(r||n)}})),c.update()},forceUpdate:function(){if(!d){var t=a.elements,e=t.reference,o=t.popper;if(qo(e,o)){a.rects={reference:Uo(e,ao(o),"fixed"===a.options.strategy),popper:to(o)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var s=a.orderedModifiers[i],r=s.fn,n=s.options,l=void 0===n?{}:n,h=s.name;"function"==typeof r&&(a=r({state:a,options:l,name:h,instance:c})||a)}else a.reset=!1,i=-1}}},update:(s=function(){return new Promise((function(t){c.forceUpdate(),t(a)}))},function(){return n||(n=new Promise((function(t){Promise.resolve().then((function(){n=void 0,t(s())}))}))),n}),destroy:function(){h(),d=!0}};if(!qo(t,e))return c;function h(){l.forEach((function(t){return t()})),l=[]}return c.setOptions(o).then((function(t){!d&&o.onFirstUpdate&&o.onFirstUpdate(t)})),c}}var jo=Ro({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,o=t.instance,i=t.options,s=i.scroll,r=void 0===s||s,n=i.resize,a=void 0===n||n,l=Re(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&d.forEach((function(t){t.addEventListener("scroll",o.update,go)})),a&&l.addEventListener("resize",o.update,go),function(){r&&d.forEach((function(t){t.removeEventListener("scroll",o.update,go)})),a&&l.removeEventListener("resize",o.update,go)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,o=t.name;e.modifiersData[o]=zo({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,o=t.options,i=o.gpuAcceleration,s=void 0===i||i,r=o.adaptive,n=void 0===r||r,a=o.roundOffsets,l=void 0===a||a,d={placement:Fe(e.placement),variation:fo(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,vo(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:n,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,vo(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},Ve,To,Io,Mo,uo,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,o=t.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,n=Lo(e,{elementContext:"reference"}),a=Lo(e,{altBoundary:!0}),l=Do(n,i),d=Do(a,s,r),c=Po(l),h=Po(d);e.modifiersData[o]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}}]});const Ho=a`:host{display:inline-block}#content{visibility:hidden;pointer-events:none;width:var(--kemet-popper-width,auto);height:var(--kemet-popper-height,auto);position:absolute;z-index:-1}:host([opened]) #content{visibility:visible;z-index:9;pointer-events:auto}::slotted([slot=content]){padding:var(--kemet-popper-padding,1rem);border:1px solid var(--kemet-popper-border-color,var(--kemet-color-background));background-color:var(--kemet-popper-background-color,var(--kemet-color-foreground))}`,Yo=a`:host([effect=fade]) #content{opacity:0;transition:all var(--kemet-popover-transition-speed,.3s)}:host([effect=fade][opened]) #content{opacity:1}`,Vo=a`:host([effect=scale]) #content{opacity:0;transition:all var(--kemet-popover-transition-speed,.3s)}:host([effect=scale][opened]) #content{opacity:1}:host([effect=scale][position=bottom]) #content,:host([effect=scale][position=top]) #content{transform:translateX(-50%) scale(.7)}:host([effect=scale][position=bottom][opened]) #content,:host([effect=scale][position=top][opened]) #content{transform:translateX(-50%) scale(1)}:host([effect=scale][position=left]) #content,:host([effect=scale][position=right]) #content{transform:translateY(-50%) scale(.7)}:host([effect=scale][position=left][opened]) #content,:host([effect=scale][position=right][opened]) #content{transform:translateY(-50%) scale(1)}`,Fo=a`:host([effect=slide]) #content{opacity:0;transition:all var(--kemet-popover-transition-speed,.3s) cubic-bezier(.25,.5,.5,.9)}:host([effect=slide][opened]) #content{opacity:1}:host([effect=slide][position=top]) #content{transform:translateX(-50%) translateY(20%)}:host([effect=slide][position=top][opened]) #content{transform:translateX(-50%) translateY(0)}:host([effect=slide][position=bottom]) #content{transform:translateX(-50%) translateY(-20%)}:host([effect=slide][position=bottom][opened]) #content{transform:translateX(-50%) translateY(0)}:host([effect=slide][position=right]) #content{transform:translateY(-50%) translateX(-20%)}:host([effect=slide][position=right][opened]) #content{transform:translateY(-50%) translateX(0)}:host([effect=slide][position=left]) #content{transform:translateY(-50%) translateX(20%)}:host([effect=slide][position=left][opened]) #content{transform:translateY(-50%) translateX(0)}`,Wo=a`:host([effect=fall]){perspective:1300px}:host([effect=fall]) #content{transform-style:preserve-3d;opacity:0}:host([effect=fall][opened]) #content{transition:all var(--kemet-popover-transition-speed,.3s) ease-in;opacity:1}:host([effect=fall][position=top]) #content{transform:translateX(-50%) translateZ(600px) rotateX(20deg)}:host([effect=fall][position=top][opened]) #content{transform:translateX(-50%) translateZ(0) rotateX(0)}:host([effect=fall][position=bottom]) #content{transform:translateX(-50%) translateZ(600px) rotateX(20deg)}:host([effect=fall][position=bottom][opened]) #content{transform:translateX(-50%) translateZ(0) rotateX(0)}:host([effect=fall][position=right]) #content{transform:translateY(-50%) translateZ(600px) rotateX(20deg)}:host([effect=fall][position=right][opened]) #content{transform:translateY(-50%) translateZ(0) rotateX(0)}:host([effect=fall][position=left]) #content{transform:translateY(-50%) translateZ(600px) rotateX(20deg)}:host([effect=fall][position=left][opened]) #content{transform:translateY(-50%) translateZ(0) rotateX(0)}`,Ko=a`:host([effect=flip-horizontal]){perspective:1300px}:host([effect=flip-horizontal]) #content{transform-style:preserve-3d;transition:all var(--kemet-popover-transition-speed,.3s);opacity:0}:host([effect=flip-horizontal][opened]) #content{opacity:1}:host([effect=flip-horizontal][position=top]) #content{transform:translateX(-50%) rotateY(-70deg)}:host([effect=flip-horizontal][position=top][opened]) #content{transform:translateX(-50%) rotateY(0)}:host([effect=flip-horizontal][position=bottom]) #content{transform:translateX(-50%) rotateY(-70deg)}:host([effect=flip-horizontal][position=bottom][opened]) #content{transform:translateX(-50%) rotateY(0)}:host([effect=flip-horizontal][position=right]) #content{transform:translateY(-50%) rotateY(-70deg)}:host([effect=flip-horizontal][position=right][opened]) #content{transform:translateY(-50%) rotateY(0)}:host([effect=flip-horizontal][position=left]) #content{transform:translateY(-50%) rotateY(-70deg)}:host([effect=flip-horizontal][position=left][opened]) #content{transform:translateY(-50%) rotateY(0)}`,Jo=a`:host([effect=flip-vertical]){perspective:1300px}:host([effect=flip-vertical]) #content{transform-style:preserve-3d;transition:all var(--kemet-popover-transition-speed,.3s);opacity:0}:host([effect=flip-vertical][opened]) #content{opacity:1}:host([effect=flip-vertical][position=top]) #content{transform:translateX(-50%) rotateX(-70deg)}:host([effect=flip-vertical][position=top][opened]) #content{transform:translateX(-50%) rotateX(0)}:host([effect=flip-vertical][position=bottom]) #content{transform:translateX(-50%) rotateX(-70deg)}:host([effect=flip-vertical][position=bottom][opened]) #content{transform:translateX(-50%) rotateX(0)}:host([effect=flip-vertical][position=right]) #content{transform:translateY(-50%) rotateX(-70deg)}:host([effect=flip-vertical][position=right][opened]) #content{transform:translateY(-50%) rotateX(0)}:host([effect=flip-vertical][position=left]) #content{transform:translateY(-50%) rotateX(-70deg)}:host([effect=flip-vertical][position=left][opened]) #content{transform:translateY(-50%) rotateX(0)}`,Zo=a`:host([effect=sign]){perspective:1300px}:host([effect=sign]) #content{transform-style:preserve-3d;transition:all var(--kemet-popover-transition-speed,.3s);opacity:0}:host([effect=sign][opened]) #content{opacity:1}:host([effect=sign][position=top]) #content{transform-origin:0 100%;transform:translateX(-50%) rotateX(90deg)}:host([effect=sign][position=top][opened]) #content{transform:translateX(-50%) rotateX(0)}:host([effect=sign][position=bottom]) #content{transform-origin:100% 0;transform:translateX(-50%) rotateX(90deg)}:host([effect=sign][position=bottom][opened]) #content{transform:translateX(-50%) rotateX(0)}:host([effect=sign][position=right]) #content{transform-origin:0 100%;transform:translateY(-50%) rotateY(90deg)}:host([effect=sign][position=right][opened]) #content{transform:translateY(-50%) rotateY(0)}:host([effect=sign][position=left]) #content{transform-origin:100% 0;transform:translateY(-50%) rotateY(90deg)}:host([effect=sign][position=left][opened]) #content{transform:translateY(-50%) rotateY(0)}`,Go=a`:host([effect=super-scaled]) #content{opacity:0;transition:all var(--kemet-popover-transition-speed,.3s)}:host([effect=super-scaled][opened]) #content{opacity:1}:host([effect=super-scaled][position=bottom]) #content,:host([effect=super-scaled][position=top]) #content{transform:translateX(-50%) scale(2)}:host([effect=super-scaled][position=bottom][opened]) #content,:host([effect=super-scaled][position=top][opened]) #content{transform:translateX(-50%) scale(1)}:host([effect=super-scaled][position=left]) #content,:host([effect=super-scaled][position=right]) #content{transform:translateY(-50%) scale(2)}:host([effect=super-scaled][position=left][opened]) #content,:host([effect=super-scaled][position=right][opened]) #content{transform:translateY(-50%) scale(1)}`;let Qo=class extends it{constructor(){super(),this.placement="top",this.effect="fade",this.fireOn="hover",this.strategy="fixed",this.skidding=0,this.distance=0,this.addEventListener("kemet-popper-close-btn",(()=>this.opened=!1))}firstUpdated(){"click"===this.fireOn&&this.focusableElements.forEach((t=>{t.addEventListener("keydown",(t=>this.handleFocusableDown(t)))}))}updated(t){this.refresh(),t.get("opened")||!0!==this.opened||yt(this,"kemet-popper-opened",this),t.get("opened")&&!1===this.opened&&yt(this,"kemet-popper-closed",this)}render(){return U`<div id="trigger" part="trigger" tabIndex="0" @click="${"click"===this.fireOn?t=>this.toggle(t):null}" @keyup="${"click"===this.fireOn?t=>this.handleKeyUp(t):null}" @mouseover="${"click"!==this.fireOn?()=>this.opened=!0:null}" @focus="${"click"!==this.fireOn?()=>this.opened=!0:null}" @mouseout="${"click"!==this.fireOn?()=>this.opened=!1:null}" @blur="${"click"!==this.fireOn?()=>this.opened=!1:null}"><slot name="trigger"></slot></div><div id="content" @mouseover="${"click"!==this.fireOn?()=>this.opened=!0:null}" @mouseout="${"click"!==this.fireOn?()=>this.opened=!1:null}"><slot name="content" @slotchange="${()=>this.makePopper()}"></slot></div>`}refresh(){var t;null===(t=this.popperInstance)||void 0===t||t.setOptions({placement:this.placement,strategy:this.strategy,modifiers:[{name:"offset",options:{offset:[this.skidding,this.distance]}}]})}makePopper(){this.popperInstance=jo(this.triggerElement,this.contentElement,{placement:this.placement,strategy:this.strategy,modifiers:[{name:"offset",options:{offset:[this.skidding,this.distance]}}]})}toggle(t){const e="trigger"===t.target.getAttribute("slot"),o="trigger"===t.target.getAttribute("part");(e||o)&&(this.opened?this.opened=!1:this.opened=!0)}handleKeyUp(t){t.preventDefault(),t.keyCode===he&&(this.opened=!1),t.keyCode!==de&&t.keyCode!==ce||this.toggle(t)}handleFocusableDown(t){const e=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1];"Tab"===t.key&&(t.shiftKey&&document.activeElement===e?(t.preventDefault(),o.focus()):t.shiftKey||document.activeElement!==o||(t.preventDefault(),e.focus()))}};Qo.styles=[Ho,Yo,Vo,Fo,Wo,Ko,Jo,Zo,Go],t([at({type:String,reflect:!0})],Qo.prototype,"placement",void 0),t([at({type:Boolean,reflect:!0})],Qo.prototype,"opened",void 0),t([at({type:String,reflect:!0})],Qo.prototype,"effect",void 0),t([at({type:String,attribute:"fire-on"})],Qo.prototype,"fireOn",void 0),t([at({type:String})],Qo.prototype,"strategy",void 0),t([at({type:Number})],Qo.prototype,"skidding",void 0),t([at({type:Number})],Qo.prototype,"distance",void 0),t([lt()],Qo.prototype,"popperInstance",void 0),t([ct("#trigger")],Qo.prototype,"triggerElement",void 0),t([ct("#content")],Qo.prototype,"contentElement",void 0),t([function(t){return dt({descriptor:e=>({get(){var e,o;return null!==(o=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==o?o:[]},enumerable:!0,configurable:!0})})}("body, a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable], kemet-popper-close")],Qo.prototype,"focusableElements",void 0),Qo=t([rt("kemet-popper")],Qo);var ti=Qo;
82
82
  /**
83
83
  * @license
84
84
  * Copyright 2017 Google LLC
85
85
  * SPDX-License-Identifier: BSD-3-Clause
86
- */
87
- class ci extends Wt{constructor(t){if(super(t),this.et=q,t.type!==Ht)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===q||null==t)return this.ft=void 0,this.et=t;if(t===U)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}ci.directiveName="unsafeHTML",ci.resultType=1;const hi=Ft(ci),pi=a`:host{display:flex}.rotator__slide{pointer-events:none}.rotator__slide--active{pointer-events:auto}:host([effect=fade]) .rotator{display:inline-flex;flex-wrap:nowrap;flex-direction:row}:host([effect=fade]) .rotator__slide{width:100%;flex:none;opacity:0;box-sizing:border-box;transition:all var(--kemet-rotator-transition-speed,500ms) ease}:host([effect=fade]) .rotator__slide:not(:first-child){margin-left:-100%}:host([effect=fade]) .rotator__slide--active{opacity:1}:host([effect=flip]) .rotator{display:flex;position:relative;perspective:500}:host([effect=flip]) .rotator__slide{display:block;width:auto;position:absolute;top:-20px;left:0;opacity:0;transform:rotateX(90deg);transform-origin:0 0;transition:all var(--kemet-rotator-transition-speed,500ms) ease}:host([effect=flip]) .rotator__slide--active{top:0;opacity:1;transform:rotateX(0)}:host([effect=flip]) .rotator__slide--prev{top:40px;transform:rotateX(-90deg)}`;let ui=class extends it{constructor(){super(...arguments),this.activeSlide=0,this.width="auto",this.height="auto",this.messages=[],this.effect="fade",this.rotationSpeed=3}firstUpdated(){this.prevSlide=null,window.addEventListener("resize",this.setDimensions.bind(this))}updated(t){const e=!!t.get("width"),o=!!t.get("height");this.setDimensions(),e||o||setTimeout((()=>{this.rotationSpeed>0&&this.nextSlide()}),1e3*this.rotationSpeed)}render(){const t="flip"===this.effect?`width:${this.width};`:"",e="flip"===this.effect?`height:${this.height};`:"";return N`<span class="rotator" style="${t}${e}">${this.makeMessages()}</span>`}makeMessages(){return this.messages.map(((t,e)=>{const o=this.activeSlide===e?"rotator__slide--active":"",i=this.prevSlide===e?"rotator__slide--prev":"";return N`<span class="rotator__slide ${o} ${i}">${hi(t)}</span>`}))}setDimensions(){if("flip"===this.effect){this.width=`${this.offsetWidth}px`;const t=this.shadowRoot.querySelectorAll(".rotator__slide");let e=0;t.forEach((t=>{t.offsetHeight>e&&(e=t.offsetHeight)})),this.height=`${e}px`}}nextSlide(){this.activeSlide<this.messages.length-1?(this.activeSlide+=1,this.prevSlide=this.activeSlide-1):(this.activeSlide=0,this.prevSlide=this.messages.length-1)}};ui.styles=[pi],t([at({type:Number})],ui.prototype,"activeSlide",void 0),t([at({type:String})],ui.prototype,"width",void 0),t([at({type:String})],ui.prototype,"height",void 0),t([at({type:Array})],ui.prototype,"messages",void 0),t([at({type:String,reflect:!0})],ui.prototype,"effect",void 0),t([at({type:Number,attribute:"rotation-speed"})],ui.prototype,"rotationSpeed",void 0),t([lt()],ui.prototype,"prevSlide",void 0),ui=t([rt("kemet-rotator")],ui);let fi=class extends it{constructor(){super(...arguments),this.element=window,this.target=document.querySelector("body"),this.xOffset=0,this.yOffset=0}firstUpdated(){this.isSmoothSupported="scrollBehavior"in document.documentElement.style}render(){return N`<div tabindex="0" @click="${()=>this.handleScroll()}" @keyup="${t=>this.handleKeyup(t)}"><slot></slot></div>`}handleKeyup(t){t.keyCode!==he&&t.keyCode!==pe||this.handleScroll()}handleScroll(){const t=this.target.offsetTop+this.yOffset,e=this.target.offsetLeft+this.xOffset;this.isSmoothSupported?this.element.scrollTo({top:t,left:e,behavior:"smooth"}):this.element.scrollTo(e,t)}};fi.styles=[a`:host{cursor:pointer;display:inline-block}`],t([at({type:Object})],fi.prototype,"element",void 0),t([at({type:Object})],fi.prototype,"target",void 0),t([at({type:Number,attribute:"x-offset",reflect:!0})],fi.prototype,"xOffset",void 0),t([at({type:Number,attribute:"y-offset",reflect:!0})],fi.prototype,"yOffset",void 0),t([lt()],fi.prototype,"isSmoothSupported",void 0),fi=t([rt("kemet-scroll-link")],fi);const mi=a`:host{display:block;box-sizing:border-box;padding:var(--kemet-scroll-nav-padding,1rem 2rem);background-color:var(--kemet-scroll-nav-background,#fafafa);transition:all var(--kemet-scroll-nav-transition,300ms) ease}:host([effect=resize]),:host([transform]){position:fixed;top:0;left:0;width:100%}:host([effect=resize]){height:var(--kemet-scroll-nav-resize-height,400px)}:host([transform][effect=resize]){height:var(--kemet-scroll-nav-resize-height-transformed,100px)}`;let vi=class extends it{constructor(){super(...arguments),this.effect="sticky",this.transform=!1,this.offset=0}render(){return N`<slot></slot>`}firstUpdated(){const t=this.offsetTop,e=this.offsetHeight;window.addEventListener("scroll",(()=>{this.handleScroll(t,e)}))}handleScroll(t,e){const o="sticky"===this.effect?t+this.offset:e+this.offset;window.pageYOffset>=o?this.transform=!0:this.transform=!1}};vi.styles=[mi],t([at({type:String,reflect:!0})],vi.prototype,"effect",void 0),t([at({type:Boolean,reflect:!0})],vi.prototype,"transform",void 0),t([at({type:Number})],vi.prototype,"offset",void 0),vi=t([rt("kemet-scroll-nav")],vi);const gi=a`*,::after,::before{box-sizing:border-box}:host{display:flex;flex-direction:column;width:100%}:host([axis=horizontal]){margin:auto;max-width:var(--kemet-scroll-snap-horizontal-max-width,1024px)}:host([pagination=left]),:host([pagination=right]){flex-direction:row}:host([pagination=none]) ::slotted([slot=pagination]){display:none}:host([pagination=left]) ::slotted([slot=pagination]),:host([pagination=top]) ::slotted([slot=pagination]){order:-1}::slotted([slot=slides]){display:flex;gap:var(--kemet-scroll-snap-gap,1.5rem);scroll-snap-type:x mandatory;overflow-x:scroll}:host([axis=vertical]){height:var(--kemet-scroll-snap-vertical-height,100vh)}:host([axis=vertical]) ::slotted([slot=slides]){flex-direction:column;overflow-x:hidden;scroll-snap-type:y mandatory;padding:var(--kemet-scroll-snap-slides-vertical-padding,0 2rem)}`,yi=a`:host{margin:auto;padding:var(--kemet-scroll-snap-paginator-padding,1rem 0)}nav{display:flex;gap:var(--kemet-scroll-snap-paginator-gap,.5rem)}:host([center]) nav{justify-content:center}.link{cursor:pointer;color:var(--kemet-scroll-snap-paginator-link-color,var(--kemet-color-primary))}`;let bi=class extends it{constructor(){super(...arguments),this.slides=[],this.icon="circle-fill",this.size=16,this.hideFocusedLinks=!1,this.useNumberPages=!1,this.useLabelPages=!1}updated(){const t=this.closest("kemet-scroll-snap");t&&t.addEventListener("kemet-scroll-snap-make-slides",(t=>{this.slides=t.detail}))}render(){return N`<nav part="nav">${this.makePagination()}</nav>`}makePagination(){let t=0;return this.slides?this.slides.map((e=>(t=t+=1,e.focused?N`<span part="span">${this.pageDisplay(e,t)}</span>`:N`<span class="link" tabindex="0" role="button" @keyup="${t=>this.handleKeyboardInput(t,e.id)}" @click="${()=>this.slideLink(e.id)}" aria-label="${e.label}">${this.pageDisplay(e,t)}</span>`))):null}pageDisplay(t,e){return this.useNumberPages?e:this.useLabelPages?t.label:N`<kemet-icon icon="${this.icon}" size="${this.size}"></kemet-icon>`}slideLink(t){pt(this,"kemet-scroll-snap-focus",t)}handleKeyboardInput(t,e){"Enter"!==t.code&&"Space"!==t.code||this.slideLink(e)}};bi.styles=[yi],t([at({type:Array})],bi.prototype,"slides",void 0),t([at({type:String})],bi.prototype,"icon",void 0),t([at({type:Number})],bi.prototype,"size",void 0),t([at({type:Boolean,reflect:!0})],bi.prototype,"center",void 0),t([at({type:Boolean,attribute:"hide-focused-links"})],bi.prototype,"hideFocusedLinks",void 0),t([at({type:Boolean,reflect:!0,attribute:"use-number-pages"})],bi.prototype,"useNumberPages",void 0),t([at({type:Boolean,reflect:!0,attribute:"use-label-pages"})],bi.prototype,"useLabelPages",void 0),bi=t([rt("kemet-scroll-snap-paginator")],bi);let ki=class extends it{updated(){this.addTabIndex()}render(){return N`<slot></slot>`}addTabIndex(){this.setAttribute("tabindex","0")}};ki.styles=[a`:host{display:block;flex:0 0 auto;width:var(--kemet-scroll-snap-slide-width,100%);scroll-snap-align:var(--kemet-scroll-snap-slide-align,center)}`],t([at({type:Boolean,reflect:!0})],ki.prototype,"focused",void 0),t([at({type:Number,reflect:!0})],ki.prototype,"index",void 0),t([at({type:String,reflect:!0})],ki.prototype,"label",void 0),ki=t([rt("kemet-scroll-snap-slide")],ki);let xi=class extends it{constructor(){super(),this.axis="horizontal",this.pagination="bottom",this.addEventListener("kemet-scroll-snap-focus",(t=>{this.focusSlide(t.detail)}))}firstUpdated(){this.isTouchDevice="ontouchstart"in document.documentElement,this.slides=[],this.setFocusedSlides()}updated(){this.setVerticalAttribute()}render(){return N`<slot name="slides"></slot><slot name="pagination"></slot>`}setFocusedSlides(){const t=this.querySelectorAll("kemet-scroll-snap-slide"),e=this.querySelector('[slot="slides"]'),o=new IntersectionObserver((t=>{t.forEach((t=>{const{target:e}=t;t.intersectionRatio>=.5?e.focused=!0:e.focused=!1})),this.makeSlides()}),{root:e,rootMargin:"0px",threshold:.5});t.forEach((t=>{o.observe(t)}))}makeSlides(){const t=[];this.querySelectorAll("kemet-scroll-snap-slide").forEach(((e,o)=>{const i=e;i.index=o,t.push({id:o,focused:i.focused,label:i.label})})),this.slides=t,pt(this,"kemet-scroll-snap-make-slides",this.slides)}focusSlide(t){this.querySelector(`kemet-scroll-snap-slide[index="${t}"]`).scrollIntoView({behavior:"smooth",block:"nearest"})}setVerticalAttribute(){"vertical"===this.axis&&document.querySelector("html").setAttribute("kemet-scroll-snap-axis","vertical")}};xi.styles=[gi],t([at({type:String,reflect:!0})],xi.prototype,"axis",void 0),t([at({type:String,reflect:!0})],xi.prototype,"pagination",void 0),t([lt()],xi.prototype,"isTouchDevice",void 0),t([lt()],xi.prototype,"slides",void 0),xi=t([rt("kemet-scroll-snap")],xi);let wi=class extends it{constructor(){super(...arguments),this.value=""}render(){return N`<slot></slot>`}};t([at({type:String})],wi.prototype,"label",void 0),t([at({type:String})],wi.prototype,"value",void 0),t([at({type:Boolean})],wi.prototype,"disable",void 0),t([at({type:Boolean})],wi.prototype,"selected",void 0),wi=t([rt("kemet-option")],wi);const $i=a`:host{position:relative;display:block}select{color:var(--kemet-color-text);display:block;font-size:1rem;width:100%;padding:var(--kemet-select-padding,1rem);border:var(--kemet-select-border,1px solid var(--kemet-color-background));appearance:none;box-sizing:border-box;background-color:transparent}option{color:var(--kemet-color-black)}:host([status=error]) select{border:var(--kemet-select-border-color-error,1px solid var(--kemet-color-error))}:host([status=success]) select{border:var(--kemet-select-border-color-success,1px solid var(--kemet-color-success))}:host([status=warning]) select{border:var(--kemet-select-border-color-warning,1px solid var(--kemet-color-warning))}:host([disabled]) select{opacity:.5}:host([rounded]) select{border-radius:var(--kemet-select-border-radius-rounded,var(--kemet-border-radius))}:host([filled]) select{border:var(--kemet-select-border-filled,none);color:var(--kemet-select-color-filled,var(--kemet-color-white));background-color:var(--kemet-select-background-color-filled,var(--kemet-color-primary))}:host([filled]) kemet-icon{color:var(--kemet-select-color-filled,var(--kemet-color-white))}:host([status=error][filled]) select{background-color:var(--kemet-select-background-color-error,var(--kemet-color-error))}:host([status=success][filled]) select{background-color:var(--kemet-select-background-color-success,var(--kemet-color-success))}:host([status=warning][filled]) select{background-color:var(--kemet-select-background-color-warning,var(--kemet-color-warning))}kemet-icon{position:absolute;right:var(--kemet-select-icon-right,1rem);top:50%;transform:translateY(-50%)}`;let Si=class extends it{constructor(){super(),this.name="select",this.icon="chevron-down",this.iconSize=16,this.formSubmitController=new _t(this),this.control=this.closest("kemet-field")}firstUpdated(){this.select=this.shadowRoot.querySelector("select"),this.selectedOption=this.querySelector("[selected]"),this.value=this.selectedOption?this.selectedOption.value:""}render(){return N`<select part="select" id="${this.slug}" name="${this.name}" ?required="${this.required}" ?disabled="${this.disabled}" ?multiple="${this.multiple}" @change="${this.handleChange}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @invalid="${this.handleInvalid}">${this.makeOptions()}</select> ${this.makeIcon()}<slot @slotchange="${()=>this.makeOptions()}"></slot>`}makeOptions(){return this.options=[],this.optionElements=this.querySelectorAll("kemet-option"),this.optionElements.forEach((t=>{this.options=this.options.concat({label:t.label,value:t.value,disabled:t.disabled,selected:t.selected})})),this.options.map((t=>N`<option value="${t.value}" ?disabled="${t.disabled}" ?selected="${t.selected}">${t.label}</option>`))}makeIcon(){return this.icon||""!==this.icon?N`<kemet-icon icon="${this.icon}" size="${this.iconSize}"></kemet-icon>`:null}handleFocus(){this.hasFocus=!0,pt(this,"kemet-input-focused",!0)}handleBlur(){this.hasFocus=!1,pt(this,"kemet-input-focused",!1),this.select.checkValidity(),this.select.checkValidity()||(this.invalid=!0,this.status="error",this.control.status="error",pt(this,"kemet-input-status",{status:"error",validity:this.select.validity,element:this}))}handleChange(){this.value=this.select.value,this.select.checkValidity()&&(this.invalid=!1,this.status="standard",pt(this,"kemet-input-status",{status:"standard",validity:this.select.validity,element:this}))}handleInvalid(){this.invalid=!0,this.status="error",pt(this,"kemet-input-status",{status:"error",validity:this.select.validity,element:this})}checkValidity(){this.select.checkValidity()}};Si.styles=[$i],t([at({type:String})],Si.prototype,"slug",void 0),t([at({type:String})],Si.prototype,"name",void 0),t([at({type:String})],Si.prototype,"value",void 0),t([at({type:Array})],Si.prototype,"options",void 0),t([at({type:String,reflect:!0})],Si.prototype,"status",void 0),t([at({type:Boolean,reflect:!0})],Si.prototype,"required",void 0),t([at({type:Boolean,reflect:!0})],Si.prototype,"disabled",void 0),t([at({type:Boolean})],Si.prototype,"multiple",void 0),t([at({type:String})],Si.prototype,"icon",void 0),t([at({type:Number,attribute:"icon-size"})],Si.prototype,"iconSize",void 0),t([at({type:Boolean,reflect:!0})],Si.prototype,"filled",void 0),t([at({type:Boolean,reflect:!0})],Si.prototype,"rounded",void 0),t([lt()],Si.prototype,"invalid",void 0),t([lt()],Si.prototype,"control",void 0),t([lt()],Si.prototype,"select",void 0),t([lt()],Si.prototype,"selectedOption",void 0),t([lt()],Si.prototype,"optionElements",void 0),t([lt()],Si.prototype,"hasFocus",void 0),Si=t([rt("kemet-select")],Si);const Ei=a`:host{display:flex;gap:1rem;flex-direction:column}`,_i=a`:host{cursor:grab;display:block;padding:1rem;border:1px solid var(--kemet-color-background)}:host([ghost]){opacity:.5;border-style:dashed}`;let Ai=class extends it{firstUpdated(){this.draggable=!0}render(){return N`<slot></slot>`}};Ai.styles=[_i],t([at({type:Boolean,reflect:!0})],Ai.prototype,"ghost",void 0),Ai=t([rt("kemet-sortable-item")],Ai);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var Oi={};(function(t){function e(){var t={dragEvents:"ondragstart"in document.documentElement,draggable:"draggable"in document.documentElement,touchEvents:"ontouchstart"in document.documentElement,userAgentSupportingNativeDnD:void 0},e=!!window.chrome||/chrome/i.test(navigator.userAgent);return t.userAgentSupportingNativeDnD=!(/iPad|iPhone|iPod|Android/.test(navigator.userAgent)||e&&t.touchEvents),t}function o(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}function i(t){if(t&&Object.keys(t).forEach((function(e){_[e]=t[e]})),!_.forceApply){var i=e();if(i.userAgentSupportingNativeDnD&&i.draggable&&i.dragEvents)return!1}return S=o(),_.holdToDrag?a("touchstart",w,!1):a("touchstart",s,!1),!0}function s(t){if(!E){var e=r(t);if(e)try{E=new D(t,_,e,n)}catch(e){throw n(_,t,3),e}}}function r(t){var e=t.target;do{if(!1!==e.draggable&&e.getAttribute&&"true"===e.getAttribute("draggable"))return e}while((e=e.parentNode)&&e!==document.body)}function n(t,e,o){if(0===o&&t.defaultActionOverride)try{t.defaultActionOverride(e),e.defaultPrevented}catch(t){}E=null}function a(t,e,o){void 0===o&&(o=!0),document.addEventListener(t,e,!!S&&{passive:o})}function l(t,e){document.removeEventListener(t,e)}function d(t){return 0===t.length?0:t.reduce((function(t,e){return e+t}),0)/t.length}function c(t){return t&&t.tagName}function h(t,e){for(var o=0;o<t.changedTouches.length;o++)if(t.changedTouches[o].identifier===e)return!0;return!1}function p(t,e,o,i,s,r,n){void 0===n&&(n=null);var a=e.changedTouches[0],l=new Event(o,{bubbles:!0,cancelable:i});l.dataTransfer=r,l.relatedTarget=n,l.screenX=a.screenX,l.screenY=a.screenY,l.clientX=a.clientX,l.clientY=a.clientY,l.pageX=a.pageX,l.pageY=a.pageY;var d=t.getBoundingClientRect();return l.offsetX=l.clientX-d.left,l.offsetY=l.clientY-d.top,l}function u(t,e,o){for(var i=[],s=[],r=0;r<e.touches.length;r++){var n=e.touches[r];i.push(n[t+"X"]),s.push(n[t+"Y"])}o.x=d(i),o.y=d(s)}function f(t,e){if(1===t.nodeType){for(var o=getComputedStyle(t),i=0;i<o.length;i++){var s=o[i];e.style.setProperty(s,o.getPropertyValue(s),o.getPropertyPriority(s))}e.style.pointerEvents="none",e.removeAttribute("id"),e.removeAttribute("class"),e.removeAttribute("draggable")}if(t.hasChildNodes())for(i=0;i<t.childNodes.length;i++)f(t.childNodes[i],e.childNodes[i])}function m(t){var e=t.cloneNode(!0);return f(t,e),e.style.position="absolute",e.style.left="0px",e.style.top="0px",e.style.zIndex="999999",e.classList.add(L),e.classList.add(I),e}function v(t){return C.map((function(e){var o=t.style[e+"transform"];return o&&"none"!==o?o.replace(/translate\(\D*\d+[^,]*,\D*\d+[^,]*\)\s*/g,""):""}))}function g(t,e,o,i,s){void 0===s&&(s=!0);var r=e.x,n=e.y;i&&(r+=i.x,n+=i.y),s&&(r-=parseInt(t.offsetWidth,10)/2,n-=parseInt(t.offsetHeight,10)/2);for(var a="translate3d("+r+"px,"+n+"px, 0)",l=0;l<C.length;l++){var d=C[l]+"transform";t.style[d]=a+" "+o[l]}}function y(t,e,o,i){var s=getComputedStyle(t);if("hidden"!==s.visibility&&"none"!==s.display){e.classList.add(B);var r=getComputedStyle(e),n=parseFloat(r.transitionDuration);if(isNaN(n)||0===n)i();else{var a=t.getBoundingClientRect(),l={x:a.left,y:a.top};l.x+=document.body.scrollLeft||document.documentElement.scrollLeft,l.y+=document.body.scrollTop||document.documentElement.scrollTop,l.x-=parseInt(s.marginLeft,10),l.y-=parseInt(s.marginTop,10);var d=parseFloat(r.transitionDelay),c=Math.round(1e3*(n+d));g(e,l,o,void 0,!1),setTimeout(i,c)}}else i()}function b(t,e){return t?t===A[0]?O[0]:0===t.indexOf(A[1])||t===A[7]?O[1]:0===t.indexOf(A[4])?O[3]:t===A[6]?O[2]:O[1]:3===e.nodeType&&"A"===e.tagName?O[3]:O[1]}function k(t,e,o,i,s,r,n){void 0===r&&(r=!0),void 0===n&&(n=null);var a=p(e,o,t,r,document.defaultView,s,n),l=!e.dispatchEvent(a);return i.g=0,l}function x(t,e){if(!t||t===A[7])return e;if(e===O[1]){if(0===t.indexOf(O[1]))return O[1]}else if(e===O[3]){if(0===t.indexOf(O[3])||t.indexOf("Link")>-1)return O[3]}else if(e===O[2]&&(0===t.indexOf(O[2])||t.indexOf("Move")>-1))return O[2];return O[0]}function w(t){var e=t.target,o=function(){r.off(),n.off(),a.off(),clearTimeout(i)},i=setTimeout((function(){r.off(),n.off(),a.off(),s(t)}),_.holdToDrag),r=$(e,"touchend",o,this),n=$(e,"touchcancel",o,this),a=$(window,"scroll",o,this)}function $(t,e,o,i){return i&&(o=o.bind(i)),t.addEventListener(e,o),{off:function(){return t.removeEventListener(e,o)}}}var S,E,_={iterationInterval:150},A=["none","copy","copyLink","copyMove","link","linkMove","move","all"],O=["none","copy","move","link"],C=["","-webkit-"],z="dnd-poly-",L=z+"drag-image",B=z+"snapback",I=z+"icon",D=function(){function t(t,e,o,i){this.h=t,this.i=e,this.j=o,this.k=i,this.l=0,this.m=null,this.o=null,this.p=t,this.q=t.changedTouches[0],this.s=this.t.bind(this),this.u=this.v.bind(this),a("touchmove",this.s,!1),a("touchend",this.u,!1),a("touchcancel",this.u,!1)}return t.prototype.A=function(){var t=this;this.l=1,this.B=O[0],this.C={D:{},F:void 0,g:3,G:[]},this.H={x:null,y:null},this.I={x:null,y:null};var e=this.j;if(this.J=new P(this.C,(function(o,i,s){e=o,"number"!=typeof i&&"number"!=typeof s||(t.K={x:i||0,y:s||0})})),this.C.g=2,this.J.dropEffect=O[0],k("dragstart",this.j,this.p,this.C,this.J))return this.l=3,this.L(),!1;if(u("page",this.p,this.I),this.M=m(e),this.N=v(this.M),!this.K)if(this.i.dragImageOffset)this.K={x:this.i.dragImageOffset.x,y:this.i.dragImageOffset.y};else if(this.i.dragImageCenterOnTouch){var o=getComputedStyle(e);this.K={x:0-parseInt(o.marginLeft,10),y:0-parseInt(o.marginTop,10)}}else{var i=e.getBoundingClientRect();o=getComputedStyle(e),this.K={x:i.left-this.q.clientX-parseInt(o.marginLeft,10)+i.width/2,y:i.top-this.q.clientY-parseInt(o.marginTop,10)+i.height/2}}return g(this.M,this.I,this.N,this.K,this.i.dragImageCenterOnTouch),document.body.appendChild(this.M),this.O=setInterval((function(){t.P||(t.P=!0,t.R(),t.P=!1)}),this.i.iterationInterval),!0},t.prototype.L=function(){this.O&&(clearInterval(this.O),this.O=null),l("touchmove",this.s),l("touchend",this.u),l("touchcancel",this.u),this.M&&(this.M.parentNode.removeChild(this.M),this.M=null),this.k(this.i,this.p,this.l)},t.prototype.t=function(t){var e=this;if(!1!==h(t,this.q.identifier)){if(this.p=t,0===this.l){var o=void 0;if(this.i.dragStartConditionOverride)try{o=this.i.dragStartConditionOverride(t)}catch(t){o=!1}else o=1===t.touches.length;return o?void(!0===this.A()&&(this.h.preventDefault(),t.preventDefault())):void this.L()}if(t.preventDefault(),u("client",t,this.H),u("page",t,this.I),this.i.dragImageTranslateOverride)try{var i=!1;if(this.i.dragImageTranslateOverride(t,{x:this.H.x,y:this.H.y},this.m,(function(t,o){e.M&&(i=!0,e.H.x+=t,e.H.y+=o,e.I.x+=t,e.I.y+=o,g(e.M,e.I,e.N,e.K,e.i.dragImageCenterOnTouch))})),i)return}catch(t){}g(this.M,this.I,this.N,this.K,this.i.dragImageCenterOnTouch)}},t.prototype.v=function(t){if(!1!==h(t,this.q.identifier)){if(this.i.dragImageTranslateOverride)try{this.i.dragImageTranslateOverride(void 0,void 0,void 0,(function(){}))}catch(t){}if(0===this.l)return void this.L();t.preventDefault(),this.l="touchcancel"===t.type?3:2}},t.prototype.R=function(){var t=this,e=this.B;this.C.g=3,this.J.dropEffect=O[0];var o=k("drag",this.j,this.p,this.C,this.J);if(o&&(this.B=O[0]),o||2===this.l||3===this.l)return this.S(this.l)?void y(this.j,this.M,this.N,(function(){t.T()})):void this.T();var i=document.elementFromPoint(this.H.x,this.H.y),s=this.o;i!==this.m&&i!==this.o&&(this.m=i,null!==this.o&&(this.C.g=3,this.J.dropEffect=O[0],k("dragexit",this.o,this.p,this.C,this.J,!1)),null===this.m?this.o=this.m:(this.C.g=3,this.J.dropEffect=b(this.C.F,this.j),k("dragenter",this.m,this.p,this.C,this.J)?(this.o=this.m,this.B=x(this.J.effectAllowed,this.J.dropEffect)):this.m!==document.body&&(this.o=document.body))),s!==this.o&&c(s)&&(this.C.g=3,this.J.dropEffect=O[0],k("dragleave",s,this.p,this.C,this.J,!1,this.o)),c(this.o)&&(this.C.g=3,this.J.dropEffect=b(this.C.F,this.j),!1===k("dragover",this.o,this.p,this.C,this.J)?this.B=O[0]:this.B=x(this.J.effectAllowed,this.J.dropEffect)),e!==this.B&&this.M.classList.remove(z+e);var r=z+this.B;!1===this.M.classList.contains(r)&&this.M.classList.add(r)},t.prototype.S=function(t){var e=this.B===O[0]||null===this.o||3===t;return e?c(this.o)&&(this.C.g=3,this.J.dropEffect=O[0],k("dragleave",this.o,this.p,this.C,this.J,!1)):c(this.o)&&(this.C.g=1,this.J.dropEffect=this.B,!0===k("drop",this.o,this.p,this.C,this.J)?this.B=this.J.dropEffect:this.B=O[0]),e},t.prototype.T=function(){this.C.g=3,this.J.dropEffect=this.B,k("dragend",this.j,this.p,this.C,this.J,!1),this.l=2,this.L()},t}(),P=function(){function t(t,e){this.U=t,this.V=e,this.W=O[0]}return Object.defineProperty(t.prototype,"types",{get:function(){if(0!==this.U.g)return Object.freeze(this.U.G)},enumerable:!0,configurable:!0}),t.prototype.setData=function(t,e){if(2===this.U.g){if(t.indexOf(" ")>-1)throw new Error("illegal arg: type contains space");this.U.D[t]=e,-1===this.U.G.indexOf(t)&&this.U.G.push(t)}},t.prototype.getData=function(t){if(1===this.U.g||2===this.U.g)return this.U.D[t]||""},t.prototype.clearData=function(t){if(2===this.U.g){if(t&&this.U.D[t]){delete this.U.D[t];var e=this.U.G.indexOf(t);return void(e>-1&&this.U.G.splice(e,1))}this.U.D={},this.U.G=[]}},t.prototype.setDragImage=function(t,e,o){2===this.U.g&&this.V(t,e,o)},Object.defineProperty(t.prototype,"effectAllowed",{get:function(){return this.U.F},set:function(t){2===this.U.g&&A.indexOf(t)>-1&&(this.U.F=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dropEffect",{get:function(){return this.W},set:function(t){0!==this.U.g&&A.indexOf(t)>-1&&(this.W=t)},enumerable:!0,configurable:!0}),t}();t.polyfill=i,Object.defineProperty(t,"__esModule",{value:!0})})(Oi);let Ci=class extends it{firstUpdated(){Oi.polyfill(),this.addEventListener("dragstart",(t=>this.handleDragStart(t)),!1),this.addEventListener("dragenter",(t=>{t.preventDefault()}))}render(){return N`<slot></slot>`}handleDragStart(t){this.sortableItem=t.target,this.addEventListener("dragover",(t=>this.handleDragOver(t)),!1),this.addEventListener("dragend",(t=>this.handleDragEnd(t)),!1),setTimeout((()=>{this.sortableItem.ghost=!0}),0)}handleDragOver(t){t.preventDefault();const{target:e}=t;if(e&&"KEMET-SORTABLE-ITEM"===e.tagName){const o=(t=>{const e=t.target.getBoundingClientRect();return{x:t.pageX-e.left,y:t.pageY-e.top}})(t),i=(t=>{const e=t.getBoundingClientRect();return(e.bottom-e.top)/2})(t.target);o.y>i?this.insertBefore(this.sortableItem,e.nextSibling):this.insertBefore(this.sortableItem,e)}}handleDragEnd(t){t.preventDefault(),this.sortableItem.ghost=!1,pt(this,"kemet-sortable-drag-end",{event:t,current:this.sortableItem,all:this.querySelectorAll("kemet-sortable-item")})}};Ci.styles=[Ei],t([lt()],Ci.prototype,"sortableItem",void 0),Ci=t([rt("kemet-sortable")],Ci);let zi=class extends it{constructor(){super(...arguments),this.svg="svgs",this.ratio="none",this.viewBox="0 0 128 128"}updated(){this.setSize(),this.getIcon()}render(){return N`<svg part="svg" viewBox="${this.viewBox}" preserveAspectRatio="${this.ratio}" fill="currentColor"></svg>`}setSize(){this.size&&(this.style.width=`${this.size}px`,this.style.height=`${this.size}px`)}getIcon(){let t;const e=document.kemetSVGs[this.set];e.forEach(((o,i)=>{const s=o.getAttribute("id");s&&s===this.svg&&(t=e[i])})),t?this.fillSVG(t):console.error(`Could not find svg "${this.svg}" in set "${this.set}".`)}fillSVG(t){const e=t.cloneNode(!0),o=this.shadowRoot.querySelector("svg"),i=o.querySelector("g");i&&i.remove(),o.appendChild(e)}};zi.styles=[a`:host{display:inline-block}svg{width:100%;height:100%}`],t([at({type:String})],zi.prototype,"set",void 0),t([at({type:String})],zi.prototype,"svg",void 0),t([at({type:Number})],zi.prototype,"size",void 0),t([at({type:String})],zi.prototype,"ratio",void 0),t([at({type:String})],zi.prototype,"viewBox",void 0),zi=t([rt("kemet-svg")],zi);let Li=class extends it{constructor(){super(...arguments),this.set="svgs"}firstUpdated(){this.slotElement=this.shadowRoot.querySelector("slot"),document.kemetSVGs=document.kemetSVGs||{},this.populateIcons(),this.slotElement.addEventListener("slotchange",(()=>this.populateIcons()))}render(){return N`<slot></slot>`}populateIcons(){const t=this.slotElement.assignedElements()[0],e=t?t.querySelectorAll("defs > g"):null;e&&(document.kemetSVGs[this.set]=e)}};Li.styles=[a`:host{display:none}`],t([at({type:String})],Li.prototype,"set",void 0),t([lt()],Li.prototype,"slotElement",void 0),Li=t([rt("kemet-svgs")],Li);const Bi=a`:host{--kemet-tabs-ink-size:6px;--kemet-tabs-ink-radius:6px;--kemet-tabs-divider-size:1px;--kemet-tabs-spacer:1rem;display:flex;flex-direction:column;overflow:hidden;position:relative}:host([placement=bottom]){flex-direction:column-reverse}:host([placement=left]){flex-direction:row}:host([placement=right]){flex-direction:row-reverse}:host([placement=left]),:host([placement=right]){overflow:unset}[part=panels]>div{display:flex}:host([panel-effect=slide]) [part=panels]{transition:transform var(--kemet-tabs-transition-speed,.5s) linear}:host([panel-effect=fade]) [part=panels]{transform:none!important}:host([panel-effect=fade]) [part=panels]>div{flex-flow:row nowrap}:host([placement=left]) [part=panels],:host([placement=right]) [part=panels]{transform:none!important;position:relative;width:100%}:host([placement=top]) [part=panels]>div{margin-top:var(--kemet-tabs-spacer)}:host([placement=right]) [part=panels]>div{margin-right:var(--kemet-tabs-spacer)}:host([placement=bottom]) [part=panels]>div{margin-bottom:var(--kemet-tabs-spacer)}:host([placement=left]) [part=panels]>div{margin-left:var(--kemet-tabs-spacer)}[part=tablist]{display:flex}:host([placement=left]) [part=tablist],:host([placement=right]) [part=tablist]{display:flex;flex-direction:column;align-items:start}:host([tabs-align=center]) [part=tablist]{justify-content:center}:host([tabs-align=between]) [part=tablist]{justify-content:space-between}:host([tabs-align=evenly]) [part=tablist]{justify-content:space-evenly}:host([tabs-align=around]) [part=tablist]{justify-content:space-around}:host([tabs-align=start]) [part=tablist]{justify-content:flex-start}:host([tabs-align=end]) [part=tablist]{justify-content:flex-end}:host([overflow]) [part=tablist]{justify-content:start}[part=divider]{height:var(--kemet-tabs-divider-size);background-color:var(--kemet-tabs-divider-color,var(--kemet-color-gray4))}:host([placement=left]) [part=divider],:host([placement=right]) [part=divider]{width:var(--kemet-tabs-divider-size);height:auto}[part=ink]{height:var(--kemet-tabs-ink-size);border-top-left-radius:var(--kemet-tabs-ink-radius);border-top-right-radius:var(--kemet-tabs-ink-radius);transition:all .3s ease;background-color:var(--kemet-tabs-ink-color,var(--kemet-color-background))}:host([placement=right]) [part=ink]{width:var(--kemet-tabs-ink-size);border-top-right-radius:var(--kemet-tabs-ink-radius);border-bottom-right-radius:var(--kemet-tabs-ink-radius);border-top-left-radius:0;border-bottom-left-radius:0}:host([placement=left]) [part=ink]{width:var(--kemet-tabs-ink-size);border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--kemet-tabs-ink-radius);border-bottom-left-radius:var(--kemet-tabs-ink-radius)}:host([placement=bottom]) [part=ink]{border-top-right-radius:0;border-bottom-right-radius:var(--kemet-tabs-ink-radius);border-top-left-radius:0;border-bottom-left-radius:var(--kemet-tabs-ink-radius)}:host([overflow]) [part=links]{overflow-x:auto;margin:0 2rem;scroll-behavior:smooth}:host([overflow]) [part=links]::-webkit-scrollbar{display:none;width:0;background:0 0}:host([placement=bottom]) [part=links]{display:flex;flex-direction:column-reverse}[icon*=chevron]{cursor:pointer;position:absolute;top:1rem}[icon=chevron-left]{left:0}[icon=chevron-right]{right:0}:host([placement=bottom]) [icon*=chevron]{top:auto;bottom:1rem}`,Ii=a`:host{cursor:pointer;display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;white-space:nowrap;padding:var(--kemet-tab-padding,1rem)}:host([selected]){cursor:auto;color:var(--kemet-tab-color,var(--kemet-color-background))}kemet-icon{cursor:pointer;margin-left:.5rem}`,Di=a`:host{width:100%;flex:0 0 auto}::slotted(img){max-width:100%}:host(.fade){opacity:0;pointer-events:none;transition:opacity var(--kemet-tab-panel-fade-speed,.5s) ease}:host(.fade[selected]){opacity:1;pointer-events:auto}:host(.fade.push){margin-left:-100%}:host(.vertical){display:none}:host(.vertical[selected]){display:block}:host(.stacked){position:absolute;z-index:-1;opacity:0;visibility:hidden}:host(.stacked[selected]){position:relative;z-index:1;opacity:1;visibility:visible}`;let Pi=class extends it{constructor(){super(...arguments),this.selected=!1}updated(){this.a11y()}render(){return N`<slot></slot>`}a11y(){this.setAttribute("role","tabpanel"),this.selected?this.setAttribute("tabindex","0"):this.setAttribute("tabindex","-1")}};Pi.styles=[Di],t([at({type:Boolean,reflect:!0})],Pi.prototype,"selected",void 0),t([at({type:String})],Pi.prototype,"panel",void 0),Pi=t([rt("kemet-tab-panel")],Pi);let Ti=class extends it{constructor(){super(...arguments),this.selected=!1}firstUpdated(){this.addEventListener("click",this.select.bind(this))}updated(){this.a11y()}render(){return N`<slot></slot>${this.makeCloseable()}`}select(){pt(this,"kemet-tab-selected",this)}a11y(){this.setAttribute("role","tab"),this.selected?(this.setAttribute("aria-selected","true"),this.setAttribute("tabindex","0")):(this.setAttribute("aria-selected","false"),this.setAttribute("tabindex","-1"))}makeCloseable(){return this.closable?N`<kemet-icon icon="x-lg" @click="${()=>this.handleClosable()}"></kemet-icon>`:null}handleClosable(){pt(this,"kemet-tab-close",this)}};Ti.styles=[Ii],t([at({type:Boolean,reflect:!0})],Ti.prototype,"selected",void 0),t([at({type:String})],Ti.prototype,"link",void 0),t([at({type:Boolean})],Ti.prototype,"closable",void 0),Ti=t([rt("kemet-tab")],Ti);const Mi=a`:host{position:relative;display:block}textarea{color:var(--kemet-color-text);display:block;width:100%;padding:var(--kemet-textarea-padding,1rem);border:var(--kemet-textarea-border,1px solid var(--kemet-color-background));appearance:none;box-sizing:border-box;background:0 0}:host([status=error]) textarea{border:var(--kemet-textarea-border-color-error,1px solid var(--kemet-color-error))}:host([status=success]) textarea{border:var(--kemet-textarea-border-color-success,1px solid var(--kemet-color-success))}:host([status=warning]) textarea{border:var(--kemet-textarea-border-color-warning,1px solid var(--kemet-color-warning))}:host([disabled]) textarea{opacity:.5}:host([icon-left]) textarea{padding-left:var(--kemet-textarea-icon-left-padding,3rem)}:host([icon-right]) textarea{padding-right:var(--kemet-textarea-icon-right-padding,3rem)}:host([rounded]) textarea{border-radius:var(--kemet-textarea-border-radius-rounded,var(--kemet-border-radius))}:host([filled]) textarea{border:var(--kemet-textarea-border-filled,none);color:var(--kemet-textarea-color-filled,var(--kemet-color-white));background-color:var(--kemet-textarea-background-color-filled,var(--kemet-color-primary))}:host([filled]) textarea::placeholder{color:var(--kemet-textarea-color-filled,var(--kemet-color-white))}:host([status=error][filled]) textarea{background-color:var(--kemet-textarea-background-color-error,var(--kemet-color-error))}:host([status=success][filled]) textarea{background-color:var(--kemet-textarea-background-color-success,var(--kemet-color-success))}:host([status=warning][filled]) textarea{background-color:var(--kemet-textarea-background-color-warning,var(--kemet-color-warning))}`;let Ni=class extends it{constructor(){super(),this.slug="textarea",this.name="textarea",this.value="",this.status="standard",this.rows=4,this.formSubmitController=new _t(this)}firstUpdated(){this.form=this.closest("form"),this.control=this.closest("kemet-field"),this.textarea=this.shadowRoot.querySelector("textarea")}render(){return N`<textarea part="textarea" id="${this.slug}" name="${this.name}" .value="${Jt(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${jt(this.placeholder)}" rows="${jt(this.rows)}" minlength="${jt(this.minlength)}" maxlength="${jt(this.maxlength)}" autocorrect="${jt(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${jt(this.spellcheck)}" inputmode="${jt(this.inputmode)}" @change="${this.handleChange}" @input="${this.handleInput}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @invalid="${this.handleInvalid}"></textarea>`}handleFocus(){this.hasFocus=!0,this.dispatchEvent(new CustomEvent("kemet-input-focused",{bubbles:!0,composed:!0,detail:!0}))}handleBlur(){this.hasFocus=!1,this.dispatchEvent(new CustomEvent("kemet-input-focused",{bubbles:!0,composed:!0,detail:!1})),this.validateOnBlur&&this.form&&!this.form.noValidate&&(this.textarea.checkValidity(),this.validity=this.textarea.validity)}handleChange(){this.value=this.textarea.value,this.textarea.checkValidity()&&this.checkLimitValidity()&&(this.invalid=!1,this.status="standard",this.validity=this.textarea.validity,this.dispatchEvent(new CustomEvent("kemet-input-status",{bubbles:!0,composed:!0,detail:{status:"standard",validity:this.textarea.validity,element:this}})))}handleInput(){this.value=this.textarea.value,this.dispatchEvent(new CustomEvent("kemet-input-input",{bubbles:!0,composed:!0,detail:this.value}))}handleInvalid(){this.validity=this.textarea.validity,this.validateOnBlur&&(this.invalid=!0,this.status="error",this.dispatchEvent(new CustomEvent("kemet-input-status",{bubbles:!0,composed:!0,detail:{status:"error",validity:this.textarea.validity,element:this}})))}checkLimitValidity(){if(this.control){const t=this.control.querySelector("kemet-count");if(t)return this.value.length<t.limit}return!0}checkValidity(){return this.textarea.checkValidity()}focus(){return this.textarea.focus()}};Ni.styles=[Mi],t([at({type:String})],Ni.prototype,"slug",void 0),t([at({type:String})],Ni.prototype,"name",void 0),t([at({type:String})],Ni.prototype,"placeholder",void 0),t([at({type:Number})],Ni.prototype,"minlength",void 0),t([at({type:Number})],Ni.prototype,"maxlength",void 0),t([at({type:String})],Ni.prototype,"inputmode",void 0),t([at({type:Boolean})],Ni.prototype,"autofocus",void 0),t([at({type:Boolean,reflect:!0})],Ni.prototype,"disabled",void 0),t([at({type:Boolean})],Ni.prototype,"readonly",void 0),t([at({type:Boolean,reflect:!0})],Ni.prototype,"required",void 0),t([at({type:String})],Ni.prototype,"value",void 0),t([at({type:Boolean,reflect:!0})],Ni.prototype,"invalid",void 0),t([at({type:String,reflect:!0})],Ni.prototype,"status",void 0),t([at({type:Number})],Ni.prototype,"rows",void 0),t([at({type:Boolean,attribute:"validate-on-blur"})],Ni.prototype,"validateOnBlur",void 0),t([at({type:Boolean,reflect:!0})],Ni.prototype,"filled",void 0),t([at({type:Boolean,reflect:!0})],Ni.prototype,"rounded",void 0),t([at({type:Boolean})],Ni.prototype,"autocorrect",void 0),t([lt()],Ni.prototype,"form",void 0),t([lt()],Ni.prototype,"control",void 0),t([lt()],Ni.prototype,"textarea",void 0),t([lt()],Ni.prototype,"hasFocus",void 0),t([lt()],Ni.prototype,"validity",void 0),Ni=t([rt("kemet-textarea")],Ni);let Ui=class extends it{constructor(){super(),this.selectedIndex=0,this.panelPosition=0,this.panelEffect="none",this.placement="top",this.tabsAlign="center",this.hideInk=!1,this.addEventListener("kemet-tab-selected",this.tabSelectedChange.bind(this)),this.addEventListener("kemet-tab-close",this.handleTabClose.bind(this)),window.addEventListener("resize",this.handleResize.bind(this))}firstUpdated(){this.tabs=[],this.panels=[],this.xDown=null,this.yDown=null,this.links=this.shadowRoot.getElementById("links")}render(){return N`${this.makeLeftArrow()} ${this.makeRightArrow()}<div id="links" part="links"><div part="tablist" role="tablist"><slot name="tab" @slotchange="${()=>this.handleLinksSlotChange()}"></slot></div>${this.makeInk("links")}</div>${this.makeInk("host")} ${this.makeDivider()}<section id="panels" part="panels" style="transform:translateX(${this.panelPosition}px)"><div><slot name="panel" @slotchange="${()=>this.handlePanelsSlotChange()}"></slot></div></section>`}updated(){this.determineFade(),this.determineStacked()}handleLinksSlotChange(){const t=this.querySelectorAll("kemet-tab");let e=0;t.forEach((t=>{t.index=e,e+=1,this.tabs=this.tabs.concat(t),t.addEventListener("keydown",(t=>this.handleTabKeydown(t)))})),this.tabs.length>0&&(this.tabs[0].selected=!0),setTimeout((()=>{this.selectTab()}),1),this.determineOverflow()}handlePanelsSlotChange(){const t=this.querySelectorAll("kemet-tab-panel"),e=this.shadowRoot.getElementById("panels");let o=0;t.forEach((t=>{t.index=o,o+=1,this.panels=this.panels.concat(t)})),this.panels.length>0&&(this.panels[0].selected=!0),this.swipe&&(e.addEventListener("touchstart",(t=>this.handleTouchStart(t)),!1),e.addEventListener("touchmove",(t=>this.handleTouchMove(t)),!1)),this.selectPanel()}handleLeftArrow(){const t=this.tabs.find((t=>t.selected))||this.tabs[0],e=t.previousElementSibling,o=this.tabs.findIndex((t=>t.selected));this.selected?this.selected=e?e.link:t.link:this.selectedIndex=o>0?o-1:0,e&&(this.links.scrollLeft=e.offsetLeft-20),this.selectTab(),this.selectPanel()}handleRightArrow(){const t=this.tabs.find((t=>t.selected))||this.tabs[this.tabs.length-1],e=t.nextElementSibling,o=this.tabs.findIndex((t=>t.selected));this.selected?this.selected=e?e.link:t.link:this.selectedIndex=o<this.tabs.length-1?o+1:this.tabs.length-1,e&&(this.links.scrollLeft=e.offsetLeft-20),this.selectTab(),this.selectPanel()}handleTabClose(t){const e=t.detail,o=this.panels[e.index];this.selected=this.tabs[0].link,this.selectedIndex=0,o.remove(),e.remove()}makeInk(t){return this.hideInk?null:"top"!==this.placement&&"bottom"!==this.placement||!this.ink||"links"!==t?"left"!==this.placement&&"right"!==this.placement||!this.ink||"host"!==t?null:N`<div part="ink" style="height:${this.ink.height};transform:translateY(${this.ink.positionY})"></div>`:N`<div part="ink" style="width:${this.ink.width};transform:translateX(${this.ink.positionX})"></div>`}makeDivider(){return this.divider?N`<div part="divider"></div>`:null}makeLeftArrow(){return this.overflow?N`<kemet-icon icon="chevron-left" size="20" @click="${()=>this.handleLeftArrow()}"></kemet-icon>`:null}makeRightArrow(){return this.overflow?N`<kemet-icon icon="chevron-right" size="20" @click="${()=>this.handleRightArrow()}"></kemet-icon>`:null}selectTab(){const t=this.links?parseInt(window.getComputedStyle(this.links).marginLeft.replace("px",""),10):0,e=this.overflow?t:0;this.selected?this.tabs.forEach((t=>{const o=t.getAttribute("link");o===this.selected?(t.selected=!0,this.selected=o,this.ink={width:`${t.offsetWidth}px`,height:`${t.offsetHeight}px`,positionX:t.offsetLeft-e+"px",positionY:`${t.offsetTop}px`},this.links.scrollLeft=t.offsetLeft-e):t.selected=!1})):this.tabs.forEach((t=>{this.selectedIndex===t.index?(t.selected=!0,this.ink={width:`${t.offsetWidth}px`,height:`${t.offsetHeight}px`,positionX:t.offsetLeft-e+"px",positionY:`${t.offsetTop}px`},this.links.scrollLeft=t.offsetLeft-e):t.selected=!1}))}selectPanel(){this.selected?this.panels.forEach((t=>{const e=t.getAttribute("panel");"fade"===this.panelEffect&&0!==t.index&&t.classList.add("push"),"left"!==this.placement&&"right"!==this.placement||t.classList.add("vertical"),e===this.selected?(t.selected=!0,this.animatePanel(e,null)):t.selected=!1})):this.panels.forEach((t=>{"fade"===this.panelEffect&&0!==t.index&&t.classList.add("push"),"left"!==this.placement&&"right"!==this.placement||t.classList.add("vertical"),this.selectedIndex===t.index?(t.selected=!0,this.animatePanel(null,t.index)):t.selected=!1}))}dispatchTabChange(){const t={currentTabName:this.selected,currentTabIndex:this.selectedIndex};pt(this,"kemet-tab-changed",t)}tabSelectedChange(t){this.selected?this.selected=t.detail.getAttribute("link"):this.selectedIndex=t.detail.index,this.selectTab(),this.selectPanel(),this.dispatchTabChange()}determineFade(){this.panels.forEach((t=>{"fade"===this.panelEffect&&t.classList.add("fade")}))}determineStacked(){this.panels.forEach((t=>{"stacked"===this.panelEffect&&t.classList.add("stacked")}))}determineOverflow(){const t=this.offsetWidth,e=this.querySelectorAll("kemet-tab");let o=0;e.forEach((t=>{o+=t.offsetWidth})),o>t&&("top"===this.placement||"bottom"===this.placement)?this.overflow=!0:this.overflow=!1}handleResize(){if(this.tabs&&this.panels){const t=this.links?parseInt(window.getComputedStyle(this.links).marginLeft.replace("px",""),10):0,e=this.overflow?t:0,o=this.tabs.find((t=>t.selected));o&&(this.ink={width:`${o.offsetWidth}px`,height:`${o.offsetHeight}px`,positionX:o.offsetLeft-e+"px",positionY:`${o.offsetTop}px`}),this.determineOverflow(),this.selected?this.animatePanel(this.selected,null):this.animatePanel(null,this.selectedIndex)}}animatePanel(t,e){if(t){const e=this.querySelector(`[panel="${t}"]`);e&&(this.panelPosition=-1*e.offsetLeft)}else this.panels[e]&&(this.panelPosition=-1*this.panels[e].offsetLeft)}handleTabKeydown(t){if(this.selected){switch(t.key){case"Home":this.selected=this.tabs[0].getAttribute("link");break;case"End":this.selected=this.tabs[this.tabs.length-1].getAttribute("link");break;case"ArrowRight":const t=this.querySelector("kemet-tab[selected]").nextElementSibling,e=!!t&&t.getAttribute("link");e&&(this.selected=e);break;case"ArrowLeft":const o=this.querySelector("kemet-tab[selected]").previousElementSibling,i=!!o&&o.getAttribute("link");i&&(this.selected=i)}this.tabs.find((t=>t.link===this.selected)).focus()}else{switch(t.key){case"Home":this.selectedIndex=0;break;case"End":this.selectedIndex=this.tabs.length-1;break;case"ArrowRight":this.selectedIndex<this.tabs.length-1?this.selectedIndex+=1:this.selectedIndex=this.tabs.length-1;break;case"ArrowLeft":this.selectedIndex<1?this.selectedIndex=0:this.selectedIndex-=1}this.tabs[this.selectedIndex].focus()}}handleTouchStart(t){this.xDown=t.touches[0].clientX,this.yDown=t.touches[0].clientY}handleTouchMove(t){var e,o;if(!this.xDown||!this.yDown)return;const i=t.touches[0].clientX,s=t.touches[0].clientY,r=this.xDown-i,n=this.yDown-s,a=null===(e=this.querySelector("kemet-tab-panel[selected]"))||void 0===e?void 0:e.nextElementSibling,l=!!a&&a.getAttribute("panel"),d=null===(o=this.querySelector("kemet-tab-panel[selected]"))||void 0===o?void 0:o.previousElementSibling,c=!!d&&d.getAttribute("panel");Math.abs(r)>Math.abs(n)&&(r>0?this.selected?l&&(this.selected=l):this.selectedIndex<this.tabs.length&&(this.selectedIndex+=1):this.selected?c&&(this.selected=c):this.selectedIndex>0&&(this.selectedIndex-=1),this.selectTab(),this.selectPanel()),this.xDown=null,this.yDown=null}};Ui.styles=[Bi],t([at({type:String,reflect:!0})],Ui.prototype,"selected",void 0),t([at({type:Number})],Ui.prototype,"selectedIndex",void 0),t([at({type:Number})],Ui.prototype,"panelPosition",void 0),t([at({type:String,reflect:!0,attribute:"panel-effect"})],Ui.prototype,"panelEffect",void 0),t([at({type:Boolean})],Ui.prototype,"swipe",void 0),t([at({type:String,reflect:!0})],Ui.prototype,"placement",void 0),t([at({type:Boolean})],Ui.prototype,"divider",void 0),t([at({type:String,reflect:!0,attribute:"tabs-align"})],Ui.prototype,"tabsAlign",void 0),t([at({type:Object})],Ui.prototype,"ink",void 0),t([at({type:Boolean,attribute:"hide-ink"})],Ui.prototype,"hideInk",void 0),t([at({type:Boolean,reflect:!0})],Ui.prototype,"overflow",void 0),t([lt()],Ui.prototype,"tabs",void 0),t([lt()],Ui.prototype,"panels",void 0),t([lt()],Ui.prototype,"xDown",void 0),t([lt()],Ui.prototype,"yDown",void 0),t([lt()],Ui.prototype,"links",void 0),t([ct("#panels")],Ui.prototype,"panelsElement",void 0),Ui=t([rt("kemet-tabs")],Ui);const qi=a`:host{--kemet-tooltip-deg:-45deg;--kemet-tooltip-size:22px;--kemet-tooltip-border-size:1px;--kemet-tooltip-rounded-tip:4px;--kemet-tooltip-background-color:var(--kemet-color-foreground);--kemet-tooltip-border-color:var(--kemet-color-background);--kemet-tooltip-placement-offset:calc(calc(var(--kemet-tooltip-size) / 2) * -1)}#arrow{content:'';width:var(--kemet-tooltip-size);height:var(--kemet-tooltip-size);position:relative;display:inline-block;background:linear-gradient(var(--kemet-tooltip-deg),transparent calc(var(--kemet-tooltip-size)/ 1.5),var(--kemet-tooltip-background-color) 0) no-repeat;background-repeat:no-repeat;transform-origin:center center;border-top-left-radius:var(--kemet-tooltip-rounded-tip);border-left:var(--kemet-tooltip-border-size) solid var(--kemet-tooltip-border-color);border-top:var(--kemet-tooltip-border-size) solid var(--kemet-tooltip-border-color)}[data-popper-placement^=top] #arrow{top:var(--kemet-tooltip-placement-offset);transform:rotate(225deg)}[data-popper-placement^=bottom] #arrow-container{top:0}[data-popper-placement^=bottom] #arrow{top:var(--kemet-tooltip-placement-offset);transform:rotate(45deg)}[data-popper-placement^=right] #arrow{left:var(--kemet-tooltip-placement-offset);transform:rotate(-45deg)}[data-popper-placement^=left] #arrow-container{right:0}[data-popper-placement^=left] #arrow{right:var(--kemet-tooltip-placement-offset);transform:rotate(135deg)}`;let Xi=class extends ri{render(){return N`<div id="trigger" part="trigger" tabIndex="0" @click="${"click"===this.fireOn?t=>this.toggle(t):null}" @keyup="${"click"===this.fireOn?t=>this.handleKeyUp(t):null}" @mouseover="${"click"!==this.fireOn?()=>this.opened=!0:null}" @focus="${"click"!==this.fireOn?()=>this.opened=!0:null}" @mouseout="${"click"!==this.fireOn?()=>this.opened=!1:null}" @blur="${"click"!==this.fireOn?()=>this.opened=!1:null}"><slot name="trigger"></slot></div><div id="content" @mouseover="${"click"!==this.fireOn?()=>this.opened=!0:null}" @mouseout="${"click"!==this.fireOn?()=>this.opened=!1:null}"><slot name="content" @slotchange="${()=>{this.makePopper(),this.measureContent()}}"></slot><div id="arrow-container" part="arrow-container" data-popper-arrow><div id="arrow" part="arrow"></div></div></div>`}measureContent(){const t=this.contentElement.offsetHeight;this.contentElement.style.setProperty("--kemet-tooltip-content-height",`${t}px`)}};Xi.styles=[qi,Ko,Jo,Zo,Go,Qo,ti,ei,oi,ii],Xi=t([rt("kemet-tooltip")],Xi);const ji=a`:host{--kemet-toggle-width:3.5rem;--kemet-toggle-height:2rem;--kemet-toggle-handle-diameter:1.6rem;--kemet-toggle-handle-margin:calc((var(--kemet-toggle-height) - var(--kemet-toggle-handle-diameter)) / 2);display:flex;align-items:center}:host([disabled]){opacity:.5}label{cursor:pointer;display:flex;align-items:center;gap:1rem;font-size:inherit;color:inherit}:host([disabled]) label{cursor:not-allowed}input{display:none}[part=control]{position:relative;display:inline-flex;margin:0;width:var(--kemet-toggle-width);height:var(--kemet-toggle-height)}[part=control]>span{transition:.3s ease-in-out}[part=track]{width:var(--kemet-toggle-width);height:var(--kemet-toggle-height);border:var(--kemet-toggle-track-border,none);border-radius:var(--kemet-toggle-height);background-color:var(--kemet-toggle-track-color,var(--kemet-color-white));box-shadow:var(--kemet-toggle-track-shadow,inset 0 .4rem .7rem 0 rgba(47,47,47,.35),inset 0 -.2rem .4rem 0 var(--kemet-color-gray1))}:host([squared]) [part=track]{border-radius:0}[part=handle]{position:absolute;top:var(--kemet-toggle-handle-margin);left:var(--kemet-toggle-handle-margin);width:var(--kemet-toggle-handle-diameter);height:var(--kemet-toggle-handle-diameter);transform:translateX(0);border:var(--kemet-toggle-handle-border,none);border-radius:var(--kemet-toggle-handle-diameter);background-color:var(--kemet-toggle-handle-color,var(--kemet-color-primary));box-shadow:var(--kemet-toggle-handle-shadow,0 .5rem .5rem 0 rgba(0,0,0,.1),0 .5rem .5rem 0 rgba(0,0,0,.2))}:host([squared]) [part=handle]{border-radius:0}:host([checked]) [part=handle]{transform:translateX(calc(var(--kemet-toggle-width) - var(--kemet-toggle-handle-diameter) - var(--kemet-toggle-handle-margin) * 2))}.option{font-size:90%}`;let Ri=class extends it{constructor(){super(),this.name="toggle-switch",this.checked=!1,this.disabled=!1,this.label="",this.show=!1,this.squared=!1,this.optionChecked="on",this.optionUnchecked="off",this.value=this.checked?this.optionChecked:this.optionUnchecked,this.formSubmitController=new _t(this)}render(){return N`<label part="label">${this.makeUncheckedOption()} <span part="control"><span part="track"></span> <span part="handle"></span> </span><input role="switch" type="checkbox" name="${this.name}" aria-label="${this.label}" aria-checked="${this.checked?"true":"false"}" ?disabled="${this.disabled}" ?checked="${this.checked}" @change="${this.handleChange}"> ${this.makeCheckedOption()} <span part="text">${this.label}</span></label>`}handleChange(){this.checked=!this.checked,this.value=this.checked?this.optionChecked:this.optionUnchecked,pt(this,"kemet-toggle-change",!0)}makeUncheckedOption(){return this.show?N`<span class="option" part="unchecked">${this.optionUnchecked}</span>`:null}makeCheckedOption(){return this.show?N`<span class="option" part="checked">${this.optionChecked}</span>`:null}};Ri.styles=[ji],t([at({type:String})],Ri.prototype,"name",void 0),t([at({type:Boolean,reflect:!0})],Ri.prototype,"checked",void 0),t([at({type:Boolean})],Ri.prototype,"disabled",void 0),t([at({type:String})],Ri.prototype,"label",void 0),t([at({type:Boolean})],Ri.prototype,"show",void 0),t([at({type:Boolean})],Ri.prototype,"squared",void 0),t([at({type:String,attribute:"option-checked"})],Ri.prototype,"optionChecked",void 0),t([at({type:String,attribute:"option-unchecked"})],Ri.prototype,"optionUnchecked",void 0),t([lt()],Ri.prototype,"value",void 0),Ri=t([rt("kemet-toggle")],Ri);const Hi=a`:host{--kemet-tracker-step-dot-size:50px;--kemet-tracker-step-dot-size-mobile:25px;--kemet-tracker-step-dot-gap:4px;--kemet-tracker-step-standard-line-weight:1px;--kemet-tracker-step-completed-line-weight:3px;--kemet-tracker-step-dot-transition:all 300ms ease-in-out;position:relative;width:100%;text-align:center}.dot{font-size:var(--kemet-tracker-step-dot-font-size,90%);color:var(--kemet-tracker-step-dot-color,var(--kemet-color-primary));display:flex;align-items:center;justify-content:center;margin:0 auto;position:relative;z-index:1;width:var(--kemet-tracker-step-dot-size);height:var(--kemet-tracker-step-dot-size);border-radius:100%;transition:var(--kemet-tracker-step-dot-transition);background-color:var(--kemet-tracker-step-dot-background-color,var(--kemet-color-white))}.dot::after{content:"";width:unset;height:unset;position:absolute;top:var(--kemet-tracker-step-dot-gap);left:var(--kemet-tracker-step-dot-gap);right:var(--kemet-tracker-step-dot-gap);bottom:var(--kemet-tracker-step-dot-gap);z-index:-1;border-radius:100%;transition:var(--kemet-tracker-step-dot-transition);border:var(--kemet-tracker-step-dot-border,1px solid var(--kemet-color-primary));background-color:var(--kemet-tracker-step-dot-fill-color,transparent)}:host([completed]) .dot{color:var(--kemet-tracker-step-completed-color,var(--kemet-color-white))}:host([completed]) .dot::after{border:0;background-color:var(--kemet-tracker-step-completed-fill-color,var(--kemet-color-success))}:host([current]) .dot.animate{color:var(--kemet-tracker-step-current-color,var(--kemet-color-white))}:host([current]) .dot.animate::after{border:0;background-color:var(--kemet-tracker-step-current-fill-color,var(--kemet-color-primary))}:host([mobile]) .dot{width:var(--kemet-tracker-step-dot-size-mobile);height:var(--kemet-tracker-step-dot-size-mobile)}.line{display:block;position:absolute;left:50%;right:0;bottom:0;width:100%;top:calc((var(--kemet-tracker-step-dot-size) - var(--kemet-tracker-step-standard-line-weight))/ 2);height:var(--kemet-tracker-step-standard-line-weight);background-color:var(--kemet-tracker-step-line-color,var(--kemet-color-primary))}.line.completed{width:100%;transform:scaleX(0);transform-origin:left center;top:calc((var(--kemet-tracker-step-dot-size) - var(--kemet-tracker-step-completed-line-weight))/ 2);height:var(--kemet-tracker-step-completed-line-weight);background-color:var(--kemet-tracker-step-completed-line-color,var(--kemet-color-primary));animation-name:grow;animation-delay:1s;animation-duration:.6s;animation-fill-mode:forwards}:host([mobile]) .line{top:calc((var(--kemet-tracker-step-dot-size-mobile) - var(--kemet-tracker-step-standard-line-weight))/ 2)}:host([mobile]) .line.completed{top:calc((var(--kemet-tracker-step-dot-size-mobile) - var(--kemet-tracker-step-completed-line-weight))/ 2)}@keyframes grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}`;let Vi=class extends it{constructor(){super(...arguments),this.completedSize=16}firstUpdated(){this.tracker=this.closest("kemet-tracker")}render(){return N`${this.makeLine()} ${this.makeCompletedLine()}<div class="dot" part="dot">${this.makeDotContent()}</div>${this.makeSlotContent()}`}makeLine(){return this.last?null:N`<div class="line" part="line"></div>`}makeCompletedLine(){return this.completed&&!this.last?N`<div class="line completed" part="completed-line" @animationend="${()=>this.handleCompletedLineEnd()}"></div>`:null}makeDotContent(){var t;return!this.completed||this.mobile||this.hideDotContent?this.mobile||this.hideDotContent?null:N`<span>${this.step}/${null===(t=this.tracker)||void 0===t?void 0:t.total}</span>`:N`<kemet-icon icon="check2" size="${this.completedSize}"></kemet-icon>`}makeSlotContent(){return this.mobile?null:N`<slot></slot>`}handleCompletedLineEnd(){const t=this.tracker.querySelector("[current]").shadowRoot.querySelector(".dot");t&&t.classList.add("animate")}};Vi.styles=[Hi],t([at({type:Number})],Vi.prototype,"step",void 0),t([at({type:Boolean,reflect:!0})],Vi.prototype,"completed",void 0),t([at({type:Boolean,reflect:!0})],Vi.prototype,"current",void 0),t([at({type:Boolean,reflect:!0})],Vi.prototype,"last",void 0),t([at({type:Boolean,reflect:!0})],Vi.prototype,"mobile",void 0),t([at({type:Boolean,reflect:!0,attribute:"hide-dot-content"})],Vi.prototype,"hideDotContent",void 0),t([at({type:Number})],Vi.prototype,"completedSize",void 0),t([lt()],Vi.prototype,"tracker",void 0),Vi=t([rt("kemet-tracker-step")],Vi);let Yi=class extends it{constructor(){super(),this.breakpoint="767px"}firstUpdated(){this.steps=this.querySelectorAll("kemet-tracker-step"),this.isMobile(),window.addEventListener("resize",(()=>{this.isMobile()}))}render(){return N`<slot @slotchange="${()=>this.handleSlotChange()}"></slot>`}handleSlotChange(){this.total=this.steps.length,this.steps.forEach(((t,e)=>{t.step=e+1,t.step===this.total&&(t.last=!0)}))}isMobile(){const t=window.matchMedia(`(max-width: ${this.breakpoint})`);this.steps.forEach((e=>{e.mobile=t.matches}))}};Yi.styles=[a`:host{display:flex;justify-content:center;align-items:flex-start;width:100%}`],t([at({type:Number})],Yi.prototype,"total",void 0),t([at({type:String})],Yi.prototype,"breakpoint",void 0),t([lt()],Yi.prototype,"steps",void 0),Yi=t([rt("kemet-tracker")],Yi);const Fi=a`:host{color:var(--kemet-upload-color,var(--kemet-color-white));display:grid;grid-template-columns:1fr 1fr;height:var(--kemet-upload-height,364px);border:var(--kemet-upload-border,1rem solid var(--kemet-color-gray1-to-transparent));background-color:var(--kemet-upload-background-color,var(--kemet-color-primary-to-transparent))}:host([mobile]){display:block;height:auto}input{display:none}.button{cursor:pointer;font-size:1rem;display:block;color:var(--kemet-color-white);padding:.5rem 1rem;border:1px solid var(--kemet-color-white);background-color:transparent}.upload{display:flex;align-items:center;justify-content:center;margin:var(--kemet-upload-margin);flex-direction:column;border:2px dashed var(--kemet-color-white)}:host([over]) .upload{background-color:green}:host([mobile]) .upload{height:280px}.files{display:flex;gap:1rem;flex-direction:column;padding:0 1rem;overflow:auto;background-color:var(--kemet-color-gray1-to-transparent)}:host([mobile]) .files{padding:0;max-height:280px}.heading{font-size:1.25rem;margin:0 0 2rem 0}:host([no-drag-drop]) .heading{display:none}`,Wi=a`:host{--kemet-upload-file-ripple-color:var(--kemet-color-primary);color:var(--kemet-upload-file-color,var(--kemet-color-text));display:grid;gap:1rem;grid-template-columns:auto 1fr auto;align-items:center;height:100%;max-height:50%;padding:var(--kemet-upload-file-padding,.5rem 1rem);border:var(--kemet-upload-file-border,1px solid var(--kemet-color-primary))}:host([status=error]){border:1px solid var(--kemet-color-error)}:host([status=complete]){border:1px solid var(--kemet-color-success)}h3{margin:0}.percentage{font-size:clamp(2rem,3vw,2.5rem);align-self:center;justify-self:center}.indicator{transform:scale(.8)}:host([status=complete]) .indicator,:host([status=complete]) .message{color:var(--kemet-color-success)}:host([status=error]) .indicator,:host([status=error]) .message{color:var(--kemet-color-error)}`,Ki=a`.lds-ripple{display:inline-block;position:relative;width:80px;height:80px}.lds-ripple div{position:absolute;border:4px solid var(--kemet-upload-file-ripple-color);opacity:1;border-radius:50%;animation:lds-ripple 1s cubic-bezier(0,.2,.8,1) infinite}.lds-ripple div:nth-child(2){animation-delay:-.5s}@keyframes lds-ripple{0%{top:36px;left:36px;width:0;height:0;opacity:0}4.9%{top:36px;left:36px;width:0;height:0;opacity:0}5%{top:36px;left:36px;width:0;height:0;opacity:1}100%{top:0;left:0;width:72px;height:72px;opacity:0}}`,Ji=(t,e=2)=>{if(0===t)return"0 Bytes";const o=e<0?0:e,i=Math.floor(Math.log(t)/Math.log(1024));return`${parseFloat((t/1024**i).toFixed(o))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`};let Zi=class extends it{constructor(){super(...arguments),this.loaded=0,this.size=0,this.percent=0}updated(){this.percent=this.calculatePercent()}render(){return N`<div class="percentage" part="percentage"><span>${this.percent}%</span></div><div><h3 part="filename">${this.name}</h3><span part="loaded">${Ji(this.loaded)} / ${Ji(this.size)}</span> ${this.message?N`<div class="message" part="message">${this.message}</div>`:null}</div><div class="indicator" part="indicator">${this.getStatusIcon()}</div>`}calculatePercent(){const t=Math.round(100*this.loaded/this.size);return t>100?100:t}getStatusIcon(){return"uploading"===this.status?N`<div class="lds-ripple"><div></div><div></div></div>`:"complete"===this.status?N`<kemet-icon icon="check-circle" size="48"></kemet-icon>`:"error"===this.status?N`<kemet-icon icon="exclamation-circle" size="48"></kemet-icon>`:null}};Zi.styles=[Wi,Ki],t([at({type:String})],Zi.prototype,"name",void 0),t([at({type:Number})],Zi.prototype,"loaded",void 0),t([at({type:Number})],Zi.prototype,"size",void 0),t([at({type:String})],Zi.prototype,"type",void 0),t([at({type:String,reflect:!0})],Zi.prototype,"status",void 0),t([at({type:Number})],Zi.prototype,"percent",void 0),t([at({type:String})],Zi.prototype,"message",void 0),Zi=t([rt("kemet-upload-file")],Zi);let Gi=class extends it{constructor(){super(...arguments),this.slug="upload",this.heading="Drag & Drop Files",this.breakpoint="600px",this.buttonLabel="Browse Files"}firstUpdated(){this.fileInputElement=this.shadowRoot.querySelector('[type="file"]'),this.upload=this.shadowRoot.querySelector(".upload"),["dragenter","dragover","dragleave","drop"].forEach((t=>{this.upload.addEventListener(t,(t=>(t=>{t.preventDefault(),t.stopPropagation()})(t)),!1)})),["dragenter","dragover"].forEach((t=>{this.upload.addEventListener(t,(()=>{this.over=!0}),!1)})),["dragleave","drop"].forEach((t=>{this.upload.addEventListener(t,(()=>{this.over=!1}),!1)})),this.isMobile(),this.hasDragDrop(),window.addEventListener("resize",(()=>{this.isMobile()})),this.upload.addEventListener("drop",(t=>this.handleDrop(t)),!1)}render(){return N`<div class="upload" part="upload"><kemet-icon icon="cloud-arrow-up" size="128"></kemet-icon><input type="file" id="${this.slug}" ?multiple="${this.multiple}" accept="${jt(this.accept)?this.accept:null}" @change="${t=>this.handleChange(t)}"><h3 class="heading" part="heading">${this.heading}</h3><label class="button" part="button" for="${this.slug}">${this.buttonLabel}</label></div><div class="files" part="files"><slot></slot></div>`}handleChange(t){pt(this,"kemet-upload-change",{event:t,files:this.fileInputElement.files,fileElement:this.fileInputElement})}handleDrop(t){pt(this,"kemet-upload-change",{event:t,files:(null==t?void 0:t.dataTransfer.files)||[],fileElement:this.fileInputElement})}isMobile(){const t=window.matchMedia(`(max-width: ${this.breakpoint})`);this.mobile=t.matches}hasDragDrop(){"draggable"in document.createElement("span")?this.noDragDrop=!1:this.noDragDrop=!0}};Gi.styles=[Fi],t([at({type:String})],Gi.prototype,"slug",void 0),t([at({type:String})],Gi.prototype,"accept",void 0),t([at({type:Boolean})],Gi.prototype,"multiple",void 0),t([at({type:Boolean,reflect:!0})],Gi.prototype,"over",void 0),t([at({type:String})],Gi.prototype,"heading",void 0),t([at({type:Boolean,reflect:!0})],Gi.prototype,"mobile",void 0),t([at({type:String,reflect:!0})],Gi.prototype,"breakpoint",void 0),t([at({type:Boolean,reflect:!0,attribute:"no-drag-drop"})],Gi.prototype,"noDragDrop",void 0),t([at({type:Number,attribute:"max-size"})],Gi.prototype,"maxSize",void 0),t([at({type:String,attribute:"button-label"})],Gi.prototype,"buttonLabel",void 0),t([lt()],Gi.prototype,"fileInputElement",void 0),t([lt()],Gi.prototype,"upload",void 0),Gi=t([rt("kemet-upload")],Gi)}));
86
+ */class ei extends It{constructor(t){if(super(t),this.et=X,t.type!==Ot)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===X||null==t)return this.ft=void 0,this.et=t;if(t===N)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}ei.directiveName="unsafeHTML",ei.resultType=1;const oi=Bt(ei),ii=a`:host{display:flex}.rotator__slide{pointer-events:none}.rotator__slide--active{pointer-events:auto}:host([effect=fade]) .rotator{display:inline-flex;flex-wrap:nowrap;flex-direction:row}:host([effect=fade]) .rotator__slide{width:100%;flex:none;opacity:0;box-sizing:border-box;transition:all var(--kemet-rotator-transition-speed,500ms) ease}:host([effect=fade]) .rotator__slide:not(:first-child){margin-left:-100%}:host([effect=fade]) .rotator__slide--active{opacity:1}:host([effect=flip]) .rotator{display:flex;position:relative;perspective:500}:host([effect=flip]) .rotator__slide{display:block;width:auto;position:absolute;top:-20px;left:0;opacity:0;transform:rotateX(90deg);transform-origin:0 0;transition:all var(--kemet-rotator-transition-speed,500ms) ease}:host([effect=flip]) .rotator__slide--active{top:0;opacity:1;transform:rotateX(0)}:host([effect=flip]) .rotator__slide--prev{top:40px;transform:rotateX(-90deg)}`;let si=class extends it{constructor(){super(...arguments),this.activeSlide=0,this.width="auto",this.height="auto",this.messages=[],this.effect="fade",this.rotationSpeed=3}firstUpdated(){this.prevSlide=null,window.addEventListener("resize",this.setDimensions.bind(this))}updated(t){const e=!!t.get("width"),o=!!t.get("height");this.setDimensions(),e||o||setTimeout((()=>{this.rotationSpeed>0&&this.nextSlide()}),1e3*this.rotationSpeed)}render(){const t="flip"===this.effect?`width:${this.width};`:"",e="flip"===this.effect?`height:${this.height};`:"";return U`<span class="rotator" style="${t}${e}">${this.makeMessages()}</span>`}makeMessages(){return this.messages.map(((t,e)=>{const o=this.activeSlide===e?"rotator__slide--active":"",i=this.prevSlide===e?"rotator__slide--prev":"";return U`<span class="rotator__slide ${o} ${i}">${oi(t)}</span>`}))}setDimensions(){if("flip"===this.effect){this.width=`${this.offsetWidth}px`;const t=this.shadowRoot.querySelectorAll(".rotator__slide");let e=0;t.forEach((t=>{t.offsetHeight>e&&(e=t.offsetHeight)})),this.height=`${e}px`}}nextSlide(){this.activeSlide<this.messages.length-1?(this.activeSlide+=1,this.prevSlide=this.activeSlide-1):(this.activeSlide=0,this.prevSlide=this.messages.length-1)}};si.styles=[ii],t([at({type:Number})],si.prototype,"activeSlide",void 0),t([at({type:String})],si.prototype,"width",void 0),t([at({type:String})],si.prototype,"height",void 0),t([at({type:Array})],si.prototype,"messages",void 0),t([at({type:String,reflect:!0})],si.prototype,"effect",void 0),t([at({type:Number,attribute:"rotation-speed"})],si.prototype,"rotationSpeed",void 0),t([lt()],si.prototype,"prevSlide",void 0),si=t([rt("kemet-rotator")],si);const ri=a`*,::after,::before{box-sizing:border-box}:host{display:inline-block}:host([disabled]){opacity:.5}label{cursor:pointer;display:inline-flex;gap:.5rem;align-items:center;margin-right:.5rem}input{cursor:pointer;margin:0;padding:0;width:var(--kemet-radio-size,18px);height:var(--kemet-radio-size,18px);position:absolute;opacity:0}button{display:inline-flex;align-items:center;justify-content:center;width:var(--kemet-radio-size,18px);height:var(--kemet-radio-size,18px);padding:0;border-radius:50%;background:0 0;border:var(--kemet-radio-border,1px solid var(--kemet-color-background))}[part=dot]{display:inline-flex;border-radius:50%;width:var(--kemet-radio-size,18px);height:var(--kemet-radio-size,18px);background:var(--kemet-radio-dot-color,var(--kemet-color-primary));border:var(--kemet-radio-border,1px solid var(--kemet-color-primary));box-shadow:inset 0 0 0 var(--kemet-radio-dot-border-width,3px) var(--kemet-radio-dot-border-color,var(--kemet-color-white))}:host([filled]) [part=dot]{background:var(--kemet-radio-dot-color-filled,var(--kemet-color-white));box-shadow:inset 0 0 0 var(--kemet-radio-dot-border-width,4px) var(--kemet-radio-dot-border-color,var(--kemet-color-primary))}`,ni=a`*,::after,::before{box-sizing:border-box}:host{display:block}fieldset{border:0;margin:0;padding:0;display:flex;gap:.5rem}legend{margin-bottom:1rem}:host([axis=vertical]) fieldset{flex-direction:column}[part=message]{display:block;margin-top:.5rem}:host([status=error]) [part=message]{color:var(--kemet-color-error)}:host([status=warning]) [part=message]{color:var(--kemet-color-error)}`;let ai=class extends it{constructor(){super(),this.legend="",this.axis="horizontal",this.name="radios",this.status="standard",this.formSubmitController=new $t(this)}firstUpdated(){this.radios=this.querySelectorAll("kemet-radio"),this.setAttribute("role","radiogroup")}render(){return U`<fieldset part="fieldset">${""!==this.legend?U`<legend part="legend">${this.legend}</legend>`:null}<slot @click="${t=>this.handleClick(t)}" @keydown="${t=>this.handleKeyDown(t)}" @slotchange="${()=>this.handleSlotChange()}"></slot></fieldset>${this.makeMessage()}`}handleClick(t){const{target:e}=t;this.radios.forEach((t=>{t.checked=!1,t.tabIndex=t===e?0:-1,t.setAttribute("aria-checked","false")})),e.disabled||(e.checked=!0,e.setAttribute("aria-checked","true"),this.value=e.value,this.status="standard",yt(this,"kemet-radios-change",e))}handleKeyDown(t){var e;const o=Array.from(this.radios),i=["ArrowRight","ArrowDown"].includes(t.key)?1:-1;let s=(null!==(e=o.findIndex((t=>t.checked)))&&void 0!==e?e:o[0])+i;["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"].includes(t.key)&&(s<0&&(s=o.length-1),s>o.length-1&&(s=0),this.radios.forEach((t=>{t.checked=!1,t.tabIndex=-1})),this.radios[s].focus(),this.radios[s].checked=!0,this.radios[s].tabIndex=0)}handleSlotChange(){const t=Array.from(this.radios).find((t=>t.checked));this.radios.forEach((t=>{t.tabIndex=-1,t.input.tabIndex=-1})),t&&(t.tabIndex=0)}makeMessage(){return"error"===this.status||"warning"===this.status?U`<span part="message">${this.message}</span>`:null}checkValidity(){return!this.required||!!this.value}};ai.styles=[ni],t([at({type:String})],ai.prototype,"legend",void 0),t([at({type:String,reflect:!0})],ai.prototype,"axis",void 0),t([at({type:String})],ai.prototype,"value",void 0),t([at({type:String})],ai.prototype,"name",void 0),t([at({type:String,reflect:!0})],ai.prototype,"status",void 0),t([at({type:String})],ai.prototype,"message",void 0),t([at({type:String})],ai.prototype,"required",void 0),t([lt()],ai.prototype,"radios",void 0),ai=t([rt("kemet-radios")],ai);let li=class extends it{constructor(){super(...arguments),this.label="",this.disabled=!1}firstUpdated(){const t=this.closest("kemet-radios");this.name=t.name||"radio-button",this.input=this.shadowRoot.querySelector("input"),this.setAttribute("role","radio"),this.checked?this.setAttribute("aria-checked","true"):this.setAttribute("aria-checked","false")}render(){return U`<label part="label"><input type="radio" name="${At(this.name)}" .value="${this.value}" .checked="${Pt(this.checked)}" .disabled="${this.disabled}" @blur="${()=>this.handleBlur()}" @focus="${()=>this.handleFocus()}"> <button part="button" aria-label="${this.label}">${this.makeDot()}</button> <span part="text">${this.label}</span></label>`}click(){this.input.click()}blur(){this.input.blur()}focus(){this.input.focus()}handleBlur(){this.focused=!1,yt(this,"kemet-radio-focused",!1)}handleFocus(){this.focused=!0,yt(this,"kemet-radio-focused",!0)}makeDot(){return this.checked?U`<span part="dot"></span>`:null}};li.styles=[ri],t([at({type:String})],li.prototype,"label",void 0),t([at({type:Boolean,reflect:!0})],li.prototype,"checked",void 0),t([at({type:String})],li.prototype,"name",void 0),t([at({type:String})],li.prototype,"value",void 0),t([at({type:Boolean,reflect:!0})],li.prototype,"disabled",void 0),t([at({type:Boolean,reflect:!0})],li.prototype,"focused",void 0),t([at({type:Boolean,reflect:!0})],li.prototype,"filled",void 0),t([lt()],li.prototype,"input",void 0),li=t([rt("kemet-radio")],li);let di=class extends it{constructor(){super(...arguments),this.element=window,this.target=document.querySelector("body"),this.xOffset=0,this.yOffset=0}firstUpdated(){this.isSmoothSupported="scrollBehavior"in document.documentElement.style}render(){return U`<div tabindex="0" @click="${()=>this.handleScroll()}" @keyup="${t=>this.handleKeyup(t)}"><slot></slot></div>`}handleKeyup(t){t.keyCode!==de&&t.keyCode!==ce||this.handleScroll()}handleScroll(){const t=this.target.offsetTop+this.yOffset,e=this.target.offsetLeft+this.xOffset;this.isSmoothSupported?this.element.scrollTo({top:t,left:e,behavior:"smooth"}):this.element.scrollTo(e,t)}};di.styles=[a`:host{cursor:pointer;display:inline-block}`],t([at({type:Object})],di.prototype,"element",void 0),t([at({type:Object})],di.prototype,"target",void 0),t([at({type:Number,attribute:"x-offset",reflect:!0})],di.prototype,"xOffset",void 0),t([at({type:Number,attribute:"y-offset",reflect:!0})],di.prototype,"yOffset",void 0),t([lt()],di.prototype,"isSmoothSupported",void 0),di=t([rt("kemet-scroll-link")],di);const ci=a`:host{display:block;box-sizing:border-box;padding:var(--kemet-scroll-nav-padding,1rem 2rem);background-color:var(--kemet-scroll-nav-background,#fafafa);transition:all var(--kemet-scroll-nav-transition,300ms) ease}:host([effect=resize]),:host([transform]){position:fixed;top:0;left:0;width:100%}:host([effect=resize]){height:var(--kemet-scroll-nav-resize-height,400px)}:host([transform][effect=resize]){height:var(--kemet-scroll-nav-resize-height-transformed,100px)}`;let hi=class extends it{constructor(){super(...arguments),this.effect="sticky",this.transform=!1,this.offset=0}render(){return U`<slot></slot>`}firstUpdated(){const t=this.offsetTop,e=this.offsetHeight;window.addEventListener("scroll",(()=>{this.handleScroll(t,e)}))}handleScroll(t,e){const o="sticky"===this.effect?t+this.offset:e+this.offset;window.pageYOffset>=o?this.transform=!0:this.transform=!1}};hi.styles=[ci],t([at({type:String,reflect:!0})],hi.prototype,"effect",void 0),t([at({type:Boolean,reflect:!0})],hi.prototype,"transform",void 0),t([at({type:Number})],hi.prototype,"offset",void 0),hi=t([rt("kemet-scroll-nav")],hi);const pi=a`*,::after,::before{box-sizing:border-box}:host{display:flex;flex-direction:column;width:100%}:host([axis=horizontal]){margin:auto;max-width:var(--kemet-scroll-snap-horizontal-max-width,1024px)}:host([pagination=left]),:host([pagination=right]){flex-direction:row}:host([pagination=none]) ::slotted([slot=pagination]){display:none}:host([pagination=left]) ::slotted([slot=pagination]),:host([pagination=top]) ::slotted([slot=pagination]){order:-1}::slotted([slot=slides]){display:flex;gap:var(--kemet-scroll-snap-gap,1.5rem);scroll-snap-type:x mandatory;overflow-x:scroll}:host([axis=vertical]){height:var(--kemet-scroll-snap-vertical-height,100vh)}:host([axis=vertical]) ::slotted([slot=slides]){flex-direction:column;overflow-x:hidden;scroll-snap-type:y mandatory;padding:var(--kemet-scroll-snap-slides-vertical-padding,0 2rem)}`,ui=a`:host{margin:auto;padding:var(--kemet-scroll-snap-paginator-padding,1rem 0)}nav{display:flex;gap:var(--kemet-scroll-snap-paginator-gap,.5rem)}:host([center]) nav{justify-content:center}.link{cursor:pointer;color:var(--kemet-scroll-snap-paginator-link-color,var(--kemet-color-primary))}`;let fi=class extends it{constructor(){super(...arguments),this.slides=[],this.icon="circle-fill",this.size=16,this.hideFocusedLinks=!1,this.useNumberPages=!1,this.useLabelPages=!1}updated(){const t=this.closest("kemet-scroll-snap");t&&t.addEventListener("kemet-scroll-snap-make-slides",(t=>{this.slides=t.detail}))}render(){return U`<nav part="nav">${this.makePagination()}</nav>`}makePagination(){let t=0;return this.slides?this.slides.map((e=>(t=t+=1,e.focused?U`<span part="span">${this.pageDisplay(e,t)}</span>`:U`<span class="link" tabindex="0" role="button" @keyup="${t=>this.handleKeyboardInput(t,e.id)}" @click="${()=>this.slideLink(e.id)}" aria-label="${e.label}">${this.pageDisplay(e,t)}</span>`))):null}pageDisplay(t,e){return this.useNumberPages?e:this.useLabelPages?t.label:U`<kemet-icon icon="${this.icon}" size="${this.size}"></kemet-icon>`}slideLink(t){yt(this,"kemet-scroll-snap-focus",t)}handleKeyboardInput(t,e){"Enter"!==t.code&&"Space"!==t.code||this.slideLink(e)}};fi.styles=[ui],t([at({type:Array})],fi.prototype,"slides",void 0),t([at({type:String})],fi.prototype,"icon",void 0),t([at({type:Number})],fi.prototype,"size",void 0),t([at({type:Boolean,reflect:!0})],fi.prototype,"center",void 0),t([at({type:Boolean,attribute:"hide-focused-links"})],fi.prototype,"hideFocusedLinks",void 0),t([at({type:Boolean,reflect:!0,attribute:"use-number-pages"})],fi.prototype,"useNumberPages",void 0),t([at({type:Boolean,reflect:!0,attribute:"use-label-pages"})],fi.prototype,"useLabelPages",void 0),fi=t([rt("kemet-scroll-snap-paginator")],fi);let mi=class extends it{updated(){this.addTabIndex()}render(){return U`<slot></slot>`}addTabIndex(){this.setAttribute("tabindex","0")}};mi.styles=[a`:host{display:block;flex:0 0 auto;width:var(--kemet-scroll-snap-slide-width,100%);scroll-snap-align:var(--kemet-scroll-snap-slide-align,center)}`],t([at({type:Boolean,reflect:!0})],mi.prototype,"focused",void 0),t([at({type:Number,reflect:!0})],mi.prototype,"index",void 0),t([at({type:String,reflect:!0})],mi.prototype,"label",void 0),mi=t([rt("kemet-scroll-snap-slide")],mi);let vi=class extends it{constructor(){super(),this.axis="horizontal",this.pagination="bottom",this.addEventListener("kemet-scroll-snap-focus",(t=>{this.focusSlide(t.detail)}))}firstUpdated(){this.isTouchDevice="ontouchstart"in document.documentElement,this.slides=[],this.setFocusedSlides()}updated(){this.setVerticalAttribute()}render(){return U`<slot name="slides"></slot><slot name="pagination"></slot>`}setFocusedSlides(){const t=this.querySelectorAll("kemet-scroll-snap-slide"),e=this.querySelector('[slot="slides"]'),o=new IntersectionObserver((t=>{t.forEach((t=>{const{target:e}=t;t.intersectionRatio>=.5?e.focused=!0:e.focused=!1})),this.makeSlides()}),{root:e,rootMargin:"0px",threshold:.5});t.forEach((t=>{o.observe(t)}))}makeSlides(){const t=[];this.querySelectorAll("kemet-scroll-snap-slide").forEach(((e,o)=>{const i=e;i.index=o,t.push({id:o,focused:i.focused,label:i.label})})),this.slides=t,yt(this,"kemet-scroll-snap-make-slides",this.slides)}focusSlide(t){this.querySelector(`kemet-scroll-snap-slide[index="${t}"]`).scrollIntoView({behavior:"smooth",block:"nearest"})}setVerticalAttribute(){"vertical"===this.axis&&document.querySelector("html").setAttribute("kemet-scroll-snap-axis","vertical")}};vi.styles=[pi],t([at({type:String,reflect:!0})],vi.prototype,"axis",void 0),t([at({type:String,reflect:!0})],vi.prototype,"pagination",void 0),t([lt()],vi.prototype,"isTouchDevice",void 0),t([lt()],vi.prototype,"slides",void 0),vi=t([rt("kemet-scroll-snap")],vi);const gi=a`:host{display:flex;gap:1rem;flex-direction:column}`,yi=a`:host{cursor:grab;display:block;padding:1rem;border:1px solid var(--kemet-color-background)}:host([ghost]){opacity:.5;border-style:dashed}`;let bi=class extends it{firstUpdated(){this.draggable=!0}render(){return U`<slot></slot>`}};bi.styles=[yi],t([at({type:Boolean,reflect:!0})],bi.prototype,"ghost",void 0),bi=t([rt("kemet-sortable-item")],bi);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var ki={};(function(t){function e(){var t={dragEvents:"ondragstart"in document.documentElement,draggable:"draggable"in document.documentElement,touchEvents:"ontouchstart"in document.documentElement,userAgentSupportingNativeDnD:void 0},e=!!window.chrome||/chrome/i.test(navigator.userAgent);return t.userAgentSupportingNativeDnD=!(/iPad|iPhone|iPod|Android/.test(navigator.userAgent)||e&&t.touchEvents),t}function o(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}function i(t){if(t&&Object.keys(t).forEach((function(e){_[e]=t[e]})),!_.forceApply){var i=e();if(i.userAgentSupportingNativeDnD&&i.draggable&&i.dragEvents)return!1}return S=o(),_.holdToDrag?a("touchstart",w,!1):a("touchstart",s,!1),!0}function s(t){if(!E){var e=r(t);if(e)try{E=new D(t,_,e,n)}catch(e){throw n(_,t,3),e}}}function r(t){var e=t.target;do{if(!1!==e.draggable&&e.getAttribute&&"true"===e.getAttribute("draggable"))return e}while((e=e.parentNode)&&e!==document.body)}function n(t,e,o){if(0===o&&t.defaultActionOverride)try{t.defaultActionOverride(e),e.defaultPrevented}catch(t){}E=null}function a(t,e,o){void 0===o&&(o=!0),document.addEventListener(t,e,!!S&&{passive:o})}function l(t,e){document.removeEventListener(t,e)}function d(t){return 0===t.length?0:t.reduce((function(t,e){return e+t}),0)/t.length}function c(t){return t&&t.tagName}function h(t,e){for(var o=0;o<t.changedTouches.length;o++)if(t.changedTouches[o].identifier===e)return!0;return!1}function p(t,e,o,i,s,r,n){void 0===n&&(n=null);var a=e.changedTouches[0],l=new Event(o,{bubbles:!0,cancelable:i});l.dataTransfer=r,l.relatedTarget=n,l.screenX=a.screenX,l.screenY=a.screenY,l.clientX=a.clientX,l.clientY=a.clientY,l.pageX=a.pageX,l.pageY=a.pageY;var d=t.getBoundingClientRect();return l.offsetX=l.clientX-d.left,l.offsetY=l.clientY-d.top,l}function u(t,e,o){for(var i=[],s=[],r=0;r<e.touches.length;r++){var n=e.touches[r];i.push(n[t+"X"]),s.push(n[t+"Y"])}o.x=d(i),o.y=d(s)}function f(t,e){if(1===t.nodeType){for(var o=getComputedStyle(t),i=0;i<o.length;i++){var s=o[i];e.style.setProperty(s,o.getPropertyValue(s),o.getPropertyPriority(s))}e.style.pointerEvents="none",e.removeAttribute("id"),e.removeAttribute("class"),e.removeAttribute("draggable")}if(t.hasChildNodes())for(i=0;i<t.childNodes.length;i++)f(t.childNodes[i],e.childNodes[i])}function m(t){var e=t.cloneNode(!0);return f(t,e),e.style.position="absolute",e.style.left="0px",e.style.top="0px",e.style.zIndex="999999",e.classList.add(L),e.classList.add(I),e}function v(t){return O.map((function(e){var o=t.style[e+"transform"];return o&&"none"!==o?o.replace(/translate\(\D*\d+[^,]*,\D*\d+[^,]*\)\s*/g,""):""}))}function g(t,e,o,i,s){void 0===s&&(s=!0);var r=e.x,n=e.y;i&&(r+=i.x,n+=i.y),s&&(r-=parseInt(t.offsetWidth,10)/2,n-=parseInt(t.offsetHeight,10)/2);for(var a="translate3d("+r+"px,"+n+"px, 0)",l=0;l<O.length;l++){var d=O[l]+"transform";t.style[d]=a+" "+o[l]}}function y(t,e,o,i){var s=getComputedStyle(t);if("hidden"!==s.visibility&&"none"!==s.display){e.classList.add(B);var r=getComputedStyle(e),n=parseFloat(r.transitionDuration);if(isNaN(n)||0===n)i();else{var a=t.getBoundingClientRect(),l={x:a.left,y:a.top};l.x+=document.body.scrollLeft||document.documentElement.scrollLeft,l.y+=document.body.scrollTop||document.documentElement.scrollTop,l.x-=parseInt(s.marginLeft,10),l.y-=parseInt(s.marginTop,10);var d=parseFloat(r.transitionDelay),c=Math.round(1e3*(n+d));g(e,l,o,void 0,!1),setTimeout(i,c)}}else i()}function b(t,e){return t?t===A[0]?C[0]:0===t.indexOf(A[1])||t===A[7]?C[1]:0===t.indexOf(A[4])?C[3]:t===A[6]?C[2]:C[1]:3===e.nodeType&&"A"===e.tagName?C[3]:C[1]}function k(t,e,o,i,s,r,n){void 0===r&&(r=!0),void 0===n&&(n=null);var a=p(e,o,t,r,document.defaultView,s,n),l=!e.dispatchEvent(a);return i.g=0,l}function x(t,e){if(!t||t===A[7])return e;if(e===C[1]){if(0===t.indexOf(C[1]))return C[1]}else if(e===C[3]){if(0===t.indexOf(C[3])||t.indexOf("Link")>-1)return C[3]}else if(e===C[2]&&(0===t.indexOf(C[2])||t.indexOf("Move")>-1))return C[2];return C[0]}function w(t){var e=t.target,o=function(){r.off(),n.off(),a.off(),clearTimeout(i)},i=setTimeout((function(){r.off(),n.off(),a.off(),s(t)}),_.holdToDrag),r=$(e,"touchend",o,this),n=$(e,"touchcancel",o,this),a=$(window,"scroll",o,this)}function $(t,e,o,i){return i&&(o=o.bind(i)),t.addEventListener(e,o),{off:function(){return t.removeEventListener(e,o)}}}var S,E,_={iterationInterval:150},A=["none","copy","copyLink","copyMove","link","linkMove","move","all"],C=["none","copy","move","link"],O=["","-webkit-"],z="dnd-poly-",L=z+"drag-image",B=z+"snapback",I=z+"icon",D=function(){function t(t,e,o,i){this.h=t,this.i=e,this.j=o,this.k=i,this.l=0,this.m=null,this.o=null,this.p=t,this.q=t.changedTouches[0],this.s=this.t.bind(this),this.u=this.v.bind(this),a("touchmove",this.s,!1),a("touchend",this.u,!1),a("touchcancel",this.u,!1)}return t.prototype.A=function(){var t=this;this.l=1,this.B=C[0],this.C={D:{},F:void 0,g:3,G:[]},this.H={x:null,y:null},this.I={x:null,y:null};var e=this.j;if(this.J=new P(this.C,(function(o,i,s){e=o,"number"!=typeof i&&"number"!=typeof s||(t.K={x:i||0,y:s||0})})),this.C.g=2,this.J.dropEffect=C[0],k("dragstart",this.j,this.p,this.C,this.J))return this.l=3,this.L(),!1;if(u("page",this.p,this.I),this.M=m(e),this.N=v(this.M),!this.K)if(this.i.dragImageOffset)this.K={x:this.i.dragImageOffset.x,y:this.i.dragImageOffset.y};else if(this.i.dragImageCenterOnTouch){var o=getComputedStyle(e);this.K={x:0-parseInt(o.marginLeft,10),y:0-parseInt(o.marginTop,10)}}else{var i=e.getBoundingClientRect();o=getComputedStyle(e),this.K={x:i.left-this.q.clientX-parseInt(o.marginLeft,10)+i.width/2,y:i.top-this.q.clientY-parseInt(o.marginTop,10)+i.height/2}}return g(this.M,this.I,this.N,this.K,this.i.dragImageCenterOnTouch),document.body.appendChild(this.M),this.O=setInterval((function(){t.P||(t.P=!0,t.R(),t.P=!1)}),this.i.iterationInterval),!0},t.prototype.L=function(){this.O&&(clearInterval(this.O),this.O=null),l("touchmove",this.s),l("touchend",this.u),l("touchcancel",this.u),this.M&&(this.M.parentNode.removeChild(this.M),this.M=null),this.k(this.i,this.p,this.l)},t.prototype.t=function(t){var e=this;if(!1!==h(t,this.q.identifier)){if(this.p=t,0===this.l){var o=void 0;if(this.i.dragStartConditionOverride)try{o=this.i.dragStartConditionOverride(t)}catch(t){o=!1}else o=1===t.touches.length;return o?void(!0===this.A()&&(this.h.preventDefault(),t.preventDefault())):void this.L()}if(t.preventDefault(),u("client",t,this.H),u("page",t,this.I),this.i.dragImageTranslateOverride)try{var i=!1;if(this.i.dragImageTranslateOverride(t,{x:this.H.x,y:this.H.y},this.m,(function(t,o){e.M&&(i=!0,e.H.x+=t,e.H.y+=o,e.I.x+=t,e.I.y+=o,g(e.M,e.I,e.N,e.K,e.i.dragImageCenterOnTouch))})),i)return}catch(t){}g(this.M,this.I,this.N,this.K,this.i.dragImageCenterOnTouch)}},t.prototype.v=function(t){if(!1!==h(t,this.q.identifier)){if(this.i.dragImageTranslateOverride)try{this.i.dragImageTranslateOverride(void 0,void 0,void 0,(function(){}))}catch(t){}if(0===this.l)return void this.L();t.preventDefault(),this.l="touchcancel"===t.type?3:2}},t.prototype.R=function(){var t=this,e=this.B;this.C.g=3,this.J.dropEffect=C[0];var o=k("drag",this.j,this.p,this.C,this.J);if(o&&(this.B=C[0]),o||2===this.l||3===this.l)return this.S(this.l)?void y(this.j,this.M,this.N,(function(){t.T()})):void this.T();var i=document.elementFromPoint(this.H.x,this.H.y),s=this.o;i!==this.m&&i!==this.o&&(this.m=i,null!==this.o&&(this.C.g=3,this.J.dropEffect=C[0],k("dragexit",this.o,this.p,this.C,this.J,!1)),null===this.m?this.o=this.m:(this.C.g=3,this.J.dropEffect=b(this.C.F,this.j),k("dragenter",this.m,this.p,this.C,this.J)?(this.o=this.m,this.B=x(this.J.effectAllowed,this.J.dropEffect)):this.m!==document.body&&(this.o=document.body))),s!==this.o&&c(s)&&(this.C.g=3,this.J.dropEffect=C[0],k("dragleave",s,this.p,this.C,this.J,!1,this.o)),c(this.o)&&(this.C.g=3,this.J.dropEffect=b(this.C.F,this.j),!1===k("dragover",this.o,this.p,this.C,this.J)?this.B=C[0]:this.B=x(this.J.effectAllowed,this.J.dropEffect)),e!==this.B&&this.M.classList.remove(z+e);var r=z+this.B;!1===this.M.classList.contains(r)&&this.M.classList.add(r)},t.prototype.S=function(t){var e=this.B===C[0]||null===this.o||3===t;return e?c(this.o)&&(this.C.g=3,this.J.dropEffect=C[0],k("dragleave",this.o,this.p,this.C,this.J,!1)):c(this.o)&&(this.C.g=1,this.J.dropEffect=this.B,!0===k("drop",this.o,this.p,this.C,this.J)?this.B=this.J.dropEffect:this.B=C[0]),e},t.prototype.T=function(){this.C.g=3,this.J.dropEffect=this.B,k("dragend",this.j,this.p,this.C,this.J,!1),this.l=2,this.L()},t}(),P=function(){function t(t,e){this.U=t,this.V=e,this.W=C[0]}return Object.defineProperty(t.prototype,"types",{get:function(){if(0!==this.U.g)return Object.freeze(this.U.G)},enumerable:!0,configurable:!0}),t.prototype.setData=function(t,e){if(2===this.U.g){if(t.indexOf(" ")>-1)throw new Error("illegal arg: type contains space");this.U.D[t]=e,-1===this.U.G.indexOf(t)&&this.U.G.push(t)}},t.prototype.getData=function(t){if(1===this.U.g||2===this.U.g)return this.U.D[t]||""},t.prototype.clearData=function(t){if(2===this.U.g){if(t&&this.U.D[t]){delete this.U.D[t];var e=this.U.G.indexOf(t);return void(e>-1&&this.U.G.splice(e,1))}this.U.D={},this.U.G=[]}},t.prototype.setDragImage=function(t,e,o){2===this.U.g&&this.V(t,e,o)},Object.defineProperty(t.prototype,"effectAllowed",{get:function(){return this.U.F},set:function(t){2===this.U.g&&A.indexOf(t)>-1&&(this.U.F=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dropEffect",{get:function(){return this.W},set:function(t){0!==this.U.g&&A.indexOf(t)>-1&&(this.W=t)},enumerable:!0,configurable:!0}),t}();t.polyfill=i,Object.defineProperty(t,"__esModule",{value:!0})})(ki);let xi=class extends it{firstUpdated(){ki.polyfill(),this.addEventListener("dragstart",(t=>this.handleDragStart(t)),!1),this.addEventListener("dragenter",(t=>{t.preventDefault()}))}render(){return U`<slot></slot>`}handleDragStart(t){this.sortableItem=t.target,this.addEventListener("dragover",(t=>this.handleDragOver(t)),!1),this.addEventListener("dragend",(t=>this.handleDragEnd(t)),!1),setTimeout((()=>{this.sortableItem.ghost=!0}),0)}handleDragOver(t){t.preventDefault();const{target:e}=t;if(e&&"KEMET-SORTABLE-ITEM"===e.tagName){const o=(t=>{const e=t.target.getBoundingClientRect();return{x:t.pageX-e.left,y:t.pageY-e.top}})(t),i=(t=>{const e=t.getBoundingClientRect();return(e.bottom-e.top)/2})(t.target);o.y>i?this.insertBefore(this.sortableItem,e.nextSibling):this.insertBefore(this.sortableItem,e)}}handleDragEnd(t){t.preventDefault(),this.sortableItem.ghost=!1,yt(this,"kemet-sortable-drag-end",{event:t,current:this.sortableItem,all:this.querySelectorAll("kemet-sortable-item")})}};xi.styles=[gi],t([lt()],xi.prototype,"sortableItem",void 0),xi=t([rt("kemet-sortable")],xi);let wi=class extends it{constructor(){super(...arguments),this.value=""}render(){return U`<slot></slot>`}};t([at({type:String})],wi.prototype,"label",void 0),t([at({type:String})],wi.prototype,"value",void 0),t([at({type:Boolean})],wi.prototype,"disable",void 0),t([at({type:Boolean})],wi.prototype,"selected",void 0),wi=t([rt("kemet-option")],wi);const $i=a`:host{position:relative;display:block}select{color:var(--kemet-color-text);display:block;font-size:1rem;width:100%;padding:var(--kemet-select-padding,1rem);border:var(--kemet-select-border,1px solid var(--kemet-color-background));appearance:none;box-sizing:border-box;background-color:transparent}option{color:var(--kemet-color-black)}:host([status=error]) select{border:var(--kemet-select-border-color-error,1px solid var(--kemet-color-error))}:host([status=success]) select{border:var(--kemet-select-border-color-success,1px solid var(--kemet-color-success))}:host([status=warning]) select{border:var(--kemet-select-border-color-warning,1px solid var(--kemet-color-warning))}:host([disabled]) select{opacity:.5}:host([rounded]) select{border-radius:var(--kemet-select-border-radius-rounded,var(--kemet-border-radius))}:host([filled]) select{border:var(--kemet-select-border-filled,none);color:var(--kemet-select-color-filled,var(--kemet-color-white));background-color:var(--kemet-select-background-color-filled,var(--kemet-color-primary))}:host([filled]) kemet-icon{color:var(--kemet-select-color-filled,var(--kemet-color-white))}:host([status=error][filled]) select{background-color:var(--kemet-select-background-color-error,var(--kemet-color-error))}:host([status=success][filled]) select{background-color:var(--kemet-select-background-color-success,var(--kemet-color-success))}:host([status=warning][filled]) select{background-color:var(--kemet-select-background-color-warning,var(--kemet-color-warning))}kemet-icon{position:absolute;right:var(--kemet-select-icon-right,1rem);top:50%;transform:translateY(-50%)}`;let Si=class extends it{constructor(){super(),this.name="select",this.icon="chevron-down",this.iconSize=16,this.formSubmitController=new $t(this),this.control=this.closest("kemet-field")}firstUpdated(){this.select=this.shadowRoot.querySelector("select"),this.selectedOption=this.querySelector("[selected]"),this.value=this.selectedOption?this.selectedOption.value:""}render(){return U`<select part="select" id="${this.slug}" name="${this.name}" ?required="${this.required}" ?disabled="${this.disabled}" ?multiple="${this.multiple}" @change="${this.handleChange}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @invalid="${this.handleInvalid}">${this.makeOptions()}</select> ${this.makeIcon()}<slot @slotchange="${()=>this.makeOptions()}"></slot>`}makeOptions(){return this.options=[],this.optionElements=this.querySelectorAll("kemet-option"),this.optionElements.forEach((t=>{this.options=this.options.concat({label:t.label,value:t.value,disabled:t.disabled,selected:t.selected})})),this.options.map((t=>U`<option value="${t.value}" ?disabled="${t.disabled}" ?selected="${t.selected}">${t.label}</option>`))}makeIcon(){return this.icon||""!==this.icon?U`<kemet-icon icon="${this.icon}" size="${this.iconSize}"></kemet-icon>`:null}handleFocus(){this.hasFocus=!0,yt(this,"kemet-input-focused",!0)}handleBlur(){this.hasFocus=!1,yt(this,"kemet-input-focused",!1),this.select.checkValidity(),this.select.checkValidity()||(this.invalid=!0,this.status="error",this.control.status="error",yt(this,"kemet-input-status",{status:"error",validity:this.select.validity,element:this}))}handleChange(){this.value=this.select.value,this.select.checkValidity()&&(this.invalid=!1,this.status="standard",yt(this,"kemet-input-status",{status:"standard",validity:this.select.validity,element:this}))}handleInvalid(){this.invalid=!0,this.status="error",yt(this,"kemet-input-status",{status:"error",validity:this.select.validity,element:this})}checkValidity(){this.select.checkValidity()}};Si.styles=[$i],t([at({type:String})],Si.prototype,"slug",void 0),t([at({type:String})],Si.prototype,"name",void 0),t([at({type:String})],Si.prototype,"value",void 0),t([at({type:Array})],Si.prototype,"options",void 0),t([at({type:String,reflect:!0})],Si.prototype,"status",void 0),t([at({type:Boolean,reflect:!0})],Si.prototype,"required",void 0),t([at({type:Boolean,reflect:!0})],Si.prototype,"disabled",void 0),t([at({type:Boolean})],Si.prototype,"multiple",void 0),t([at({type:String})],Si.prototype,"icon",void 0),t([at({type:Number,attribute:"icon-size"})],Si.prototype,"iconSize",void 0),t([at({type:Boolean,reflect:!0})],Si.prototype,"filled",void 0),t([at({type:Boolean,reflect:!0})],Si.prototype,"rounded",void 0),t([lt()],Si.prototype,"invalid",void 0),t([lt()],Si.prototype,"control",void 0),t([lt()],Si.prototype,"select",void 0),t([lt()],Si.prototype,"selectedOption",void 0),t([lt()],Si.prototype,"optionElements",void 0),t([lt()],Si.prototype,"hasFocus",void 0),Si=t([rt("kemet-select")],Si);let Ei=class extends it{constructor(){super(...arguments),this.svg="svgs",this.ratio="none",this.viewBox="0 0 128 128"}updated(){this.setSize(),this.getIcon()}render(){return U`<svg part="svg" viewBox="${this.viewBox}" preserveAspectRatio="${this.ratio}" fill="currentColor"></svg>`}setSize(){this.size&&(this.style.width=`${this.size}px`,this.style.height=`${this.size}px`)}getIcon(){let t;const e=document.kemetSVGs[this.set];e.forEach(((o,i)=>{const s=o.getAttribute("id");s&&s===this.svg&&(t=e[i])})),t?this.fillSVG(t):console.error(`Could not find svg "${this.svg}" in set "${this.set}".`)}fillSVG(t){const e=t.cloneNode(!0),o=this.shadowRoot.querySelector("svg"),i=o.querySelector("g");i&&i.remove(),o.appendChild(e)}};Ei.styles=[a`:host{display:inline-block}svg{width:100%;height:100%}`],t([at({type:String})],Ei.prototype,"set",void 0),t([at({type:String})],Ei.prototype,"svg",void 0),t([at({type:Number})],Ei.prototype,"size",void 0),t([at({type:String})],Ei.prototype,"ratio",void 0),t([at({type:String})],Ei.prototype,"viewBox",void 0),Ei=t([rt("kemet-svg")],Ei);let _i=class extends it{constructor(){super(...arguments),this.set="svgs"}firstUpdated(){this.slotElement=this.shadowRoot.querySelector("slot"),document.kemetSVGs=document.kemetSVGs||{},this.populateIcons(),this.slotElement.addEventListener("slotchange",(()=>this.populateIcons()))}render(){return U`<slot></slot>`}populateIcons(){const t=this.slotElement.assignedElements()[0],e=t?t.querySelectorAll("defs > g"):null;e&&(document.kemetSVGs[this.set]=e)}};_i.styles=[a`:host{display:none}`],t([at({type:String})],_i.prototype,"set",void 0),t([lt()],_i.prototype,"slotElement",void 0),_i=t([rt("kemet-svgs")],_i);const Ai=a`:host{position:relative;display:block}textarea{color:var(--kemet-color-text);display:block;width:100%;padding:var(--kemet-textarea-padding,1rem);border:var(--kemet-textarea-border,1px solid var(--kemet-color-background));appearance:none;box-sizing:border-box;background:0 0}:host([status=error]) textarea{border:var(--kemet-textarea-border-color-error,1px solid var(--kemet-color-error))}:host([status=success]) textarea{border:var(--kemet-textarea-border-color-success,1px solid var(--kemet-color-success))}:host([status=warning]) textarea{border:var(--kemet-textarea-border-color-warning,1px solid var(--kemet-color-warning))}:host([disabled]) textarea{opacity:.5}:host([icon-left]) textarea{padding-left:var(--kemet-textarea-icon-left-padding,3rem)}:host([icon-right]) textarea{padding-right:var(--kemet-textarea-icon-right-padding,3rem)}:host([rounded]) textarea{border-radius:var(--kemet-textarea-border-radius-rounded,var(--kemet-border-radius))}:host([filled]) textarea{border:var(--kemet-textarea-border-filled,none);color:var(--kemet-textarea-color-filled,var(--kemet-color-white));background-color:var(--kemet-textarea-background-color-filled,var(--kemet-color-primary))}:host([filled]) textarea::placeholder{color:var(--kemet-textarea-color-filled,var(--kemet-color-white))}:host([status=error][filled]) textarea{background-color:var(--kemet-textarea-background-color-error,var(--kemet-color-error))}:host([status=success][filled]) textarea{background-color:var(--kemet-textarea-background-color-success,var(--kemet-color-success))}:host([status=warning][filled]) textarea{background-color:var(--kemet-textarea-background-color-warning,var(--kemet-color-warning))}`;let Ci=class extends it{constructor(){super(),this.slug="textarea",this.name="textarea",this.value="",this.status="standard",this.rows=4,this.formSubmitController=new $t(this)}firstUpdated(){this.form=this.closest("form"),this.control=this.closest("kemet-field"),this.textarea=this.shadowRoot.querySelector("textarea")}render(){return U`<textarea part="textarea" id="${this.slug}" name="${this.name}" .value="${Pt(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${At(this.placeholder)}" rows="${At(this.rows)}" minlength="${At(this.minlength)}" maxlength="${At(this.maxlength)}" autocorrect="${At(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${At(this.spellcheck)}" inputmode="${At(this.inputmode)}" @change="${this.handleChange}" @input="${this.handleInput}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @invalid="${this.handleInvalid}"></textarea>`}handleFocus(){this.hasFocus=!0,this.dispatchEvent(new CustomEvent("kemet-input-focused",{bubbles:!0,composed:!0,detail:!0}))}handleBlur(){this.hasFocus=!1,this.dispatchEvent(new CustomEvent("kemet-input-focused",{bubbles:!0,composed:!0,detail:!1})),this.validateOnBlur&&this.form&&!this.form.noValidate&&(this.textarea.checkValidity(),this.validity=this.textarea.validity)}handleChange(){this.value=this.textarea.value,this.textarea.checkValidity()&&this.checkLimitValidity()&&(this.invalid=!1,this.status="standard",this.validity=this.textarea.validity,this.dispatchEvent(new CustomEvent("kemet-input-status",{bubbles:!0,composed:!0,detail:{status:"standard",validity:this.textarea.validity,element:this}})))}handleInput(){this.value=this.textarea.value,this.dispatchEvent(new CustomEvent("kemet-input-input",{bubbles:!0,composed:!0,detail:this.value}))}handleInvalid(){this.validity=this.textarea.validity,this.validateOnBlur&&(this.invalid=!0,this.status="error",this.dispatchEvent(new CustomEvent("kemet-input-status",{bubbles:!0,composed:!0,detail:{status:"error",validity:this.textarea.validity,element:this}})))}checkLimitValidity(){if(this.control){const t=this.control.querySelector("kemet-count");if(t)return this.value.length<t.limit}return!0}checkValidity(){return this.textarea.checkValidity()}focus(){return this.textarea.focus()}};Ci.styles=[Ai],t([at({type:String})],Ci.prototype,"slug",void 0),t([at({type:String})],Ci.prototype,"name",void 0),t([at({type:String})],Ci.prototype,"placeholder",void 0),t([at({type:Number})],Ci.prototype,"minlength",void 0),t([at({type:Number})],Ci.prototype,"maxlength",void 0),t([at({type:String})],Ci.prototype,"inputmode",void 0),t([at({type:Boolean})],Ci.prototype,"autofocus",void 0),t([at({type:Boolean,reflect:!0})],Ci.prototype,"disabled",void 0),t([at({type:Boolean})],Ci.prototype,"readonly",void 0),t([at({type:Boolean,reflect:!0})],Ci.prototype,"required",void 0),t([at({type:String})],Ci.prototype,"value",void 0),t([at({type:Boolean,reflect:!0})],Ci.prototype,"invalid",void 0),t([at({type:String,reflect:!0})],Ci.prototype,"status",void 0),t([at({type:Number})],Ci.prototype,"rows",void 0),t([at({type:Boolean,attribute:"validate-on-blur"})],Ci.prototype,"validateOnBlur",void 0),t([at({type:Boolean,reflect:!0})],Ci.prototype,"filled",void 0),t([at({type:Boolean,reflect:!0})],Ci.prototype,"rounded",void 0),t([at({type:Boolean})],Ci.prototype,"autocorrect",void 0),t([lt()],Ci.prototype,"form",void 0),t([lt()],Ci.prototype,"control",void 0),t([lt()],Ci.prototype,"textarea",void 0),t([lt()],Ci.prototype,"hasFocus",void 0),t([lt()],Ci.prototype,"validity",void 0),Ci=t([rt("kemet-textarea")],Ci);const Oi=a`:host{--kemet-tabs-ink-size:6px;--kemet-tabs-ink-radius:6px;--kemet-tabs-divider-size:1px;--kemet-tabs-spacer:1rem;display:flex;flex-direction:column;overflow:hidden;position:relative}:host([placement=bottom]){flex-direction:column-reverse}:host([placement=left]){flex-direction:row}:host([placement=right]){flex-direction:row-reverse}:host([placement=left]),:host([placement=right]){overflow:unset}[part=panels]>div{display:flex}:host([panel-effect=slide]) [part=panels]{transition:transform var(--kemet-tabs-transition-speed,.5s) linear}:host([panel-effect=fade]) [part=panels]{transform:none!important}:host([panel-effect=fade]) [part=panels]>div{flex-flow:row nowrap}:host([placement=left]) [part=panels],:host([placement=right]) [part=panels]{transform:none!important;position:relative;width:100%}:host([placement=top]) [part=panels]>div{margin-top:var(--kemet-tabs-spacer)}:host([placement=right]) [part=panels]>div{margin-right:var(--kemet-tabs-spacer)}:host([placement=bottom]) [part=panels]>div{margin-bottom:var(--kemet-tabs-spacer)}:host([placement=left]) [part=panels]>div{margin-left:var(--kemet-tabs-spacer)}[part=tablist]{display:flex}:host([placement=left]) [part=tablist],:host([placement=right]) [part=tablist]{display:flex;flex-direction:column;align-items:start}:host([tabs-align=center]) [part=tablist]{justify-content:center}:host([tabs-align=between]) [part=tablist]{justify-content:space-between}:host([tabs-align=evenly]) [part=tablist]{justify-content:space-evenly}:host([tabs-align=around]) [part=tablist]{justify-content:space-around}:host([tabs-align=start]) [part=tablist]{justify-content:flex-start}:host([tabs-align=end]) [part=tablist]{justify-content:flex-end}:host([overflow]) [part=tablist]{justify-content:start}[part=divider]{height:var(--kemet-tabs-divider-size);background-color:var(--kemet-tabs-divider-color,var(--kemet-color-gray4))}:host([placement=left]) [part=divider],:host([placement=right]) [part=divider]{width:var(--kemet-tabs-divider-size);height:auto}[part=ink]{height:var(--kemet-tabs-ink-size);border-top-left-radius:var(--kemet-tabs-ink-radius);border-top-right-radius:var(--kemet-tabs-ink-radius);transition:all .3s ease;background-color:var(--kemet-tabs-ink-color,var(--kemet-color-background))}:host([placement=right]) [part=ink]{width:var(--kemet-tabs-ink-size);border-top-right-radius:var(--kemet-tabs-ink-radius);border-bottom-right-radius:var(--kemet-tabs-ink-radius);border-top-left-radius:0;border-bottom-left-radius:0}:host([placement=left]) [part=ink]{width:var(--kemet-tabs-ink-size);border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--kemet-tabs-ink-radius);border-bottom-left-radius:var(--kemet-tabs-ink-radius)}:host([placement=bottom]) [part=ink]{border-top-right-radius:0;border-bottom-right-radius:var(--kemet-tabs-ink-radius);border-top-left-radius:0;border-bottom-left-radius:var(--kemet-tabs-ink-radius)}:host([overflow]) [part=links]{overflow-x:auto;margin:0 2rem;scroll-behavior:smooth}:host([overflow]) [part=links]::-webkit-scrollbar{display:none;width:0;background:0 0}:host([placement=bottom]) [part=links]{display:flex;flex-direction:column-reverse}[icon*=chevron]{cursor:pointer;position:absolute;top:1rem}[icon=chevron-left]{left:0}[icon=chevron-right]{right:0}:host([placement=bottom]) [icon*=chevron]{top:auto;bottom:1rem}`,zi=a`:host{cursor:pointer;display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;white-space:nowrap;padding:var(--kemet-tab-padding,1rem)}:host([selected]){cursor:auto;color:var(--kemet-tab-color,var(--kemet-color-background))}kemet-icon{cursor:pointer;margin-left:.5rem}`,Li=a`:host{width:100%;flex:0 0 auto}::slotted(img){max-width:100%}:host(.fade){opacity:0;pointer-events:none;transition:opacity var(--kemet-tab-panel-fade-speed,.5s) ease}:host(.fade[selected]){opacity:1;pointer-events:auto}:host(.fade.push){margin-left:-100%}:host(.vertical){display:none}:host(.vertical[selected]){display:block}:host(.stacked){position:absolute;z-index:-1;opacity:0;visibility:hidden}:host(.stacked[selected]){position:relative;z-index:1;opacity:1;visibility:visible}`;let Bi=class extends it{constructor(){super(...arguments),this.selected=!1}updated(){this.a11y()}render(){return U`<slot></slot>`}a11y(){this.setAttribute("role","tabpanel"),this.selected?this.setAttribute("tabindex","0"):this.setAttribute("tabindex","-1")}};Bi.styles=[Li],t([at({type:Boolean,reflect:!0})],Bi.prototype,"selected",void 0),t([at({type:String})],Bi.prototype,"panel",void 0),Bi=t([rt("kemet-tab-panel")],Bi);let Ii=class extends it{constructor(){super(...arguments),this.selected=!1}firstUpdated(){this.addEventListener("click",this.select.bind(this))}updated(){this.a11y()}render(){return U`<slot></slot>${this.makeCloseable()}`}select(){yt(this,"kemet-tab-selected",this)}a11y(){this.setAttribute("role","tab"),this.selected?(this.setAttribute("aria-selected","true"),this.setAttribute("tabindex","0")):(this.setAttribute("aria-selected","false"),this.setAttribute("tabindex","-1"))}makeCloseable(){return this.closable?U`<kemet-icon icon="x-lg" @click="${()=>this.handleClosable()}"></kemet-icon>`:null}handleClosable(){yt(this,"kemet-tab-close",this)}};Ii.styles=[zi],t([at({type:Boolean,reflect:!0})],Ii.prototype,"selected",void 0),t([at({type:String})],Ii.prototype,"link",void 0),t([at({type:Boolean})],Ii.prototype,"closable",void 0),Ii=t([rt("kemet-tab")],Ii);let Di=class extends it{constructor(){super(),this.selectedIndex=0,this.panelPosition=0,this.panelEffect="none",this.placement="top",this.tabsAlign="center",this.hideInk=!1,this.addEventListener("kemet-tab-selected",this.tabSelectedChange.bind(this)),this.addEventListener("kemet-tab-close",this.handleTabClose.bind(this)),window.addEventListener("resize",this.handleResize.bind(this))}firstUpdated(){this.tabs=[],this.panels=[],this.xDown=null,this.yDown=null,this.links=this.shadowRoot.getElementById("links")}render(){return U`${this.makeLeftArrow()} ${this.makeRightArrow()}<div id="links" part="links"><div part="tablist" role="tablist"><slot name="tab" @slotchange="${()=>this.handleLinksSlotChange()}"></slot></div>${this.makeInk("links")}</div>${this.makeInk("host")} ${this.makeDivider()}<section id="panels" part="panels" style="transform:translateX(${this.panelPosition}px)"><div><slot name="panel" @slotchange="${()=>this.handlePanelsSlotChange()}"></slot></div></section>`}updated(){this.determineFade(),this.determineStacked()}handleLinksSlotChange(){const t=this.querySelectorAll("kemet-tab");let e=0;t.forEach((t=>{t.index=e,e+=1,this.tabs=this.tabs.concat(t),t.addEventListener("keydown",(t=>this.handleTabKeydown(t)))})),this.tabs.length>0&&(this.tabs[0].selected=!0),setTimeout((()=>{this.selectTab()}),1),this.determineOverflow()}handlePanelsSlotChange(){const t=this.querySelectorAll("kemet-tab-panel"),e=this.shadowRoot.getElementById("panels");let o=0;t.forEach((t=>{t.index=o,o+=1,this.panels=this.panels.concat(t)})),this.panels.length>0&&(this.panels[0].selected=!0),this.swipe&&(e.addEventListener("touchstart",(t=>this.handleTouchStart(t)),!1),e.addEventListener("touchmove",(t=>this.handleTouchMove(t)),!1)),this.selectPanel()}handleLeftArrow(){const t=this.tabs.find((t=>t.selected))||this.tabs[0],e=t.previousElementSibling,o=this.tabs.findIndex((t=>t.selected));this.selected?this.selected=e?e.link:t.link:this.selectedIndex=o>0?o-1:0,e&&(this.links.scrollLeft=e.offsetLeft-20),this.selectTab(),this.selectPanel()}handleRightArrow(){const t=this.tabs.find((t=>t.selected))||this.tabs[this.tabs.length-1],e=t.nextElementSibling,o=this.tabs.findIndex((t=>t.selected));this.selected?this.selected=e?e.link:t.link:this.selectedIndex=o<this.tabs.length-1?o+1:this.tabs.length-1,e&&(this.links.scrollLeft=e.offsetLeft-20),this.selectTab(),this.selectPanel()}handleTabClose(t){const e=t.detail,o=this.panels[e.index];this.selected=this.tabs[0].link,this.selectedIndex=0,o.remove(),e.remove()}makeInk(t){return this.hideInk?null:"top"!==this.placement&&"bottom"!==this.placement||!this.ink||"links"!==t?"left"!==this.placement&&"right"!==this.placement||!this.ink||"host"!==t?null:U`<div part="ink" style="height:${this.ink.height};transform:translateY(${this.ink.positionY})"></div>`:U`<div part="ink" style="width:${this.ink.width};transform:translateX(${this.ink.positionX})"></div>`}makeDivider(){return this.divider?U`<div part="divider"></div>`:null}makeLeftArrow(){return this.overflow?U`<kemet-icon icon="chevron-left" size="20" @click="${()=>this.handleLeftArrow()}"></kemet-icon>`:null}makeRightArrow(){return this.overflow?U`<kemet-icon icon="chevron-right" size="20" @click="${()=>this.handleRightArrow()}"></kemet-icon>`:null}selectTab(){const t=this.links?parseInt(window.getComputedStyle(this.links).marginLeft.replace("px",""),10):0,e=this.overflow?t:0;this.selected?this.tabs.forEach((t=>{const o=t.getAttribute("link");o===this.selected?(t.selected=!0,this.selected=o,this.ink={width:`${t.offsetWidth}px`,height:`${t.offsetHeight}px`,positionX:t.offsetLeft-e+"px",positionY:`${t.offsetTop}px`},this.links.scrollLeft=t.offsetLeft-e):t.selected=!1})):this.tabs.forEach((t=>{this.selectedIndex===t.index?(t.selected=!0,this.ink={width:`${t.offsetWidth}px`,height:`${t.offsetHeight}px`,positionX:t.offsetLeft-e+"px",positionY:`${t.offsetTop}px`},this.links.scrollLeft=t.offsetLeft-e):t.selected=!1}))}selectPanel(){this.selected?this.panels.forEach((t=>{const e=t.getAttribute("panel");"fade"===this.panelEffect&&0!==t.index&&t.classList.add("push"),"left"!==this.placement&&"right"!==this.placement||t.classList.add("vertical"),e===this.selected?(t.selected=!0,this.animatePanel(e,null)):t.selected=!1})):this.panels.forEach((t=>{"fade"===this.panelEffect&&0!==t.index&&t.classList.add("push"),"left"!==this.placement&&"right"!==this.placement||t.classList.add("vertical"),this.selectedIndex===t.index?(t.selected=!0,this.animatePanel(null,t.index)):t.selected=!1}))}dispatchTabChange(){const t={currentTabName:this.selected,currentTabIndex:this.selectedIndex};yt(this,"kemet-tab-changed",t)}tabSelectedChange(t){this.selected?this.selected=t.detail.getAttribute("link"):this.selectedIndex=t.detail.index,this.selectTab(),this.selectPanel(),this.dispatchTabChange()}determineFade(){this.panels.forEach((t=>{"fade"===this.panelEffect&&t.classList.add("fade")}))}determineStacked(){this.panels.forEach((t=>{"stacked"===this.panelEffect&&t.classList.add("stacked")}))}determineOverflow(){const t=this.offsetWidth,e=this.querySelectorAll("kemet-tab");let o=0;e.forEach((t=>{o+=t.offsetWidth})),o>t&&("top"===this.placement||"bottom"===this.placement)?this.overflow=!0:this.overflow=!1}handleResize(){if(this.tabs&&this.panels){const t=this.links?parseInt(window.getComputedStyle(this.links).marginLeft.replace("px",""),10):0,e=this.overflow?t:0,o=this.tabs.find((t=>t.selected));o&&(this.ink={width:`${o.offsetWidth}px`,height:`${o.offsetHeight}px`,positionX:o.offsetLeft-e+"px",positionY:`${o.offsetTop}px`}),this.determineOverflow(),this.selected?this.animatePanel(this.selected,null):this.animatePanel(null,this.selectedIndex)}}animatePanel(t,e){if(t){const e=this.querySelector(`[panel="${t}"]`);e&&(this.panelPosition=-1*e.offsetLeft)}else this.panels[e]&&(this.panelPosition=-1*this.panels[e].offsetLeft)}handleTabKeydown(t){if(this.selected){switch(t.key){case"Home":this.selected=this.tabs[0].getAttribute("link");break;case"End":this.selected=this.tabs[this.tabs.length-1].getAttribute("link");break;case"ArrowRight":const t=this.querySelector("kemet-tab[selected]").nextElementSibling,e=!!t&&t.getAttribute("link");e&&(this.selected=e);break;case"ArrowLeft":const o=this.querySelector("kemet-tab[selected]").previousElementSibling,i=!!o&&o.getAttribute("link");i&&(this.selected=i)}this.tabs.find((t=>t.link===this.selected)).focus()}else{switch(t.key){case"Home":this.selectedIndex=0;break;case"End":this.selectedIndex=this.tabs.length-1;break;case"ArrowRight":this.selectedIndex<this.tabs.length-1?this.selectedIndex+=1:this.selectedIndex=this.tabs.length-1;break;case"ArrowLeft":this.selectedIndex<1?this.selectedIndex=0:this.selectedIndex-=1}this.tabs[this.selectedIndex].focus()}}handleTouchStart(t){this.xDown=t.touches[0].clientX,this.yDown=t.touches[0].clientY}handleTouchMove(t){var e,o;if(!this.xDown||!this.yDown)return;const i=t.touches[0].clientX,s=t.touches[0].clientY,r=this.xDown-i,n=this.yDown-s,a=null===(e=this.querySelector("kemet-tab-panel[selected]"))||void 0===e?void 0:e.nextElementSibling,l=!!a&&a.getAttribute("panel"),d=null===(o=this.querySelector("kemet-tab-panel[selected]"))||void 0===o?void 0:o.previousElementSibling,c=!!d&&d.getAttribute("panel");Math.abs(r)>Math.abs(n)&&(r>0?this.selected?l&&(this.selected=l):this.selectedIndex<this.tabs.length&&(this.selectedIndex+=1):this.selected?c&&(this.selected=c):this.selectedIndex>0&&(this.selectedIndex-=1),this.selectTab(),this.selectPanel()),this.xDown=null,this.yDown=null}};Di.styles=[Oi],t([at({type:String,reflect:!0})],Di.prototype,"selected",void 0),t([at({type:Number})],Di.prototype,"selectedIndex",void 0),t([at({type:Number})],Di.prototype,"panelPosition",void 0),t([at({type:String,reflect:!0,attribute:"panel-effect"})],Di.prototype,"panelEffect",void 0),t([at({type:Boolean})],Di.prototype,"swipe",void 0),t([at({type:String,reflect:!0})],Di.prototype,"placement",void 0),t([at({type:Boolean})],Di.prototype,"divider",void 0),t([at({type:String,reflect:!0,attribute:"tabs-align"})],Di.prototype,"tabsAlign",void 0),t([at({type:Object})],Di.prototype,"ink",void 0),t([at({type:Boolean,attribute:"hide-ink"})],Di.prototype,"hideInk",void 0),t([at({type:Boolean,reflect:!0})],Di.prototype,"overflow",void 0),t([lt()],Di.prototype,"tabs",void 0),t([lt()],Di.prototype,"panels",void 0),t([lt()],Di.prototype,"xDown",void 0),t([lt()],Di.prototype,"yDown",void 0),t([lt()],Di.prototype,"links",void 0),t([ct("#panels")],Di.prototype,"panelsElement",void 0),Di=t([rt("kemet-tabs")],Di);const Pi=a`:host{--kemet-toggle-width:3.5rem;--kemet-toggle-height:2rem;--kemet-toggle-handle-diameter:1.6rem;--kemet-toggle-handle-margin:calc((var(--kemet-toggle-height) - var(--kemet-toggle-handle-diameter)) / 2);display:flex;align-items:center}:host([disabled]){opacity:.5}label{cursor:pointer;display:flex;align-items:center;gap:1rem;font-size:inherit;color:inherit}:host([disabled]) label{cursor:not-allowed}input{display:none}[part=control]{position:relative;display:inline-flex;margin:0;width:var(--kemet-toggle-width);height:var(--kemet-toggle-height)}[part=control]>span{transition:.3s ease-in-out}[part=track]{width:var(--kemet-toggle-width);height:var(--kemet-toggle-height);border:var(--kemet-toggle-track-border,none);border-radius:var(--kemet-toggle-height);background-color:var(--kemet-toggle-track-color,var(--kemet-color-white));box-shadow:var(--kemet-toggle-track-shadow,inset 0 .4rem .7rem 0 rgba(47,47,47,.35),inset 0 -.2rem .4rem 0 var(--kemet-color-gray1))}:host([squared]) [part=track]{border-radius:0}[part=handle]{position:absolute;top:var(--kemet-toggle-handle-margin);left:var(--kemet-toggle-handle-margin);width:var(--kemet-toggle-handle-diameter);height:var(--kemet-toggle-handle-diameter);transform:translateX(0);border:var(--kemet-toggle-handle-border,none);border-radius:var(--kemet-toggle-handle-diameter);background-color:var(--kemet-toggle-handle-color,var(--kemet-color-primary));box-shadow:var(--kemet-toggle-handle-shadow,0 .5rem .5rem 0 rgba(0,0,0,.1),0 .5rem .5rem 0 rgba(0,0,0,.2))}:host([squared]) [part=handle]{border-radius:0}:host([checked]) [part=handle]{transform:translateX(calc(var(--kemet-toggle-width) - var(--kemet-toggle-handle-diameter) - var(--kemet-toggle-handle-margin) * 2))}.option{font-size:90%}`;let Ti=class extends it{constructor(){super(),this.name="toggle-switch",this.checked=!1,this.disabled=!1,this.label="",this.show=!1,this.squared=!1,this.optionChecked="on",this.optionUnchecked="off",this.value=this.checked?this.optionChecked:this.optionUnchecked,this.formSubmitController=new $t(this)}render(){return U`<label part="label">${this.makeUncheckedOption()} <span part="control"><span part="track"></span> <span part="handle"></span> </span><input role="switch" type="checkbox" name="${this.name}" aria-label="${this.label}" aria-checked="${this.checked?"true":"false"}" ?disabled="${this.disabled}" ?checked="${this.checked}" @change="${this.handleChange}"> ${this.makeCheckedOption()} <span part="text">${this.label}</span></label>`}handleChange(){this.checked=!this.checked,this.value=this.checked?this.optionChecked:this.optionUnchecked,yt(this,"kemet-toggle-change",!0)}makeUncheckedOption(){return this.show?U`<span class="option" part="unchecked">${this.optionUnchecked}</span>`:null}makeCheckedOption(){return this.show?U`<span class="option" part="checked">${this.optionChecked}</span>`:null}};Ti.styles=[Pi],t([at({type:String})],Ti.prototype,"name",void 0),t([at({type:Boolean,reflect:!0})],Ti.prototype,"checked",void 0),t([at({type:Boolean})],Ti.prototype,"disabled",void 0),t([at({type:String})],Ti.prototype,"label",void 0),t([at({type:Boolean})],Ti.prototype,"show",void 0),t([at({type:Boolean})],Ti.prototype,"squared",void 0),t([at({type:String,attribute:"option-checked"})],Ti.prototype,"optionChecked",void 0),t([at({type:String,attribute:"option-unchecked"})],Ti.prototype,"optionUnchecked",void 0),t([lt()],Ti.prototype,"value",void 0),Ti=t([rt("kemet-toggle")],Ti);const Mi=a`:host{--kemet-tooltip-deg:-45deg;--kemet-tooltip-size:22px;--kemet-tooltip-border-size:1px;--kemet-tooltip-rounded-tip:4px;--kemet-tooltip-background-color:var(--kemet-color-foreground);--kemet-tooltip-border-color:var(--kemet-color-background);--kemet-tooltip-placement-offset:calc(calc(var(--kemet-tooltip-size) / 2) * -1)}#arrow{content:'';width:var(--kemet-tooltip-size);height:var(--kemet-tooltip-size);position:relative;display:inline-block;background:linear-gradient(var(--kemet-tooltip-deg),transparent calc(var(--kemet-tooltip-size)/ 1.5),var(--kemet-tooltip-background-color) 0) no-repeat;background-repeat:no-repeat;transform-origin:center center;border-top-left-radius:var(--kemet-tooltip-rounded-tip);border-left:var(--kemet-tooltip-border-size) solid var(--kemet-tooltip-border-color);border-top:var(--kemet-tooltip-border-size) solid var(--kemet-tooltip-border-color)}[data-popper-placement^=top] #arrow{top:var(--kemet-tooltip-placement-offset);transform:rotate(225deg)}[data-popper-placement^=bottom] #arrow-container{top:0}[data-popper-placement^=bottom] #arrow{top:var(--kemet-tooltip-placement-offset);transform:rotate(45deg)}[data-popper-placement^=right] #arrow{left:var(--kemet-tooltip-placement-offset);transform:rotate(-45deg)}[data-popper-placement^=left] #arrow-container{right:0}[data-popper-placement^=left] #arrow{right:var(--kemet-tooltip-placement-offset);transform:rotate(135deg)}`;let Ui=class extends ti{render(){return U`<div id="trigger" part="trigger" tabIndex="0" @click="${"click"===this.fireOn?t=>this.toggle(t):null}" @keyup="${"click"===this.fireOn?t=>this.handleKeyUp(t):null}" @mouseover="${"click"!==this.fireOn?()=>this.opened=!0:null}" @focus="${"click"!==this.fireOn?()=>this.opened=!0:null}" @mouseout="${"click"!==this.fireOn?()=>this.opened=!1:null}" @blur="${"click"!==this.fireOn?()=>this.opened=!1:null}"><slot name="trigger"></slot></div><div id="content" @mouseover="${"click"!==this.fireOn?()=>this.opened=!0:null}" @mouseout="${"click"!==this.fireOn?()=>this.opened=!1:null}"><slot name="content" @slotchange="${()=>{this.makePopper(),this.measureContent()}}"></slot><div id="arrow-container" part="arrow-container" data-popper-arrow><div id="arrow" part="arrow"></div></div></div>`}measureContent(){const t=this.contentElement.offsetHeight;this.contentElement.style.setProperty("--kemet-tooltip-content-height",`${t}px`)}};Ui.styles=[Mi,Ho,Yo,Vo,Fo,Wo,Ko,Jo,Zo,Go],Ui=t([rt("kemet-tooltip")],Ui);const Ni=a`:host{--kemet-tracker-step-dot-size:50px;--kemet-tracker-step-dot-size-mobile:25px;--kemet-tracker-step-dot-gap:4px;--kemet-tracker-step-standard-line-weight:1px;--kemet-tracker-step-completed-line-weight:3px;--kemet-tracker-step-dot-transition:all 300ms ease-in-out;position:relative;width:100%;text-align:center}.dot{font-size:var(--kemet-tracker-step-dot-font-size,90%);color:var(--kemet-tracker-step-dot-color,var(--kemet-color-primary));display:flex;align-items:center;justify-content:center;margin:0 auto;position:relative;z-index:1;width:var(--kemet-tracker-step-dot-size);height:var(--kemet-tracker-step-dot-size);border-radius:100%;transition:var(--kemet-tracker-step-dot-transition);background-color:var(--kemet-tracker-step-dot-background-color,var(--kemet-color-white))}.dot::after{content:"";width:unset;height:unset;position:absolute;top:var(--kemet-tracker-step-dot-gap);left:var(--kemet-tracker-step-dot-gap);right:var(--kemet-tracker-step-dot-gap);bottom:var(--kemet-tracker-step-dot-gap);z-index:-1;border-radius:100%;transition:var(--kemet-tracker-step-dot-transition);border:var(--kemet-tracker-step-dot-border,1px solid var(--kemet-color-primary));background-color:var(--kemet-tracker-step-dot-fill-color,transparent)}:host([completed]) .dot{color:var(--kemet-tracker-step-completed-color,var(--kemet-color-white))}:host([completed]) .dot::after{border:0;background-color:var(--kemet-tracker-step-completed-fill-color,var(--kemet-color-success))}:host([current]) .dot.animate{color:var(--kemet-tracker-step-current-color,var(--kemet-color-white))}:host([current]) .dot.animate::after{border:0;background-color:var(--kemet-tracker-step-current-fill-color,var(--kemet-color-primary))}:host([mobile]) .dot{width:var(--kemet-tracker-step-dot-size-mobile);height:var(--kemet-tracker-step-dot-size-mobile)}.line{display:block;position:absolute;left:50%;right:0;bottom:0;width:100%;top:calc((var(--kemet-tracker-step-dot-size) - var(--kemet-tracker-step-standard-line-weight))/ 2);height:var(--kemet-tracker-step-standard-line-weight);background-color:var(--kemet-tracker-step-line-color,var(--kemet-color-primary))}.line.completed{width:100%;transform:scaleX(0);transform-origin:left center;top:calc((var(--kemet-tracker-step-dot-size) - var(--kemet-tracker-step-completed-line-weight))/ 2);height:var(--kemet-tracker-step-completed-line-weight);background-color:var(--kemet-tracker-step-completed-line-color,var(--kemet-color-primary));animation-name:grow;animation-delay:1s;animation-duration:.6s;animation-fill-mode:forwards}:host([mobile]) .line{top:calc((var(--kemet-tracker-step-dot-size-mobile) - var(--kemet-tracker-step-standard-line-weight))/ 2)}:host([mobile]) .line.completed{top:calc((var(--kemet-tracker-step-dot-size-mobile) - var(--kemet-tracker-step-completed-line-weight))/ 2)}@keyframes grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}`;let Xi=class extends it{constructor(){super(...arguments),this.completedSize=16}firstUpdated(){this.tracker=this.closest("kemet-tracker")}render(){return U`${this.makeLine()} ${this.makeCompletedLine()}<div class="dot" part="dot">${this.makeDotContent()}</div>${this.makeSlotContent()}`}makeLine(){return this.last?null:U`<div class="line" part="line"></div>`}makeCompletedLine(){return this.completed&&!this.last?U`<div class="line completed" part="completed-line" @animationend="${()=>this.handleCompletedLineEnd()}"></div>`:null}makeDotContent(){var t;return!this.completed||this.mobile||this.hideDotContent?this.mobile||this.hideDotContent?null:U`<span>${this.step}/${null===(t=this.tracker)||void 0===t?void 0:t.total}</span>`:U`<kemet-icon icon="check2" size="${this.completedSize}"></kemet-icon>`}makeSlotContent(){return this.mobile?null:U`<slot></slot>`}handleCompletedLineEnd(){const t=this.tracker.querySelector("[current]").shadowRoot.querySelector(".dot");t&&t.classList.add("animate")}};Xi.styles=[Ni],t([at({type:Number})],Xi.prototype,"step",void 0),t([at({type:Boolean,reflect:!0})],Xi.prototype,"completed",void 0),t([at({type:Boolean,reflect:!0})],Xi.prototype,"current",void 0),t([at({type:Boolean,reflect:!0})],Xi.prototype,"last",void 0),t([at({type:Boolean,reflect:!0})],Xi.prototype,"mobile",void 0),t([at({type:Boolean,reflect:!0,attribute:"hide-dot-content"})],Xi.prototype,"hideDotContent",void 0),t([at({type:Number})],Xi.prototype,"completedSize",void 0),t([lt()],Xi.prototype,"tracker",void 0),Xi=t([rt("kemet-tracker-step")],Xi);const qi=a`:host{color:var(--kemet-upload-color,var(--kemet-color-white));display:grid;grid-template-columns:1fr 1fr;height:var(--kemet-upload-height,364px);border:var(--kemet-upload-border,1rem solid var(--kemet-color-gray1-to-transparent));background-color:var(--kemet-upload-background-color,var(--kemet-color-primary-to-transparent))}:host([mobile]){display:block;height:auto}input{display:none}.button{cursor:pointer;font-size:1rem;display:block;color:var(--kemet-color-white);padding:.5rem 1rem;border:1px solid var(--kemet-color-white);background-color:transparent}.upload{display:flex;align-items:center;justify-content:center;margin:var(--kemet-upload-margin);flex-direction:column;border:2px dashed var(--kemet-color-white)}:host([over]) .upload{background-color:green}:host([mobile]) .upload{height:280px}.files{display:flex;gap:1rem;flex-direction:column;padding:0 1rem;overflow:auto;background-color:var(--kemet-color-gray1-to-transparent)}:host([mobile]) .files{padding:0;max-height:280px}.heading{font-size:1.25rem;margin:0 0 2rem 0}:host([no-drag-drop]) .heading{display:none}`,Ri=a`:host{--kemet-upload-file-ripple-color:var(--kemet-color-primary);color:var(--kemet-upload-file-color,var(--kemet-color-text));display:grid;gap:1rem;grid-template-columns:auto 1fr auto;align-items:center;height:100%;max-height:50%;padding:var(--kemet-upload-file-padding,.5rem 1rem);border:var(--kemet-upload-file-border,1px solid var(--kemet-color-primary))}:host([status=error]){border:1px solid var(--kemet-color-error)}:host([status=complete]){border:1px solid var(--kemet-color-success)}h3{margin:0}.percentage{font-size:clamp(2rem,3vw,2.5rem);align-self:center;justify-self:center}.indicator{transform:scale(.8)}:host([status=complete]) .indicator,:host([status=complete]) .message{color:var(--kemet-color-success)}:host([status=error]) .indicator,:host([status=error]) .message{color:var(--kemet-color-error)}`,ji=a`.lds-ripple{display:inline-block;position:relative;width:80px;height:80px}.lds-ripple div{position:absolute;border:4px solid var(--kemet-upload-file-ripple-color);opacity:1;border-radius:50%;animation:lds-ripple 1s cubic-bezier(0,.2,.8,1) infinite}.lds-ripple div:nth-child(2){animation-delay:-.5s}@keyframes lds-ripple{0%{top:36px;left:36px;width:0;height:0;opacity:0}4.9%{top:36px;left:36px;width:0;height:0;opacity:0}5%{top:36px;left:36px;width:0;height:0;opacity:1}100%{top:0;left:0;width:72px;height:72px;opacity:0}}`;let Hi=class extends it{constructor(){super(...arguments),this.slug="upload",this.heading="Drag & Drop Files",this.breakpoint="600px",this.buttonLabel="Browse Files"}firstUpdated(){this.fileInputElement=this.shadowRoot.querySelector('[type="file"]'),this.upload=this.shadowRoot.querySelector(".upload"),["dragenter","dragover","dragleave","drop"].forEach((t=>{this.upload.addEventListener(t,(t=>(t=>{t.preventDefault(),t.stopPropagation()})(t)),!1)})),["dragenter","dragover"].forEach((t=>{this.upload.addEventListener(t,(()=>{this.over=!0}),!1)})),["dragleave","drop"].forEach((t=>{this.upload.addEventListener(t,(()=>{this.over=!1}),!1)})),this.isMobile(),this.hasDragDrop(),window.addEventListener("resize",(()=>{this.isMobile()})),this.upload.addEventListener("drop",(t=>this.handleDrop(t)),!1)}render(){return U`<div class="upload" part="upload"><kemet-icon icon="cloud-arrow-up" size="128"></kemet-icon><input type="file" id="${this.slug}" ?multiple="${this.multiple}" accept="${At(this.accept)?this.accept:null}" @change="${t=>this.handleChange(t)}"><h3 class="heading" part="heading">${this.heading}</h3><label class="button" part="button" for="${this.slug}">${this.buttonLabel}</label></div><div class="files" part="files"><slot></slot></div>`}handleChange(t){yt(this,"kemet-upload-change",{event:t,files:this.fileInputElement.files,fileElement:this.fileInputElement})}handleDrop(t){yt(this,"kemet-upload-change",{event:t,files:(null==t?void 0:t.dataTransfer.files)||[],fileElement:this.fileInputElement})}isMobile(){const t=window.matchMedia(`(max-width: ${this.breakpoint})`);this.mobile=t.matches}hasDragDrop(){"draggable"in document.createElement("span")?this.noDragDrop=!1:this.noDragDrop=!0}};Hi.styles=[qi],t([at({type:String})],Hi.prototype,"slug",void 0),t([at({type:String})],Hi.prototype,"accept",void 0),t([at({type:Boolean})],Hi.prototype,"multiple",void 0),t([at({type:Boolean,reflect:!0})],Hi.prototype,"over",void 0),t([at({type:String})],Hi.prototype,"heading",void 0),t([at({type:Boolean,reflect:!0})],Hi.prototype,"mobile",void 0),t([at({type:String,reflect:!0})],Hi.prototype,"breakpoint",void 0),t([at({type:Boolean,reflect:!0,attribute:"no-drag-drop"})],Hi.prototype,"noDragDrop",void 0),t([at({type:Number,attribute:"max-size"})],Hi.prototype,"maxSize",void 0),t([at({type:String,attribute:"button-label"})],Hi.prototype,"buttonLabel",void 0),t([lt()],Hi.prototype,"fileInputElement",void 0),t([lt()],Hi.prototype,"upload",void 0),Hi=t([rt("kemet-upload")],Hi);const Yi=(t,e=2)=>{if(0===t)return"0 Bytes";const o=e<0?0:e,i=Math.floor(Math.log(t)/Math.log(1024));return`${parseFloat((t/1024**i).toFixed(o))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`};let Vi=class extends it{constructor(){super(...arguments),this.loaded=0,this.size=0,this.percent=0}updated(){this.percent=this.calculatePercent()}render(){return U`<div class="percentage" part="percentage"><span>${this.percent}%</span></div><div><h3 part="filename">${this.name}</h3><span part="loaded">${Yi(this.loaded)} / ${Yi(this.size)}</span> ${this.message?U`<div class="message" part="message">${this.message}</div>`:null}</div><div class="indicator" part="indicator">${this.getStatusIcon()}</div>`}calculatePercent(){const t=Math.round(100*this.loaded/this.size);return t>100?100:t}getStatusIcon(){return"uploading"===this.status?U`<div class="lds-ripple"><div></div><div></div></div>`:"complete"===this.status?U`<kemet-icon icon="check-circle" size="48"></kemet-icon>`:"error"===this.status?U`<kemet-icon icon="exclamation-circle" size="48"></kemet-icon>`:null}};Vi.styles=[Ri,ji],t([at({type:String})],Vi.prototype,"name",void 0),t([at({type:Number})],Vi.prototype,"loaded",void 0),t([at({type:Number})],Vi.prototype,"size",void 0),t([at({type:String})],Vi.prototype,"type",void 0),t([at({type:String,reflect:!0})],Vi.prototype,"status",void 0),t([at({type:Number})],Vi.prototype,"percent",void 0),t([at({type:String})],Vi.prototype,"message",void 0),Vi=t([rt("kemet-upload-file")],Vi);let Fi=class extends it{constructor(){super(),this.breakpoint="767px"}firstUpdated(){this.steps=this.querySelectorAll("kemet-tracker-step"),this.isMobile(),window.addEventListener("resize",(()=>{this.isMobile()}))}render(){return U`<slot @slotchange="${()=>this.handleSlotChange()}"></slot>`}handleSlotChange(){this.total=this.steps.length,this.steps.forEach(((t,e)=>{t.step=e+1,t.step===this.total&&(t.last=!0)}))}isMobile(){const t=window.matchMedia(`(max-width: ${this.breakpoint})`);this.steps.forEach((e=>{e.mobile=t.matches}))}};Fi.styles=[a`:host{display:flex;justify-content:center;align-items:flex-start;width:100%}`],t([at({type:Number})],Fi.prototype,"total",void 0),t([at({type:String})],Fi.prototype,"breakpoint",void 0),t([lt()],Fi.prototype,"steps",void 0),Fi=t([rt("kemet-tracker")],Fi)}));
88
87
  //# sourceMappingURL=kemet-components.bundle.js.map