@loadsmart/miranda-wc 1.40.2 → 1.40.4
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.
- package/dist/{attention-93db8c08.js → attention-792e3c30.js} +2 -2
- package/dist/attention-792e3c30.js.map +1 -0
- package/dist/{bell-faca6930.js → bell-b942b5f5.js} +2 -2
- package/dist/bell-b942b5f5.js.map +1 -0
- package/dist/{check-29a89516.js → check-7bde0f42.js} +2 -2
- package/dist/check-7bde0f42.js.map +1 -0
- package/dist/{close-1e60da91.js → close-c86dd265.js} +2 -2
- package/dist/close-c86dd265.js.map +1 -0
- package/dist/components/layout/base-layout/base-layout.styles.d.ts.map +1 -1
- package/dist/{indeterminate-1199584a.js → indeterminate-a5c42d89.js} +2 -2
- package/dist/{indeterminate-1199584a.js.map → indeterminate-a5c42d89.js.map} +1 -1
- package/dist/{index-fd721cae.js → index-ae54393b.js} +122 -113
- package/dist/{index-fd721cae.js.map → index-ae54393b.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{info-circle-2ee53064.js → info-circle-3ab52d3b.js} +2 -2
- package/dist/{info-circle-2ee53064.js.map → info-circle-3ab52d3b.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attention-93db8c08.js.map +0 -1
- package/dist/bell-faca6930.js.map +0 -1
- package/dist/check-29a89516.js.map +0 -1
- package/dist/close-1e60da91.js.map +0 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
function t(t,e,o
|
|
1
|
+
function t(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)}function e(t,e,i,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(t,i):r?r.value=i:e.set(t,i),i}
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var
|
|
7
|
+
var i;"function"==typeof SuppressedError&&SuppressedError;const o=window,r=o.trustedTypes,n=r?r.createPolicy("lit-html",{createHTML:t=>t}):void 0,s="$lit$",a=`lit$${(Math.random()+"").slice(9)}$`,l="?"+a,c=`<${l}>`,d=document,h=()=>d.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,p=Array.isArray,g="[ \t\n\f\r]",b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,f=/>/g,y=RegExp(`>|${g}(?:([^\\s"'>=/]+)(${g}*=${g}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),v=/'/g,$=/"/g,w=/^(?:script|style|textarea|title)$/i,x=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),k=x(1),z=x(2),S=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),M=new WeakMap,W=d.createTreeWalker(d,129,null,!1);function A(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==n?n.createHTML(e):e}class j{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,d=0;const u=t.length-1,p=this.parts,[g,x]=((t,e)=>{const i=t.length-1,o=[];let r,n=2===e?"<svg>":"",l=b;for(let e=0;e<i;e++){const i=t[e];let d,h,u=-1,p=0;for(;p<i.length&&(l.lastIndex=p,h=l.exec(i),null!==h);)p=l.lastIndex,l===b?"!--"===h[1]?l=m:void 0!==h[1]?l=f:void 0!==h[2]?(w.test(h[2])&&(r=RegExp("</"+h[2],"g")),l=y):void 0!==h[3]&&(l=y):l===y?">"===h[0]?(l=null!=r?r:b,u=-1):void 0===h[1]?u=-2:(u=l.lastIndex-h[2].length,d=h[1],l=void 0===h[3]?y:'"'===h[3]?$:v):l===$||l===v?l=y:l===m||l===f?l=b:(l=y,r=void 0);const g=l===y&&t[e+1].startsWith("/>")?" ":"";n+=l===b?i+c:u>=0?(o.push(d),i.slice(0,u)+s+i.slice(u)+a+g):i+a+(-2===u?(o.push(void 0),e):g)}return[A(t,n+(t[i]||"<?>")+(2===e?"</svg>":"")),o]})(t,e);if(this.el=j.createElement(g,i),W.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=W.nextNode())&&p.length<u;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(s)||e.startsWith(a)){const i=x[d++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+s).split(a),e=/([.?@])?(.*)/.exec(i);p.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?P:"?"===e[1]?O:"@"===e[1]?D:T})}else p.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(w.test(o.tagName)){const t=o.textContent.split(a),e=t.length-1;if(e>0){o.textContent=r?r.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],h()),W.nextNode(),p.push({type:2,index:++n});o.append(t[e],h())}}}else if(8===o.nodeType)if(o.data===l)p.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(a,t+1));)p.push({type:7,index:n}),t+=a.length-1}n++}}static createElement(t,e){const i=d.createElement("template");return i.innerHTML=t,i}}function B(t,e,i=t,o){var r,n,s,a;if(e===S)return e;let l=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const c=u(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,i,o)),void 0!==o?(null!==(s=(a=i)._$Co)&&void 0!==s?s:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=B(t,l._$AS(t,e.values),l,o)),e}class E{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:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:d).importNode(i,!0);W.currentNode=r;let n=W.nextNode(),s=0,a=0,l=o[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new R(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new U(n,this,t)),this._$AV.push(e),l=o[++a]}s!==(null==l?void 0:l.index)&&(n=W.nextNode(),s++)}return W.currentNode=d,r}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class R{constructor(t,e,i,o){var r;this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}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=B(this,t,e),u(t)?t===C||null==t||""===t?(this._$AH!==C&&this._$AR(),this._$AH=C):t!==this._$AH&&t!==S&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>p(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!==C&&u(this._$AH)?this._$AA.nextSibling.data=t:this.$(d.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=j.createElement(A(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new E(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=M.get(t.strings);return void 0===e&&M.set(t.strings,e=new j(t)),e}T(t){p(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new R(this.k(h()),this.k(h()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.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 T{constructor(t,e,i,o,r){this.type=1,this._$AH=C,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=C}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let n=!1;if(void 0===r)t=B(this,t,e,0),n=!u(t)||t!==this._$AH&&t!==S,n&&(this._$AH=t);else{const o=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=B(this,o[i+s],e,s),a===S&&(a=this._$AH[s]),n||(n=!u(a)||a!==this._$AH[s]),a===C?t=C:t!==C&&(t+=(null!=a?a:"")+r[s+1]),this._$AH[s]=a}n&&!o&&this.j(t)}j(t){t===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class P extends T{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===C?void 0:t}}const _=r?r.emptyScript:"";class O extends T{constructor(){super(...arguments),this.type=4}j(t){t&&t!==C?this.element.setAttribute(this.name,_):this.element.removeAttribute(this.name)}}class D extends T{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=B(this,t,e,0))&&void 0!==i?i:C)===S)return;const o=this._$AH,r=t===C&&o!==C||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==C&&(o===C||r);r&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){B(this,t)}}const q=o.litHtmlPolyfillSupport;null==q||q(j,R),(null!==(i=o.litHtmlVersions)&&void 0!==i?i:o.litHtmlVersions=[]).push("2.7.5");const L=Symbol.for(""),N=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t._$litStatic$},F=(t,...e)=>({_$litStatic$:e.reduce(((e,i,o)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+t[o+1]),t[0]),r:L}),I=new Map,G=(t=>(e,...i)=>{const o=i.length;let r,n;const s=[],a=[];let l,c=0,d=!1;for(;c<o;){for(l=e[c];c<o&&void 0!==(n=i[c],r=N(n));)l+=r+e[++c],d=!0;c!==o&&a.push(n),s.push(l),c++}if(c===o&&s.push(e[o]),d){const t=s.join("$$lit$$");void 0===(e=I.get(t))&&(s.raw=s,I.set(t,e=s)),i=a}return t(e,...i)})(k),V=window,H=V.ShadowRoot&&(void 0===V.ShadyCSS||V.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,J=Symbol(),X=new WeakMap;
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/let Y=class{constructor(t,e,
|
|
12
|
+
*/let Y=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==J)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(H&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=X.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&X.set(e,t))}return t}toString(){return this.cssText}};const Z=t=>new Y("string"==typeof t?t:t+"",void 0,J),K=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new Y(i,t,J)},Q=H?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Z(e)})(t):t
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/;var tt;const et=window,
|
|
17
|
+
*/;var tt;const et=window,it=et.trustedTypes,ot=it?it.emptyScript:"",rt=et.reactiveElementPolyfillSupport,nt={toAttribute(t,e){switch(e){case Boolean:t=t?ot:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},st=(t,e)=>e!==t&&(e==e||t==t),at={attribute:!0,type:String,converter:nt,reflect:!1,hasChanged:st},lt="finalized";class ct extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=at){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||at}static finalize(){if(this.hasOwnProperty(lt))return!1;this[lt]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(Q(t))}else void 0!==t&&e.push(Q(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{H?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=V.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=at){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const n=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:nt).toAttribute(e,i.type);this._$El=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:nt;this._$El=r,this[r]=n.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||st)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
var dt,ht;ct[lt]=!0,ct.elementProperties=new Map,ct.elementStyles=[],ct.shadowRootOptions={mode:"open"},null==rt||rt({ReactiveElement:ct}),(null!==(tt=et.reactiveElementVersions)&&void 0!==tt?tt:et.reactiveElementVersions=[]).push("1.6.2");let ut=class extends ct{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const
|
|
23
|
+
var dt,ht;ct[lt]=!0,ct.elementProperties=new Map,ct.elementStyles=[],ct.shadowRootOptions={mode:"open"},null==rt||rt({ReactiveElement:ct}),(null!==(tt=et.reactiveElementVersions)&&void 0!==tt?tt:et.reactiveElementVersions=[]).push("1.6.2");let ut=class extends ct{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,r;const n=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let s=n._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;n._$litPart$=s=new R(e.insertBefore(h(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(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 S}};ut.finalized=!0,ut._$litElement$=!0,null===(dt=globalThis.litElementHydrateSupport)||void 0===dt||dt.call(globalThis,{LitElement:ut});const pt=globalThis.litElementPolyfillSupport;null==pt||pt({LitElement:ut}),(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.3.2");
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2018 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*/
|
|
29
|
-
const
|
|
29
|
+
const gt=t=>null!=t?t:C
|
|
30
30
|
/**
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
-
*/,
|
|
34
|
+
*/,bt=1,mt=t=>(...e)=>({_$litDirective$:t,values:e});let ft=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
|
|
35
35
|
/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2018 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/const yt=mt(class extends ft{constructor(t){var e;if(super(t),t.type!==gt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var o,i;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(o=this.nt)||void 0===o?void 0:o.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;this.it.forEach((t=>{t in e||(r.remove(t),this.it.delete(t))}));for(const t in e){const o=!!e[t];o===this.it.has(t)||(null===(i=this.nt)||void 0===i?void 0:i.has(t))||(o?(r.add(t),this.it.add(t)):(r.remove(t),this.it.delete(t)))}return S}}),vt=(t,e=["article","div","span"],o="div")=>class extends t{static get properties(){return{as:{type:String}}}connectedCallback(){var t;super.connectedCallback(),this.as=null!==(t=e.includes(this.as)?this.as:o)&&void 0!==t?t:"div"}get tag(){return F`${(t=>({_$litStatic$:t,r:L}))(this.as)}`}};var $t,wt;class xt extends ut{constructor(){super(...arguments),$t.set(this,void 0),this.getForm=()=>t(this,$t,"f"),wt.set(this,(()=>{if(this.hasAttribute("form")){const t=this.getRootNode(),o=this.getAttribute("form");e(this,$t,t.getElementById(o),"f")}else e(this,$t,this.closest("form"),"f")}))}static get properties(){return{form:{type:String,reflect:!0}}}updated(e){super.updated(e),(e.has("form")||null==t(this,$t,"f"))&&t(this,wt,"f").call(this)}}function kt(t){return t&&t.i&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}$t=new WeakMap,wt=new WeakMap;var zt,St,Ct={};Ct.LoadsmartTheme={"brand-color-brand":"20, 214, 77","brand-color-brand-accent-1":"0, 215, 215","brand-color-brand-accent-2":"132, 241, 30","border-radius-none":"0px","border-radius-s":"4px","border-radius-m":"8px","border-radius-l":"16px","border-radius-circle":"50%","border-none":0,"border-thin":"1px","border-medium":"2px","border-thick":"4px","color-background-primary":"252, 252, 255","color-background-secondary":"248, 249, 251","color-background-tertiary":"230, 237, 242","color-background-highlight":"202, 219, 221","color-background-inverted":"32, 41, 49","color-background-secondary-inverted":"61, 74, 85","color-border":"193, 206, 217","color-divider":"230, 237, 242","color-brand":"20, 214, 77","color-brand-accent-1":"0, 215, 215","color-brand-accent-2":"132, 241, 30","color-primary-20":"202, 219, 221","color-primary-60":"0, 84, 84","color-primary-100":"0, 51, 51","color-accent-20":"229, 245, 255","color-accent-60":"0, 98, 159","color-accent-100":"15, 66, 97","color-neutral-0":"252, 252, 255","color-neutral-10":"248, 249, 251","color-neutral-20":"230, 237, 242","color-neutral-40":"193, 206, 217","color-neutral-60":"94, 118, 138","color-neutral-80":"92, 106, 118","color-neutral-90":"61, 74, 85","color-neutral-100":"32, 41, 49","color-success-20":"227, 247, 239","color-success-60":"3, 124, 94","color-success-100":"0, 94, 71","color-danger-20":"255, 233, 230","color-danger-60":"186, 27, 27","color-danger-100":"104, 0, 3","color-warning-20":"255, 243, 214","color-warning-60":"248, 182, 14","color-warning-100":"102, 63, 25","color-text-primary":"32, 41, 49","color-text-secondary":"61, 74, 85","color-text-tertiary":"92, 106, 118","color-text-placeholder":"94, 118, 138","color-text-disabled":"193, 206, 217","color-text-inverted":"252, 252, 255","color-text-secondary-inverted":"193, 206, 217","color-text-error":"186, 27, 27","color-text-highlight":"0, 98, 159","color-text-link":"0, 98, 159","font-family-default":"'Manrope', sans-serif","font-family-title":"'PlusJakartaSans', 'Manrope', sans-serif","font-size-1":"0.625rem","font-size-2":"0.75rem","font-size-3":"0.875rem","font-size-4":"1rem","font-size-5":"1.25rem","font-size-6":"1.625rem","font-size-7":"2.375rem","font-size-8":"3rem","font-size-9":"3.625rem","font-weight-regular":500,"font-weight-medium":600,"font-weight-bold":700,"line-height-1":"100%","line-height-2":"125%","line-height-3":"130%","line-height-4":"140%","line-height-5":"150%","line-height-6":"180%","global-height-small":"1.75rem","global-height-default":"2.5rem","global-height-large":"3rem","opacity-0":"0%","opacity-20":"20%","opacity-40":"40%","opacity-60":"60%","opacity-100":"100%","elevation-1":"0px 0px 2px rgba(94, 118, 138, 0.1), 0px 1px 6px 2px rgba(61, 74, 85, 0.15)","elevation-2":"0px 1px 3px rgba(94, 118, 138, 0.2), 0px 4px 8px 3px rgba(61, 74, 85, 0.15)","elevation-3":"0px 0px 4px rgba(94, 118, 138, 0.2), 0px 6px 12px 6px rgba(61, 74, 85, 0.15)","elevation-4":"0px 5px 6px 4px rgba(94, 118, 138, 0.2), 0px 8px 10px rgba(61, 74, 85, 0.1)","glow-primary":"0.0px 0.0px 4.0px 0px rgb(3, 124, 94, .5)","glow-warning":"0.0px 0.0px 4.0px 0px rgba(255, 206, 79, 1.0)","spacing-1":"4px","spacing-2":"8px","spacing-3":"12px","spacing-4":"16px","spacing-5":"20px","spacing-6":"24px","spacing-8":"32px","spacing-10":"40px","spacing-12":"48px","spacing-14":"56px","spacing-16":"64px","spacing-20":"80px","spacing-30":"120px","spacing-0-5":"2px","platform-font-default":"'Manrope', sans-serif","platform-font-title":"'PlusJakartaSans', 'Manrope', sans-serif"};var Mt=Ct;function Wt(t,e){return t.filter((function(t){return t.startsWith(e)}))}function At(t,e){return t.filter((function(t){return!t.startsWith(e)}))}"function"==typeof SuppressedError&&SuppressedError;var jt=At(At(Object.keys(Mt.LoadsmartTheme),"brand-"),"platform-");function Bt(t){return Mt.LoadsmartTheme[t]}function Et(t){var e=Bt(t);return null==e?e:"--m-".concat(t)}function Rt(t){return Z(zt(t))}function Tt(t,e=1){return Z(zt(t,e))}Wt(jt,"color-background-"),Wt(jt,"border-radius-"),Wt(jt,"border-"),Wt(jt,"color-"),Wt(jt,"elevation-"),Wt(jt,"font-family-"),Wt(jt,"font-size-"),Wt(jt,"font-weight-"),Wt(jt,"global-"),Wt(jt,"glow-"),Wt(jt,"line-height-"),Wt(jt,"opacity-"),function(t,e,o){if(o||2===arguments.length)for(var i,r=0,n=e.length;r<n;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);t.concat(i||Array.prototype.slice.call(e))}(["none"],Wt(jt,"spacing-"),!0),St=Bt,zt=function(t,e){var o=Bt(t);return null==o?"":t.startsWith("color-")?"rgba(var(".concat(Et(t),", ").concat(o,"), ").concat(null!=e?e:1,")"):"var(".concat(Et(t),", ").concat(o,")")};var Pt=function(t){return null==t?[]:Array.isArray(t)?t:[t]},_t=kt(Pt);function Ot(t){return Z(`\n\t\tmargin-inline-start: ${t}\n\t`)}function Dt(t){return Z(`\n\t\t${Ot(t)};\n\t\t${function(t){return Z(`\n\t\tmargin-inline-end: ${t}\n\t`)}(t)}\n\t`)}function Ut(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tmargin-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tmargin-block-end: ${t}\n\t`)}(t)}\n\t`)}function qt(t){return Z(`\n\t\t${Dt(t)};\n\t\t${Ut(t)}\n\t`)}function Lt(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tpadding-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tpadding-inline-start: ${t}\n\t`)}(t)}\n\t`)}function Nt(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tpadding-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tpadding-block-end: ${t}\n\t`)}(t)}\n\t`)}function Ft(t){return Z(`\n\t\t${Lt(t)};\n\t\t${Nt(t)}\n\t`)}const It={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function Gt(t){const e=_t(t).map((t=>function(t){const e={...It,...t};return Z(`${e.property} ${e.duration} ${e.easing} ${e.delay}`)}(t))).join(", ");return Z(`\n\t\ttransition: ${e}\n\t`)}function Vt(t){const e=Z("\n\t\tfont-style: normal;\n\t\tfont-stretch: normal;\n\t\tletter-spacing: normal;\n\n\t\tfont-synthesis: none;\n\t\ttext-rendering: optimizeLegibility;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\t-webkit-text-size-adjust: 100%;\n\t");return Z(`${e}\n${function(t){switch(t){case"hero-lg-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-9")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"hero-lg":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-9")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"hero-md-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-8")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"hero-md":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-8")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"hero-sm-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-7")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"hero-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-7")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"heading-lg-bold":return`\n\t\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\t\tfont-size: ${Rt("font-size-6")};\n\t\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t\t`;case"heading-lg":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-6")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-5")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-5")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-4")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-4")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"body-lg-bold":return`\n\t\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\t\tfont-size: ${Rt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t\t`;case"body-lg":return`\n\t\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\t\tfont-size: ${Rt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t\t`;case"body-md":case"number-md":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-md-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm":case"number-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-4")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-4")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-4")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-4")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-4")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;case"table-header-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-medium")}\n\t\t\t`;case"chips-md":return`\n\t\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-1")};\n\t\t\t\tfont-weight: ${Rt("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;default:return""}}(t)}`)}function Ht(t,e=""){return Z(_t(t).map((t=>[`${t}.is-disabled`,`${t}:disabled`].map((t=>[t,e].join(" "))).join(", "))).join(", "))}const Jt={active:function(t){return Z(_t(t).map((t=>`${t}:not(.is-disabled, :disabled):active`)).join(", "))},focus:function(t){return Z(_t(t).map((t=>`${t}:not(.is-disabled, :disabled):focus,\n\t\t\t\t\t${t}:not(.is-disabled, :disabled):focus-visible,\n\t\t\t\t${t}:not(.is-disabled, :disabled):focus-within,\n\t\t\t\t${t}:not(.is-disabled, :disabled).is-focused`)).join(", "))},hover:function(t){return Z(_t(t).map((t=>`${t}:not(.is-disabled, :disabled):hover`)).join(", "))}};function Xt(){return K`
|
|
39
|
+
*/const yt=mt(class extends ft{constructor(t){var e;if(super(t),t.type!==bt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;this.it.forEach((t=>{t in e||(r.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(r.add(t),this.it.add(t)):(r.remove(t),this.it.delete(t)))}return S}}),vt=(t,e=["article","div","span"],i="div")=>class extends t{static get properties(){return{as:{type:String}}}connectedCallback(){var t;super.connectedCallback(),this.as=null!==(t=e.includes(this.as)?this.as:i)&&void 0!==t?t:"div"}get tag(){return F`${(t=>({_$litStatic$:t,r:L}))(this.as)}`}};var $t,wt;class xt extends ut{constructor(){super(...arguments),$t.set(this,void 0),this.getForm=()=>t(this,$t,"f"),wt.set(this,(()=>{if(this.hasAttribute("form")){const t=this.getRootNode(),i=this.getAttribute("form");e(this,$t,t.getElementById(i),"f")}else e(this,$t,this.closest("form"),"f")}))}static get properties(){return{form:{type:String,reflect:!0}}}updated(e){super.updated(e),(e.has("form")||null==t(this,$t,"f"))&&t(this,wt,"f").call(this)}}function kt(t){return t&&t.i&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}$t=new WeakMap,wt=new WeakMap;var zt,St,Ct={};Ct.LoadsmartTheme={"brand-color-brand":"20, 214, 77","brand-color-brand-accent-1":"0, 215, 215","brand-color-brand-accent-2":"132, 241, 30","border-radius-none":"0px","border-radius-s":"4px","border-radius-m":"8px","border-radius-l":"16px","border-radius-circle":"50%","border-none":0,"border-thin":"1px","border-medium":"2px","border-thick":"4px","color-background-primary":"252, 252, 255","color-background-secondary":"248, 249, 251","color-background-tertiary":"230, 237, 242","color-background-highlight":"202, 219, 221","color-background-inverted":"32, 41, 49","color-background-secondary-inverted":"61, 74, 85","color-border":"193, 206, 217","color-divider":"230, 237, 242","color-brand":"20, 214, 77","color-brand-accent-1":"0, 215, 215","color-brand-accent-2":"132, 241, 30","color-primary-20":"202, 219, 221","color-primary-60":"0, 84, 84","color-primary-100":"0, 51, 51","color-accent-20":"229, 245, 255","color-accent-60":"0, 98, 159","color-accent-100":"15, 66, 97","color-neutral-0":"252, 252, 255","color-neutral-10":"248, 249, 251","color-neutral-20":"230, 237, 242","color-neutral-40":"193, 206, 217","color-neutral-60":"94, 118, 138","color-neutral-80":"92, 106, 118","color-neutral-90":"61, 74, 85","color-neutral-100":"32, 41, 49","color-success-20":"227, 247, 239","color-success-60":"3, 124, 94","color-success-100":"0, 94, 71","color-danger-20":"255, 233, 230","color-danger-60":"186, 27, 27","color-danger-100":"104, 0, 3","color-warning-20":"255, 243, 214","color-warning-60":"248, 182, 14","color-warning-100":"102, 63, 25","color-text-primary":"32, 41, 49","color-text-secondary":"61, 74, 85","color-text-tertiary":"92, 106, 118","color-text-placeholder":"94, 118, 138","color-text-disabled":"193, 206, 217","color-text-inverted":"252, 252, 255","color-text-secondary-inverted":"193, 206, 217","color-text-error":"186, 27, 27","color-text-highlight":"0, 98, 159","color-text-link":"0, 98, 159","font-family-default":"'Manrope', sans-serif","font-family-title":"'PlusJakartaSans', 'Manrope', sans-serif","font-size-1":"0.625rem","font-size-2":"0.75rem","font-size-3":"0.875rem","font-size-4":"1rem","font-size-5":"1.25rem","font-size-6":"1.625rem","font-size-7":"2.375rem","font-size-8":"3rem","font-size-9":"3.625rem","font-weight-regular":500,"font-weight-medium":600,"font-weight-bold":700,"line-height-1":"100%","line-height-2":"125%","line-height-3":"130%","line-height-4":"140%","line-height-5":"150%","line-height-6":"180%","global-height-small":"1.75rem","global-height-default":"2.5rem","global-height-large":"3rem","opacity-0":"0%","opacity-20":"20%","opacity-40":"40%","opacity-60":"60%","opacity-100":"100%","elevation-1":"0px 0px 2px rgba(94, 118, 138, 0.1), 0px 1px 6px 2px rgba(61, 74, 85, 0.15)","elevation-2":"0px 1px 3px rgba(94, 118, 138, 0.2), 0px 4px 8px 3px rgba(61, 74, 85, 0.15)","elevation-3":"0px 0px 4px rgba(94, 118, 138, 0.2), 0px 6px 12px 6px rgba(61, 74, 85, 0.15)","elevation-4":"0px 5px 6px 4px rgba(94, 118, 138, 0.2), 0px 8px 10px rgba(61, 74, 85, 0.1)","glow-primary":"0.0px 0.0px 4.0px 0px rgb(3, 124, 94, .5)","glow-warning":"0.0px 0.0px 4.0px 0px rgba(255, 206, 79, 1.0)","spacing-1":"4px","spacing-2":"8px","spacing-3":"12px","spacing-4":"16px","spacing-5":"20px","spacing-6":"24px","spacing-8":"32px","spacing-10":"40px","spacing-12":"48px","spacing-14":"56px","spacing-16":"64px","spacing-20":"80px","spacing-30":"120px","spacing-0-5":"2px","platform-font-default":"'Manrope', sans-serif","platform-font-title":"'PlusJakartaSans', 'Manrope', sans-serif"};var Mt=Ct;function Wt(t,e){return t.filter((function(t){return t.startsWith(e)}))}function At(t,e){return t.filter((function(t){return!t.startsWith(e)}))}"function"==typeof SuppressedError&&SuppressedError;var jt=At(At(Object.keys(Mt.LoadsmartTheme),"brand-"),"platform-");function Bt(t){return Mt.LoadsmartTheme[t]}function Et(t){var e=Bt(t);return null==e?e:"--m-".concat(t)}function Rt(t){return Z(zt(t))}function Tt(t,e=1){return Z(zt(t,e))}Wt(jt,"color-background-"),Wt(jt,"border-radius-"),Wt(jt,"border-"),Wt(jt,"color-"),Wt(jt,"elevation-"),Wt(jt,"font-family-"),Wt(jt,"font-size-"),Wt(jt,"font-weight-"),Wt(jt,"global-"),Wt(jt,"glow-"),Wt(jt,"line-height-"),Wt(jt,"opacity-"),function(t,e,i){if(i||2===arguments.length)for(var o,r=0,n=e.length;r<n;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);t.concat(o||Array.prototype.slice.call(e))}(["none"],Wt(jt,"spacing-"),!0),St=Bt,zt=function(t,e){var i=Bt(t);return null==i?"":t.startsWith("color-")?"rgba(var(".concat(Et(t),", ").concat(i,"), ").concat(null!=e?e:1,")"):"var(".concat(Et(t),", ").concat(i,")")};var Pt=function(t){return null==t?[]:Array.isArray(t)?t:[t]},_t=kt(Pt);function Ot(t){return Z(`\n\t\tmargin-inline-start: ${t}\n\t`)}function Dt(t){return Z(`\n\t\t${Ot(t)};\n\t\t${function(t){return Z(`\n\t\tmargin-inline-end: ${t}\n\t`)}(t)}\n\t`)}function Ut(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tmargin-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tmargin-block-end: ${t}\n\t`)}(t)}\n\t`)}function qt(t){return Z(`\n\t\t${Dt(t)};\n\t\t${Ut(t)}\n\t`)}function Lt(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tpadding-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tpadding-inline-start: ${t}\n\t`)}(t)}\n\t`)}function Nt(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tpadding-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tpadding-block-end: ${t}\n\t`)}(t)}\n\t`)}function Ft(t){return Z(`\n\t\t${Lt(t)};\n\t\t${Nt(t)}\n\t`)}const It={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function Gt(t){const e=_t(t).map((t=>function(t){const e={...It,...t};return Z(`${e.property} ${e.duration} ${e.easing} ${e.delay}`)}(t))).join(", ");return Z(`\n\t\ttransition: ${e}\n\t`)}function Vt(t){const e=Z("\n\t\tfont-style: normal;\n\t\tfont-stretch: normal;\n\t\tletter-spacing: normal;\n\n\t\tfont-synthesis: none;\n\t\ttext-rendering: optimizeLegibility;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\t-webkit-text-size-adjust: 100%;\n\t");return Z(`${e}\n${function(t){switch(t){case"hero-lg-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-9")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"hero-lg":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-9")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"hero-md-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-8")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"hero-md":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-8")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"hero-sm-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-7")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"hero-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\tfont-size: ${Rt("font-size-7")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"heading-lg-bold":return`\n\t\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\t\tfont-size: ${Rt("font-size-6")};\n\t\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t\t`;case"heading-lg":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-6")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-5")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-5")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-4")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-title")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-4")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"body-lg-bold":return`\n\t\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\t\tfont-size: ${Rt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t\t`;case"body-lg":return`\n\t\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\t\tline-height: ${Rt("line-height-6")};\n\t\t\t\t\tfont-size: ${Rt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t\t`;case"body-md":case"number-md":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-md-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-5")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm":case"number-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-4")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-4")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-regular")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm-bold":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-4")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-4")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-4")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-3")};\n\t\t\t\tfont-weight: ${Rt("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;case"table-header-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\tfont-weight: ${Rt("font-weight-medium")}\n\t\t\t`;case"chips-md":return`\n\t\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\t\tfont-size: ${Rt("font-size-2")};\n\t\t\t\t\tfont-weight: ${Rt("font-weight-bold")}\n\t\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${Rt("font-family-default")};\n\t\t\t\tline-height: ${Rt("line-height-1")};\n\t\t\t\tfont-size: ${Rt("font-size-1")};\n\t\t\t\tfont-weight: ${Rt("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;default:return""}}(t)}`)}function Ht(t,e=""){return Z(_t(t).map((t=>[`${t}.is-disabled`,`${t}:disabled`].map((t=>[t,e].join(" "))).join(", "))).join(", "))}const Jt={active:function(t){return Z(_t(t).map((t=>`${t}:not(.is-disabled, :disabled):active`)).join(", "))},focus:function(t){return Z(_t(t).map((t=>`${t}:not(.is-disabled, :disabled):focus,\n\t\t\t\t\t${t}:not(.is-disabled, :disabled):focus-visible,\n\t\t\t\t${t}:not(.is-disabled, :disabled):focus-within,\n\t\t\t\t${t}:not(.is-disabled, :disabled).is-focused`)).join(", "))},hover:function(t){return Z(_t(t).map((t=>`${t}:not(.is-disabled, :disabled):hover`)).join(", "))}};function Xt(){return K`
|
|
40
40
|
:host {
|
|
41
41
|
--m-button-background-color: transparent;
|
|
42
42
|
--m-button-base-size: ${Rt("global-height-default")};
|
|
@@ -138,18 +138,18 @@ const bt=t=>null!=t?t:C
|
|
|
138
138
|
slot[name='trailing']::slotted(span) {
|
|
139
139
|
justify-content: center;
|
|
140
140
|
}
|
|
141
|
-
`}var Yt,Zt,Kt,Qt,te,ee,
|
|
141
|
+
`}var Yt,Zt,Kt,Qt,te,ee,ie;class oe extends(vt(xt,["button","a"],"button")){static get properties(){return{...xt.properties,role:{type:String,reflect:!0},loading:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},variant:{type:String,reflect:!0},size:{type:String,reflect:!0},tabindex:{type:String},type:{type:String},href:{type:String},target:{type:String},download:{type:String}}}constructor(){super(),Yt.add(this),Kt.set(this,(()=>Boolean(this.disabled)||Boolean(this.loading))),Qt.set(this,(()=>{const e=t(this,Kt,"f").call(this);this.setAttribute("aria-disabled",String(e))})),te.set(this,(()=>{var e;return t(this,Yt,"m",ie).call(this)?this.disabled?"-1":null!=this.tabindex?this.tabindex:"0":null!==(e=this.tabindex)&&void 0!==e?e:void 0})),ee.set(this,(t=>{var e,i;if(this.disabled||this.loading)return t.preventDefault(),void t.stopPropagation();"submit"===this.type&&(null===(e=this.getForm())||void 0===e||e.requestSubmit()),"reset"===this.type&&(null===(i=this.getForm())||void 0===i||i.reset())})),this.as="button",this.disabled=!1,this.loading=!1,this.size="default",this.type="button",this.variant="secondary",this.target="_self"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.addEventListener("click",t(this,ee,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,ee,"f"))}update(e){super.update(e),e.has("href")&&(this.as=t(this,Yt,"m",ie).call(this)?"a":"button",this.role=t(this,Yt,"m",ie).call(this)?"link":"button")}updated(e){super.updated(e),(e.has("disabled")||e.has("loading"))&&t(this,Qt,"f").call(this)}render(){const e=t(this,Yt,"m",ie).call(this);return G`
|
|
142
142
|
<${this.tag}
|
|
143
143
|
class=${yt({button:!0,"-primary":"primary"===this.variant,"-secondary":"secondary"===this.variant,"-tertiary":"tertiary"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-icon":"icon"===this.variant,"-icon-secondary":"icon-secondary"===this.variant,"-small":"small"===this.size,"-default":"default"===this.size,"-large":"large"===this.size,"is-loading":Boolean(this.loading),"is-disabled":t(this,Kt,"f").call(this)})}
|
|
144
|
-
type=${
|
|
144
|
+
type=${gt(e?void 0:this.type)}
|
|
145
145
|
?disabled="${t(this,Kt,"f").call(this)}"
|
|
146
146
|
aria-disabled=${this.disabled?"true":"false"}
|
|
147
|
-
role=${
|
|
148
|
-
tabindex=${
|
|
149
|
-
href=${
|
|
150
|
-
target=${
|
|
151
|
-
download=${
|
|
152
|
-
rel=${
|
|
147
|
+
role=${gt(e?"link":"button")}
|
|
148
|
+
tabindex=${gt(t(this,te,"f").call(this))}
|
|
149
|
+
href=${gt(e?this.href:void 0)}
|
|
150
|
+
target=${gt(e?this.target:void 0)}
|
|
151
|
+
download=${gt(e?this.download:void 0)}
|
|
152
|
+
rel=${gt(e&&this.target?"noreferrer noopener":void 0)}
|
|
153
153
|
>
|
|
154
154
|
<!-- TODO: Replace this with the loading dots component as soon as it is ready. -->
|
|
155
155
|
${this.loading&&!["icon","icon-secondary"].includes(this.variant)?G`<span class="loader">●●●</span>`:C}
|
|
@@ -157,7 +157,7 @@ const bt=t=>null!=t?t:C
|
|
|
157
157
|
<slot></slot>
|
|
158
158
|
<slot name="trailing"></slot>
|
|
159
159
|
</${this.tag}>
|
|
160
|
-
`}focus(e){var
|
|
160
|
+
`}focus(e){var i;null===(i=t(this,Yt,"a",Zt))||void 0===i||i.focus(e)}}Kt=new WeakMap,Qt=new WeakMap,te=new WeakMap,ee=new WeakMap,Yt=new WeakSet,Zt=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(".button"))&&void 0!==e?e:null},ie=function(){return Boolean(this.href)},oe.styles=[[Xt(),K`
|
|
161
161
|
.button.is-loading:not(.-icon, .-icon-secondary) *:not(.loader) {
|
|
162
162
|
visibility: hidden;
|
|
163
163
|
}
|
|
@@ -404,7 +404,7 @@ const bt=t=>null!=t?t:C
|
|
|
404
404
|
|
|
405
405
|
pointer-events: none;
|
|
406
406
|
}
|
|
407
|
-
`]],window.customElements.define("m-button",
|
|
407
|
+
`]],window.customElements.define("m-button",oe);class re extends oe{constructor(){super(),this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","primary-action")}}window.customElements.define("m-banner-action-primary",re);class ne extends oe{constructor(){super(),this.variant="tertiary",this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","secondary-action")}}window.customElements.define("m-banner-action-secondary",ne);class se extends ut{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}render(){return k`
|
|
408
408
|
<slot name="secondary-action"></slot>
|
|
409
409
|
<slot name="primary-action"></slot>
|
|
410
410
|
`}}se.styles=[K`
|
|
@@ -423,7 +423,7 @@ const bt=t=>null!=t?t:C
|
|
|
423
423
|
${Vt("body-md-bold")};
|
|
424
424
|
color: ${Tt("color-text-secondary")};
|
|
425
425
|
}
|
|
426
|
-
`],window.customElements.define("m-banner-title",ce);class de extends ut{constructor(){super(...arguments),this.emit=(t,e)=>{const
|
|
426
|
+
`],window.customElements.define("m-banner-title",ce);class de extends ut{constructor(){super(...arguments),this.emit=(t,e)=>{const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,...e});this.dispatchEvent(i)},this.reemit=t=>{!function(t,e){!e.bubbles||t.shadowRoot&&!e.composed||e.stopPropagation();const i=Reflect.construct(e.constructor,[e.type,e]),o=t.dispatchEvent(i);o||e.preventDefault()}(this,t)}}}var he={BASE_PIXELS:16,toRem:function(t,e=16){return parseInt(String(t),10)/e+"rem"}},ue=kt(he.toRem);function pe(t,e){return Z(ue(t,e))}const ge=new Map([["alert-circle",()=>import("./attention-792e3c30.js")],["attention",()=>import("./attention-792e3c30.js")],["bell",()=>import("./bell-b942b5f5.js")],["check",()=>import("./check-7bde0f42.js")],["close",()=>import("./close-c86dd265.js")],["indeterminate",()=>import("./indeterminate-a5c42d89.js")],["info-circle",()=>import("./info-circle-3ab52d3b.js")]]);var be,me,fe,ye;ge.keys();class ve extends de{static get properties(){return{name:{type:String},size:{type:String},color:{type:String},loading:{state:!0}}}constructor(){super(),this.icon=null,be.set(this,(async()=>{ge.has(this.name);try{this.icon=null;const{default:t}=await ge.get(this.name)();this.icon=t}catch{}finally{this.requestUpdate()}})),this.icon=null}connectedCallback(){super.connectedCallback(),t(this,be,"f").call(this)}update(e){super.update(e),e.has("name")&&t(this,be,"f").call(this)}updated(t){super.updated(t),t.has("size")&&null!=this.size&&this.style.setProperty("--m-icon-size",`${parseInt(String(this.size),10)||16}px`),t.has("color")&&null!=this.color&&this.style.setProperty("--m-icon-color",zt(this.color))}render(){return null!=this.name&&ge.has(this.name)&&null!=this.icon?this.icon:C}}be=new WeakMap,ve.styles=[[K`
|
|
427
427
|
:host {
|
|
428
428
|
--m-icon-size: 16px;
|
|
429
429
|
--m-icon-color: ${Tt("color-text-primary")};
|
|
@@ -448,15 +448,15 @@ const bt=t=>null!=t?t:C
|
|
|
448
448
|
`]],window.customElements.define("m-icon",ve);class $e extends de{static get properties(){return{controls:{type:String},disabled:{type:Boolean},inverted:{type:Boolean},label:{type:String},size:{type:String}}}constructor(){super(),me.add(this),ye.set(this,(()=>{this.emit("m-close")})),this.disabled=!1,this.inverted=!1,this.label="Close",this.size="default"}render(){var e;return k`
|
|
449
449
|
<button
|
|
450
450
|
type="button"
|
|
451
|
-
aria-controls="${
|
|
452
|
-
aria-label="${
|
|
451
|
+
aria-controls="${gt(this.controls)}"
|
|
452
|
+
aria-label="${gt(this.label)}"
|
|
453
453
|
class=${yt({"close-button":!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"-inverted":null!==(e=this.inverted)&&void 0!==e&&e})}
|
|
454
454
|
?disabled="${this.disabled}"
|
|
455
455
|
@click=${t(this,ye,"f")}
|
|
456
456
|
>
|
|
457
457
|
<m-icon name="close"></m-icon>
|
|
458
458
|
</button>
|
|
459
|
-
`}focus(e){var
|
|
459
|
+
`}focus(e){var i;null===(i=t(this,me,"a",fe))||void 0===i||i.focus(e)}}ye=new WeakMap,me=new WeakSet,fe=function(){var t;return null!==(t=this.renderRoot.querySelector("button"))&&void 0!==t?t:null},$e.styles=[K`
|
|
460
460
|
:host {
|
|
461
461
|
--m-close-button-color: ${Tt("color-text-primary")};
|
|
462
462
|
--m-close-button-outline-color: ${Tt("color-primary-100")};
|
|
@@ -538,7 +538,7 @@ const bt=t=>null!=t?t:C
|
|
|
538
538
|
* Copyright 2018 Google LLC
|
|
539
539
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
540
540
|
*/
|
|
541
|
-
const we="important",xe=" !"+we,ke=mt(class extends ft{constructor(t){var e;if(super(t),t.type!==
|
|
541
|
+
const we="important",xe=" !"+we,ke=mt(class extends ft{constructor(t){var e;if(super(t),t.type!==bt||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const o=t[i];return null==o?e:e+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ut){this.ut=new Set;for(const t in e)this.ut.add(t);return this.render(e)}this.ut.forEach((t=>{null==e[t]&&(this.ut.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const o=e[t];if(null!=o){this.ut.add(t);const e="string"==typeof o&&o.endsWith(xe);t.includes("-")||e?i.setProperty(t,e?o.slice(0,-11):o,e?we:""):i[t]=o}}return S}});class ze extends(vt(ut,["h1","h2","h3","h4","h5","h6","p","span"],"span")){static get properties(){return{color:{type:String},ellipsized:{type:Boolean,reflect:!0},variant:{type:String,reflect:!0}}}constructor(){super(),this.as="span",this.color="color-text-primary",this.ellipsized=!1,this.variant="body-md"}render(){return G`
|
|
542
542
|
<${this.tag}
|
|
543
543
|
class=${yt({"m-text":!0,"-body-lg-bold":"body-lg-bold"===this.variant,"-body-lg":"body-lg"===this.variant,"-body-md-bold-underline":"body-md-bold-underline"===this.variant,"-body-md-bold":"body-md-bold"===this.variant,"-body-md-underline":"body-md-underline"===this.variant,"-body-md":"body-md"===this.variant,"-body-sm-bold-underline":"body-sm-bold-underline"===this.variant,"-body-sm-bold":"body-sm-bold"===this.variant,"-body-sm-underline":"body-sm-underline"===this.variant,"-body-sm":"body-sm"===this.variant,"-button-lg":"button-lg"===this.variant,"-button-md":"button-md"===this.variant,"-button-sm":"button-sm"===this.variant,"-chips-md":"chips-md"===this.variant,"-chips-sm":"chips-sm"===this.variant,"-heading-lg-bold":"heading-lg-bold"===this.variant,"-heading-lg":"heading-lg"===this.variant,"-heading-md-bold":"heading-md-bold"===this.variant,"-heading-md":"heading-md"===this.variant,"-heading-sm-bold":"heading-sm-bold"===this.variant,"-heading-sm":"heading-sm"===this.variant,"-hero-lg-bold":"hero-lg-bold"===this.variant,"-hero-lg":"hero-lg"===this.variant,"-hero-md-bold":"hero-md-bold"===this.variant,"-hero-md":"hero-md"===this.variant,"-hero-sm-bold":"hero-sm-bold"===this.variant,"-hero-sm":"hero-sm"===this.variant,"-number-md":"number-md"===this.variant,"-number-sm":"number-sm"===this.variant,"-table-header-md":"table-header-md"===this.variant,"-table-header-sm":"table-header-sm"===this.variant,"-ellipsized":Boolean(this.ellipsized)})}
|
|
544
544
|
style=${ke({"--m-text-color":zt(this.color)})}
|
|
@@ -695,7 +695,7 @@ const we="important",xe=" !"+we,ke=mt(class extends ft{constructor(t){var e;if(s
|
|
|
695
695
|
white-space: nowrap;
|
|
696
696
|
max-width: var(--m-text-max-width);
|
|
697
697
|
}
|
|
698
|
-
`],window.customElements.define("m-text",ze);class Me extends de{static get properties(){return{variant:{type:String},dismissible:{type:Boolean},dismissed:{type:Boolean,reflect:!0}}}constructor(){super(),Se.set(this,void 0),Ce.set(this,(()=>{this.dismissed=!0,this.emit("m-dismiss",{composed:!0})})),this.variant="neutral",this.dismissible=!1,this.dismissed=!1}get primaryAction(){return null==t(this,Se,"f")&&e(this,Se,this.querySelector("m-banner-action-primary"),"f"),t(this,Se,"f")}updated(t){super.updated(t),t.has("variant")&&null!=this.primaryAction&&(this.primaryAction.variant=function(t){switch(t){case"warning":return"warning";case"danger":return"danger";default:return"primary"}}(this.variant))}render(){if(this.dismissed)return C;const e=null!=this.querySelector("*[slot='description']"),
|
|
698
|
+
`],window.customElements.define("m-text",ze);class Me extends de{static get properties(){return{variant:{type:String},dismissible:{type:Boolean},dismissed:{type:Boolean,reflect:!0}}}constructor(){super(),Se.set(this,void 0),Ce.set(this,(()=>{this.dismissed=!0,this.emit("m-dismiss",{composed:!0})})),this.variant="neutral",this.dismissible=!1,this.dismissed=!1}get primaryAction(){return null==t(this,Se,"f")&&e(this,Se,this.querySelector("m-banner-action-primary"),"f"),t(this,Se,"f")}updated(t){super.updated(t),t.has("variant")&&null!=this.primaryAction&&(this.primaryAction.variant=function(t){switch(t){case"warning":return"warning";case"danger":return"danger";default:return"primary"}}(this.variant))}render(){if(this.dismissed)return C;const e=null!=this.querySelector("*[slot='description']"),i=null!=this.querySelector("*[slot='actions']"),o=k`
|
|
699
699
|
<m-close-button
|
|
700
700
|
id="close"
|
|
701
701
|
label="Dismiss"
|
|
@@ -713,7 +713,7 @@ const we="important",xe=" !"+we,ke=mt(class extends ft{constructor(t){var e;if(s
|
|
|
713
713
|
<slot name="title"></slot>
|
|
714
714
|
<slot name="description"></slot>
|
|
715
715
|
</div>
|
|
716
|
-
${this.dismissible&&!o
|
|
716
|
+
${this.dismissible&&!i?o:C}
|
|
717
717
|
</div>
|
|
718
718
|
<slot name="actions"></slot>
|
|
719
719
|
</div>
|
|
@@ -912,11 +912,11 @@ const we="important",xe=" !"+we,ke=mt(class extends ft{constructor(t){var e;if(s
|
|
|
912
912
|
var(--m-divider-margin-y, 0)
|
|
913
913
|
);
|
|
914
914
|
}
|
|
915
|
-
`],window.customElements.define("m-divider",Ee);class Re extends Ee{constructor(){super(),this.slot="divider"}}Re.properties={slot:{attribute:!0,type:String,reflect:!0}},window.customElements.define("m-card-divider",Re);const Te={delay:"0s",duration:"0.35s",easing:"ease-in-out"};var Pe,_e,Oe;class De extends ut{static get properties(){return{name:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0},indeterminate:{type:Boolean,reflect:!0}}}constructor(){super(),Pe.add(this),Oe.set(this,(t=>{const e=t.target,
|
|
916
|
-
<label for="${
|
|
915
|
+
`],window.customElements.define("m-divider",Ee);class Re extends Ee{constructor(){super(),this.slot="divider"}}Re.properties={slot:{attribute:!0,type:String,reflect:!0}},window.customElements.define("m-card-divider",Re);const Te={delay:"0s",duration:"0.35s",easing:"ease-in-out"};var Pe,_e,Oe;class De extends ut{static get properties(){return{name:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0},indeterminate:{type:Boolean,reflect:!0}}}constructor(){super(),Pe.add(this),Oe.set(this,(t=>{const e=t.target,i=new CustomEvent("m-change",{cancelable:!1,composed:!1,bubbles:!0,detail:{checked:e.checked,indeterminate:e.indeterminate}});this.dispatchEvent(i),this.checked=e.checked,this.indeterminate=e.indeterminate})),this.name=void 0,this.disabled=!1,this.checked=!1,this.indeterminate=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","checkbox")}disconnectedCallback(){super.connectedCallback()}firstUpdated(){this.input=this.renderRoot.querySelector("input"),this.label=this.renderRoot.querySelector("label")}updated(){t(this,Pe,"m",_e).call(this)}render(){return k`
|
|
916
|
+
<label for="${gt(this.id)}" class="check-input-label">
|
|
917
917
|
<input
|
|
918
|
-
id="${
|
|
919
|
-
name="${
|
|
918
|
+
id="${gt(this.id)}"
|
|
919
|
+
name="${gt(this.name)}"
|
|
920
920
|
type="checkbox"
|
|
921
921
|
class="check-input"
|
|
922
922
|
?disabled="${this.disabled}"
|
|
@@ -1026,7 +1026,7 @@ const we="important",xe=" !"+we,ke=mt(class extends ft{constructor(t){var e;if(s
|
|
|
1026
1026
|
* Copyright 2021 Google LLC
|
|
1027
1027
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1028
1028
|
*/
|
|
1029
|
-
let Ue=class extends Event{constructor(t,e,
|
|
1029
|
+
let Ue=class extends Event{constructor(t,e,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=e,this.subscribe=i}};
|
|
1030
1030
|
/**
|
|
1031
1031
|
* @license
|
|
1032
1032
|
* Copyright 2021 Google LLC
|
|
@@ -1037,23 +1037,23 @@ let Ue=class extends Event{constructor(t,e,o){super("context-request",{bubbles:!
|
|
|
1037
1037
|
* Copyright 2021 Google LLC
|
|
1038
1038
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1039
1039
|
*/
|
|
1040
|
-
let qe=class{constructor(t,e,o
|
|
1040
|
+
let qe=class{constructor(t,e,i,o){var r;if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,e)=>{this.unsubscribe&&(this.unsubscribe!==e&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,e)),this.unsubscribe=e},this.host=t,void 0!==e.context){const t=e;this.context=t.context,this.callback=t.callback,this.subscribe=null!==(r=t.subscribe)&&void 0!==r&&r}else this.context=e,this.callback=i,this.subscribe=null!=o&&o;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Ue(this.context,this.t,this.subscribe))}},Le=class{constructor(t){this.disposers=new Map,this.updateObservers=()=>{for(const[t,e]of this.disposers)t(this.o,e)},void 0!==t&&(this.value=t)}get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){const i=e||!Object.is(t,this.o);this.o=t,i&&this.updateObservers()}addCallback(t,e){if(e){this.disposers.has(t)||this.disposers.set(t,(()=>{this.disposers.delete(t)}));const e=this.disposers.get(t);t(this.value,e)}else t(this.value)}clearCallbacks(){this.disposers.clear()}},Ne=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},Fe=class extends Le{constructor(t,e,i){super(void 0!==e.context?e.initialValue:i),this.onContextRequest=t=>{t.context===this.context&&t.composedPath()[0]!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,t.subscribe))},this.host=t,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest)}hostConnected(){this.host.dispatchEvent(new Ne(this.context))}},Ie=!1;
|
|
1041
1041
|
/**
|
|
1042
1042
|
* @license
|
|
1043
1043
|
* Copyright 2021 Google LLC
|
|
1044
1044
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1045
|
-
*/function Ge(){if(Ie)return;const t=new class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{const e=this.pendingContextRequests.get(t.context);if(void 0===e)return;this.pendingContextRequests.delete(t.context);const{requests:
|
|
1045
|
+
*/function Ge(){if(Ie)return;const t=new class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{const e=this.pendingContextRequests.get(t.context);if(void 0===e)return;this.pendingContextRequests.delete(t.context);const{requests:i}=e;for(const{elementRef:e,callbackRef:o}of i){const i=e.deref(),r=o.deref();void 0===i||void 0===r||i.dispatchEvent(new Ue(t.context,r,!0))}},this.onContextRequest=t=>{if(!0!==t.subscribe)return;const e=t.composedPath()[0],i=t.callback;let o=this.pendingContextRequests.get(t.context);void 0===o&&this.pendingContextRequests.set(t.context,o={callbacks:new WeakMap,requests:[]});let r=o.callbacks.get(e);void 0===r&&o.callbacks.set(e,r=new WeakSet),r.has(i)||(r.add(i),o.requests.push({elementRef:new WeakRef(e),callbackRef:new WeakRef(i)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};t.attach(document.body),Ie=!0}async function Ve(t,e){const i=t.getAnimations(e).map((({finished:t})=>t));await Promise.allSettled(i)}const He=Symbol("dialog");var Je,Xe,Ye,Ze,Ke,Qe,ti,ei;Ge();class ii extends de{static get properties(){return{open:{type:Boolean,reflect:!0},size:{type:String,reflect:!0},variant:{type:String,reflect:!0}}}constructor(){super(),Je.add(this),Xe.set(this,new Fe(this,He,{variant:"neutral"})),this.open=!1,this.size="small",this.variant="neutral"}render(){return k`
|
|
1046
1046
|
<dialog
|
|
1047
1047
|
class="${yt({"-size-small":"small"===this.size||!this.size,"-size-medium":"medium"===this.size,"-size-large":"large"===this.size,"-size-extra-large":"extra-large"===this.size})}"
|
|
1048
|
-
@click=${t(this,Je,"m",
|
|
1049
|
-
@cancel=${t(this,Je,"m",
|
|
1048
|
+
@click=${t(this,Je,"m",ti)}
|
|
1049
|
+
@cancel=${t(this,Je,"m",ei)}
|
|
1050
1050
|
>
|
|
1051
1051
|
<slot name="header"></slot>
|
|
1052
1052
|
<slot name="body"></slot>
|
|
1053
1053
|
<slot name="footer"></slot>
|
|
1054
1054
|
<slot name="actions"></slot>
|
|
1055
1055
|
</dialog>
|
|
1056
|
-
`}updated(e){var
|
|
1056
|
+
`}updated(e){var i;super.updated(e),e.has("variant")&&t(this,Xe,"f").setValue({variant:null!==(i=this.variant)&&void 0!==i?i:"neutral"}),e.has("open")&&t(this,Je,"m",Ze).call(this,e.get("open"))}show(){this.open=!0}hide(){this.open=!1}}Xe=new WeakMap,Je=new WeakSet,Ye=function(){var t;return null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("dialog")},Ze=async function(e){const i=t(this,Je,"a",Ye);i&&(!e&&this.open?(this.style.display="block",t(this,Je,"m",Ke).call(this,"m-opening"),i.showModal(),await Ve(i),t(this,Je,"m",Ke).call(this,"m-opened")):e&&!this.open?(t(this,Je,"m",Ke).call(this,"m-closing"),i.classList.add("is-hiding"),await Ve(i),i.classList.remove("is-hiding"),i.close(),t(this,Je,"m",Ke).call(this,"m-closed"),this.style.display="none"):null!=e||this.open||(this.style.display="none"))},Ke=function(t){this.emit(t,{cancelable:!1,bubbles:!1})},Qe=function(){this.open&&this.emit("m-close")},ti=function(e){var i;const o=e.target instanceof HTMLDialogElement,r=null===(i=t(this,Je,"a",Ye))||void 0===i?void 0:i.getBoundingClientRect();if(o&&r){(e.clientY<r.top||e.clientY>r.bottom||e.clientX<r.left||e.clientX>r.right)&&(e.preventDefault(),e.stopPropagation(),t(this,Je,"m",Qe).call(this))}},ei=function(e){e.preventDefault(),t(this,Je,"m",Qe).call(this)},ii.styles=[K`
|
|
1057
1057
|
:host {
|
|
1058
1058
|
--margin: ${Rt("spacing-6")};
|
|
1059
1059
|
--padding: ${Rt("spacing-6")};
|
|
@@ -1146,8 +1146,17 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1146
1146
|
opacity: 0;
|
|
1147
1147
|
}
|
|
1148
1148
|
}
|
|
1149
|
-
`],window.customElements.define("m-dialog",
|
|
1149
|
+
`],window.customElements.define("m-dialog",ii);const oi=["small","medium","large","extra-large"],ri=["neutral","success","warning","danger"];var ni,si;class ai extends oe{constructor(){super(),ni.set(this,(t=>{switch(t.variant){case"danger":this.variant="danger";break;case"warning":this.variant="warning";break;default:this.variant="primary"}})),this.type="button",this.variant="primary",this.context=new qe(this,He,t(this,ni,"f"),!0)}}ni=new WeakMap,window.customElements.define("m-dialog-action-primary",ai);class li extends oe{constructor(){super(),this.type="button",this.variant="secondary"}}window.customElements.define("m-dialog-action-secondary",li);class ci extends oe{constructor(){super(),this.type="button",this.variant="tertiary"}}function di(t,e){var i;const o=e?zt(e):"";return t&&null!==(i="none"===t?"0":zt(t))&&void 0!==i?i:o}window.customElements.define("m-dialog-action-tertiary",ci);class hi extends ut{constructor(){super(...arguments),si.set(this,((t,e)=>{e?this.style.setProperty(t,di(e)):this.style.removeProperty(t)}))}static get properties(){return{padding:{type:String},paddingX:{type:String,attribute:"padding-x"},paddingY:{type:String,attribute:"padding-y"},paddingT:{type:String,attribute:"padding-t"},paddingB:{type:String,attribute:"padding-b"},paddingL:{type:String,attribute:"padding-l"},paddingR:{type:String,attribute:"padding-r"}}}getCSSPropertiesPrefix(){return"layout"}update(e){super.update(e);const i=this.getCSSPropertiesPrefix();e.has("padding")&&this.style.setProperty(`--m-${i}-padding`,di(this.padding)),e.has("paddingX")&&t(this,si,"f").call(this,`--m-${i}-padding-x`,this.paddingX),e.has("paddingY")&&t(this,si,"f").call(this,`--m-${i}-padding-y`,this.paddingY),e.has("paddingT")&&t(this,si,"f").call(this,`--m-${i}-padding-t`,this.paddingT),e.has("paddingB")&&t(this,si,"f").call(this,`--m-${i}-padding-b`,this.paddingB),e.has("paddingL")&&t(this,si,"f").call(this,`--m-${i}-padding-l`,this.paddingL),e.has("paddingR")&&t(this,si,"f").call(this,`--m-${i}-padding-r`,this.paddingR)}render(){return k`<slot></slot>`}}function ui(t){return K`
|
|
1150
1150
|
:host {
|
|
1151
|
+
/** reset layout custom properties to avoid inheritance */
|
|
1152
|
+
--m-${Z(t)}-padding-x: initial;
|
|
1153
|
+
--m-${Z(t)}-padding-y: initial;
|
|
1154
|
+
--m-${Z(t)}-padding-t: initial;
|
|
1155
|
+
--m-${Z(t)}-padding-r: initial;
|
|
1156
|
+
--m-${Z(t)}-padding-b: initial;
|
|
1157
|
+
--m-${Z(t)}-padding-l: initial;
|
|
1158
|
+
--m-${Z(t)}-padding: initial;
|
|
1159
|
+
|
|
1151
1160
|
padding-block-start: var(
|
|
1152
1161
|
--m-${Z(t)}-padding-t,
|
|
1153
1162
|
var(
|
|
@@ -1177,11 +1186,11 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1177
1186
|
)
|
|
1178
1187
|
);
|
|
1179
1188
|
}
|
|
1180
|
-
`}
|
|
1189
|
+
`}si=new WeakMap;const pi={gap:"spacing-4",align:"stretch",justify:"flex-start"};class gi extends hi{static get properties(){return{...super.properties,gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=pi.gap,this.align=pi.align,this.justify=pi.justify}getCSSPropertiesPrefix(){return gi.CSSPropertiesPrefix}update(t){super.update(t),this.style.setProperty("--m-group-gap",di(this.gap,pi.gap)),this.style.setProperty("--m-group-align",this.align||pi.align),this.style.setProperty("--m-group-justify",this.justify||pi.justify)}render(){return k`<slot></slot>`}}gi.CSSPropertiesPrefix="group",gi.styles=[ui(gi.CSSPropertiesPrefix),K`
|
|
1181
1190
|
:host {
|
|
1182
|
-
--m-group-gap: ${Rt(
|
|
1183
|
-
--m-group-align: ${Z(
|
|
1184
|
-
--m-group-justify: ${Z(
|
|
1191
|
+
--m-group-gap: ${Rt(pi.gap)};
|
|
1192
|
+
--m-group-align: ${Z(pi.align)};
|
|
1193
|
+
--m-group-justify: ${Z(pi.justify)};
|
|
1185
1194
|
|
|
1186
1195
|
display: flex;
|
|
1187
1196
|
flex-wrap: wrap;
|
|
@@ -1189,21 +1198,21 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1189
1198
|
align-items: var(--m-group-align);
|
|
1190
1199
|
justify-content: var(--m-group-justify);
|
|
1191
1200
|
}
|
|
1192
|
-
`],window.customElements.define("m-group",
|
|
1201
|
+
`],window.customElements.define("m-group",gi);class bi extends gi{constructor(){super(),this.align="center",this.gap="spacing-3",this.justify="flex-end"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}}window.customElements.define("m-dialog-actions",bi);class mi extends ut{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","body")}render(){return k`<slot></slot>`}}mi.styles=[K`
|
|
1193
1202
|
:host {
|
|
1194
1203
|
overflow-y: auto;
|
|
1195
1204
|
overscroll-behavior: contain;
|
|
1196
1205
|
|
|
1197
1206
|
${Vt("body-md")};
|
|
1198
1207
|
}
|
|
1199
|
-
`],window.customElements.define("m-dialog-body",
|
|
1208
|
+
`],window.customElements.define("m-dialog-body",mi);class fi extends $e{constructor(){super(),this.size="large"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","close")}}window.customElements.define("m-dialog-close",fi);class yi extends ut{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","footer")}render(){return k`<slot></slot>`}}window.customElements.define("m-dialog-footer",yi);const vi=["center","flex-start","flex-end","stretch"],$i=["center","flex-start","flex-end","space-between","space-around","space-evenly"],wi={padding:"spacing-4",borderRadius:"border-radius-s",borderWidth:"border-none",borderColor:"color-background-highlight",textAlign:"left"};class xi extends hi{static get properties(){return{...super.properties,backgroundColor:{type:String,attribute:"background-color"},borderRadius:{type:String,attribute:"border-radius"},borderWidth:{type:String,attribute:"border-width"},borderColor:{type:String,attribute:"border-color"},textAlign:{type:String,attribute:"text-align"}}}constructor(){super(),this.padding=wi.padding,this.borderRadius=wi.borderRadius,this.borderWidth=wi.borderWidth,this.borderColor=wi.borderColor,this.textAlign=wi.textAlign}getCSSPropertiesPrefix(){return xi.CSSPropertiesPrefix}update(t){var e,i,o,r;super.update(t),t.has("backgroundColor")&&this.style.setProperty("--m-box-background-color",null!==(e=this.backgroundColor&&zt(this.backgroundColor))&&void 0!==e?e:"transparent"),t.has("borderRadius")&&this.style.setProperty("--m-box-border-radius",null!==(i=this.borderRadius&&zt(this.borderRadius))&&void 0!==i?i:zt(wi.borderRadius)),t.has("borderWidth")&&this.style.setProperty("--m-box-border-width",null!==(o=this.borderWidth&&zt(this.borderWidth))&&void 0!==o?o:zt(wi.borderWidth)),t.has("borderColor")&&this.style.setProperty("--m-box-border-color",null!==(r=this.borderColor&&zt(this.borderColor))&&void 0!==r?r:zt(wi.borderColor)),t.has("textAlign")&&this.style.setProperty("--m-box-text-align",this.textAlign||wi.textAlign)}render(){return k`<slot></slot>`}}xi.CSSPropertiesPrefix="box",xi.styles=[ui(xi.CSSPropertiesPrefix),K`
|
|
1200
1209
|
:host {
|
|
1201
|
-
--m-box-padding: ${Rt(
|
|
1210
|
+
--m-box-padding: ${Rt(wi.padding)};
|
|
1202
1211
|
--m-box-background-color: transparent;
|
|
1203
|
-
--m-box-border-radius: ${Rt(
|
|
1204
|
-
--m-box-border-width: ${Rt(
|
|
1205
|
-
--m-box-border-color: ${Tt(
|
|
1206
|
-
--m-box-text-align: ${Z(
|
|
1212
|
+
--m-box-border-radius: ${Rt(wi.borderRadius)};
|
|
1213
|
+
--m-box-border-width: ${Rt(wi.borderWidth)};
|
|
1214
|
+
--m-box-border-color: ${Tt(wi.borderColor)};
|
|
1215
|
+
--m-box-text-align: ${Z(wi.textAlign)};
|
|
1207
1216
|
|
|
1208
1217
|
box-sizing: border-box;
|
|
1209
1218
|
|
|
@@ -1214,11 +1223,11 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1214
1223
|
border-color: var(--m-box-border-color);
|
|
1215
1224
|
text-align: var(--m-box-text-align);
|
|
1216
1225
|
}
|
|
1217
|
-
`],window.customElements.define("m-box",
|
|
1226
|
+
`],window.customElements.define("m-box",xi);const ki={gap:"spacing-4",align:"stretch",justify:"flex-start"};class zi extends hi{static get properties(){return{...super.properties,gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=ki.gap,this.align=ki.align,this.justify=ki.justify}getCSSPropertiesPrefix(){return zi.CSSPropertiesPrefix}update(t){super.update(t),this.style.setProperty("--m-stack-gap",di(this.gap,ki.gap)),this.style.setProperty("--m-stack-align",this.align||ki.align),this.style.setProperty("--m-stack-justify",this.justify||ki.justify)}render(){return k`<slot></slot>`}}zi.CSSPropertiesPrefix="stack",zi.styles=[ui(zi.CSSPropertiesPrefix),K`
|
|
1218
1227
|
:host {
|
|
1219
|
-
--m-stack-gap: ${Rt(
|
|
1220
|
-
--m-stack-align: ${Z(
|
|
1221
|
-
--m-stack-justify: ${Z(
|
|
1228
|
+
--m-stack-gap: ${Rt(ki.gap)};
|
|
1229
|
+
--m-stack-align: ${Z(ki.align)};
|
|
1230
|
+
--m-stack-justify: ${Z(ki.justify)};
|
|
1222
1231
|
|
|
1223
1232
|
display: flex;
|
|
1224
1233
|
flex-direction: column;
|
|
@@ -1227,10 +1236,10 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1227
1236
|
align-items: var(--m-stack-align);
|
|
1228
1237
|
justify-content: var(--m-stack-justify);
|
|
1229
1238
|
}
|
|
1230
|
-
`],window.customElements.define("m-stack",
|
|
1239
|
+
`],window.customElements.define("m-stack",zi);const Si={gap:"spacing-4",minColumnWidth:St("spacing-30")};class Ci extends hi{static get properties(){return{...super.properties,gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},minColumnWidth:{type:String,attribute:"min-column-width"}}}constructor(){super(),this.gap=Si.gap,this.minColumnWidth=Si.minColumnWidth}getCSSPropertiesPrefix(){return Ci.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-grid-gap",di(this.gap,Si.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-grid-row-gap",di(this.rowGap)):this.style.removeProperty("--m-grid-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-grid-column-gap",di(this.columnGap)):this.style.removeProperty("--m-grid-column-gap")),t.has("minColumnWidth")&&this.style.setProperty("--m-grid-min-column-width",this.minColumnWidth||Si.minColumnWidth)}render(){return k`<slot></slot>`}}Ci.CSSPropertiesPrefix="grid",Ci.styles=[ui(Ci.CSSPropertiesPrefix),K`
|
|
1231
1240
|
:host {
|
|
1232
|
-
--m-grid-gap: ${Rt(
|
|
1233
|
-
--m-grid-min-column-width: ${Z(
|
|
1241
|
+
--m-grid-gap: ${Rt(Si.gap)};
|
|
1242
|
+
--m-grid-min-column-width: ${Z(Si.minColumnWidth)};
|
|
1234
1243
|
|
|
1235
1244
|
display: grid;
|
|
1236
1245
|
|
|
@@ -1242,15 +1251,15 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1242
1251
|
minmax(min(var(--m-grid-min-column-width), 100%), 1fr)
|
|
1243
1252
|
);
|
|
1244
1253
|
}
|
|
1245
|
-
`],window.customElements.define("m-grid",
|
|
1254
|
+
`],window.customElements.define("m-grid",Ci);const Mi={gap:"spacing-4",sideWidth:"auto",minContentWidth:"50%",reversed:!1};function Wi(t){return t?"row-reverse":"row"}class Ai extends hi{static get properties(){return{...super.properties,gap:{type:String},sideWidth:{type:String,attribute:"side-width"},minContentWidth:{type:String,attribute:"min-content-width"},reversed:{type:Boolean}}}constructor(){super(),this.gap=Mi.gap,this.sideWidth=Mi.sideWidth,this.minContentWidth=Mi.minContentWidth,this.reversed=Mi.reversed}getCSSPropertiesPrefix(){return Ai.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-sidebar-gap",di(this.gap,Mi.gap)),t.has("sideWidth")&&this.style.setProperty("--m-sidebar-side-width",this.sideWidth||Mi.sideWidth),t.has("minContentWidth")&&this.style.setProperty("--m-sidebar-min-content-width",this.minContentWidth||Mi.minContentWidth),t.has("reversed")&&this.style.setProperty("--m-sidebar-flex-direction",Wi(this.reversed))}render(){return k`
|
|
1246
1255
|
<slot name="sidebar"></slot>
|
|
1247
1256
|
<slot name="content"></slot>
|
|
1248
|
-
`}}
|
|
1257
|
+
`}}Ai.CSSPropertiesPrefix="sidebar",Ai.styles=[ui(Ai.CSSPropertiesPrefix),K`
|
|
1249
1258
|
:host {
|
|
1250
|
-
--m-sidebar-gap: ${Rt(
|
|
1251
|
-
--m-sidebar-flex-direction: ${Z(
|
|
1252
|
-
--m-sidebar-side-width: ${Z(
|
|
1253
|
-
--m-sidebar-min-content-width: ${Z(
|
|
1259
|
+
--m-sidebar-gap: ${Rt(Mi.gap)};
|
|
1260
|
+
--m-sidebar-flex-direction: ${Z(Wi(Mi.reversed))};
|
|
1261
|
+
--m-sidebar-side-width: ${Z(Mi.sideWidth)};
|
|
1262
|
+
--m-sidebar-min-content-width: ${Z(Mi.minContentWidth)};
|
|
1254
1263
|
|
|
1255
1264
|
display: flex;
|
|
1256
1265
|
flex-wrap: wrap;
|
|
@@ -1269,7 +1278,7 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1269
1278
|
flex-grow: 999;
|
|
1270
1279
|
min-width: var(--m-sidebar-min-content-width);
|
|
1271
1280
|
}
|
|
1272
|
-
`],window.customElements.define("m-sidebar",
|
|
1281
|
+
`],window.customElements.define("m-sidebar",Ai);const ji={gap:"spacing-4",threshold:"10rem"};class Bi extends hi{static get properties(){return{...super.properties,gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},threshold:{type:String},limit:{type:Number}}}constructor(){super(),this.gap=ji.gap,this.threshold=ji.threshold}getCSSPropertiesPrefix(){return Bi.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-switcher-gap",di(this.gap,ji.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-switcher-row-gap",di(this.rowGap)):this.style.removeProperty("--m-switcher-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-switcher-column-gap",di(this.columnGap)):this.style.removeProperty("--m-switcher-column-gap")),t.has("threshold")&&this.style.setProperty("--m-switcher-threshold",this.threshold||ji.threshold)}render(){const t=this.limit?k`
|
|
1273
1282
|
<style>
|
|
1274
1283
|
::slotted(*:nth-last-child(n + ${this.limit+1})) {
|
|
1275
1284
|
flex-basis: 100%;
|
|
@@ -1281,10 +1290,10 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1281
1290
|
`:"";return k`
|
|
1282
1291
|
${t}
|
|
1283
1292
|
<slot></slot>
|
|
1284
|
-
`}}var
|
|
1293
|
+
`}}var Ei,Ri,Ti;Bi.CSSPropertiesPrefix="switcher",Bi.styles=[ui(Bi.CSSPropertiesPrefix),K`
|
|
1285
1294
|
:host {
|
|
1286
|
-
--m-switcher-gap: ${Rt(
|
|
1287
|
-
--m-switcher-threshold: ${Z(
|
|
1295
|
+
--m-switcher-gap: ${Rt(ji.gap)};
|
|
1296
|
+
--m-switcher-threshold: ${Z(ji.threshold)};
|
|
1288
1297
|
|
|
1289
1298
|
display: flex;
|
|
1290
1299
|
flex-wrap: wrap;
|
|
@@ -1297,30 +1306,30 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1297
1306
|
flex-basis: calc((var(--m-switcher-threshold) - 100%) * 999);
|
|
1298
1307
|
flex-grow: 1;
|
|
1299
1308
|
}
|
|
1300
|
-
`],window.customElements.define("m-switcher",
|
|
1309
|
+
`],window.customElements.define("m-switcher",Bi);class Pi extends de{constructor(){super(),Ei.add(this),Ri.set(this,void 0),e(this,Ri,new qe(this,He,void 0,!0),"f")}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","header")}render(){return k`
|
|
1301
1310
|
<m-group gap="spacing-6" align="center">
|
|
1302
1311
|
<m-group gap="spacing-1" align="center" style="flex-grow: 1;">
|
|
1303
|
-
${t(this,
|
|
1312
|
+
${t(this,Ei,"a",Ti)}
|
|
1304
1313
|
<h1><slot></slot></h1>
|
|
1305
1314
|
</m-group>
|
|
1306
1315
|
<slot name="close"></slot>
|
|
1307
1316
|
</m-group>
|
|
1308
|
-
`}}
|
|
1309
|
-
<m-icon name=${
|
|
1310
|
-
`},
|
|
1317
|
+
`}}Ri=new WeakMap,Ei=new WeakSet,Ti=function(){const{value:e}=t(this,Ri,"f");let i,o;switch(null==e?void 0:e.variant){case"danger":i="attention",o="color-danger-60";break;case"warning":i="alert-circle",o="color-warning-60";break;case"success":i="check",o="color-success-60";break;default:return C}return k`
|
|
1318
|
+
<m-icon name=${i} color=${o} size="24" aria-hidden="true"></m-icon>
|
|
1319
|
+
`},Pi.styles=[K`
|
|
1311
1320
|
h1 {
|
|
1312
1321
|
margin: 0;
|
|
1313
1322
|
padding: 0;
|
|
1314
1323
|
|
|
1315
1324
|
${Vt("heading-md-bold")};
|
|
1316
1325
|
}
|
|
1317
|
-
`],window.customElements.define("m-dialog-header",
|
|
1326
|
+
`],window.customElements.define("m-dialog-header",Pi);const _i="field";var Oi,Di,Ui,qi,Li;class Ni extends de{static get properties(){return{status:{type:String},slot:{type:String}}}constructor(){super(),Oi.add(this),this.field=new qe(this,_i,void 0,!0),this.slot="hint"}render(){const e={"-status-default":"default"===t(this,Oi,"m",Di).call(this),"-status-danger":"danger"===t(this,Oi,"m",Di).call(this)};return k` <m-group
|
|
1318
1327
|
gap="spacing-0-5"
|
|
1319
1328
|
align="center"
|
|
1320
1329
|
class=${yt(e)}
|
|
1321
1330
|
>
|
|
1322
1331
|
<slot name="leading"
|
|
1323
|
-
>${"danger"===t(this,
|
|
1332
|
+
>${"danger"===t(this,Oi,"m",Di).call(this)?k`<m-icon
|
|
1324
1333
|
name="attention"
|
|
1325
1334
|
size="10"
|
|
1326
1335
|
color="color-danger-60"
|
|
@@ -1330,7 +1339,7 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1330
1339
|
class=${yt({hint:!0,...e})}
|
|
1331
1340
|
><slot></slot>
|
|
1332
1341
|
</span>
|
|
1333
|
-
</m-group>`}}
|
|
1342
|
+
</m-group>`}}Oi=new WeakSet,Di=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},Ni.styles=[[K`
|
|
1334
1343
|
:host {
|
|
1335
1344
|
--m-field-hint-color: ${Tt("color-text-tertiary")};
|
|
1336
1345
|
}
|
|
@@ -1347,11 +1356,11 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1347
1356
|
${Vt("body-sm")};
|
|
1348
1357
|
color: var(--m-field-hint-color);
|
|
1349
1358
|
}
|
|
1350
|
-
`]],window.customElements.define("m-field-hint",
|
|
1351
|
-
class=${yt({label:!0,"-size-default":"default"===t(this,
|
|
1359
|
+
`]],window.customElements.define("m-field-hint",Ni);class Fi extends de{static get properties(){return{required:{type:Boolean},size:{type:String},slot:{type:String}}}constructor(){super(),Ui.add(this),this.field=new qe(this,_i,void 0,!0),this.slot="hint"}render(){return k`<label
|
|
1360
|
+
class=${yt({label:!0,"-size-default":"default"===t(this,Ui,"m",qi).call(this),"-size-small":"small"===t(this,Ui,"m",qi).call(this)})}
|
|
1352
1361
|
><slot></slot>
|
|
1353
|
-
${t(this,
|
|
1354
|
-
</label>`}}
|
|
1362
|
+
${t(this,Ui,"m",Li).call(this)?k`<span class="required">*</span>`:C}
|
|
1363
|
+
</label>`}}Ui=new WeakSet,qi=function(){var t;return this.size||(null===(t=this.field.value)||void 0===t?void 0:t.size)},Li=function(){var t;return null!=this.required?this.required:Boolean(null===(t=this.field.value)||void 0===t?void 0:t.required)},Fi.styles=[[K`
|
|
1355
1364
|
:host {
|
|
1356
1365
|
display: flex;
|
|
1357
1366
|
align-items: center;
|
|
@@ -1386,20 +1395,20 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1386
1395
|
.label.-size-small .required {
|
|
1387
1396
|
${Vt("body-sm")};
|
|
1388
1397
|
}
|
|
1389
|
-
`]],window.customElements.define("m-field-label",
|
|
1398
|
+
`]],window.customElements.define("m-field-label",Fi),Ge();class Ii extends de{static get properties(){return{label:{type:String},hint:{type:String},required:{type:Boolean},status:{type:String},size:{type:String},align:{type:String}}}constructor(){super(),this.provider=new Fe(this,_i,{required:!1,size:"default",status:"default"}),this.required=!1,this.status="default",this.size="default",this.align="stretch"}update(t){super.update(t),(t.has("required")||t.has("status")||t.has("size"))&&this.provider.setValue({required:this.required,status:this.status,size:this.size})}render(){return k`<m-stack gap="spacing-1" align="${this.align}">
|
|
1390
1399
|
${this.label?k`<m-field-label>${this.label}</m-field-label>`:k`<slot name="label"></slot>`}
|
|
1391
1400
|
|
|
1392
1401
|
<slot></slot>
|
|
1393
1402
|
|
|
1394
1403
|
${this.hint?k`<m-field-hint>${this.hint}</m-field-hint>`:k`<slot name="hint"></slot>`}
|
|
1395
|
-
</m-stack>`}}window.customElements.define("m-field",
|
|
1404
|
+
</m-stack>`}}window.customElements.define("m-field",Ii);const Gi=["default","danger"];var Vi,Hi,Ji;class Xi extends ut{static get properties(){return{variant:{type:String,reflect:!0},value:{type:Number,reflect:!0},max:{type:Number,reflect:!0}}}constructor(){super(),Vi.add(this),this.variant="default",this.value=0,this.max=100}connectedCallback(){super.connectedCallback(),this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0")}updated(){this.setAttribute("aria-valuenow",String(this.value)),this.setAttribute("aria-valuemax",String(this.max))}get percentage(){return 100*t(this,Vi,"a",Ji)/t(this,Vi,"a",Hi)}get currentVariant(){return this.variant}render(){return k`
|
|
1396
1405
|
<div class="bar">
|
|
1397
1406
|
<span
|
|
1398
1407
|
class=${yt({progress:!0,"-default":"default"===this.currentVariant,"-success":"success"===this.currentVariant,"-warning":"warning"===this.currentVariant,"-danger":"danger"===this.currentVariant})}
|
|
1399
1408
|
style=${ke({width:`${this.percentage}%`})}
|
|
1400
1409
|
></span>
|
|
1401
1410
|
</div>
|
|
1402
|
-
`}}
|
|
1411
|
+
`}}Vi=new WeakSet,Hi=function(){return this.max<=0?100:this.max},Ji=function(){return e=this.value,i=0,o=t(this,Vi,"a",Hi),Math.min(Math.max(i,e),o);var e,i,o},Xi.styles=[K`
|
|
1403
1412
|
.bar {
|
|
1404
1413
|
display: flex;
|
|
1405
1414
|
flex-grow: 0;
|
|
@@ -1450,7 +1459,7 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1450
1459
|
.-danger {
|
|
1451
1460
|
--m-progress-bar-progress-background: ${Tt("color-danger-60")};
|
|
1452
1461
|
}
|
|
1453
|
-
`],window.customElements.define("m-progress-bar",
|
|
1462
|
+
`],window.customElements.define("m-progress-bar",Xi);class Yi extends Xi{get currentVariant(){return this.percentage>=66?"success":this.percentage>=33?"warning":"danger"}}window.customElements.define("m-progress-bar-countdown",Yi);const Zi="m-check";var Ki,Qi,to,eo,io;class oo extends ut{static get properties(){return{value:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0}}}constructor(){super(),Ki.add(this),to.set(this,(t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();const e={detail:{value:this.value,type:"select"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(Zi,e))})),eo.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),io.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio"),this.addEventListener("click",t(this,to,"f"))}updated(e){super.updated(e),e.has("disabled")&&t(this,eo,"f").call(this),e.has("checked")&&t(this,io,"f").call(this)}render(){return k`
|
|
1454
1463
|
<button
|
|
1455
1464
|
type="button"
|
|
1456
1465
|
class="radio-button"
|
|
@@ -1462,7 +1471,7 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1462
1471
|
<slot name="leading"></slot>
|
|
1463
1472
|
<slot></slot>
|
|
1464
1473
|
</button>
|
|
1465
|
-
`}focus(e){var
|
|
1474
|
+
`}focus(e){var i;null===(i=t(this,Ki,"a",Qi))||void 0===i||i.focus(e)}}to=new WeakMap,eo=new WeakMap,io=new WeakMap,Ki=new WeakSet,Qi=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},oo.styles=[K`
|
|
1466
1475
|
:host {
|
|
1467
1476
|
--m-radio-border-color: ${Tt("color-border")};
|
|
1468
1477
|
--m-radio-dot-check-color: ${Tt("color-primary-60")};
|
|
@@ -1565,13 +1574,13 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1565
1574
|
${Ht(".radio-button","*")} {
|
|
1566
1575
|
pointer-event: none;
|
|
1567
1576
|
}
|
|
1568
|
-
`],window.customElements.define("m-radio",
|
|
1577
|
+
`],window.customElements.define("m-radio",oo);var ro,no={};Object.defineProperty(no,"i",{value:!0});var so=Pt;const ao=(t,e)=>{const i=so(t);if(0===i.length)return e;const o=new Set;return o.add(String(i.at(-1))),o},lo=(t,e)=>{const i=so(t);if(0===i.length)return e;const o=new Set(e);for(const t of i)o.add(String(t));return o},co={type:"single",init:t=>ao(t,new Set),select:ao,unselect(t,e){const i=so(t);if(0===i.length||0===e.size)return e;const o=new Set(e);for(const t of i)o.delete(String(t));return o},toggle(t,e){const i=so(t);if(0===i.length)return e;const o=new Set;for(const t of i){const i=String(t);e.has(i)||(o.clear(),o.add(i))}return o},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},ho={type:"single-strict",init:t=>ao(t,new Set),select:ao,unselect(t,e){const i=so(t);if(0===i.length||0===e.size)return e;const o=new Set(e);for(let t=0;t<i.length&&e.size>1;t++)o.delete(String(i[t]));return o},toggle(t,e){const i=so(t);if(0===i.length)return e;const o=new Set(e);for(const t of i){const i=String(t);e.has(i)||(o.clear(),o.add(i))}return o},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},uo={type:"multiple",init:t=>lo(t,new Set),select:lo,unselect(t,e){const i=so(t);if(0===i.length||0===e.size)return e;const o=new Set(e);for(const t of i)o.delete(String(t));return o},toggle(t,e){const i=so(t);if(0===i.length)return e;const o=new Set(e);for(const t of i){const i=String(t);e.has(i)?o.delete(i):o.add(i)}return o},reset:t=>null==t?new Set:t,value:t=>null==t||0===t.size?null:Array.from(t)};var po,go,bo,mo,fo,yo,vo,$o,wo;no.SELECTION_TYPES=["single","single-strict","multiple"],ro=no.default=function(t){const{type:e="multiple"}=t;return"single"===e?co:"single-strict"===e?ho:uo};class xo{constructor(e,i,o){po.add(this),this.disabled=!1,this.event="m-select",go.set(this,(t=>{if(this.disabled)return;if(null==this.type)return;const{detail:{type:e,value:i}}=t;switch(e){case"select":this.select(_t(i));break;case"unselect":this.unselect(_t(i));break;case"toggle":this.toggle(_t(i))}})),this.init=t=>{this.host.selection=this.strategy.init(t)},this.select=e=>{this.host.selection=this.strategy.select(e,this.host.selection),t(this,po,"m",bo).call(this)},this.unselect=e=>{this.host.selection=this.strategy.unselect(e,this.host.selection),t(this,po,"m",bo).call(this)},this.toggle=e=>{this.host.selection=this.strategy.toggle(e,this.host.selection),t(this,po,"m",bo).call(this)},this.subscribe=()=>{this.host.addEventListener(this.event,t(this,go,"f"))},this.unsubscribe=()=>{this.host.removeEventListener(this.event,t(this,go,"f"))},this.host=e,this.type=i,this.event=o,this.strategy=ro({type:i}),this.host.addController(this)}hostConnected(){this.subscribe()}hostDisconnected(){this.unsubscribe()}hostUpdate(){null!=this.host.type&&this.host.type!==this.type&&(this.unsubscribe(),this.host.removeController(this))}}go=new WeakMap,po=new WeakSet,bo=function(){const t={detail:{type:this.type,value:this.strategy.value(this.host.selection)},bubbles:!0,composed:!1};this.host.dispatchEvent(new CustomEvent("m-change",t))};class ko extends ut{static get properties(){return{value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},selection:{state:!0},orientation:{type:String}}}constructor(){super(),mo.set(this,null),fo.set(this,null),yo.set(this,(()=>{var e;return null===(e=t(this,vo,"f").call(this)[0])||void 0===e?void 0:e.value})),vo.set(this,(()=>{var i,o,r;e(this,fo,null!==(i=t(this,fo,"f"))&&void 0!==i?i:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(r=null===(o=t(this,fo,"f"))||void 0===o?void 0:o.assignedElements({flatten:!0}))&&void 0!==r?r:[]].filter((t=>"m-radio"===t.tagName.toLowerCase()))})),$o.set(this,(t=>{t.checked=this.selection.has(t.value)})),wo.set(this,(t=>{t.disabled=this.disabled})),this.disabled=!1,this.selection=new Set,this.value="",this.orientation="vertical",this.type="single-strict"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio-group"),e(this,mo,new xo(this,this.type,Zi),"f")}update(e){super.update(e),e.has("value")&&t(this,mo,"f")&&t(this,mo,"f").init(_t(this.value||t(this,yo,"f").call(this))),e.has("selection")&&([this.value]=this.selection)}updated(e){super.updated(e),e.has("selection")&&t(this,vo,"f").call(this).forEach((e=>{t(this,$o,"f").call(this,e)})),e.has("disabled")&&t(this,vo,"f").call(this).forEach((e=>{t(this,wo,"f").call(this,e)}))}render(){return k`
|
|
1569
1578
|
<div
|
|
1570
1579
|
class=${yt({"radio-group":!0,"-vertical":"vertical"===this.orientation,"-horizontal":"horizontal"===this.orientation})}
|
|
1571
1580
|
>
|
|
1572
1581
|
<slot></slot>
|
|
1573
1582
|
</div>
|
|
1574
|
-
`}}
|
|
1583
|
+
`}}mo=new WeakMap,fo=new WeakMap,yo=new WeakMap,vo=new WeakMap,$o=new WeakMap,wo=new WeakMap,ko.styles=[K`
|
|
1575
1584
|
.radio-group {
|
|
1576
1585
|
display: flex;
|
|
1577
1586
|
gap: ${Rt("spacing-2")};
|
|
@@ -1582,10 +1591,10 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1582
1591
|
.radio-group.-horizontal {
|
|
1583
1592
|
flex-direction: row;
|
|
1584
1593
|
}
|
|
1585
|
-
`],window.customElements.define("m-radio-group",
|
|
1594
|
+
`],window.customElements.define("m-radio-group",ko);const zo="tabs",So="m-select-tab";var Co,Mo,Wo,Ao,jo,Bo,Eo,Ro,To,Po,_o,Oo,Do,Uo,qo,Lo,No,Fo,Io,Go;class Vo extends de{static get properties(){return{activeTab:{type:String,attribute:"active-tab",reflect:!0},disabled:{type:Boolean,reflect:!0},lazy:{type:Boolean},selection:{state:!0},tabContentDirection:{type:String,attribute:"tab-content-direction"}}}constructor(){super(),Co.set(this,null),Mo.set(this,null),this.provider=new Fe(this,zo,{tabContentDirection:"horizontal",disabled:!1,lazy:!1,selection:new Set("")}),Wo.set(this,(t=>{t.stopPropagation();const[e]=Array.from(this.selection),i={detail:{value:String(e)}};this.emit("m-tab-change",i)})),Ao.set(this,(()=>{var e;return null===(e=t(this,jo,"f").call(this)[0])||void 0===e?void 0:e.name})),jo.set(this,(()=>{var i,o,r;e(this,Mo,null!==(i=t(this,Mo,"f"))&&void 0!==i?i:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(r=null===(o=t(this,Mo,"f"))||void 0===o?void 0:o.assignedElements({flatten:!0}))&&void 0!==r?r:[]].filter((t=>"m-tab"===t.tagName.toLowerCase()))})),this.activeTab="",this.tabContentDirection="horizontal",this.disabled=!1,this.lazy=!1,this.type="single-strict",this.selection=new Set}connectedCallback(){super.connectedCallback(),e(this,Co,new xo(this,this.type,So),"f"),this.addEventListener("m-change",t(this,Wo,"f"))}update(e){super.update(e),e.has("activeTab")&&t(this,Co,"f")&&t(this,Co,"f").init(_t(this.activeTab||t(this,Ao,"f").call(this)));const[i]=Array.from(this.selection);!e.has("selection")||this.activeTab&&i===this.activeTab||(this.activeTab=i),(e.has("tabContentDirection")||e.has("disabled")||e.has("lazy")||e.has("selection"))&&this.provider.setValue({tabContentDirection:this.tabContentDirection,disabled:this.disabled,lazy:this.lazy,selection:this.selection})}render(){return k`
|
|
1586
1595
|
<div class="tablist" role="tablist"><slot name="tab"></slot></div>
|
|
1587
1596
|
<slot></slot>
|
|
1588
|
-
`}}
|
|
1597
|
+
`}}Co=new WeakMap,Mo=new WeakMap,Wo=new WeakMap,Ao=new WeakMap,jo=new WeakMap,Vo.styles=[K`
|
|
1589
1598
|
:host {
|
|
1590
1599
|
--m-tabs-border-width: ${Rt("border-thin")};
|
|
1591
1600
|
--m-tabs-border-color: ${Tt("color-divider")};
|
|
@@ -1599,17 +1608,17 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1599
1608
|
border-bottom-width: var(--m-tabs-border-width);
|
|
1600
1609
|
border-bottom-color: var(--m-tabs-border-color);
|
|
1601
1610
|
}
|
|
1602
|
-
`],window.customElements.define("m-tabs",
|
|
1611
|
+
`],window.customElements.define("m-tabs",Vo);class Ho extends de{static get properties(){return{name:{type:String},disabled:{type:Boolean,reflect:!0},slot:{type:String,reflect:!0}}}constructor(){super(),Bo.add(this),this.tabs=new qe(this,zo,void 0,!0),Ro.set(this,(t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();const e={detail:{value:this.name,type:"select"},bubbles:!0,composed:!1};this.emit(So,e)})),To.set(this,(()=>{var t;return null===(t=this.tabs.value)||void 0===t?void 0:t.tabContentDirection})),Po.set(this,(()=>{var t;return Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.selection.has(this.name))})),_o.set(this,(()=>{var t;return this.disabled||Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.disabled)})),this.disabled=!1}connectedCallback(){super.connectedCallback(),this.id=`${this.name}-tab`,this.setAttribute("slot","tab"),this.setAttribute("role","tab"),this.setAttribute("aria-controls",`${this.name}-panel`),this.setAttribute("aria-selected","false"),this.addEventListener("click",t(this,Ro,"f"))}updated(e){super.updated(e),t(this,Po,"f").call(this)?this.setAttribute("aria-selected","true"):this.setAttribute("aria-selected","false"),e.has("name")&&(this.id=`${this.name}-tab`,this.setAttribute("aria-controls",`${this.name}-panel`)),e.has("disabled")&&this.setAttribute("aria-disabled",String(this.disabled))}render(){return k`
|
|
1603
1612
|
<button
|
|
1604
1613
|
type="button"
|
|
1605
|
-
class=${yt({tab:!0,"-vertical":"vertical"===t(this,
|
|
1606
|
-
?disabled=${t(this,
|
|
1607
|
-
aria-selected=${t(this,
|
|
1614
|
+
class=${yt({tab:!0,"-vertical":"vertical"===t(this,To,"f").call(this),"-horizontal":"horizontal"===t(this,To,"f").call(this)})}
|
|
1615
|
+
?disabled=${t(this,_o,"f").call(this)}
|
|
1616
|
+
aria-selected=${t(this,Po,"f").call(this)}
|
|
1608
1617
|
>
|
|
1609
1618
|
<slot name="leading"></slot>
|
|
1610
1619
|
<slot></slot>
|
|
1611
1620
|
</button>
|
|
1612
|
-
`}focus(e){var
|
|
1621
|
+
`}focus(e){var i;null===(i=t(this,Bo,"a",Eo))||void 0===i||i.focus(e)}}Ro=new WeakMap,To=new WeakMap,Po=new WeakMap,_o=new WeakMap,Bo=new WeakSet,Eo=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},Ho.styles=[K`
|
|
1613
1622
|
:host {
|
|
1614
1623
|
--m-tab-border-width: ${Rt("border-thin")};
|
|
1615
1624
|
--m-tab-border-color: ${Tt("color-divider")};
|
|
@@ -1690,20 +1699,20 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1690
1699
|
${Ht(".tab","*")} {
|
|
1691
1700
|
pointer-events: none;
|
|
1692
1701
|
}
|
|
1693
|
-
`],window.customElements.define("m-tab",
|
|
1702
|
+
`],window.customElements.define("m-tab",Ho);class Jo extends(Do=xi){static get properties(){return{...super.properties,forTab:{type:String,attribute:"for-tab"},lazy:{type:Boolean}}}constructor(){super(),this.tabs=new qe(this,zo,void 0,!0),Uo.set(this,(()=>{var t;return Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.selection.has(this.forTab))})),qo.set(this,(()=>{var t;return this.lazy||Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.lazy)})),this.lazy=!1,this.padding="none",this.paddingY="spacing-8"}connectedCallback(){super.connectedCallback(),this.id=`${this.forTab}-panel`,this.setAttribute("role","tabpanel"),this.setAttribute("aria-labelledby",`${this.forTab}-tab`)}updated(e){super.updated(e),t(this,Uo,"f").call(this)?(this.style.setProperty("--m-tab-panel-display","block"),this.removeAttribute("aria-hidden")):(this.style.setProperty("--m-tab-panel-display","none"),this.setAttribute("aria-hidden","true")),e.has("forTab")&&(this.id=`${this.forTab}-panel`,this.setAttribute("aria-labelledby",`${this.forTab}-tab`))}render(){return t(this,qo,"f").call(this)&&!t(this,Uo,"f").call(this)?k``:k`<slot></slot>`}}Oo=Jo,Uo=new WeakMap,qo=new WeakMap,Jo.styles=[...Reflect.get(Do,"styles",Oo),K`
|
|
1694
1703
|
:host {
|
|
1695
1704
|
--m-tab-panel-display: none;
|
|
1696
1705
|
|
|
1697
1706
|
display: var(--m-tab-panel-display);
|
|
1698
1707
|
}
|
|
1699
|
-
`],window.customElements.define("m-tab-panel",
|
|
1708
|
+
`],window.customElements.define("m-tab-panel",Jo);class Xo extends ut{static get properties(){return{variant:{type:String},size:{type:String},isSkeleton:{type:Boolean,attribute:"is-skeleton"}}}constructor(){super(),this.variant="neutral",this.size="default",this.isSkeleton=!1}render(){return k`
|
|
1700
1709
|
<span
|
|
1701
1710
|
class=${yt({tag:!0,"-success":"success"===this.variant,"-neutral":"neutral"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-is-skeleton":this.isSkeleton,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size})}
|
|
1702
1711
|
>
|
|
1703
1712
|
${this.isSkeleton?k``:k`<slot name="leading"></slot>`}
|
|
1704
1713
|
<slot></slot>
|
|
1705
1714
|
</span>
|
|
1706
|
-
`}}
|
|
1715
|
+
`}}Xo.styles=[[K`
|
|
1707
1716
|
@keyframes skeleton-loading {
|
|
1708
1717
|
0% {
|
|
1709
1718
|
background-color: ${Tt("color-background-tertiary")};
|
|
@@ -1777,14 +1786,14 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1777
1786
|
${Z("animation: skeleton-loading 1s linear infinite alternate;")};
|
|
1778
1787
|
width: var(--m-tag-skeleton-width);
|
|
1779
1788
|
}
|
|
1780
|
-
`]],window.customElements.define("m-tag",
|
|
1789
|
+
`]],window.customElements.define("m-tag",Xo);class Yo extends de{static get properties(){return{clearable:{type:Boolean},disabled:{type:Boolean,reflect:!0},max:{type:String},maxLength:{type:Number,reflect:!0,attribute:"max-length"},min:{type:String},minLength:{type:Number,reflect:!0,attribute:"min-length"},pattern:{type:String},placeholder:{type:String},readOnly:{type:Boolean,reflect:!0,attribute:"read-only"},size:{type:String},status:{type:String},step:{type:String},type:{type:String},value:{type:String}}}constructor(){super(),Lo.add(this),this.inputElement=null,this.field=new qe(this,_i,void 0,!0),Io.set(this,(t=>{this.value=t.target.value,this.reemit(t)})),Go.set(this,(t=>{t.stopPropagation(),this.clear()})),this.clearable=!1,this.disabled=!1,this.placeholder=void 0,this.size="default",this.type="text",this.value=void 0,this.max=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","textbox")}render(){return k`
|
|
1781
1790
|
<div
|
|
1782
|
-
class=${yt({container:!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"is-disabled":Boolean(this.disabled),"-status-default":"default"===t(this,
|
|
1791
|
+
class=${yt({container:!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"is-disabled":Boolean(this.disabled),"-status-default":"default"===t(this,Lo,"m",Fo).call(this),"-status-danger":"danger"===t(this,Lo,"m",Fo).call(this)})}
|
|
1783
1792
|
>
|
|
1784
1793
|
<slot name="leading"></slot>
|
|
1785
1794
|
<input
|
|
1786
|
-
id="${
|
|
1787
|
-
type="${
|
|
1795
|
+
id="${gt(this.id)}"
|
|
1796
|
+
type="${gt(this.type)}"
|
|
1788
1797
|
class="text-field"
|
|
1789
1798
|
aria-disabled=${this.disabled?"true":"false"}
|
|
1790
1799
|
?disabled="${this.disabled}"
|
|
@@ -1793,22 +1802,22 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1793
1802
|
maxlength=${null!=this.maxLength&&this.maxLength>-1?this.maxLength:C}
|
|
1794
1803
|
min=${this.min||C}
|
|
1795
1804
|
minlength=${null!=this.minLength&&this.minLength>-1?this.minLength:C}
|
|
1796
|
-
pattern=${
|
|
1797
|
-
placeholder="${
|
|
1805
|
+
pattern=${gt(this.pattern)}
|
|
1806
|
+
placeholder="${gt(this.placeholder)}"
|
|
1798
1807
|
step=${this.step||C}
|
|
1799
|
-
value="${
|
|
1808
|
+
value="${gt(this.value)}"
|
|
1800
1809
|
@change=${this.reemit}
|
|
1801
|
-
@input=${t(this,
|
|
1810
|
+
@input=${t(this,Io,"f")}
|
|
1802
1811
|
/>
|
|
1803
1812
|
${this.clearable?k`<m-close-button
|
|
1804
|
-
class=${yt({clear:!0,"is-visible":t(this,
|
|
1805
|
-
controls="${
|
|
1806
|
-
@m-close=${t(this,
|
|
1813
|
+
class=${yt({clear:!0,"is-visible":t(this,Lo,"m",No).call(this)})}
|
|
1814
|
+
controls="${gt(this.id)}"
|
|
1815
|
+
@m-close=${t(this,Go,"f")}
|
|
1807
1816
|
label="Clear input"
|
|
1808
1817
|
></m-close-button>`:C}
|
|
1809
1818
|
<slot name="trailing"></slot>
|
|
1810
1819
|
</div>
|
|
1811
|
-
`}get input(){var t,e;return null==this.inputElement&&(this.inputElement=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("input"))&&void 0!==e?e:null),this.inputElement}clear(){this.value="",this.input&&(this.input.value=""),this.emit("m-clear"),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}
|
|
1820
|
+
`}get input(){var t,e;return null==this.inputElement&&(this.inputElement=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("input"))&&void 0!==e?e:null),this.inputElement}clear(){this.value="",this.input&&(this.input.value=""),this.emit("m-clear"),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Io=new WeakMap,Go=new WeakMap,Lo=new WeakSet,No=function(){const t=this.value||"";return!this.disabled&&t.length>0},Fo=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},Yo.styles=[K`
|
|
1812
1821
|
:host {
|
|
1813
1822
|
--m-text-field-background-color: transparent;
|
|
1814
1823
|
--m-text-field-border-color: ${Tt("color-border")};
|
|
@@ -1923,14 +1932,14 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1923
1932
|
.clear.is-visible {
|
|
1924
1933
|
visibility: visible;
|
|
1925
1934
|
}
|
|
1926
|
-
`],window.customElements.define("m-text-field",
|
|
1935
|
+
`],window.customElements.define("m-text-field",Yo);const Zo="m-toggle";var Ko,Qo,tr,er,ir,or,rr,nr,sr,ar,lr;class cr extends ut{static get properties(){return{disabled:{type:Boolean},role:{type:String,reflect:!0},showCheck:{type:Boolean,attribute:"show-check"},size:{type:String,reflect:!0},type:{type:String},value:{},selection:{state:!0}}}constructor(){super(),Ko.set(this,null),Qo.set(this,null),tr.set(this,(()=>{var i,o,r;e(this,Qo,null!==(i=t(this,Qo,"f"))&&void 0!==i?i:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(r=null===(o=t(this,Qo,"f"))||void 0===o?void 0:o.assignedElements({flatten:!0}))&&void 0!==r?r:[]].filter((t=>"m-toggle"===t.tagName.toLowerCase()))})),er.set(this,(t=>{t.setAttribute("role",["single","single-strict"].includes(this.type)?"radio":"checkbox")})),ir.set(this,(t=>{t.checked=this.selection.has(t.value)})),or.set(this,(t=>{t.disabled=this.disabled})),this.showCheck=!1,this.size="default",this.type="single",this.selection=new Set}update(i){super.update(i),(null!=i.get("type")&&null!=this.type||null==t(this,Ko,"f"))&&(e(this,Ko,new xo(this,this.type,Zo),"f"),t(this,Ko,"f").init(_t(this.value)),this.role=["single","single-strict"].includes(this.type)?"radiogroup":"group"),i.has("value")&&t(this,Ko,"f").init(_t(this.value))}updated(e){super.updated(e),e.has("selection")&&t(this,tr,"f").call(this).forEach((e=>{t(this,ir,"f").call(this,e)})),e.has("disabled")&&t(this,tr,"f").call(this).forEach((e=>{t(this,or,"f").call(this,e)})),e.has("role")&&t(this,tr,"f").call(this).forEach((e=>{t(this,er,"f").call(this,e)}))}render(){return k`
|
|
1927
1936
|
<m-group
|
|
1928
1937
|
class=${yt({"toggle-group":!0,"-single":"single"===this.type,"-single-strict":"single-strict"===this.type,"-multiple":"multiple"===this.type,"-small":"small"===this.size,"-show-check":this.showCheck})}
|
|
1929
1938
|
gap="spacing-1"
|
|
1930
1939
|
>
|
|
1931
1940
|
<slot></slot>
|
|
1932
1941
|
</m-group>
|
|
1933
|
-
`}}
|
|
1942
|
+
`}}Ko=new WeakMap,Qo=new WeakMap,tr=new WeakMap,er=new WeakMap,ir=new WeakMap,or=new WeakMap,cr.styles=[[K`
|
|
1934
1943
|
.toggle-group {
|
|
1935
1944
|
inline-size: max-content;
|
|
1936
1945
|
|
|
@@ -1956,7 +1965,7 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1956
1965
|
.toggle-group.-show-check ::slotted(m-toggle[aria-checked='true']) {
|
|
1957
1966
|
--m-toggle-icon-display: inline-flex;
|
|
1958
1967
|
}
|
|
1959
|
-
`]],window.customElements.define("m-toggle-group",cr);class dr extends ut{static get properties(){return{checked:{type:Boolean},disabled:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},value:{type:String,reflect:!0}}}constructor(){super(),rr.add(this),sr.set(this,(()=>{if(this.disabled)return;this.checked=!this.checked;const t={detail:{value:this.value,type:"toggle"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(
|
|
1968
|
+
`]],window.customElements.define("m-toggle-group",cr);class dr extends ut{static get properties(){return{checked:{type:Boolean},disabled:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},value:{type:String,reflect:!0}}}constructor(){super(),rr.add(this),sr.set(this,(()=>{if(this.disabled)return;this.checked=!this.checked;const t={detail:{value:this.value,type:"toggle"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(Zo,t))})),ar.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),lr.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,sr,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,sr,"f"))}updated(e){super.updated(e),e.has("disabled")&&t(this,ar,"f").call(this),e.has("checked")&&t(this,lr,"f").call(this)}render(){return k`
|
|
1960
1969
|
<button
|
|
1961
1970
|
type="button"
|
|
1962
1971
|
class=${yt({button:!0,toggle:!0})}
|
|
@@ -1970,7 +1979,7 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1970
1979
|
|
|
1971
1980
|
<slot></slot>
|
|
1972
1981
|
</button>
|
|
1973
|
-
`}focus(e){var
|
|
1982
|
+
`}focus(e){var i;null===(i=t(this,rr,"a",nr))||void 0===i||i.focus(e)}}function hr(t){return t.trim()}function ur(t){return t?String(t).split(/[\s,]+/).map(hr).filter(Boolean):["hover"]}function pr(t){return t.split("-")[1]}function gr(t){return"y"===t?"height":"width"}function br(t){return t.split("-")[0]}function mr(t){return["top","bottom"].includes(br(t))?"x":"y"}function fr(t,e,i){let{reference:o,floating:r}=t;const n=o.x+o.width/2-r.width/2,s=o.y+o.height/2-r.height/2,a=mr(e),l=gr(a),c=o[l]/2-r[l]/2,d="x"===a;let h;switch(br(e)){case"top":h={x:n,y:o.y-r.height};break;case"bottom":h={x:n,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:s};break;case"left":h={x:o.x-r.width,y:s};break;default:h={x:o.x,y:o.y}}switch(pr(e)){case"start":h[a]-=c*(i&&d?-1:1);break;case"end":h[a]+=c*(i&&d?-1:1)}return h}sr=new WeakMap,ar=new WeakMap,lr=new WeakMap,rr=new WeakSet,nr=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},dr.styles=[[Xt(),K`
|
|
1974
1983
|
:host {
|
|
1975
1984
|
/*
|
|
1976
1985
|
* These custom properties are here because they are meant to be
|
|
@@ -2010,11 +2019,11 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
2010
2019
|
|
|
2011
2020
|
display: var(--m-toggle-icon-display);
|
|
2012
2021
|
}
|
|
2013
|
-
`]],window.customElements.define("m-toggle",dr);function yr(t,e){return"function"==typeof t?t(e):t}function vr(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function $r(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function wr(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=yr(e,t),b=vr(p),g=a[u?"floating"===h?"reference":"floating":h],m=$r(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(g)))||o?g:g.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),f="floating"===h?{...s.floating,x:i,y:r}:s.reference,y=await(null==n.getOffsetParent?void 0:n.getOffsetParent(a.floating)),v=await(null==n.isElement?void 0:n.isElement(y))&&await(null==n.getScale?void 0:n.getScale(y))||{x:1,y:1},$=$r(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f,offsetParent:y,strategy:l}):f);return{top:(m.top-$.top+b.top)/v.y,bottom:($.bottom-m.bottom+b.bottom)/v.y,left:(m.left-$.left+b.left)/v.x,right:($.right-m.right+b.right)/v.x}}const xr=Math.min,kr=Math.max;function zr(t,e,o){return kr(t,xr(e,o))}const Sr=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:r,rects:n,platform:s,elements:a}=e,{element:l,padding:c=0}=yr(t,e)||{};if(null==l)return{};const d=vr(c),h={x:o,y:i},u=mr(r),p=br(u),b=await s.getDimensions(l),g="y"===u,m=g?"top":"left",f=g?"bottom":"right",y=g?"clientHeight":"clientWidth",v=n.reference[p]+n.reference[u]-h[u]-n.floating[p],$=h[u]-n.reference[u],w=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let x=w?w[y]:0;x&&await(null==s.isElement?void 0:s.isElement(w))||(x=a.floating[y]||n.floating[p]);const k=v/2-$/2,z=x/2-b[p]/2-1,S=xr(d[m],z),C=xr(d[f],z),M=S,W=x-b[p]-C,A=x/2-b[p]/2+k,j=zr(M,A,W),B=null!=pr(r)&&A!=j&&n.reference[p]/2-(A<M?S:C)-b[p]/2<0?A<M?M-A:W-A:0;return{[u]:h[u]-B,data:{[u]:j,centerOffset:A-j+B}}}}),Cr={left:"right",right:"left",bottom:"top",top:"bottom"};function Mr(t){return t.replace(/left|right|bottom|top/g,(t=>Cr[t]))}const Wr={start:"end",end:"start"};function Ar(t){return t.replace(/start|end/g,(t=>Wr[t]))}const jr=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o;const{placement:i,middlewareData:r,rects:n,initialPlacement:s,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...g}=yr(t,e),m=gr(i),f=gr(s)===s,y=await(null==a.isRTL?void 0:a.isRTL(l.floating)),v=h||(f||!b?[Mr(s)]:function(t){const e=Mr(t);return[Ar(t),e,Ar(e)]}(s));h||"none"===p||v.push(...function(t,e,o,i){const r=pr(t);let n=function(t,e,o){const i=["left","right"],r=["right","left"],n=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return o?e?r:i:e?i:r;case"left":case"right":return e?n:s;default:return[]}}(gr(t),"start"===o,i);return r&&(n=n.map((t=>t+"-"+r)),e&&(n=n.concat(n.map(Ar)))),n}(s,b,p,y));const $=[s,...v],w=await wr(e,g),x=[];let k=(null==(o=r.flip)?void 0:o.overflows)||[];if(c&&x.push(w[m]),d){const{main:t,cross:e}=function(t,e,o){void 0===o&&(o=!1);const i=pr(t),r=mr(t),n=br(r);let s="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=Mr(s)),{main:s,cross:Mr(s)}}(i,n,y);x.push(w[t],w[e])}if(k=[...k,{placement:i,overflows:x}],!x.every((t=>t<=0))){var z,S;const t=((null==(z=r.flip)?void 0:z.index)||0)+1,e=$[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let o=null==(S=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:S.placement;if(!o)switch(u){case"bestFit":{var C;const t=null==(C=k.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(o=t);break}case"initialPlacement":o=s}if(i!==o)return{reset:{placement:o}}}return{}}}};const Br=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:o,y:i}=e,r=await async function(t,e){const{placement:o,platform:i,elements:r}=t,n=await(null==i.isRTL?void 0:i.isRTL(r.floating)),s=gr(o),a=pr(o),l="x"===mr(o),c=["left","top"].includes(s)?-1:1,d=n&&l?-1:1,h=yr(e,t);let{mainAxis:u,crossAxis:p,alignmentAxis:b}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&"number"==typeof b&&(p="end"===a?-1*b:b),l?{x:p*d,y:u*c}:{x:u*c,y:p*d}}(e,t);return{x:o+r.x,y:i+r.y,data:r}}}};function Er(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Rr(t){return Er(t).getComputedStyle(t)}function Tr(t){return t instanceof Er(t).Node}function Pr(t){return Tr(t)?(t.nodeName||"").toLowerCase():"#document"}function _r(t){return t instanceof Er(t).HTMLElement}function Or(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Er(t).ShadowRoot||t instanceof ShadowRoot)}function Dr(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=Rr(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function Ur(t){return["table","td","th"].includes(Pr(t))}function qr(t){const e=Lr(),o=Rr(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function Lr(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Nr(t){return["html","body","#document"].includes(Pr(t))}const Fr=Math.min,Ir=Math.max,Gr=Math.round,Vr=Math.floor,Hr=t=>({x:t,y:t});function Jr(t){const e=Rr(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=_r(t),n=r?t.offsetWidth:o,s=r?t.offsetHeight:i,a=Gr(o)!==n||Gr(i)!==s;return a&&(o=n,i=s),{width:o,height:i,$:a}}function Xr(t){return t instanceof Er(t).Element}function Yr(t){return Xr(t)?t:t.contextElement}function Zr(t){const e=Yr(t);if(!_r(e))return Hr(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:n}=Jr(e);let s=(n?Gr(o.width):o.width)/i,a=(n?Gr(o.height):o.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Kr=Hr(0);function Qr(t){const e=Er(t);return Lr()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Kr}function tn(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),n=Yr(t);let s=Hr(1);e&&(i?Xr(i)&&(s=Zr(i)):s=Zr(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==Er(t))&&e}(n,o,i)?Qr(n):Hr(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,d=r.width/s.x,h=r.height/s.y;if(n){const t=Er(n),e=i&&Xr(i)?Er(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=Zr(o),e=o.getBoundingClientRect(),i=getComputedStyle(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,n=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,h*=t.y,l+=r,c+=n,o=Er(o).frameElement}}return $r({width:d,height:h,x:l,y:c})}function en(t){return Xr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function on(t){return((Tr(t)?t.ownerDocument:t.document)||window.document).documentElement}function rn(t){return tn(on(t)).left+en(t).scrollLeft}function nn(t){if("html"===Pr(t))return t;const e=t.assignedSlot||t.parentNode||Or(t)&&t.host||on(t);return Or(e)?e.host:e}function sn(t){const e=nn(t);return Nr(e)?t.ownerDocument?t.ownerDocument.body:t.body:_r(e)&&Dr(e)?e:sn(e)}function an(t,e){var o;void 0===e&&(e=[]);const i=sn(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),n=Er(i);return r?e.concat(n,n.visualViewport||[],Dr(i)?i:[]):e.concat(i,an(i))}function ln(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=Er(t),i=on(t),r=o.visualViewport;let n=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){n=r.width,s=r.height;const t=Lr();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:n,height:s,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=on(t),o=en(t),i=t.ownerDocument.body,r=Ir(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),n=Ir(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+rn(t);const a=-o.scrollTop;return"rtl"===Rr(i).direction&&(s+=Ir(e.clientWidth,i.clientWidth)-r),{width:r,height:n,x:s,y:a}}(on(t));else if(Xr(e))i=function(t,e){const o=tn(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,n=_r(t)?Zr(t):Hr(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:i*n.y}}(e,o);else{const o=Qr(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return $r(i)}function cn(t,e){const o=nn(t);return!(o===e||!Xr(o)||Nr(o))&&("fixed"===Rr(o).position||cn(o,e))}function dn(t,e,o){const i=_r(e),r=on(e),n="fixed"===o,s=tn(t,!0,n,e);let a={scrollLeft:0,scrollTop:0};const l=Hr(0);if(i||!i&&!n)if(("body"!==Pr(e)||Dr(r))&&(a=en(e)),_r(e)){const t=tn(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=rn(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function hn(t,e){return _r(t)&&"fixed"!==Rr(t).position?e?e(t):t.offsetParent:null}function un(t,e){const o=Er(t);if(!_r(t))return o;let i=hn(t,e);for(;i&&Ur(i)&&"static"===Rr(i).position;)i=hn(i,e);return i&&("html"===Pr(i)||"body"===Pr(i)&&"static"===Rr(i).position&&!qr(i))?o:i||function(t){let e=nn(t);for(;_r(e)&&!Nr(e);){if(qr(e))return e;e=nn(e)}return null}(t)||o}const pn={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const r=_r(o),n=on(o);if(o===n)return e;let s={scrollLeft:0,scrollTop:0},a=Hr(1);const l=Hr(0);if((r||!r&&"fixed"!==i)&&(("body"!==Pr(o)||Dr(n))&&(s=en(o)),_r(o))){const t=tn(o);a=Zr(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+l.x,y:e.y*a.y-s.scrollTop*a.y+l.y}},getDocumentElement:on,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:r}=t;const n=[..."clippingAncestors"===o?function(t,e){const o=e.get(t);if(o)return o;let i=an(t).filter((t=>Xr(t)&&"body"!==Pr(t))),r=null;const n="fixed"===Rr(t).position;let s=n?nn(t):t;for(;Xr(s)&&!Nr(s);){const e=Rr(s),o=qr(s);o||"fixed"!==e.position||(r=null),(n?!o&&!r:!o&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||Dr(s)&&!o&&cn(t,s))?i=i.filter((t=>t!==s)):r=e,s=nn(s)}return e.set(t,i),i}(e,this._c):[].concat(o),i],s=n[0],a=n.reduce(((t,o)=>{const i=ln(e,o,r);return t.top=Ir(i.top,t.top),t.right=Fr(i.right,t.right),t.bottom=Fr(i.bottom,t.bottom),t.left=Ir(i.left,t.left),t}),ln(e,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:un,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const r=this.getOffsetParent||un,n=this.getDimensions;return{reference:dn(e,await r(o),i),floating:{x:0,y:0,...await n(o)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Jr(t)},getScale:Zr,isElement:Xr,isRTL:function(t){return"rtl"===getComputedStyle(t).direction}};function bn(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Yr(t),d=r||n?[...c?an(c):[],...an(e)]:[];d.forEach((t=>{r&&t.addEventListener("scroll",o,{passive:!0}),n&&t.addEventListener("resize",o)}));const h=c&&a?function(t,e){let o,i=null;const r=on(t);function n(){clearTimeout(o),i&&i.disconnect(),i=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),n();const{left:c,top:d,width:h,height:u}=t.getBoundingClientRect();if(a||e(),!h||!u)return;const p={rootMargin:-Vr(d)+"px "+-Vr(r.clientWidth-(c+h))+"px "+-Vr(r.clientHeight-(d+u))+"px "+-Vr(c)+"px",threshold:Ir(0,Fr(1,l))||1};let b=!0;function g(t){const e=t[0].intersectionRatio;if(e!==l){if(!b)return s();e?s(!1,e):o=setTimeout((()=>{s(!1,1e-7)}),100)}b=!1}try{i=new IntersectionObserver(g,{...p,root:r.ownerDocument})}catch(t){i=new IntersectionObserver(g,p)}i.observe(t)}(!0),n}(c,o):null;let u,p=-1,b=null;s&&(b=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&b&&(b.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{b&&b.observe(e)}))),o()})),c&&!l&&b.observe(c),b.observe(e));let g=l?tn(t):null;return l&&function e(){const i=tn(t);!g||i.x===g.x&&i.y===g.y&&i.width===g.width&&i.height===g.height||o();g=i,u=requestAnimationFrame(e)}(),o(),()=>{d.forEach((t=>{r&&t.removeEventListener("scroll",o),n&&t.removeEventListener("resize",o)})),h&&h(),b&&b.disconnect(),b=null,l&&cancelAnimationFrame(u)}}const gn=(t,e,o)=>{const i=new Map,r={platform:pn,...o},n={...r.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:s}=o,a=n.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:h}=fr(c,i,l),u=i,p={},b=0;for(let o=0;o<a.length;o++){const{name:n,fn:g}=a[o],{x:m,y:f,data:y,reset:v}=await g({x:d,y:h,initialPlacement:i,placement:u,strategy:r,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});d=null!=m?m:d,h=null!=f?f:h,p={...p,[n]:{...p[n],...y}},v&&b<=50&&(b++,"object"==typeof v&&(v.placement&&(u=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):v.rects),({x:d,y:h}=fr(c,u,l))),o=-1)}return{x:d,y:h,placement:u,strategy:r,middlewareData:p}})(t,e,{...r,platform:n})};var mn,fn;const yn={top:"",bottom:"",left:"",right:""};class vn extends de{static get properties(){return{position:{type:String,reflect:!0},placement:{type:String},open:{type:Boolean,reflect:!0}}}constructor(){super(),mn.set(this,void 0),this.getFloatingOffset=()=>20,this.renderArrow=()=>k`<span id="arrow">
|
|
2022
|
+
`]],window.customElements.define("m-toggle",dr);function yr(t,e){return"function"==typeof t?t(e):t}function vr(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function $r(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function wr(t,e){var i;void 0===e&&(e={});const{x:o,y:r,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=yr(e,t),g=vr(p),b=a[u?"floating"===h?"reference":"floating":h],m=$r(await n.getClippingRect({element:null==(i=await(null==n.isElement?void 0:n.isElement(b)))||i?b:b.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),f="floating"===h?{...s.floating,x:o,y:r}:s.reference,y=await(null==n.getOffsetParent?void 0:n.getOffsetParent(a.floating)),v=await(null==n.isElement?void 0:n.isElement(y))&&await(null==n.getScale?void 0:n.getScale(y))||{x:1,y:1},$=$r(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f,offsetParent:y,strategy:l}):f);return{top:(m.top-$.top+g.top)/v.y,bottom:($.bottom-m.bottom+g.bottom)/v.y,left:(m.left-$.left+g.left)/v.x,right:($.right-m.right+g.right)/v.x}}const xr=Math.min,kr=Math.max;function zr(t,e,i){return kr(t,xr(e,i))}const Sr=t=>({name:"arrow",options:t,async fn(e){const{x:i,y:o,placement:r,rects:n,platform:s,elements:a}=e,{element:l,padding:c=0}=yr(t,e)||{};if(null==l)return{};const d=vr(c),h={x:i,y:o},u=mr(r),p=gr(u),g=await s.getDimensions(l),b="y"===u,m=b?"top":"left",f=b?"bottom":"right",y=b?"clientHeight":"clientWidth",v=n.reference[p]+n.reference[u]-h[u]-n.floating[p],$=h[u]-n.reference[u],w=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let x=w?w[y]:0;x&&await(null==s.isElement?void 0:s.isElement(w))||(x=a.floating[y]||n.floating[p]);const k=v/2-$/2,z=x/2-g[p]/2-1,S=xr(d[m],z),C=xr(d[f],z),M=S,W=x-g[p]-C,A=x/2-g[p]/2+k,j=zr(M,A,W),B=null!=pr(r)&&A!=j&&n.reference[p]/2-(A<M?S:C)-g[p]/2<0?A<M?M-A:W-A:0;return{[u]:h[u]-B,data:{[u]:j,centerOffset:A-j+B}}}}),Cr={left:"right",right:"left",bottom:"top",top:"bottom"};function Mr(t){return t.replace(/left|right|bottom|top/g,(t=>Cr[t]))}const Wr={start:"end",end:"start"};function Ar(t){return t.replace(/start|end/g,(t=>Wr[t]))}const jr=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i;const{placement:o,middlewareData:r,rects:n,initialPlacement:s,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...b}=yr(t,e),m=br(o),f=br(s)===s,y=await(null==a.isRTL?void 0:a.isRTL(l.floating)),v=h||(f||!g?[Mr(s)]:function(t){const e=Mr(t);return[Ar(t),e,Ar(e)]}(s));h||"none"===p||v.push(...function(t,e,i,o){const r=pr(t);let n=function(t,e,i){const o=["left","right"],r=["right","left"],n=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return i?e?r:o:e?o:r;case"left":case"right":return e?n:s;default:return[]}}(br(t),"start"===i,o);return r&&(n=n.map((t=>t+"-"+r)),e&&(n=n.concat(n.map(Ar)))),n}(s,g,p,y));const $=[s,...v],w=await wr(e,b),x=[];let k=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&x.push(w[m]),d){const{main:t,cross:e}=function(t,e,i){void 0===i&&(i=!1);const o=pr(t),r=mr(t),n=gr(r);let s="x"===r?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=Mr(s)),{main:s,cross:Mr(s)}}(o,n,y);x.push(w[t],w[e])}if(k=[...k,{placement:o,overflows:x}],!x.every((t=>t<=0))){var z,S;const t=((null==(z=r.flip)?void 0:z.index)||0)+1,e=$[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let i=null==(S=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:S.placement;if(!i)switch(u){case"bestFit":{var C;const t=null==(C=k.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(i=t);break}case"initialPlacement":i=s}if(o!==i)return{reset:{placement:i}}}return{}}}};const Br=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:i,y:o}=e,r=await async function(t,e){const{placement:i,platform:o,elements:r}=t,n=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=br(i),a=pr(i),l="x"===mr(i),c=["left","top"].includes(s)?-1:1,d=n&&l?-1:1,h=yr(e,t);let{mainAxis:u,crossAxis:p,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&"number"==typeof g&&(p="end"===a?-1*g:g),l?{x:p*d,y:u*c}:{x:u*c,y:p*d}}(e,t);return{x:i+r.x,y:o+r.y,data:r}}}};function Er(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Rr(t){return Er(t).getComputedStyle(t)}function Tr(t){return t instanceof Er(t).Node}function Pr(t){return Tr(t)?(t.nodeName||"").toLowerCase():"#document"}function _r(t){return t instanceof Er(t).HTMLElement}function Or(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Er(t).ShadowRoot||t instanceof ShadowRoot)}function Dr(t){const{overflow:e,overflowX:i,overflowY:o,display:r}=Rr(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+i)&&!["inline","contents"].includes(r)}function Ur(t){return["table","td","th"].includes(Pr(t))}function qr(t){const e=Lr(),i=Rr(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function Lr(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Nr(t){return["html","body","#document"].includes(Pr(t))}const Fr=Math.min,Ir=Math.max,Gr=Math.round,Vr=Math.floor,Hr=t=>({x:t,y:t});function Jr(t){const e=Rr(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=_r(t),n=r?t.offsetWidth:i,s=r?t.offsetHeight:o,a=Gr(i)!==n||Gr(o)!==s;return a&&(i=n,o=s),{width:i,height:o,$:a}}function Xr(t){return t instanceof Er(t).Element}function Yr(t){return Xr(t)?t:t.contextElement}function Zr(t){const e=Yr(t);if(!_r(e))return Hr(1);const i=e.getBoundingClientRect(),{width:o,height:r,$:n}=Jr(e);let s=(n?Gr(i.width):i.width)/o,a=(n?Gr(i.height):i.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Kr=Hr(0);function Qr(t){const e=Er(t);return Lr()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Kr}function tn(t,e,i,o){void 0===e&&(e=!1),void 0===i&&(i=!1);const r=t.getBoundingClientRect(),n=Yr(t);let s=Hr(1);e&&(o?Xr(o)&&(s=Zr(o)):s=Zr(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==Er(t))&&e}(n,i,o)?Qr(n):Hr(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,d=r.width/s.x,h=r.height/s.y;if(n){const t=Er(n),e=o&&Xr(o)?Er(o):o;let i=t.frameElement;for(;i&&o&&e!==t;){const t=Zr(i),e=i.getBoundingClientRect(),o=getComputedStyle(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,n=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,h*=t.y,l+=r,c+=n,i=Er(i).frameElement}}return $r({width:d,height:h,x:l,y:c})}function en(t){return Xr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function on(t){return((Tr(t)?t.ownerDocument:t.document)||window.document).documentElement}function rn(t){return tn(on(t)).left+en(t).scrollLeft}function nn(t){if("html"===Pr(t))return t;const e=t.assignedSlot||t.parentNode||Or(t)&&t.host||on(t);return Or(e)?e.host:e}function sn(t){const e=nn(t);return Nr(e)?t.ownerDocument?t.ownerDocument.body:t.body:_r(e)&&Dr(e)?e:sn(e)}function an(t,e){var i;void 0===e&&(e=[]);const o=sn(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),n=Er(o);return r?e.concat(n,n.visualViewport||[],Dr(o)?o:[]):e.concat(o,an(o))}function ln(t,e,i){let o;if("viewport"===e)o=function(t,e){const i=Er(t),o=on(t),r=i.visualViewport;let n=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){n=r.width,s=r.height;const t=Lr();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:n,height:s,x:a,y:l}}(t,i);else if("document"===e)o=function(t){const e=on(t),i=en(t),o=t.ownerDocument.body,r=Ir(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),n=Ir(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-i.scrollLeft+rn(t);const a=-i.scrollTop;return"rtl"===Rr(o).direction&&(s+=Ir(e.clientWidth,o.clientWidth)-r),{width:r,height:n,x:s,y:a}}(on(t));else if(Xr(e))o=function(t,e){const i=tn(t,!0,"fixed"===e),o=i.top+t.clientTop,r=i.left+t.clientLeft,n=_r(t)?Zr(t):Hr(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:o*n.y}}(e,i);else{const i=Qr(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return $r(o)}function cn(t,e){const i=nn(t);return!(i===e||!Xr(i)||Nr(i))&&("fixed"===Rr(i).position||cn(i,e))}function dn(t,e,i){const o=_r(e),r=on(e),n="fixed"===i,s=tn(t,!0,n,e);let a={scrollLeft:0,scrollTop:0};const l=Hr(0);if(o||!o&&!n)if(("body"!==Pr(e)||Dr(r))&&(a=en(e)),_r(e)){const t=tn(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=rn(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function hn(t,e){return _r(t)&&"fixed"!==Rr(t).position?e?e(t):t.offsetParent:null}function un(t,e){const i=Er(t);if(!_r(t))return i;let o=hn(t,e);for(;o&&Ur(o)&&"static"===Rr(o).position;)o=hn(o,e);return o&&("html"===Pr(o)||"body"===Pr(o)&&"static"===Rr(o).position&&!qr(o))?i:o||function(t){let e=nn(t);for(;_r(e)&&!Nr(e);){if(qr(e))return e;e=nn(e)}return null}(t)||i}const pn={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:i,strategy:o}=t;const r=_r(i),n=on(i);if(i===n)return e;let s={scrollLeft:0,scrollTop:0},a=Hr(1);const l=Hr(0);if((r||!r&&"fixed"!==o)&&(("body"!==Pr(i)||Dr(n))&&(s=en(i)),_r(i))){const t=tn(i);a=Zr(i),l.x=t.x+i.clientLeft,l.y=t.y+i.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+l.x,y:e.y*a.y-s.scrollTop*a.y+l.y}},getDocumentElement:on,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:o,strategy:r}=t;const n=[..."clippingAncestors"===i?function(t,e){const i=e.get(t);if(i)return i;let o=an(t).filter((t=>Xr(t)&&"body"!==Pr(t))),r=null;const n="fixed"===Rr(t).position;let s=n?nn(t):t;for(;Xr(s)&&!Nr(s);){const e=Rr(s),i=qr(s);i||"fixed"!==e.position||(r=null),(n?!i&&!r:!i&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||Dr(s)&&!i&&cn(t,s))?o=o.filter((t=>t!==s)):r=e,s=nn(s)}return e.set(t,o),o}(e,this._c):[].concat(i),o],s=n[0],a=n.reduce(((t,i)=>{const o=ln(e,i,r);return t.top=Ir(o.top,t.top),t.right=Fr(o.right,t.right),t.bottom=Fr(o.bottom,t.bottom),t.left=Ir(o.left,t.left),t}),ln(e,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:un,getElementRects:async function(t){let{reference:e,floating:i,strategy:o}=t;const r=this.getOffsetParent||un,n=this.getDimensions;return{reference:dn(e,await r(i),o),floating:{x:0,y:0,...await n(i)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Jr(t)},getScale:Zr,isElement:Xr,isRTL:function(t){return"rtl"===getComputedStyle(t).direction}};function gn(t,e,i,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=Yr(t),d=r||n?[...c?an(c):[],...an(e)]:[];d.forEach((t=>{r&&t.addEventListener("scroll",i,{passive:!0}),n&&t.addEventListener("resize",i)}));const h=c&&a?function(t,e){let i,o=null;const r=on(t);function n(){clearTimeout(i),o&&o.disconnect(),o=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),n();const{left:c,top:d,width:h,height:u}=t.getBoundingClientRect();if(a||e(),!h||!u)return;const p={rootMargin:-Vr(d)+"px "+-Vr(r.clientWidth-(c+h))+"px "+-Vr(r.clientHeight-(d+u))+"px "+-Vr(c)+"px",threshold:Ir(0,Fr(1,l))||1};let g=!0;function b(t){const e=t[0].intersectionRatio;if(e!==l){if(!g)return s();e?s(!1,e):i=setTimeout((()=>{s(!1,1e-7)}),100)}g=!1}try{o=new IntersectionObserver(b,{...p,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(b,p)}o.observe(t)}(!0),n}(c,i):null;let u,p=-1,g=null;s&&(g=new ResizeObserver((t=>{let[o]=t;o&&o.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{g&&g.observe(e)}))),i()})),c&&!l&&g.observe(c),g.observe(e));let b=l?tn(t):null;return l&&function e(){const o=tn(t);!b||o.x===b.x&&o.y===b.y&&o.width===b.width&&o.height===b.height||i();b=o,u=requestAnimationFrame(e)}(),i(),()=>{d.forEach((t=>{r&&t.removeEventListener("scroll",i),n&&t.removeEventListener("resize",i)})),h&&h(),g&&g.disconnect(),g=null,l&&cancelAnimationFrame(u)}}const bn=(t,e,i)=>{const o=new Map,r={platform:pn,...i},n={...r.platform,_c:o};return(async(t,e,i)=>{const{placement:o="bottom",strategy:r="absolute",middleware:n=[],platform:s}=i,a=n.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:h}=fr(c,o,l),u=o,p={},g=0;for(let i=0;i<a.length;i++){const{name:n,fn:b}=a[i],{x:m,y:f,data:y,reset:v}=await b({x:d,y:h,initialPlacement:o,placement:u,strategy:r,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});d=null!=m?m:d,h=null!=f?f:h,p={...p,[n]:{...p[n],...y}},v&&g<=50&&(g++,"object"==typeof v&&(v.placement&&(u=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):v.rects),({x:d,y:h}=fr(c,u,l))),i=-1)}return{x:d,y:h,placement:u,strategy:r,middlewareData:p}})(t,e,{...r,platform:n})};var mn,fn;const yn={top:"",bottom:"",left:"",right:""};class vn extends de{static get properties(){return{position:{type:String,reflect:!0},placement:{type:String},open:{type:Boolean,reflect:!0}}}constructor(){super(),mn.set(this,void 0),this.getFloatingOffset=()=>20,this.renderArrow=()=>k`<span id="arrow">
|
|
2014
2023
|
<svg viewBox="0 0 20 10">
|
|
2015
2024
|
<polygon stroke-width="0" points="0,10 20,10 10,0" />
|
|
2016
2025
|
</svg>
|
|
2017
|
-
</span>`,this.reposition=async e=>{var o
|
|
2026
|
+
</span>`,this.reposition=async e=>{var i,o;if(null==this.floating||null==this.reference)return;const{x:r,y:n,placement:s,middlewareData:a}=await bn(this.reference,this.floating,{strategy:null!==(i=this.position)&&void 0!==i?i:"fixed",placement:null!==(o=this.placement)&&void 0!==o?o:"bottom-start",middleware:[Br(this.getFloatingOffset()),jr(),(void 0===l&&(l={}),{name:"shift",options:l,async fn(t){const{x:e,y:i,placement:o}=t,{mainAxis:r=!0,crossAxis:n=!1,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...a}=yr(l,t),c={x:e,y:i},d=await wr(t,a),h=mr(br(o)),u="x"===h?"y":"x";let p=c[h],g=c[u];if(r){const t="y"===h?"bottom":"right";p=zr(p+d["y"===h?"top":"left"],p,p-d[t])}if(n){const t="y"===u?"bottom":"right";g=zr(g+d["y"===u?"top":"left"],g,g-d[t])}const b=s.fn({...t,[h]:p,[u]:g});return{...b,data:{x:b.x-e,y:b.y-i}}}}),this.arrow?Sr({element:this.arrow,padding:16}):void 0]});var l;Object.assign(this.floating.style,{top:`${n}px`,left:`${r}px`}),null!=this.arrow&&a.arrow&&Object.assign(this.arrow.style,t(this,fn,"f").call(this,s,a.arrow)),this.emit("m-popover-reposition",{detail:{reason:e}})},fn.set(this,((t,e)=>{if(null==this.floating||null==this.reference||null==this.arrow||null==e)return{};const[i,o]=t.split("-"),{x:r,y:n}=e,s={top:"bottom",bottom:"top",left:"right",right:"left"}[i],a={top:"180deg",bottom:"0deg",left:"90deg",right:"-90deg"}[i],l=null!=o,c=this.reference.offsetWidth>this.floating.offsetWidth,d=this.reference.offsetHeight>this.floating.offsetHeight,h=["top","bottom"].includes(i),u=l&&(h?c:d),p=this.reference.getBoundingClientRect(),g=`calc(var(--m-popover-arrow-offset) + ${{top:p.height,bottom:p.height,right:p.width,left:p.width}[s]}px + ${this.getFloatingOffset()}px)`;let b={transform:`rotate(${a})`,...yn};if(u){const e={"top-start":"left","top-end":"right","bottom-start":"left","bottom-end":"right"}[t];b={...b,[s]:g,[e]:"10px"}}else b={...b,left:null!=r?`${r}px`:"",top:null!=n?`${n}px`:"",[s]:g};return b})),this.position="fixed",this.placement="top-end",this.open=!1}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=t(this,mn,"f"))||void 0===e||e.call(this)}firstUpdated(){this.open&&this.reposition("show"),e(this,mn,gn(this.reference,this.floating,(()=>{this.reposition("auto")})),"f")}updated(t){super.updated(t),this.open&&null!=t.get("placement")&&null!=this.placement&&this.reposition("placement")}get reference(){return this.getReferenceElement()}get floating(){return this.getFloatingElement()}get arrow(){return this.getArrowElement()}show(){this.open||(this.open=!0,this.reposition("show"))}hide(){this.open&&(this.open=!1)}toggle(){this.open?this.hide():this.show()}}var $n,wn,xn,kn,zn,Sn,Cn,Mn,Wn;mn=new WeakMap,fn=new WeakMap;class An extends vn{static get properties(){return{...vn.properties,trigger:{type:String,converter:{fromAttribute:ur}}}}constructor(){super(),$n.set(this,void 0),wn.set(this,void 0),xn.set(this,(()=>{t(this,Wn,"f").call(this,"focus")&&(clearTimeout(t(this,wn,"f")),e(this,wn,window.setTimeout((()=>this.show()),450),"f"))})),kn.set(this,(()=>{t(this,Wn,"f").call(this,"focus")&&(clearTimeout(t(this,wn,"f")),e(this,wn,window.setTimeout((()=>this.hide()),450),"f"))})),zn.set(this,(()=>{t(this,Wn,"f").call(this,"click")&&this.toggle()})),Sn.set(this,(t=>{this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide())})),Cn.set(this,(()=>{t(this,Wn,"f").call(this,"hover")&&(clearTimeout(t(this,$n,"f")),e(this,$n,window.setTimeout((()=>this.show()),450),"f"))})),Mn.set(this,(()=>{t(this,Wn,"f").call(this,"hover")&&(clearTimeout(t(this,$n,"f")),e(this,$n,window.setTimeout((()=>this.hide()),450),"f"))})),Wn.set(this,(t=>this.trigger.includes(t))),this.position="fixed",this.placement="top-start",this.trigger=["hover","focus"]}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",t(this,kn,"f"),!0),this.addEventListener("click",t(this,zn,"f")),this.addEventListener("focus",t(this,xn,"f"),!0),this.addEventListener("keydown",t(this,Sn,"f")),this.addEventListener("mouseout",t(this,Mn,"f")),this.addEventListener("mouseover",t(this,Cn,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",t(this,kn,"f"),!0),this.removeEventListener("focus",t(this,xn,"f"),!0),this.removeEventListener("click",t(this,zn,"f")),this.removeEventListener("keydown",t(this,Sn,"f")),this.removeEventListener("mouseover",t(this,Cn,"f")),this.removeEventListener("mouseout",t(this,Mn,"f"))}getReferenceElement(){const t=this.shadowRoot.querySelector('slot[name="reference"]'),[e]=t.assignedElements({flatten:!0});return e}getFloatingElement(){const t=this.shadowRoot.querySelector('slot[name="floating"]'),[e]=t.assignedElements({flatten:!0});return e}getArrowElement(){return this.shadowRoot.querySelector("#arrow")}render(){return k`
|
|
2018
2027
|
${this.renderArrow()}
|
|
2019
2028
|
<slot name="reference" aria-describedby="floating"></slot>
|
|
2020
2029
|
<slot
|
|
@@ -2114,5 +2123,5 @@ let qe=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
2114
2123
|
:host {
|
|
2115
2124
|
display: inline-block;
|
|
2116
2125
|
}
|
|
2117
|
-
`]],window.customElements.define("m-tooltip",An);const jn=["top","left","right","bottom","top-start","top-end","bottom-start","bottom-end"];export{
|
|
2118
|
-
//# sourceMappingURL=index-
|
|
2126
|
+
`]],window.customElements.define("m-tooltip",An);const jn=["top","left","right","bottom","top-start","top-end","bottom-start","bottom-end"];export{Xo as $,Fi as A,re as B,We as C,ii as D,Gi as E,Ii as F,vi as G,xi as H,wi as I,$i as J,gi as K,pi as L,ki as M,Ci as N,Si as O,Ai as P,Mi as Q,Bi as R,zi as S,ji as T,Xi as U,Yi as V,oo as W,ko as X,Vo as Y,Ho as Z,Jo as _,ne as a,ze as a0,Yo as a1,cr as a2,dr as a3,An as a4,jn as a5,z as b,se as c,ae as d,le as e,ce as f,Me as g,oe as h,Ae as i,je as j,Be as k,Re as l,De as m,$e as n,oi as o,ri as p,ai as q,li as r,ci as s,bi as t,mi as u,fi as v,yi as w,Pi as x,Ee as y,Ni as z};
|
|
2127
|
+
//# sourceMappingURL=index-ae54393b.js.map
|