scb-wc-test 0.1.102 → 0.1.104
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/mvc/components/scb-select/scb-select-option.js +5 -5
- package/mvc/components/scb-select/scb-select.js +39 -21
- package/package.json +2 -2
- package/scb-select/scb-select-option.d.ts +1 -0
- package/scb-select/scb-select-option.js +15 -12
- package/scb-select/scb-select.d.ts +3 -4
- package/scb-select/scb-select.js +51 -32
- package/scb-wc-test.bundle.js +80 -62
package/scb-wc-test.bundle.js
CHANGED
|
@@ -10,7 +10,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const{is:Ms,defineProperty:Hs,getOwnPropertyDescriptor:Fs,getOwnPropertyNames:Ns,getOwnPropertySymbols:Vs,getPrototypeOf:qs}=Object,Ke=globalThis,ta=Ke.trustedTypes,Us=ta?ta.emptyScript:"",Ar=Ke.reactiveElementPolyfillSupport,Ut=(o,e)=>o,Ci={toAttribute(o,e){switch(e){case Boolean:o=o?Us:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},zr=(o,e)=>!Ms(o,e),ia={attribute:!0,type:String,converter:Ci,reflect:!1,useDefault:!1,hasChanged:zr};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Ke.litPropertyMetadata??(Ke.litPropertyMetadata=new WeakMap);let
|
|
13
|
+
*/const{is:Ms,defineProperty:Hs,getOwnPropertyDescriptor:Fs,getOwnPropertyNames:Ns,getOwnPropertySymbols:Vs,getPrototypeOf:qs}=Object,Ke=globalThis,ta=Ke.trustedTypes,Us=ta?ta.emptyScript:"",Ar=Ke.reactiveElementPolyfillSupport,Ut=(o,e)=>o,Ci={toAttribute(o,e){switch(e){case Boolean:o=o?Us:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},zr=(o,e)=>!Ms(o,e),ia={attribute:!0,type:String,converter:Ci,reflect:!1,useDefault:!1,hasChanged:zr};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Ke.litPropertyMetadata??(Ke.litPropertyMetadata=new WeakMap);let Ct=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ia){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,t);r!==void 0&&Hs(this.prototype,e,r)}}static getPropertyDescriptor(e,t,i){const{get:r,set:s}=Fs(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:r,set(n){const h=r==null?void 0:r.call(this);s==null||s.call(this,n),this.requestUpdate(e,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ia}static _$Ei(){if(this.hasOwnProperty(Ut("elementProperties")))return;const e=qs(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ut("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ut("properties"))){const t=this.properties,i=[...Ns(t),...Vs(t)];for(const r of i)this.createProperty(r,t[r])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,r]of t)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const r=this._$Eu(t,i);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)t.unshift(ea(r))}else e!==void 0&&t.push(ea(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Bs(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){var s;const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const n=(((s=i.converter)==null?void 0:s.toAttribute)!==void 0?i.converter:Ci).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(e,t){var s,n;const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const h=i.getPropertyOptions(r),p=typeof h.converter=="function"?{fromAttribute:h.converter}:((s=h.converter)==null?void 0:s.fromAttribute)!==void 0?h.converter:Ci;this._$Em=r;const v=p.fromAttribute(t,h.type);this[r]=v??((n=this._$Ej)==null?void 0:n.get(r))??v,this._$Em=null}}requestUpdate(e,t,i){var r;if(e!==void 0){const s=this.constructor,n=this[e];if(i??(i=s.getPropertyOptions(e)),!((i.hasChanged??zr)(n,t)||i.useDefault&&i.reflect&&n===((r=this._$Ej)==null?void 0:r.get(e))&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:r,wrapped:s},n){i&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,n??t??this[e]),s!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[s,n]of r){const{wrapped:h}=n,p=this[s];h!==!0||this._$AL.has(s)||p===void 0||this.C(s,void 0,n,p)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(r=>{var s;return(s=r.hostUpdate)==null?void 0:s.call(r)}),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Ct.elementStyles=[],Ct.shadowRootOptions={mode:"open"},Ct[Ut("elementProperties")]=new Map,Ct[Ut("finalized")]=new Map,Ar==null||Ar({ReactiveElement:Ct}),(Ke.reactiveElementVersions??(Ke.reactiveElementVersions=[])).push("2.1.1");/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -48,11 +48,11 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
49
|
*/const Wt=globalThis,Ei=Wt.trustedTypes,oa=Ei?Ei.createPolicy("lit-html",{createHTML:o=>o}):void 0,aa="$lit$",Ge=`lit$${Math.random().toFixed(9).slice(2)}$`,sa="?"+Ge,Ys=`<${sa}>`,at=document,Kt=()=>at.createComment(""),Gt=o=>o===null||typeof o!="object"&&typeof o!="function",Tr=Array.isArray,Xs=o=>Tr(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Or=`[
|
|
50
50
|
\f\r]`,Yt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,na=/-->/g,la=/>/g,st=RegExp(`>|${Or}(?:([^\\s"'>=/]+)(${Or}*=${Or}*(?:[^
|
|
51
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),ca=/'/g,da=/"/g,ha=/^(?:script|style|textarea|title)$/i,Zs=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),c=Zs(1),ce=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),pa=new WeakMap,nt=at.createTreeWalker(at,129);function ua(o,e){if(!Tr(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return oa!==void 0?oa.createHTML(e):e}const Js=(o,e)=>{const t=o.length-1,i=[];let r,s=e===2?"<svg>":e===3?"<math>":"",n=Yt;for(let h=0;h<t;h++){const p=o[h];let v,f,b=-1,x=0;for(;x<p.length&&(n.lastIndex=x,f=n.exec(p),f!==null);)x=n.lastIndex,n===Yt?f[1]==="!--"?n=na:f[1]!==void 0?n=la:f[2]!==void 0?(ha.test(f[2])&&(r=RegExp("</"+f[2],"g")),n=st):f[3]!==void 0&&(n=st):n===st?f[0]===">"?(n=r??Yt,b=-1):f[1]===void 0?b=-2:(b=n.lastIndex-f[2].length,v=f[1],n=f[3]===void 0?st:f[3]==='"'?da:ca):n===da||n===ca?n=st:n===na||n===la?n=Yt:(n=st,r=void 0);const _=n===st&&o[h+1].startsWith("/>")?" ":"";s+=n===Yt?p+Ys:b>=0?(i.push(v),p.slice(0,b)+aa+p.slice(b)+Ge+_):p+Ge+(b===-2?h:_)}return[ua(o,s+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class Xt{constructor({strings:e,_$litType$:t},i){let r;this.parts=[];let s=0,n=0;const h=e.length-1,p=this.parts,[v,f]=Js(e,t);if(this.el=Xt.createElement(v,i),nt.currentNode=this.el.content,t===2||t===3){const b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(r=nt.nextNode())!==null&&p.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(const b of r.getAttributeNames())if(b.endsWith(aa)){const x=f[n++],_=r.getAttribute(b).split(Ge),S=/([.?@])?(.*)/.exec(x);p.push({type:1,index:s,name:S[2],strings:_,ctor:S[1]==="."?en:S[1]==="?"?tn:S[1]==="@"?rn:Ai}),r.removeAttribute(b)}else b.startsWith(Ge)&&(p.push({type:6,index:s}),r.removeAttribute(b));if(ha.test(r.tagName)){const b=r.textContent.split(Ge),x=b.length-1;if(x>0){r.textContent=Ei?Ei.emptyScript:"";for(let _=0;_<x;_++)r.append(b[_],Kt()),nt.nextNode(),p.push({type:2,index:++s});r.append(b[x],Kt())}}}else if(r.nodeType===8)if(r.data===sa)p.push({type:2,index:s});else{let b=-1;for(;(b=r.data.indexOf(Ge,b+1))!==-1;)p.push({type:7,index:s}),b+=Ge.length-1}s++}}static createElement(e,t){const i=at.createElement("template");return i.innerHTML=e,i}}function
|
|
51
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ca=/'/g,da=/"/g,ha=/^(?:script|style|textarea|title)$/i,Zs=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),c=Zs(1),ce=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),pa=new WeakMap,nt=at.createTreeWalker(at,129);function ua(o,e){if(!Tr(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return oa!==void 0?oa.createHTML(e):e}const Js=(o,e)=>{const t=o.length-1,i=[];let r,s=e===2?"<svg>":e===3?"<math>":"",n=Yt;for(let h=0;h<t;h++){const p=o[h];let v,f,b=-1,x=0;for(;x<p.length&&(n.lastIndex=x,f=n.exec(p),f!==null);)x=n.lastIndex,n===Yt?f[1]==="!--"?n=na:f[1]!==void 0?n=la:f[2]!==void 0?(ha.test(f[2])&&(r=RegExp("</"+f[2],"g")),n=st):f[3]!==void 0&&(n=st):n===st?f[0]===">"?(n=r??Yt,b=-1):f[1]===void 0?b=-2:(b=n.lastIndex-f[2].length,v=f[1],n=f[3]===void 0?st:f[3]==='"'?da:ca):n===da||n===ca?n=st:n===na||n===la?n=Yt:(n=st,r=void 0);const _=n===st&&o[h+1].startsWith("/>")?" ":"";s+=n===Yt?p+Ys:b>=0?(i.push(v),p.slice(0,b)+aa+p.slice(b)+Ge+_):p+Ge+(b===-2?h:_)}return[ua(o,s+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class Xt{constructor({strings:e,_$litType$:t},i){let r;this.parts=[];let s=0,n=0;const h=e.length-1,p=this.parts,[v,f]=Js(e,t);if(this.el=Xt.createElement(v,i),nt.currentNode=this.el.content,t===2||t===3){const b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(r=nt.nextNode())!==null&&p.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(const b of r.getAttributeNames())if(b.endsWith(aa)){const x=f[n++],_=r.getAttribute(b).split(Ge),S=/([.?@])?(.*)/.exec(x);p.push({type:1,index:s,name:S[2],strings:_,ctor:S[1]==="."?en:S[1]==="?"?tn:S[1]==="@"?rn:Ai}),r.removeAttribute(b)}else b.startsWith(Ge)&&(p.push({type:6,index:s}),r.removeAttribute(b));if(ha.test(r.tagName)){const b=r.textContent.split(Ge),x=b.length-1;if(x>0){r.textContent=Ei?Ei.emptyScript:"";for(let _=0;_<x;_++)r.append(b[_],Kt()),nt.nextNode(),p.push({type:2,index:++s});r.append(b[x],Kt())}}}else if(r.nodeType===8)if(r.data===sa)p.push({type:2,index:s});else{let b=-1;for(;(b=r.data.indexOf(Ge,b+1))!==-1;)p.push({type:7,index:s}),b+=Ge.length-1}s++}}static createElement(e,t){const i=at.createElement("template");return i.innerHTML=e,i}}function Et(o,e,t=o,i){var n,h;if(e===ce)return e;let r=i!==void 0?(n=t._$Co)==null?void 0:n[i]:t._$Cl;const s=Gt(e)?void 0:e._$litDirective$;return(r==null?void 0:r.constructor)!==s&&((h=r==null?void 0:r._$AO)==null||h.call(r,!1),s===void 0?r=void 0:(r=new s(o),r._$AT(o,t,i)),i!==void 0?(t._$Co??(t._$Co=[]))[i]=r:t._$Cl=r),r!==void 0&&(e=Et(o,r._$AS(o,e.values),r,i)),e}class Qs{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,r=((e==null?void 0:e.creationScope)??at).importNode(t,!0);nt.currentNode=r;let s=nt.nextNode(),n=0,h=0,p=i[0];for(;p!==void 0;){if(n===p.index){let v;p.type===2?v=new Zt(s,s.nextSibling,this,e):p.type===1?v=new p.ctor(s,p.name,p.strings,this,e):p.type===6&&(v=new on(s,this,e)),this._$AV.push(v),p=i[++h]}n!==(p==null?void 0:p.index)&&(s=nt.nextNode(),n++)}return nt.currentNode=at,r}p(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class Zt{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,t,i,r){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Et(this,e,t),Gt(e)?e===u||e==null||e===""?(this._$AH!==u&&this._$AR(),this._$AH=u):e!==this._$AH&&e!==ce&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Xs(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==u&&Gt(this._$AH)?this._$AA.nextSibling.data=e:this.T(at.createTextNode(e)),this._$AH=e}$(e){var s;const{values:t,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Xt.createElement(ua(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===r)this._$AH.p(t);else{const n=new Qs(r,this),h=n.u(this.options);n.p(t),this.T(h),this._$AH=n}}_$AC(e){let t=pa.get(e.strings);return t===void 0&&pa.set(e.strings,t=new Xt(e)),t}k(e){Tr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,r=0;for(const s of e)r===t.length?t.push(i=new Zt(this.O(Kt()),this.O(Kt()),this,this.options)):i=t[r],i._$AI(s),r++;r<t.length&&(this._$AR(i&&i._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,t);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}}class Ai{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,r,s){this.type=1,this._$AH=u,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=u}_$AI(e,t=this,i,r){const s=this.strings;let n=!1;if(s===void 0)e=Et(this,e,t,0),n=!Gt(e)||e!==this._$AH&&e!==ce,n&&(this._$AH=e);else{const h=e;let p,v;for(e=s[0],p=0;p<s.length-1;p++)v=Et(this,h[i+p],t,p),v===ce&&(v=this._$AH[p]),n||(n=!Gt(v)||v!==this._$AH[p]),v===u?e=u:e!==u&&(e+=(v??"")+s[p+1]),this._$AH[p]=v}n&&!r&&this.j(e)}j(e){e===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class en extends Ai{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===u?void 0:e}}class tn extends Ai{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==u)}}class rn extends Ai{constructor(e,t,i,r,s){super(e,t,i,r,s),this.type=5}_$AI(e,t=this){if((e=Et(this,e,t,0)??u)===ce)return;const i=this._$AH,r=e===u&&i!==u||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==u&&(i===u||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}}class on{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Et(this,e)}}const Lr=Wt.litHtmlPolyfillSupport;Lr==null||Lr(Xt,Zt),(Wt.litHtmlVersions??(Wt.litHtmlVersions=[])).push("3.3.1");const Pr=(o,e,t)=>{const i=(t==null?void 0:t.renderBefore)??e;let r=i._$litPart$;if(r===void 0){const s=(t==null?void 0:t.renderBefore)??null;i._$litPart$=r=new Zt(e.insertBefore(Kt(),s),s,void 0,t??{})}return r._$AI(o),r};/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2017 Google LLC
|
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
-
*/const lt=globalThis;let y=class extends
|
|
55
|
+
*/const lt=globalThis;let y=class extends Ct{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Pr(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return ce}};y._$litElement$=!0,y.finalized=!0,(Ds=lt.litElementHydrateSupport)==null||Ds.call(lt,{LitElement:y});const Dr=lt.litElementPolyfillSupport;Dr==null||Dr({LitElement:y}),(lt.litElementVersions??(lt.litElementVersions=[])).push("4.2.1");/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2022 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -251,7 +251,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
251
251
|
* @license
|
|
252
252
|
* Copyright 2023 Google LLC
|
|
253
253
|
* SPDX-License-Identifier: Apache-2.0
|
|
254
|
-
*/const Pe=Symbol("getFormValue"),ii=Symbol("getFormState");function
|
|
254
|
+
*/const Pe=Symbol("getFormValue"),ii=Symbol("getFormState");function At(o){class e extends o{get form(){return this[K].form}get labels(){return this[K].labels}get name(){return this.getAttribute("name")??""}set name(i){this.setAttribute("name",i)}get disabled(){return this.hasAttribute("disabled")}set disabled(i){this.toggleAttribute("disabled",i)}attributeChangedCallback(i,r,s){if(i==="name"||i==="disabled"){const n=i==="disabled"?r!==null:r;this.requestUpdate(i,n);return}super.attributeChangedCallback(i,r,s)}requestUpdate(i,r,s){super.requestUpdate(i,r,s),this[K].setFormValue(this[Pe](),this[ii]())}[Pe](){throw new Error("Implement [getFormValue]")}[ii](){return this[Pe]()}formDisabledCallback(i){this.disabled=i}}return e.formAssociated=!0,d([l({noAccessor:!0})],e.prototype,"name",null),d([l({type:Boolean,noAccessor:!0})],e.prototype,"disabled",null),e}/**
|
|
255
255
|
* @license
|
|
256
256
|
* Copyright 2023 Google LLC
|
|
257
257
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -263,7 +263,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
263
263
|
* @license
|
|
264
264
|
* Copyright 2019 Google LLC
|
|
265
265
|
* SPDX-License-Identifier: Apache-2.0
|
|
266
|
-
*/const Pn=ti(
|
|
266
|
+
*/const Pn=ti(At(Xe(y)));class me extends Pn{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener("click",e=>{!Qt(e)||!this.input||(this.focus(),Li(this.input))})}update(e){(e.has("checked")||e.has("disabled")||e.has("indeterminate"))&&(this.prevChecked=e.get("checked")??this.checked,this.prevDisabled=e.get("disabled")??this.disabled,this.prevIndeterminate=e.get("indeterminate")??this.indeterminate),super.update(e)}render(){const e=!this.prevChecked&&!this.prevIndeterminate,t=this.prevChecked&&!this.prevIndeterminate,i=this.prevIndeterminate,r=this.checked&&!this.indeterminate,s=this.indeterminate,n=P({disabled:this.disabled,selected:r||s,unselected:!r&&!s,checked:r,indeterminate:s,"prev-unselected":e,"prev-checked":t,"prev-indeterminate":i,"prev-disabled":this.prevDisabled}),{ariaLabel:h,ariaInvalid:p}=this;return c`
|
|
267
267
|
<div class="container ${n}">
|
|
268
268
|
<input
|
|
269
269
|
type="checkbox"
|
|
@@ -568,7 +568,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
568
568
|
* @license
|
|
569
569
|
* Copyright 2023 Google LLC
|
|
570
570
|
* SPDX-License-Identifier: Apache-2.0
|
|
571
|
-
*/class
|
|
571
|
+
*/class zt extends y{constructor(){super(...arguments),this.size="medium",this.label="",this.lowered=!1}render(){const{ariaLabel:e}=this;return c`
|
|
572
572
|
<button
|
|
573
573
|
class="fab ${P(this.getRenderClasses())}"
|
|
574
574
|
aria-label=${e||u}>
|
|
@@ -583,11 +583,11 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
583
583
|
aria-hidden=${e||this.label?"true":u}>
|
|
584
584
|
<span></span>
|
|
585
585
|
</slot>
|
|
586
|
-
</span>`}}Q(
|
|
586
|
+
</span>`}}Q(zt),zt.shadowRootOptions={mode:"open",delegatesFocus:!0},d([l({reflect:!0})],zt.prototype,"size",void 0),d([l()],zt.prototype,"label",void 0),d([l({type:Boolean})],zt.prototype,"lowered",void 0);/**
|
|
587
587
|
* @license
|
|
588
588
|
* Copyright 2023 Google LLC
|
|
589
589
|
* SPDX-License-Identifier: Apache-2.0
|
|
590
|
-
*/class io extends
|
|
590
|
+
*/class io extends zt{constructor(){super(...arguments),this.variant="surface"}getRenderClasses(){return{...super.getRenderClasses(),primary:this.variant==="primary",secondary:this.variant==="secondary",tertiary:this.variant==="tertiary"}}}d([l()],io.prototype,"variant",void 0);/**
|
|
591
591
|
* @license
|
|
592
592
|
* Copyright 2024 Google LLC
|
|
593
593
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -794,11 +794,11 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
794
794
|
* @license
|
|
795
795
|
* Copyright 2023 Google LLC
|
|
796
796
|
* SPDX-License-Identifier: Apache-2.0
|
|
797
|
-
*/function La(o,e=$e){const t=Gi(o,e);return t&&(t.tabIndex=0,t.focus()),t}function Pa(o,e=$e){const t=Da(o,e);return t&&(t.tabIndex=0,t.focus()),t}function ml(o,e=$e){const t=
|
|
797
|
+
*/function La(o,e=$e){const t=Gi(o,e);return t&&(t.tabIndex=0,t.focus()),t}function Pa(o,e=$e){const t=Da(o,e);return t&&(t.tabIndex=0,t.focus()),t}function ml(o,e=$e){const t=It(o,e);return t&&(t.item.tabIndex=-1),t}function It(o,e=$e){for(let t=0;t<o.length;t++){const i=o[t];if(i.tabIndex===0&&e(i))return{item:i,index:t}}return null}function Gi(o,e=$e){for(const t of o)if(e(t))return t;return null}function Da(o,e=$e){for(let t=o.length-1;t>=0;t--){const i=o[t];if(e(i))return i}return null}function fl(o,e,t=$e,i=!0){for(let r=1;r<o.length;r++){const s=(r+e)%o.length;if(s<e&&!i)return null;const n=o[s];if(t(n))return n}return o[e]?o[e]:null}function gl(o,e,t=$e,i=!0){for(let r=1;r<o.length;r++){const s=(e-r+o.length)%o.length;if(s>e&&!i)return null;const n=o[s];if(t(n))return n}return o[e]?o[e]:null}function Ra(o,e,t=$e,i=!0){if(e){const r=fl(o,e.index,t,i);return r&&(r.tabIndex=0,r.focus()),r}else return La(o,t)}function Ba(o,e,t=$e,i=!0){if(e){const r=gl(o,e.index,t,i);return r&&(r.tabIndex=0,r.focus()),r}else return Pa(o,t)}function Yi(){return new Event("deactivate-items",{bubbles:!0,composed:!0})}function Ma(){return new Event("request-activation",{bubbles:!0,composed:!0})}function $e(o){return!o.disabled}/**
|
|
798
798
|
* @license
|
|
799
799
|
* Copyright 2023 Google LLC
|
|
800
800
|
* SPDX-License-Identifier: Apache-2.0
|
|
801
|
-
*/const G={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",Home:"Home",End:"End"};class Ha{constructor(e){this.handleKeydown=f=>{const b=f.key;if(f.defaultPrevented||!this.isNavigableKey(b))return;const x=this.items;if(!x.length)return;const _=
|
|
801
|
+
*/const G={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",Home:"Home",End:"End"};class Ha{constructor(e){this.handleKeydown=f=>{const b=f.key;if(f.defaultPrevented||!this.isNavigableKey(b))return;const x=this.items;if(!x.length)return;const _=It(x,this.isActivatable);f.preventDefault();const S=this.isRtl(),C=S?G.ArrowRight:G.ArrowLeft,E=S?G.ArrowLeft:G.ArrowRight;let A=null;switch(b){case G.ArrowDown:case E:A=Ra(x,_,this.isActivatable,this.wrapNavigation());break;case G.ArrowUp:case C:A=Ba(x,_,this.isActivatable,this.wrapNavigation());break;case G.Home:A=La(x,this.isActivatable);break;case G.End:A=Pa(x,this.isActivatable);break}A&&_&&_.item!==A&&(_.item.tabIndex=-1)},this.onDeactivateItems=()=>{const f=this.items;for(const b of f)this.deactivateItem(b)},this.onRequestActivation=f=>{this.onDeactivateItems();const b=f.target;this.activateItem(b),b.focus()},this.onSlotchange=()=>{const f=this.items;let b=!1;for(const _ of f){if(!_.disabled&&_.tabIndex>-1&&!b){b=!0,_.tabIndex=0;continue}_.tabIndex=-1}if(b)return;const x=Gi(f,this.isActivatable);x&&(x.tabIndex=0)};const{isItem:t,getPossibleItems:i,isRtl:r,deactivateItem:s,activateItem:n,isNavigableKey:h,isActivatable:p,wrapNavigation:v}=e;this.isItem=t,this.getPossibleItems=i,this.isRtl=r,this.deactivateItem=s,this.activateItem=n,this.isNavigableKey=h,this.isActivatable=p,this.wrapNavigation=v??(()=>!0)}get items(){const e=this.getPossibleItems(),t=[];for(const i of e){if(this.isItem(i)){t.push(i);continue}const s=i.item;s&&this.isItem(s)&&t.push(s)}return t}activateNextItem(){const e=this.items,t=It(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Ra(e,t,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){const e=this.items,t=It(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Ba(e,t,this.isActivatable,this.wrapNavigation())}}/**
|
|
802
802
|
* @license
|
|
803
803
|
* Copyright 2021 Google LLC
|
|
804
804
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -905,11 +905,11 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
905
905
|
* @license
|
|
906
906
|
* Copyright 2023 Google LLC
|
|
907
907
|
* SPDX-License-Identifier: Apache-2.0
|
|
908
|
-
*/function Cl(o,e){return new CustomEvent("close-menu",{bubbles:!0,composed:!0,detail:{initiator:o,reason:e,itemPath:[o]}})}const Va=Cl;function El(){return new Event("deactivate-typeahead",{bubbles:!0,composed:!0})}function ho(){return new Event("activate-typeahead",{bubbles:!0,composed:!0})}const Je={RIGHT:"ArrowRight",LEFT:"ArrowLeft"},
|
|
908
|
+
*/function Cl(o,e){return new CustomEvent("close-menu",{bubbles:!0,composed:!0,detail:{initiator:o,reason:e,itemPath:[o]}})}const Va=Cl;function El(){return new Event("deactivate-typeahead",{bubbles:!0,composed:!0})}function ho(){return new Event("activate-typeahead",{bubbles:!0,composed:!0})}const Je={RIGHT:"ArrowRight",LEFT:"ArrowLeft"},Tt={SPACE:"Space",ENTER:"Enter"},po={CLICK_SELECTION:"click-selection",KEYDOWN:"keydown"},uo={ESCAPE:"Escape",SPACE:Tt.SPACE,ENTER:Tt.ENTER};function qa(o){return Object.values(uo).some(e=>e===o)}function Al(o){return Object.values(Tt).some(e=>e===o)}function vo(o,e){const t=new Event("md-contains",{bubbles:!0,composed:!0});let i=[];const r=n=>{i=n.composedPath()};return e.addEventListener("md-contains",r),o.dispatchEvent(t),e.removeEventListener("md-contains",r),i.length>0}const fe={NONE:"none",LIST_ROOT:"list-root",FIRST_ITEM:"first-item",LAST_ITEM:"last-item"};/**
|
|
909
909
|
* @license
|
|
910
910
|
* Copyright 2023 Google LLC
|
|
911
911
|
* SPDX-License-Identifier: Apache-2.0
|
|
912
|
-
*/const Zi={END_START:"end-start",START_START:"start-start",START_END:"start-end"};class zl{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:"none"},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){const{surfaceEl:e,anchorEl:t,anchorCorner:i,surfaceCorner:r,positioning:s,xOffset:n,yOffset:h,repositionStrategy:p}=this.getProperties(),v=i.toLowerCase().trim(),f=r.toLowerCase().trim();if(!e||!t)return;const b=window.innerWidth,x=window.innerHeight,_=document.createElement("div");_.style.opacity="0",_.style.position="fixed",_.style.display="block",_.style.inset="0",document.body.appendChild(_);const S=_.getBoundingClientRect();_.remove();const C=window.innerHeight-S.bottom,E=window.innerWidth-S.right;this.surfaceStylesInternal={display:"block",opacity:"0"},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();const A=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),z=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[X,V]=f.split("-"),[M,je]=v.split("-"),We=getComputedStyle(e).direction==="ltr";let{blockInset:ve,blockOutOfBoundsCorrection:ne,surfaceBlockProperty
|
|
912
|
+
*/const Zi={END_START:"end-start",START_START:"start-start",START_END:"start-end"};class zl{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:"none"},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){const{surfaceEl:e,anchorEl:t,anchorCorner:i,surfaceCorner:r,positioning:s,xOffset:n,yOffset:h,repositionStrategy:p}=this.getProperties(),v=i.toLowerCase().trim(),f=r.toLowerCase().trim();if(!e||!t)return;const b=window.innerWidth,x=window.innerHeight,_=document.createElement("div");_.style.opacity="0",_.style.position="fixed",_.style.display="block",_.style.inset="0",document.body.appendChild(_);const S=_.getBoundingClientRect();_.remove();const C=window.innerHeight-S.bottom,E=window.innerWidth-S.right;this.surfaceStylesInternal={display:"block",opacity:"0"},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();const A=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),z=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[X,V]=f.split("-"),[M,je]=v.split("-"),We=getComputedStyle(e).direction==="ltr";let{blockInset:ve,blockOutOfBoundsCorrection:ne,surfaceBlockProperty:$t}=this.calculateBlock({surfaceRect:A,anchorRect:z,anchorBlock:M,surfaceBlock:X,yOffset:h,positioning:s,windowInnerHeight:x,blockScrollbarHeight:C});if(ne){const wi=X==="start"?"end":"start",Si=M==="start"?"end":"start",Se=this.calculateBlock({surfaceRect:A,anchorRect:z,anchorBlock:Si,surfaceBlock:wi,yOffset:h,positioning:s,windowInnerHeight:x,blockScrollbarHeight:C});ne>Se.blockOutOfBoundsCorrection&&(ve=Se.blockInset,ne=Se.blockOutOfBoundsCorrection,$t=Se.surfaceBlockProperty)}let{inlineInset:Oe,inlineOutOfBoundsCorrection:ot,surfaceInlineProperty:kr}=this.calculateInline({surfaceRect:A,anchorRect:z,anchorInline:je,surfaceInline:V,xOffset:n,positioning:s,isLTR:We,windowInnerWidth:b,inlineScrollbarWidth:E});if(ot){const wi=V==="start"?"end":"start",Si=je==="start"?"end":"start",Se=this.calculateInline({surfaceRect:A,anchorRect:z,anchorInline:Si,surfaceInline:wi,xOffset:n,positioning:s,isLTR:We,windowInnerWidth:b,inlineScrollbarWidth:E});Math.abs(ot)>Math.abs(Se.inlineOutOfBoundsCorrection)&&(Oe=Se.inlineInset,ot=Se.inlineOutOfBoundsCorrection,kr=Se.surfaceInlineProperty)}p==="move"&&(ve=ve-ne,Oe=Oe-ot),this.surfaceStylesInternal={display:"block",opacity:"1",[$t]:`${ve}px`,[kr]:`${Oe}px`},p==="resize"&&(ne&&(this.surfaceStylesInternal.height=`${A.height-ne}px`),ot&&(this.surfaceStylesInternal.width=`${A.width-ot}px`)),this.host.requestUpdate()}calculateBlock(e){const{surfaceRect:t,anchorRect:i,anchorBlock:r,surfaceBlock:s,yOffset:n,positioning:h,windowInnerHeight:p,blockScrollbarHeight:v}=e,f=h==="fixed"||h==="document"?1:0,b=h==="document"?1:0,x=s==="start"?1:0,_=s==="end"?1:0,C=(r!==s?1:0)*i.height+n,E=x*i.top+_*(p-i.bottom-v),A=x*window.scrollY-_*window.scrollY,z=Math.abs(Math.min(0,p-E-C-t.height));return{blockInset:f*E+b*A+C,blockOutOfBoundsCorrection:z,surfaceBlockProperty:s==="start"?"inset-block-start":"inset-block-end"}}calculateInline(e){const{isLTR:t,surfaceInline:i,anchorInline:r,anchorRect:s,surfaceRect:n,xOffset:h,positioning:p,windowInnerWidth:v,inlineScrollbarWidth:f}=e,b=p==="fixed"||p==="document"?1:0,x=p==="document"?1:0,_=t?1:0,S=t?0:1,C=i==="start"?1:0,E=i==="end"?1:0,z=(r!==i?1:0)*s.width+h,X=C*s.left+E*(v-s.right-f),V=C*(v-s.right-f)+E*s.left,M=_*X+S*V,je=C*window.scrollX-E*window.scrollX,We=E*window.scrollX-C*window.scrollX,ve=_*je+S*We,ne=Math.abs(Math.min(0,v-M-z-n.width)),$t=b*M+z+x*ve;let Oe=i==="start"?"inset-inline-start":"inset-inline-end";return(p==="document"||p==="fixed")&&(i==="start"&&t||i==="end"&&!t?Oe="left":Oe="right"),{inlineInset:$t,inlineOutOfBoundsCorrection:ne,surfaceInlineProperty:Oe}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){const e=this.getProperties();let t=!1;for(const[n,h]of Object.entries(e))if(t=t||h!==this.lastValues[n],t)break;const i=this.lastValues.isOpen!==e.isOpen,r=!!e.anchorEl,s=!!e.surfaceEl;t&&r&&s&&(this.lastValues.isOpen=e.isOpen,e.isOpen?(this.lastValues=e,await this.position(),e.onOpen()):i&&(await e.beforeClose(),this.close(),e.onClose()))}close(){this.surfaceStylesInternal={display:"none"},this.host.requestUpdate();const e=this.getProperties().surfaceEl;e!=null&&e.popover&&(e!=null&&e.isConnected)&&e.hidePopover()}}/**
|
|
913
913
|
* @license
|
|
914
914
|
* Copyright 2023 Google LLC
|
|
915
915
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -917,7 +917,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
917
917
|
* @license
|
|
918
918
|
* Copyright 2023 Google LLC
|
|
919
919
|
* SPDX-License-Identifier: Apache-2.0
|
|
920
|
-
*/const Ua=200,ja=new Set([G.ArrowDown,G.ArrowUp,G.Home,G.End]),Tl=new Set([G.ArrowLeft,G.ArrowRight,...ja]);function Ol(o=document){var t;let e=o.activeElement;for(;e&&((t=e==null?void 0:e.shadowRoot)!=null&&t.activeElement);)e=e.shadowRoot.activeElement;return e}class H extends y{get openDirection(){return this.menuCorner.split("-")[0]==="start"?"DOWN":"UP"}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate("anchorElement")}constructor(){super(),this.anchor="",this.positioning="absolute",this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.typeaheadDelay=Ua,this.anchorCorner=Zi.END_START,this.menuCorner=Zi.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=fe.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=dn(),this.listController=new Ha({isItem:e=>e.hasAttribute("md-menu-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction==="rtl",deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>{if(!this.isSubmenu)return Tl.has(e);const i=getComputedStyle(this).direction==="rtl"?G.ArrowLeft:G.ArrowRight;return e===i?!0:ja.has(e)},wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Il(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new zl(this,()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning==="popover"?"document":this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&this.positioning!=="popover"?"move":"resize"})),this.onWindowResize=()=>{this.isRepositioning||this.positioning!=="document"&&this.positioning!=="fixed"&&this.positioning!=="popover"||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{const t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(vo(e.relatedTarget,this)||this.pointerPath.length!==0&&vo(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;const i=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=i},this.onOpened=async()=>{this.lastFocusedElement=Ol();const e=this.items,t=
|
|
920
|
+
*/const Ua=200,ja=new Set([G.ArrowDown,G.ArrowUp,G.Home,G.End]),Tl=new Set([G.ArrowLeft,G.ArrowRight,...ja]);function Ol(o=document){var t;let e=o.activeElement;for(;e&&((t=e==null?void 0:e.shadowRoot)!=null&&t.activeElement);)e=e.shadowRoot.activeElement;return e}class H extends y{get openDirection(){return this.menuCorner.split("-")[0]==="start"?"DOWN":"UP"}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate("anchorElement")}constructor(){super(),this.anchor="",this.positioning="absolute",this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.typeaheadDelay=Ua,this.anchorCorner=Zi.END_START,this.menuCorner=Zi.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=fe.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=dn(),this.listController=new Ha({isItem:e=>e.hasAttribute("md-menu-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction==="rtl",deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>{if(!this.isSubmenu)return Tl.has(e);const i=getComputedStyle(this).direction==="rtl"?G.ArrowLeft:G.ArrowRight;return e===i?!0:ja.has(e)},wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Il(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new zl(this,()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning==="popover"?"document":this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&this.positioning!=="popover"?"move":"resize"})),this.onWindowResize=()=>{this.isRepositioning||this.positioning!=="document"&&this.positioning!=="fixed"&&this.positioning!=="popover"||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{const t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(vo(e.relatedTarget,this)||this.pointerPath.length!==0&&vo(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;const i=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=i},this.onOpened=async()=>{this.lastFocusedElement=Ol();const e=this.items,t=It(e);t&&this.defaultFocus!==fe.NONE&&(t.item.tabIndex=-1);let i=!this.quick;switch(this.quick?this.dispatchEvent(new Event("opening")):i=!!await this.animateOpen(),this.defaultFocus){case fe.FIRST_ITEM:const r=Gi(e);r&&(r.tabIndex=0,r.focus(),await r.updateComplete);break;case fe.LAST_ITEM:const s=Da(e);s&&(s.tabIndex=0,s.focus(),await s.updateComplete);break;case fe.LIST_ROOT:this.focus();break;default:case fe.NONE:break}i||this.dispatchEvent(new Event("opened"))},this.beforeClose=async()=>{var e,t;this.open=!1,this.skipRestoreFocus||(t=(e=this.lastFocusedElement)==null?void 0:e.focus)==null||t.call(e),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event("closing")),this.dispatchEvent(new Event("closed")))},this.onWindowPointerdown=e=>{this.pointerPath=e.composedPath()},this.onDocumentClick=e=>{if(!this.open)return;const t=e.composedPath();!this.stayOpenOnOutsideClick&&!t.includes(this)&&!t.includes(this.anchorElement)&&(this.open=!1)},this.internals.role="menu",this.addEventListener("keydown",this.handleKeydown),this.addEventListener("keydown",this.captureKeydown,{capture:!0}),this.addEventListener("focusout",this.handleFocusout)}get items(){return this.listController.items}willUpdate(e){if(e.has("open")){if(this.open){this.removeAttribute("aria-hidden");return}this.setAttribute("aria-hidden","true")}}update(e){e.has("open")&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),e.has("positioning")&&this.positioning==="popover"&&!this.showPopover&&(this.positioning="fixed"),super.update(e)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}getBoundingClientRect(){return this.surfaceEl?this.surfaceEl.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){return this.surfaceEl?this.surfaceEl.getClientRects():super.getClientRects()}render(){return this.renderSurface()}renderSurface(){return c`
|
|
921
921
|
<div
|
|
922
922
|
class="menu ${P(this.getSurfaceClasses())}"
|
|
923
923
|
style=${ut(this.menuPositionController.surfaceStyles)}
|
|
@@ -1017,7 +1017,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
1017
1017
|
@close-menu=${this.onCloseSubmenu}
|
|
1018
1018
|
@slotchange=${this.onSlotchange}>
|
|
1019
1019
|
</slot>
|
|
1020
|
-
`}firstUpdated(){this.onSlotchange()}async show(){const e=this.menu;if(!e||e.open)return;e.addEventListener("closed",()=>{this.item.ariaExpanded="false",this.dispatchEvent(ho()),this.dispatchEvent(Yi()),e.ariaHidden="true"},{once:!0}),e.positioning==="document"&&(e.positioning="absolute"),e.quick=!0,e.hasOverflow=!0,e.anchorCorner=this.anchorCorner,e.menuCorner=this.menuCorner,e.anchorElement=this.item,e.defaultFocus="first-item",e.removeAttribute("aria-hidden"),e.skipRestoreFocus=!1;const t=e.open;if(e.show(),this.item.ariaExpanded="true",this.item.ariaHasPopup="menu",e.id&&this.item.setAttribute("aria-controls",e.id),this.dispatchEvent(Yi()),this.dispatchEvent(El()),this.item.selected=!0,!t){let i=s=>{};const r=new Promise(s=>{i=s});e.addEventListener("opened",i,{once:!0}),await r}}async close(){const e=this.menu;if(!e||!e.open)return;this.dispatchEvent(ho()),e.quick=!0,e.close(),this.dispatchEvent(Yi());let t=r=>{};const i=new Promise(r=>{t=r});e.addEventListener("closed",t,{once:!0}),await i}onSlotchange(){var t;if(!this.item)return;this.item.ariaExpanded="false",this.item.ariaHasPopup="menu",(t=this.menu)!=null&&t.id&&this.item.setAttribute("aria-controls",this.menu.id),this.item.keepOpen=!0;const e=this.menu;e&&(e.isSubmenu=!0,e.ariaHidden="true")}onClick(){this.show()}async onKeydown(e){const t=this.isSubmenuOpenKey(e.code);if(e.defaultPrevented)return;const i=t&&(Je.LEFT===e.code||Je.RIGHT===e.code);if((e.code===
|
|
1020
|
+
`}firstUpdated(){this.onSlotchange()}async show(){const e=this.menu;if(!e||e.open)return;e.addEventListener("closed",()=>{this.item.ariaExpanded="false",this.dispatchEvent(ho()),this.dispatchEvent(Yi()),e.ariaHidden="true"},{once:!0}),e.positioning==="document"&&(e.positioning="absolute"),e.quick=!0,e.hasOverflow=!0,e.anchorCorner=this.anchorCorner,e.menuCorner=this.menuCorner,e.anchorElement=this.item,e.defaultFocus="first-item",e.removeAttribute("aria-hidden"),e.skipRestoreFocus=!1;const t=e.open;if(e.show(),this.item.ariaExpanded="true",this.item.ariaHasPopup="menu",e.id&&this.item.setAttribute("aria-controls",e.id),this.dispatchEvent(Yi()),this.dispatchEvent(El()),this.item.selected=!0,!t){let i=s=>{};const r=new Promise(s=>{i=s});e.addEventListener("opened",i,{once:!0}),await r}}async close(){const e=this.menu;if(!e||!e.open)return;this.dispatchEvent(ho()),e.quick=!0,e.close(),this.dispatchEvent(Yi());let t=r=>{};const i=new Promise(r=>{t=r});e.addEventListener("closed",t,{once:!0}),await i}onSlotchange(){var t;if(!this.item)return;this.item.ariaExpanded="false",this.item.ariaHasPopup="menu",(t=this.menu)!=null&&t.id&&this.item.setAttribute("aria-controls",this.menu.id),this.item.keepOpen=!0;const e=this.menu;e&&(e.isSubmenu=!0,e.ariaHidden="true")}onClick(){this.show()}async onKeydown(e){const t=this.isSubmenuOpenKey(e.code);if(e.defaultPrevented)return;const i=t&&(Je.LEFT===e.code||Je.RIGHT===e.code);if((e.code===Tt.SPACE||i)&&(e.preventDefault(),i&&e.stopPropagation()),!t)return;const r=this.menu;if(!r)return;const s=r.items,n=Gi(s);if(n){await this.show(),n.tabIndex=0,n.focus();return}}onCloseSubmenu(e){const{itemPath:t,reason:i}=e.detail;if(t.push(this.item),this.dispatchEvent(ho()),i.kind===po.KEYDOWN&&i.key===uo.ESCAPE){e.stopPropagation(),this.item.dispatchEvent(Ma());return}this.dispatchEvent(Yi())}async onSubMenuKeydown(e){var r;if(e.defaultPrevented)return;const{close:t,keyCode:i}=this.isSubmenuCloseKey(e.code);t&&(e.preventDefault(),(i===Je.LEFT||i===Je.RIGHT)&&e.stopPropagation(),await this.close(),ml(this.menu.items),(r=this.item)==null||r.focus(),this.item.tabIndex=0,this.item.focus())}isSubmenuOpenKey(e){const i=getComputedStyle(this).direction==="rtl"?Je.LEFT:Je.RIGHT;switch(e){case i:case Tt.SPACE:case Tt.ENTER:return!0;default:return!1}}isSubmenuCloseKey(e){const i=getComputedStyle(this).direction==="rtl"?Je.RIGHT:Je.LEFT;switch(e){case i:case uo.ESCAPE:return{close:!0,keyCode:e};default:return{close:!1}}}}d([l({attribute:"anchor-corner"})],Qe.prototype,"anchorCorner",void 0),d([l({attribute:"menu-corner"})],Qe.prototype,"menuCorner",void 0),d([l({type:Number,attribute:"hover-open-delay"})],Qe.prototype,"hoverOpenDelay",void 0),d([l({type:Number,attribute:"hover-close-delay"})],Qe.prototype,"hoverCloseDelay",void 0),d([l({type:Boolean,reflect:!0,attribute:"md-sub-menu"})],Qe.prototype,"isSubMenu",void 0),d([Y({slot:"item",flatten:!0})],Qe.prototype,"items",void 0),d([Y({slot:"menu",flatten:!0})],Qe.prototype,"menus",void 0);/**
|
|
1021
1021
|
* @license
|
|
1022
1022
|
* Copyright 2024 Google LLC
|
|
1023
1023
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1106,7 +1106,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
1106
1106
|
* @license
|
|
1107
1107
|
* Copyright 2018 Google LLC
|
|
1108
1108
|
* SPDX-License-Identifier: Apache-2.0
|
|
1109
|
-
*/var Xa;const _o=Symbol("checked");let Fl=0;const Nl=ti(
|
|
1109
|
+
*/var Xa;const _o=Symbol("checked");let Fl=0;const Nl=ti(At(Xe(Ya(y))));class ai extends Nl{get checked(){return this[_o]}set checked(e){const t=this.checked;t!==e&&(this[_o]=e,this.requestUpdate("checked",t),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId=`cutout${++Fl}`,this[Xa]=!1,this.required=!1,this.value="on",this.selectionController=new Hl(this),this.addController(this.selectionController),this[K].role="radio",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeydown.bind(this))}render(){const e={checked:this.checked};return c`
|
|
1110
1110
|
<div class="container ${P(e)}" aria-hidden="true">
|
|
1111
1111
|
<md-ripple
|
|
1112
1112
|
part="ripple"
|
|
@@ -1160,7 +1160,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
1160
1160
|
* @license
|
|
1161
1161
|
* Copyright 2023 Google LLC
|
|
1162
1162
|
* SPDX-License-Identifier: Apache-2.0
|
|
1163
|
-
*/var Ja;const nr=Symbol("value"),Gl=Za(ti(
|
|
1163
|
+
*/var Ja;const nr=Symbol("value"),Gl=Za(ti(At(Xe(y))));class L extends Gl{get value(){return this[nr]}set value(e){this.lastUserSetValue=e,this.select(e)}get options(){var e;return((e=this.menu)==null?void 0:e.items)??[]}get selectedIndex(){const[e,t]=(this.getSelectedOptions()??[])[0]??[];return t??-1}set selectedIndex(e){this.lastUserSetSelectedIndex=e,this.selectIndex(e)}get selectedOptions(){return(this.getSelectedOptions()??[]).map(([e])=>e)}get hasError(){return this.error||this.nativeError}constructor(){super(),this.quick=!1,this.required=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.supportingText="",this.error=!1,this.menuPositioning="popover",this.clampMenuWidth=!1,this.typeaheadDelay=Ua,this.hasLeadingIcon=!1,this.displayText="",this.menuAlign="start",this[Ja]="",this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText="",this.focused=!1,this.open=!1,this.defaultFocus=fe.NONE,this.prevOpen=this.open,this.selectWidth=0,this.addEventListener("focus",this.handleFocus.bind(this)),this.addEventListener("blur",this.handleBlur.bind(this))}select(e){const t=this.options.find(i=>i.value===e);t&&this.selectItem(t)}selectIndex(e){const t=this.options[e];t&&this.selectItem(t)}reset(){for(const e of this.options)e.selected=e.hasAttribute("selected");this.updateValueAndDisplayText(),this.nativeError=!1,this.nativeErrorText=""}[(Ja=nr,ir)](e){var i;e==null||e.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&((i=this.field)==null||i.reannounceError())}update(e){if(this.hasUpdated||this.initUserSelection(),this.prevOpen!==this.open&&this.open){const t=this.getBoundingClientRect();this.selectWidth=t.width}this.prevOpen=this.open,super.update(e)}render(){return c`
|
|
1164
1164
|
<span
|
|
1165
1165
|
class="select ${P(this.getRenderClasses())}"
|
|
1166
1166
|
@focusout=${this.handleFocusout}>
|
|
@@ -1242,7 +1242,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
1242
1242
|
@request-deselection=${this.handleRequestDeselection}>
|
|
1243
1243
|
${this.renderMenuContent()}
|
|
1244
1244
|
</md-menu>
|
|
1245
|
-
</div>`}renderMenuContent(){return c`<slot></slot>`}handleKeydown(e){var s,n;if(this.open||this.disabled||!this.menu)return;const t=this.menu.typeaheadController,i=e.code==="Space"||e.code==="ArrowDown"||e.code==="ArrowUp"||e.code==="End"||e.code==="Home"||e.code==="Enter";if(!t.isTypingAhead&&i){switch(e.preventDefault(),this.open=!0,e.code){case"Space":case"ArrowDown":case"Enter":this.defaultFocus=fe.NONE;break;case"End":this.defaultFocus=fe.LAST_ITEM;break;case"ArrowUp":case"Home":this.defaultFocus=fe.FIRST_ITEM;break}return}if(e.key.length===1){t.onKeydown(e),e.preventDefault();const{lastActiveRecord:h}=t;if(!h)return;(n=(s=this.labelEl)==null?void 0:s.setAttribute)==null||n.call(s,"aria-live","polite"),this.selectItem(h[de.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&vo(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;const e=this.menu.items;return this.lastSelectedOptionRecords=Kl(e),this.lastSelectedOptionRecords}async getUpdateComplete(){var e;return await((e=this.menu)==null?void 0:e.updateComplete),super.getUpdateComplete()}updateValueAndDisplayText(){const e=this.getSelectedOptions()??[];let t=!1;if(e.length){const[i]=e[0];t=this.lastSelectedOption!==i,this.lastSelectedOption=i,this[nr]=i.value,this.displayText=i.displayText}else t=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[nr]="",this.displayText="";return t}async handleOpening(e){var s,n,h;if((n=(s=this.labelEl)==null?void 0:s.removeAttribute)==null||n.call(s,"aria-live"),this.redispatchEvent(e),this.defaultFocus!==fe.NONE)return;const t=this.menu.items,i=(h=
|
|
1245
|
+
</div>`}renderMenuContent(){return c`<slot></slot>`}handleKeydown(e){var s,n;if(this.open||this.disabled||!this.menu)return;const t=this.menu.typeaheadController,i=e.code==="Space"||e.code==="ArrowDown"||e.code==="ArrowUp"||e.code==="End"||e.code==="Home"||e.code==="Enter";if(!t.isTypingAhead&&i){switch(e.preventDefault(),this.open=!0,e.code){case"Space":case"ArrowDown":case"Enter":this.defaultFocus=fe.NONE;break;case"End":this.defaultFocus=fe.LAST_ITEM;break;case"ArrowUp":case"Home":this.defaultFocus=fe.FIRST_ITEM;break}return}if(e.key.length===1){t.onKeydown(e),e.preventDefault();const{lastActiveRecord:h}=t;if(!h)return;(n=(s=this.labelEl)==null?void 0:s.setAttribute)==null||n.call(s,"aria-live","polite"),this.selectItem(h[de.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&vo(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;const e=this.menu.items;return this.lastSelectedOptionRecords=Kl(e),this.lastSelectedOptionRecords}async getUpdateComplete(){var e;return await((e=this.menu)==null?void 0:e.updateComplete),super.getUpdateComplete()}updateValueAndDisplayText(){const e=this.getSelectedOptions()??[];let t=!1;if(e.length){const[i]=e[0];t=this.lastSelectedOption!==i,this.lastSelectedOption=i,this[nr]=i.value,this.displayText=i.displayText}else t=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[nr]="",this.displayText="";return t}async handleOpening(e){var s,n,h;if((n=(s=this.labelEl)==null?void 0:s.removeAttribute)==null||n.call(s,"aria-live"),this.redispatchEvent(e),this.defaultFocus!==fe.NONE)return;const t=this.menu.items,i=(h=It(t))==null?void 0:h.item;let[r]=this.lastSelectedOptionRecords[0]??[null];i&&i!==r&&(i.tabIndex=-1),r=r??t[0],r&&(r.tabIndex=0,r.focus())}redispatchEvent(e){Ze(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){const t=e.detail.reason,i=e.detail.itemPath[0];this.open=!1;let r=!1;t.kind==="click-selection"?r=this.selectItem(i):t.kind==="keydown"&&Al(t.key)?r=this.selectItem(i):(i.tabIndex=-1,i.blur()),r&&this.dispatchInteractionEvents()}selectItem(e){return(this.getSelectedOptions()??[]).forEach(([i])=>{e!==i&&(i.selected=!1)}),e.selected=!0,this.updateValueAndDisplayText()}handleRequestSelection(e){const t=e.target;this.lastSelectedOptionRecords.some(([i])=>i===t)||this.selectItem(t)}handleRequestDeselection(e){const t=e.target;this.lastSelectedOptionRecords.some(([i])=>i===t)&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):this.lastUserSetSelectedIndex!==null&&!this.lastSelectedOptionRecords.length?this.selectIndex(this.lastUserSetSelectedIndex):this.updateValueAndDisplayText()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}[Pe](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}click(){var e;(e=this.field)==null||e.click()}[ct](){return new Wl(()=>this)}[dt](){return this.field}}Q(L),L.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0},d([l({type:Boolean})],L.prototype,"quick",void 0),d([l({type:Boolean})],L.prototype,"required",void 0),d([l({type:String,attribute:"error-text"})],L.prototype,"errorText",void 0),d([l()],L.prototype,"label",void 0),d([l({type:Boolean,attribute:"no-asterisk"})],L.prototype,"noAsterisk",void 0),d([l({type:String,attribute:"supporting-text"})],L.prototype,"supportingText",void 0),d([l({type:Boolean,reflect:!0})],L.prototype,"error",void 0),d([l({attribute:"menu-positioning"})],L.prototype,"menuPositioning",void 0),d([l({type:Boolean,attribute:"clamp-menu-width"})],L.prototype,"clampMenuWidth",void 0),d([l({type:Number,attribute:"typeahead-delay"})],L.prototype,"typeaheadDelay",void 0),d([l({type:Boolean,attribute:"has-leading-icon"})],L.prototype,"hasLeadingIcon",void 0),d([l({attribute:"display-text"})],L.prototype,"displayText",void 0),d([l({attribute:"menu-align"})],L.prototype,"menuAlign",void 0),d([l()],L.prototype,"value",null),d([l({type:Number,attribute:"selected-index"})],L.prototype,"selectedIndex",null),d([w()],L.prototype,"nativeError",void 0),d([w()],L.prototype,"nativeErrorText",void 0),d([w()],L.prototype,"focused",void 0),d([w()],L.prototype,"open",void 0),d([w()],L.prototype,"defaultFocus",void 0),d([k(".field")],L.prototype,"field",void 0),d([k("md-menu")],L.prototype,"menu",void 0),d([k("#label")],L.prototype,"labelEl",void 0),d([Y({slot:"leading-icon",flatten:!0})],L.prototype,"leadingIcons",void 0);/**
|
|
1246
1246
|
* @license
|
|
1247
1247
|
* Copyright 2023 Google LLC
|
|
1248
1248
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1336,7 +1336,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
1336
1336
|
* @license
|
|
1337
1337
|
* Copyright 2023 Google LLC
|
|
1338
1338
|
* SPDX-License-Identifier: Apache-2.0
|
|
1339
|
-
*/const rc=
|
|
1339
|
+
*/const rc=At(Xe(y));class T extends rc{get nameStart(){return this.getAttribute("name-start")??this.name}set nameStart(e){this.setAttribute("name-start",e)}get nameEnd(){return this.getAttribute("name-end")??this.nameStart}set nameEnd(e){this.setAttribute("name-end",e)}get renderAriaLabelStart(){const{ariaLabel:e}=this;return this.ariaLabelStart||e&&`${e} start`||this.valueLabelStart||String(this.valueStart)}get renderAriaValueTextStart(){return this.ariaValueTextStart||this.valueLabelStart||String(this.valueStart)}get renderAriaLabelEnd(){const{ariaLabel:e}=this;return this.range?this.ariaLabelEnd||e&&`${e} end`||this.valueLabelEnd||String(this.valueEnd):e||this.valueLabel||String(this.value)}get renderAriaValueTextEnd(){if(this.range)return this.ariaValueTextEnd||this.valueLabelEnd||String(this.valueEnd);const{ariaValueText:e}=this;return e||this.valueLabel||String(this.value)}constructor(){super(),this.min=0,this.max=100,this.valueLabel="",this.valueLabelStart="",this.valueLabelEnd="",this.ariaLabelStart="",this.ariaValueTextStart="",this.ariaLabelEnd="",this.ariaValueTextEnd="",this.step=1,this.ticks=!1,this.labeled=!1,this.range=!1,this.handleStartHover=!1,this.handleEndHover=!1,this.startOnTop=!1,this.handlesOverlapping=!1,this.ripplePointerId=1,this.isRedispatchingEvent=!1,this.addEventListener("click",e=>{!Qt(e)||!this.inputEnd||(this.focus(),Li(this.inputEnd))})}focus(){var e;(e=this.inputEnd)==null||e.focus()}willUpdate(e){var i,r;this.renderValueStart=e.has("valueStart")?this.valueStart:(i=this.inputStart)==null?void 0:i.valueAsNumber;const t=e.has("valueEnd")&&this.range||e.has("value");this.renderValueEnd=t?this.range?this.valueEnd:this.value:(r=this.inputEnd)==null?void 0:r.valueAsNumber,e.get("handleStartHover")!==void 0?this.toggleRippleHover(this.rippleStart,this.handleStartHover):e.get("handleEndHover")!==void 0&&this.toggleRippleHover(this.rippleEnd,this.handleEndHover)}updated(e){var t,i;if(this.range&&(this.renderValueStart=this.inputStart.valueAsNumber),this.renderValueEnd=this.inputEnd.valueAsNumber,this.range){const r=(this.max-this.min)/3;if(this.valueStart===void 0){this.inputStart.valueAsNumber=this.min+r;const s=this.inputStart.valueAsNumber;this.valueStart=this.renderValueStart=s}if(this.valueEnd===void 0){this.inputEnd.valueAsNumber=this.min+2*r;const s=this.inputEnd.valueAsNumber;this.valueEnd=this.renderValueEnd=s}}else this.value??(this.value=this.renderValueEnd);if(e.has("range")||e.has("renderValueStart")||e.has("renderValueEnd")||this.isUpdatePending){const r=(t=this.handleStart)==null?void 0:t.querySelector(".handleNub"),s=(i=this.handleEnd)==null?void 0:i.querySelector(".handleNub");this.handlesOverlapping=oc(r,s)}this.performUpdate()}render(){const e=this.step===0?1:this.step,t=Math.max(this.max-this.min,e),i=this.range?((this.renderValueStart??this.min)-this.min)/t:0,r=((this.renderValueEnd??this.min)-this.min)/t,s={"--_start-fraction":String(i),"--_end-fraction":String(r),"--_tick-count":String(t/e)},n={ranged:this.range},h=this.valueLabelStart||String(this.renderValueStart),p=(this.range?this.valueLabelEnd:this.valueLabel)||String(this.renderValueEnd),v={start:!0,value:this.renderValueStart,ariaLabel:this.renderAriaLabelStart,ariaValueText:this.renderAriaValueTextStart,ariaMin:this.min,ariaMax:this.valueEnd??this.max},f={start:!1,value:this.renderValueEnd,ariaLabel:this.renderAriaLabelEnd,ariaValueText:this.renderAriaValueTextEnd,ariaMin:this.range?this.valueStart??this.min:this.min,ariaMax:this.max},b={start:!0,hover:this.handleStartHover,label:h},x={start:!1,hover:this.handleEndHover,label:p},_={hover:this.handleStartHover||this.handleEndHover};return c` <div
|
|
1340
1340
|
class="container ${P(n)}"
|
|
1341
1341
|
style=${ut(s)}>
|
|
1342
1342
|
${Eo(this.range,()=>this.renderInput(v))}
|
|
@@ -1405,7 +1405,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
1405
1405
|
* @license
|
|
1406
1406
|
* Copyright 2021 Google LLC
|
|
1407
1407
|
* SPDX-License-Identifier: Apache-2.0
|
|
1408
|
-
*/const lc=ti(
|
|
1408
|
+
*/const lc=ti(At(Xe(y)));class Me extends lc{constructor(){super(),this.selected=!1,this.icons=!1,this.showOnlySelectedIcon=!1,this.required=!1,this.value="on",this.addEventListener("click",e=>{!Qt(e)||!this.input||(this.focus(),Li(this.input))}),nc(this,"keydown"),this.addEventListener("keydown",e=>{sc(e,()=>{e.defaultPrevented||e.key!=="Enter"||this.disabled||!this.input||this.input.click()})})}render(){return c`
|
|
1409
1409
|
<div class="switch ${P(this.getRenderClasses())}">
|
|
1410
1410
|
<input
|
|
1411
1411
|
id="switch"
|
|
@@ -1462,7 +1462,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
1462
1462
|
* @license
|
|
1463
1463
|
* Copyright 2023 Google LLC
|
|
1464
1464
|
* SPDX-License-Identifier: Apache-2.0
|
|
1465
|
-
*/var rs;const
|
|
1465
|
+
*/var rs;const Ot=Symbol("indicator"),os=Symbol("animateIndicator"),dc=Ya(y);class ge extends dc{get selected(){return this.active}set selected(e){this.active=e}constructor(){super(),this.isTab=!0,this.active=!1,this.hasIcon=!1,this.iconOnly=!1,this.fullWidthIndicator=!1,this.internals=this.attachInternals(),this.internals.role="tab",this.addEventListener("keydown",this.handleKeydown.bind(this))}render(){const e=c`<div class="indicator"></div>`;return c`<div
|
|
1466
1466
|
class="button"
|
|
1467
1467
|
role="presentation"
|
|
1468
1468
|
@click=${this.handleContentClick}>
|
|
@@ -1477,7 +1477,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
1477
1477
|
${this.fullWidthIndicator?u:e}
|
|
1478
1478
|
</div>
|
|
1479
1479
|
${this.fullWidthIndicator?e:u}
|
|
1480
|
-
</div>`}getContentClasses(){return{"has-icon":this.hasIcon,"has-label":!this.iconOnly}}updated(){this.internals.ariaSelected=String(this.active)}async handleKeydown(e){await 0,!e.defaultPrevented&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.click())}handleContentClick(e){e.stopPropagation(),this.click()}[(rs=
|
|
1480
|
+
</div>`}getContentClasses(){return{"has-icon":this.hasIcon,"has-label":!this.iconOnly}}updated(){this.internals.ariaSelected=String(this.active)}async handleKeydown(e){await 0,!e.defaultPrevented&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.click())}handleContentClick(e){e.stopPropagation(),this.click()}[(rs=Ot,os)](e){if(!this[Ot])return;this[Ot].getAnimations().forEach(i=>{i.cancel()});const t=this.getKeyframes(e);t!==null&&this[Ot].animate(t,{duration:250,easing:be.EMPHASIZED})}getKeyframes(e){var b;const t=hc();if(!this.active)return t?[{opacity:1},{transform:"none"}]:null;const i={},r=((b=e[Ot])==null?void 0:b.getBoundingClientRect())??{},s=r.left,n=r.width,h=this[Ot].getBoundingClientRect(),p=h.left,v=h.width,f=n/v;return!t&&s!==void 0&&p!==void 0&&!isNaN(f)?i.transform=`translateX(${(s-p).toFixed(4)}px) scaleX(${f.toFixed(4)})`:i.opacity=0,[i,{transform:"none"}]}handleSlotChange(){this.iconOnly=!1;for(const e of this.assignedDefaultNodes){const t=e.nodeType===Node.TEXT_NODE&&!!e.wholeText.match(/\S/);if(e.nodeType===Node.ELEMENT_NODE||t)return}this.iconOnly=!0}handleIconSlotChange(){this.hasIcon=this.assignedIcons.length>0}}d([l({type:Boolean,reflect:!0,attribute:"md-tab"})],ge.prototype,"isTab",void 0),d([l({type:Boolean,reflect:!0})],ge.prototype,"active",void 0),d([l({type:Boolean})],ge.prototype,"selected",null),d([l({type:Boolean,attribute:"has-icon"})],ge.prototype,"hasIcon",void 0),d([l({type:Boolean,attribute:"icon-only"})],ge.prototype,"iconOnly",void 0),d([k(".indicator")],ge.prototype,rs,void 0),d([w()],ge.prototype,"fullWidthIndicator",void 0),d([Ir({flatten:!0})],ge.prototype,"assignedDefaultNodes",void 0),d([Y({slot:"icon",flatten:!0})],ge.prototype,"assignedIcons",void 0);function hc(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}/**
|
|
1481
1481
|
* @license
|
|
1482
1482
|
* Copyright 2023 Google LLC
|
|
1483
1483
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1512,14 +1512,14 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
1512
1512
|
* @license
|
|
1513
1513
|
* Copyright 2023 Google LLC
|
|
1514
1514
|
* SPDX-License-Identifier: Apache-2.0
|
|
1515
|
-
*/class
|
|
1515
|
+
*/class Lt extends y{get activeTab(){return this.tabs.find(e=>e.active)??null}set activeTab(e){e&&this.activateTab(e)}get activeTabIndex(){return this.tabs.findIndex(e=>e.active)}set activeTabIndex(e){const t=()=>{const i=this.tabs[e];i&&this.activateTab(i)};if(!this.slotElement){this.updateComplete.then(t);return}t()}get focusedTab(){return this.tabs.find(e=>e.matches(":focus-within"))}constructor(){super(),this.autoActivate=!1,this.internals=this.attachInternals(),this.internals.role="tablist",this.addEventListener("keydown",this.handleKeydown.bind(this)),this.addEventListener("keyup",this.handleKeyup.bind(this)),this.addEventListener("focusout",this.handleFocusout.bind(this))}async scrollToTab(e){await this.updateComplete;const{tabs:t}=this;if(e??(e=this.activeTab),!e||!t.includes(e)||!this.tabsScrollerElement)return;for(const x of this.tabs)await x.updateComplete;const i=e.offsetLeft,r=e.offsetWidth,s=this.scrollLeft,n=this.offsetWidth,h=48,p=i-h,v=i+r-n+h,f=Math.min(p,Math.max(v,s)),b=this.focusedTab?"auto":"instant";this.tabsScrollerElement.scrollTo({behavior:b,top:0,left:f})}render(){return c`
|
|
1516
1516
|
<div class="tabs">
|
|
1517
1517
|
<slot
|
|
1518
1518
|
@slotchange=${this.handleSlotChange}
|
|
1519
1519
|
@click=${this.handleTabClick}></slot>
|
|
1520
1520
|
</div>
|
|
1521
1521
|
<md-divider part="divider"></md-divider>
|
|
1522
|
-
`}async handleTabClick(e){const t=e.target;await 0,!(e.defaultPrevented||!bc(t)||t.active)&&this.activateTab(t)}activateTab(e){const{tabs:t}=this,i=this.activeTab;if(!(!t.includes(e)||i===e)){for(const r of t)r.active=r===e;if(i){if(!this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))){for(const s of t)s.active=s===i;return}e[os](i)}this.updateFocusableTab(e),this.scrollToTab(e)}}updateFocusableTab(e){for(const t of this.tabs)t.tabIndex=t===e?0:-1}async handleKeydown(e){await 0;const t=e.key==="ArrowLeft",i=e.key==="ArrowRight",r=e.key==="Home",s=e.key==="End";if(e.defaultPrevented||!t&&!i&&!r&&!s)return;const{tabs:n}=this;if(n.length<2)return;e.preventDefault();let h;if(r||s)h=r?0:n.length-1;else{const f=getComputedStyle(this).direction==="rtl"?t:i,{focusedTab:b}=this;if(!b)h=f?0:n.length-1;else{const x=this.tabs.indexOf(b);h=f?x+1:x-1,h>=n.length?h=0:h<0&&(h=n.length-1)}}const p=n[h];p.focus(),this.autoActivate?this.activateTab(p):this.updateFocusableTab(p)}handleKeyup(){this.scrollToTab(this.focusedTab??this.activeTab)}handleFocusout(){if(this.matches(":focus-within"))return;const{activeTab:e}=this;e&&this.updateFocusableTab(e)}handleSlotChange(){const e=this.tabs[0];!this.activeTab&&e&&this.activateTab(e),this.scrollToTab(this.activeTab)}}d([Y({flatten:!0,selector:"[md-tab]"})],
|
|
1522
|
+
`}async handleTabClick(e){const t=e.target;await 0,!(e.defaultPrevented||!bc(t)||t.active)&&this.activateTab(t)}activateTab(e){const{tabs:t}=this,i=this.activeTab;if(!(!t.includes(e)||i===e)){for(const r of t)r.active=r===e;if(i){if(!this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))){for(const s of t)s.active=s===i;return}e[os](i)}this.updateFocusableTab(e),this.scrollToTab(e)}}updateFocusableTab(e){for(const t of this.tabs)t.tabIndex=t===e?0:-1}async handleKeydown(e){await 0;const t=e.key==="ArrowLeft",i=e.key==="ArrowRight",r=e.key==="Home",s=e.key==="End";if(e.defaultPrevented||!t&&!i&&!r&&!s)return;const{tabs:n}=this;if(n.length<2)return;e.preventDefault();let h;if(r||s)h=r?0:n.length-1;else{const f=getComputedStyle(this).direction==="rtl"?t:i,{focusedTab:b}=this;if(!b)h=f?0:n.length-1;else{const x=this.tabs.indexOf(b);h=f?x+1:x-1,h>=n.length?h=0:h<0&&(h=n.length-1)}}const p=n[h];p.focus(),this.autoActivate?this.activateTab(p):this.updateFocusableTab(p)}handleKeyup(){this.scrollToTab(this.focusedTab??this.activeTab)}handleFocusout(){if(this.matches(":focus-within"))return;const{activeTab:e}=this;e&&this.updateFocusableTab(e)}handleSlotChange(){const e=this.tabs[0];!this.activeTab&&e&&this.activateTab(e),this.scrollToTab(this.activeTab)}}d([Y({flatten:!0,selector:"[md-tab]"})],Lt.prototype,"tabs",void 0),d([l({type:Number,attribute:"active-tab-index"})],Lt.prototype,"activeTabIndex",null),d([l({type:Boolean,attribute:"auto-activate"})],Lt.prototype,"autoActivate",void 0),d([k(".tabs")],Lt.prototype,"tabsScrollerElement",void 0),d([k("slot")],Lt.prototype,"slotElement",void 0);function bc(o){return o instanceof HTMLElement&&o.hasAttribute("md-tab")}/**
|
|
1523
1523
|
* @license
|
|
1524
1524
|
* Copyright 2024 Google LLC
|
|
1525
1525
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1528,7 +1528,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
1528
1528
|
* @license
|
|
1529
1529
|
* Copyright 2023 Google LLC
|
|
1530
1530
|
* SPDX-License-Identifier: Apache-2.0
|
|
1531
|
-
*/let li=class extends
|
|
1531
|
+
*/let li=class extends Lt{};li.styles=[mc],li=d([g("md-tabs")],li);/**
|
|
1532
1532
|
* @license
|
|
1533
1533
|
* Copyright 2024 Google LLC
|
|
1534
1534
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1553,7 +1553,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
1553
1553
|
* @license
|
|
1554
1554
|
* Copyright 2021 Google LLC
|
|
1555
1555
|
* SPDX-License-Identifier: Apache-2.0
|
|
1556
|
-
*/const Sc=Za(ti(
|
|
1556
|
+
*/const Sc=Za(ti(At(Xe(y))));class $ extends Sc{constructor(){super(...arguments),this.error=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.required=!1,this.value="",this.prefixText="",this.suffixText="",this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText="",this.textDirection="",this.rows=2,this.cols=20,this.inputMode="",this.max="",this.maxLength=-1,this.min="",this.minLength=-1,this.noSpinner=!1,this.pattern="",this.placeholder="",this.readOnly=!1,this.multiple=!1,this.step="",this.type="text",this.autocomplete="",this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText=""}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(e){this.getInputOrTextarea().selectionDirection=e}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(e){this.getInputOrTextarea().selectionEnd=e}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(e){this.getInputOrTextarea().selectionStart=e}get valueAsNumber(){const e=this.getInput();return e?e.valueAsNumber:NaN}set valueAsNumber(e){const t=this.getInput();t&&(t.valueAsNumber=e,this.value=t.value)}get valueAsDate(){const e=this.getInput();return e?e.valueAsDate:null}set valueAsDate(e){const t=this.getInput();t&&(t.valueAsDate=e,this.value=t.value)}get hasError(){return this.error||this.nativeError}select(){this.getInputOrTextarea().select()}setRangeText(...e){this.getInputOrTextarea().setRangeText(...e),this.value=this.getInputOrTextarea().value}setSelectionRange(e,t,i){this.getInputOrTextarea().setSelectionRange(e,t,i)}stepDown(e){const t=this.getInput();t&&(t.stepDown(e),this.value=t.value)}stepUp(e){const t=this.getInput();t&&(t.stepUp(e),this.value=t.value)}reset(){this.dirty=!1,this.value=this.getAttribute("value")??"",this.nativeError=!1,this.nativeErrorText=""}attributeChangedCallback(e,t,i){e==="value"&&this.dirty||super.attributeChangedCallback(e,t,i)}render(){const e={disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:this.type==="textarea","no-spinner":this.noSpinner};return c`
|
|
1557
1557
|
<span class="text-field ${P(e)}">
|
|
1558
1558
|
${this.renderField()}
|
|
1559
1559
|
</span>
|
|
@@ -2052,7 +2052,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
2052
2052
|
:host([no-divider]) ::slotted(scb-list-item) {
|
|
2053
2053
|
--stroke-border: 0px;
|
|
2054
2054
|
}
|
|
2055
|
-
`],Ro([l({type:Boolean,attribute:"no-divider",reflect:!0})],a.ScbList.prototype,"noDivider",2),Ro([k("slot")],a.ScbList.prototype,"_slotEl",2),a.ScbList=Ro([g("scb-list")],a.ScbList);var Nc=Object.defineProperty,Vc=Object.getOwnPropertyDescriptor,
|
|
2055
|
+
`],Ro([l({type:Boolean,attribute:"no-divider",reflect:!0})],a.ScbList.prototype,"noDivider",2),Ro([k("slot")],a.ScbList.prototype,"_slotEl",2),a.ScbList=Ro([g("scb-list")],a.ScbList);var Nc=Object.defineProperty,Vc=Object.getOwnPropertyDescriptor,Pt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Vc(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Nc(e,t,r),r};let qc=0;a.ScbSearch=class extends y{constructor(){super(...arguments),this.supportingText="Hinted search text",this.value="",this.size="default",this.fullScreen=!1,this._inputFocused=!1,this._visibleSuggestions=0,this._activeIndex=-1,this._listboxId=`scb-search-listbox-${++qc}`,this._kbMode=!1,this._kbShouldShowRing=!1,this._onGlobalKeydown=e=>{e.key==="Tab"&&(this._kbShouldShowRing=!0,this._inputFocused&&this._updateInputRingVisibility())},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&this._updateInputRingVisibility()},this._listScrollHandler=()=>{const e=this._getActiveItem();this._kbMode&&e&&this._positionOptionRing(e)}}connectedCallback(){super.connectedCallback(),this._onWindowResize=this._onWindowResize.bind(this),window.addEventListener("resize",this._onWindowResize,{passive:!0}),window.addEventListener("keydown",this._onGlobalKeydown,!0),window.addEventListener("pointerdown",this._onGlobalPointerDown,!0)}disconnectedCallback(){const e=this._inputEl();e&&this._boundNativeKeydown&&e.removeEventListener("keydown",this._boundNativeKeydown,!0),this._detachListScrollListener(),window.removeEventListener("resize",this._onWindowResize),window.removeEventListener("keydown",this._onGlobalKeydown,!0),window.removeEventListener("pointerdown",this._onGlobalPointerDown,!0),super.disconnectedCallback()}firstUpdated(){this._ensureListboxA11y(),this._updateComboboxA11y();const e=this._inputEl();e&&(this._boundNativeKeydown=t=>this._handleKey(t),e.addEventListener("keydown",this._boundNativeKeydown,!0))}updated(){this._ensureListboxA11y(),this._updateComboboxA11y(),this._attachListScrollListener()}render(){const e=(this.value??"").trim().length>0,t=this._inputFocused&&e&&this._hasSuggestions;return c`
|
|
2056
2056
|
<div class="ripple-wrapper">
|
|
2057
2057
|
<md-icon class="leading">${e?"arrow_back":"search"}</md-icon>
|
|
2058
2058
|
|
|
@@ -2273,7 +2273,7 @@ var ScbWcTest=function(a){"use strict";var Ds;function d(o,e,t,i){var r=argument
|
|
|
2273
2273
|
@media (prefers-color-scheme: dark) {
|
|
2274
2274
|
:host { color: var(--md-sys-color-on-surface); }
|
|
2275
2275
|
}
|
|
2276
|
-
`,
|
|
2276
|
+
`,Pt([l({type:String,attribute:"trailing-icon"})],a.ScbSearch.prototype,"trailingIcon",2),Pt([l({type:String,attribute:"supporting-text"})],a.ScbSearch.prototype,"supportingText",2),Pt([l({type:String})],a.ScbSearch.prototype,"value",2),Pt([l({type:String,reflect:!0})],a.ScbSearch.prototype,"size",2),Pt([l({type:Boolean,attribute:"full-screen",reflect:!0})],a.ScbSearch.prototype,"fullScreen",2),a.ScbSearch=Pt([g("scb-search")],a.ScbSearch);var Uc=Object.defineProperty,jc=Object.getOwnPropertyDescriptor,Ee=(o,e,t,i)=>{for(var r=i>1?void 0:i?jc(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Uc(e,t,r),r};a.ScbAvatar=class extends y{constructor(){super(...arguments),this.src="",this.alt="",this.label="",this.size="medium",this.shape="circular",this.iconName="",this.variant="image",this._imgError=!1,this._hasIconSlot=!1,this._onImgLoad=()=>{this._imgError=!1,this.dispatchEvent(new CustomEvent("image-load",{bubbles:!0,composed:!0}))},this._onImgError=()=>{this._imgError=!0,this.dispatchEvent(new CustomEvent("image-error",{bubbles:!0,composed:!0}))},this._onIconSlotChange=e=>{const t=e.currentTarget;this._hasIconSlot=(t.assignedNodes({flatten:!0})||[]).length>0}}async firstUpdated(){this.variant==="icon"&&await Promise.resolve().then(()=>Re)}_initials(){const e=(this.label||this.alt||"").trim();if(!e)return"?";const t=e.split(/\s+/).filter(Boolean);if(t.length===1)return t[0].slice(0,1).toUpperCase();const i=t[0].slice(0,1),r=t[t.length-1].slice(0,1);return(i+r).toUpperCase()}_ariaLabel(){const e=(this.label||this.alt||"").trim();return e||null}render(){const e=this._ariaLabel(),t=this.variant==="image"&&!!this.src&&!this._imgError,i=c`${u}
|
|
2277
2277
|
<slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
|
|
2278
2278
|
${this._hasIconSlot?u:this.iconName?c`<md-icon aria-hidden="true">${this.iconName}</md-icon>`:c`<div class="fallback" part="fallback">${this._initials()}</div>`}
|
|
2279
2279
|
`,r=t?c`<img class="photo" part="image" src=${this.src} alt=${this.alt}
|
|
@@ -3947,7 +3947,7 @@ ${this.value}</textarea
|
|
|
3947
3947
|
height: 100%;
|
|
3948
3948
|
display: block;
|
|
3949
3949
|
}
|
|
3950
|
-
`],re([l({type:String,reflect:!0})],a.ScbTextField.prototype,"type",2),re([l({type:String})],a.ScbTextField.prototype,"label",2),re([l({type:String,attribute:"supporting-text"})],a.ScbTextField.prototype,"supportingText",2),re([l({type:String,attribute:"error-text"})],a.ScbTextField.prototype,"errorText",2),re([l({type:String,attribute:"leading-icon"})],a.ScbTextField.prototype,"leadingIcon",2),re([l({type:String})],a.ScbTextField.prototype,"name",2),re([l({type:String})],a.ScbTextField.prototype,"pattern",2),re([l({type:String,attribute:"value"})],a.ScbTextField.prototype,"value",2),re([l({type:String})],a.ScbTextField.prototype,"underLabel",2),re([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"error",2),re([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"disabled",2),re([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"required",2),a.ScbTextField=re([g("scb-textfield")],a.ScbTextField);var wd=Object.defineProperty,Sd=Object.getOwnPropertyDescriptor,fs=o=>{throw TypeError(o)},ft=(o,e,t,i)=>{for(var r=i>1?void 0:i?Sd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&wd(e,t,r),r},kd=(o,e,t)=>e.has(o)||fs("Cannot "+t),
|
|
3950
|
+
`],re([l({type:String,reflect:!0})],a.ScbTextField.prototype,"type",2),re([l({type:String})],a.ScbTextField.prototype,"label",2),re([l({type:String,attribute:"supporting-text"})],a.ScbTextField.prototype,"supportingText",2),re([l({type:String,attribute:"error-text"})],a.ScbTextField.prototype,"errorText",2),re([l({type:String,attribute:"leading-icon"})],a.ScbTextField.prototype,"leadingIcon",2),re([l({type:String})],a.ScbTextField.prototype,"name",2),re([l({type:String})],a.ScbTextField.prototype,"pattern",2),re([l({type:String,attribute:"value"})],a.ScbTextField.prototype,"value",2),re([l({type:String})],a.ScbTextField.prototype,"underLabel",2),re([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"error",2),re([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"disabled",2),re([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"required",2),a.ScbTextField=re([g("scb-textfield")],a.ScbTextField);var wd=Object.defineProperty,Sd=Object.getOwnPropertyDescriptor,fs=o=>{throw TypeError(o)},ft=(o,e,t,i)=>{for(var r=i>1?void 0:i?Sd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&wd(e,t,r),r},kd=(o,e,t)=>e.has(o)||fs("Cannot "+t),Dt=(o,e,t)=>(kd(o,e,"read from private field"),t?t.call(o):e.get(o)),Ho=(o,e,t)=>e.has(o)?fs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Fo,vi,mr;a.ScbRadioGroup=class extends y{constructor(){super(...arguments),this.name="",this.orientation="vertical",this.disabled=!1,this.ariaLabel=null,this.spacing="item",this.value="",Ho(this,Fo,()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");return e?e.assignedElements({flatten:!0}).filter(i=>i.tagName.toLowerCase()==="scb-radio-button"):[]}),Ho(this,vi,()=>{const e=Dt(this,Fo).call(this);if(!e.length)return;let t=null;for(const i of e){const r=i;this.name&&i.setAttribute("name",this.name),this.disabled?i.setAttribute("disabled",""):i.removeAttribute("disabled"),this.orientation==="horizontal"?i.setAttribute("orientation","horizontal"):i.removeAttribute("orientation"),this.spacing==="group"?i.style.setProperty("--scb-radio-gap","0"):i.style.removeProperty("--scb-radio-gap");const s=r.value??i.getAttribute("value")??"",n=typeof r.checked=="boolean"?r.checked:i.hasAttribute("checked");if(this.value){const h=String(s)===this.value;h&&!n?r.checked=!0:!h&&n&&(r.checked=!1)}else n&&t===null&&(t=String(s))}!this.value&&t!==null&&(this.value=t)}),Ho(this,mr,e=>{var r,s;const t=e.composedPath().find(n=>{var h;return((h=n==null?void 0:n.tagName)==null?void 0:h.toLowerCase())==="scb-radio-button"}),i=(t==null?void 0:t.value)??((r=t==null?void 0:t.getAttribute)==null?void 0:r.call(t,"value"))??((s=e.target)==null?void 0:s.value)??"";this.value=String(i??""),this.dispatchEvent(new CustomEvent("scb-change",{detail:{value:String(i??""),originalIsTrusted:(e==null?void 0:e.isTrusted)===!0},bubbles:!0,composed:!0}))})}render(){const e=this.orientation==="horizontal"?"row":"column";return c`
|
|
3951
3951
|
<div
|
|
3952
3952
|
class="g"
|
|
3953
3953
|
role="radiogroup"
|
|
@@ -3955,9 +3955,9 @@ ${this.value}</textarea
|
|
|
3955
3955
|
aria-label=${this.ariaLabel??""}
|
|
3956
3956
|
style=${`--_dir:${e}`}
|
|
3957
3957
|
>
|
|
3958
|
-
<slot @slotchange=${
|
|
3958
|
+
<slot @slotchange=${Dt(this,vi)}></slot>
|
|
3959
3959
|
</div>
|
|
3960
|
-
`}firstUpdated(){
|
|
3960
|
+
`}firstUpdated(){Dt(this,vi).call(this),this.addEventListener("change",Dt(this,mr))}disconnectedCallback(){this.removeEventListener("change",Dt(this,mr)),super.disconnectedCallback()}updated(e){(e.has("name")||e.has("disabled")||e.has("orientation")||e.has("spacing")||e.has("value"))&&Dt(this,vi).call(this)}},Fo=new WeakMap,vi=new WeakMap,mr=new WeakMap,a.ScbRadioGroup.styles=m`
|
|
3961
3961
|
:host { display: block; }
|
|
3962
3962
|
|
|
3963
3963
|
.g {
|
|
@@ -4274,7 +4274,7 @@ ${this.value}</textarea
|
|
|
4274
4274
|
display:block;
|
|
4275
4275
|
margin-block: var(--scb-choice-gap, 6px);
|
|
4276
4276
|
}
|
|
4277
|
-
`,j([l({type:Boolean,reflect:!0})],a.ScbDialog.prototype,"open",2),j([l({type:Boolean,attribute:!1})],a.ScbDialog.prototype,"inSb",2),j([l({type:Boolean,attribute:"scrim-close"})],a.ScbDialog.prototype,"scrimClose",2),j([l({type:String})],a.ScbDialog.prototype,"variant",2),j([l({type:String})],a.ScbDialog.prototype,"label",2),j([l({type:String})],a.ScbDialog.prototype,"icon",2),j([l({type:String,attribute:"supporting-text"})],a.ScbDialog.prototype,"supportingText",2),j([l({type:String,attribute:"ok-button"})],a.ScbDialog.prototype,"okButton",2),j([l({type:String,attribute:"cancel-button"})],a.ScbDialog.prototype,"cancelButton",2),j([l({type:String,attribute:"delete-button"})],a.ScbDialog.prototype,"deleteButton",2),j([l({type:String,attribute:"confirm-button"})],a.ScbDialog.prototype,"confirmButton",2),j([l({type:String,attribute:"deny-button"})],a.ScbDialog.prototype,"denyButton",2),j([l({type:String,attribute:"reset-button"})],a.ScbDialog.prototype,"resetButton",2),j([l({type:String,attribute:"submit-button"})],a.ScbDialog.prototype,"submitButton",2),j([l({type:String,attribute:"form-id"})],a.ScbDialog.prototype,"formId",2),j([l({type:String,attribute:"form-action"})],a.ScbDialog.prototype,"formAction",2),j([l({type:String,attribute:"form-method"})],a.ScbDialog.prototype,"formMethod",2),a.ScbDialog=j([g("scb-dialog")],a.ScbDialog);var Od=Object.defineProperty,Ld=Object.getOwnPropertyDescriptor,
|
|
4277
|
+
`,j([l({type:Boolean,reflect:!0})],a.ScbDialog.prototype,"open",2),j([l({type:Boolean,attribute:!1})],a.ScbDialog.prototype,"inSb",2),j([l({type:Boolean,attribute:"scrim-close"})],a.ScbDialog.prototype,"scrimClose",2),j([l({type:String})],a.ScbDialog.prototype,"variant",2),j([l({type:String})],a.ScbDialog.prototype,"label",2),j([l({type:String})],a.ScbDialog.prototype,"icon",2),j([l({type:String,attribute:"supporting-text"})],a.ScbDialog.prototype,"supportingText",2),j([l({type:String,attribute:"ok-button"})],a.ScbDialog.prototype,"okButton",2),j([l({type:String,attribute:"cancel-button"})],a.ScbDialog.prototype,"cancelButton",2),j([l({type:String,attribute:"delete-button"})],a.ScbDialog.prototype,"deleteButton",2),j([l({type:String,attribute:"confirm-button"})],a.ScbDialog.prototype,"confirmButton",2),j([l({type:String,attribute:"deny-button"})],a.ScbDialog.prototype,"denyButton",2),j([l({type:String,attribute:"reset-button"})],a.ScbDialog.prototype,"resetButton",2),j([l({type:String,attribute:"submit-button"})],a.ScbDialog.prototype,"submitButton",2),j([l({type:String,attribute:"form-id"})],a.ScbDialog.prototype,"formId",2),j([l({type:String,attribute:"form-action"})],a.ScbDialog.prototype,"formAction",2),j([l({type:String,attribute:"form-method"})],a.ScbDialog.prototype,"formMethod",2),a.ScbDialog=j([g("scb-dialog")],a.ScbDialog);var Od=Object.defineProperty,Ld=Object.getOwnPropertyDescriptor,Rt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ld(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Od(e,t,r),r};a.ScbDivider=class extends y{constructor(){super(...arguments),this.variant="thin",this.direction="horizontal",this.inset="none",this.overlay=!1,this.anchor="end"}render(){return c``}},a.ScbDivider.styles=m`
|
|
4278
4278
|
:host {
|
|
4279
4279
|
--scb-divider-color: var(--md-sys-color-outline-variant);
|
|
4280
4280
|
--scb-divider-thickness: 1px;
|
|
@@ -4316,7 +4316,7 @@ ${this.value}</textarea
|
|
|
4316
4316
|
}
|
|
4317
4317
|
:host([overlay][direction="vertical"][anchor="end"]) { right: calc(var(--scb-divider-gap) / -2); }
|
|
4318
4318
|
:host([overlay][direction="vertical"][anchor="start"]){ left: calc(var(--scb-divider-gap) / -2); }
|
|
4319
|
-
`,
|
|
4319
|
+
`,Rt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"variant",2),Rt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"direction",2),Rt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"inset",2),Rt([l({type:Boolean,reflect:!0})],a.ScbDivider.prototype,"overlay",2),Rt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"anchor",2),a.ScbDivider=Rt([g("scb-divider")],a.ScbDivider);var Pd=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,xt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Dd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Pd(e,t,r),r};a.ScbDrawerItem=class extends y{constructor(){super(...arguments),this.label="",this.selected=!1,this.leadingIcon="",this.itemHref="",this.hasSlotContent=!1,this.expanded=!1,this.__submenuId=`sub-${Math.random().toString(36).slice(2)}`,this.__focusId=`f-${Math.random().toString(36).slice(2)}`,this._toggleExpand=e=>{e&&e.stopPropagation(),this.hasSlotContent&&this.__setExpanded(!this.expanded)},this._onButtonClick=e=>{e.stopPropagation(),this._dispatchSelect(),this._toggleExpand()},this._onLinkClick=()=>{this._dispatchSelect()},this._onKeyDown=e=>{var r,s,n,h,p,v,f,b,x;const t=Array.from(((r=this.parentElement)==null?void 0:r.querySelectorAll("scb-drawer-item"))||[]),i=t.indexOf(this);switch(e.key){case"ArrowDown":{e.preventDefault(),(n=(s=(t[i+1]||t[0]).shadowRoot)==null?void 0:s.querySelector(".scb-drawer-label-text"))==null||n.focus();break}case"ArrowUp":{e.preventDefault(),(p=(h=(t[i-1]||t[t.length-1]).shadowRoot)==null?void 0:h.querySelector(".scb-drawer-label-text"))==null||p.focus();break}case"Home":{e.preventDefault(),(f=(v=t[0].shadowRoot)==null?void 0:v.querySelector(".scb-drawer-label-text"))==null||f.focus();break}case"End":{e.preventDefault(),(x=(b=t[t.length-1].shadowRoot)==null?void 0:b.querySelector(".scb-drawer-label-text"))==null||x.focus();break}}}}get __submenuEl(){return this.renderRoot.querySelector(`#${this.__submenuId}`)}async __ensureDepsLoaded(){a.ScbDrawerItem.__rippleLoaded||(await Promise.resolve().then(()=>Oi),a.ScbDrawerItem.__rippleLoaded=!0),a.ScbDrawerItem.__focusRingLoaded||(await Promise.resolve().then(()=>cn),a.ScbDrawerItem.__focusRingLoaded=!0),this.leadingIcon&&!a.ScbDrawerItem.__iconLoaded&&(await Promise.resolve().then(()=>Re),a.ScbDrawerItem.__iconLoaded=!0),this.hasSlotContent&&!a.ScbDrawerItem.__iconButtonLoaded&&(await Promise.resolve().then(()=>Lc),a.ScbDrawerItem.__iconButtonLoaded=!0)}_onSlotChange(e){const i=e.target.assignedElements({flatten:!0});this.hasSlotContent=i.length>0&&i.every(r=>r.tagName==="SCB-SUB-DRAWER")}__setExpanded(e){this.hasSlotContent&&(this.expanded=e,this.dispatchEvent(new CustomEvent("scb-drawer-expand",{bubbles:!0,composed:!0,detail:{item:this,expanded:e}})))}_dispatchSelect(){this.dispatchEvent(new CustomEvent("scb-drawer-select",{bubbles:!0,composed:!0,detail:{item:this}}))}async firstUpdated(){const e=this.renderRoot.querySelector("slot");if(e){const t=e.assignedElements({flatten:!0});this.hasSlotContent=t.length>0&&t.every(i=>i.tagName==="SCB-SUB-DRAWER")}await this.__ensureDepsLoaded()}updated(e){e.has("leadingIcon")&&this.leadingIcon&&this.__ensureDepsLoaded(),e.has("hasSlotContent")&&this.hasSlotContent&&this.__ensureDepsLoaded(),e.has("expanded")&&this.__applyInert()}__applyInert(){const e=this.__submenuEl;e&&(this.expanded?(e.removeAttribute("inert"),e.setAttribute("aria-hidden","false")):(e.setAttribute("inert",""),e.setAttribute("aria-hidden","true")))}render(){const e=!!this.leadingIcon,t=!!this.itemHref,i=this.hasSlotContent;return c`
|
|
4320
4320
|
<div class="scb-drawer-item">
|
|
4321
4321
|
<div class="scb-drawer-item-label" ?selected=${this.selected}>
|
|
4322
4322
|
${t?c`
|
|
@@ -4900,7 +4900,7 @@ ${this.value}</textarea
|
|
|
4900
4900
|
:host([direction="row"]) ::slotted(*) {
|
|
4901
4901
|
flex: var(--scb-stack-item-flex, 0 0 auto);
|
|
4902
4902
|
}
|
|
4903
|
-
`,Ne([l({type:String,reflect:!0})],a.ScbStack.prototype,"direction",2),Ne([l({type:String,reflect:!0})],a.ScbStack.prototype,"gap",2),Ne([l({type:String,attribute:"row-gap",reflect:!0})],a.ScbStack.prototype,"rowGap",2),Ne([l({type:String,attribute:"column-gap",reflect:!0})],a.ScbStack.prototype,"columnGap",2),Ne([l({type:String,reflect:!0})],a.ScbStack.prototype,"align",2),Ne([l({type:String,reflect:!0})],a.ScbStack.prototype,"justify",2),Ne([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"wrap",2),Ne([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"inline",2),a.ScbStack=Ne([g("scb-stack")],a.ScbStack);var ah=Object.defineProperty,sh=Object.getOwnPropertyDescriptor,ks=o=>{throw TypeError(o)},ae=(o,e,t,i)=>{for(var r=i>1?void 0:i?sh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ah(e,t,r),r},nh=(o,e,t)=>e.has(o)||ks("Cannot "+t),lh=(o,e,t)=>e.has(o)?ks("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),
|
|
4903
|
+
`,Ne([l({type:String,reflect:!0})],a.ScbStack.prototype,"direction",2),Ne([l({type:String,reflect:!0})],a.ScbStack.prototype,"gap",2),Ne([l({type:String,attribute:"row-gap",reflect:!0})],a.ScbStack.prototype,"rowGap",2),Ne([l({type:String,attribute:"column-gap",reflect:!0})],a.ScbStack.prototype,"columnGap",2),Ne([l({type:String,reflect:!0})],a.ScbStack.prototype,"align",2),Ne([l({type:String,reflect:!0})],a.ScbStack.prototype,"justify",2),Ne([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"wrap",2),Ne([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"inline",2),a.ScbStack=Ne([g("scb-stack")],a.ScbStack);var ah=Object.defineProperty,sh=Object.getOwnPropertyDescriptor,ks=o=>{throw TypeError(o)},ae=(o,e,t,i)=>{for(var r=i>1?void 0:i?sh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ah(e,t,r),r},nh=(o,e,t)=>e.has(o)||ks("Cannot "+t),lh=(o,e,t)=>e.has(o)?ks("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Bt=(o,e,t)=>(nh(o,e,"access private method"),t),et,qo,bi;a.ScbGrid=class extends y{constructor(){super(...arguments),lh(this,et),this.colsCompact=4,this.colsMedium=8,this.colsExpanded=12,this.gap="",this.rowGap="",this.columnGap="",this.alignItems="stretch",this.justifyItems="stretch",this.paddingInline="",this.paddingBlock="",this.maxWidth="",this.autoRows=""}firstUpdated(){Bt(this,et,qo).call(this)}updated(){Bt(this,et,qo).call(this)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};const t=e.trim().split(/\s+/);if(t.length===1){const i=this.mapSpacingToken(t[0]);return{row:i,col:i}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}render(){return c`<div class="grid"><slot></slot></div>`}},et=new WeakSet,qo=function(){this.style.setProperty("--scb-grid-cols-compact",String(this.colsCompact)),this.style.setProperty("--scb-grid-cols-medium",String(this.colsMedium)),this.style.setProperty("--scb-grid-cols-expanded",String(this.colsExpanded));const o="var(--spacing-7, 24px)",e=this.parseGapShorthand(this.gap),t=this.mapSpacingToken(this.rowGap)??e.row??o,i=this.mapSpacingToken(this.columnGap)??e.col??o;this.style.setProperty("--scb-grid-row-gap",t),this.style.setProperty("--scb-grid-column-gap",i),this.style.setProperty("--scb-grid-gap",`${t} ${i}`),this.style.setProperty("--scb-grid-align-items",this.alignItems),this.style.setProperty("--scb-grid-justify-items",this.justifyItems);const r=this.mapSpacingToken(this.paddingInline),s=this.mapSpacingToken(this.paddingBlock);Bt(this,et,bi).call(this,"--scb-grid-max-width",this.maxWidth),Bt(this,et,bi).call(this,"--scb-grid-padding-inline",r??""),Bt(this,et,bi).call(this,"--scb-grid-padding-block",s??""),Bt(this,et,bi).call(this,"--scb-grid-auto-rows",this.autoRows)},bi=function(o,e){e?this.style.setProperty(o,e):this.style.removeProperty(o)},a.ScbGrid.styles=m`
|
|
4904
4904
|
:host {
|
|
4905
4905
|
box-sizing: border-box;
|
|
4906
4906
|
display: block;
|
|
@@ -4997,7 +4997,7 @@ ${this.value}</textarea
|
|
|
4997
4997
|
}
|
|
4998
4998
|
}
|
|
4999
4999
|
}
|
|
5000
|
-
`,ae([l({type:Number,attribute:"cols-compact",reflect:!0})],a.ScbGrid.prototype,"colsCompact",2),ae([l({type:Number,attribute:"cols-medium",reflect:!0})],a.ScbGrid.prototype,"colsMedium",2),ae([l({type:Number,attribute:"cols-expanded",reflect:!0})],a.ScbGrid.prototype,"colsExpanded",2),ae([l({type:String,reflect:!0})],a.ScbGrid.prototype,"gap",2),ae([l({type:String,attribute:"row-gap",reflect:!0})],a.ScbGrid.prototype,"rowGap",2),ae([l({type:String,attribute:"column-gap",reflect:!0})],a.ScbGrid.prototype,"columnGap",2),ae([l({type:String,attribute:"align-items",reflect:!0})],a.ScbGrid.prototype,"alignItems",2),ae([l({type:String,attribute:"justify-items",reflect:!0})],a.ScbGrid.prototype,"justifyItems",2),ae([l({type:String,attribute:"padding-inline",reflect:!0})],a.ScbGrid.prototype,"paddingInline",2),ae([l({type:String,attribute:"padding-block",reflect:!0})],a.ScbGrid.prototype,"paddingBlock",2),ae([l({type:String,attribute:"max-width",reflect:!0})],a.ScbGrid.prototype,"maxWidth",2),ae([l({type:String,attribute:"auto-rows",reflect:!0})],a.ScbGrid.prototype,"autoRows",2),a.ScbGrid=ae([g("scb-grid")],a.ScbGrid);var ch=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,$s=o=>{throw TypeError(o)},mi=(o,e,t,i)=>{for(var r=i>1?void 0:i?dh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ch(e,t,r),r},Uo=(o,e,t)=>e.has(o)||$s("Cannot "+t),Ve=(o,e,t)=>(Uo(o,e,"read from private field"),t?t.call(o):e.get(o)),
|
|
5000
|
+
`,ae([l({type:Number,attribute:"cols-compact",reflect:!0})],a.ScbGrid.prototype,"colsCompact",2),ae([l({type:Number,attribute:"cols-medium",reflect:!0})],a.ScbGrid.prototype,"colsMedium",2),ae([l({type:Number,attribute:"cols-expanded",reflect:!0})],a.ScbGrid.prototype,"colsExpanded",2),ae([l({type:String,reflect:!0})],a.ScbGrid.prototype,"gap",2),ae([l({type:String,attribute:"row-gap",reflect:!0})],a.ScbGrid.prototype,"rowGap",2),ae([l({type:String,attribute:"column-gap",reflect:!0})],a.ScbGrid.prototype,"columnGap",2),ae([l({type:String,attribute:"align-items",reflect:!0})],a.ScbGrid.prototype,"alignItems",2),ae([l({type:String,attribute:"justify-items",reflect:!0})],a.ScbGrid.prototype,"justifyItems",2),ae([l({type:String,attribute:"padding-inline",reflect:!0})],a.ScbGrid.prototype,"paddingInline",2),ae([l({type:String,attribute:"padding-block",reflect:!0})],a.ScbGrid.prototype,"paddingBlock",2),ae([l({type:String,attribute:"max-width",reflect:!0})],a.ScbGrid.prototype,"maxWidth",2),ae([l({type:String,attribute:"auto-rows",reflect:!0})],a.ScbGrid.prototype,"autoRows",2),a.ScbGrid=ae([g("scb-grid")],a.ScbGrid);var ch=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,$s=o=>{throw TypeError(o)},mi=(o,e,t,i)=>{for(var r=i>1?void 0:i?dh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ch(e,t,r),r},Uo=(o,e,t)=>e.has(o)||$s("Cannot "+t),Ve=(o,e,t)=>(Uo(o,e,"read from private field"),t?t.call(o):e.get(o)),Mt=(o,e,t)=>e.has(o)?$s("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),_t=(o,e,t,i)=>(Uo(o,e,"write to private field"),e.set(o,t),t),qe=(o,e,t)=>(Uo(o,e,"access private method"),t),Ht,fi,Ft,gi,ue,Cs,jo,Es,Wo,Ko,As,zs,Go;a.ScbFooter=class extends y{constructor(){super(...arguments),Mt(this,ue),this.maxWidth="1440px",this.deferPaint=!1,this.sections=[],this.description="Statistikmyndigheten SCB förser samhället med statistik för beslutsfattande, debatt och forskning.",Mt(this,Ht,null),Mt(this,fi,""),Mt(this,Ft),Mt(this,gi,!1),Mt(this,Ko,8)}connectedCallback(){super.connectedCallback(),this.style.setProperty("--scb-footer-max-width",this.maxWidth),qe(this,ue,Wo).call(this,!0),qe(this,ue,Cs).call(this)}updated(e){e.has("maxWidth")&&this.style.setProperty("--scb-footer-max-width",this.maxWidth)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=Ve(this,Ft))==null||e.disconnect()}render(){const e=Ve(this,ue,Es);return c`
|
|
5001
5001
|
<footer class="outer" role="contentinfo">
|
|
5002
5002
|
<nav aria-label="Sidfot med länkar">
|
|
5003
5003
|
<scb-grid
|
|
@@ -5026,7 +5026,7 @@ ${this.value}</textarea
|
|
|
5026
5026
|
</div>
|
|
5027
5027
|
</div>
|
|
5028
5028
|
</footer>
|
|
5029
|
-
`}},
|
|
5029
|
+
`}},Ht=new WeakMap,fi=new WeakMap,Ft=new WeakMap,gi=new WeakMap,ue=new WeakSet,Cs=function(){var o;(o=Ve(this,Ft))==null||o.disconnect(),_t(this,Ft,new MutationObserver(e=>{for(const t of e){if(t.type==="childList"){const i=[...t.addedNodes].some(s=>s.tagName==="SCB-FOOTER-SECTION"||s.tagName==="SCB-LINK"),r=[...t.removedNodes].some(s=>s.tagName==="SCB-FOOTER-SECTION"||s.tagName==="SCB-LINK");if(i||r){qe(this,ue,jo).call(this);return}}if(t.type==="attributes"&&(t.target.tagName==="SCB-FOOTER-SECTION"||t.target.tagName==="SCB-LINK")){qe(this,ue,jo).call(this);return}}})),Ve(this,Ft).observe(this,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["title","href","target"]})},jo=function(){Ve(this,gi)||(_t(this,gi,!0),queueMicrotask(()=>{_t(this,gi,!1),qe(this,ue,Wo).call(this,!1)}))},Es=function(){return Ve(this,Ht)??this.sections??[]},Wo=function(o=!1){const e=Array.from(this.querySelectorAll("scb-footer-section"));if(!e.length){Ve(this,Ht)!==null&&(_t(this,Ht,null),_t(this,fi,""),o||this.requestUpdate());return}const t=e.map(r=>{const s=(r.getAttribute("title")||"").trim(),n=Array.from(r.querySelectorAll("scb-link")).map(h=>{const p=(h.getAttribute("href")||"").trim(),v=h.getAttribute("target"),b={label:(h.textContent||"").trim(),href:p};return v&&(b.target=v),b});return{title:s,links:n}}),i=JSON.stringify(t);i!==Ve(this,fi)&&(_t(this,fi,i),_t(this,Ht,t),o||this.requestUpdate())},Ko=new WeakMap,As=function(o){const e=[],i=o.length;if(i>0&&i<4)return e.push(c`
|
|
5030
5030
|
<scb-grid-item
|
|
5031
5031
|
col-span-compact="4"
|
|
5032
5032
|
col-span-medium="8"
|
|
@@ -6878,7 +6878,7 @@ ${this.value}</textarea
|
|
|
6878
6878
|
position: relative;
|
|
6879
6879
|
gap: 0;
|
|
6880
6880
|
}
|
|
6881
|
-
`,_r([l({type:Number,reflect:!0,attribute:"progress-width",hasChanged:(o,e)=>o!==e})],a.ScbProgressStepper.prototype,"progressWidth",2),_r([l({type:String,reflect:!0})],a.ScbProgressStepper.prototype,"height",2),_r([l({type:String,reflect:!0})],a.ScbProgressStepper.prototype,"position",2),a.ScbProgressStepper=_r([g("scb-progress-stepper")],a.ScbProgressStepper);var Bh=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,
|
|
6881
|
+
`,_r([l({type:Number,reflect:!0,attribute:"progress-width",hasChanged:(o,e)=>o!==e})],a.ScbProgressStepper.prototype,"progressWidth",2),_r([l({type:String,reflect:!0})],a.ScbProgressStepper.prototype,"height",2),_r([l({type:String,reflect:!0})],a.ScbProgressStepper.prototype,"position",2),a.ScbProgressStepper=_r([g("scb-progress-stepper")],a.ScbProgressStepper);var Bh=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,Nt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Mh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Bh(e,t,r),r};a.ScbSegmentedItem=class extends y{constructor(){super(...arguments),this.label="",this.value="",this.selected=!1,this.icon="",this.disabled=!1}render(){var n;const e=this.parentElement,t=(n=e==null?void 0:e.hasAttribute)==null?void 0:n.call(e,"disabled"),i=this.disabled||t,r=!!this.icon,s=!!this.label;return c`
|
|
6882
6882
|
<div class="segmented-item${r||this.selected?" has-icon":""}${s?"":" no-label"}" aria-disabled="${i?"true":"false"}">
|
|
6883
6883
|
<md-ripple ?disabled="${i}"></md-ripple>
|
|
6884
6884
|
${this.selected?r&&s?c`<md-icon>check</md-icon>`:r?c`<md-icon>check</md-icon><md-icon>${this.icon}</md-icon>`:c`<md-icon>check</md-icon>`:r?c`<md-icon>${this.icon}</md-icon>`:""}
|
|
@@ -6952,7 +6952,7 @@ ${this.value}</textarea
|
|
|
6952
6952
|
border-top-right-radius: var(--md-sys-shape-corner-full);
|
|
6953
6953
|
border-bottom-right-radius: var(--md-sys-shape-corner-full);
|
|
6954
6954
|
}
|
|
6955
|
-
`,
|
|
6955
|
+
`,Nt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"label",2),Nt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"value",2),Nt([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"selected",2),Nt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"icon",2),Nt([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"disabled",2),a.ScbSegmentedItem=Nt([g("scb-segmented-item")],a.ScbSegmentedItem);var Hh=Object.defineProperty,Fh=Object.getOwnPropertyDescriptor,xi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Fh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Hh(e,t,r),r};a.ScbSegmentedButton=class extends y{constructor(){super(...arguments),this.variant="single-select",this.value="",this.values=[],this.disabled=!1}onSlotClick(e){let t=e.target;if(!t||!t.closest)return;const i=t.closest("scb-segmented-item");if(!i||this.disabled||i.hasAttribute("disabled"))return;const r=i.getAttribute("value")||"";r&&(this.variant==="multi-select"?(this.values.indexOf(r)===-1?this.values=[...this.values,r]:this.values=this.values.filter(n=>n!==r),this.dispatchEvent(new CustomEvent("change",{detail:{values:this.values},bubbles:!0,composed:!0})),this.updateSegments()):r!==this.value&&(this.value=r,this.dispatchEvent(new CustomEvent("change",{detail:{value:r},bubbles:!0,composed:!0})),this.updateSegments()))}updateSegments(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return;e.assignedElements().forEach(r=>{if(r.tagName==="SCB-SEGMENTED-ITEM"){const s=r.getAttribute("value")||"";if(s){let n=!1;this.variant==="multi-select"?n=!!this.values&&this.values.includes(s):n=s===this.value,r.setAttribute("aria-pressed",n?"true":"false"),n?r.setAttribute("selected","true"):r.removeAttribute("selected")}this.disabled&&r.setAttribute("disabled","true")}})}firstUpdated(){var t;this.updateSegments();const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");e&&(e.addEventListener("click",i=>this.onSlotClick(i)),e.addEventListener("focus",()=>{this.dispatchEvent(new CustomEvent("focus",{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener("blur",()=>{this.dispatchEvent(new CustomEvent("blur",{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener("keydown",i=>{if(i.code==="Space"||i.code==="Enter"||i.code==="NumpadEnter"){const r=i.target;if(r&&r.closest){const s=r.closest("scb-segmented-item");s&&!s.hasAttribute("disabled")&&!this.disabled&&(this.onSlotClick(i),i.preventDefault())}}}))}updated(){this.updateSegments()}render(){return c`<slot></slot>`}},a.ScbSegmentedButton.styles=m`
|
|
6956
6956
|
:host {
|
|
6957
6957
|
--scb-segmented-button-width: 100%;
|
|
6958
6958
|
--scb-segmented-button-height: 48px;
|
|
@@ -6979,12 +6979,12 @@ ${this.value}</textarea
|
|
|
6979
6979
|
::slotted([role="button"]:first-child .segmented-item) {
|
|
6980
6980
|
border-left: 1px solid var(--md-sys-color-outline);
|
|
6981
6981
|
}
|
|
6982
|
-
`,xi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"variant",2),xi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"value",2),xi([l({type:Array})],a.ScbSegmentedButton.prototype,"values",2),xi([l({type:Boolean,reflect:!0})],a.ScbSegmentedButton.prototype,"disabled",2),a.ScbSegmentedButton=xi([g("scb-segmented-button")],a.ScbSegmentedButton);var Nh=Object.defineProperty,Vh=Object.getOwnPropertyDescriptor,
|
|
6982
|
+
`,xi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"variant",2),xi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"value",2),xi([l({type:Array})],a.ScbSegmentedButton.prototype,"values",2),xi([l({type:Boolean,reflect:!0})],a.ScbSegmentedButton.prototype,"disabled",2),a.ScbSegmentedButton=xi([g("scb-segmented-button")],a.ScbSegmentedButton);var Nh=Object.defineProperty,Vh=Object.getOwnPropertyDescriptor,St=(o,e,t,i)=>{for(var r=i>1?void 0:i?Vh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Nh(e,t,r),r};a.ScbSelectOption=class extends y{constructor(){super(...arguments),this.value="",this.disabled=!1,this.showCheckbox=!1,this.checked=!1,this.showRadio=!1,this.label=""}render(){return c`
|
|
6983
6983
|
<div tabindex="0" class="item ${this.checked?"checked":""}" value=${this.value} ?disabled=${this.disabled}>
|
|
6984
6984
|
<md-ripple></md-ripple>
|
|
6985
6985
|
${this.showCheckbox?c`<md-icon class="${this.checked?"checkbox-checked":""}">${this.checked?"check_box":"check_box_outline_blank"}</md-icon>`:null}
|
|
6986
6986
|
${this.showRadio?c`<md-icon class="${this.checked?"radio-checked":""}">${this.checked?"radio_button_checked":"radio_button_unchecked"}</md-icon>`:null}
|
|
6987
|
-
<
|
|
6987
|
+
<div>${this.label}</div>
|
|
6988
6988
|
<md-focus-ring inward></md-focus-ring>
|
|
6989
6989
|
</div>
|
|
6990
6990
|
`}},a.ScbSelectOption.styles=m`
|
|
@@ -7011,27 +7011,42 @@ ${this.value}</textarea
|
|
|
7011
7011
|
md-icon.radio-checked{
|
|
7012
7012
|
color: var(--md-sys-color-primary);
|
|
7013
7013
|
}
|
|
7014
|
-
`,
|
|
7015
|
-
${this.label?c`
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
<
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7014
|
+
`,St([l({type:String})],a.ScbSelectOption.prototype,"value",2),St([l({type:Boolean,reflect:!0})],a.ScbSelectOption.prototype,"disabled",2),St([l({type:Boolean})],a.ScbSelectOption.prototype,"showCheckbox",2),St([l({type:Boolean})],a.ScbSelectOption.prototype,"checked",2),St([l({type:Boolean})],a.ScbSelectOption.prototype,"showRadio",2),St([l({type:String})],a.ScbSelectOption.prototype,"label",2),a.ScbSelectOption=St([g("scb-select-option")],a.ScbSelectOption);var qh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,xe=(o,e,t,i)=>{for(var r=i>1?void 0:i?Uh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&qh(e,t,r),r};a.ScbSelect=class extends y{constructor(){super(),this._internals=null,this.focusedIndex=-1,this.variant="single-select",this.value="",this.values=[],this.disabled=!1,this.open=!1,this.label="",this.name="",this.placeholder="",this.supportingText="",this.withRadiobuttons=!1,this._onDocumentClick=e=>{if(!this.open)return;e.composedPath().includes(this)||(this.open=!1,this.removeAttribute("open"))},this._onSlotClick=e=>{var n;const t=(n=this.shadowRoot)==null?void 0:n.querySelector("slot");if(!t)return;const i=t.assignedElements({flatten:!0}).filter(h=>h.tagName.toLowerCase()==="scb-select-option"),r=e.composedPath(),s=i.find(h=>r.includes(h));s&&(this._selectOption(s),e.stopPropagation())},this._onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._toggleOpen())},this._onOptionKeyDown=e=>{var t;if(e.key==="Enter"||e.key===" "){e.preventDefault();const i=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");if(!i)return;const r=i.assignedElements({flatten:!0}).filter(h=>h.tagName.toLowerCase()==="scb-select-option"),s=e.composedPath(),n=r.find(h=>s.includes(h));n&&this._selectOption(n)}},"attachInternals"in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this._onDocumentClick)}disconnectedCallback(){document.removeEventListener("mousedown",this._onDocumentClick),super.disconnectedCallback()}_toggleOpen(){this.disabled||(this.open=!this.open,this.open?(this.focusedIndex=0,this.requestUpdate()):this.focusedIndex=-1)}_selectOption(e){e.disabled||(this.variant==="multi-select"?(this.values.indexOf(e.value)>-1?this.values=this.values.filter(i=>i!==e.value):this.values=[...this.values,e.value],this.value=this.values.join(","),this.dispatchEvent(new CustomEvent("change",{detail:{values:this.values},bubbles:!0,composed:!0}))):this.variant==="single-select"&&this.withRadiobuttons?(this.value=e.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))):(this.value=e.value,this.open=!1,this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))),this._updateOptionsChecked(),this.requestUpdate())}_getSelectedLabel(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return"";const t=e.assignedElements({flatten:!0}).filter(r=>r.tagName.toLowerCase()==="scb-select-option");if(this.variant==="multi-select"){const r=t.filter(s=>this.values.includes(s.value));return r&&r.length>0?r.map(s=>s.label).join(", "):""}else{const r=t.find(s=>s.value===this.value);return r?r.label:""}}firstUpdated(){this._updateOptionsChecked(),this._internals&&this._internals.setFormValue(this.value)}updated(){this._updateOptionsChecked(),this._internals&&this._internals.setFormValue(this.value)}_updateOptionsChecked(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return;e.assignedElements({flatten:!0}).filter(r=>r.tagName.toLowerCase()==="scb-select-option").forEach(r=>{this.variant==="multi-select"?(r.showCheckbox=!0,r.checked=this.values.includes(r.value),r.showRadio=!1):(r.showCheckbox=!1,r.checked=this.value===r.value,this.withRadiobuttons&&(r.showRadio=!0))})}render(){return c`
|
|
7015
|
+
${this.label||this.supportingText?c`
|
|
7016
|
+
<label class="select-label" id="scb-select-label-${this.name}">
|
|
7017
|
+
${this.label?c`
|
|
7018
|
+
${this.label}
|
|
7019
|
+
`:""}
|
|
7020
|
+
${this.supportingText?c`
|
|
7021
|
+
<div class="select-sub-label">${this.supportingText}</div>
|
|
7022
|
+
`:""}
|
|
7023
|
+
</label>
|
|
7024
|
+
`:""}
|
|
7025
|
+
<div class="select">
|
|
7026
|
+
<div class="selected-value-container" tabindex="0" @click="${this._toggleOpen}" @keydown="${this._onKeyDown}">
|
|
7027
|
+
<md-focus-ring inward></md-focus-ring>
|
|
7028
|
+
<md-ripple></md-ripple>
|
|
7029
|
+
<input
|
|
7030
|
+
tabindex="-1"
|
|
7031
|
+
class="selected-value"
|
|
7032
|
+
type="text"
|
|
7033
|
+
readonly
|
|
7034
|
+
.value="${this._getSelectedLabel()||this.placeholder}"
|
|
7035
|
+
name="${this.name}"
|
|
7036
|
+
aria-labelledby="${this.label?`scb-select-label-${this.name}`:""}"
|
|
7037
|
+
aria-label="${!this.label&&this.placeholder?this.placeholder:""}"
|
|
7038
|
+
title="${!this.label&&this.placeholder?this.placeholder:""}"
|
|
7039
|
+
placeholder="${this.placeholder}"
|
|
7040
|
+
/>
|
|
7041
|
+
<span class="arrow">
|
|
7042
|
+
<md-icon>${this.open?"expand_less":"expand_more"}</md-icon>
|
|
7043
|
+
</span>
|
|
7044
|
+
</div>
|
|
7045
|
+
<div class="options" @click=${this._onSlotClick} @keydown=${this._onOptionKeyDown}>
|
|
7046
|
+
<slot @slotchange="${()=>{this.requestUpdate()}}"></slot>
|
|
7047
|
+
</div>
|
|
7032
7048
|
</div>
|
|
7033
|
-
|
|
7034
|
-
`}},a.ScbSelect.styles=m`
|
|
7049
|
+
`}},a.ScbSelect.formAssociated=!0,a.ScbSelect.styles=m`
|
|
7035
7050
|
:host {
|
|
7036
7051
|
display: block;
|
|
7037
7052
|
color: var(--md-sys-color-on-surface-variant);
|
|
@@ -7081,15 +7096,18 @@ ${this.value}</textarea
|
|
|
7081
7096
|
outline: none;
|
|
7082
7097
|
}
|
|
7083
7098
|
.select-label{
|
|
7099
|
+
display: block;
|
|
7084
7100
|
font-size: var(--md-sys-typescale-label-large-size);
|
|
7085
7101
|
font-weight: var(--weight-semibold);
|
|
7086
7102
|
line-height: var(--md-sys-typescale-label-large-line-height);
|
|
7087
7103
|
letter-spacing: var(--md-sys-typescale-label-large-tracking);
|
|
7104
|
+
margin-bottom: var(--spacing-3);
|
|
7088
7105
|
}
|
|
7089
7106
|
.select-sub-label{
|
|
7090
7107
|
font-size: var(--md-sys-typescale-body-large-size);
|
|
7091
7108
|
line-height: var(--md-sys-typescale-body-large-line-height);
|
|
7092
7109
|
letter-spacing: var(--md-sys-typescale-body-large-tracking);
|
|
7110
|
+
font-weight: var(--weight-regular);
|
|
7093
7111
|
}
|
|
7094
7112
|
md-focus-ring {
|
|
7095
7113
|
position:absolute;
|
|
@@ -7506,7 +7524,7 @@ ${this.value}</textarea
|
|
|
7506
7524
|
}
|
|
7507
7525
|
}
|
|
7508
7526
|
|
|
7509
|
-
`,_e([l({type:String,reflect:!0})],a.ScbStep.prototype,"label",2),_e([l({type:String,reflect:!0,attribute:"sub-label"})],a.ScbStep.prototype,"subLabel",2),_e([l({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStep.prototype,"symbolVariant",2),_e([l({type:Number,reflect:!0})],a.ScbStep.prototype,"number",2),_e([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"active",2),_e([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"completed",2),_e([l({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.ScbStep.prototype,"changeOnCompleted",2),_e([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"islast",2),_e([l({type:String,reflect:!0})],a.ScbStep.prototype,"variant",2),_e([l({type:String})],a.ScbStep.prototype,"icon",2),a.ScbStep=_e([g("scb-step")],a.ScbStep);var Qh=Object.defineProperty,ep=Object.getOwnPropertyDescriptor,
|
|
7527
|
+
`,_e([l({type:String,reflect:!0})],a.ScbStep.prototype,"label",2),_e([l({type:String,reflect:!0,attribute:"sub-label"})],a.ScbStep.prototype,"subLabel",2),_e([l({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStep.prototype,"symbolVariant",2),_e([l({type:Number,reflect:!0})],a.ScbStep.prototype,"number",2),_e([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"active",2),_e([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"completed",2),_e([l({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.ScbStep.prototype,"changeOnCompleted",2),_e([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"islast",2),_e([l({type:String,reflect:!0})],a.ScbStep.prototype,"variant",2),_e([l({type:String})],a.ScbStep.prototype,"icon",2),a.ScbStep=_e([g("scb-step")],a.ScbStep);var Qh=Object.defineProperty,ep=Object.getOwnPropertyDescriptor,kt=(o,e,t,i)=>{for(var r=i>1?void 0:i?ep(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Qh(e,t,r),r};a.ScbStepper=class extends y{constructor(){super(...arguments),this.type="",this.label="",this.changeOnCompleted=!1,this.variant="horizontal",this.symbolVariant="number",this.activeIndex=0,this._onKeyNav=e=>{const t=this._getSteps(),i=this.activeIndex;let r=i;e.detail.key==="ArrowRight"?i<t.length-1?r=i+1:r=0:e.detail.key==="ArrowLeft"&&(i>0?r=i-1:r=t.length-1),r!==i&&(this._onStepClick(r),setTimeout(()=>{var n;const s=(n=t[r].shadowRoot)==null?void 0:n.querySelector(".scb-step-content");s&&"focus"in s&&typeof s.focus=="function"&&s.focus()},0))},this._onStepContainerClick=e=>{const t=this._getSteps(),i=e.composedPath(),r=t.findIndex(s=>i.includes(s));r!==-1&&this._onStepClick(r)}}_onStepClick(e){const t=this.activeIndex;this.activeIndex=e,this._updateSteps(),this.dispatchEvent(new CustomEvent("scb-step-change",{detail:{index:this.activeIndex,step:this._getSteps()[this.activeIndex]},bubbles:!0,composed:!0})),e>t?this.dispatchEvent(new CustomEvent("scb-step-next",{detail:{from:t,to:e,step:this._getSteps()[e]},bubbles:!0,composed:!0})):e<t&&this.dispatchEvent(new CustomEvent("scb-step-prev",{detail:{from:t,to:e,step:this._getSteps()[e]},bubbles:!0,composed:!0}))}nextStep(){const e=this._getSteps();this.activeIndex<e.length-1&&this._onStepClick(this.activeIndex+1)}prevStep(){this.activeIndex>0&&this._onStepClick(this.activeIndex-1)}getActiveIndex(){return this.activeIndex}_updateSteps(){const e=this._getSteps();e.forEach((t,i)=>{t.active=i===this.activeIndex,t.completed=i<this.activeIndex,t.islast=!1,t.changeOnCompleted=this.changeOnCompleted,t.number=i+1,t.variant=this.variant,t.symbolVariant=this.symbolVariant}),e.length>0&&(e[e.length-1].islast=!0)}_getSteps(){return Array.from(this.querySelectorAll("scb-step"))}firstUpdated(){this._updateSteps()}updated(){this._updateSteps()}render(){return c`
|
|
7510
7528
|
<div
|
|
7511
7529
|
class="steps"
|
|
7512
7530
|
role="list"
|
|
@@ -7588,7 +7606,7 @@ ${this.value}</textarea
|
|
|
7588
7606
|
::slotted(scb-step[symbol-variant="marker"]:not(:first-child))::before {
|
|
7589
7607
|
top: 20px;
|
|
7590
7608
|
}
|
|
7591
|
-
`,
|
|
7609
|
+
`,kt([l({type:String,reflect:!0})],a.ScbStepper.prototype,"type",2),kt([l({type:String,reflect:!0})],a.ScbStepper.prototype,"label",2),kt([l({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.ScbStepper.prototype,"changeOnCompleted",2),kt([l({type:String})],a.ScbStepper.prototype,"variant",2),kt([l({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStepper.prototype,"symbolVariant",2),kt([w()],a.ScbStepper.prototype,"activeIndex",2),a.ScbStepper=kt([g("scb-stepper")],a.ScbStepper);var tp=Object.defineProperty,ip=Object.getOwnPropertyDescriptor,Sr=(o,e,t,i)=>{for(var r=i>1?void 0:i?ip(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&tp(e,t,r),r};a.ScbPrimaryTab=class extends si{constructor(){super(...arguments),this.iconOnly=!1,this.inlineIcon=!1,this._onActivate=()=>{var t;const e=((t=this.textContent)==null?void 0:t.trim())??"";this.dispatchEvent(new CustomEvent("activate",{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}get icon(){return this._icon}set icon(e){const t=this._icon;t!==e&&(this._icon=e,this.requestUpdate("icon",t),this.updateIconSlot())}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this._onActivate),this._icon&&this.updateIconSlot()}updated(){var e;if(super.updated(),this.setAttribute("aria-selected",this.active?"true":"false"),this.iconOnly&&!this.hasAttribute("aria-label")){const t=((e=this.textContent)==null?void 0:e.trim())??"";t&&this.setAttribute("aria-label",t)}}updateIconSlot(){const e=this.querySelector('md-icon[slot="icon"]');if(!this._icon){e==null||e.remove();return}if(e)e.textContent=this._icon;else{const t=document.createElement("md-icon");t.setAttribute("slot","icon"),t.textContent=this._icon,this.appendChild(t)}}},a.ScbPrimaryTab.styles=[...si.styles,m`
|
|
7592
7610
|
/* Icon-only: dölj textslot */
|
|
7593
7611
|
:host([icon-only]) slot:not([name='icon']) {
|
|
7594
7612
|
display: none;
|
|
@@ -7731,7 +7749,7 @@ ${this.value}</textarea
|
|
|
7731
7749
|
.scb-toc-list {
|
|
7732
7750
|
display: block;
|
|
7733
7751
|
}
|
|
7734
|
-
`],Ps([l({type:Boolean,reflect:!0})],a.ScbToc.prototype,"detached",2),a.ScbToc=Ps([g("scb-toc")],a.ScbToc);var hp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,Te=(o,e,t,i)=>{for(var r=i>1?void 0:i?pp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&hp(e,t,r),r};let up=0;a.ScbTooltip=class extends y{constructor(){super(...arguments),this.variant="plain",this.arrow=null,this.supportingtext="",this.label="",this.trigger="hover",this.position="top",this.open=!1,this.delay=.25,this.offset=0,this._hoverActive=!1,this._clickActive=!1,this._hideTimeout=null,this._triggerEl=null,this._originalPosition="top",this._tooltipId=`scb-tooltip-${++up}`,this._onTriggerMouseEnter=()=>{this._hoverActive=!0,this.open=!0},this._onTriggerMouseLeave=()=>{this._hoverActive=!1,this._clickActive||(this.open=!1)},this._onTriggerFocus=()=>{this._hoverActive=!0,this.open=!0},this._onTriggerBlur=()=>{this._hoverActive=!1,this._clickActive||(this.open=!1)},this._onTooltipMouseEnter=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!0,this.open=!0)},this._onTooltipMouseLeave=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!1,this._clickActive||(this.open=!1))},this._onTriggerClick=()=>{this._clickActive=!this._clickActive,this._clickActive?this.open=!0:this._hoverActive||(this.open=!1)}}firstUpdated(){if(this._originalPosition=this.position,this._updateDelayCss(),this._updateTriggerElement(),this._updateTooltipHoverListeners(),this.open){const e=this._getTooltipElement();e&&this._showTooltip(e)}}updated(e){if(e.has("trigger")&&(this._updateTriggerElement(),this._updateTooltipHoverListeners()),e.has("delay")&&this._updateDelayCss(),e.has("open")){const t=this._getTooltipElement();if(!t)return;this.open?this._showTooltip(t):this._hideTooltip(t)}}disconnectedCallback(){super.disconnectedCallback(),this._detachTriggerListeners();const e=this._getTooltipElement();e&&(e.removeEventListener("mouseenter",this._onTooltipMouseEnter),e.removeEventListener("mouseleave",this._onTooltipMouseLeave)),this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null)}_getTooltipElement(){return this.renderRoot.querySelector(".scb-tooltip")}_updateDelayCss(){const e=Number.isFinite(this.delay)?this.delay:.25;this.style.setProperty("--delay",`${e}s`)}_findTriggerElement(){const e=this.querySelector("[scb-tooltip-anchor]:not([slot])");return e||(Array.from(this.children).find(i=>i.nodeType===Node.ELEMENT_NODE)??null)}_updateTriggerElement(){const e=this._triggerEl;e&&(this._detachTriggerListeners(),e.removeAttribute("aria-describedby"));const t=this._findTriggerElement();this._triggerEl=t,t&&(t.setAttribute("aria-describedby",this._tooltipId),(this.trigger==="click"||this.trigger==="hover-click")&&t.addEventListener("click",this._onTriggerClick),(this.trigger==="hover"||this.trigger==="hover-click")&&(t.addEventListener("mouseenter",this._onTriggerMouseEnter),t.addEventListener("mouseleave",this._onTriggerMouseLeave),t.addEventListener("focus",this._onTriggerFocus),t.addEventListener("blur",this._onTriggerBlur)))}_updateTooltipHoverListeners(){const e=this._getTooltipElement();e&&(e.removeEventListener("mouseenter",this._onTooltipMouseEnter),e.removeEventListener("mouseleave",this._onTooltipMouseLeave),(this.trigger==="hover"||this.trigger==="hover-click")&&(e.addEventListener("mouseenter",this._onTooltipMouseEnter),e.addEventListener("mouseleave",this._onTooltipMouseLeave)))}_detachTriggerListeners(){const e=this._triggerEl;e&&(e.removeEventListener("click",this._onTriggerClick),e.removeEventListener("mouseenter",this._onTriggerMouseEnter),e.removeEventListener("mouseleave",this._onTriggerMouseLeave),e.removeEventListener("focus",this._onTriggerFocus),e.removeEventListener("blur",this._onTriggerBlur))}_showTooltip(e){this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null);const t=this._triggerEl;this._resetPosition(),e.classList.remove("hidden"),e.setAttribute("aria-hidden","false"),requestAnimationFrame(()=>{t&&this._positionTooltip(e,t),e.setAttribute("open","")})}_hideTooltip(e){e.removeAttribute("open"),e.setAttribute("aria-hidden","true"),this._scheduleHidden(e)}_scheduleHidden(e){const t=(Number.isFinite(this.delay)?this.delay:.25)*1e3;if(t<=0){e.classList.add("hidden");return}this._hideTimeout=window.setTimeout(()=>{e.classList.add("hidden"),this._hideTimeout=null},t)}_resetPosition(){this.position=this._originalPosition}_positionTooltip(e,t){const i=t.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.getBoundingClientRect(),p=(this.offset??0)+8,v=8,f=v,b=window.innerHeight-v,x=v,_=window.innerWidth-v,S=F=>F>=f&&F+r.height<=b,C=F=>F>=x&&F+r.width<=_,E=(F,le,ke,ki)=>{let qt=0;F<ke&&(qt+=ke-F);const $r=F+le;return $r>ki&&(qt+=$r-ki),qt},A=F=>{let le=0,ke=0;switch(F){case"top":le=i.top-s.top-r.height-p,ke=i.left-s.left+(i.width-r.width)/2;break;case"bottom":le=i.bottom-s.top+p,ke=i.left-s.left+(i.width-r.width)/2;break;case"left":ke=i.left-s.left-r.width-p,le=i.top-s.top+(i.height-r.height)/2;break;case"right":ke=i.right-s.left+p,le=i.top-s.top+(i.height-r.height)/2;break}const ki=le+s.top,qt=ke+s.left,$r=E(ki,r.height,f,b),mp=E(qt,r.width,x,_);return{pos:F,top:le,left:ke,fitsV:S(ki),fitsH:C(qt),totalOverflow:$r+mp}},z=this.position==="top"||this.position==="bottom",X=this.position,V=this._getOppositePosition(X),ve=[X,V,z?"left":"top",z?"right":"bottom"].map(A);let ne=ve.find(F=>F.fitsV&&F.fitsH)??ve.reduce((F,le)=>le.totalOverflow<F.totalOverflow?le:F);const
|
|
7752
|
+
`],Ps([l({type:Boolean,reflect:!0})],a.ScbToc.prototype,"detached",2),a.ScbToc=Ps([g("scb-toc")],a.ScbToc);var hp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,Te=(o,e,t,i)=>{for(var r=i>1?void 0:i?pp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&hp(e,t,r),r};let up=0;a.ScbTooltip=class extends y{constructor(){super(...arguments),this.variant="plain",this.arrow=null,this.supportingtext="",this.label="",this.trigger="hover",this.position="top",this.open=!1,this.delay=.25,this.offset=0,this._hoverActive=!1,this._clickActive=!1,this._hideTimeout=null,this._triggerEl=null,this._originalPosition="top",this._tooltipId=`scb-tooltip-${++up}`,this._onTriggerMouseEnter=()=>{this._hoverActive=!0,this.open=!0},this._onTriggerMouseLeave=()=>{this._hoverActive=!1,this._clickActive||(this.open=!1)},this._onTriggerFocus=()=>{this._hoverActive=!0,this.open=!0},this._onTriggerBlur=()=>{this._hoverActive=!1,this._clickActive||(this.open=!1)},this._onTooltipMouseEnter=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!0,this.open=!0)},this._onTooltipMouseLeave=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!1,this._clickActive||(this.open=!1))},this._onTriggerClick=()=>{this._clickActive=!this._clickActive,this._clickActive?this.open=!0:this._hoverActive||(this.open=!1)}}firstUpdated(){if(this._originalPosition=this.position,this._updateDelayCss(),this._updateTriggerElement(),this._updateTooltipHoverListeners(),this.open){const e=this._getTooltipElement();e&&this._showTooltip(e)}}updated(e){if(e.has("trigger")&&(this._updateTriggerElement(),this._updateTooltipHoverListeners()),e.has("delay")&&this._updateDelayCss(),e.has("open")){const t=this._getTooltipElement();if(!t)return;this.open?this._showTooltip(t):this._hideTooltip(t)}}disconnectedCallback(){super.disconnectedCallback(),this._detachTriggerListeners();const e=this._getTooltipElement();e&&(e.removeEventListener("mouseenter",this._onTooltipMouseEnter),e.removeEventListener("mouseleave",this._onTooltipMouseLeave)),this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null)}_getTooltipElement(){return this.renderRoot.querySelector(".scb-tooltip")}_updateDelayCss(){const e=Number.isFinite(this.delay)?this.delay:.25;this.style.setProperty("--delay",`${e}s`)}_findTriggerElement(){const e=this.querySelector("[scb-tooltip-anchor]:not([slot])");return e||(Array.from(this.children).find(i=>i.nodeType===Node.ELEMENT_NODE)??null)}_updateTriggerElement(){const e=this._triggerEl;e&&(this._detachTriggerListeners(),e.removeAttribute("aria-describedby"));const t=this._findTriggerElement();this._triggerEl=t,t&&(t.setAttribute("aria-describedby",this._tooltipId),(this.trigger==="click"||this.trigger==="hover-click")&&t.addEventListener("click",this._onTriggerClick),(this.trigger==="hover"||this.trigger==="hover-click")&&(t.addEventListener("mouseenter",this._onTriggerMouseEnter),t.addEventListener("mouseleave",this._onTriggerMouseLeave),t.addEventListener("focus",this._onTriggerFocus),t.addEventListener("blur",this._onTriggerBlur)))}_updateTooltipHoverListeners(){const e=this._getTooltipElement();e&&(e.removeEventListener("mouseenter",this._onTooltipMouseEnter),e.removeEventListener("mouseleave",this._onTooltipMouseLeave),(this.trigger==="hover"||this.trigger==="hover-click")&&(e.addEventListener("mouseenter",this._onTooltipMouseEnter),e.addEventListener("mouseleave",this._onTooltipMouseLeave)))}_detachTriggerListeners(){const e=this._triggerEl;e&&(e.removeEventListener("click",this._onTriggerClick),e.removeEventListener("mouseenter",this._onTriggerMouseEnter),e.removeEventListener("mouseleave",this._onTriggerMouseLeave),e.removeEventListener("focus",this._onTriggerFocus),e.removeEventListener("blur",this._onTriggerBlur))}_showTooltip(e){this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null);const t=this._triggerEl;this._resetPosition(),e.classList.remove("hidden"),e.setAttribute("aria-hidden","false"),requestAnimationFrame(()=>{t&&this._positionTooltip(e,t),e.setAttribute("open","")})}_hideTooltip(e){e.removeAttribute("open"),e.setAttribute("aria-hidden","true"),this._scheduleHidden(e)}_scheduleHidden(e){const t=(Number.isFinite(this.delay)?this.delay:.25)*1e3;if(t<=0){e.classList.add("hidden");return}this._hideTimeout=window.setTimeout(()=>{e.classList.add("hidden"),this._hideTimeout=null},t)}_resetPosition(){this.position=this._originalPosition}_positionTooltip(e,t){const i=t.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.getBoundingClientRect(),p=(this.offset??0)+8,v=8,f=v,b=window.innerHeight-v,x=v,_=window.innerWidth-v,S=F=>F>=f&&F+r.height<=b,C=F=>F>=x&&F+r.width<=_,E=(F,le,ke,ki)=>{let qt=0;F<ke&&(qt+=ke-F);const $r=F+le;return $r>ki&&(qt+=$r-ki),qt},A=F=>{let le=0,ke=0;switch(F){case"top":le=i.top-s.top-r.height-p,ke=i.left-s.left+(i.width-r.width)/2;break;case"bottom":le=i.bottom-s.top+p,ke=i.left-s.left+(i.width-r.width)/2;break;case"left":ke=i.left-s.left-r.width-p,le=i.top-s.top+(i.height-r.height)/2;break;case"right":ke=i.right-s.left+p,le=i.top-s.top+(i.height-r.height)/2;break}const ki=le+s.top,qt=ke+s.left,$r=E(ki,r.height,f,b),mp=E(qt,r.width,x,_);return{pos:F,top:le,left:ke,fitsV:S(ki),fitsH:C(qt),totalOverflow:$r+mp}},z=this.position==="top"||this.position==="bottom",X=this.position,V=this._getOppositePosition(X),ve=[X,V,z?"left":"top",z?"right":"bottom"].map(A);let ne=ve.find(F=>F.fitsV&&F.fitsH)??ve.reduce((F,le)=>le.totalOverflow<F.totalOverflow?le:F);const $t=(F,le,ke)=>Math.min(Math.max(F,le),ke),Oe=f-s.top,ot=b-r.height-s.top,kr=x-s.left,wi=_-r.width-s.left,Si=$t(ne.top,Oe,ot),Se=$t(ne.left,kr,wi);e.style.top=`${Si}px`,e.style.left=`${Se}px`,this.position!==ne.pos&&(this.position=ne.pos)}_getOppositePosition(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}_onDefaultSlotChange(){this._updateTriggerElement()}render(){const e=this.arrow?c`<svg
|
|
7735
7753
|
class="scb-tooltip-arrow"
|
|
7736
7754
|
xmlns="http://www.w3.org/2000/svg"
|
|
7737
7755
|
width="13"
|