cas-ds-web-components 1.2.52 → 1.2.53
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/build/cas-accordion-element.js +36 -30
- package/build/cas-accordion.js +36 -30
- package/build/cas-alert.js +54 -48
- package/build/cas-booking-box.js +21 -15
- package/build/cas-button.js +79 -73
- package/build/cas-checkbox.js +21 -15
- package/build/cas-date-picker-range.js +49 -43
- package/build/cas-date-picker.js +40 -34
- package/build/cas-ds-web-components.js +2409 -2191
- package/build/cas-header.js +2099 -1890
- package/build/cas-icon.js +305 -299
- package/build/cas-input-file.js +20 -14
- package/build/cas-input.js +55 -20
- package/build/cas-modal.js +19 -13
- package/build/cas-new-footer.js +37 -31
- package/build/cas-radio-button.js +214 -99
- package/build/cas-radio.js +20 -14
- package/build/cas-select.js +922 -721
- package/build/cas-share.js +40 -34
- package/build/cas-snackbar.js +38 -32
- package/build/cas-spinner.js +18 -12
- package/build/cas-text.js +22 -16
- package/build/cas-textfield.js +20 -14
- package/build/cas-theme-provider.js +15 -9
- package/build/cas-toggle.js +18 -12
- package/build/cas-tooltip.js +21 -15
- package/package.json +1 -1
|
@@ -1,35 +1,41 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(E,_){typeof exports=="object"&&typeof module<"u"?_(exports):typeof define=="function"&&define.amd?define(["exports"],_):(E=typeof globalThis<"u"?globalThis:E||self,_(E["cas-accordion"]={}))})(this,function(E){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const _=window,B=_.ShadowRoot&&(_.ShadyCSS===void 0||_.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,st=Symbol(),ot=new WeakMap;class Mt{constructor(t,e,i){if(this._$cssResult$=!0,i!==st)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(B&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=ot.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ot.set(e,t))}return t}toString(){return this.cssText}}const Rt=o=>new Mt(typeof o=="string"?o:o+"",void 0,st),kt=(o,t)=>{B?o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=_.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,o.appendChild(i)})},nt=B?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Rt(e)})(o):o;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var D;const k=window,rt=k.trustedTypes,Nt=rt?rt.emptyScript:"",lt=k.reactiveElementPolyfillSupport,I={toAttribute(o,t){switch(t){case Boolean:o=o?Nt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},at=(o,t)=>t!==o&&(t==t||o==o),V={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:at},q="finalized";class C extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),t}static createProperty(t,e=V){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const n=this[t];this[e]=s,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||V}static finalize(){if(this.hasOwnProperty(q))return!1;this[q]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}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 s of i)e.unshift(nt(s))}else t!==void 0&&e.push(nt(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||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=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return kt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=V){var s;const n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){const r=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:I).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,n=s._$Ev.get(t);if(n!==void 0&&this._$El!==n){const r=s.getPropertyOptions(n),h=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:I;this._$El=n,this[n]=h.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||at)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,n)=>this[n]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var n;return(n=s.hostUpdate)===null||n===void 0?void 0:n.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),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){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}C[q]=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},lt?.({ReactiveElement:C}),((D=k.reactiveElementVersions)!==null&&D!==void 0?D:k.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r](?:([^\\s"'>=/]+)([
|
|
15
|
-
\f\r]
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
*/var F;const N=window,S=N.trustedTypes,ht=S?S.createPolicy("lit-html",{createHTML:o=>o}):void 0,W="$lit$",f=`lit$${(Math.random()+"").slice(9)}$`,ct="?"+f,Ht=`<${ct}>`,y=document,U=()=>y.createComment(""),P=o=>o===null||typeof o!="object"&&typeof o!="function",dt=Array.isArray,Lt=o=>dt(o)||typeof o?.[Symbol.iterator]=="function",J=`[
|
|
14
|
+
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pt=/-->/g,ut=/>/g,g=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),$t=/'/g,vt=/"/g,_t=/^(?:script|style|textarea|title)$/i,jt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),zt=jt(1),m=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),ft=new WeakMap,A=y.createTreeWalker(y,129,null,!1);function yt(o,t){if(!Array.isArray(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ht!==void 0?ht.createHTML(t):t}const Bt=(o,t)=>{const e=o.length-1,i=[];let s,n=t===2?"<svg>":"",r=O;for(let h=0;h<e;h++){const l=o[h];let a,c,d=-1,u=0;for(;u<l.length&&(r.lastIndex=u,c=r.exec(l),c!==null);)u=r.lastIndex,r===O?c[1]==="!--"?r=pt:c[1]!==void 0?r=ut:c[2]!==void 0?(_t.test(c[2])&&(s=RegExp("</"+c[2],"g")),r=g):c[3]!==void 0&&(r=g):r===g?c[0]===">"?(r=s??O,d=-1):c[1]===void 0?d=-2:(d=r.lastIndex-c[2].length,a=c[1],r=c[3]===void 0?g:c[3]==='"'?vt:$t):r===vt||r===$t?r=g:r===pt||r===ut?r=O:(r=g,s=void 0);const v=r===g&&o[h+1].startsWith("/>")?" ":"";n+=r===O?l+Ht:d>=0?(i.push(a),l.slice(0,d)+W+l.slice(d)+f+v):l+f+(d===-2?(i.push(void 0),h):v)}return[yt(o,n+(o[e]||"<?>")+(t===2?"</svg>":"")),i]};class T{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,r=0;const h=t.length-1,l=this.parts,[a,c]=Bt(t,e);if(this.el=T.createElement(a,i),A.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(s=A.nextNode())!==null&&l.length<h;){if(s.nodeType===1){if(s.hasAttributes()){const d=[];for(const u of s.getAttributeNames())if(u.endsWith(W)||u.startsWith(f)){const v=c[r++];if(d.push(u),v!==void 0){const he=s.getAttribute(v.toLowerCase()+W).split(f),z=/([.?@])?(.*)/.exec(v);l.push({type:1,index:n,name:z[2],strings:he,ctor:z[1]==="."?It:z[1]==="?"?qt:z[1]==="@"?Ft:H})}else l.push({type:6,index:n})}for(const u of d)s.removeAttribute(u)}if(_t.test(s.tagName)){const d=s.textContent.split(f),u=d.length-1;if(u>0){s.textContent=S?S.emptyScript:"";for(let v=0;v<u;v++)s.append(d[v],U()),A.nextNode(),l.push({type:2,index:++n});s.append(d[u],U())}}}else if(s.nodeType===8)if(s.data===ct)l.push({type:2,index:n});else{let d=-1;for(;(d=s.data.indexOf(f,d+1))!==-1;)l.push({type:7,index:n}),d+=f.length-1}n++}}static createElement(t,e){const i=y.createElement("template");return i.innerHTML=t,i}}function b(o,t,e=o,i){var s,n,r,h;if(t===m)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const a=P(t)?void 0:t._$litDirective$;return l?.constructor!==a&&((n=l?._$AO)===null||n===void 0||n.call(l,!1),a===void 0?l=void 0:(l=new a(o),l._$AT(o,e,i)),i!==void 0?((r=(h=e)._$Co)!==null&&r!==void 0?r:h._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=b(o,l._$AS(o,t.values),l,i)),t}class Dt{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:s}=this._$AD,n=((e=t?.creationScope)!==null&&e!==void 0?e:y).importNode(i,!0);A.currentNode=n;let r=A.nextNode(),h=0,l=0,a=s[0];for(;a!==void 0;){if(h===a.index){let c;a.type===2?c=new M(r,r.nextSibling,this,t):a.type===1?c=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(c=new Wt(r,this,t)),this._$AV.push(c),a=s[++l]}h!==a?.index&&(r=A.nextNode(),h++)}return A.currentNode=y,n}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class M{constructor(t,e,i,s){var n;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(n=s?.isConnected)===null||n===void 0||n}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=b(this,t,e),P(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==m&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Lt(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!==p&&P(this._$AH)?this._$AA.nextSibling.data=t:this.$(y.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=T.createElement(yt(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===n)this._$AH.v(i);else{const r=new Dt(n,this),h=r.u(this.options);r.v(i),this.$(h),this._$AH=r}}_$AC(t){let e=ft.get(t.strings);return e===void 0&&ft.set(t.strings,e=new T(t)),e}T(t){dt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new M(this.k(U()),this.k(U()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class H{constructor(t,e,i,s,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=p}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const n=this.strings;let r=!1;if(n===void 0)t=b(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==m,r&&(this._$AH=t);else{const h=t;let l,a;for(t=n[0],l=0;l<n.length-1;l++)a=b(this,h[i+l],e,l),a===m&&(a=this._$AH[l]),r||(r=!P(a)||a!==this._$AH[l]),a===p?t=p:t!==p&&(t+=(a??"")+n[l+1]),this._$AH[l]=a}r&&!s&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class It extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}const Vt=S?S.emptyScript:"";class qt extends H{constructor(){super(...arguments),this.type=4}j(t){t&&t!==p?this.element.setAttribute(this.name,Vt):this.element.removeAttribute(this.name)}}class Ft extends H{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){var i;if((t=(i=b(this,t,e,0))!==null&&i!==void 0?i:p)===m)return;const s=this._$AH,n=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==p&&(s===p||n);n&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class Wt{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 gt=N.litHtmlPolyfillSupport;gt?.(T,M),((F=N.litHtmlVersions)!==null&&F!==void 0?F:N.litHtmlVersions=[]).push("2.8.0");const Jt=(o,t,e)=>{var i,s;const n=(i=e?.renderBefore)!==null&&i!==void 0?i:t;let r=n._$litPart$;if(r===void 0){const h=(s=e?.renderBefore)!==null&&s!==void 0?s:null;n._$litPart$=r=new M(t.insertBefore(U(),h),h,void 0,e??{})}return r._$AI(o),r};/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2019 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/const L=window,K=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Z=Symbol(),mt=new WeakMap;class At{constructor(t,e,i){if(this._$cssResult$=!0,i!==Z)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(K&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&mt.set(e,t))}return t}toString(){return this.cssText}}const $=o=>new At(typeof o=="string"?o:o+"",void 0,Z),Kt=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((i,s,n)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[n+1],o[0]);return new At(e,o,Z)},Zt=(o,t)=>{K?o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=L.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,o.appendChild(i)})},Et=K?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return $(e)})(o):o;/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/var Y;const j=window,St=j.trustedTypes,Yt=St?St.emptyScript:"",bt=j.reactiveElementPolyfillSupport,G={toAttribute(o,t){switch(t){case Boolean:o=o?Yt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},xt=(o,t)=>t!==o&&(t==t||o==o),Q={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:xt},X="finalized";class x extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),t}static createProperty(t,e=Q){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const n=this[t];this[e]=s,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Q}static finalize(){if(this.hasOwnProperty(X))return!1;this[X]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}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 s of i)e.unshift(Et(s))}else t!==void 0&&e.push(Et(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||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=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Zt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=Q){var s;const n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){const r=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:G).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,n=s._$Ev.get(t);if(n!==void 0&&this._$El!==n){const r=s.getPropertyOptions(n),h=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:G;this._$El=n,this[n]=h.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||xt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,n)=>this[n]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var n;return(n=s.hostUpdate)===null||n===void 0?void 0:n.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),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){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}x[X]=!0,x.elementProperties=new Map,x.elementStyles=[],x.shadowRootOptions={mode:"open"},bt?.({ReactiveElement:x}),((Y=j.reactiveElementVersions)!==null&&Y!==void 0?Y:j.reactiveElementVersions=[]).push("1.6.3");/**
|
|
18
24
|
* @license
|
|
19
25
|
* Copyright 2017 Google LLC
|
|
20
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/var
|
|
27
|
+
*/var tt,et;class w extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Jt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return m}}w.finalized=!0,w._$litElement$=!0,(tt=globalThis.litElementHydrateSupport)===null||tt===void 0||tt.call(globalThis,{LitElement:w});const wt=globalThis.litElementPolyfillSupport;wt?.({LitElement:w}),((et=globalThis.litElementVersions)!==null&&et!==void 0?et:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
22
28
|
* @license
|
|
23
29
|
* Copyright 2020 Google LLC
|
|
24
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/const
|
|
31
|
+
*/const Gt=Symbol.for(""),Qt=o=>{if(o?.r===Gt)return o?._$litStatic$},Ct=new Map,Xt=o=>(t,...e)=>{const i=e.length;let s,n;const r=[],h=[];let l,a=0,c=!1;for(;a<i;){for(l=t[a];a<i&&(n=e[a],(s=Qt(n))!==void 0);)l+=s+t[++a],c=!0;a!==i&&h.push(n),r.push(l),a++}if(a===i&&r.push(t[i]),c){const d=r.join("$$lit$$");(t=Ct.get(d))===void 0&&(r.raw=r,Ct.set(d,t=r)),e=h}return o(t,...e)},R=Xt(zt),Ut="#01A49A",te="#01736C",ee="#4DBFB8",Pt="#364855",ie="#4D5D68",Ot="#E9EBEC",Tt="#FFFFFF";var se=Kt`
|
|
26
32
|
.accordion-container {
|
|
27
33
|
position: relative;
|
|
28
34
|
box-sizing: border-box;
|
|
29
35
|
display: flex;
|
|
30
36
|
flex-direction: column;
|
|
31
37
|
width: 100%;
|
|
32
|
-
background: ${
|
|
38
|
+
background: ${$(Tt)};
|
|
33
39
|
border-radius: 8px;
|
|
34
40
|
margin-bottom: 12px;
|
|
35
41
|
}
|
|
@@ -43,17 +49,17 @@
|
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
.box:hover {
|
|
46
|
-
background: ${
|
|
52
|
+
background: ${$(Tt)};
|
|
47
53
|
box-shadow: 0 6px 20px #b2b9cf;
|
|
48
54
|
border-radius: 8px;
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
.accordion-container:hover header {
|
|
52
|
-
color: ${
|
|
58
|
+
color: ${$(Ut)};
|
|
53
59
|
}
|
|
54
60
|
|
|
55
61
|
.accordion-container:active header {
|
|
56
|
-
color: ${
|
|
62
|
+
color: ${$(te)};
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
header {
|
|
@@ -65,7 +71,7 @@
|
|
|
65
71
|
align-items: center;
|
|
66
72
|
gap: 32px;
|
|
67
73
|
padding: 24px 32px 24px 40px;
|
|
68
|
-
color: ${
|
|
74
|
+
color: ${$(Pt)};
|
|
69
75
|
}
|
|
70
76
|
|
|
71
77
|
header:after {
|
|
@@ -76,11 +82,11 @@
|
|
|
76
82
|
display: flex;
|
|
77
83
|
width: 100%;
|
|
78
84
|
height: 1px;
|
|
79
|
-
background: ${
|
|
85
|
+
background: ${$(Ot)};
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
.open header:after {
|
|
83
|
-
background: ${
|
|
89
|
+
background: ${$(ee)};
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
.box header:after {
|
|
@@ -90,15 +96,15 @@
|
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
header cas-text:nth-child(2) {
|
|
93
|
-
color: ${
|
|
99
|
+
color: ${$(ie)};
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
.open.box header {
|
|
97
|
-
color: ${
|
|
103
|
+
color: ${$(Ut)};
|
|
98
104
|
}
|
|
99
105
|
|
|
100
106
|
.open.box header:after {
|
|
101
|
-
background: ${
|
|
107
|
+
background: ${$(Ot)};
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
header .left {
|
|
@@ -114,7 +120,7 @@
|
|
|
114
120
|
display: flex;
|
|
115
121
|
flex-direction: column;
|
|
116
122
|
gap: 24px;
|
|
117
|
-
color: ${
|
|
123
|
+
color: ${$(Pt)};
|
|
118
124
|
}
|
|
119
125
|
|
|
120
126
|
.box .content {
|
|
@@ -143,24 +149,24 @@
|
|
|
143
149
|
* @license
|
|
144
150
|
* Copyright 2017 Google LLC
|
|
145
151
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
146
|
-
*/const
|
|
152
|
+
*/const oe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ne=o=>(...t)=>({_$litDirective$:o,values:t});class re{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
|
147
153
|
* @license
|
|
148
154
|
* Copyright 2018 Google LLC
|
|
149
155
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
150
|
-
*/const
|
|
151
|
-
<article class=${
|
|
156
|
+
*/const le=ne(class extends re{constructor(o){var t;if(super(o),o.type!==oe.ATTRIBUTE||o.name!=="class"||((t=o.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){var e,i;if(this.it===void 0){this.it=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!(!((e=this.nt)===null||e===void 0)&&e.has(n))&&this.it.add(n);return this.render(t)}const s=o.element.classList;this.it.forEach(n=>{n in t||(s.remove(n),this.it.delete(n))});for(const n in t){const r=!!t[n];r===this.it.has(n)||((i=this.nt)===null||i===void 0?void 0:i.has(n))||(r?(s.add(n),this.it.add(n)):(s.remove(n),this.it.delete(n)))}return m}});function ae({variant:o,open:t}){const e=le({"accordion-container":!0,[o]:!0,open:t}),s=(()=>{if(window.matchMedia("(min-width: 768px)").matches)return"desktop";if(window.matchMedia("(max-width: 767px)").matches)return"mobile"})();return{accordionStyle:e,iconSize:{desktop:"24",mobile:"16"}[s]}}class it extends w{static styles=se;static shadowRootOptions={...w.shadowRootOptions,mode:"open"};constructor(){super(),this.open=!1,this.variant="simple",this.title="",this.text=""}static properties={open:{type:Boolean},variant:{type:String},title:{type:String},text:{type:String},content:{type:String}};toggleAccordion(){this.open=!this.open,this.requestUpdate()}render(){const{open:t,title:e,text:i,content:s}=this,{accordionStyle:n,iconSize:r}=ae({variant:this.variant,open:this.open}),h={true:"flat-minus",false:"flat-plus"};return R`
|
|
157
|
+
<article class=${n}>
|
|
152
158
|
<header @click="${this.toggleAccordion}">
|
|
153
159
|
<div class="left">
|
|
154
|
-
${e!==""?
|
|
155
|
-
${i!==""?
|
|
160
|
+
${e!==""?R` <cas-text variant="headline3">${e}</cas-text>`:""}
|
|
161
|
+
${i!==""?R` <cas-text variant="footnote2">${i}</cas-text>`:""}
|
|
156
162
|
</div>
|
|
157
|
-
<cas-icon name="${
|
|
163
|
+
<cas-icon name="${h[t]}" size="${r}"></cas-icon>
|
|
158
164
|
</header>
|
|
159
|
-
${t?
|
|
165
|
+
${t?R`
|
|
160
166
|
<div class="content">
|
|
161
|
-
${s!==""?
|
|
167
|
+
${s!==""?R` <cas-text variant="body1" text="${s}"></cas-text>`:""}
|
|
162
168
|
<slot></slot>
|
|
163
169
|
</div>
|
|
164
170
|
`:""}
|
|
165
171
|
</article>
|
|
166
|
-
`}}customElements.define("cas-accordion",
|
|
172
|
+
`}}customElements.define("cas-accordion",it),customElements.get("cas-accordion-element")||customElements.define("cas-accordion-element",class extends it{}),E.CasAccordion=it,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/build/cas-accordion.js
CHANGED
|
@@ -1,35 +1,41 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(E,_){typeof exports=="object"&&typeof module<"u"?_(exports):typeof define=="function"&&define.amd?define(["exports"],_):(E=typeof globalThis<"u"?globalThis:E||self,_(E["cas-accordion"]={}))})(this,function(E){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const _=window,B=_.ShadowRoot&&(_.ShadyCSS===void 0||_.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,st=Symbol(),ot=new WeakMap;class Mt{constructor(t,e,i){if(this._$cssResult$=!0,i!==st)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(B&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=ot.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ot.set(e,t))}return t}toString(){return this.cssText}}const Rt=o=>new Mt(typeof o=="string"?o:o+"",void 0,st),kt=(o,t)=>{B?o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=_.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,o.appendChild(i)})},nt=B?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Rt(e)})(o):o;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var D;const k=window,rt=k.trustedTypes,Nt=rt?rt.emptyScript:"",lt=k.reactiveElementPolyfillSupport,I={toAttribute(o,t){switch(t){case Boolean:o=o?Nt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},at=(o,t)=>t!==o&&(t==t||o==o),V={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:at},q="finalized";class C extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),t}static createProperty(t,e=V){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const n=this[t];this[e]=s,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||V}static finalize(){if(this.hasOwnProperty(q))return!1;this[q]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}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 s of i)e.unshift(nt(s))}else t!==void 0&&e.push(nt(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||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=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return kt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=V){var s;const n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){const r=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:I).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,n=s._$Ev.get(t);if(n!==void 0&&this._$El!==n){const r=s.getPropertyOptions(n),h=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:I;this._$El=n,this[n]=h.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||at)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,n)=>this[n]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var n;return(n=s.hostUpdate)===null||n===void 0?void 0:n.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),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){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}C[q]=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},lt?.({ReactiveElement:C}),((D=k.reactiveElementVersions)!==null&&D!==void 0?D:k.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r](?:([^\\s"'>=/]+)([
|
|
15
|
-
\f\r]
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
*/var F;const N=window,S=N.trustedTypes,ht=S?S.createPolicy("lit-html",{createHTML:o=>o}):void 0,W="$lit$",f=`lit$${(Math.random()+"").slice(9)}$`,ct="?"+f,Ht=`<${ct}>`,y=document,U=()=>y.createComment(""),P=o=>o===null||typeof o!="object"&&typeof o!="function",dt=Array.isArray,Lt=o=>dt(o)||typeof o?.[Symbol.iterator]=="function",J=`[
|
|
14
|
+
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pt=/-->/g,ut=/>/g,g=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),$t=/'/g,vt=/"/g,_t=/^(?:script|style|textarea|title)$/i,jt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),zt=jt(1),m=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),ft=new WeakMap,A=y.createTreeWalker(y,129,null,!1);function yt(o,t){if(!Array.isArray(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ht!==void 0?ht.createHTML(t):t}const Bt=(o,t)=>{const e=o.length-1,i=[];let s,n=t===2?"<svg>":"",r=O;for(let h=0;h<e;h++){const l=o[h];let a,c,d=-1,u=0;for(;u<l.length&&(r.lastIndex=u,c=r.exec(l),c!==null);)u=r.lastIndex,r===O?c[1]==="!--"?r=pt:c[1]!==void 0?r=ut:c[2]!==void 0?(_t.test(c[2])&&(s=RegExp("</"+c[2],"g")),r=g):c[3]!==void 0&&(r=g):r===g?c[0]===">"?(r=s??O,d=-1):c[1]===void 0?d=-2:(d=r.lastIndex-c[2].length,a=c[1],r=c[3]===void 0?g:c[3]==='"'?vt:$t):r===vt||r===$t?r=g:r===pt||r===ut?r=O:(r=g,s=void 0);const v=r===g&&o[h+1].startsWith("/>")?" ":"";n+=r===O?l+Ht:d>=0?(i.push(a),l.slice(0,d)+W+l.slice(d)+f+v):l+f+(d===-2?(i.push(void 0),h):v)}return[yt(o,n+(o[e]||"<?>")+(t===2?"</svg>":"")),i]};class T{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,r=0;const h=t.length-1,l=this.parts,[a,c]=Bt(t,e);if(this.el=T.createElement(a,i),A.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(s=A.nextNode())!==null&&l.length<h;){if(s.nodeType===1){if(s.hasAttributes()){const d=[];for(const u of s.getAttributeNames())if(u.endsWith(W)||u.startsWith(f)){const v=c[r++];if(d.push(u),v!==void 0){const he=s.getAttribute(v.toLowerCase()+W).split(f),z=/([.?@])?(.*)/.exec(v);l.push({type:1,index:n,name:z[2],strings:he,ctor:z[1]==="."?It:z[1]==="?"?qt:z[1]==="@"?Ft:H})}else l.push({type:6,index:n})}for(const u of d)s.removeAttribute(u)}if(_t.test(s.tagName)){const d=s.textContent.split(f),u=d.length-1;if(u>0){s.textContent=S?S.emptyScript:"";for(let v=0;v<u;v++)s.append(d[v],U()),A.nextNode(),l.push({type:2,index:++n});s.append(d[u],U())}}}else if(s.nodeType===8)if(s.data===ct)l.push({type:2,index:n});else{let d=-1;for(;(d=s.data.indexOf(f,d+1))!==-1;)l.push({type:7,index:n}),d+=f.length-1}n++}}static createElement(t,e){const i=y.createElement("template");return i.innerHTML=t,i}}function b(o,t,e=o,i){var s,n,r,h;if(t===m)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const a=P(t)?void 0:t._$litDirective$;return l?.constructor!==a&&((n=l?._$AO)===null||n===void 0||n.call(l,!1),a===void 0?l=void 0:(l=new a(o),l._$AT(o,e,i)),i!==void 0?((r=(h=e)._$Co)!==null&&r!==void 0?r:h._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=b(o,l._$AS(o,t.values),l,i)),t}class Dt{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:s}=this._$AD,n=((e=t?.creationScope)!==null&&e!==void 0?e:y).importNode(i,!0);A.currentNode=n;let r=A.nextNode(),h=0,l=0,a=s[0];for(;a!==void 0;){if(h===a.index){let c;a.type===2?c=new M(r,r.nextSibling,this,t):a.type===1?c=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(c=new Wt(r,this,t)),this._$AV.push(c),a=s[++l]}h!==a?.index&&(r=A.nextNode(),h++)}return A.currentNode=y,n}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class M{constructor(t,e,i,s){var n;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(n=s?.isConnected)===null||n===void 0||n}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=b(this,t,e),P(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==m&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Lt(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!==p&&P(this._$AH)?this._$AA.nextSibling.data=t:this.$(y.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=T.createElement(yt(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===n)this._$AH.v(i);else{const r=new Dt(n,this),h=r.u(this.options);r.v(i),this.$(h),this._$AH=r}}_$AC(t){let e=ft.get(t.strings);return e===void 0&&ft.set(t.strings,e=new T(t)),e}T(t){dt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new M(this.k(U()),this.k(U()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class H{constructor(t,e,i,s,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=p}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const n=this.strings;let r=!1;if(n===void 0)t=b(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==m,r&&(this._$AH=t);else{const h=t;let l,a;for(t=n[0],l=0;l<n.length-1;l++)a=b(this,h[i+l],e,l),a===m&&(a=this._$AH[l]),r||(r=!P(a)||a!==this._$AH[l]),a===p?t=p:t!==p&&(t+=(a??"")+n[l+1]),this._$AH[l]=a}r&&!s&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class It extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}const Vt=S?S.emptyScript:"";class qt extends H{constructor(){super(...arguments),this.type=4}j(t){t&&t!==p?this.element.setAttribute(this.name,Vt):this.element.removeAttribute(this.name)}}class Ft extends H{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){var i;if((t=(i=b(this,t,e,0))!==null&&i!==void 0?i:p)===m)return;const s=this._$AH,n=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==p&&(s===p||n);n&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class Wt{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 gt=N.litHtmlPolyfillSupport;gt?.(T,M),((F=N.litHtmlVersions)!==null&&F!==void 0?F:N.litHtmlVersions=[]).push("2.8.0");const Jt=(o,t,e)=>{var i,s;const n=(i=e?.renderBefore)!==null&&i!==void 0?i:t;let r=n._$litPart$;if(r===void 0){const h=(s=e?.renderBefore)!==null&&s!==void 0?s:null;n._$litPart$=r=new M(t.insertBefore(U(),h),h,void 0,e??{})}return r._$AI(o),r};/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2019 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/const L=window,K=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Z=Symbol(),mt=new WeakMap;class At{constructor(t,e,i){if(this._$cssResult$=!0,i!==Z)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(K&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&mt.set(e,t))}return t}toString(){return this.cssText}}const $=o=>new At(typeof o=="string"?o:o+"",void 0,Z),Kt=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((i,s,n)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[n+1],o[0]);return new At(e,o,Z)},Zt=(o,t)=>{K?o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=L.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,o.appendChild(i)})},Et=K?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return $(e)})(o):o;/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/var Y;const j=window,St=j.trustedTypes,Yt=St?St.emptyScript:"",bt=j.reactiveElementPolyfillSupport,G={toAttribute(o,t){switch(t){case Boolean:o=o?Yt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},xt=(o,t)=>t!==o&&(t==t||o==o),Q={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:xt},X="finalized";class x extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),t}static createProperty(t,e=Q){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const n=this[t];this[e]=s,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Q}static finalize(){if(this.hasOwnProperty(X))return!1;this[X]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}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 s of i)e.unshift(Et(s))}else t!==void 0&&e.push(Et(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||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=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Zt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=Q){var s;const n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){const r=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:G).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,n=s._$Ev.get(t);if(n!==void 0&&this._$El!==n){const r=s.getPropertyOptions(n),h=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:G;this._$El=n,this[n]=h.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||xt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,n)=>this[n]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var n;return(n=s.hostUpdate)===null||n===void 0?void 0:n.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),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){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}x[X]=!0,x.elementProperties=new Map,x.elementStyles=[],x.shadowRootOptions={mode:"open"},bt?.({ReactiveElement:x}),((Y=j.reactiveElementVersions)!==null&&Y!==void 0?Y:j.reactiveElementVersions=[]).push("1.6.3");/**
|
|
18
24
|
* @license
|
|
19
25
|
* Copyright 2017 Google LLC
|
|
20
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/var
|
|
27
|
+
*/var tt,et;class w extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Jt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return m}}w.finalized=!0,w._$litElement$=!0,(tt=globalThis.litElementHydrateSupport)===null||tt===void 0||tt.call(globalThis,{LitElement:w});const wt=globalThis.litElementPolyfillSupport;wt?.({LitElement:w}),((et=globalThis.litElementVersions)!==null&&et!==void 0?et:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
22
28
|
* @license
|
|
23
29
|
* Copyright 2020 Google LLC
|
|
24
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/const
|
|
31
|
+
*/const Gt=Symbol.for(""),Qt=o=>{if(o?.r===Gt)return o?._$litStatic$},Ct=new Map,Xt=o=>(t,...e)=>{const i=e.length;let s,n;const r=[],h=[];let l,a=0,c=!1;for(;a<i;){for(l=t[a];a<i&&(n=e[a],(s=Qt(n))!==void 0);)l+=s+t[++a],c=!0;a!==i&&h.push(n),r.push(l),a++}if(a===i&&r.push(t[i]),c){const d=r.join("$$lit$$");(t=Ct.get(d))===void 0&&(r.raw=r,Ct.set(d,t=r)),e=h}return o(t,...e)},R=Xt(zt),Ut="#01A49A",te="#01736C",ee="#4DBFB8",Pt="#364855",ie="#4D5D68",Ot="#E9EBEC",Tt="#FFFFFF";var se=Kt`
|
|
26
32
|
.accordion-container {
|
|
27
33
|
position: relative;
|
|
28
34
|
box-sizing: border-box;
|
|
29
35
|
display: flex;
|
|
30
36
|
flex-direction: column;
|
|
31
37
|
width: 100%;
|
|
32
|
-
background: ${
|
|
38
|
+
background: ${$(Tt)};
|
|
33
39
|
border-radius: 8px;
|
|
34
40
|
margin-bottom: 12px;
|
|
35
41
|
}
|
|
@@ -43,17 +49,17 @@
|
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
.box:hover {
|
|
46
|
-
background: ${
|
|
52
|
+
background: ${$(Tt)};
|
|
47
53
|
box-shadow: 0 6px 20px #b2b9cf;
|
|
48
54
|
border-radius: 8px;
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
.accordion-container:hover header {
|
|
52
|
-
color: ${
|
|
58
|
+
color: ${$(Ut)};
|
|
53
59
|
}
|
|
54
60
|
|
|
55
61
|
.accordion-container:active header {
|
|
56
|
-
color: ${
|
|
62
|
+
color: ${$(te)};
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
header {
|
|
@@ -65,7 +71,7 @@
|
|
|
65
71
|
align-items: center;
|
|
66
72
|
gap: 32px;
|
|
67
73
|
padding: 24px 32px 24px 40px;
|
|
68
|
-
color: ${
|
|
74
|
+
color: ${$(Pt)};
|
|
69
75
|
}
|
|
70
76
|
|
|
71
77
|
header:after {
|
|
@@ -76,11 +82,11 @@
|
|
|
76
82
|
display: flex;
|
|
77
83
|
width: 100%;
|
|
78
84
|
height: 1px;
|
|
79
|
-
background: ${
|
|
85
|
+
background: ${$(Ot)};
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
.open header:after {
|
|
83
|
-
background: ${
|
|
89
|
+
background: ${$(ee)};
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
.box header:after {
|
|
@@ -90,15 +96,15 @@
|
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
header cas-text:nth-child(2) {
|
|
93
|
-
color: ${
|
|
99
|
+
color: ${$(ie)};
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
.open.box header {
|
|
97
|
-
color: ${
|
|
103
|
+
color: ${$(Ut)};
|
|
98
104
|
}
|
|
99
105
|
|
|
100
106
|
.open.box header:after {
|
|
101
|
-
background: ${
|
|
107
|
+
background: ${$(Ot)};
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
header .left {
|
|
@@ -114,7 +120,7 @@
|
|
|
114
120
|
display: flex;
|
|
115
121
|
flex-direction: column;
|
|
116
122
|
gap: 24px;
|
|
117
|
-
color: ${
|
|
123
|
+
color: ${$(Pt)};
|
|
118
124
|
}
|
|
119
125
|
|
|
120
126
|
.box .content {
|
|
@@ -143,24 +149,24 @@
|
|
|
143
149
|
* @license
|
|
144
150
|
* Copyright 2017 Google LLC
|
|
145
151
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
146
|
-
*/const
|
|
152
|
+
*/const oe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ne=o=>(...t)=>({_$litDirective$:o,values:t});class re{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
|
147
153
|
* @license
|
|
148
154
|
* Copyright 2018 Google LLC
|
|
149
155
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
150
|
-
*/const
|
|
151
|
-
<article class=${
|
|
156
|
+
*/const le=ne(class extends re{constructor(o){var t;if(super(o),o.type!==oe.ATTRIBUTE||o.name!=="class"||((t=o.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){var e,i;if(this.it===void 0){this.it=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!(!((e=this.nt)===null||e===void 0)&&e.has(n))&&this.it.add(n);return this.render(t)}const s=o.element.classList;this.it.forEach(n=>{n in t||(s.remove(n),this.it.delete(n))});for(const n in t){const r=!!t[n];r===this.it.has(n)||((i=this.nt)===null||i===void 0?void 0:i.has(n))||(r?(s.add(n),this.it.add(n)):(s.remove(n),this.it.delete(n)))}return m}});function ae({variant:o,open:t}){const e=le({"accordion-container":!0,[o]:!0,open:t}),s=(()=>{if(window.matchMedia("(min-width: 768px)").matches)return"desktop";if(window.matchMedia("(max-width: 767px)").matches)return"mobile"})();return{accordionStyle:e,iconSize:{desktop:"24",mobile:"16"}[s]}}class it extends w{static styles=se;static shadowRootOptions={...w.shadowRootOptions,mode:"open"};constructor(){super(),this.open=!1,this.variant="simple",this.title="",this.text=""}static properties={open:{type:Boolean},variant:{type:String},title:{type:String},text:{type:String},content:{type:String}};toggleAccordion(){this.open=!this.open,this.requestUpdate()}render(){const{open:t,title:e,text:i,content:s}=this,{accordionStyle:n,iconSize:r}=ae({variant:this.variant,open:this.open}),h={true:"flat-minus",false:"flat-plus"};return R`
|
|
157
|
+
<article class=${n}>
|
|
152
158
|
<header @click="${this.toggleAccordion}">
|
|
153
159
|
<div class="left">
|
|
154
|
-
${e!==""?
|
|
155
|
-
${i!==""?
|
|
160
|
+
${e!==""?R` <cas-text variant="headline3">${e}</cas-text>`:""}
|
|
161
|
+
${i!==""?R` <cas-text variant="footnote2">${i}</cas-text>`:""}
|
|
156
162
|
</div>
|
|
157
|
-
<cas-icon name="${
|
|
163
|
+
<cas-icon name="${h[t]}" size="${r}"></cas-icon>
|
|
158
164
|
</header>
|
|
159
|
-
${t?
|
|
165
|
+
${t?R`
|
|
160
166
|
<div class="content">
|
|
161
|
-
${s!==""?
|
|
167
|
+
${s!==""?R` <cas-text variant="body1" text="${s}"></cas-text>`:""}
|
|
162
168
|
<slot></slot>
|
|
163
169
|
</div>
|
|
164
170
|
`:""}
|
|
165
171
|
</article>
|
|
166
|
-
`}}customElements.define("cas-accordion",
|
|
172
|
+
`}}customElements.define("cas-accordion",it),customElements.get("cas-accordion-element")||customElements.define("cas-accordion-element",class extends it{}),E.CasAccordion=it,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|