@cas-smartdesign/virtual-list 6.2.3 → 6.3.0

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.
@@ -1,10 +1,10 @@
1
- var window;(window||={})["@cas-smartdesign/virtual-list"]=(()=>{var Q=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Wt=Object.getOwnPropertyNames;var Vt=Object.prototype.hasOwnProperty;var jt=(i,t)=>{for(var e in t)Q(i,e,{get:t[e],enumerable:!0})},Bt=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Wt(t))!Vt.call(i,n)&&n!==e&&Q(i,n,{get:()=>t[n],enumerable:!(s=Kt(t,n))||s.enumerable});return i};var Ft=i=>Bt(Q({},"__esModule",{value:!0}),i);var he={};jt(he,{ListDataProvider:()=>vt,SelectionType:()=>Ut,default:()=>zt});var j=window,B=j.ShadowRoot&&(j.ShadyCSS===void 0||j.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,X=Symbol(),_t=new WeakMap,P=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==X)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(B&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=_t.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&_t.set(e,t))}return t}toString(){return this.cssText}},k=i=>new P(typeof i=="string"?i:i+"",void 0,X),M=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((s,n,o)=>s+(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.")})(n)+i[o+1],i[0]);return new P(e,i,X)},tt=(i,t)=>{B?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{let s=document.createElement("style"),n=j.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=e.cssText,i.appendChild(s)})},F=B?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return k(e)})(i):i;var et,G=window,gt=G.trustedTypes,Gt=gt?gt.emptyScript:"",bt=G.reactiveElementPolyfillSupport,st={toAttribute(i,t){switch(t){case Boolean:i=i?Gt:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},yt=(i,t)=>t!==i&&(t==t||i==i),it={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:yt},nt="finalized",b=class 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();let t=[];return this.elementProperties.forEach((e,s)=>{let n=this._$Ep(s,e);n!==void 0&&(this._$Ev.set(n,s),t.push(n))}),t}static createProperty(t,e=it){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){let s=typeof t=="symbol"?Symbol():"__"+t,n=this.getPropertyDescriptor(t,s,e);n!==void 0&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(n){let o=this[t];this[e]=n,this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||it}static finalize(){if(this.hasOwnProperty(nt))return!1;this[nt]=!0;let 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")){let e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let n of s)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let n of s)e.unshift(F(n))}else t!==void 0&&e.push(F(t));return e}static _$Ep(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.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;let e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return tt(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 s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=it){var n;let o=this.constructor._$Ep(t,s);if(o!==void 0&&s.reflect===!0){let r=(((n=s.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?s.converter:st).toAttribute(e,s.type);this._$El=t,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var s;let n=this.constructor,o=n._$Ev.get(t);if(o!==void 0&&this._$El!==o){let r=n.getPropertyOptions(o),h=typeof r.converter=="function"?{fromAttribute:r.converter}:((s=r.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?r.converter:st;this._$El=o,this[o]=h.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,s){let n=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||yt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}let 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((n,o)=>this[o]=n),this._$Ei=void 0);let e=!1,s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(n=>{var o;return(o=n.hostUpdate)===null||o===void 0?void 0:o.call(n)}),this.update(s)):this._$Ek()}catch(n){throw e=!1,this._$Ek(),n}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var n;return(n=s.hostUpdated)===null||n===void 0?void 0:n.call(s)}),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,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};b[nt]=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},bt?.({ReactiveElement:b}),((et=G.reactiveElementVersions)!==null&&et!==void 0?et:G.reactiveElementVersions=[]).push("1.6.3");var ot,J=window,N=J.trustedTypes,$t=N?N.createPolicy("lit-html",{createHTML:i=>i}):void 0,lt="$lit$",x=`lit$${(Math.random()+"").slice(9)}$`,Et="?"+x,Jt=`<${Et}>`,C=document,O=()=>C.createComment(""),U=i=>i===null||typeof i!="object"&&typeof i!="function",Tt=Array.isArray,Yt=i=>Tt(i)||typeof i?.[Symbol.iterator]=="function",rt=`[
2
- \f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xt=/-->/g,At=/>/g,S=RegExp(`>|${rt}(?:([^\\s"'>=/]+)(${rt}*=${rt}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,St=/"/g,Lt=/^(?:script|style|textarea|title)$/i,kt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),E=kt(1),fe=kt(2),y=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),wt=new WeakMap,w=C.createTreeWalker(C,129,null,!1);function Nt(i,t){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return $t!==void 0?$t.createHTML(t):t}var Zt=(i,t)=>{let e=i.length-1,s=[],n,o=t===2?"<svg>":"",r=H;for(let h=0;h<e;h++){let l=i[h],a,c,p=-1,m=0;for(;m<l.length&&(r.lastIndex=m,c=r.exec(l),c!==null);)m=r.lastIndex,r===H?c[1]==="!--"?r=xt:c[1]!==void 0?r=At:c[2]!==void 0?(Lt.test(c[2])&&(n=RegExp("</"+c[2],"g")),r=S):c[3]!==void 0&&(r=S):r===S?c[0]===">"?(r=n??H,p=-1):c[1]===void 0?p=-2:(p=r.lastIndex-c[2].length,a=c[1],r=c[3]===void 0?S:c[3]==='"'?St:It):r===St||r===It?r=S:r===xt||r===At?r=H:(r=S,n=void 0);let _=r===S&&i[h+1].startsWith("/>")?" ":"";o+=r===H?l+Jt:p>=0?(s.push(a),l.slice(0,p)+lt+l.slice(p)+x+_):l+x+(p===-2?(s.push(void 0),h):_)}return[Nt(i,o+(i[e]||"<?>")+(t===2?"</svg>":"")),s]},z=class i{constructor({strings:t,_$litType$:e},s){let n;this.parts=[];let o=0,r=0,h=t.length-1,l=this.parts,[a,c]=Zt(t,e);if(this.el=i.createElement(a,s),w.currentNode=this.el.content,e===2){let p=this.el.content,m=p.firstChild;m.remove(),p.append(...m.childNodes)}for(;(n=w.nextNode())!==null&&l.length<h;){if(n.nodeType===1){if(n.hasAttributes()){let p=[];for(let m of n.getAttributeNames())if(m.endsWith(lt)||m.startsWith(x)){let _=c[r++];if(p.push(m),_!==void 0){let qt=n.getAttribute(_.toLowerCase()+lt).split(x),V=/([.?@])?(.*)/.exec(_);l.push({type:1,index:o,name:V[2],strings:qt,ctor:V[1]==="."?ht:V[1]==="?"?dt:V[1]==="@"?ct:D})}else l.push({type:6,index:o})}for(let m of p)n.removeAttribute(m)}if(Lt.test(n.tagName)){let p=n.textContent.split(x),m=p.length-1;if(m>0){n.textContent=N?N.emptyScript:"";for(let _=0;_<m;_++)n.append(p[_],O()),w.nextNode(),l.push({type:2,index:++o});n.append(p[m],O())}}}else if(n.nodeType===8)if(n.data===Et)l.push({type:2,index:o});else{let p=-1;for(;(p=n.data.indexOf(x,p+1))!==-1;)l.push({type:7,index:o}),p+=x.length-1}o++}}static createElement(t,e){let s=C.createElement("template");return s.innerHTML=t,s}};function R(i,t,e=i,s){var n,o,r,h;if(t===y)return t;let l=s!==void 0?(n=e._$Co)===null||n===void 0?void 0:n[s]:e._$Cl,a=U(t)?void 0:t._$litDirective$;return l?.constructor!==a&&((o=l?._$AO)===null||o===void 0||o.call(l,!1),a===void 0?l=void 0:(l=new a(i),l._$AT(i,e,s)),s!==void 0?((r=(h=e)._$Co)!==null&&r!==void 0?r:h._$Co=[])[s]=l:e._$Cl=l),l!==void 0&&(t=R(i,l._$AS(i,t.values),l,s)),t}var at=class{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;let{el:{content:s},parts:n}=this._$AD,o=((e=t?.creationScope)!==null&&e!==void 0?e:C).importNode(s,!0);w.currentNode=o;let r=w.nextNode(),h=0,l=0,a=n[0];for(;a!==void 0;){if(h===a.index){let c;a.type===2?c=new q(r,r.nextSibling,this,t):a.type===1?c=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(c=new ut(r,this,t)),this._$AV.push(c),a=n[++l]}h!==a?.index&&(r=w.nextNode(),h++)}return w.currentNode=C,o}v(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},q=class i{constructor(t,e,s,n){var o;this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=n,this._$Cp=(o=n?.isConnected)===null||o===void 0||o}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,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=R(this,t,e),U(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==y&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Yt(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!==d&&U(this._$AH)?this._$AA.nextSibling.data=t:this.$(C.createTextNode(t)),this._$AH=t}g(t){var e;let{values:s,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=z.createElement(Nt(n.h,n.h[0]),this.options)),n);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(s);else{let r=new at(o,this),h=r.u(this.options);r.v(s),this.$(h),this._$AH=r}}_$AC(t){let e=wt.get(t.strings);return e===void 0&&wt.set(t.strings,e=new z(t)),e}T(t){Tt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,n=0;for(let o of t)n===e.length?e.push(s=new i(this.k(O()),this.k(O()),this,this.options)):s=e[n],s._$AI(o),n++;n<e.length&&(this._$AR(s&&s._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){let n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},D=class{constructor(t,e,s,n,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,n){let o=this.strings,r=!1;if(o===void 0)t=R(this,t,e,0),r=!U(t)||t!==this._$AH&&t!==y,r&&(this._$AH=t);else{let h=t,l,a;for(t=o[0],l=0;l<o.length-1;l++)a=R(this,h[s+l],e,l),a===y&&(a=this._$AH[l]),r||(r=!U(a)||a!==this._$AH[l]),a===d?t=d:t!==d&&(t+=(a??"")+o[l+1]),this._$AH[l]=a}r&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ht=class extends D{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},Qt=N?N.emptyScript:"",dt=class extends D{constructor(){super(...arguments),this.type=4}j(t){t&&t!==d?this.element.setAttribute(this.name,Qt):this.element.removeAttribute(this.name)}},ct=class extends D{constructor(t,e,s,n,o){super(t,e,s,n,o),this.type=5}_$AI(t,e=this){var s;if((t=(s=R(this,t,e,0))!==null&&s!==void 0?s:d)===y)return;let n=this._$AH,o=t===d&&n!==d||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==d&&(n===d||o);o&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}},ut=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){R(this,t)}};var Ct=J.litHtmlPolyfillSupport;Ct?.(z,q),((ot=J.litHtmlVersions)!==null&&ot!==void 0?ot:J.litHtmlVersions=[]).push("2.8.0");var Rt=(i,t,e)=>{var s,n;let o=(s=e?.renderBefore)!==null&&s!==void 0?s:t,r=o._$litPart$;if(r===void 0){let h=(n=e?.renderBefore)!==null&&n!==void 0?n:null;o._$litPart$=r=new q(t.insertBefore(O(),h),h,void 0,e??{})}return r._$AI(i),r};var pt,mt;var g=class extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;let s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Rt(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 y}};g.finalized=!0,g._$litElement$=!0,(pt=globalThis.litElementHydrateSupport)===null||pt===void 0||pt.call(globalThis,{LitElement:g});var Dt=globalThis.litElementPolyfillSupport;Dt?.({LitElement:g});((mt=globalThis.litElementVersions)!==null&&mt!==void 0?mt:globalThis.litElementVersions=[]).push("3.3.3");var Xt=(i,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,i)}},te=(i,t,e)=>{t.constructor.createProperty(e,i)};function u(i){return(t,e)=>e!==void 0?te(i,t,e):Xt(i,t)}var Pt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Mt=i=>(...t)=>({_$litDirective$:i,values:t}),Y=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var K=class extends Y{constructor(t){if(super(t),this.et=d,t.type!==Pt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===d||t==null)return this.ft=void 0,this.et=t;if(t===y)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;let e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}};K.directiveName="unsafeHTML",K.resultType=1;var Ht=Mt(K);var W=i=>i??d;var Z=class{static showImage(t,e,s,n){let o;if(n||!(t instanceof HTMLImageElement)?o=r=>t.style.backgroundImage=this.prepareSrc(r):o=r=>t.src=r,o(s),e){let r=()=>{o(e)},h=new Image;h.addEventListener("load",r),h.src=e,h.complete&&(h.removeEventListener("load",r),r())}}static prepareSrc(t){return t?t.startsWith("url")?t:`url("${t}")`:null}};var ee=':host{display:block;contain:strict;height:50px}:host([selected]){background-color:#d3e6fa}:host(:not([selected]):hover),:host(:not([selected])[focused]){background-color:#e7f1fa}@media (forced-colors: active){:host([selected]){outline:4px solid}:host(:not([selected]):hover){outline:4px dotted}:host(:not([selected])[focused]){outline:4px dashed}}:host([enable-line-clamp]) .labels>:only-child{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;word-wrap:break-word}.container{display:flex;height:100%;box-sizing:border-box}.container .level-indicator{width:7px;height:100%}.container .level-indicator.level-0{background-color:#a0c3ef}.container .level-indicator.level-1{background-color:#e7c374}.container .level-indicator.level-2{background-color:#bfd596}.container .level-indicator.level-3{background-color:#fd998d}.container .level-indicator.level-4{background-color:#c6e8f5}.container .level-indicator.level-5{background-color:#fde3a4}.container .level-indicator.level-6{background-color:#dcbfe0}.side-content{display:flex;align-items:center;flex-grow:0}.labels{display:flex;flex-direction:column;justify-content:center;flex:1 1 0px;height:100%;line-height:normal;overflow:hidden;padding:var(--sd-list-item-label-content-padding, 0 8px)}.caption,.description{width:100%;font-family:var(--sd-list-item-font-family, "Segoe UI", "Lucida Sans", Arial, sans-serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-decoration:var(--sd-list-item-text-decoration, inherit)}.caption em,.description em{font-weight:bolder}.caption{font-size:var(--sd-list-item-caption-font-size, 16px);color:var(--sd-list-item-caption-text-color, #111);font-weight:var(--sd-list-item-caption-font-weight, normal)}.description{font-size:var(--sd-list-item-description-font-size, 13px);color:var(--sd-list-item-description-text-color, #767676);font-weight:var(--sd-list-item-description-font-weight, normal)}.icon-wrapper{width:var(--sd-list-item-icon-wrapper-width, 45px);height:100%;display:flex;align-items:center;justify-content:center}.icon-wrapper .icon{min-height:var(--sd-list-item-icon-size, 24px);min-width:var(--sd-list-item-icon-size, 24px);background-repeat:no-repeat;background-position:center;background-size:cover}',ie=Object.defineProperty,se=Object.getOwnPropertyDescriptor,v=(i,t,e,s)=>{for(var n=s>1?void 0:s?se(t,e):t,o=i.length-1,r;o>=0;o--)(r=i[o])&&(n=(s?r(t,e,n):r(n))||n);return s&&n&&ie(t,e,n),n},T,f=(T=class extends g{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[M`
4
- ${k(ee)}
1
+ var window;(window||={})["@cas-smartdesign/virtual-list"]=(()=>{var X=Object.defineProperty;var Dt=Object.getOwnPropertyDescriptor;var kt=Object.getOwnPropertyNames;var Ot=Object.prototype.hasOwnProperty;var Ut=(e,t)=>{for(var s in t)X(e,s,{get:t[s],enumerable:!0})},Ht=(e,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of kt(t))!Ot.call(e,n)&&n!==s&&X(e,n,{get:()=>t[n],enumerable:!(i=Dt(t,n))||i.enumerable});return e};var zt=e=>Ht(X({},"__esModule",{value:!0}),e);var he={};Ut(he,{ListDataProvider:()=>ut,SelectionType:()=>Rt,default:()=>Mt});var V=globalThis,F=V.ShadowRoot&&(V.ShadyCSS===void 0||V.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tt=Symbol(),mt=new WeakMap,M=class{constructor(t,s,i){if(this._$cssResult$=!0,i!==tt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o,s=this.t;if(F&&t===void 0){let i=s!==void 0&&s.length===1;i&&(t=mt.get(s)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&mt.set(s,t))}return t}toString(){return this.cssText}},P=e=>new M(typeof e=="string"?e:e+"",void 0,tt),D=(e,...t)=>{let s=e.length===1?e[0]:t.reduce(((i,n,o)=>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.")})(n)+e[o+1]),e[0]);return new M(s,e,tt)},ft=(e,t)=>{if(F)e.adoptedStyleSheets=t.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(let s of t){let i=document.createElement("style"),n=V.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=s.cssText,e.appendChild(i)}},et=F?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let s="";for(let i of t.cssRules)s+=i.cssText;return P(s)})(e):e;var{is:qt,defineProperty:Kt,getOwnPropertyDescriptor:Wt,getOwnPropertyNames:jt,getOwnPropertySymbols:Bt,getPrototypeOf:Vt}=Object,G=globalThis,_t=G.trustedTypes,Ft=_t?_t.emptyScript:"",Gt=G.reactiveElementPolyfillSupport,k=(e,t)=>e,O={toAttribute(e,t){switch(t){case Boolean:e=e?Ft:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let s=e;switch(t){case Boolean:s=e!==null;break;case Number:s=e===null?null:Number(e);break;case Object:case Array:try{s=JSON.parse(e)}catch{s=null}}return s}},J=(e,t)=>!qt(e,t),gt={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:J};Symbol.metadata??=Symbol("metadata"),G.litPropertyMetadata??=new WeakMap;var b=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=gt){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){let i=Symbol(),n=this.getPropertyDescriptor(t,i,s);n!==void 0&&Kt(this.prototype,t,n)}}static getPropertyDescriptor(t,s,i){let{get:n,set:o}=Wt(this.prototype,t)??{get(){return this[s]},set(r){this[s]=r}};return{get:n,set(r){let l=n?.call(this);o?.call(this,r),this.requestUpdate(t,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??gt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Vt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let s=this.properties,i=[...jt(s),...Bt(s)];for(let n of i)this.createProperty(n,s[n])}let t=this[Symbol.metadata];if(t!==null){let s=litPropertyMetadata.get(t);if(s!==void 0)for(let[i,n]of s)this.elementProperties.set(i,n)}this._$Eh=new Map;for(let[s,i]of this.elementProperties){let n=this._$Eu(s,i);n!==void 0&&this._$Eh.set(n,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let s=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let n of i)s.unshift(et(n))}else t!==void 0&&s.push(et(t));return s}static _$Eu(t,s){let i=s.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,s=this.constructor.elementProperties;for(let i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ft(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){let i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(n!==void 0&&i.reflect===!0){let o=(i.converter?.toAttribute!==void 0?i.converter:O).toAttribute(s,i.type);this._$Em=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,s){let i=this.constructor,n=i._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let o=i.getPropertyOptions(n),r=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:O;this._$Em=n;let l=r.fromAttribute(s,o.type);this[n]=l??this._$Ej?.get(n)??l,this._$Em=null}}requestUpdate(t,s,i){if(t!==void 0){let n=this.constructor,o=this[t];if(i??=n.getPropertyOptions(t),!((i.hasChanged??J)(o,s)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:n,wrapped:o},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),o!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[n,o]of i){let{wrapped:r}=o,l=this[n];r!==!0||this._$AL.has(n)||l===void 0||this.C(n,void 0,o,l)}}let t=!1,s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((i=>i.hostUpdate?.())),this.update(s)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((s=>s.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((s=>this._$ET(s,this[s]))),this._$EM()}updated(t){}firstUpdated(t){}};b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[k("elementProperties")]=new Map,b[k("finalized")]=new Map,Gt?.({ReactiveElement:b}),(G.reactiveElementVersions??=[]).push("2.1.1");var lt=globalThis,Z=lt.trustedTypes,bt=Z?Z.createPolicy("lit-html",{createHTML:e=>e}):void 0,It="$lit$",x=`lit$${Math.random().toFixed(9).slice(2)}$`,St="?"+x,Jt=`<${St}>`,C=document,H=()=>C.createComment(""),z=e=>e===null||typeof e!="object"&&typeof e!="function",ht=Array.isArray,Zt=e=>ht(e)||typeof e?.[Symbol.iterator]=="function",st=`[
2
+ \f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,vt=/-->/g,yt=/>/g,S=RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),$t=/'/g,xt=/"/g,wt=/^(?:script|style|textarea|title)$/i,ct=e=>(t,...s)=>({_$litType$:e,strings:t,values:s}),E=ct(1),fe=ct(2),_e=ct(3),v=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),At=new WeakMap,w=C.createTreeWalker(C,129);function Ct(e,t){if(!ht(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return bt!==void 0?bt.createHTML(t):t}var Yt=(e,t)=>{let s=e.length-1,i=[],n,o=t===2?"<svg>":t===3?"<math>":"",r=U;for(let l=0;l<s;l++){let a=e[l],c,u,p=-1,g=0;for(;g<a.length&&(r.lastIndex=g,u=r.exec(a),u!==null);)g=r.lastIndex,r===U?u[1]==="!--"?r=vt:u[1]!==void 0?r=yt:u[2]!==void 0?(wt.test(u[2])&&(n=RegExp("</"+u[2],"g")),r=S):u[3]!==void 0&&(r=S):r===S?u[0]===">"?(r=n??U,p=-1):u[1]===void 0?p=-2:(p=r.lastIndex-u[2].length,c=u[1],r=u[3]===void 0?S:u[3]==='"'?xt:$t):r===xt||r===$t?r=S:r===vt||r===yt?r=U:(r=S,n=void 0);let $=r===S&&e[l+1].startsWith("/>")?" ":"";o+=r===U?a+Jt:p>=0?(i.push(c),a.slice(0,p)+It+a.slice(p)+x+$):a+x+(p===-2?l:$)}return[Ct(e,o+(e[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},q=class e{constructor({strings:t,_$litType$:s},i){let n;this.parts=[];let o=0,r=0,l=t.length-1,a=this.parts,[c,u]=Yt(t,s);if(this.el=e.createElement(c,i),w.currentNode=this.el.content,s===2||s===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(n=w.nextNode())!==null&&a.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let p of n.getAttributeNames())if(p.endsWith(It)){let g=u[r++],$=n.getAttribute(p).split(x),B=/([.?@])?(.*)/.exec(g);a.push({type:1,index:o,name:B[2],strings:$,ctor:B[1]==="."?nt:B[1]==="?"?ot:B[1]==="@"?rt:R}),n.removeAttribute(p)}else p.startsWith(x)&&(a.push({type:6,index:o}),n.removeAttribute(p));if(wt.test(n.tagName)){let p=n.textContent.split(x),g=p.length-1;if(g>0){n.textContent=Z?Z.emptyScript:"";for(let $=0;$<g;$++)n.append(p[$],H()),w.nextNode(),a.push({type:2,index:++o});n.append(p[g],H())}}}else if(n.nodeType===8)if(n.data===St)a.push({type:2,index:o});else{let p=-1;for(;(p=n.data.indexOf(x,p+1))!==-1;)a.push({type:7,index:o}),p+=x.length-1}o++}}static createElement(t,s){let i=C.createElement("template");return i.innerHTML=t,i}};function N(e,t,s=e,i){if(t===v)return t;let n=i!==void 0?s._$Co?.[i]:s._$Cl,o=z(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(e),n._$AT(e,s,i)),i!==void 0?(s._$Co??=[])[i]=n:s._$Cl=n),n!==void 0&&(t=N(e,n._$AS(e,t.values),n,i)),t}var it=class{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:s},parts:i}=this._$AD,n=(t?.creationScope??C).importNode(s,!0);w.currentNode=n;let o=w.nextNode(),r=0,l=0,a=i[0];for(;a!==void 0;){if(r===a.index){let c;a.type===2?c=new K(o,o.nextSibling,this,t):a.type===1?c=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(c=new at(o,this,t)),this._$AV.push(c),a=i[++l]}r!==a?.index&&(o=w.nextNode(),r++)}return w.currentNode=C,n}p(t){let s=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}},K=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,i,n){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,s=this._$AM;return s!==void 0&&t?.nodeType===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=N(this,t,s),z(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Zt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==h&&z(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){let{values:s,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=q.createElement(Ct(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(s);else{let o=new it(n,this),r=o.u(this.options);o.p(s),this.T(r),this._$AH=o}}_$AC(t){let s=At.get(t.strings);return s===void 0&&At.set(t.strings,s=new q(t)),s}k(t){ht(this._$AH)||(this._$AH=[],this._$AR());let s=this._$AH,i,n=0;for(let o of t)n===s.length?s.push(i=new e(this.O(H()),this.O(H()),this,this.options)):i=s[n],i._$AI(o),n++;n<s.length&&(this._$AR(i&&i._$AB.nextSibling,n),s.length=n)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},R=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,i,n,o){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=s,this._$AM=n,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=h}_$AI(t,s=this,i,n){let o=this.strings,r=!1;if(o===void 0)t=N(this,t,s,0),r=!z(t)||t!==this._$AH&&t!==v,r&&(this._$AH=t);else{let l=t,a,c;for(t=o[0],a=0;a<o.length-1;a++)c=N(this,l[i+a],s,a),c===v&&(c=this._$AH[a]),r||=!z(c)||c!==this._$AH[a],c===h?t=h:t!==h&&(t+=(c??"")+o[a+1]),this._$AH[a]=c}r&&!n&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},nt=class extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}},ot=class extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}},rt=class extends R{constructor(t,s,i,n,o){super(t,s,i,n,o),this.type=5}_$AI(t,s=this){if((t=N(this,t,s,0)??h)===v)return;let i=this._$AH,n=t===h&&i!==h||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==h&&(i===h||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},at=class{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t)}};var Qt=lt.litHtmlPolyfillSupport;Qt?.(q,K),(lt.litHtmlVersions??=[]).push("3.3.1");var Et=(e,t,s)=>{let i=s?.renderBefore??t,n=i._$litPart$;if(n===void 0){let o=s?.renderBefore??null;i._$litPart$=n=new K(t.insertBefore(H(),o),o,void 0,s??{})}return n._$AI(e),n};var dt=globalThis,_=class extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Et(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return v}};_._$litElement$=!0,_.finalized=!0,dt.litElementHydrateSupport?.({LitElement:_});var Xt=dt.litElementPolyfillSupport;Xt?.({LitElement:_});(dt.litElementVersions??=[]).push("4.2.1");var te={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:J},ee=(e=te,t,s)=>{let{kind:i,metadata:n}=s,o=globalThis.litPropertyMetadata.get(n);if(o===void 0&&globalThis.litPropertyMetadata.set(n,o=new Map),i==="setter"&&((e=Object.create(e)).wrapped=!0),o.set(s.name,e),i==="accessor"){let{name:r}=s;return{set(l){let a=t.get.call(this);t.set.call(this,l),this.requestUpdate(r,a,e)},init(l){return l!==void 0&&this.C(r,void 0,e,l),l}}}if(i==="setter"){let{name:r}=s;return function(l){let a=this[r];t.call(this,l),this.requestUpdate(r,a,e)}}throw Error("Unsupported decorator location: "+i)};function d(e){return(t,s)=>typeof s=="object"?ee(e,t,s):((i,n,o)=>{let r=n.hasOwnProperty(o);return n.constructor.createProperty(o,i),r?Object.getOwnPropertyDescriptor(n,o):void 0})(e,t,s)}var Tt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Lt=e=>(...t)=>({_$litDirective$:e,values:t}),Y=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,i){this._$Ct=t,this._$AM=s,this._$Ci=i}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}};var W=class extends Y{constructor(t){if(super(t),this.it=h,t.type!==Tt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===h||t==null)return this._t=void 0,this.it=t;if(t===v)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let s=[t];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};W.directiveName="unsafeHTML",W.resultType=1;var Pt=Lt(W);var j=e=>e??h;var Q=class{static showImage(t,s,i,n){let o;if(n||!(t instanceof HTMLImageElement)?o=r=>t.style.backgroundImage=this.prepareSrc(r):o=r=>t.src=r,o(i),s){let r=()=>{o(s)},l=new Image;l.addEventListener("load",r),l.src=s,l.complete&&(l.removeEventListener("load",r),r())}}static prepareSrc(t){return t?t.startsWith("url")?t:`url("${t}")`:null}};var se=':host{display:block;contain:strict;height:50px}:host([selected]){background-color:#d3e6fa}:host(:not([selected]):hover),:host(:not([selected])[focused]){background-color:#e7f1fa}@media (forced-colors: active){:host([selected]){outline:4px solid}:host(:not([selected]):hover){outline:4px dotted}:host(:not([selected])[focused]){outline:4px dashed}}:host([enable-line-clamp]) .labels>:only-child{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow-wrap:break-word}.container{display:flex;height:100%;box-sizing:border-box}.container .level-indicator{width:7px;height:100%}.container .level-indicator.level-0{background-color:#a0c3ef}.container .level-indicator.level-1{background-color:#e7c374}.container .level-indicator.level-2{background-color:#bfd596}.container .level-indicator.level-3{background-color:#fd998d}.container .level-indicator.level-4{background-color:#c6e8f5}.container .level-indicator.level-5{background-color:#fde3a4}.container .level-indicator.level-6{background-color:#dcbfe0}.side-content{display:flex;align-items:center;flex-grow:0}.labels{display:flex;flex-direction:column;justify-content:center;flex:1 1 0px;height:100%;line-height:normal;overflow:hidden;padding:var(--sd-list-item-label-content-padding, 0 8px)}.caption,.description{width:100%;font-family:var(--sd-list-item-font-family, "Segoe UI", "Lucida Sans", Arial, sans-serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-decoration:var(--sd-list-item-text-decoration, inherit)}.caption em,.description em{font-weight:bolder}.caption{font-size:var(--sd-list-item-caption-font-size, 16px);color:var(--sd-list-item-caption-text-color, #111);font-weight:var(--sd-list-item-caption-font-weight, normal)}.description{font-size:var(--sd-list-item-description-font-size, 13px);color:var(--sd-list-item-description-text-color, #767676);font-weight:var(--sd-list-item-description-font-weight, normal)}.icon-wrapper{width:var(--sd-list-item-icon-wrapper-width, 45px);height:100%;display:flex;align-items:center;justify-content:center}.icon-wrapper .icon{min-height:var(--sd-list-item-icon-size, 24px);min-width:var(--sd-list-item-icon-size, 24px);background-repeat:no-repeat;background-position:center;background-size:cover}',ie=Object.defineProperty,f=(e,t,s,i)=>{for(var n=void 0,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=r(t,s,n)||n);return n&&ie(t,s,n),n},T,m=(T=class extends _{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[D`
4
+ ${P(se)}
5
5
  `]}render(){return E`
6
6
  <div class="container">
7
- ${this.getLevelIndicators().map((i,t)=>E` <div class="level-indicator level-${t}"></div> `)}
7
+ ${this.getLevelIndicators().map((e,t)=>E` <div class="level-indicator level-${t}"></div> `)}
8
8
  <div class="side-content">
9
9
  <slot name="left-content"></slot>
10
10
  ${this.renderIcon()}
@@ -17,28 +17,28 @@ var window;(window||={})["@cas-smartdesign/virtual-list"]=(()=>{var Q=Object.def
17
17
  <slot name="right-content"></slot>
18
18
  </div>
19
19
  </div>
20
- `}renderIcon(){if(this.icon||this.iconPlaceholder){let i=this.iconBackgroundColor!=null?`background-color:${this.iconBackgroundColor}`:void 0;return E`
20
+ `}renderIcon(){if(this.icon||this.iconPlaceholder){let e=this.iconBackgroundColor!=null?`background-color:${this.iconBackgroundColor}`:void 0;return E`
21
21
  <div
22
22
  class="icon-wrapper"
23
23
  @pointerdown="${this.handleIconClick}"
24
- style="${W(i)}"
24
+ style="${j(e)}"
25
25
  role="img"
26
- aria-label="${W(this.iconAttrAriaLabel)}"
27
- title="${W(this.iconAttrTitle)}"
26
+ aria-label="${j(this.iconAttrAriaLabel)}"
27
+ title="${j(this.iconAttrTitle)}"
28
28
  >
29
29
  <div class="icon"></div>
30
30
  </div>
31
- `}return d}renderLabel(i,t,e){return t?E`
32
- <div class="${i}" title="${W(e)}">
33
- ${this.contentMode==="html"?Ht(t):t}
31
+ `}return h}renderLabel(e,t,s){return t?E`
32
+ <div class="${e}" title="${j(s)}">
33
+ ${this.contentMode==="html"?Pt(t):t}
34
34
  </div>
35
- `:d}updated(i){super.updated(i),(i.has("icon")||i.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&Z.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),i.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let i=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,e=this.shadowRoot.querySelector(".caption");e&&(t+=e.scrollWidth-e.clientWidth);let s=this.shadowRoot.querySelector(".description");return s&&(t=Math.max(t,s.scrollWidth-s.clientWidth)),t>0&&t++,i&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(i){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",i))&&i.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},T.ID="sd-list-item",T.ensureDefined=()=>{customElements.get(T.ID)||customElements.define(T.ID,T)},T);v([u({type:String})],f.prototype,"caption",2);v([u({type:String})],f.prototype,"description",2);v([u({type:Boolean})],f.prototype,"selected",2);v([u({type:String})],f.prototype,"icon",2);v([u({type:String})],f.prototype,"iconBackgroundColor",2);v([u({type:String})],f.prototype,"iconPlaceholder",2);v([u({type:Number})],f.prototype,"level",2);v([u()],f.prototype,"contentMode",2);v([u({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],f.prototype,"enableLineClamp",2);v([u({type:Boolean,reflect:!0,attribute:"aria-disabled"})],f.prototype,"disabled",2);v([u({type:String,attribute:"icon-attr-aria-label"})],f.prototype,"iconAttrAriaLabel",2);v([u({type:String,reflect:!0})],f.prototype,"role",2);v([u({type:String,attribute:"caption-attr-title"})],f.prototype,"captionAttrTitle",2);v([u({type:String,attribute:"description-attr-title"})],f.prototype,"descriptionAttrTitle",2);v([u({type:String,attribute:"icon-attr-title"})],f.prototype,"iconAttrTitle",2);var L=f,Ot=(i,t)=>{let e=document.createElement(L.ID);if(i){if(e.caption=i.caption,e.description=i.description,e.icon=i.icon,e.iconBackgroundColor=i.iconBackgroundColor,e.iconPlaceholder=i.iconPlaceholder,e.level=i.level,e.disabled=i.disabled,i.contentMode&&(e.contentMode=i.contentMode),i.leftContentGenerator){let s=i.leftContentGenerator(i,e);s&&(s.slot="left-content",e.appendChild(s))}if(i.rightContentGenerator){let s=i.rightContentGenerator(i,e);s&&(s.slot="right-content",e.appendChild(s))}}return e};L.ensureDefined();var ft=class{getOffsetForIndexAndAlignment(t,e,s,n,o,r){let h=Math.max(0,r*n),l=Math.min(h,t*n),a=Math.max(0,t*n-o+n);switch(e){case"start":return l;case"end":return a;case"center":{let c=Math.round(a+(l-a)/2);return c<Math.ceil(o/2)?0:c>h+Math.floor(o/2)?h:c}case"auto":default:return s>=a&&s<=l?s:s<a?a:l}}debounce(t){let e;return(...s)=>{e&&window.cancelAnimationFrame(e),e=window.requestAnimationFrame(()=>{t(...s),e=null})}}},ne=new ft,vt=class{constructor(t=100,e=5){this.pageSize=t,this.preloadedItemsCount=e,this._finalSizeIsKnown=!1,this._itemCache=[],this._lastRequestedFirstIndex=0,this._lastRequestedLastIndex=0,this._lastLoadedIndex=0,this.handleListDataRequest=s=>{let{startIndex:n,stopIndex:o}=s.detail;this._lastRequestedFirstIndex=n,this._lastRequestedLastIndex=o,this._list.items=this._itemCache.slice(n,o+1),!this.finalSizeIsKnown&&this._lastLoadedIndex<o+this.preloadedItemsCount&&this.requestData()},this.itemCount=t}get currentPage(){return this.items.length==0&&this.finalSizeIsKnown?0:Math.floor((this.items.length-1)/this.pageSize)}get finalSizeIsKnown(){return this._finalSizeIsKnown}set finalSizeIsKnown(t){this._finalSizeIsKnown=t,t&&(this.itemCount=this._itemCache.length),this._list&&(this._list.finalSizeIsKnown=t)}get itemCount(){return this._itemCount}set itemCount(t){this._itemCount=t,this._list&&(this._list.itemCount=t)}get items(){return this._itemCache}set items(t){this._itemCache=t,this.onItemsChange()}addItems(t){this._itemCache=this._itemCache.concat(t),this.onItemsChange()}connectList(t){this._list&&this._list.removeEventListener("data-request",this.handleListDataRequest),this._list=t,t.itemCount=this.itemCount,t.addEventListener("data-request",this.handleListDataRequest),t.finalSizeIsKnown=this._finalSizeIsKnown}onItemsChange(){this._pendingDataRequest=!1,this._lastLoadedIndex=this._itemCache.length-1,this.finalSizeIsKnown?this.itemCount=this._itemCache.length:this._lastLoadedIndex>this.itemCount&&(this.itemCount=this._lastLoadedIndex),this._list&&(this._list.items=this._itemCache.slice(this._lastRequestedFirstIndex,this._lastRequestedLastIndex+1))}requestData(){if(!this._pendingDataRequest)if(this.onDataRequest)this._pendingDataRequest=!0,this.onDataRequest(this.currentPage+1),this._lastLoadedIndex+=this.pageSize-1,this._lastLoadedIndex>this.itemCount&&(this.itemCount=this._lastLoadedIndex);else throw Error("The final size is not yet known and the list would require item data from index "+this._lastRequestedFirstIndex+". to "+this._lastRequestedLastIndex+". which is not possible to load without a configured onDataRequest")}},oe=":host{display:block;position:relative;contain:layout}:host(:focus){outline:none}:host(:focus-visible) ::slotted([focused]){box-shadow:0 0 0 1px #1467ba inset}.container{width:100%}.container>::slotted(*){width:100%;position:absolute;box-sizing:border-box}.container>::slotted(:not([last])){border-bottom:1px solid #d9d9d9}",re=Object.defineProperty,le=Object.getOwnPropertyDescriptor,I=(i,t,e,s)=>{for(var n=s>1?void 0:s?le(t,e):t,o=i.length-1,r;o>=0;o--)(r=i[o])&&(n=(s?r(t,e,n):r(n))||n);return s&&n&&re(t,e,n),n},Ut=(i=>(i.TriggerOnly="trigger-only",i.Single="single",i.Multi="multi",i))(Ut||{}),ae=0,A,$=(A=class extends g{constructor(){super(),this.items=[],this.selectionType="trigger-only",this.id=A.ID+"_"+ae++,this.role="listbox",this.itemGenerator=Ot,this._lastKnownScrollTop=0,this._lastRenderedScrollTop=0,this._itemsRenderData=[],this._elementCache=new Map,this._visibleItemsNum=0,this._selectedIndices=[],this._focusIndex=-1,this._lastKnownHeight=0,this.onScroll=()=>{this._lastKnownScrollTop=this.scrollTop;let i=this._lastRenderedScrollTop-this._lastKnownScrollTop;Math.abs(i)>=this.itemHeight&&(this._lastRenderedScrollTop=this._lastKnownScrollTop,this.requestUpdate())},this.handleKeyDown=i=>{let t=!0;switch(i.key){case"Down":case"ArrowDown":this.focusIndex=this.normalizeIndex(this.focusIndex+1);break;case"Up":case"ArrowUp":this.focusIndex=this.normalizeIndex(this.focusIndex-1);break;case"Enter":this.handleSelection(this.focusIndex,i.metaKey||i.ctrlKey);break;case"End":this.focusIndex=this.itemCount-1;break;case"PageDown":this.focusIndex=this.normalizeIndex(this.focusIndex+this._visibleItemsNum-1);break;case"Home":this.focusIndex=0;break;case"PageUp":this.focusIndex=this.normalizeIndex(this.focusIndex-this._visibleItemsNum+1);break;default:t=!1;break}t&&(i.preventDefault(),i.stopPropagation())},this._resizeObserver=new ResizeObserver(()=>{this._lastKnownHeight!==this.offsetHeight&&(this._lastKnownHeight=this.offsetHeight,this.requestUpdate())})}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(i){this.toggleAttribute("focus-target",i)}get focusIndex(){return this._focusIndex}set focusIndex(i){if(i>=-1&&i<this.itemCount){let t=this._focusIndex;this._focusIndex=i,(i<=this._firstVisibleIndex||this._lastVisibleIndex<=i)&&this.scrollToItem(i),t!=i&&(i==-1&&this.removeAttribute("aria-activedescendant"),this.requestUpdate("focusIndex",t))}}get selectedIndices(){return this._selectedIndices}set selectedIndices(i){i?this._selectedIndices=i.map(t=>Number(t)):this._selectedIndices=[],this.requestUpdate("selectedIndices")}scrollToItem(i,t="auto"){this.scrollTop=ne.getOffsetForIndexAndAlignment(this.normalizeIndex(i),t,this.scrollTop,this.itemHeight,this.height,this.itemCount),this._lastKnownScrollTop=this.scrollTop}getListItem(i){return!this.shadowRoot||i<this._firstVisibleIndex||this._lastVisibleIndex<i?null:this.querySelector(`[item-index="${i}"]`)}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this),this.scrollTop!==this._lastKnownScrollTop&&(this.scrollTop=this._lastKnownScrollTop,this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.disconnect()}firstUpdated(i){super.firstUpdated(i),this.addEventListener("scroll",this.onScroll),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick),this.addEventListener("mousedown",t=>{t.button==1&&t.preventDefault()}),this.addEventListener("auxclick",this.handleClick),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndices&&(this.focusIndex=this.selectedIndices[0]),this.focusIndex==-1&&this.itemCount>0&&(this.focusIndex=0)):this.updateFocusedItemAttributes())}),this.addEventListener("blur",()=>{this.focusIndex!=-1&&this.updateFocusedItemAttributes()}),this.selectedIndices.length>0&&this.scrollToItem(this.selectedIndices[0],"center")}updateFocusedItemAttributes(){let i=this.getListItem(this.focusIndex);i&&(this.focusTarget||document.activeElement==this?(i.setAttribute("focused",""),this.setAttribute("aria-activedescendant",i.id)):(i.removeAttribute("focused"),this.removeAttribute("aria-activedescendant")))}static get styles(){return[M`
36
- ${k(oe)}
35
+ `:h}updated(e){super.updated(e),(e.has("icon")||e.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&Q.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),e.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let e=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,s=this.shadowRoot.querySelector(".caption");s&&(t+=s.scrollWidth-s.clientWidth);let i=this.shadowRoot.querySelector(".description");return i&&(t=Math.max(t,i.scrollWidth-i.clientWidth)),t>0&&t++,e&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(e){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",e))&&e.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},T.ID="sd-list-item",T.ensureDefined=()=>{customElements.get(T.ID)||customElements.define(T.ID,T)},T);f([d({type:String})],m.prototype,"caption");f([d({type:String})],m.prototype,"description");f([d({type:Boolean})],m.prototype,"selected");f([d({type:String})],m.prototype,"icon");f([d({type:String})],m.prototype,"iconBackgroundColor");f([d({type:String})],m.prototype,"iconPlaceholder");f([d({type:Number})],m.prototype,"level");f([d()],m.prototype,"contentMode");f([d({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],m.prototype,"enableLineClamp");f([d({converter:{fromAttribute:e=>e=="true",toAttribute:e=>e},reflect:!0,attribute:"aria-disabled"})],m.prototype,"disabled");f([d({type:String,attribute:"icon-attr-aria-label"})],m.prototype,"iconAttrAriaLabel");f([d({type:String,reflect:!0})],m.prototype,"role");f([d({type:String,attribute:"caption-attr-title"})],m.prototype,"captionAttrTitle");f([d({type:String,attribute:"description-attr-title"})],m.prototype,"descriptionAttrTitle");f([d({type:String,attribute:"icon-attr-title"})],m.prototype,"iconAttrTitle");var L=m,Nt=(e,t)=>{let s=document.createElement(L.ID);if(e){if(s.caption=e.caption,s.description=e.description,s.icon=e.icon,s.iconBackgroundColor=e.iconBackgroundColor,s.iconPlaceholder=e.iconPlaceholder,s.level=e.level,s.disabled=e.disabled,e.contentMode&&(s.contentMode=e.contentMode),e.leftContentGenerator){let i=e.leftContentGenerator(e,s);i&&(i.slot="left-content",s.appendChild(i))}if(e.rightContentGenerator){let i=e.rightContentGenerator(e,s);i&&(i.slot="right-content",s.appendChild(i))}}return s};L.ensureDefined();var pt=class{getOffsetForIndexAndAlignment(t,s,i,n,o,r){let l=Math.max(0,r*n),a=Math.min(l,t*n),c=Math.max(0,t*n-o+n);switch(s){case"start":return a;case"end":return c;case"center":{let u=Math.round(c+(a-c)/2);return u<Math.ceil(o/2)?0:u>l+Math.floor(o/2)?l:u}case"auto":default:return i>=c&&i<=a?i:i<c?c:a}}debounce(t){let s;return(...i)=>{s&&window.cancelAnimationFrame(s),s=window.requestAnimationFrame(()=>{t(...i),s=null})}}},ne=new pt,ut=class{constructor(t=100,s=5){this.pageSize=t,this.preloadedItemsCount=s,this._finalSizeIsKnown=!1,this._itemCache=[],this._lastRequestedFirstIndex=0,this._lastRequestedLastIndex=0,this._lastLoadedIndex=0,this.handleListDataRequest=i=>{let{startIndex:n,stopIndex:o}=i.detail;this._lastRequestedFirstIndex=n,this._lastRequestedLastIndex=o,this._list.items=this._itemCache.slice(n,o+1),!this.finalSizeIsKnown&&this._lastLoadedIndex<o+this.preloadedItemsCount&&this.requestData()},this.itemCount=t}get currentPage(){return this.items.length==0&&this.finalSizeIsKnown?0:Math.floor((this.items.length-1)/this.pageSize)}get finalSizeIsKnown(){return this._finalSizeIsKnown}set finalSizeIsKnown(t){this._finalSizeIsKnown=t,t&&(this.itemCount=this._itemCache.length),this._list&&(this._list.finalSizeIsKnown=t)}get itemCount(){return this._itemCount}set itemCount(t){this._itemCount=t,this._list&&(this._list.itemCount=t)}get items(){return this._itemCache}set items(t){this._itemCache=t,this.onItemsChange()}addItems(t){this._itemCache=this._itemCache.concat(t),this.onItemsChange()}connectList(t){this._list&&this._list.removeEventListener("data-request",this.handleListDataRequest),this._list=t,t.itemCount=this.itemCount,t.addEventListener("data-request",this.handleListDataRequest),t.finalSizeIsKnown=this._finalSizeIsKnown}onItemsChange(){this._pendingDataRequest=!1,this._lastLoadedIndex=this._itemCache.length-1,this.finalSizeIsKnown?this.itemCount=this._itemCache.length:this._lastLoadedIndex>this.itemCount&&(this.itemCount=this._lastLoadedIndex),this._list&&(this._list.items=this._itemCache.slice(this._lastRequestedFirstIndex,this._lastRequestedLastIndex+1))}requestData(){if(!this._pendingDataRequest)if(this.onDataRequest)this._pendingDataRequest=!0,this.onDataRequest(this.currentPage+1),this._lastLoadedIndex+=this.pageSize-1,this._lastLoadedIndex>this.itemCount&&(this.itemCount=this._lastLoadedIndex);else throw Error("The final size is not yet known and the list would require item data from index "+this._lastRequestedFirstIndex+". to "+this._lastRequestedLastIndex+". which is not possible to load without a configured onDataRequest")}},oe=":host{display:block;position:relative;contain:layout}:host(:focus){outline:none}:host(:focus-visible) ::slotted([focused]){box-shadow:0 0 0 1px #1467ba inset}.container{width:100%}.container>::slotted(*){width:100%;position:absolute;box-sizing:border-box}.container>::slotted(:not([last])){border-bottom:1px solid #d9d9d9}",re=Object.defineProperty,ae=Object.getOwnPropertyDescriptor,I=(e,t,s,i)=>{for(var n=i>1?void 0:i?ae(t,s):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=(i?r(t,s,n):r(n))||n);return i&&n&&re(t,s,n),n},Rt=(e=>(e.TriggerOnly="trigger-only",e.Single="single",e.Multi="multi",e))(Rt||{}),le=0,A,y=(A=class extends _{constructor(){super(),this.items=[],this.selectionType="trigger-only",this.id=A.ID+"_"+le++,this.role="listbox",this.itemGenerator=Nt,this._lastKnownScrollTop=0,this._lastRenderedScrollTop=0,this._itemsRenderData=[],this._elementCache=new Map,this._visibleItemsNum=0,this._selectedIndices=[],this._focusIndex=-1,this._lastKnownHeight=0,this.onScroll=()=>{this._lastKnownScrollTop=this.scrollTop;let e=this._lastRenderedScrollTop-this._lastKnownScrollTop;Math.abs(e)>=this.itemHeight&&(this._lastRenderedScrollTop=this._lastKnownScrollTop,this.requestUpdate())},this.handleKeyDown=e=>{let t=!0;switch(e.key){case"Down":case"ArrowDown":this.focusIndex=this.normalizeIndex(this.focusIndex+1);break;case"Up":case"ArrowUp":this.focusIndex=this.normalizeIndex(this.focusIndex-1);break;case"Enter":this.handleSelection(this.focusIndex,e.metaKey||e.ctrlKey);break;case"End":this.focusIndex=this.itemCount-1;break;case"PageDown":this.focusIndex=this.normalizeIndex(this.focusIndex+this._visibleItemsNum-1);break;case"Home":this.focusIndex=0;break;case"PageUp":this.focusIndex=this.normalizeIndex(this.focusIndex-this._visibleItemsNum+1);break;default:t=!1;break}t&&(e.preventDefault(),e.stopPropagation())},this._resizeObserver=new ResizeObserver(()=>{this._lastKnownHeight!==this.offsetHeight&&(this._lastKnownHeight=this.offsetHeight,this.requestUpdate())})}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(e){this.toggleAttribute("focus-target",e)}get focusIndex(){return this._focusIndex}set focusIndex(e){if(e>=-1&&e<this.itemCount){let t=this._focusIndex;this._focusIndex=e,(e<=this._firstVisibleIndex||this._lastVisibleIndex<=e)&&this.scrollToItem(e),t!=e&&(e==-1&&this.removeAttribute("aria-activedescendant"),this.requestUpdate("focusIndex",t))}}get selectedIndices(){return this._selectedIndices}set selectedIndices(e){e?this._selectedIndices=e.map(t=>Number(t)):this._selectedIndices=[],this.requestUpdate("selectedIndices")}scrollToItem(e,t="auto"){this.scrollTop=ne.getOffsetForIndexAndAlignment(this.normalizeIndex(e),t,this.scrollTop,this.itemHeight,this.height,this.itemCount),this._lastKnownScrollTop=this.scrollTop}getListItem(e){return!this.shadowRoot||e<this._firstVisibleIndex||this._lastVisibleIndex<e?null:this.querySelector(`[item-index="${e}"]`)}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this),this.scrollTop!==this._lastKnownScrollTop&&(this.scrollTop=this._lastKnownScrollTop,this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.disconnect()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("scroll",this.onScroll),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick),this.addEventListener("mousedown",t=>{t.button==1&&t.preventDefault()}),this.addEventListener("auxclick",this.handleClick),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndices&&(this.focusIndex=this.selectedIndices[0]),this.focusIndex==-1&&this.itemCount>0&&(this.focusIndex=0)):this.updateFocusedItemAttributes())}),this.addEventListener("blur",()=>{this.focusIndex!=-1&&this.updateFocusedItemAttributes()}),this.selectedIndices.length>0&&this.scrollToItem(this.selectedIndices[0],"center")}updateFocusedItemAttributes(){let e=this.getListItem(this.focusIndex);e&&(this.focusTarget||document.activeElement==this?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id)):(e.removeAttribute("focused"),this.removeAttribute("aria-activedescendant")))}static get styles(){return[D`
36
+ ${P(oe)}
37
37
  `]}render(){return this.updateItemsRenderData(),E`
38
38
  <div class="container" style="height: ${this.itemCount*this.itemHeight}px">
39
39
  <slot name="items"></slot>
40
40
  </div>
41
- `}updated(i){if(super.updated(i),this._lastRenderedScrollTop=this._lastKnownScrollTop,this.updateItems(),(this._increaseWidthOnNextRenderIfNeeded||this._reachedMaxWidth)&&this._firstVisibleIndex<this._lastVisibleIndex)if(this.querySelector("[item-index]"))this.adjustWidthIfNeeded();else{let t=new MutationObserver(()=>{this.adjustWidthIfNeeded(),t.disconnect()});t.observe(this)}}adjustWidthIfNeeded(){this._increaseWidthOnNextRenderIfNeeded?(this._increaseWidthOnNextRenderIfNeeded=!1,window.requestAnimationFrame(()=>{let i=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(i==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;let t=[...this.querySelectorAll("[item-index]")].map(s=>{if(s instanceof L){s.enableLineClamp=!1;let n=s.missingWidthForTexts;return n>i&&(s.enableLineClamp=!0),n}}),e=Math.max(...t);e>0&&(this.style.width=`${this.offsetWidth+e}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(i=>{i instanceof L&&(i.enableLineClamp=i.enableLineClamp||i.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){let i=[...this.querySelectorAll("[item-index]")],t=new Map,e=document.createDocumentFragment();for(let s of this._itemsRenderData){let n=this.renderItem(s);n.parentElement||e.appendChild(n),t.set(s.dataHash,n);let o=i.indexOf(n);o!==-1&&i.splice(o,1)}this.appendChild(e);for(let s of i)s instanceof L&&(s.enableLineClamp=!1),this.removeChild(s);t.forEach((s,n)=>{this._elementCache.set(n,s)})}renderItem({index:i,top:t,dataHash:e,data:s}){let n;return s?this._elementCache.has(e)?(n=this._elementCache.get(e),this._elementCache.delete(e)):(n=this.itemGenerator(s,i),n.setAttribute("slot","items")):(n=document.createElement("div"),n.setAttribute("placeholder-item",""),n.setAttribute("slot","items")),Object.assign(n.style,{transform:`translateY(${t}px)`,height:`${this.itemHeight}px`}),n.setAttribute("item-index",i.toString()),n.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),n.setAttribute("aria-posinset",String(i+1)),(!n.id||n.id.startsWith(this.id+"_item_"))&&(n.id=this.id+"_item_"+i),this.itemCount-1==i?n.setAttribute("last",""):n.removeAttribute("last"),this.updateSelectedAttribute(i,n),this.updateFocusedAttribute(i,n),n}updateFocusedAttribute(i,t){this.focusIndex==i&&(this.focusTarget||document.activeElement==this)?(t.setAttribute("focused",""),this.setAttribute("aria-activedescendant",t.id)):t.removeAttribute("focused")}updateSelectedAttribute(i,t){let e=this.selectedIndices.indexOf(i)!==-1;e?t.setAttribute("selected",""):t.removeAttribute("selected"),t.setAttribute("aria-selected",String(e))}updateItemsRenderData(){if(this._itemsRenderData=[],this._visibleItemsNum=Math.min(Math.ceil(this.height/this.itemHeight),this.itemCount),this._visibleItemsNum>0){this._firstVisibleIndex=this.normalizeIndex(Math.floor(this._lastKnownScrollTop/this.itemHeight)),this._lastVisibleIndex=this.normalizeIndex(this._firstVisibleIndex+this._visibleItemsNum);let i=this.normalizeIndex(this._firstVisibleIndex-2),t=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(i,t);for(let e=i;e<=t;e++){let s=e-i,n=this.items[s],o;n?o=JSON.stringify(n):o=`placeholder-${s}`,this._itemsRenderData.push({index:e,top:this.itemHeight*e,physicalIndex:s,dataHash:o,data:n})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(i){return Math.max(0,Math.min(i,this.itemCount-1))}get height(){return this.offsetHeight}requestData(i,t){!Number.isNaN(i)&&!Number.isNaN(t)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:i,stopIndex:t}}))}handleSelection(i,t){if(i<0||this.itemCount<=i)return;let e=i%this._visibleItemsNum,s=this.items[e];if(!s||s.disabled)return;let n=!0;if(this.selectionType!=="trigger-only"){let o=this.selectedIndices.indexOf(i);n=o==-1,n?this.selectionType==="single"?this.selectedIndices=[i]:this.selectedIndices.push(i):this.selectedIndices.splice(o,1),this.requestUpdate("selectedIndices")}this.focusIndex=i,this.dispatchSelectionEvent(i,n,t)}dispatchSelectionEvent(i,t,e){this.dispatchEvent(new CustomEvent("selection",{detail:{index:i,selected:t,hasModifier:e}}))}handleClick(i){let t=i.composedPath().find(e=>e.hasAttribute&&e.hasAttribute("item-index"));if(t){let e=parseInt(t.getAttribute("item-index"));if(Number.isInteger(e)){if(i.button==0||i.button==1){let s=i.type=="auxclick"&&i.button==1||i.metaKey||i.ctrlKey;this.handleSelection(e,s)}this.focusIndex=e}}}},A.ID="sd-virtual-list",A.ensureDefined=()=>{L.ensureDefined(),customElements.get(A.ID)||customElements.define(A.ID,A)},A);I([u({type:Number,attribute:"item-height",reflect:!0})],$.prototype,"itemHeight",2);I([u({type:Number})],$.prototype,"itemCount",2);I([u({type:Array,attribute:!1})],$.prototype,"items",2);I([u({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],$.prototype,"selectionType",2);I([u({type:String,attribute:!0,reflect:!0})],$.prototype,"id",2);I([u({type:String,reflect:!0})],$.prototype,"role",2);I([u({type:Number,attribute:"focus-index",reflect:!0})],$.prototype,"focusIndex",1);I([u({type:Array,attribute:!1})],$.prototype,"selectedIndices",1);var zt=$;zt.ensureDefined();return Ft(he);})();
41
+ `}updated(e){if(super.updated(e),this._lastRenderedScrollTop=this._lastKnownScrollTop,this.updateItems(),(this._increaseWidthOnNextRenderIfNeeded||this._reachedMaxWidth)&&this._firstVisibleIndex<this._lastVisibleIndex)if(this.querySelector("[item-index]"))this.adjustWidthIfNeeded();else{let t=new MutationObserver(()=>{this.adjustWidthIfNeeded(),t.disconnect()});t.observe(this)}}adjustWidthIfNeeded(){this._increaseWidthOnNextRenderIfNeeded?(this._increaseWidthOnNextRenderIfNeeded=!1,window.requestAnimationFrame(()=>{let e=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(e==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;let t=[...this.querySelectorAll("[item-index]")].map(i=>{if(i instanceof L){i.enableLineClamp=!1;let n=i.missingWidthForTexts;return n>e&&(i.enableLineClamp=!0),n}}),s=Math.max(...t);s>0&&(this.style.width=`${this.offsetWidth+s}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(e=>{e instanceof L&&(e.enableLineClamp=e.enableLineClamp||e.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){let e=[...this.querySelectorAll("[item-index]")],t=new Map,s=document.createDocumentFragment();for(let i of this._itemsRenderData){let n=this.renderItem(i);n.parentElement||s.appendChild(n),t.set(i.dataHash,n);let o=e.indexOf(n);o!==-1&&e.splice(o,1)}this.appendChild(s);for(let i of e)i instanceof L&&(i.enableLineClamp=!1),this.removeChild(i);t.forEach((i,n)=>{this._elementCache.set(n,i)})}renderItem({index:e,top:t,dataHash:s,data:i}){let n;return i?this._elementCache.has(s)?(n=this._elementCache.get(s),this._elementCache.delete(s)):(n=this.itemGenerator(i,e),n.setAttribute("slot","items")):(n=document.createElement("div"),n.setAttribute("placeholder-item",""),n.setAttribute("slot","items")),Object.assign(n.style,{transform:`translateY(${t}px)`,height:`${this.itemHeight}px`}),n.setAttribute("item-index",e.toString()),n.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),n.setAttribute("aria-posinset",String(e+1)),(!n.id||n.id.startsWith(this.id+"_item_"))&&(n.id=this.id+"_item_"+e),this.itemCount-1==e?n.setAttribute("last",""):n.removeAttribute("last"),this.updateSelectedAttribute(e,n),this.updateFocusedAttribute(e,n),n}updateFocusedAttribute(e,t){this.focusIndex==e&&(this.focusTarget||document.activeElement==this)?(t.setAttribute("focused",""),this.setAttribute("aria-activedescendant",t.id)):t.removeAttribute("focused")}updateSelectedAttribute(e,t){let s=this.selectedIndices.indexOf(e)!==-1;s?t.setAttribute("selected",""):t.removeAttribute("selected"),t.setAttribute("aria-selected",String(s))}updateItemsRenderData(){if(this._itemsRenderData=[],this._visibleItemsNum=Math.min(Math.ceil(this.height/this.itemHeight),this.itemCount),this._visibleItemsNum>0){this._firstVisibleIndex=this.normalizeIndex(Math.floor(this._lastKnownScrollTop/this.itemHeight)),this._lastVisibleIndex=this.normalizeIndex(this._firstVisibleIndex+this._visibleItemsNum);let e=this.normalizeIndex(this._firstVisibleIndex-2),t=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(e,t);for(let s=e;s<=t;s++){let i=s-e,n=this.items[i],o;n?o=JSON.stringify(n):o=`placeholder-${i}`,this._itemsRenderData.push({index:s,top:this.itemHeight*s,physicalIndex:i,dataHash:o,data:n})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(e){return Math.max(0,Math.min(e,this.itemCount-1))}get height(){return this.offsetHeight}requestData(e,t){!Number.isNaN(e)&&!Number.isNaN(t)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:e,stopIndex:t}}))}handleSelection(e,t){if(e<0||this.itemCount<=e)return;let s=this.getListItem(e);if(s.getAttribute("aria-disabled")=="true"||s.hasAttribute("disabled"))return;let i=!0;if(this.selectionType!=="trigger-only"){let n=this.selectedIndices.indexOf(e);i=n==-1,i?this.selectionType==="single"?this.selectedIndices=[e]:this.selectedIndices.push(e):this.selectedIndices.splice(n,1),this.requestUpdate("selectedIndices")}this.focusIndex=e,this.dispatchSelectionEvent(e,i,t)}dispatchSelectionEvent(e,t,s){this.dispatchEvent(new CustomEvent("selection",{detail:{index:e,selected:t,hasModifier:s}}))}handleClick(e){let t=e.composedPath().find(s=>s.hasAttribute&&s.hasAttribute("item-index"));if(t){let s=parseInt(t.getAttribute("item-index"));if(Number.isInteger(s)){if(e.button==0||e.button==1){let i=e.type=="auxclick"&&e.button==1||e.metaKey||e.ctrlKey;this.handleSelection(s,i)}this.focusIndex=s}}}},A.ID="sd-virtual-list",A.ensureDefined=()=>{L.ensureDefined(),customElements.get(A.ID)||customElements.define(A.ID,A)},A);I([d({type:Number,attribute:"item-height",reflect:!0})],y.prototype,"itemHeight",2);I([d({type:Number})],y.prototype,"itemCount",2);I([d({type:Array,attribute:!1})],y.prototype,"items",2);I([d({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],y.prototype,"selectionType",2);I([d({type:String,attribute:!0,reflect:!0})],y.prototype,"id",2);I([d({type:String,reflect:!0})],y.prototype,"role",2);I([d({type:Number,attribute:"focus-index",reflect:!0})],y.prototype,"focusIndex",1);I([d({type:Array,attribute:!1})],y.prototype,"selectedIndices",1);var Mt=y;Mt.ensureDefined();return zt(he);})();
42
42
  /*! Bundled license information:
43
43
 
44
44
  @lit/reactive-element/css-tag.js:
@@ -49,51 +49,21 @@ var window;(window||={})["@cas-smartdesign/virtual-list"]=(()=>{var Q=Object.def
49
49
  *)
50
50
 
51
51
  @lit/reactive-element/reactive-element.js:
52
- (**
53
- * @license
54
- * Copyright 2017 Google LLC
55
- * SPDX-License-Identifier: BSD-3-Clause
56
- *)
57
-
58
52
  lit-html/lit-html.js:
59
- (**
60
- * @license
61
- * Copyright 2017 Google LLC
62
- * SPDX-License-Identifier: BSD-3-Clause
63
- *)
64
-
65
53
  lit-element/lit-element.js:
66
- (**
67
- * @license
68
- * Copyright 2017 Google LLC
69
- * SPDX-License-Identifier: BSD-3-Clause
70
- *)
71
-
72
- lit-html/is-server.js:
73
- (**
74
- * @license
75
- * Copyright 2022 Google LLC
76
- * SPDX-License-Identifier: BSD-3-Clause
77
- *)
78
-
79
54
  @lit/reactive-element/decorators/property.js:
80
- (**
81
- * @license
82
- * Copyright 2017 Google LLC
83
- * SPDX-License-Identifier: BSD-3-Clause
84
- *)
85
-
86
55
  lit-html/directive.js:
56
+ lit-html/directives/unsafe-html.js:
87
57
  (**
88
58
  * @license
89
59
  * Copyright 2017 Google LLC
90
60
  * SPDX-License-Identifier: BSD-3-Clause
91
61
  *)
92
62
 
93
- lit-html/directives/unsafe-html.js:
63
+ lit-html/is-server.js:
94
64
  (**
95
65
  * @license
96
- * Copyright 2017 Google LLC
66
+ * Copyright 2022 Google LLC
97
67
  * SPDX-License-Identifier: BSD-3-Clause
98
68
  *)
99
69