@govtechsg/sgds-web-component 3.26.1-rc.0 → 3.26.1-rc.1
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/components/QuantityToggle/index.umd.min.js +22 -22
- package/components/QuantityToggle/index.umd.min.js.map +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.js +9 -11
- package/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
- package/components/index.umd.min.js +69 -69
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +1 -1
- package/custom-elements.json +392 -376
- package/index.umd.min.js +63 -63
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js +9 -11
- package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js.map +1 -1
- package/react/components/QuantityToggle/sgds-quantity-toggle.js +9 -11
- package/react/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
- package/react/index.cjs.js +6 -6
- package/react/index.d.ts +1 -1
- package/react/index.js +1 -1
- package/types/react.d.ts +16 -16
package/index.umd.min.js
CHANGED
|
@@ -10,7 +10,7 @@ const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const $=globalThis,S=e=>{$.emitLitDebugLogEvents&&$.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let M,Z=0;$.litIssuedWarnings??=new Set,M=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",$.litIssuedWarnings.has(t)||$.litIssuedWarnings.has(e)||(console.warn(t),$.litIssuedWarnings.add(t))},queueMicrotask(()=>{M("dev-mode","Lit is in dev mode. Not recommended for production!")});const V=$.ShadyDOM?.inUse&&!0===$.ShadyDOM?.noPatch?$.ShadyDOM.wrap:e=>e,z=$.trustedTypes,P=z?z.createPolicy("lit-html",{createHTML:e=>e}):void 0,A=e=>e,L=(e,t,s)=>A,I=e=>{if(ne!==L)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ne=e},D=()=>{ne=L},E=(e,t,s)=>ne(e,t,s),H="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+B,T=`<${O}>`,F=document,R=()=>F.createComment(""),N=e=>null===e||"object"!=typeof e&&"function"!=typeof e,j=Array.isArray,U=e=>j(e)||"function"==typeof e?.[Symbol.iterator],q="[ \t\n\f\r]",Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,K=/>/g,G=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),J=/'/g,X=/"/g,Q=/^(?:script|style|textarea|title)$/i,ee=(te=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&M("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:te,strings:e,values:t}));var te;const se=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),ae=new WeakMap,oe=F.createTreeWalker(F,129);let ne=L;function re(e,t){if(!j(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==P?P.createHTML(t):t}const le=(e,t)=>{const s=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",n=Y;for(let t=0;t<s;t++){const s=e[t];let r,l,d=-1,c=0;for(;c<s.length&&(n.lastIndex=c,l=n.exec(s),null!==l);)if(c=n.lastIndex,n===Y){if("!--"===l[1])n=W;else if(void 0!==l[1])n=K;else if(void 0!==l[2])Q.test(l[2])&&(a=new RegExp(`</${l[2]}`,"g")),n=G;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else n===G?">"===l[0]?(n=a??Y,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,r=l[1],n=void 0===l[3]?G:'"'===l[3]?X:J):n===X||n===J?n=G:n===W||n===K?n=Y:(n=G,a=void 0);console.assert(-1===d||n===G||n===J||n===X,"unexpected parse state B");const h=n===G&&e[t+1].startsWith("/>")?" ":"";o+=n===Y?s+T:d>=0?(i.push(r),s.slice(0,d)+H+s.slice(d)+B+h):s+B+(-2===d?t:h)}return[re(e,o+(e[s]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class de{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let a=0,o=0;const n=e.length-1,r=this.parts,[l,d]=le(e,t);if(this.el=de.createElement(l,s),oe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=oe.nextNode())&&r.length<n;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(B)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);M("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(H)){const t=d[o++],s=i.getAttribute(e).split(B),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:a,name:n[2],strings:s,ctor:"."===n[1]?ge:"?"===n[1]?ve:"@"===n[1]?me:ue}),i.removeAttribute(e)}else e.startsWith(B)&&(r.push({type:6,index:a}),i.removeAttribute(e));if(Q.test(i.tagName)){const e=i.textContent.split(B),t=e.length-1;if(t>0){i.textContent=z?z.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],R()),oe.nextNode(),r.push({type:2,index:++a});i.append(e[t],R())}}}else if(8===i.nodeType){if(i.data===O)r.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(B,e+1));)r.push({type:7,index:a}),e+=B.length-1}}a++}if(d.length!==o)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");S&&S({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const s=F.createElement("template");return s.innerHTML=e,s}}function ce(e,t,s=e,i){if(t===se)return t;let a=void 0!==i?s.__directives?.[i]:s.__directive;const o=N(t)?void 0:t._$litDirective$;return a?.constructor!==o&&(a?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?a=void 0:(a=new o(e),a._$initialize(e,s,i)),void 0!==i?(s.__directives??=[])[i]=a:s.__directive=a),void 0!==a&&(t=ce(e,a._$resolve(e,t.values),a,i)),t}class he{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:s}=this._$template,i=(e?.creationScope??F).importNode(t,!0);oe.currentNode=i;let a=oe.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let t;2===r.type?t=new pe(a,a.nextSibling,this,e):1===r.type?t=new r.ctor(a,r.name,r.strings,this,e):6===r.type&&(t=new fe(a,this,e)),this._$parts.push(t),r=s[++n]}o!==r?.index&&(a=oe.nextNode(),o++)}return oe.currentNode=F,i}_update(e){let t=0;for(const s of this._$parts)void 0!==s&&(S&&S({kind:"set part",part:s,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==s.strings?(s._$setValue(e,s,t),t+=s.strings.length-2):s._$setValue(e[t])),t++}}class pe{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,s,i){this.type=2,this._$committedValue=ie,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=V(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ce(this,e,t),N(e))e===ie||null==e||""===e?(this._$committedValue!==ie&&(S&&S({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ie):e!==this._$committedValue&&e!==se&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else U(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return V(V(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ne!==L){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}S&&S({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==ie&&N(this._$committedValue)){const t=V(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),S&&S({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=F.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),S&&S({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:s}=e,i="number"==typeof s?this._$getTemplate(e):(void 0===s.el&&(s.el=de.createElement(re(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)S&&S({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new he(i,this),s=e._clone(this.options);S&&S({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),e._update(t),S&&S({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),this._commitNode(s),this._$committedValue=e}}_$getTemplate(e){let t=ae.get(e.strings);return void 0===t&&ae.set(e.strings,t=new de(e)),t}_commitIterable(e){j(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let s,i=0;for(const a of e)i===t.length?t.push(s=new pe(this._insert(R()),this._insert(R()),this,this.options)):s=t[i],s._$setValue(a),i++;i<t.length&&(this._$clear(s&&V(s._$endNode).nextSibling,i),t.length=i)}_$clear(e=V(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=V(e).nextSibling;V(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class ue{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,s,i,a){this.type=1,this._$committedValue=ie,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=ie,this._sanitizer=void 0}_$setValue(e,t=this,s,i){const a=this.strings;let o=!1;if(void 0===a)e=ce(this,e,t,0),o=!N(e)||e!==this._$committedValue&&e!==se,o&&(this._$committedValue=e);else{const i=e;let n,r;for(e=a[0],n=0;n<a.length-1;n++)r=ce(this,i[s+n],t,n),r===se&&(r=this._$committedValue[n]),o||=!N(r)||r!==this._$committedValue[n],r===ie?e=ie:e!==ie&&(e+=(r??"")+a[n+1]),this._$committedValue[n]=r}o&&!i&&this._commitValue(e)}_commitValue(e){e===ie?V(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ne(this.element,this.name,"attribute")),e=this._sanitizer(e??""),S&&S({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),V(this.element).setAttribute(this.name,e??""))}}class ge extends ue{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ne(this.element,this.name,"property")),e=this._sanitizer(e),S&&S({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ie?void 0:e}}class ve extends ue{constructor(){super(...arguments),this.type=4}_commitValue(e){S&&S({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ie),options:this.options}),V(this.element).toggleAttribute(this.name,!!e&&e!==ie)}}class me extends ue{constructor(e,t,s,i,a){if(super(e,t,s,i,a),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ce(this,e,t,0)??ie)===se)return;const s=this._$committedValue,i=e===ie&&s!==ie||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==ie&&(s===ie||i);S&&S({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:s}),i&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class fe{constructor(e,t,s){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){S&&S({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ce(this,e)}}const be={_boundAttributeSuffix:H,_marker:B,_markerMatch:O,_HTML_RESULT:1,_getTemplateHtml:le,_TemplateInstance:he,_isIterable:U,_resolveDirective:ce,_ChildPart:pe,_AttributePart:ue,_BooleanAttributePart:ve,_EventPart:me,_PropertyPart:ge,_ElementPart:fe},we=$.litHtmlPolyfillSupportDevMode;we?.(de,pe),($.litHtmlVersions??=[]).push("3.3.2"),$.litHtmlVersions.length>1&&queueMicrotask(()=>{M("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const ye=(e,t,s)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=Z++,a=s?.renderBefore??t;let o=a._$litPart$;if(S&&S({kind:"begin render",id:i,value:e,container:t,options:s,part:o}),void 0===o){const e=s?.renderBefore??null;a._$litPart$=o=new pe(t.insertBefore(R(),e),e,void 0,s??{})}return o._$setValue(e),S&&S({kind:"end render",id:i,value:e,container:t,options:s,part:o}),o};ye.setSanitizer=I,ye.createSanitizer=E,ye._testOnlyClearSanitizerFactoryDoNotCallOrElse=D;
|
|
13
|
+
const $=globalThis,S=e=>{$.emitLitDebugLogEvents&&$.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let M,Z=0;$.litIssuedWarnings??=new Set,M=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",$.litIssuedWarnings.has(t)||$.litIssuedWarnings.has(e)||(console.warn(t),$.litIssuedWarnings.add(t))},queueMicrotask(()=>{M("dev-mode","Lit is in dev mode. Not recommended for production!")});const V=$.ShadyDOM?.inUse&&!0===$.ShadyDOM?.noPatch?$.ShadyDOM.wrap:e=>e,z=$.trustedTypes,P=z?z.createPolicy("lit-html",{createHTML:e=>e}):void 0,A=e=>e,L=(e,t,s)=>A,D=e=>{if(ne!==L)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ne=e},I=()=>{ne=L},E=(e,t,s)=>ne(e,t,s),H="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+B,T=`<${O}>`,F=document,R=()=>F.createComment(""),N=e=>null===e||"object"!=typeof e&&"function"!=typeof e,j=Array.isArray,U=e=>j(e)||"function"==typeof e?.[Symbol.iterator],q="[ \t\n\f\r]",Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,K=/>/g,G=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),J=/'/g,X=/"/g,Q=/^(?:script|style|textarea|title)$/i,ee=(te=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&M("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:te,strings:e,values:t}));var te;const se=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),ae=new WeakMap,oe=F.createTreeWalker(F,129);let ne=L;function re(e,t){if(!j(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==P?P.createHTML(t):t}const le=(e,t)=>{const s=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",n=Y;for(let t=0;t<s;t++){const s=e[t];let r,l,d=-1,c=0;for(;c<s.length&&(n.lastIndex=c,l=n.exec(s),null!==l);)if(c=n.lastIndex,n===Y){if("!--"===l[1])n=W;else if(void 0!==l[1])n=K;else if(void 0!==l[2])Q.test(l[2])&&(a=new RegExp(`</${l[2]}`,"g")),n=G;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else n===G?">"===l[0]?(n=a??Y,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,r=l[1],n=void 0===l[3]?G:'"'===l[3]?X:J):n===X||n===J?n=G:n===W||n===K?n=Y:(n=G,a=void 0);console.assert(-1===d||n===G||n===J||n===X,"unexpected parse state B");const h=n===G&&e[t+1].startsWith("/>")?" ":"";o+=n===Y?s+T:d>=0?(i.push(r),s.slice(0,d)+H+s.slice(d)+B+h):s+B+(-2===d?t:h)}return[re(e,o+(e[s]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class de{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let a=0,o=0;const n=e.length-1,r=this.parts,[l,d]=le(e,t);if(this.el=de.createElement(l,s),oe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=oe.nextNode())&&r.length<n;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(B)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);M("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(H)){const t=d[o++],s=i.getAttribute(e).split(B),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:a,name:n[2],strings:s,ctor:"."===n[1]?ge:"?"===n[1]?ve:"@"===n[1]?me:ue}),i.removeAttribute(e)}else e.startsWith(B)&&(r.push({type:6,index:a}),i.removeAttribute(e));if(Q.test(i.tagName)){const e=i.textContent.split(B),t=e.length-1;if(t>0){i.textContent=z?z.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],R()),oe.nextNode(),r.push({type:2,index:++a});i.append(e[t],R())}}}else if(8===i.nodeType){if(i.data===O)r.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(B,e+1));)r.push({type:7,index:a}),e+=B.length-1}}a++}if(d.length!==o)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");S&&S({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const s=F.createElement("template");return s.innerHTML=e,s}}function ce(e,t,s=e,i){if(t===se)return t;let a=void 0!==i?s.__directives?.[i]:s.__directive;const o=N(t)?void 0:t._$litDirective$;return a?.constructor!==o&&(a?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?a=void 0:(a=new o(e),a._$initialize(e,s,i)),void 0!==i?(s.__directives??=[])[i]=a:s.__directive=a),void 0!==a&&(t=ce(e,a._$resolve(e,t.values),a,i)),t}class he{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:s}=this._$template,i=(e?.creationScope??F).importNode(t,!0);oe.currentNode=i;let a=oe.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let t;2===r.type?t=new pe(a,a.nextSibling,this,e):1===r.type?t=new r.ctor(a,r.name,r.strings,this,e):6===r.type&&(t=new fe(a,this,e)),this._$parts.push(t),r=s[++n]}o!==r?.index&&(a=oe.nextNode(),o++)}return oe.currentNode=F,i}_update(e){let t=0;for(const s of this._$parts)void 0!==s&&(S&&S({kind:"set part",part:s,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==s.strings?(s._$setValue(e,s,t),t+=s.strings.length-2):s._$setValue(e[t])),t++}}class pe{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,s,i){this.type=2,this._$committedValue=ie,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=V(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ce(this,e,t),N(e))e===ie||null==e||""===e?(this._$committedValue!==ie&&(S&&S({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ie):e!==this._$committedValue&&e!==se&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else U(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return V(V(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ne!==L){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}S&&S({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==ie&&N(this._$committedValue)){const t=V(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),S&&S({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=F.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),S&&S({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:s}=e,i="number"==typeof s?this._$getTemplate(e):(void 0===s.el&&(s.el=de.createElement(re(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)S&&S({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new he(i,this),s=e._clone(this.options);S&&S({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),e._update(t),S&&S({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),this._commitNode(s),this._$committedValue=e}}_$getTemplate(e){let t=ae.get(e.strings);return void 0===t&&ae.set(e.strings,t=new de(e)),t}_commitIterable(e){j(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let s,i=0;for(const a of e)i===t.length?t.push(s=new pe(this._insert(R()),this._insert(R()),this,this.options)):s=t[i],s._$setValue(a),i++;i<t.length&&(this._$clear(s&&V(s._$endNode).nextSibling,i),t.length=i)}_$clear(e=V(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=V(e).nextSibling;V(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class ue{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,s,i,a){this.type=1,this._$committedValue=ie,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=ie,this._sanitizer=void 0}_$setValue(e,t=this,s,i){const a=this.strings;let o=!1;if(void 0===a)e=ce(this,e,t,0),o=!N(e)||e!==this._$committedValue&&e!==se,o&&(this._$committedValue=e);else{const i=e;let n,r;for(e=a[0],n=0;n<a.length-1;n++)r=ce(this,i[s+n],t,n),r===se&&(r=this._$committedValue[n]),o||=!N(r)||r!==this._$committedValue[n],r===ie?e=ie:e!==ie&&(e+=(r??"")+a[n+1]),this._$committedValue[n]=r}o&&!i&&this._commitValue(e)}_commitValue(e){e===ie?V(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ne(this.element,this.name,"attribute")),e=this._sanitizer(e??""),S&&S({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),V(this.element).setAttribute(this.name,e??""))}}class ge extends ue{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ne(this.element,this.name,"property")),e=this._sanitizer(e),S&&S({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ie?void 0:e}}class ve extends ue{constructor(){super(...arguments),this.type=4}_commitValue(e){S&&S({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ie),options:this.options}),V(this.element).toggleAttribute(this.name,!!e&&e!==ie)}}class me extends ue{constructor(e,t,s,i,a){if(super(e,t,s,i,a),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ce(this,e,t,0)??ie)===se)return;const s=this._$committedValue,i=e===ie&&s!==ie||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==ie&&(s===ie||i);S&&S({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:s}),i&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class fe{constructor(e,t,s){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){S&&S({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ce(this,e)}}const be={_boundAttributeSuffix:H,_marker:B,_markerMatch:O,_HTML_RESULT:1,_getTemplateHtml:le,_TemplateInstance:he,_isIterable:U,_resolveDirective:ce,_ChildPart:pe,_AttributePart:ue,_BooleanAttributePart:ve,_EventPart:me,_PropertyPart:ge,_ElementPart:fe},we=$.litHtmlPolyfillSupportDevMode;we?.(de,pe),($.litHtmlVersions??=[]).push("3.3.2"),$.litHtmlVersions.length>1&&queueMicrotask(()=>{M("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const ye=(e,t,s)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=Z++,a=s?.renderBefore??t;let o=a._$litPart$;if(S&&S({kind:"begin render",id:i,value:e,container:t,options:s,part:o}),void 0===o){const e=s?.renderBefore??null;a._$litPart$=o=new pe(t.insertBefore(R(),e),e,void 0,s??{})}return o._$setValue(e),S&&S({kind:"end render",id:i,value:e,container:t,options:s,part:o}),o};ye.setSanitizer=D,ye.createSanitizer=E,ye._testOnlyClearSanitizerFactoryDoNotCallOrElse=I;
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
@@ -42,12 +42,12 @@ let Se;$e?.({LitElement:ke}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright 2017 Google LLC
|
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/function
|
|
45
|
+
*/function De(e){return(t,s)=>Pe(t,s,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(e)??null}})}
|
|
46
46
|
/**
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright 2021 Google LLC
|
|
49
49
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
50
|
-
*/function
|
|
50
|
+
*/function Ie(e){return(t,s)=>{const{slot:i,selector:a}=e??{},o="slot"+(i?`[name=${i}]`:":not([name])");return Pe(t,s,{get(){const t=this.renderRoot?.querySelector(o),s=t?.assignedElements(e)??[];return void 0===a?s:s.filter(e=>e.matches(a))}})}}
|
|
51
51
|
/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2017 Google LLC
|
|
@@ -56,7 +56,7 @@ let Se;$e?.({LitElement:ke}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
56
56
|
<div class="accordion">
|
|
57
57
|
<slot @slotchange=${this._handleSlotChange} @click=${this._onToggle} @keydown=${this._onKeyboardToggle}></slot>
|
|
58
58
|
</div>
|
|
59
|
-
`}}Fe.styles=[...Be.styles,Oe],e([Ve({type:Boolean,reflect:!0})],Fe.prototype,"allowMultiple",void 0),e([Ve({type:String,reflect:!0})],Fe.prototype,"variant",void 0),e([Ve({type:String,reflect:!0})],Fe.prototype,"density",void 0),e([
|
|
59
|
+
`}}Fe.styles=[...Be.styles,Oe],e([Ve({type:Boolean,reflect:!0})],Fe.prototype,"allowMultiple",void 0),e([Ve({type:String,reflect:!0})],Fe.prototype,"variant",void 0),e([Ve({type:String,reflect:!0})],Fe.prototype,"density",void 0),e([Ie()],Fe.prototype,"defaultNodes",void 0);
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
@@ -111,7 +111,7 @@ const ct=Symbol.for(""),ht=e=>{if(e?.r===ct)return e?._$litStatic$},pt=(e,...t)=
|
|
|
111
111
|
<button class="btn-close" aria-label="Close button" ?disabled=${this.disabled} @click=${this._handleClick}>
|
|
112
112
|
<sgds-icon name="cross" size="sm"></sgds-icon>
|
|
113
113
|
</button>
|
|
114
|
-
`}}ft.styles=[...Be.styles,mt],e([Ve({type:String,reflect:!0})],ft.prototype,"size",void 0),e([Ve({type:String,reflect:!0})],ft.prototype,"tone",void 0),e([Ve({type:Boolean,reflect:!0})],ft.prototype,"disabled",void 0);const bt={announcement:()=>Promise.resolve().then(function(){return Br}),archive:()=>Promise.resolve().then(function(){return Tr}),"arrow-bar-down":()=>Promise.resolve().then(function(){return Rr}),"arrow-bar-left":()=>Promise.resolve().then(function(){return jr}),"arrow-bar-right":()=>Promise.resolve().then(function(){return qr}),"arrow-bar-up":()=>Promise.resolve().then(function(){return Wr}),"arrow-circle-down":()=>Promise.resolve().then(function(){return Gr}),"arrow-circle-left":()=>Promise.resolve().then(function(){return Xr}),"arrow-circle-right":()=>Promise.resolve().then(function(){return el}),"arrow-circle-up":()=>Promise.resolve().then(function(){return sl}),"arrow-clockwise":()=>Promise.resolve().then(function(){return al}),"arrow-down":()=>Promise.resolve().then(function(){return nl}),"arrow-left":()=>Promise.resolve().then(function(){return ll}),"arrow-repeat":()=>Promise.resolve().then(function(){return cl}),"arrow-right":()=>Promise.resolve().then(function(){return pl}),"arrow-square-down":()=>Promise.resolve().then(function(){return gl}),"arrow-square-left":()=>Promise.resolve().then(function(){return ml}),"arrow-square-right":()=>Promise.resolve().then(function(){return bl}),"arrow-square-up":()=>Promise.resolve().then(function(){return yl}),"arrow-up":()=>Promise.resolve().then(function(){return xl}),"bank-fill":()=>Promise.resolve().then(function(){return Cl}),"bell-slash":()=>Promise.resolve().then(function(){return Sl}),bell:()=>Promise.resolve().then(function(){return Zl}),"bi-funnel":()=>Promise.resolve().then(function(){return zl}),"bookmark-fill":()=>Promise.resolve().then(function(){return Al}),bookmark:()=>Promise.resolve().then(function(){return Il}),"box-arrow-up-right":()=>Promise.resolve().then(function(){return El}),"box-seam":()=>Promise.resolve().then(function(){return Bl}),building:()=>Promise.resolve().then(function(){return Tl}),bus:()=>Promise.resolve().then(function(){return Rl}),calculator:()=>Promise.resolve().then(function(){return jl}),"calendar-check":()=>Promise.resolve().then(function(){return ql}),"calendar-heart":()=>Promise.resolve().then(function(){return Wl}),"calendar-x":()=>Promise.resolve().then(function(){return Gl}),calendar:()=>Promise.resolve().then(function(){return Xl}),camera:()=>Promise.resolve().then(function(){return ed}),car:()=>Promise.resolve().then(function(){return sd}),"chat-dots":()=>Promise.resolve().then(function(){return ad}),"chat-left-text":()=>Promise.resolve().then(function(){return nd}),chat:()=>Promise.resolve().then(function(){return ld}),"check-circle-fill":()=>Promise.resolve().then(function(){return cd}),"check-circle":()=>Promise.resolve().then(function(){return pd}),check:()=>Promise.resolve().then(function(){return gd}),"chevron-down":()=>Promise.resolve().then(function(){return md}),"chevron-left":()=>Promise.resolve().then(function(){return bd}),"chevron-right":()=>Promise.resolve().then(function(){return yd}),"chevron-selector-vertical":()=>Promise.resolve().then(function(){return xd}),"chevron-up":()=>Promise.resolve().then(function(){return Cd}),clock:()=>Promise.resolve().then(function(){return Sd}),"cloud-check":()=>Promise.resolve().then(function(){return Zd}),"cloud-download":()=>Promise.resolve().then(function(){return zd}),"cloud-upload":()=>Promise.resolve().then(function(){return Ad}),cloud:()=>Promise.resolve().then(function(){return Id}),"code-square":()=>Promise.resolve().then(function(){return Ed}),"coins-hand":()=>Promise.resolve().then(function(){return Bd}),compass:()=>Promise.resolve().then(function(){return Td}),copy:()=>Promise.resolve().then(function(){return Rd}),"cpu-chip-ai":()=>Promise.resolve().then(function(){return jd}),cross:()=>Promise.resolve().then(function(){return qd}),"cursor-fill":()=>Promise.resolve().then(function(){return Wd}),cursor:()=>Promise.resolve().then(function(){return Gd}),"dash-circle":()=>Promise.resolve().then(function(){return Xd}),"dash-square":()=>Promise.resolve().then(function(){return ec}),dash:()=>Promise.resolve().then(function(){return sc}),database:()=>Promise.resolve().then(function(){return ac}),dataflow:()=>Promise.resolve().then(function(){return nc}),download:()=>Promise.resolve().then(function(){return lc}),edit:()=>Promise.resolve().then(function(){return cc}),"exclamation-circle-fill":()=>Promise.resolve().then(function(){return pc}),"exclamation-circle":()=>Promise.resolve().then(function(){return gc}),"exclamation-triangle-fill":()=>Promise.resolve().then(function(){return mc}),"exclamation-triangle":()=>Promise.resolve().then(function(){return bc}),exclamation:()=>Promise.resolve().then(function(){return yc}),"eye-fill":()=>Promise.resolve().then(function(){return xc}),"eye-slash-fill":()=>Promise.resolve().then(function(){return Cc}),"eye-slash":()=>Promise.resolve().then(function(){return Sc}),eye:()=>Promise.resolve().then(function(){return Zc}),"face-smile-fill":()=>Promise.resolve().then(function(){return zc}),"face-smile":()=>Promise.resolve().then(function(){return Ac}),facebook:()=>Promise.resolve().then(function(){return Ic}),"file-earmark-text":()=>Promise.resolve().then(function(){return Ec}),"file-pdf":()=>Promise.resolve().then(function(){return Bc}),"file-plus":()=>Promise.resolve().then(function(){return Tc}),"file-text":()=>Promise.resolve().then(function(){return Rc}),file:()=>Promise.resolve().then(function(){return jc}),files:()=>Promise.resolve().then(function(){return qc}),fingerprint:()=>Promise.resolve().then(function(){return Wc}),flash:()=>Promise.resolve().then(function(){return Gc}),"folder-check":()=>Promise.resolve().then(function(){return Xc}),"folder-minus":()=>Promise.resolve().then(function(){return eh}),"folder-plus":()=>Promise.resolve().then(function(){return sh}),folder:()=>Promise.resolve().then(function(){return ah}),gear:()=>Promise.resolve().then(function(){return nh}),"geo-alt":()=>Promise.resolve().then(function(){return lh}),"geo-fill":()=>Promise.resolve().then(function(){return ch}),geo:()=>Promise.resolve().then(function(){return ph}),"globe-alt":()=>Promise.resolve().then(function(){return gh}),globe:()=>Promise.resolve().then(function(){return mh}),google:()=>Promise.resolve().then(function(){return bh}),"grid-alt":()=>Promise.resolve().then(function(){return yh}),"grid-fill":()=>Promise.resolve().then(function(){return xh}),"hand-thumbs-down":()=>Promise.resolve().then(function(){return Ch}),"hand-thumbs-up":()=>Promise.resolve().then(function(){return Sh}),"hard-drive":()=>Promise.resolve().then(function(){return Zh}),heart:()=>Promise.resolve().then(function(){return zh}),"house-door":()=>Promise.resolve().then(function(){return Ah}),house:()=>Promise.resolve().then(function(){return Ih}),image:()=>Promise.resolve().then(function(){return Eh}),"in-box":()=>Promise.resolve().then(function(){return Bh}),"info-circle-fill":()=>Promise.resolve().then(function(){return Th}),"info-circle":()=>Promise.resolve().then(function(){return Rh}),instagram:()=>Promise.resolve().then(function(){return jh}),key:()=>Promise.resolve().then(function(){return qh}),"laptop-gear":()=>Promise.resolve().then(function(){return Wh}),laptop:()=>Promise.resolve().then(function(){return Gh}),layers:()=>Promise.resolve().then(function(){return Xh}),"layout-text-window-reverse":()=>Promise.resolve().then(function(){return ep}),"layout-text-window":()=>Promise.resolve().then(function(){return sp}),layout:()=>Promise.resolve().then(function(){return ap}),"life-buoy":()=>Promise.resolve().then(function(){return np}),lightbulb:()=>Promise.resolve().then(function(){return lp}),link:()=>Promise.resolve().then(function(){return cp}),linkedin:()=>Promise.resolve().then(function(){return pp}),list:()=>Promise.resolve().then(function(){return gp}),"lock-fill":()=>Promise.resolve().then(function(){return mp}),lock:()=>Promise.resolve().then(function(){return bp}),login:()=>Promise.resolve().then(function(){return yp}),logout:()=>Promise.resolve().then(function(){return xp}),luggage:()=>Promise.resolve().then(function(){return Cp}),"mail-open":()=>Promise.resolve().then(function(){return Sp}),mail:()=>Promise.resolve().then(function(){return Zp}),map:()=>Promise.resolve().then(function(){return zp}),meetup:()=>Promise.resolve().then(function(){return Ap}),menu:()=>Promise.resolve().then(function(){return Ip}),microphone:()=>Promise.resolve().then(function(){return Ep}),monitor:()=>Promise.resolve().then(function(){return Bp}),moon:()=>Promise.resolve().then(function(){return Tp}),move:()=>Promise.resolve().then(function(){return Rp}),paperclip:()=>Promise.resolve().then(function(){return jp}),passcode:()=>Promise.resolve().then(function(){return qp}),passport:()=>Promise.resolve().then(function(){return Wp}),pause:()=>Promise.resolve().then(function(){return Gp}),pencil:()=>Promise.resolve().then(function(){return Xp}),"pending-circle":()=>Promise.resolve().then(function(){return eu}),"person-dash":()=>Promise.resolve().then(function(){return su}),"person-plus":()=>Promise.resolve().then(function(){return au}),"person-x":()=>Promise.resolve().then(function(){return nu}),person:()=>Promise.resolve().then(function(){return lu}),phone:()=>Promise.resolve().then(function(){return cu}),"pin-map-fill":()=>Promise.resolve().then(function(){return pu}),pin:()=>Promise.resolve().then(function(){return gu}),placeholder:()=>Promise.resolve().then(function(){return mu}),plane:()=>Promise.resolve().then(function(){return bu}),play:()=>Promise.resolve().then(function(){return yu}),"plus-circle":()=>Promise.resolve().then(function(){return xu}),"plus-square":()=>Promise.resolve().then(function(){return Cu}),plus:()=>Promise.resolve().then(function(){return Su}),printer:()=>Promise.resolve().then(function(){return Zu}),"question-circle":()=>Promise.resolve().then(function(){return zu}),rocket:()=>Promise.resolve().then(function(){return Au}),save:()=>Promise.resolve().then(function(){return Iu}),search:()=>Promise.resolve().then(function(){return Eu}),send:()=>Promise.resolve().then(function(){return Bu}),"sg-crest":()=>Promise.resolve().then(function(){return Tu}),share:()=>Promise.resolve().then(function(){return Ru}),"shield-tick":()=>Promise.resolve().then(function(){return ju}),"sidebar-collapse":()=>Promise.resolve().then(function(){return qu}),"sidebar-expand":()=>Promise.resolve().then(function(){return Wu}),"slash-circle":()=>Promise.resolve().then(function(){return Gu}),"slash-divider":()=>Promise.resolve().then(function(){return Xu}),sliders:()=>Promise.resolve().then(function(){return eg}),"sort-ascending":()=>Promise.resolve().then(function(){return sg}),"sort-descending":()=>Promise.resolve().then(function(){return ag}),speedometer:()=>Promise.resolve().then(function(){return ng}),"star-ai":()=>Promise.resolve().then(function(){return lg}),"star-fill":()=>Promise.resolve().then(function(){return cg}),star:()=>Promise.resolve().then(function(){return pg}),stoplights:()=>Promise.resolve().then(function(){return gg}),sun:()=>Promise.resolve().then(function(){return mg}),"switch-horizontal":()=>Promise.resolve().then(function(){return bg}),"switch-vertical":()=>Promise.resolve().then(function(){return yg}),tablet:()=>Promise.resolve().then(function(){return xg}),telegram:()=>Promise.resolve().then(function(){return Cg}),telephone:()=>Promise.resolve().then(function(){return Sg}),"three-dots-vertical":()=>Promise.resolve().then(function(){return Zg}),"three-dots":()=>Promise.resolve().then(function(){return zg}),ticket:()=>Promise.resolve().then(function(){return Ag}),"toggle-off":()=>Promise.resolve().then(function(){return Ig}),"toggle-on":()=>Promise.resolve().then(function(){return Eg}),train:()=>Promise.resolve().then(function(){return Bg}),translate:()=>Promise.resolve().then(function(){return Tg}),trash:()=>Promise.resolve().then(function(){return Rg}),"trend-down":()=>Promise.resolve().then(function(){return jg}),"trend-up":()=>Promise.resolve().then(function(){return qg}),truck:()=>Promise.resolve().then(function(){return Wg}),"twitter-x":()=>Promise.resolve().then(function(){return Gg}),unlock:()=>Promise.resolve().then(function(){return Xg}),upload:()=>Promise.resolve().then(function(){return ev}),"user-check":()=>Promise.resolve().then(function(){return sv}),"user-circle":()=>Promise.resolve().then(function(){return av}),"user-pause":()=>Promise.resolve().then(function(){return nv}),"user-square":()=>Promise.resolve().then(function(){return lv}),users:()=>Promise.resolve().then(function(){return cv}),"video-recorder":()=>Promise.resolve().then(function(){return pv}),"volume-max":()=>Promise.resolve().then(function(){return gv}),"volume-x":()=>Promise.resolve().then(function(){return mv}),"window-dash":()=>Promise.resolve().then(function(){return bv}),"window-desktop":()=>Promise.resolve().then(function(){return yv}),"window-dock":()=>Promise.resolve().then(function(){return xv}),"window-fullscreen":()=>Promise.resolve().then(function(){return Cv}),"window-plus":()=>Promise.resolve().then(function(){return Sv}),"window-sidebar":()=>Promise.resolve().then(function(){return Zv}),"window-split":()=>Promise.resolve().then(function(){return zv}),"window-stack":()=>Promise.resolve().then(function(){return Av}),"window-x":()=>Promise.resolve().then(function(){return Iv}),window:()=>Promise.resolve().then(function(){return Ev}),"xcircle-fill":()=>Promise.resolve().then(function(){return Bv}),xcircle:()=>Promise.resolve().then(function(){return Tv}),youtube:()=>Promise.resolve().then(function(){return Rv}),"zoom-in":()=>Promise.resolve().then(function(){return jv}),"zoom-out":()=>Promise.resolve().then(function(){return qv})};var wt=n`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;const yt=new Map;class _t extends Be{constructor(){super(...arguments),this.size="lg"}willUpdate(e){e.has("name")&&this._loadIcon(this.name)}async _loadIcon(e){if(!e)return void(this._icon=void 0);if(yt.has(e))return void(this._icon=yt.get(e));const t=bt[e];if(!t)return console.warn(`Icon not found: ${e}`),void(this._icon=void 0);try{const s=await t();yt.set(e,s.default),this._icon=s.default}catch(t){console.warn(`Failed to load icon: ${e}`),this._icon=void 0}}updated(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("svg");t&&(this.ariaLabel?(t.removeAttribute("aria-hidden"),t.setAttribute("aria-label",this.ariaLabel)):(t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true")))}render(){var e;return null!==(e=this._icon)&&void 0!==e?e:ie}}_t.styles=[...Be.styles,wt],e([Ve({type:String,reflect:!0})],_t.prototype,"name",void 0),e([Ve({type:String,reflect:!0})],_t.prototype,"size",void 0),e([Ve({type:String})],_t.prototype,"ariaLabel",void 0),e([ze()],_t.prototype,"_icon",void 0);var xt=n`:host([variant=success]) .alert{background-color:var(--sgds-success-surface-default)}:host([variant=warning]) .alert{--sgds-alert-color:var(--sgds-color-fixed-dark);background-color:var(--sgds-warning-surface-default)}:host([variant=danger]) .alert{background-color:var(--sgds-danger-surface-default)}:host([variant=neutral]) .alert{background-color:var(--sgds-neutral-surface-emphasis)}:host([variant=success][outlined]) .alert{background-color:var(--sgds-success-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-success-border-color-muted)}:host([variant=warning][outlined]) .alert{background-color:var(--sgds-warning-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-warning-border-color-muted)}:host([variant=danger][outlined]) .alert{background-color:var(--sgds-danger-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-danger-border-color-muted)}:host([variant=neutral][outlined]) .alert{background-color:var(--sgds-neutral-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-neutral-border-color-muted)}:host([outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-primary-color-fixed-dark)}:host([variant=success][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-success-color-fixed-dark)}:host([variant=warning][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-warning-color-fixed-light)}:host([variant=danger][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-danger-color-fixed-dark)}:host([variant=neutral][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-color-fixed-dark)}.alert{--sgds-alert-color:var(--sgds-color-fixed-light);background-color:var(--sgds-primary-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);color:var(--sgds-alert-color);display:flex;flex-direction:row;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-lg);position:relative}.alert.outlined{--sgds-alert-color:var(--sgds-color-fixed-dark);background-color:var(--sgds-primary-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-primary-border-color-muted)}.alert-content{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;gap:var(--sgds-gap-md);padding-right:var(--sgds-padding-2-xl)}.alert-content__upper{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.alert-title{font-size:var(--sgds-font-size-subtitle-sm);font-style:normal;font-weight:var(--sgds-font-weight-semibold);line-height:var(--sgds-line-height-2-xs)}.alert-content__description{display:inline;font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-2-xs)}.alert-content__description::slotted(*){font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-2-xs)}.alert-content__description::slotted(a),.alert-content__description::slotted(a:hover){color:inherit!important}.alert-content__description::slotted(a:focus-visible){outline:var(--sgds-outline-focus)!important;outline-offset:var(--sgds-outline-offset-focus)!important}.alert sgds-close-button{position:absolute;right:14px;top:14px}`;class kt extends Be{constructor(){super(...arguments),this.show=!1,this.dismissible=!1,this.variant="info",this.outlined=!1,this.title=""}close(){this.show=!1}_handleShowChange(){this.show?this.emit("sgds-show"):this.emit("sgds-hide")}render(){return this.dismissible&&this.show||!this.dismissible?gt`
|
|
114
|
+
`}}ft.styles=[...Be.styles,mt],e([Ve({type:String,reflect:!0})],ft.prototype,"size",void 0),e([Ve({type:String,reflect:!0})],ft.prototype,"tone",void 0),e([Ve({type:Boolean,reflect:!0})],ft.prototype,"disabled",void 0);const bt={announcement:()=>Promise.resolve().then(function(){return Br}),archive:()=>Promise.resolve().then(function(){return Tr}),"arrow-bar-down":()=>Promise.resolve().then(function(){return Rr}),"arrow-bar-left":()=>Promise.resolve().then(function(){return jr}),"arrow-bar-right":()=>Promise.resolve().then(function(){return qr}),"arrow-bar-up":()=>Promise.resolve().then(function(){return Wr}),"arrow-circle-down":()=>Promise.resolve().then(function(){return Gr}),"arrow-circle-left":()=>Promise.resolve().then(function(){return Xr}),"arrow-circle-right":()=>Promise.resolve().then(function(){return el}),"arrow-circle-up":()=>Promise.resolve().then(function(){return sl}),"arrow-clockwise":()=>Promise.resolve().then(function(){return al}),"arrow-down":()=>Promise.resolve().then(function(){return nl}),"arrow-left":()=>Promise.resolve().then(function(){return ll}),"arrow-repeat":()=>Promise.resolve().then(function(){return cl}),"arrow-right":()=>Promise.resolve().then(function(){return pl}),"arrow-square-down":()=>Promise.resolve().then(function(){return gl}),"arrow-square-left":()=>Promise.resolve().then(function(){return ml}),"arrow-square-right":()=>Promise.resolve().then(function(){return bl}),"arrow-square-up":()=>Promise.resolve().then(function(){return yl}),"arrow-up":()=>Promise.resolve().then(function(){return xl}),"bank-fill":()=>Promise.resolve().then(function(){return Cl}),"bell-slash":()=>Promise.resolve().then(function(){return Sl}),bell:()=>Promise.resolve().then(function(){return Zl}),"bi-funnel":()=>Promise.resolve().then(function(){return zl}),"bookmark-fill":()=>Promise.resolve().then(function(){return Al}),bookmark:()=>Promise.resolve().then(function(){return Dl}),"box-arrow-up-right":()=>Promise.resolve().then(function(){return El}),"box-seam":()=>Promise.resolve().then(function(){return Bl}),building:()=>Promise.resolve().then(function(){return Tl}),bus:()=>Promise.resolve().then(function(){return Rl}),calculator:()=>Promise.resolve().then(function(){return jl}),"calendar-check":()=>Promise.resolve().then(function(){return ql}),"calendar-heart":()=>Promise.resolve().then(function(){return Wl}),"calendar-x":()=>Promise.resolve().then(function(){return Gl}),calendar:()=>Promise.resolve().then(function(){return Xl}),camera:()=>Promise.resolve().then(function(){return ed}),car:()=>Promise.resolve().then(function(){return sd}),"chat-dots":()=>Promise.resolve().then(function(){return ad}),"chat-left-text":()=>Promise.resolve().then(function(){return nd}),chat:()=>Promise.resolve().then(function(){return ld}),"check-circle-fill":()=>Promise.resolve().then(function(){return cd}),"check-circle":()=>Promise.resolve().then(function(){return pd}),check:()=>Promise.resolve().then(function(){return gd}),"chevron-down":()=>Promise.resolve().then(function(){return md}),"chevron-left":()=>Promise.resolve().then(function(){return bd}),"chevron-right":()=>Promise.resolve().then(function(){return yd}),"chevron-selector-vertical":()=>Promise.resolve().then(function(){return xd}),"chevron-up":()=>Promise.resolve().then(function(){return Cd}),clock:()=>Promise.resolve().then(function(){return Sd}),"cloud-check":()=>Promise.resolve().then(function(){return Zd}),"cloud-download":()=>Promise.resolve().then(function(){return zd}),"cloud-upload":()=>Promise.resolve().then(function(){return Ad}),cloud:()=>Promise.resolve().then(function(){return Dd}),"code-square":()=>Promise.resolve().then(function(){return Ed}),"coins-hand":()=>Promise.resolve().then(function(){return Bd}),compass:()=>Promise.resolve().then(function(){return Td}),copy:()=>Promise.resolve().then(function(){return Rd}),"cpu-chip-ai":()=>Promise.resolve().then(function(){return jd}),cross:()=>Promise.resolve().then(function(){return qd}),"cursor-fill":()=>Promise.resolve().then(function(){return Wd}),cursor:()=>Promise.resolve().then(function(){return Gd}),"dash-circle":()=>Promise.resolve().then(function(){return Xd}),"dash-square":()=>Promise.resolve().then(function(){return ec}),dash:()=>Promise.resolve().then(function(){return sc}),database:()=>Promise.resolve().then(function(){return ac}),dataflow:()=>Promise.resolve().then(function(){return nc}),download:()=>Promise.resolve().then(function(){return lc}),edit:()=>Promise.resolve().then(function(){return cc}),"exclamation-circle-fill":()=>Promise.resolve().then(function(){return pc}),"exclamation-circle":()=>Promise.resolve().then(function(){return gc}),"exclamation-triangle-fill":()=>Promise.resolve().then(function(){return mc}),"exclamation-triangle":()=>Promise.resolve().then(function(){return bc}),exclamation:()=>Promise.resolve().then(function(){return yc}),"eye-fill":()=>Promise.resolve().then(function(){return xc}),"eye-slash-fill":()=>Promise.resolve().then(function(){return Cc}),"eye-slash":()=>Promise.resolve().then(function(){return Sc}),eye:()=>Promise.resolve().then(function(){return Zc}),"face-smile-fill":()=>Promise.resolve().then(function(){return zc}),"face-smile":()=>Promise.resolve().then(function(){return Ac}),facebook:()=>Promise.resolve().then(function(){return Dc}),"file-earmark-text":()=>Promise.resolve().then(function(){return Ec}),"file-pdf":()=>Promise.resolve().then(function(){return Bc}),"file-plus":()=>Promise.resolve().then(function(){return Tc}),"file-text":()=>Promise.resolve().then(function(){return Rc}),file:()=>Promise.resolve().then(function(){return jc}),files:()=>Promise.resolve().then(function(){return qc}),fingerprint:()=>Promise.resolve().then(function(){return Wc}),flash:()=>Promise.resolve().then(function(){return Gc}),"folder-check":()=>Promise.resolve().then(function(){return Xc}),"folder-minus":()=>Promise.resolve().then(function(){return eh}),"folder-plus":()=>Promise.resolve().then(function(){return sh}),folder:()=>Promise.resolve().then(function(){return ah}),gear:()=>Promise.resolve().then(function(){return nh}),"geo-alt":()=>Promise.resolve().then(function(){return lh}),"geo-fill":()=>Promise.resolve().then(function(){return ch}),geo:()=>Promise.resolve().then(function(){return ph}),"globe-alt":()=>Promise.resolve().then(function(){return gh}),globe:()=>Promise.resolve().then(function(){return mh}),google:()=>Promise.resolve().then(function(){return bh}),"grid-alt":()=>Promise.resolve().then(function(){return yh}),"grid-fill":()=>Promise.resolve().then(function(){return xh}),"hand-thumbs-down":()=>Promise.resolve().then(function(){return Ch}),"hand-thumbs-up":()=>Promise.resolve().then(function(){return Sh}),"hard-drive":()=>Promise.resolve().then(function(){return Zh}),heart:()=>Promise.resolve().then(function(){return zh}),"house-door":()=>Promise.resolve().then(function(){return Ah}),house:()=>Promise.resolve().then(function(){return Dh}),image:()=>Promise.resolve().then(function(){return Eh}),"in-box":()=>Promise.resolve().then(function(){return Bh}),"info-circle-fill":()=>Promise.resolve().then(function(){return Th}),"info-circle":()=>Promise.resolve().then(function(){return Rh}),instagram:()=>Promise.resolve().then(function(){return jh}),key:()=>Promise.resolve().then(function(){return qh}),"laptop-gear":()=>Promise.resolve().then(function(){return Wh}),laptop:()=>Promise.resolve().then(function(){return Gh}),layers:()=>Promise.resolve().then(function(){return Xh}),"layout-text-window-reverse":()=>Promise.resolve().then(function(){return ep}),"layout-text-window":()=>Promise.resolve().then(function(){return sp}),layout:()=>Promise.resolve().then(function(){return ap}),"life-buoy":()=>Promise.resolve().then(function(){return np}),lightbulb:()=>Promise.resolve().then(function(){return lp}),link:()=>Promise.resolve().then(function(){return cp}),linkedin:()=>Promise.resolve().then(function(){return pp}),list:()=>Promise.resolve().then(function(){return gp}),"lock-fill":()=>Promise.resolve().then(function(){return mp}),lock:()=>Promise.resolve().then(function(){return bp}),login:()=>Promise.resolve().then(function(){return yp}),logout:()=>Promise.resolve().then(function(){return xp}),luggage:()=>Promise.resolve().then(function(){return Cp}),"mail-open":()=>Promise.resolve().then(function(){return Sp}),mail:()=>Promise.resolve().then(function(){return Zp}),map:()=>Promise.resolve().then(function(){return zp}),meetup:()=>Promise.resolve().then(function(){return Ap}),menu:()=>Promise.resolve().then(function(){return Dp}),microphone:()=>Promise.resolve().then(function(){return Ep}),monitor:()=>Promise.resolve().then(function(){return Bp}),moon:()=>Promise.resolve().then(function(){return Tp}),move:()=>Promise.resolve().then(function(){return Rp}),paperclip:()=>Promise.resolve().then(function(){return jp}),passcode:()=>Promise.resolve().then(function(){return qp}),passport:()=>Promise.resolve().then(function(){return Wp}),pause:()=>Promise.resolve().then(function(){return Gp}),pencil:()=>Promise.resolve().then(function(){return Xp}),"pending-circle":()=>Promise.resolve().then(function(){return eu}),"person-dash":()=>Promise.resolve().then(function(){return su}),"person-plus":()=>Promise.resolve().then(function(){return au}),"person-x":()=>Promise.resolve().then(function(){return nu}),person:()=>Promise.resolve().then(function(){return lu}),phone:()=>Promise.resolve().then(function(){return cu}),"pin-map-fill":()=>Promise.resolve().then(function(){return pu}),pin:()=>Promise.resolve().then(function(){return gu}),placeholder:()=>Promise.resolve().then(function(){return mu}),plane:()=>Promise.resolve().then(function(){return bu}),play:()=>Promise.resolve().then(function(){return yu}),"plus-circle":()=>Promise.resolve().then(function(){return xu}),"plus-square":()=>Promise.resolve().then(function(){return Cu}),plus:()=>Promise.resolve().then(function(){return Su}),printer:()=>Promise.resolve().then(function(){return Zu}),"question-circle":()=>Promise.resolve().then(function(){return zu}),rocket:()=>Promise.resolve().then(function(){return Au}),save:()=>Promise.resolve().then(function(){return Du}),search:()=>Promise.resolve().then(function(){return Eu}),send:()=>Promise.resolve().then(function(){return Bu}),"sg-crest":()=>Promise.resolve().then(function(){return Tu}),share:()=>Promise.resolve().then(function(){return Ru}),"shield-tick":()=>Promise.resolve().then(function(){return ju}),"sidebar-collapse":()=>Promise.resolve().then(function(){return qu}),"sidebar-expand":()=>Promise.resolve().then(function(){return Wu}),"slash-circle":()=>Promise.resolve().then(function(){return Gu}),"slash-divider":()=>Promise.resolve().then(function(){return Xu}),sliders:()=>Promise.resolve().then(function(){return eg}),"sort-ascending":()=>Promise.resolve().then(function(){return sg}),"sort-descending":()=>Promise.resolve().then(function(){return ag}),speedometer:()=>Promise.resolve().then(function(){return ng}),"star-ai":()=>Promise.resolve().then(function(){return lg}),"star-fill":()=>Promise.resolve().then(function(){return cg}),star:()=>Promise.resolve().then(function(){return pg}),stoplights:()=>Promise.resolve().then(function(){return gg}),sun:()=>Promise.resolve().then(function(){return mg}),"switch-horizontal":()=>Promise.resolve().then(function(){return bg}),"switch-vertical":()=>Promise.resolve().then(function(){return yg}),tablet:()=>Promise.resolve().then(function(){return xg}),telegram:()=>Promise.resolve().then(function(){return Cg}),telephone:()=>Promise.resolve().then(function(){return Sg}),"three-dots-vertical":()=>Promise.resolve().then(function(){return Zg}),"three-dots":()=>Promise.resolve().then(function(){return zg}),ticket:()=>Promise.resolve().then(function(){return Ag}),"toggle-off":()=>Promise.resolve().then(function(){return Dg}),"toggle-on":()=>Promise.resolve().then(function(){return Eg}),train:()=>Promise.resolve().then(function(){return Bg}),translate:()=>Promise.resolve().then(function(){return Tg}),trash:()=>Promise.resolve().then(function(){return Rg}),"trend-down":()=>Promise.resolve().then(function(){return jg}),"trend-up":()=>Promise.resolve().then(function(){return qg}),truck:()=>Promise.resolve().then(function(){return Wg}),"twitter-x":()=>Promise.resolve().then(function(){return Gg}),unlock:()=>Promise.resolve().then(function(){return Xg}),upload:()=>Promise.resolve().then(function(){return ev}),"user-check":()=>Promise.resolve().then(function(){return sv}),"user-circle":()=>Promise.resolve().then(function(){return av}),"user-pause":()=>Promise.resolve().then(function(){return nv}),"user-square":()=>Promise.resolve().then(function(){return lv}),users:()=>Promise.resolve().then(function(){return cv}),"video-recorder":()=>Promise.resolve().then(function(){return pv}),"volume-max":()=>Promise.resolve().then(function(){return gv}),"volume-x":()=>Promise.resolve().then(function(){return mv}),"window-dash":()=>Promise.resolve().then(function(){return bv}),"window-desktop":()=>Promise.resolve().then(function(){return yv}),"window-dock":()=>Promise.resolve().then(function(){return xv}),"window-fullscreen":()=>Promise.resolve().then(function(){return Cv}),"window-plus":()=>Promise.resolve().then(function(){return Sv}),"window-sidebar":()=>Promise.resolve().then(function(){return Zv}),"window-split":()=>Promise.resolve().then(function(){return zv}),"window-stack":()=>Promise.resolve().then(function(){return Av}),"window-x":()=>Promise.resolve().then(function(){return Dv}),window:()=>Promise.resolve().then(function(){return Ev}),"xcircle-fill":()=>Promise.resolve().then(function(){return Bv}),xcircle:()=>Promise.resolve().then(function(){return Tv}),youtube:()=>Promise.resolve().then(function(){return Rv}),"zoom-in":()=>Promise.resolve().then(function(){return jv}),"zoom-out":()=>Promise.resolve().then(function(){return qv})};var wt=n`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;const yt=new Map;class _t extends Be{constructor(){super(...arguments),this.size="lg"}willUpdate(e){e.has("name")&&this._loadIcon(this.name)}async _loadIcon(e){if(!e)return void(this._icon=void 0);if(yt.has(e))return void(this._icon=yt.get(e));const t=bt[e];if(!t)return console.warn(`Icon not found: ${e}`),void(this._icon=void 0);try{const s=await t();yt.set(e,s.default),this._icon=s.default}catch(t){console.warn(`Failed to load icon: ${e}`),this._icon=void 0}}updated(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("svg");t&&(this.ariaLabel?(t.removeAttribute("aria-hidden"),t.setAttribute("aria-label",this.ariaLabel)):(t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true")))}render(){var e;return null!==(e=this._icon)&&void 0!==e?e:ie}}_t.styles=[...Be.styles,wt],e([Ve({type:String,reflect:!0})],_t.prototype,"name",void 0),e([Ve({type:String,reflect:!0})],_t.prototype,"size",void 0),e([Ve({type:String})],_t.prototype,"ariaLabel",void 0),e([ze()],_t.prototype,"_icon",void 0);var xt=n`:host([variant=success]) .alert{background-color:var(--sgds-success-surface-default)}:host([variant=warning]) .alert{--sgds-alert-color:var(--sgds-color-fixed-dark);background-color:var(--sgds-warning-surface-default)}:host([variant=danger]) .alert{background-color:var(--sgds-danger-surface-default)}:host([variant=neutral]) .alert{background-color:var(--sgds-neutral-surface-emphasis)}:host([variant=success][outlined]) .alert{background-color:var(--sgds-success-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-success-border-color-muted)}:host([variant=warning][outlined]) .alert{background-color:var(--sgds-warning-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-warning-border-color-muted)}:host([variant=danger][outlined]) .alert{background-color:var(--sgds-danger-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-danger-border-color-muted)}:host([variant=neutral][outlined]) .alert{background-color:var(--sgds-neutral-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-neutral-border-color-muted)}:host([outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-primary-color-fixed-dark)}:host([variant=success][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-success-color-fixed-dark)}:host([variant=warning][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-warning-color-fixed-light)}:host([variant=danger][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-danger-color-fixed-dark)}:host([variant=neutral][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-color-fixed-dark)}.alert{--sgds-alert-color:var(--sgds-color-fixed-light);background-color:var(--sgds-primary-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);color:var(--sgds-alert-color);display:flex;flex-direction:row;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-lg);position:relative}.alert.outlined{--sgds-alert-color:var(--sgds-color-fixed-dark);background-color:var(--sgds-primary-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-primary-border-color-muted)}.alert-content{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;gap:var(--sgds-gap-md);padding-right:var(--sgds-padding-2-xl)}.alert-content__upper{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.alert-title{font-size:var(--sgds-font-size-subtitle-sm);font-style:normal;font-weight:var(--sgds-font-weight-semibold);line-height:var(--sgds-line-height-2-xs)}.alert-content__description{display:inline;font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-2-xs)}.alert-content__description::slotted(*){font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-2-xs)}.alert-content__description::slotted(a),.alert-content__description::slotted(a:hover){color:inherit!important}.alert-content__description::slotted(a:focus-visible){outline:var(--sgds-outline-focus)!important;outline-offset:var(--sgds-outline-offset-focus)!important}.alert sgds-close-button{position:absolute;right:14px;top:14px}`;class kt extends Be{constructor(){super(...arguments),this.show=!1,this.dismissible=!1,this.variant="info",this.outlined=!1,this.title=""}close(){this.show=!1}_handleShowChange(){this.show?this.emit("sgds-show"):this.emit("sgds-hide")}render(){return this.dismissible&&this.show||!this.dismissible?gt`
|
|
115
115
|
<div
|
|
116
116
|
class="${We({alert:!0,show:this.show,"alert-dismissible":this.dismissible,outlined:this.outlined})}"
|
|
117
117
|
role="alert"
|
|
@@ -138,17 +138,17 @@ const ct=Symbol.for(""),ht=e=>{if(e?.r===ct)return e?._$litStatic$},pt=(e,...t)=
|
|
|
138
138
|
* @license
|
|
139
139
|
* Copyright 2020 Google LLC
|
|
140
140
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
141
|
-
*/;const{_ChildPart:Zt}=be,Vt=window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch?window.ShadyDOM.wrap:e=>e,zt=e=>void 0===e.strings,Pt=()=>document.createComment(""),At=(e,t,s)=>{const i=Vt(e._$startNode).parentNode,a=void 0===t?e._$endNode:t._$startNode;if(void 0===s){const t=Vt(i).insertBefore(Pt(),a),o=Vt(i).insertBefore(Pt(),a);s=new Zt(t,o,e,e.options)}else{const t=Vt(s._$endNode).nextSibling,o=s._$parent,n=o!==e;if(n){let t;s._$reparentDisconnectables?.(e),s._$parent=e,void 0!==s._$notifyConnectionChanged&&(t=e._$isConnected)!==o._$isConnected&&s._$notifyConnectionChanged(t)}if(t!==a||n){let e=s._$startNode;for(;e!==t;){const t=Vt(e).nextSibling;Vt(i).insertBefore(e,a),e=t}}}return s},Lt=(e,t,s=e)=>(e._$setValue(t,s),e),
|
|
141
|
+
*/;const{_ChildPart:Zt}=be,Vt=window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch?window.ShadyDOM.wrap:e=>e,zt=e=>void 0===e.strings,Pt=()=>document.createComment(""),At=(e,t,s)=>{const i=Vt(e._$startNode).parentNode,a=void 0===t?e._$endNode:t._$startNode;if(void 0===s){const t=Vt(i).insertBefore(Pt(),a),o=Vt(i).insertBefore(Pt(),a);s=new Zt(t,o,e,e.options)}else{const t=Vt(s._$endNode).nextSibling,o=s._$parent,n=o!==e;if(n){let t;s._$reparentDisconnectables?.(e),s._$parent=e,void 0!==s._$notifyConnectionChanged&&(t=e._$isConnected)!==o._$isConnected&&s._$notifyConnectionChanged(t)}if(t!==a||n){let e=s._$startNode;for(;e!==t;){const t=Vt(e).nextSibling;Vt(i).insertBefore(e,a),e=t}}}return s},Lt=(e,t,s=e)=>(e._$setValue(t,s),e),Dt={},It=(e,t=Dt)=>e._$committedValue=t,Et=e=>{e._$clear(),e._$startNode.remove()},Ht=(e,t)=>{const s=e._$disconnectableChildren;if(void 0===s)return!1;for(const e of s)e._$notifyDirectiveConnectionChanged?.(t,!1),Ht(e,t);return!0},Bt=e=>{let t,s;do{if(void 0===(t=e._$parent))break;s=t._$disconnectableChildren,s.delete(e),e=t}while(0===s?.size)},Ot=e=>{for(let t;t=e._$parent;e=t){let s=t._$disconnectableChildren;if(void 0===s)t._$disconnectableChildren=s=new Set;else if(s.has(e))break;s.add(e),Rt(t)}};function Tt(e){void 0!==this._$disconnectableChildren?(Bt(this),this._$parent=e,Ot(this)):this._$parent=e}function Ft(e,t=!1,s=0){const i=this._$committedValue,a=this._$disconnectableChildren;if(void 0!==a&&0!==a.size)if(t)if(Array.isArray(i))for(let e=s;e<i.length;e++)Ht(i[e],!1),Bt(i[e]);else null!=i&&(Ht(i,!1),Bt(i));else Ht(this,e)}const Rt=e=>{e.type==Ne&&(e._$notifyConnectionChanged??=Ft,e._$reparentDisconnectables??=Tt)};class Nt extends Ye{constructor(){super(...arguments),this._$disconnectableChildren=void 0}_$initialize(e,t,s){super._$initialize(e,t,s),Ot(this),this.isConnected=e._$isConnected}_$notifyDirectiveConnectionChanged(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(Ht(this,e),Bt(this))}setValue(e){if(zt(this.__part))this.__part._$setValue(e,this);else{if(void 0===this.__attributeIndex)throw new Error("Expected this.__attributeIndex to be a number");const t=[...this.__part._$committedValue];t[this.__attributeIndex]=e,this.__part._$setValue(t,this,0)}}disconnected(){}reconnected(){}}
|
|
142
142
|
/**
|
|
143
143
|
* @license
|
|
144
144
|
* Copyright 2020 Google LLC
|
|
145
145
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
146
|
-
*/const jt=()=>new Ut;class Ut{}const qt=new WeakMap;const Yt=qe(class extends Nt{render(e){return ie}update(e,[t]){const s=t!==this._ref;return s&&void 0!==this._ref&&this._updateRefValue(void 0),(s||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),ie}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let s=qt.get(t);void 0===s&&(s=new WeakMap,qt.set(t,s)),void 0!==s.get(this._ref)&&this._ref.call(this._context,void 0),s.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?qt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),Wt=["top","right","bottom","left"],Kt=Math.min,Gt=Math.max,Jt=Math.round,Xt=Math.floor,Qt=e=>({x:e,y:e}),es={left:"right",right:"left",bottom:"top",top:"bottom"},ts={start:"end",end:"start"};function ss(e,t,s){return Gt(e,Kt(t,s))}function is(e,t){return"function"==typeof e?e(t):e}function as(e){return e.split("-")[0]}function os(e){return e.split("-")[1]}function ns(e){return"x"===e?"y":"x"}function rs(e){return"y"===e?"height":"width"}const ls=new Set(["top","bottom"]);function ds(e){return ls.has(as(e))?"y":"x"}function cs(e){return ns(ds(e))}function hs(e,t,s){void 0===s&&(s=!1);const i=os(e),a=cs(e),o=rs(a);let n="x"===a?i===(s?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(n=bs(n)),[n,bs(n)]}function ps(e){return e.replace(/start|end/g,e=>ts[e])}const us=["left","right"],gs=["right","left"],vs=["top","bottom"],ms=["bottom","top"];function fs(e,t,s,i){const a=os(e);let o=function(e,t,s){switch(e){case"top":case"bottom":return s?t?gs:us:t?us:gs;case"left":case"right":return t?vs:ms;default:return[]}}(as(e),"start"===s,i);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(ps)))),o}function bs(e){return e.replace(/left|right|bottom|top/g,e=>es[e])}function ws(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ys(e){const{x:t,y:s,width:i,height:a}=e;return{width:i,height:a,top:s,left:t,right:t+i,bottom:s+a,x:t,y:s}}function _s(e,t,s){let{reference:i,floating:a}=e;const o=ds(t),n=cs(t),r=rs(n),l=as(t),d="y"===o,c=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,p=i[r]/2-a[r]/2;let u;switch(l){case"top":u={x:c,y:i.y-a.height};break;case"bottom":u={x:c,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:h};break;case"left":u={x:i.x-a.width,y:h};break;default:u={x:i.x,y:i.y}}switch(os(t)){case"start":u[n]-=p*(s&&d?-1:1);break;case"end":u[n]+=p*(s&&d?-1:1)}return u}async function xs(e,t){var s;void 0===t&&(t={});const{x:i,y:a,platform:o,rects:n,elements:r,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:p=!1,padding:u=0}=is(t,e),g=ws(u),v=r[p?"floating"===h?"reference":"floating":h],m=ys(await o.getClippingRect({element:null==(s=await(null==o.isElement?void 0:o.isElement(v)))||s?v:v.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(r.floating)),boundary:d,rootBoundary:c,strategy:l})),f="floating"===h?{x:i,y:a,width:n.floating.width,height:n.floating.height}:n.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(r.floating)),w=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},y=ys(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:f,offsetParent:b,strategy:l}):f);return{top:(m.top-y.top+g.top)/w.y,bottom:(y.bottom-m.bottom+g.bottom)/w.y,left:(m.left-y.left+g.left)/w.x,right:(y.right-m.right+g.right)/w.x}}function ks(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cs(e){return Wt.some(t=>e[t]>=0)}const $s=new Set(["left","top"]);function Ss(){return"undefined"!=typeof window}function Ms(e){return zs(e)?(e.nodeName||"").toLowerCase():"#document"}function Zs(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Vs(e){var t;return null==(t=(zs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function zs(e){return!!Ss()&&(e instanceof Node||e instanceof Zs(e).Node)}function Ps(e){return!!Ss()&&(e instanceof Element||e instanceof Zs(e).Element)}function As(e){return!!Ss()&&(e instanceof HTMLElement||e instanceof Zs(e).HTMLElement)}function Ls(e){return!(!Ss()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Zs(e).ShadowRoot)}const Is=new Set(["inline","contents"]);function Ds(e){const{overflow:t,overflowX:s,overflowY:i,display:a}=Ys(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+s)&&!Is.has(a)}const Es=new Set(["table","td","th"]);function Hs(e){return Es.has(Ms(e))}const Bs=[":popover-open",":modal"];function Os(e){return Bs.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Ts=["transform","translate","scale","rotate","perspective"],Fs=["transform","translate","scale","rotate","perspective","filter"],Rs=["paint","layout","strict","content"];function Ns(e){const t=js(),s=Ps(e)?Ys(e):e;return Ts.some(e=>!!s[e]&&"none"!==s[e])||!!s.containerType&&"normal"!==s.containerType||!t&&!!s.backdropFilter&&"none"!==s.backdropFilter||!t&&!!s.filter&&"none"!==s.filter||Fs.some(e=>(s.willChange||"").includes(e))||Rs.some(e=>(s.contain||"").includes(e))}function js(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Us=new Set(["html","body","#document"]);function qs(e){return Us.has(Ms(e))}function Ys(e){return Zs(e).getComputedStyle(e)}function Ws(e){return Ps(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ks(e){if("html"===Ms(e))return e;const t=e.assignedSlot||e.parentNode||Ls(e)&&e.host||Vs(e);return Ls(t)?t.host:t}function Gs(e){const t=Ks(e);return qs(t)?e.ownerDocument?e.ownerDocument.body:e.body:As(t)&&Ds(t)?t:Gs(t)}function Js(e,t,s){var i;void 0===t&&(t=[]),void 0===s&&(s=!0);const a=Gs(e),o=a===(null==(i=e.ownerDocument)?void 0:i.body),n=Zs(a);if(o){const e=Xs(n);return t.concat(n,n.visualViewport||[],Ds(a)?a:[],e&&s?Js(e):[])}return t.concat(a,Js(a,[],s))}function Xs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qs(e){const t=Ys(e);let s=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=As(e),o=a?e.offsetWidth:s,n=a?e.offsetHeight:i,r=Jt(s)!==o||Jt(i)!==n;return r&&(s=o,i=n),{width:s,height:i,$:r}}function ei(e){return Ps(e)?e:e.contextElement}function ti(e){const t=ei(e);if(!As(t))return Qt(1);const s=t.getBoundingClientRect(),{width:i,height:a,$:o}=Qs(t);let n=(o?Jt(s.width):s.width)/i,r=(o?Jt(s.height):s.height)/a;return n&&Number.isFinite(n)||(n=1),r&&Number.isFinite(r)||(r=1),{x:n,y:r}}const si=Qt(0);function ii(e){const t=Zs(e);return js()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:si}function ai(e,t,s,i){void 0===t&&(t=!1),void 0===s&&(s=!1);const a=e.getBoundingClientRect(),o=ei(e);let n=Qt(1);t&&(i?Ps(i)&&(n=ti(i)):n=ti(e));const r=function(e,t,s){return void 0===t&&(t=!1),!(!s||t&&s!==Zs(e))&&t}(o,s,i)?ii(o):Qt(0);let l=(a.left+r.x)/n.x,d=(a.top+r.y)/n.y,c=a.width/n.x,h=a.height/n.y;if(o){const e=Zs(o),t=i&&Ps(i)?Zs(i):i;let s=e,a=Xs(s);for(;a&&i&&t!==s;){const e=ti(a),t=a.getBoundingClientRect(),i=Ys(a),o=t.left+(a.clientLeft+parseFloat(i.paddingLeft))*e.x,n=t.top+(a.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,h*=e.y,l+=o,d+=n,s=Zs(a),a=Xs(s)}}return ys({width:c,height:h,x:l,y:d})}function oi(e,t){const s=Ws(e).scrollLeft;return t?t.left+s:ai(Vs(e)).left+s}function ni(e,t){const s=e.getBoundingClientRect();return{x:s.left+t.scrollLeft-oi(e,s),y:s.top+t.scrollTop}}const ri=new Set(["absolute","fixed"]);function li(e,t,s){let i;if("viewport"===t)i=function(e,t){const s=Zs(e),i=Vs(e),a=s.visualViewport;let o=i.clientWidth,n=i.clientHeight,r=0,l=0;if(a){o=a.width,n=a.height;const e=js();(!e||e&&"fixed"===t)&&(r=a.offsetLeft,l=a.offsetTop)}const d=oi(i);if(d<=0){const e=i.ownerDocument,t=e.body,s=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(s.marginLeft)+parseFloat(s.marginRight)||0,n=Math.abs(i.clientWidth-t.clientWidth-a);n<=25&&(o-=n)}else d<=25&&(o+=d);return{width:o,height:n,x:r,y:l}}(e,s);else if("document"===t)i=function(e){const t=Vs(e),s=Ws(e),i=e.ownerDocument.body,a=Gt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Gt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let n=-s.scrollLeft+oi(e);const r=-s.scrollTop;return"rtl"===Ys(i).direction&&(n+=Gt(t.clientWidth,i.clientWidth)-a),{width:a,height:o,x:n,y:r}}(Vs(e));else if(Ps(t))i=function(e,t){const s=ai(e,!0,"fixed"===t),i=s.top+e.clientTop,a=s.left+e.clientLeft,o=As(e)?ti(e):Qt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:i*o.y}}(t,s);else{const s=ii(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ys(i)}function di(e,t){const s=Ks(e);return!(s===t||!Ps(s)||qs(s))&&("fixed"===Ys(s).position||di(s,t))}function ci(e,t,s){const i=As(t),a=Vs(t),o="fixed"===s,n=ai(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const l=Qt(0);function d(){l.x=oi(a)}if(i||!i&&!o)if(("body"!==Ms(t)||Ds(a))&&(r=Ws(t)),i){const e=ai(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&d();o&&!i&&a&&d();const c=!a||i||o?Qt(0):ni(a,r);return{x:n.left+r.scrollLeft-l.x-c.x,y:n.top+r.scrollTop-l.y-c.y,width:n.width,height:n.height}}function hi(e){return"static"===Ys(e).position}function pi(e,t){if(!As(e)||"fixed"===Ys(e).position)return null;if(t)return t(e);let s=e.offsetParent;return Vs(e)===s&&(s=s.ownerDocument.body),s}function ui(e,t){const s=Zs(e);if(Os(e))return s;if(!As(e)){let t=Ks(e);for(;t&&!qs(t);){if(Ps(t)&&!hi(t))return t;t=Ks(t)}return s}let i=pi(e,t);for(;i&&Hs(i)&&hi(i);)i=pi(i,t);return i&&qs(i)&&hi(i)&&!Ns(i)?s:i||function(e){let t=Ks(e);for(;As(t)&&!qs(t);){if(Ns(t))return t;if(Os(t))return null;t=Ks(t)}return null}(e)||s}const gi={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:s,offsetParent:i,strategy:a}=e;const o="fixed"===a,n=Vs(i),r=!!t&&Os(t.floating);if(i===n||r&&o)return s;let l={scrollLeft:0,scrollTop:0},d=Qt(1);const c=Qt(0),h=As(i);if((h||!h&&!o)&&(("body"!==Ms(i)||Ds(n))&&(l=Ws(i)),As(i))){const e=ai(i);d=ti(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}const p=!n||h||o?Qt(0):ni(n,l);return{width:s.width*d.x,height:s.height*d.y,x:s.x*d.x-l.scrollLeft*d.x+c.x+p.x,y:s.y*d.y-l.scrollTop*d.y+c.y+p.y}},getDocumentElement:Vs,getClippingRect:function(e){let{element:t,boundary:s,rootBoundary:i,strategy:a}=e;const o=[..."clippingAncestors"===s?Os(t)?[]:function(e,t){const s=t.get(e);if(s)return s;let i=Js(e,[],!1).filter(e=>Ps(e)&&"body"!==Ms(e)),a=null;const o="fixed"===Ys(e).position;let n=o?Ks(e):e;for(;Ps(n)&&!qs(n);){const t=Ys(n),s=Ns(n);s||"fixed"!==t.position||(a=null),(o?!s&&!a:!s&&"static"===t.position&&a&&ri.has(a.position)||Ds(n)&&!s&&di(e,n))?i=i.filter(e=>e!==n):a=t,n=Ks(n)}return t.set(e,i),i}(t,this._c):[].concat(s),i],n=o[0],r=o.reduce((e,s)=>{const i=li(t,s,a);return e.top=Gt(i.top,e.top),e.right=Kt(i.right,e.right),e.bottom=Kt(i.bottom,e.bottom),e.left=Gt(i.left,e.left),e},li(t,n,a));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:ui,getElementRects:async function(e){const t=this.getOffsetParent||ui,s=this.getDimensions,i=await s(e.floating);return{reference:ci(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:s}=Qs(e);return{width:t,height:s}},getScale:ti,isElement:Ps,isRTL:function(e){return"rtl"===Ys(e).direction}};function vi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mi(e,t,s,i){void 0===i&&(i={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,d=ei(e),c=a||o?[...d?Js(d):[],...Js(t)]:[];c.forEach(e=>{a&&e.addEventListener("scroll",s,{passive:!0}),o&&e.addEventListener("resize",s)});const h=d&&r?function(e,t){let s,i=null;const a=Vs(e);function o(){var e;clearTimeout(s),null==(e=i)||e.disconnect(),i=null}return function n(r,l){void 0===r&&(r=!1),void 0===l&&(l=1),o();const d=e.getBoundingClientRect(),{left:c,top:h,width:p,height:u}=d;if(r||t(),!p||!u)return;const g={rootMargin:-Xt(h)+"px "+-Xt(a.clientWidth-(c+p))+"px "+-Xt(a.clientHeight-(h+u))+"px "+-Xt(c)+"px",threshold:Gt(0,Kt(1,l))||1};let v=!0;function m(t){const i=t[0].intersectionRatio;if(i!==l){if(!v)return n();i?n(!1,i):s=setTimeout(()=>{n(!1,1e-7)},1e3)}1!==i||vi(d,e.getBoundingClientRect())||n(),v=!1}try{i=new IntersectionObserver(m,{...g,root:a.ownerDocument})}catch(e){i=new IntersectionObserver(m,g)}i.observe(e)}(!0),o}(d,s):null;let p,u=-1,g=null;n&&(g=new ResizeObserver(e=>{let[i]=e;i&&i.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),s()}),d&&!l&&g.observe(d),g.observe(t));let v=l?ai(e):null;return l&&function t(){const i=ai(e);v&&!vi(v,i)&&s();v=i,p=requestAnimationFrame(t)}(),s(),()=>{var e;c.forEach(e=>{a&&e.removeEventListener("scroll",s),o&&e.removeEventListener("resize",s)}),null==h||h(),null==(e=g)||e.disconnect(),g=null,l&&cancelAnimationFrame(p)}}const fi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var s,i;const{x:a,y:o,placement:n,middlewareData:r}=t,l=await async function(e,t){const{placement:s,platform:i,elements:a}=e,o=await(null==i.isRTL?void 0:i.isRTL(a.floating)),n=as(s),r=os(s),l="y"===ds(s),d=$s.has(n)?-1:1,c=o&&l?-1:1,h=is(t,e);let{mainAxis:p,crossAxis:u,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof g&&(u="end"===r?-1*g:g),l?{x:u*c,y:p*d}:{x:p*d,y:u*c}}(t,e);return n===(null==(s=r.offset)?void 0:s.placement)&&null!=(i=r.arrow)&&i.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:n}}}}},bi=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:s,y:i,placement:a}=t,{mainAxis:o=!0,crossAxis:n=!1,limiter:r={fn:e=>{let{x:t,y:s}=e;return{x:t,y:s}}},...l}=is(e,t),d={x:s,y:i},c=await xs(t,l),h=ds(as(a)),p=ns(h);let u=d[p],g=d[h];if(o){const e="y"===p?"bottom":"right";u=ss(u+c["y"===p?"top":"left"],u,u-c[e])}if(n){const e="y"===h?"bottom":"right";g=ss(g+c["y"===h?"top":"left"],g,g-c[e])}const v=r.fn({...t,[p]:u,[h]:g});return{...v,data:{x:v.x-s,y:v.y-i,enabled:{[p]:o,[h]:n}}}}}},wi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var s,i;const{placement:a,middlewareData:o,rects:n,initialPlacement:r,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...m}=is(e,t);if(null!=(s=o.arrow)&&s.alignmentOffset)return{};const f=as(a),b=ds(r),w=as(r)===r,y=await(null==l.isRTL?void 0:l.isRTL(d.floating)),_=p||(w||!v?[bs(r)]:function(e){const t=bs(e);return[ps(e),t,ps(t)]}(r)),x="none"!==g;!p&&x&&_.push(...fs(r,v,g,y));const k=[r,..._],C=await xs(t,m),$=[];let S=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&$.push(C[f]),h){const e=hs(a,n,y);$.push(C[e[0]],C[e[1]])}if(S=[...S,{placement:a,overflows:$}],!$.every(e=>e<=0)){var M,Z;const e=((null==(M=o.flip)?void 0:M.index)||0)+1,t=k[e];if(t){if(!("alignment"===h&&b!==ds(t))||S.every(e=>ds(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let s=null==(Z=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:Z.placement;if(!s)switch(u){case"bestFit":{var V;const e=null==(V=S.filter(e=>{if(x){const t=ds(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:V[0];e&&(s=e);break}case"initialPlacement":s=r}if(a!==s)return{reset:{placement:s}}}return{}}}},yi=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var s,i;const{placement:a,rects:o,platform:n,elements:r}=t,{apply:l=()=>{},...d}=is(e,t),c=await xs(t,d),h=as(a),p=os(a),u="y"===ds(a),{width:g,height:v}=o.floating;let m,f;"top"===h||"bottom"===h?(m=h,f=p===(await(null==n.isRTL?void 0:n.isRTL(r.floating))?"start":"end")?"left":"right"):(f=h,m="end"===p?"top":"bottom");const b=v-c.top-c.bottom,w=g-c.left-c.right,y=Kt(v-c[m],b),_=Kt(g-c[f],w),x=!t.middlewareData.shift;let k=y,C=_;if(null!=(s=t.middlewareData.shift)&&s.enabled.x&&(C=w),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(k=b),x&&!p){const e=Gt(c.left,0),t=Gt(c.right,0),s=Gt(c.top,0),i=Gt(c.bottom,0);u?C=g-2*(0!==e||0!==t?e+t:Gt(c.left,c.right)):k=v-2*(0!==s||0!==i?s+i:Gt(c.top,c.bottom))}await l({...t,availableWidth:C,availableHeight:k});const $=await n.getDimensions(r.floating);return g!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}},_i=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s}=t,{strategy:i="referenceHidden",...a}=is(e,t);switch(i){case"referenceHidden":{const e=ks(await xs(t,{...a,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Cs(e)}}}case"escaped":{const e=ks(await xs(t,{...a,altBoundary:!0}),s.floating);return{data:{escapedOffsets:e,escaped:Cs(e)}}}default:return{}}}}},xi=(e,t,s)=>{const i=new Map,a={platform:gi,...s},o={...a.platform,_c:i};return(async(e,t,s)=>{const{placement:i="bottom",strategy:a="absolute",middleware:o=[],platform:n}=s,r=o.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(t));let d=await n.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:h}=_s(d,i,l),p=i,u={},g=0;for(let s=0;s<r.length;s++){const{name:o,fn:v}=r[s],{x:m,y:f,data:b,reset:w}=await v({x:c,y:h,initialPlacement:i,placement:p,strategy:a,middlewareData:u,rects:d,platform:n,elements:{reference:e,floating:t}});c=null!=m?m:c,h=null!=f?f:h,u={...u,[o]:{...u[o],...b}},w&&g<=50&&(g++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(d=!0===w.rects?await n.getElementRects({reference:e,floating:t,strategy:a}):w.rects),({x:c,y:h}=_s(d,p,l))),s=-1)}return{x:c,y:h,placement:p,strategy:a,middlewareData:u}})(e,t,{...a,platform:o})};var ki=n`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-label-sm);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:var(--sgds-z-index-overlay)}div{max-width:fit-content}`;class Ci extends Be{constructor(){super(...arguments),this._myTooltip=jt(),this._tooltipBubble=jt(),this.content="",this.placement="top",this.trigger="hover focus",this.open=!1,this._handleClickOutOfElement=e=>{this.open&&(e.composedPath().includes(this)||this.hide())}}connectedCallback(){super.connectedCallback(),this.trigger.includes("click")&&document.addEventListener("click",this._handleClickOutOfElement)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this._tooltipTargetElements.forEach(e=>{e.setAttribute("data-sgds-tooltip",this.content),this.trigger.includes("hover")&&(e.addEventListener("mouseenter",()=>this.show()),e.addEventListener("mouseleave",()=>this.hide())),this.trigger.includes("focus")&&(e.addEventListener("focus",()=>this.show()),e.addEventListener("blur",()=>this.hide())),"click"===this.trigger&&e.addEventListener("click",()=>this.toggle())})}_handleSlotChange(){this._tooltipTargetElements.forEach(e=>e.setAttribute("data-sgds-tooltip",this.content))}async updateFloatingPosition(){if(!this._myTooltip.value||!this._tooltipBubble.value)return;const{x:e,y:t,placement:s,strategy:i,middlewareData:a}=await xi(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[fi(8),wi(),bi(),_i()]});this._tooltipBubble.value.setAttribute("data-placement",s),Object.assign(this._tooltipBubble.value.style,{position:i,left:`${e}px`,top:`${t}px`});const{referenceHidden:o,escaped:n}=a.hide||{};this._tooltipBubble.value.style.visibility=o||n?"hidden":"visible"}async show(){this.open||(this.open=!0,this.emit("sgds-show"),await this.updateComplete,await this.updateFloatingPosition(),this._myTooltip.value&&this._tooltipBubble.value&&(this._cleanupAutoUpdate=mi(this._tooltipTargetElements[0],this._tooltipBubble.value,()=>this.updateFloatingPosition())),this.emit("sgds-after-show"))}hide(){this.open&&(this.emit("sgds-hide"),this.open=!1,this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0),setTimeout(()=>this.emit("sgds-after-hide"),0))}toggle(){this.open?this.hide():this.show()}render(){return ee`
|
|
146
|
+
*/const jt=()=>new Ut;class Ut{}const qt=new WeakMap;const Yt=qe(class extends Nt{render(e){return ie}update(e,[t]){const s=t!==this._ref;return s&&void 0!==this._ref&&this._updateRefValue(void 0),(s||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),ie}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let s=qt.get(t);void 0===s&&(s=new WeakMap,qt.set(t,s)),void 0!==s.get(this._ref)&&this._ref.call(this._context,void 0),s.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?qt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),Wt=["top","right","bottom","left"],Kt=Math.min,Gt=Math.max,Jt=Math.round,Xt=Math.floor,Qt=e=>({x:e,y:e}),es={left:"right",right:"left",bottom:"top",top:"bottom"},ts={start:"end",end:"start"};function ss(e,t,s){return Gt(e,Kt(t,s))}function is(e,t){return"function"==typeof e?e(t):e}function as(e){return e.split("-")[0]}function os(e){return e.split("-")[1]}function ns(e){return"x"===e?"y":"x"}function rs(e){return"y"===e?"height":"width"}const ls=new Set(["top","bottom"]);function ds(e){return ls.has(as(e))?"y":"x"}function cs(e){return ns(ds(e))}function hs(e,t,s){void 0===s&&(s=!1);const i=os(e),a=cs(e),o=rs(a);let n="x"===a?i===(s?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(n=bs(n)),[n,bs(n)]}function ps(e){return e.replace(/start|end/g,e=>ts[e])}const us=["left","right"],gs=["right","left"],vs=["top","bottom"],ms=["bottom","top"];function fs(e,t,s,i){const a=os(e);let o=function(e,t,s){switch(e){case"top":case"bottom":return s?t?gs:us:t?us:gs;case"left":case"right":return t?vs:ms;default:return[]}}(as(e),"start"===s,i);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(ps)))),o}function bs(e){return e.replace(/left|right|bottom|top/g,e=>es[e])}function ws(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ys(e){const{x:t,y:s,width:i,height:a}=e;return{width:i,height:a,top:s,left:t,right:t+i,bottom:s+a,x:t,y:s}}function _s(e,t,s){let{reference:i,floating:a}=e;const o=ds(t),n=cs(t),r=rs(n),l=as(t),d="y"===o,c=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,p=i[r]/2-a[r]/2;let u;switch(l){case"top":u={x:c,y:i.y-a.height};break;case"bottom":u={x:c,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:h};break;case"left":u={x:i.x-a.width,y:h};break;default:u={x:i.x,y:i.y}}switch(os(t)){case"start":u[n]-=p*(s&&d?-1:1);break;case"end":u[n]+=p*(s&&d?-1:1)}return u}async function xs(e,t){var s;void 0===t&&(t={});const{x:i,y:a,platform:o,rects:n,elements:r,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:p=!1,padding:u=0}=is(t,e),g=ws(u),v=r[p?"floating"===h?"reference":"floating":h],m=ys(await o.getClippingRect({element:null==(s=await(null==o.isElement?void 0:o.isElement(v)))||s?v:v.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(r.floating)),boundary:d,rootBoundary:c,strategy:l})),f="floating"===h?{x:i,y:a,width:n.floating.width,height:n.floating.height}:n.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(r.floating)),w=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},y=ys(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:f,offsetParent:b,strategy:l}):f);return{top:(m.top-y.top+g.top)/w.y,bottom:(y.bottom-m.bottom+g.bottom)/w.y,left:(m.left-y.left+g.left)/w.x,right:(y.right-m.right+g.right)/w.x}}function ks(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cs(e){return Wt.some(t=>e[t]>=0)}const $s=new Set(["left","top"]);function Ss(){return"undefined"!=typeof window}function Ms(e){return zs(e)?(e.nodeName||"").toLowerCase():"#document"}function Zs(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Vs(e){var t;return null==(t=(zs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function zs(e){return!!Ss()&&(e instanceof Node||e instanceof Zs(e).Node)}function Ps(e){return!!Ss()&&(e instanceof Element||e instanceof Zs(e).Element)}function As(e){return!!Ss()&&(e instanceof HTMLElement||e instanceof Zs(e).HTMLElement)}function Ls(e){return!(!Ss()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Zs(e).ShadowRoot)}const Ds=new Set(["inline","contents"]);function Is(e){const{overflow:t,overflowX:s,overflowY:i,display:a}=Ys(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+s)&&!Ds.has(a)}const Es=new Set(["table","td","th"]);function Hs(e){return Es.has(Ms(e))}const Bs=[":popover-open",":modal"];function Os(e){return Bs.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Ts=["transform","translate","scale","rotate","perspective"],Fs=["transform","translate","scale","rotate","perspective","filter"],Rs=["paint","layout","strict","content"];function Ns(e){const t=js(),s=Ps(e)?Ys(e):e;return Ts.some(e=>!!s[e]&&"none"!==s[e])||!!s.containerType&&"normal"!==s.containerType||!t&&!!s.backdropFilter&&"none"!==s.backdropFilter||!t&&!!s.filter&&"none"!==s.filter||Fs.some(e=>(s.willChange||"").includes(e))||Rs.some(e=>(s.contain||"").includes(e))}function js(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Us=new Set(["html","body","#document"]);function qs(e){return Us.has(Ms(e))}function Ys(e){return Zs(e).getComputedStyle(e)}function Ws(e){return Ps(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ks(e){if("html"===Ms(e))return e;const t=e.assignedSlot||e.parentNode||Ls(e)&&e.host||Vs(e);return Ls(t)?t.host:t}function Gs(e){const t=Ks(e);return qs(t)?e.ownerDocument?e.ownerDocument.body:e.body:As(t)&&Is(t)?t:Gs(t)}function Js(e,t,s){var i;void 0===t&&(t=[]),void 0===s&&(s=!0);const a=Gs(e),o=a===(null==(i=e.ownerDocument)?void 0:i.body),n=Zs(a);if(o){const e=Xs(n);return t.concat(n,n.visualViewport||[],Is(a)?a:[],e&&s?Js(e):[])}return t.concat(a,Js(a,[],s))}function Xs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qs(e){const t=Ys(e);let s=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=As(e),o=a?e.offsetWidth:s,n=a?e.offsetHeight:i,r=Jt(s)!==o||Jt(i)!==n;return r&&(s=o,i=n),{width:s,height:i,$:r}}function ei(e){return Ps(e)?e:e.contextElement}function ti(e){const t=ei(e);if(!As(t))return Qt(1);const s=t.getBoundingClientRect(),{width:i,height:a,$:o}=Qs(t);let n=(o?Jt(s.width):s.width)/i,r=(o?Jt(s.height):s.height)/a;return n&&Number.isFinite(n)||(n=1),r&&Number.isFinite(r)||(r=1),{x:n,y:r}}const si=Qt(0);function ii(e){const t=Zs(e);return js()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:si}function ai(e,t,s,i){void 0===t&&(t=!1),void 0===s&&(s=!1);const a=e.getBoundingClientRect(),o=ei(e);let n=Qt(1);t&&(i?Ps(i)&&(n=ti(i)):n=ti(e));const r=function(e,t,s){return void 0===t&&(t=!1),!(!s||t&&s!==Zs(e))&&t}(o,s,i)?ii(o):Qt(0);let l=(a.left+r.x)/n.x,d=(a.top+r.y)/n.y,c=a.width/n.x,h=a.height/n.y;if(o){const e=Zs(o),t=i&&Ps(i)?Zs(i):i;let s=e,a=Xs(s);for(;a&&i&&t!==s;){const e=ti(a),t=a.getBoundingClientRect(),i=Ys(a),o=t.left+(a.clientLeft+parseFloat(i.paddingLeft))*e.x,n=t.top+(a.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,h*=e.y,l+=o,d+=n,s=Zs(a),a=Xs(s)}}return ys({width:c,height:h,x:l,y:d})}function oi(e,t){const s=Ws(e).scrollLeft;return t?t.left+s:ai(Vs(e)).left+s}function ni(e,t){const s=e.getBoundingClientRect();return{x:s.left+t.scrollLeft-oi(e,s),y:s.top+t.scrollTop}}const ri=new Set(["absolute","fixed"]);function li(e,t,s){let i;if("viewport"===t)i=function(e,t){const s=Zs(e),i=Vs(e),a=s.visualViewport;let o=i.clientWidth,n=i.clientHeight,r=0,l=0;if(a){o=a.width,n=a.height;const e=js();(!e||e&&"fixed"===t)&&(r=a.offsetLeft,l=a.offsetTop)}const d=oi(i);if(d<=0){const e=i.ownerDocument,t=e.body,s=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(s.marginLeft)+parseFloat(s.marginRight)||0,n=Math.abs(i.clientWidth-t.clientWidth-a);n<=25&&(o-=n)}else d<=25&&(o+=d);return{width:o,height:n,x:r,y:l}}(e,s);else if("document"===t)i=function(e){const t=Vs(e),s=Ws(e),i=e.ownerDocument.body,a=Gt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Gt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let n=-s.scrollLeft+oi(e);const r=-s.scrollTop;return"rtl"===Ys(i).direction&&(n+=Gt(t.clientWidth,i.clientWidth)-a),{width:a,height:o,x:n,y:r}}(Vs(e));else if(Ps(t))i=function(e,t){const s=ai(e,!0,"fixed"===t),i=s.top+e.clientTop,a=s.left+e.clientLeft,o=As(e)?ti(e):Qt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:i*o.y}}(t,s);else{const s=ii(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ys(i)}function di(e,t){const s=Ks(e);return!(s===t||!Ps(s)||qs(s))&&("fixed"===Ys(s).position||di(s,t))}function ci(e,t,s){const i=As(t),a=Vs(t),o="fixed"===s,n=ai(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const l=Qt(0);function d(){l.x=oi(a)}if(i||!i&&!o)if(("body"!==Ms(t)||Is(a))&&(r=Ws(t)),i){const e=ai(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&d();o&&!i&&a&&d();const c=!a||i||o?Qt(0):ni(a,r);return{x:n.left+r.scrollLeft-l.x-c.x,y:n.top+r.scrollTop-l.y-c.y,width:n.width,height:n.height}}function hi(e){return"static"===Ys(e).position}function pi(e,t){if(!As(e)||"fixed"===Ys(e).position)return null;if(t)return t(e);let s=e.offsetParent;return Vs(e)===s&&(s=s.ownerDocument.body),s}function ui(e,t){const s=Zs(e);if(Os(e))return s;if(!As(e)){let t=Ks(e);for(;t&&!qs(t);){if(Ps(t)&&!hi(t))return t;t=Ks(t)}return s}let i=pi(e,t);for(;i&&Hs(i)&&hi(i);)i=pi(i,t);return i&&qs(i)&&hi(i)&&!Ns(i)?s:i||function(e){let t=Ks(e);for(;As(t)&&!qs(t);){if(Ns(t))return t;if(Os(t))return null;t=Ks(t)}return null}(e)||s}const gi={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:s,offsetParent:i,strategy:a}=e;const o="fixed"===a,n=Vs(i),r=!!t&&Os(t.floating);if(i===n||r&&o)return s;let l={scrollLeft:0,scrollTop:0},d=Qt(1);const c=Qt(0),h=As(i);if((h||!h&&!o)&&(("body"!==Ms(i)||Is(n))&&(l=Ws(i)),As(i))){const e=ai(i);d=ti(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}const p=!n||h||o?Qt(0):ni(n,l);return{width:s.width*d.x,height:s.height*d.y,x:s.x*d.x-l.scrollLeft*d.x+c.x+p.x,y:s.y*d.y-l.scrollTop*d.y+c.y+p.y}},getDocumentElement:Vs,getClippingRect:function(e){let{element:t,boundary:s,rootBoundary:i,strategy:a}=e;const o=[..."clippingAncestors"===s?Os(t)?[]:function(e,t){const s=t.get(e);if(s)return s;let i=Js(e,[],!1).filter(e=>Ps(e)&&"body"!==Ms(e)),a=null;const o="fixed"===Ys(e).position;let n=o?Ks(e):e;for(;Ps(n)&&!qs(n);){const t=Ys(n),s=Ns(n);s||"fixed"!==t.position||(a=null),(o?!s&&!a:!s&&"static"===t.position&&a&&ri.has(a.position)||Is(n)&&!s&&di(e,n))?i=i.filter(e=>e!==n):a=t,n=Ks(n)}return t.set(e,i),i}(t,this._c):[].concat(s),i],n=o[0],r=o.reduce((e,s)=>{const i=li(t,s,a);return e.top=Gt(i.top,e.top),e.right=Kt(i.right,e.right),e.bottom=Kt(i.bottom,e.bottom),e.left=Gt(i.left,e.left),e},li(t,n,a));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:ui,getElementRects:async function(e){const t=this.getOffsetParent||ui,s=this.getDimensions,i=await s(e.floating);return{reference:ci(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:s}=Qs(e);return{width:t,height:s}},getScale:ti,isElement:Ps,isRTL:function(e){return"rtl"===Ys(e).direction}};function vi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mi(e,t,s,i){void 0===i&&(i={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,d=ei(e),c=a||o?[...d?Js(d):[],...Js(t)]:[];c.forEach(e=>{a&&e.addEventListener("scroll",s,{passive:!0}),o&&e.addEventListener("resize",s)});const h=d&&r?function(e,t){let s,i=null;const a=Vs(e);function o(){var e;clearTimeout(s),null==(e=i)||e.disconnect(),i=null}return function n(r,l){void 0===r&&(r=!1),void 0===l&&(l=1),o();const d=e.getBoundingClientRect(),{left:c,top:h,width:p,height:u}=d;if(r||t(),!p||!u)return;const g={rootMargin:-Xt(h)+"px "+-Xt(a.clientWidth-(c+p))+"px "+-Xt(a.clientHeight-(h+u))+"px "+-Xt(c)+"px",threshold:Gt(0,Kt(1,l))||1};let v=!0;function m(t){const i=t[0].intersectionRatio;if(i!==l){if(!v)return n();i?n(!1,i):s=setTimeout(()=>{n(!1,1e-7)},1e3)}1!==i||vi(d,e.getBoundingClientRect())||n(),v=!1}try{i=new IntersectionObserver(m,{...g,root:a.ownerDocument})}catch(e){i=new IntersectionObserver(m,g)}i.observe(e)}(!0),o}(d,s):null;let p,u=-1,g=null;n&&(g=new ResizeObserver(e=>{let[i]=e;i&&i.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),s()}),d&&!l&&g.observe(d),g.observe(t));let v=l?ai(e):null;return l&&function t(){const i=ai(e);v&&!vi(v,i)&&s();v=i,p=requestAnimationFrame(t)}(),s(),()=>{var e;c.forEach(e=>{a&&e.removeEventListener("scroll",s),o&&e.removeEventListener("resize",s)}),null==h||h(),null==(e=g)||e.disconnect(),g=null,l&&cancelAnimationFrame(p)}}const fi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var s,i;const{x:a,y:o,placement:n,middlewareData:r}=t,l=await async function(e,t){const{placement:s,platform:i,elements:a}=e,o=await(null==i.isRTL?void 0:i.isRTL(a.floating)),n=as(s),r=os(s),l="y"===ds(s),d=$s.has(n)?-1:1,c=o&&l?-1:1,h=is(t,e);let{mainAxis:p,crossAxis:u,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof g&&(u="end"===r?-1*g:g),l?{x:u*c,y:p*d}:{x:p*d,y:u*c}}(t,e);return n===(null==(s=r.offset)?void 0:s.placement)&&null!=(i=r.arrow)&&i.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:n}}}}},bi=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:s,y:i,placement:a}=t,{mainAxis:o=!0,crossAxis:n=!1,limiter:r={fn:e=>{let{x:t,y:s}=e;return{x:t,y:s}}},...l}=is(e,t),d={x:s,y:i},c=await xs(t,l),h=ds(as(a)),p=ns(h);let u=d[p],g=d[h];if(o){const e="y"===p?"bottom":"right";u=ss(u+c["y"===p?"top":"left"],u,u-c[e])}if(n){const e="y"===h?"bottom":"right";g=ss(g+c["y"===h?"top":"left"],g,g-c[e])}const v=r.fn({...t,[p]:u,[h]:g});return{...v,data:{x:v.x-s,y:v.y-i,enabled:{[p]:o,[h]:n}}}}}},wi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var s,i;const{placement:a,middlewareData:o,rects:n,initialPlacement:r,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...m}=is(e,t);if(null!=(s=o.arrow)&&s.alignmentOffset)return{};const f=as(a),b=ds(r),w=as(r)===r,y=await(null==l.isRTL?void 0:l.isRTL(d.floating)),_=p||(w||!v?[bs(r)]:function(e){const t=bs(e);return[ps(e),t,ps(t)]}(r)),x="none"!==g;!p&&x&&_.push(...fs(r,v,g,y));const k=[r,..._],C=await xs(t,m),$=[];let S=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&$.push(C[f]),h){const e=hs(a,n,y);$.push(C[e[0]],C[e[1]])}if(S=[...S,{placement:a,overflows:$}],!$.every(e=>e<=0)){var M,Z;const e=((null==(M=o.flip)?void 0:M.index)||0)+1,t=k[e];if(t){if(!("alignment"===h&&b!==ds(t))||S.every(e=>ds(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let s=null==(Z=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:Z.placement;if(!s)switch(u){case"bestFit":{var V;const e=null==(V=S.filter(e=>{if(x){const t=ds(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:V[0];e&&(s=e);break}case"initialPlacement":s=r}if(a!==s)return{reset:{placement:s}}}return{}}}},yi=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var s,i;const{placement:a,rects:o,platform:n,elements:r}=t,{apply:l=()=>{},...d}=is(e,t),c=await xs(t,d),h=as(a),p=os(a),u="y"===ds(a),{width:g,height:v}=o.floating;let m,f;"top"===h||"bottom"===h?(m=h,f=p===(await(null==n.isRTL?void 0:n.isRTL(r.floating))?"start":"end")?"left":"right"):(f=h,m="end"===p?"top":"bottom");const b=v-c.top-c.bottom,w=g-c.left-c.right,y=Kt(v-c[m],b),_=Kt(g-c[f],w),x=!t.middlewareData.shift;let k=y,C=_;if(null!=(s=t.middlewareData.shift)&&s.enabled.x&&(C=w),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(k=b),x&&!p){const e=Gt(c.left,0),t=Gt(c.right,0),s=Gt(c.top,0),i=Gt(c.bottom,0);u?C=g-2*(0!==e||0!==t?e+t:Gt(c.left,c.right)):k=v-2*(0!==s||0!==i?s+i:Gt(c.top,c.bottom))}await l({...t,availableWidth:C,availableHeight:k});const $=await n.getDimensions(r.floating);return g!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}},_i=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s}=t,{strategy:i="referenceHidden",...a}=is(e,t);switch(i){case"referenceHidden":{const e=ks(await xs(t,{...a,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Cs(e)}}}case"escaped":{const e=ks(await xs(t,{...a,altBoundary:!0}),s.floating);return{data:{escapedOffsets:e,escaped:Cs(e)}}}default:return{}}}}},xi=(e,t,s)=>{const i=new Map,a={platform:gi,...s},o={...a.platform,_c:i};return(async(e,t,s)=>{const{placement:i="bottom",strategy:a="absolute",middleware:o=[],platform:n}=s,r=o.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(t));let d=await n.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:h}=_s(d,i,l),p=i,u={},g=0;for(let s=0;s<r.length;s++){const{name:o,fn:v}=r[s],{x:m,y:f,data:b,reset:w}=await v({x:c,y:h,initialPlacement:i,placement:p,strategy:a,middlewareData:u,rects:d,platform:n,elements:{reference:e,floating:t}});c=null!=m?m:c,h=null!=f?f:h,u={...u,[o]:{...u[o],...b}},w&&g<=50&&(g++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(d=!0===w.rects?await n.getElementRects({reference:e,floating:t,strategy:a}):w.rects),({x:c,y:h}=_s(d,p,l))),s=-1)}return{x:c,y:h,placement:p,strategy:a,middlewareData:u}})(e,t,{...a,platform:o})};var ki=n`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-label-sm);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:var(--sgds-z-index-overlay)}div{max-width:fit-content}`;class Ci extends Be{constructor(){super(...arguments),this._myTooltip=jt(),this._tooltipBubble=jt(),this.content="",this.placement="top",this.trigger="hover focus",this.open=!1,this._handleClickOutOfElement=e=>{this.open&&(e.composedPath().includes(this)||this.hide())}}connectedCallback(){super.connectedCallback(),this.trigger.includes("click")&&document.addEventListener("click",this._handleClickOutOfElement)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this._tooltipTargetElements.forEach(e=>{e.setAttribute("data-sgds-tooltip",this.content),this.trigger.includes("hover")&&(e.addEventListener("mouseenter",()=>this.show()),e.addEventListener("mouseleave",()=>this.hide())),this.trigger.includes("focus")&&(e.addEventListener("focus",()=>this.show()),e.addEventListener("blur",()=>this.hide())),"click"===this.trigger&&e.addEventListener("click",()=>this.toggle())})}_handleSlotChange(){this._tooltipTargetElements.forEach(e=>e.setAttribute("data-sgds-tooltip",this.content))}async updateFloatingPosition(){if(!this._myTooltip.value||!this._tooltipBubble.value)return;const{x:e,y:t,placement:s,strategy:i,middlewareData:a}=await xi(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[fi(8),wi(),bi(),_i()]});this._tooltipBubble.value.setAttribute("data-placement",s),Object.assign(this._tooltipBubble.value.style,{position:i,left:`${e}px`,top:`${t}px`});const{referenceHidden:o,escaped:n}=a.hide||{};this._tooltipBubble.value.style.visibility=o||n?"hidden":"visible"}async show(){this.open||(this.open=!0,this.emit("sgds-show"),await this.updateComplete,await this.updateFloatingPosition(),this._myTooltip.value&&this._tooltipBubble.value&&(this._cleanupAutoUpdate=mi(this._tooltipTargetElements[0],this._tooltipBubble.value,()=>this.updateFloatingPosition())),this.emit("sgds-after-show"))}hide(){this.open&&(this.emit("sgds-hide"),this.open=!1,this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0),setTimeout(()=>this.emit("sgds-after-hide"),0))}toggle(){this.open?this.hide():this.show()}render(){return ee`
|
|
147
147
|
<div ${Yt(this._myTooltip)} class="tooltip-placeholder">
|
|
148
148
|
<slot @slotchange=${()=>this._handleSlotChange()}></slot>
|
|
149
149
|
${this.open?ee`<div ${Yt(this._tooltipBubble)} class="tooltip" role="tooltip">${this.content}</div>`:null}
|
|
150
150
|
</div>
|
|
151
|
-
`}}Ci.styles=[...Be.styles,ki],e([Ve({type:String})],Ci.prototype,"content",void 0),e([Ve({type:String})],Ci.prototype,"placement",void 0),e([Ve({type:String})],Ci.prototype,"trigger",void 0),e([ze()],Ci.prototype,"open",void 0),e([
|
|
151
|
+
`}}Ci.styles=[...Be.styles,ki],e([Ve({type:String})],Ci.prototype,"content",void 0),e([Ve({type:String})],Ci.prototype,"placement",void 0),e([Ve({type:String})],Ci.prototype,"trigger",void 0),e([ze()],Ci.prototype,"open",void 0),e([Ie()],Ci.prototype,"_tooltipTargetElements",void 0);class $i{constructor(e,...t){this.slotNames=[],(this.host=e).addController(this),this.slotNames=t,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some(e=>{var t;if(e.nodeType===e.TEXT_NODE&&""!==(null===(t=e.textContent)||void 0===t?void 0:t.trim()))return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if("sl-visually-hidden"===t.tagName.toLowerCase())return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){var e;null===(e=this.host.shadowRoot)||void 0===e||e.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){var e;null===(e=this.host.shadowRoot)||void 0===e||e.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(e){const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()}}class Si extends Be{constructor(){super(...arguments),this.show=!1,this.variant="primary",this.outlined=!1,this.dismissible=!1,this.fullWidth=!1,this.truncated=!1,this.text=""}close(){this.show=!1}_handleShowChange(){if(this.show){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.show=!1);this.emit("sgds-after-show")}else{if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.show=!0);this.emit("sgds-after-hide")}}_handleTruncation(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".badge-label");t&&(this.truncated=t.scrollWidth>t.clientWidth)}_handleLabelSlotChange(e){this.text=function(e){if(!e)return"";const t=e.assignedNodes({flatten:!0});let s="";return[...t].forEach(e=>{e.nodeType===Node.TEXT_NODE&&(s+=e.textContent.trim())}),s}(e.target)}_renderBadge(){const e=this.outlined||"warning"===this.variant||"white"===this.variant;return ee`<div
|
|
152
152
|
class="
|
|
153
153
|
${We({"badge-dismissible":this.dismissible,badge:!0,outlined:this.outlined,"full-width":this.fullWidth})}"
|
|
154
154
|
aria-hidden=${this.show?"false":"true"}
|
|
@@ -176,7 +176,7 @@ const ct=Symbol.for(""),ht=e=>{if(e?.r===ct)return e?._$litStatic$},pt=(e,...t)=
|
|
|
176
176
|
<slot id="default" @click=${this.handleSelectSlot}></slot>
|
|
177
177
|
</div>
|
|
178
178
|
</div>
|
|
179
|
-
`}}Li.styles=[...zi.styles,Ai,Pi],e([Ve({type:Boolean,reflect:!0,state:!1})],Li.prototype,"noFlip",void 0),e([Ve({type:Boolean,reflect:!0,state:!1})],Li.prototype,"menuAlignRight",void 0),e([Ve({type:String,reflect:!0,state:!1})],Li.prototype,"drop",void 0),e([Ve({type:String,reflect:!0,state:!1})],Li.prototype,"close",void 0),e([
|
|
179
|
+
`}}Li.styles=[...zi.styles,Ai,Pi],e([Ve({type:Boolean,reflect:!0,state:!1})],Li.prototype,"noFlip",void 0),e([Ve({type:Boolean,reflect:!0,state:!1})],Li.prototype,"menuAlignRight",void 0),e([Ve({type:String,reflect:!0,state:!1})],Li.prototype,"drop",void 0),e([Ve({type:String,reflect:!0,state:!1})],Li.prototype,"close",void 0),e([Ie({slot:"toggler",flatten:!0})],Li.prototype,"_toggler",void 0),e([ot("menuIsOpen")],Li.prototype,"_handleMenuIsOpenChange",null),e([ot("disabled",{waitUntilFirstUpdate:!0})],Li.prototype,"_handleDisabled",null);var Di=n`:host([disabled]){cursor:not-allowed}.dropdown-item{align-items:center;background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-sm);padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit}.dropdown-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus,.dropdown-item:focus-visible{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.dropdown-item.active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default);text-decoration:none}.dropdown-item.disabled,.dropdown-item:disabled{opacity:var(--sgds-opacity-40);pointer-events:none}::slotted(*){color:inherit!important;display:flex;gap:var(--sgds-gap-sm);text-decoration:none!important}::slotted(a),::slotted(sgds-checkbox){flex:1;margin:calc(var(--sgds-padding-sm)*-1) calc(var(--sgds-padding-lg)*-1);padding:var(--sgds-padding-sm) var(--sgds-padding-lg)}.dropdown-item.mainnav-dropdown-link{padding:var(--sgds-padding-none)}.dropdown-item.mainnav-dropdown-link ::slotted(*){box-sizing:border-box;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}@media screen and (min-width:1024px){.dropdown-item.mainnav-dropdown-link ::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`;class Ii extends Be{constructor(){super(...arguments),this.active=!1,this.disabled=!1,this.ariaLabel=""}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",e=>{"Enter"===e.key&&this.anchor.length>0&&this.anchor[0].click()}),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`)}render(){return ee`
|
|
180
180
|
<div
|
|
181
181
|
class="dropdown-item ${We({disabled:this.disabled,active:this.active})}"
|
|
182
182
|
tabindex=${this.disabled?"-1":"0"}
|
|
@@ -184,14 +184,14 @@ const ct=Symbol.for(""),ht=e=>{if(e?.r===ct)return e?._$litStatic$},pt=(e,...t)=
|
|
|
184
184
|
>
|
|
185
185
|
<slot></slot>
|
|
186
186
|
</div>
|
|
187
|
-
`}}
|
|
187
|
+
`}}Ii.styles=[Ai,Di],Ii.dependencies={"sgds-icon":_t},e([Ie({flatten:!0})],Ii.prototype,"anchor",void 0),e([Ve({type:Boolean})],Ii.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],Ii.prototype,"disabled",void 0),e([Ve({type:String})],Ii.prototype,"ariaLabel",void 0);class Ei extends Be{constructor(){super(...arguments),this.size="md"}render(){return ee`
|
|
188
188
|
<sgds-dropdown>
|
|
189
189
|
<button slot="toggler" class="overflow-btn" aria-label="More options">
|
|
190
190
|
<sgds-icon name="three-dots" size=${this.size}></sgds-icon>
|
|
191
191
|
</button>
|
|
192
192
|
<slot></slot>
|
|
193
193
|
</sgds-dropdown>
|
|
194
|
-
`}}Ei.styles=[...Be.styles,Mi],Ei.dependencies={"sgds-dropdown":Li,"sgds-dropdown-item":
|
|
194
|
+
`}}Ei.styles=[...Be.styles,Mi],Ei.dependencies={"sgds-dropdown":Li,"sgds-dropdown-item":Ii,"sgds-icon":_t},e([Ve({type:String,reflect:!0})],Ei.prototype,"size",void 0);var Hi=n`.breadcrumb{display:flex;gap:var(--sgds-gap-xs)}.breadcrumb sgds-breadcrumb-item:first-child,.breadcrumb slot::slotted(sgds-breadcrumb-item:first-child){flex:0 0 auto}`;class Bi extends Be{constructor(){super(...arguments),this.ariaLabel="breadcrumb"}_replaceExcessItemsWithDropdown(e){const t=document.createElement("sgds-breadcrumb-item"),s=document.createElement("sgds-overflow-menu");s.setAttribute("aria-haspopup","menu"),s.setAttribute("size","sm");const i=e.filter((t,i)=>{if(i>0&&i<e.length-2){const e=t.querySelector("a").cloneNode(!0),i=document.createElement("sgds-dropdown-item");return i.appendChild(e),void s.appendChild(i)}return t});t.classList.add("overflow-menu"),t.appendChild(s),i.splice(1,0,t),this.defaultSlot.replaceWith(...i)}_handleSlotChange(e){const t=e.target.assignedElements({flatten:!0}).filter(e=>"sgds-breadcrumb-item"===e.tagName.toLowerCase());t.forEach((e,s)=>{s===t.length-1?(e.setAttribute("aria-current","page"),e.active=!0):e.removeAttribute("aria-current")}),t.length>=5&&this._replaceExcessItemsWithDropdown(t)}render(){return gt`
|
|
195
195
|
<div aria-label=${Ke(this.ariaLabel)}>
|
|
196
196
|
<div class="breadcrumb">
|
|
197
197
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
@@ -259,13 +259,13 @@ const ct=Symbol.for(""),ht=e=>{if(e?.r===ct)return e?._$litStatic$},pt=(e,...t)=
|
|
|
259
259
|
</slot>
|
|
260
260
|
</div>
|
|
261
261
|
</${e}>
|
|
262
|
-
`}}sa.styles=[...ea.styles,ta],e([
|
|
262
|
+
`}}sa.styles=[...ea.styles,ta],e([Ie({slot:"footer"})],sa.prototype,"footerNode",void 0),e([Ie({slot:"link"})],sa.prototype,"linkNode",void 0),e([Ve({type:String,reflect:!0})],sa.prototype,"imagePosition",void 0),e([Ve({type:String,reflect:!0})],sa.prototype,"imageAdjustment",void 0),e([Ve({type:Boolean})],sa.prototype,"hasImageSlot",void 0),e([Ve({type:Boolean})],sa.prototype,"hasIconSlot",void 0),e([Ve({type:Boolean})],sa.prototype,"hasUpperSlot",void 0),e([Ve({type:Boolean,reflect:!0})],sa.prototype,"noPadding",void 0),lt("sgds-card",sa);const ia=qe(
|
|
263
263
|
/**
|
|
264
264
|
* @license
|
|
265
265
|
* Copyright 2020 Google LLC
|
|
266
266
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
267
267
|
*/
|
|
268
|
-
class extends Ye{constructor(e){if(super(e),e.type!==je&&e.type!==Re&&e.type!==Ue)throw new Error("The `live` directive is not allowed on child or event bindings");if(!zt(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===se||t===ie)return t;const s=e.element,i=e.name;if(e.type===je){if(t===s[i])return se}else if(e.type===Ue){if(!!t===s.hasAttribute(i))return se}else if(e.type===Re&&s.getAttribute(i)===String(t))return se;return
|
|
268
|
+
class extends Ye{constructor(e){if(super(e),e.type!==je&&e.type!==Re&&e.type!==Ue)throw new Error("The `live` directive is not allowed on child or event bindings");if(!zt(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===se||t===ie)return t;const s=e.element,i=e.name;if(e.type===je){if(t===s[i])return se}else if(e.type===Ue){if(!!t===s.hasAttribute(i))return se}else if(e.type===Re&&s.getAttribute(i)===String(t))return se;return It(e),t}});var aa=n`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,oa=n`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs)}.form-text.disabled{opacity:var(--sgds-opacity-40)}`,na=n`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.m-width-160{min-width:var(--sgds-dimension-160)}.m-width-256{min-width:var(--sgds-dimension-256)}.form-label{color:var(--sgds-form-color-default);font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-xl);height:var(--sgds-dimension-48);justify-content:center;overflow:hidden;padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-label-md);line-height:var(--sgds-line-height-xs);min-width:0;outline:none;padding:0;width:100%}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-40)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;const ra=(e="value")=>(t,s)=>{const i=t.constructor,a=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(t,o,n){var r;const l=i.getPropertyOptions(e);if(t===("string"==typeof l.attribute?l.attribute:e).toLowerCase()){const t=l.converter||_,i=("function"==typeof t?t:null!==(r=null==t?void 0:t.fromAttribute)&&void 0!==r?r:_.fromAttribute)(n,l.type);this[e]!==i&&(this[s]=i)}a.call(this,t,o,n)}};class la{constructor(e,t){(this.host=e).addController(this),this._internals=e._internals||this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",e=>this.handleInvalid(e))}hostDisconnected(){this.host.removeEventListener("invalid",e=>this.handleInvalid(e))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(e,t,s){return this._internals.setValidity(e,t,s)}setFormValue(){const e=this.options.value(this.host);this._internals.setFormValue(e)}validateInput(e){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const t=e.validity;if(t.valid)this._internals.setValidity({});else for(const s in t)t[s]&&(this.validationError=s.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const da=t=>{class s extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new la(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this._isTouched&&(this._isTouched=!1),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinValidate(e){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinSetFormValue(){const e=this.value;this._internals.setFormValue(e)}_mixinCheckValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.checkValidity()}_mixinReportValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.reportValidity()}_mixinGetValidity(){return this._internals.validity}_mixinGetValidationMessage(){return this._internals.validationMessage}_mixinSetValidity(e,t,s){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,s)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return s.formAssociated=!0,e([De("sgds-input")],s.prototype,"sgdsInput",void 0),e([De("sgds-datepicker-input")],s.prototype,"sgdsDatepickerInput",void 0),s};var ca=n`.empty-menu,.loading-menu{padding:var(--sgds-padding-sm) var(--sgds-padding-lg,20px);pointer-events:none}.loading-menu{align-items:center;display:flex;gap:var(--sgds-gap-xs)}`;class ha extends(da(zi)){setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.loading=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.autocomplete="on",this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Zi("input"),this._labelId=Zi("label"),this.floatingOpts={middleware:[yi({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",async e=>{var t;if(this._mixinShouldSkipSgdsValidation())return;const s=this.constructor.childName,i=(null===(t=e.relatedTarget)||void 0===t?void 0:t.tagName.toLowerCase())===s;this.invalid=!i&&!this._mixinReportValidity()})}reportValidity(){return this._mixinReportValidity()}setValidity(e,t,s){return this._mixinSetValidity(e,t,s)}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?ee` <div class="invalid-feedback-container">
|
|
269
269
|
<slot name="invalidIcon">
|
|
270
270
|
<sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
|
|
271
271
|
</slot>
|
|
@@ -279,7 +279,7 @@ class extends Ye{constructor(e){if(super(e),e.type!==je&&e.type!==Re&&e.type!==U
|
|
|
279
279
|
class=${We({"form-label":!0,required:this.required})}
|
|
280
280
|
>${this.label}</label
|
|
281
281
|
>
|
|
282
|
-
`;return this.label&&e}_handleClick(){if(this.readonly)return null;this.menuIsOpen?this.hideMenu():this.showMenu()}async _getMenuListFromOptions(e){const t=e.map(async e=>(await e.updateComplete,e)),s=await Promise.all(t);return null==s?void 0:s.map(e=>{var t;return{label:e.innerText,value:e.getAttribute("value"),disabled:null!==(t=e.disabled)&&void 0!==t?t:void 0}})}_renderEmptyMenu(){return ee` <div class="empty-menu">No options</div> `}_renderLoadingMenu(){return ee`<div class="loading-menu"><sgds-spinner size="xs" tone="brand"></sgds-spinner>Loading...</div>`}}ha.styles=[...zi.styles,Pi,oa,aa,na,ca],e([Ve({reflect:!0})],ha.prototype,"label",void 0),e([Ve({reflect:!0})],ha.prototype,"hintText",void 0),e([Ve({reflect:!0})],ha.prototype,"name",void 0),e([Ve({type:String,reflect:!0})],ha.prototype,"placeholder",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"autofocus",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"loading",void 0),e([Ve({type:String,reflect:!0})],ha.prototype,"value",void 0),e([ze()],ha.prototype,"displayValue",void 0),e([ra()],ha.prototype,"defaultValue",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"hasFeedback",void 0),e([Ve({type:String,reflect:!0})],ha.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"invalid",void 0),e([Ve({type:String,reflect:!0})],ha.prototype,"autocomplete",void 0),e([Ve({type:Array})],ha.prototype,"menuList",void 0),e([ze()],ha.prototype,"selectedItems",void 0),e([ze()],ha.prototype,"filteredList",void 0),e([
|
|
282
|
+
`;return this.label&&e}_handleClick(){if(this.readonly)return null;this.menuIsOpen?this.hideMenu():this.showMenu()}async _getMenuListFromOptions(e){const t=e.map(async e=>(await e.updateComplete,e)),s=await Promise.all(t);return null==s?void 0:s.map(e=>{var t;return{label:e.innerText,value:e.getAttribute("value"),disabled:null!==(t=e.disabled)&&void 0!==t?t:void 0}})}_renderEmptyMenu(){return ee` <div class="empty-menu">No options</div> `}_renderLoadingMenu(){return ee`<div class="loading-menu"><sgds-spinner size="xs" tone="brand"></sgds-spinner>Loading...</div>`}}ha.styles=[...zi.styles,Pi,oa,aa,na,ca],e([Ve({reflect:!0})],ha.prototype,"label",void 0),e([Ve({reflect:!0})],ha.prototype,"hintText",void 0),e([Ve({reflect:!0})],ha.prototype,"name",void 0),e([Ve({type:String,reflect:!0})],ha.prototype,"placeholder",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"autofocus",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"loading",void 0),e([Ve({type:String,reflect:!0})],ha.prototype,"value",void 0),e([ze()],ha.prototype,"displayValue",void 0),e([ra()],ha.prototype,"defaultValue",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"hasFeedback",void 0),e([Ve({type:String,reflect:!0})],ha.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],ha.prototype,"invalid",void 0),e([Ve({type:String,reflect:!0})],ha.prototype,"autocomplete",void 0),e([Ve({type:Array})],ha.prototype,"menuList",void 0),e([ze()],ha.prototype,"selectedItems",void 0),e([ze()],ha.prototype,"filteredList",void 0),e([De("input.form-control")],ha.prototype,"_input",void 0);var pa=n`:host{display:block;position:relative}.dropdown{display:flex;height:100%}.dropdown-menu{box-sizing:border-box;max-height:10rem;overflow-x:hidden;overflow-y:auto}.visually-hidden{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.combobox .form-control-group{height:unset;min-height:var(--sgds-dimension-48)}.combobox-input-container{align-items:center;display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);padding:calc(var(--sgds-form-padding-y) - var(--sgds-form-border-width-default)) 0;width:calc(100% - var(--sgds-icon-size-md, 1.25rem))}.combobox-input-container .form-control{flex:1 1 0;min-width:10ch}slot[id=default].d-none,slot[id=default].d-none::slotted(*){display:none}.form-clearable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`,ua=n`:host([active]) .dropdown-item{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item{background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-form-color-default);cursor:pointer;font-size:var(--sgds-font-size-label-md);height:100%;overflow-wrap:anywhere;padding:var(--sgds-padding-sm) var(--sgds-padding-md);text-align:inherit;white-space:normal}.dropdown-item.disabled{opacity:var(--sgds-opacity-40);pointer-events:none}.dropdown-item .normal-item-content{align-items:center;display:flex;justify-content:space-between}:host([active]) .dropdown-item .normal-item-content{color:var(--sgds-form-primary-color-default)}.dropdown-item:hover{background:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{background:var(--sgds-bg-translucent-subtle);outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}`;class ga extends Be{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`),this._updateAriaLabel()}_updateAriaLabel(){var e;const t=null===(e=this.textContent)||void 0===e?void 0:e.trim();t&&this.setAttribute("aria-label",t)}render(){const e={disabled:this.disabled,active:this.active};return ee`
|
|
283
283
|
<div class="dropdown-item ${We(e)}" tabindex=${this.disabled?"-1":"0"}>
|
|
284
284
|
${this._renderItemContent()}
|
|
285
285
|
</div>
|
|
@@ -331,7 +331,7 @@ class extends Ye{constructor(e){if(super(e),e.type!==je&&e.type!==Re&&e.type!==U
|
|
|
331
331
|
* Copyright 2017 Google LLC
|
|
332
332
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
333
333
|
*/
|
|
334
|
-
const xa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};const ka=qe(class extends Ye{constructor(e){if(super(e),e.type!==Ne)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,t,s){let i;void 0===s?s=t:void 0!==t&&(i=t);const a=[],o=[];let n=0;for(const t of e)a[n]=i?i(t,n):n,o[n]=s(t,n),n++;return{values:o,keys:a}}render(e,t,s){return this._getValuesAndKeys(e,t,s).values}update(e,[t,s,i]){const a=e._$committedValue;const{values:o,keys:n}=this._getValuesAndKeys(t,s,i);if(!Array.isArray(a))return this._itemKeys=n,o;const r=this._itemKeys??=[],l=[];let d,c,h=0,p=a.length-1,u=0,g=o.length-1;for(;h<=p&&u<=g;)if(null===a[h])h++;else if(null===a[p])p--;else if(r[h]===n[u])l[u]=Lt(a[h],o[u]),h++,u++;else if(r[p]===n[g])l[g]=Lt(a[p],o[g]),p--,g--;else if(r[h]===n[g])l[g]=Lt(a[h],o[g]),At(e,l[g+1],a[h]),h++,g--;else if(r[p]===n[u])l[u]=Lt(a[p],o[u]),At(e,a[h],a[p]),p--,u++;else if(void 0===d&&(d=xa(n,u,g),c=xa(r,h,p)),d.has(r[h]))if(d.has(r[p])){const t=c.get(n[u]),s=void 0!==t?a[t]:null;if(null===s){const t=At(e,a[h]);Lt(t,o[u]),l[u]=t}else l[u]=Lt(s,o[u]),At(e,a[h],s),a[t]=null;u++}else Et(a[p]),p--;else Et(a[h]),h++;for(;u<=g;){const t=At(e,l[g+1]);Lt(t,o[u]),l[u++]=t}for(;h<=p;){const e=a[h++];null!==e&&Et(e)}return this._itemKeys=n,
|
|
334
|
+
const xa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};const ka=qe(class extends Ye{constructor(e){if(super(e),e.type!==Ne)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,t,s){let i;void 0===s?s=t:void 0!==t&&(i=t);const a=[],o=[];let n=0;for(const t of e)a[n]=i?i(t,n):n,o[n]=s(t,n),n++;return{values:o,keys:a}}render(e,t,s){return this._getValuesAndKeys(e,t,s).values}update(e,[t,s,i]){const a=e._$committedValue;const{values:o,keys:n}=this._getValuesAndKeys(t,s,i);if(!Array.isArray(a))return this._itemKeys=n,o;const r=this._itemKeys??=[],l=[];let d,c,h=0,p=a.length-1,u=0,g=o.length-1;for(;h<=p&&u<=g;)if(null===a[h])h++;else if(null===a[p])p--;else if(r[h]===n[u])l[u]=Lt(a[h],o[u]),h++,u++;else if(r[p]===n[g])l[g]=Lt(a[p],o[g]),p--,g--;else if(r[h]===n[g])l[g]=Lt(a[h],o[g]),At(e,l[g+1],a[h]),h++,g--;else if(r[p]===n[u])l[u]=Lt(a[p],o[u]),At(e,a[h],a[p]),p--,u++;else if(void 0===d&&(d=xa(n,u,g),c=xa(r,h,p)),d.has(r[h]))if(d.has(r[p])){const t=c.get(n[u]),s=void 0!==t?a[t]:null;if(null===s){const t=At(e,a[h]);Lt(t,o[u]),l[u]=t}else l[u]=Lt(s,o[u]),At(e,a[h],s),a[t]=null;u++}else Et(a[p]),p--;else Et(a[h]),h++;for(;u<=g;){const t=At(e,l[g+1]);Lt(t,o[u]),l[u++]=t}for(;h<=p;){const e=a[h++];null!==e&&Et(e)}return this._itemKeys=n,It(e,l),se}});var Ca=n`:host{--sgds-spinner-bg:var(--sgds-primary-surface-default);display:inline-flex}:host([variant=neutral]){--sgds-spinner-bg:var(--sgds-neutral-surface-default)}:host([tone=neutral]){--sgds-spinner-bg:var(--sgds-surface-inverse)}:host([tone=inverse]){--sgds-spinner-bg:var(--sgds-surface-default)}:host([tone=fixed-light]){--sgds-spinner-bg:var(--sgds-surface-fixed-light)}:host([tone=fixed-dark]){--sgds-spinner-bg:var(--sgds-surface-fixed-dark)}.spinner-wrapper{align-items:center;display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.spinner-wrapper.horizontal{flex-direction:row}.spinner{--border-thickness:4px;animation:spinner .75s linear infinite;border:var(--border-thickness) solid var(--sgds-bg-translucent);border-radius:50%;border-right:var(--border-thickness) solid var(--sgds-spinner-bg);color:var(--sgds-spinner-color);display:inline-flex;height:var(--sgds-dimension-32);width:var(--sgds-dimension-32)}.spinner-xs{--border-thickness:2px;height:var(--sgds-dimension-16);width:var(--sgds-dimension-16)}.spinner-sm{--border-thickness:3px;height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.spinner-lg{--border-thickness:6px;height:var(--sgds-dimension-48);width:var(--sgds-dimension-48)}.spinner-xl{--border-thickness:8px;height:var(--sgds-dimension-64);width:var(--sgds-dimension-64)}.spinner-label{color:var(--sgds-neutral-color-default);font-size:var(--sgds-font-size-label-sm)}
|
|
335
335
|
|
|
336
336
|
|
|
337
337
|
/*! CSS Used keyframes */@keyframes spinner{to{transform:rotate(1turn)}}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;class $a extends Be{constructor(){super(...arguments),this.variant="primary",this.tone="brand",this.size="md",this.orientation="vertical"}render(){return gt`
|
|
@@ -440,7 +440,7 @@ const xa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
440
440
|
aria-hidden="true"
|
|
441
441
|
.autocomplete=${this.autocomplete}
|
|
442
442
|
/>`:ie}
|
|
443
|
-
`}}Sa.styles=[...ha.styles,na,pa],Sa.childName="sgds-combo-box-option",Sa.dependencies={[Sa.childName]:_a,"sgds-icon":_t,"sgds-badge":Si,"sgds-spinner":$a},e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"multiSelect",void 0),e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"badgeFullWidth",void 0),e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"clearable",void 0),e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"noValidate",void 0),e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"async",void 0),e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"emptyMenuAsync",void 0),e([Ve({type:Number,reflect:!0})],Sa.prototype,"scrollBottomOffset",void 0),e([Ve()],Sa.prototype,"filterFunction",void 0),e([
|
|
443
|
+
`}}Sa.styles=[...ha.styles,na,pa],Sa.childName="sgds-combo-box-option",Sa.dependencies={[Sa.childName]:_a,"sgds-icon":_t,"sgds-badge":Si,"sgds-spinner":$a},e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"multiSelect",void 0),e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"badgeFullWidth",void 0),e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"clearable",void 0),e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"noValidate",void 0),e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"async",void 0),e([Ve({type:Boolean,reflect:!0})],Sa.prototype,"emptyMenuAsync",void 0),e([Ve({type:Number,reflect:!0})],Sa.prototype,"scrollBottomOffset",void 0),e([Ve()],Sa.prototype,"filterFunction",void 0),e([De("input#multi-select-input-tracker")],Sa.prototype,"_multiSelectInput",void 0),e([Ie({flatten:!0,selector:"sgds-combo-box-option"})],Sa.prototype,"options",void 0),e([ze()],Sa.prototype,"optionList",void 0),e([ze()],Sa.prototype,"emptyMenuAfterFiltering",void 0),e([ze()],Sa.prototype,"isFocused",void 0),e([ze()],Sa.prototype,"isScrollEnd",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],Sa.prototype,"_handleValueChange",null),e([ot("optionList",{waitUntilFirstUpdate:!0})],Sa.prototype,"_handleOptionListChange",null),e([ot("menuList",{waitUntilFirstUpdate:!0})],Sa.prototype,"_handleMenuListChange",null),lt("sgds-combo-box",Sa),lt("sgds-combo-box-option",_a);var Ma=n`:host{--sgds-checkbox-group-gap:var(--sgds-spacer-2)}fieldset{border:0;gap:var(--sgds-form-gap-md);margin:0;min-width:0;padding:0}.label-hint-container,fieldset{display:flex;flex-direction:column}.label-hint-container{gap:var(--sgds-form-gap-sm)}.label-hint-container .form-label{color:var(--sgds-form-color-default);font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold)}.checkbox-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md);padding:var(--sgds-form-padding-inline-sm) 0}.checkbox-group-validation-input{display:none}:host([disabled]) .label-hint-container{cursor:not-allowed;opacity:var(--sgds-opacity-40)}`;class Za extends(da(fa)){constructor(){super(...arguments),this.label="",this.invalidFeedback="Please tick at least one box if you want to proceed",this.hasFeedback=!1,this.hintText="",this.required=!1,this.noValidate=!1,this.value="",this._isTouched=!1,this.defaultValue="",this._blurredCheckboxes=new Set}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-check",e=>{const{value:t}=e.detail;!this.value.includes(t)&&this._addValue(t)}),this.addEventListener("sgds-uncheck",e=>{const{value:t}=e.detail;this._removeValue(t)}),this.addEventListener("sgds-blur",e=>{const t=e.target;this._blurredCheckboxes.add(t),Array.from(this._blurredCheckboxes).length===this._checkboxes.length&&(this._isTouched=!0,this._blurredCheckboxes.clear())})}firstUpdated(e){super.firstUpdated(e),this.value&&this._updateInputValue(),this.invalid&&this._updateInvalid()}_renderHintText(){const e=ee` <div class="form-text" id="${this._controlId}Help">${this.hintText}</div> `;return this.hintText&&e}_addValue(e){const t=this.value?this.value.split(";"):[];t.push(e),this.value=t.join(";"),this._updateInputValue(),this.emit("sgds-change",{detail:{value:this.value}})}_removeValue(e){const t=(this.value?this.value.split(";"):[]).filter(t=>t!==e);this.value=t.join(";"),this._updateInputValue(),this.emit("sgds-change",{detail:{value:this.value}})}_sanitizeSlot(){this._checkboxes.forEach(e=>{e.checked=e.defaultChecked=this.value.includes(e.value),e.hasFeedback=this.hasFeedback?"style":null,e.required&&(console.error("Checkboxes in a group cannot have required or hasFeedback prop set to true"),e.remove())}),this._disabledChildCheckboxes()}_disabledChildCheckboxes(){if(this.disabled){this._checkboxes.forEach(e=>e.disabled=this.disabled)}}_handleValueChange(){this._checkboxes.forEach(e=>{e.checked=this.value.includes(e.value)}),this._updateInputValue(),this._updateInvalid()}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&(this.invalid=!this.input.checkValidity(),this._updateInvalid())}_updateInvalid(){this._checkboxes.forEach(e=>e.invalid=this.invalid)}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_mixinResetFormControl(){this.value=this.input.value=this.defaultValue,this._updateInputValue("reset"),this._mixinResetValidity(this.input)}async _updateInputValue(e="change"){this.input.value=this.value,this.input.dispatchEvent(new InputEvent(e))}render(){return ee`
|
|
444
444
|
<fieldset>
|
|
445
445
|
<div class="label-hint-container">
|
|
446
446
|
<label class="form-label">${this.label}</label>
|
|
@@ -469,7 +469,7 @@ const xa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
469
469
|
</div>
|
|
470
470
|
`:ie}
|
|
471
471
|
</fieldset>
|
|
472
|
-
`}}function Va(e,t){const s=e.getDate(),i=e.getMonth()+1,a=e.getFullYear(),o=s<10?"0"+s:String(s),n=i<10?"0"+i:String(i),r=String(a);switch(t){case"dd/MM/yyyy":default:return`${o}/${n}/${r}`;case"MM/dd/yyyy":return`${n}/${o}/${r}`;case"yyyy/MM/dd":return`${r}/${n}/${o}`;case"PPPP":{const t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),s=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),i=function(e){if(e>=11&&e<=13)return e+"th";switch(e%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd";default:return e+"th"}}(e.getDate());return`${t}, ${s} ${i}, ${e.getFullYear()}`}}}function za(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function Pa(e,t){return e.getTime()>t.getTime()}function Aa(e,t){return e.getTime()<t.getTime()}function La(e,t){return e.getTime()===t.getTime()}function Ia(e){return e.getDate()===za(e)}function Da(e){return e instanceof Date&&!isNaN(e.getTime())}function Ea(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function Ha(e,t){const s=e.split("/");let i,a,o;switch(t){case"dd/MM/yyyy":i=parseInt(s[0],10),a=parseInt(s[1],10)-1,o=parseInt(s[2],10);break;case"MM/dd/yyyy":a=parseInt(s[0],10)-1,i=parseInt(s[1],10),o=parseInt(s[2],10);break;case"yyyy/MM/dd":o=parseInt(s[0],10),a=parseInt(s[1],10)-1,i=parseInt(s[2],10);break;default:return new Date(NaN)}if(isNaN(i)||isNaN(a)||isNaN(o))return new Date(NaN);const n=new Date(o,a,i,12,0,0,0);return n.getFullYear()!==o||n.getMonth()!==a||n.getDate()!==i?new Date(NaN):n}Za.styles=[...fa.styles,Ma],Za.dependencies={"sgds-icon":_t},e([Ve({reflect:!0})],Za.prototype,"label",void 0),e([Ve({type:String,reflect:!0})],Za.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],Za.prototype,"hasFeedback",void 0),e([Ve({reflect:!0})],Za.prototype,"hintText",void 0),e([Ve({type:Boolean,reflect:!0})],Za.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],Za.prototype,"noValidate",void 0),e([Ve({reflect:!0})],Za.prototype,"value",void 0),e([ze()],Za.prototype,"_isTouched",void 0),e([ra()],Za.prototype,"defaultValue",void 0),e([ze()],Za.prototype,"_blurredCheckboxes",void 0),e([De()],Za.prototype,"_checkboxes",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],Za.prototype,"_handleValueChange",null),e([ot("_isTouched",{waitUntilFirstUpdate:!0})],Za.prototype,"_handleIsTouched",null),e([ot("invalid",{waitUntilFirstUpdate:!0})],Za.prototype,"_updateInvalid",null),lt("sgds-checkbox",ya),lt("sgds-checkbox-group",Za),lt("sgds-close-button",ft);const Ba={"DD/MM/YYYY":{imPattern:"`dd{/}`mm{/}`yyyy",imRangePattern:"`dd{/}`mm{/}`yyyy - `DD{/}`MM{/}`YYYY",fnsPattern:"dd/MM/yyyy"},"MM/DD/YYYY":{imPattern:"`mm{/}`dd{/}`yyyy",imRangePattern:"`mm{/}`dd{/}`yyyy - `MM{/}`DD{/}`YYYY",fnsPattern:"MM/dd/yyyy"},"YYYY/MM/DD":{imPattern:"`yyyy{/}`mm{/}`dd",imRangePattern:"`yyyy{/}`mm{/}`dd - `YYYY{/}`MM{/}`DD",fnsPattern:"yyyy/MM/dd"}},Oa=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t+1),o=za(a);return Ia(e)&&o<i?Ea(a):new Date(s,t+1,i)},Ta=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t-1),o=za(a);return Ia(e)&&o<i?Ea(a):new Date(s,t-1,i)},Fa=e=>{const t=new Date(e);return t.setHours(12),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t};var Ra=n`.datepicker-body{color:var(--sgds-form-color-default);display:flex;justify-content:center}table{border-collapse:collapse;text-align:center}.monthpicker,.yearpicker{display:grid;grid-template-columns:repeat(3,6rem);grid-template-rows:repeat(4,2.5rem)}.monthpicker [role=row],.yearpicker [role=row]{display:contents}button.month,button.year{background-color:transparent;border:0;border-radius:var(--sgds-form-border-radius-sm);font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs);padding:0;position:relative}button.month.active:not(.selected-ends),button.year.active:not(.selected-ends),td[data-day].active:not(.selected-ends){background-color:var(--sgds-primary-surface-translucent);border-radius:0;cursor:pointer}button.month:hover:not(.active),button.year:hover:not(.active),td[data-day]:hover:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle);cursor:pointer}button.month:focus:not(.active),button.year:focus:not(.active),td[data-day]:focus:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle)}button.month:focus-visible,button.year:focus-visible,td[data-day]:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}button.month.active:not(.selected-ends):focus,button.year.active:not(.selected-ends):focus,td[data-day].active:not(.selected-ends):focus{border-radius:var(--sgds-form-border-radius-sm)}button.year.active{background-color:var(--sgds-primary-surface-translucent);cursor:pointer}td,th{border-radius:var(--sgds-form-border-radius-sm);font-size:var(--sgds-font-size-label-sm);height:var(--sgds-form-height-lg);line-height:var(--sgds-line-height-2-xs);padding:0;position:relative;width:var(--sgds-form-width-md)}th{font-weight:var(--sgds-font-weight-semibold)}td[data-day]{cursor:pointer}button.month.active.selected-ends,button.year.active.selected-ends,td[data-day].active.selected-ends{background-color:var(--sgds-form-primary-surface-default);color:var(--sgds-form-color-fixed-light)}button.month.active.selected-ends:focus,button.month.active.selected-ends:hover,button.year.active.selected-ends:focus,button.year.active.selected-ends:hover,td[data-day].active.selected-ends:focus,td[data-day].active.selected-ends:hover{background-color:var(--sgds-form-primary-surface-emphasis)}td[data-day].disabled{cursor:not-allowed;opacity:var(--sgds-opacity-40)}.today{align-items:center;display:flex;flex-direction:column;justify-content:center}.today:after{background-color:var(--sgds-form-primary-surface-default);bottom:6px;content:".";line-height:4px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;position:absolute;width:4px}.today.active.selected-ends:after{background-color:var(--sgds-form-color-inverse)}`;const Na=new Date,ja={ArrowUp:{days:-7,months:-3,years:-3},ArrowDown:{days:7,months:3,years:3},ArrowRight:{days:1,months:1,years:1},ArrowLeft:{days:-1,months:-1,years:-1}};class Ua extends Be{constructor(){super(...arguments),this.selectedDate=[],this.mode="single"}focusOnCalendar(e){e.blur(),this._focusOnCalendarCell()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyPress),this.addEventListener("blur",e=>e.stopPropagation())}updated(){3===this.focusedTabIndex&&this._focusOnCalendarCell()}_updateFocusedDate(){this.focusedDate=Fa(this.displayDate),this.focusedDate.getFullYear()<1900&&this.focusedDate.setFullYear(1900)}_setFocusedDate(e){const t=this.focusedDate.getDate(),s=this.focusedDate.getMonth(),i=this.focusedDate.getFullYear();switch(this.view){case"days":{const a=Fa(new Date(i,s,t+e));(Pa(a,new Date(0,0,1,12))||La(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"months":{const a=Fa(new Date(i,s+e,t));(Pa(a,new Date(0,0,1,12))||La(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"years":{const a=Fa(new Date(i+e,s,t));a.getFullYear()>=1900&&(this.focusedDate=a);break}}}_handleEnterDateKeyboard(e){const t=e.composedPath()[0];if(!t.classList.contains("disabled"))switch(this.view){case"days":this._onClickDay(e);break;case"months":{const{month:e}=t.dataset;this._onClickMonth(parseInt(e));break}case"years":{const{year:e}=t.dataset;this._onClickYear(parseInt(e))}}}_handleKeyPress(e){if("Enter"===e.key)return e.preventDefault(),void this._handleEnterDateKeyboard(e);if("Tab"===e.key){const e=this._getFocusedTarget();return void(3!==this.focusedTabIndex&&e.blur())}if(e.key.includes("Arrow")){e.preventDefault(),this._blurCalendarCell();const t=ja[e.key][this.view];this._setFocusedDate(t),this._focusOnCalendarCell()}}_generateIncrementDates(){const e=Fa(this.selectedDate[0]);if(this.selectedDate.length<2)return[e];const t=Fa(this.selectedDate[1]),s=[];if(e.getTime()<t.getTime())for(let i=e;i<=t;i.setDate(i.getDate()+1))s.push(new Date(i));else for(let i=t;i<=e;i.setDate(i.getDate()+1))s.push(new Date(i));return s}_onClickDay(e){const{day:t,date:s}=e.composedPath()[0].dataset,i=new Date(this.displayDate);if(i.setDate(parseInt(t)),"click"===e.type&&(this.focusedDate=Fa(new Date(s))),"single"===this.mode)this.selectedDate=[i],this.emit("sgds-selectdates",{detail:this.selectedDate});else if("range"===this.mode){const e=[...this.selectedDate];0!==e.length&&2!==e.length||(e.length=0),e.push(i),this.selectedDate=e,this.emit("sgds-selectdates",{detail:this.selectedDate})}const a=this.minDate?Fa(new Date(this.minDate)):null,o=this.maxDate?Fa(new Date(this.maxDate)):null,n=Fa(i);(a&&n<a||o&&n>o)&&(e.stopPropagation(),e.preventDefault())}_onClickMonth(e,t=this.focusedDate.getFullYear()){const s=new Date(this.displayDate);this.view="days",s.setMonth(e),s.setFullYear(t),this.displayDate=s,this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectmonth",{detail:this.displayDate})}_onClickYear(e){const t=new Date(this.displayDate);t.setFullYear(e),this.displayDate=t,this.view="months",this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectyear",{detail:this.displayDate})}_getFocusedTarget(){const e={days:`td[data-date="${this.focusedDate.toISOString()}"]`,months:`button[data-month="${this.focusedDate.getMonth()}"][data-year="${this.focusedDate.getFullYear()}"]`,years:`button[data-year="${this.focusedDate.getFullYear()}"]`}[this.view];return this.shadowRoot.querySelector(`${e}`)}_blurCalendarCell(){const e=this._getFocusedTarget();e.setAttribute("tabindex","-1"),e.blur()}_focusOnCalendarCell(){const e=this._getFocusedTarget();e?(e.setAttribute("tabindex","0"),e.focus(),this.emit("sgds-update-focus",{detail:this.focusedDate})):this.emit("sgds-change-calendar",{detail:this.focusedDate})}_generateDays(){const e=this.selectedDate.map(e=>Fa(e)),t=this._generateIncrementDates(),s=this.minDate?Fa(new Date(this.minDate)):null,i=this.maxDate?Fa(new Date(this.maxDate)):null,a=this.displayDate.getFullYear(),o=this.displayDate.getMonth(),n=new Date(a,o,1).getDay();let r=Ua.daysInMonth[o];1===o&&(a%4==0&&a%100!=0||a%400==0)&&(r=29);const l=[];let d=1;for(let c=0;c<9;c++){const h=[];for(let l=0;l<=6;l++)if(d<=r&&(c>0||l>=n)){const n=new Date(a,o,d,12,0,0,0),r=n.toISOString(),c=s&&Date.parse(r)<Date.parse(s.toISOString()),p=i&&Date.parse(r)>Date.parse(i.toISOString()),u=c||p?void 0:this._onClickDay,g=Na.getMonth()===this.displayDate.getMonth(),v=Na.getFullYear()===this.displayDate.getFullYear(),m=Na.getDate()===d,f=e.length>0&&t.some(e=>Date.parse(r)===Date.parse(e.toISOString())),b=e.length>0&&t[0].toISOString()===r,w=e.length>1&&t[t.length-1].toISOString()===r,y=""+(m&&g&&v?"Today's date, ":"")+Va(n,"PPPP");h.push(ee`<td
|
|
472
|
+
`}}function Va(e,t){const s=e.getDate(),i=e.getMonth()+1,a=e.getFullYear(),o=s<10?"0"+s:String(s),n=i<10?"0"+i:String(i),r=String(a);switch(t){case"dd/MM/yyyy":default:return`${o}/${n}/${r}`;case"MM/dd/yyyy":return`${n}/${o}/${r}`;case"yyyy/MM/dd":return`${r}/${n}/${o}`;case"PPPP":{const t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),s=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),i=function(e){if(e>=11&&e<=13)return e+"th";switch(e%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd";default:return e+"th"}}(e.getDate());return`${t}, ${s} ${i}, ${e.getFullYear()}`}}}function za(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function Pa(e,t){return e.getTime()>t.getTime()}function Aa(e,t){return e.getTime()<t.getTime()}function La(e,t){return e.getTime()===t.getTime()}function Da(e){return e.getDate()===za(e)}function Ia(e){return e instanceof Date&&!isNaN(e.getTime())}function Ea(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function Ha(e,t){const s=e.split("/");let i,a,o;switch(t){case"dd/MM/yyyy":i=parseInt(s[0],10),a=parseInt(s[1],10)-1,o=parseInt(s[2],10);break;case"MM/dd/yyyy":a=parseInt(s[0],10)-1,i=parseInt(s[1],10),o=parseInt(s[2],10);break;case"yyyy/MM/dd":o=parseInt(s[0],10),a=parseInt(s[1],10)-1,i=parseInt(s[2],10);break;default:return new Date(NaN)}if(isNaN(i)||isNaN(a)||isNaN(o))return new Date(NaN);const n=new Date(o,a,i,12,0,0,0);return n.getFullYear()!==o||n.getMonth()!==a||n.getDate()!==i?new Date(NaN):n}Za.styles=[...fa.styles,Ma],Za.dependencies={"sgds-icon":_t},e([Ve({reflect:!0})],Za.prototype,"label",void 0),e([Ve({type:String,reflect:!0})],Za.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],Za.prototype,"hasFeedback",void 0),e([Ve({reflect:!0})],Za.prototype,"hintText",void 0),e([Ve({type:Boolean,reflect:!0})],Za.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],Za.prototype,"noValidate",void 0),e([Ve({reflect:!0})],Za.prototype,"value",void 0),e([ze()],Za.prototype,"_isTouched",void 0),e([ra()],Za.prototype,"defaultValue",void 0),e([ze()],Za.prototype,"_blurredCheckboxes",void 0),e([Ie()],Za.prototype,"_checkboxes",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],Za.prototype,"_handleValueChange",null),e([ot("_isTouched",{waitUntilFirstUpdate:!0})],Za.prototype,"_handleIsTouched",null),e([ot("invalid",{waitUntilFirstUpdate:!0})],Za.prototype,"_updateInvalid",null),lt("sgds-checkbox",ya),lt("sgds-checkbox-group",Za),lt("sgds-close-button",ft);const Ba={"DD/MM/YYYY":{imPattern:"`dd{/}`mm{/}`yyyy",imRangePattern:"`dd{/}`mm{/}`yyyy - `DD{/}`MM{/}`YYYY",fnsPattern:"dd/MM/yyyy"},"MM/DD/YYYY":{imPattern:"`mm{/}`dd{/}`yyyy",imRangePattern:"`mm{/}`dd{/}`yyyy - `MM{/}`DD{/}`YYYY",fnsPattern:"MM/dd/yyyy"},"YYYY/MM/DD":{imPattern:"`yyyy{/}`mm{/}`dd",imRangePattern:"`yyyy{/}`mm{/}`dd - `YYYY{/}`MM{/}`DD",fnsPattern:"yyyy/MM/dd"}},Oa=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t+1),o=za(a);return Da(e)&&o<i?Ea(a):new Date(s,t+1,i)},Ta=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t-1),o=za(a);return Da(e)&&o<i?Ea(a):new Date(s,t-1,i)},Fa=e=>{const t=new Date(e);return t.setHours(12),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t};var Ra=n`.datepicker-body{color:var(--sgds-form-color-default);display:flex;justify-content:center}table{border-collapse:collapse;text-align:center}.monthpicker,.yearpicker{display:grid;grid-template-columns:repeat(3,6rem);grid-template-rows:repeat(4,2.5rem)}.monthpicker [role=row],.yearpicker [role=row]{display:contents}button.month,button.year{background-color:transparent;border:0;border-radius:var(--sgds-form-border-radius-sm);font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs);padding:0;position:relative}button.month.active:not(.selected-ends),button.year.active:not(.selected-ends),td[data-day].active:not(.selected-ends){background-color:var(--sgds-primary-surface-translucent);border-radius:0;cursor:pointer}button.month:hover:not(.active),button.year:hover:not(.active),td[data-day]:hover:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle);cursor:pointer}button.month:focus:not(.active),button.year:focus:not(.active),td[data-day]:focus:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle)}button.month:focus-visible,button.year:focus-visible,td[data-day]:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}button.month.active:not(.selected-ends):focus,button.year.active:not(.selected-ends):focus,td[data-day].active:not(.selected-ends):focus{border-radius:var(--sgds-form-border-radius-sm)}button.year.active{background-color:var(--sgds-primary-surface-translucent);cursor:pointer}td,th{border-radius:var(--sgds-form-border-radius-sm);font-size:var(--sgds-font-size-label-sm);height:var(--sgds-form-height-lg);line-height:var(--sgds-line-height-2-xs);padding:0;position:relative;width:var(--sgds-form-width-md)}th{font-weight:var(--sgds-font-weight-semibold)}td[data-day]{cursor:pointer}button.month.active.selected-ends,button.year.active.selected-ends,td[data-day].active.selected-ends{background-color:var(--sgds-form-primary-surface-default);color:var(--sgds-form-color-fixed-light)}button.month.active.selected-ends:focus,button.month.active.selected-ends:hover,button.year.active.selected-ends:focus,button.year.active.selected-ends:hover,td[data-day].active.selected-ends:focus,td[data-day].active.selected-ends:hover{background-color:var(--sgds-form-primary-surface-emphasis)}td[data-day].disabled{cursor:not-allowed;opacity:var(--sgds-opacity-40)}.today{align-items:center;display:flex;flex-direction:column;justify-content:center}.today:after{background-color:var(--sgds-form-primary-surface-default);bottom:6px;content:".";line-height:4px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;position:absolute;width:4px}.today.active.selected-ends:after{background-color:var(--sgds-form-color-inverse)}`;const Na=new Date,ja={ArrowUp:{days:-7,months:-3,years:-3},ArrowDown:{days:7,months:3,years:3},ArrowRight:{days:1,months:1,years:1},ArrowLeft:{days:-1,months:-1,years:-1}};class Ua extends Be{constructor(){super(...arguments),this.selectedDate=[],this.mode="single"}focusOnCalendar(e){e.blur(),this._focusOnCalendarCell()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyPress),this.addEventListener("blur",e=>e.stopPropagation())}updated(){3===this.focusedTabIndex&&this._focusOnCalendarCell()}_updateFocusedDate(){this.focusedDate=Fa(this.displayDate),this.focusedDate.getFullYear()<1900&&this.focusedDate.setFullYear(1900)}_setFocusedDate(e){const t=this.focusedDate.getDate(),s=this.focusedDate.getMonth(),i=this.focusedDate.getFullYear();switch(this.view){case"days":{const a=Fa(new Date(i,s,t+e));(Pa(a,new Date(0,0,1,12))||La(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"months":{const a=Fa(new Date(i,s+e,t));(Pa(a,new Date(0,0,1,12))||La(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"years":{const a=Fa(new Date(i+e,s,t));a.getFullYear()>=1900&&(this.focusedDate=a);break}}}_handleEnterDateKeyboard(e){const t=e.composedPath()[0];if(!t.classList.contains("disabled"))switch(this.view){case"days":this._onClickDay(e);break;case"months":{const{month:e}=t.dataset;this._onClickMonth(parseInt(e));break}case"years":{const{year:e}=t.dataset;this._onClickYear(parseInt(e))}}}_handleKeyPress(e){if("Enter"===e.key)return e.preventDefault(),void this._handleEnterDateKeyboard(e);if("Tab"===e.key){const e=this._getFocusedTarget();return void(3!==this.focusedTabIndex&&e.blur())}if(e.key.includes("Arrow")){e.preventDefault(),this._blurCalendarCell();const t=ja[e.key][this.view];this._setFocusedDate(t),this._focusOnCalendarCell()}}_generateIncrementDates(){const e=Fa(this.selectedDate[0]);if(this.selectedDate.length<2)return[e];const t=Fa(this.selectedDate[1]),s=[];if(e.getTime()<t.getTime())for(let i=e;i<=t;i.setDate(i.getDate()+1))s.push(new Date(i));else for(let i=t;i<=e;i.setDate(i.getDate()+1))s.push(new Date(i));return s}_onClickDay(e){const{day:t,date:s}=e.composedPath()[0].dataset,i=new Date(this.displayDate);if(i.setDate(parseInt(t)),"click"===e.type&&(this.focusedDate=Fa(new Date(s))),"single"===this.mode)this.selectedDate=[i],this.emit("sgds-selectdates",{detail:this.selectedDate});else if("range"===this.mode){const e=[...this.selectedDate];0!==e.length&&2!==e.length||(e.length=0),e.push(i),this.selectedDate=e,this.emit("sgds-selectdates",{detail:this.selectedDate})}const a=this.minDate?Fa(new Date(this.minDate)):null,o=this.maxDate?Fa(new Date(this.maxDate)):null,n=Fa(i);(a&&n<a||o&&n>o)&&(e.stopPropagation(),e.preventDefault())}_onClickMonth(e,t=this.focusedDate.getFullYear()){const s=new Date(this.displayDate);this.view="days",s.setMonth(e),s.setFullYear(t),this.displayDate=s,this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectmonth",{detail:this.displayDate})}_onClickYear(e){const t=new Date(this.displayDate);t.setFullYear(e),this.displayDate=t,this.view="months",this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectyear",{detail:this.displayDate})}_getFocusedTarget(){const e={days:`td[data-date="${this.focusedDate.toISOString()}"]`,months:`button[data-month="${this.focusedDate.getMonth()}"][data-year="${this.focusedDate.getFullYear()}"]`,years:`button[data-year="${this.focusedDate.getFullYear()}"]`}[this.view];return this.shadowRoot.querySelector(`${e}`)}_blurCalendarCell(){const e=this._getFocusedTarget();e.setAttribute("tabindex","-1"),e.blur()}_focusOnCalendarCell(){const e=this._getFocusedTarget();e?(e.setAttribute("tabindex","0"),e.focus(),this.emit("sgds-update-focus",{detail:this.focusedDate})):this.emit("sgds-change-calendar",{detail:this.focusedDate})}_generateDays(){const e=this.selectedDate.map(e=>Fa(e)),t=this._generateIncrementDates(),s=this.minDate?Fa(new Date(this.minDate)):null,i=this.maxDate?Fa(new Date(this.maxDate)):null,a=this.displayDate.getFullYear(),o=this.displayDate.getMonth(),n=new Date(a,o,1).getDay();let r=Ua.daysInMonth[o];1===o&&(a%4==0&&a%100!=0||a%400==0)&&(r=29);const l=[];let d=1;for(let c=0;c<9;c++){const h=[];for(let l=0;l<=6;l++)if(d<=r&&(c>0||l>=n)){const n=new Date(a,o,d,12,0,0,0),r=n.toISOString(),c=s&&Date.parse(r)<Date.parse(s.toISOString()),p=i&&Date.parse(r)>Date.parse(i.toISOString()),u=c||p?void 0:this._onClickDay,g=Na.getMonth()===this.displayDate.getMonth(),v=Na.getFullYear()===this.displayDate.getFullYear(),m=Na.getDate()===d,f=e.length>0&&t.some(e=>Date.parse(r)===Date.parse(e.toISOString())),b=e.length>0&&t[0].toISOString()===r,w=e.length>1&&t[t.length-1].toISOString()===r,y=""+(m&&g&&v?"Today's date, ":"")+Va(n,"PPPP");h.push(ee`<td
|
|
473
473
|
key=${l}
|
|
474
474
|
data-date=${r}
|
|
475
475
|
data-day=${d}
|
|
@@ -663,7 +663,7 @@ const xa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
663
663
|
</div>
|
|
664
664
|
${this._renderFeedback()}
|
|
665
665
|
</div>
|
|
666
|
-
`}}Qa.styles=[...fa.styles,na,ma,Xa],Qa.dependencies={"sgds-spinner":$a,"sgds-icon":_t},e([Ve({reflect:!0})],Qa.prototype,"type",void 0),e([Ve({type:String})],Qa.prototype,"prefix",void 0),e([Ve({type:String})],Qa.prototype,"suffix",void 0),e([Ve({type:Number,reflect:!0})],Qa.prototype,"minlength",void 0),e([Ve({type:Number,reflect:!0})],Qa.prototype,"maxlength",void 0),e([Ve()],Qa.prototype,"min",void 0),e([Ve()],Qa.prototype,"max",void 0),e([Ve({type:String,reflect:!0})],Qa.prototype,"placeholder",void 0),e([Ve({type:String})],Qa.prototype,"pattern",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"autofocus",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"readonly",void 0),e([Ve({type:String,reflect:!0})],Qa.prototype,"autocomplete",void 0),e([Ve()],Qa.prototype,"step",void 0),e([Ve({type:String,reflect:!0})],Qa.prototype,"hasFeedback",void 0),e([Ve({type:String,reflect:!0})],Qa.prototype,"invalidFeedback",void 0),e([ra()],Qa.prototype,"defaultValue",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"valid",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"loading",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"noValidate",void 0),e([Ve({reflect:!0})],Qa.prototype,"value",void 0),e([ze()],Qa.prototype,"_isTouched",void 0),e([ze()],Qa.prototype,"_showPassword",void 0),e([ot("_isTouched",{waitUntilFirstUpdate:!0})],Qa.prototype,"_handleIsTouched",null),e([ot("disabled",{waitUntilFirstUpdate:!0})],Qa.prototype,"_handleDisabledChange",null);var eo=n`.datepicker-input-container{display:flex;flex-direction:row;width:-webkit-fill-available;width:-moz-available}.datepicker-input-container .form-control-group{border-right:0}.calendar-btn{all:unset}`;class to extends Qa{constructor(){super(),this.dateFormat="DD/MM/YYYY",this.mode="single",this._validateInput=async()=>{const e=this.mask.value.split(" - ").filter(e=>e!==this.dateFormat),t=e.map(e=>Fa(Ha(e,Ba[this.dateFormat].fnsPattern))),s=t.filter(e=>!
|
|
666
|
+
`}}Qa.styles=[...fa.styles,na,ma,Xa],Qa.dependencies={"sgds-spinner":$a,"sgds-icon":_t},e([Ve({reflect:!0})],Qa.prototype,"type",void 0),e([Ve({type:String})],Qa.prototype,"prefix",void 0),e([Ve({type:String})],Qa.prototype,"suffix",void 0),e([Ve({type:Number,reflect:!0})],Qa.prototype,"minlength",void 0),e([Ve({type:Number,reflect:!0})],Qa.prototype,"maxlength",void 0),e([Ve()],Qa.prototype,"min",void 0),e([Ve()],Qa.prototype,"max",void 0),e([Ve({type:String,reflect:!0})],Qa.prototype,"placeholder",void 0),e([Ve({type:String})],Qa.prototype,"pattern",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"autofocus",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"readonly",void 0),e([Ve({type:String,reflect:!0})],Qa.prototype,"autocomplete",void 0),e([Ve()],Qa.prototype,"step",void 0),e([Ve({type:String,reflect:!0})],Qa.prototype,"hasFeedback",void 0),e([Ve({type:String,reflect:!0})],Qa.prototype,"invalidFeedback",void 0),e([ra()],Qa.prototype,"defaultValue",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"valid",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"loading",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],Qa.prototype,"noValidate",void 0),e([Ve({reflect:!0})],Qa.prototype,"value",void 0),e([ze()],Qa.prototype,"_isTouched",void 0),e([ze()],Qa.prototype,"_showPassword",void 0),e([ot("_isTouched",{waitUntilFirstUpdate:!0})],Qa.prototype,"_handleIsTouched",null),e([ot("disabled",{waitUntilFirstUpdate:!0})],Qa.prototype,"_handleDisabledChange",null);var eo=n`.datepicker-input-container{display:flex;flex-direction:row;width:-webkit-fill-available;width:-moz-available}.datepicker-input-container .form-control-group{border-right:0}.calendar-btn{all:unset}`;class to extends Qa{constructor(){super(),this.dateFormat="DD/MM/YYYY",this.mode="single",this._validateInput=async()=>{const e=this.mask.value.split(" - ").filter(e=>e!==this.dateFormat),t=e.map(e=>Fa(Ha(e,Ba[this.dateFormat].fnsPattern))),s=t.filter(e=>!Ia(e)||Aa(e,new Date(0,0,1))||Aa(e,Fa(new Date(this.minDate)))||Pa(e,Fa(new Date(this.maxDate))));return s.length>0||"range"===this.mode&&1===t.length?(this.setInvalid(!0),this.emit("i-sgds-invalid-input")):0===s.length&&t.length>0?(this.setInvalid(!1),this.emit("i-sgds-selectdates-input",{detail:t})):0===t.length&&0===s.length?(this.setInvalid(!1),this.emit("i-sgds-empty-input")):void 0},this.type="text"}_handleBlur(){const e=this.mask.value.split(" - ").filter(e=>e!==this.dateFormat),t=e.map(e=>Fa(Ha(e,Ba[this.dateFormat].fnsPattern))),s=t.filter(e=>!Ia(e)||Aa(e,new Date(0,0,1))||Aa(e,Fa(new Date(this.minDate)))||Pa(e,Fa(new Date(this.maxDate))));this.mask.masked.isComplete&&s.length>0&&t.length>0&&(this.value="",this.mask.value="",this.setInvalid(!1)),this.emit("sgds-blur")}async _handleChange(e){this.value=this.input.value,this.emit("sgds-change"),super._mixinHandleChange(e),await this._validateInput()}async firstUpdated(e){super.firstUpdated(e),this._applyInputMask(this.dateFormat)}async _applyInputMask(e){const t=await this.shadowInput,s="single"===this.mode?Ba[e].imPattern:Ba[e].imRangePattern;this.mask=new Ja(t,{pattern:s}),this.mask.on("accept",()=>{this.value=this.mask.masked.value,this.emit("i-sgds-mask-input-change",{detail:this.value})}),this.mask.on("complete",this._validateInput)}updateMaskValue(){var e;null===(e=this.mask)||void 0===e||e.updateValue()}destroyInputMask(){var e;null===(e=this.mask)||void 0===e||e.destroy()}async applyInputMask(){return await this._applyInputMask(this.dateFormat)}async focus(){return(await this.shadowInput).focus()}render(){return ee`
|
|
667
667
|
<div
|
|
668
668
|
class="form-control-container ${We({disabled:this.disabled})}"
|
|
669
669
|
>
|
|
@@ -674,7 +674,7 @@ const xa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
674
674
|
</div>
|
|
675
675
|
${this._renderFeedback()}
|
|
676
676
|
</div>
|
|
677
|
-
`}}to.styles=[...Qa.styles,eo],e([Ve({type:String})],to.prototype,"minDate",void 0),e([Ve({type:String})],to.prototype,"maxDate",void 0),e([Ve({type:String,reflect:!0})],to.prototype,"mode",void 0),e([
|
|
677
|
+
`}}to.styles=[...Qa.styles,eo],e([Ve({type:String})],to.prototype,"minDate",void 0),e([Ve({type:String})],to.prototype,"maxDate",void 0),e([Ve({type:String,reflect:!0})],to.prototype,"mode",void 0),e([De("input")],to.prototype,"shadowInput",void 0);var so=n`:host{--datepicker-theme-color:var(--sgds-primary);--datepicker-hover-bg:var(--sgds-primary-100);--datepicker-bg:#fff;--datepicker-close-btn-bg:var(--datepicker-theme-color);--datepicker-close-btn-hover-bg:var(--sgds-primary-700);--datepicker-close-btn-color:#fff;--datepicker-selected-date-bg:var(--sgds-primary);--datepicker-selected-date-color:#fff}:host([menuisopen]:not([disabled]):not([readonly])) .dropdown-menu{background-color:var(--sgds-form-surface-default);display:flex;flex-direction:column;gap:var(--sgds-form-gap-sm);overflow:unset;padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x);width:var(--sgds-dimension-320)}.dropdown{display:flex;height:100%}sgds-datepicker-input{--input-border-radius:var(--sgds-form-border-radius-md) 0 0 var(--sgds-form-border-radius-md);flex:1;margin-right:0}sgds-icon-button{--btn-border-radius:0 var(--sgds-form-border-radius-md) var(--sgds-form-border-radius-md) 0}.m-width-160{min-width:var(--sgds-dimension-160)}`;class io extends(da(Vi)){constructor(){super(),this.required=!1,this.disabled=!1,this.noValidate=!1,this.value="",this.initialValue=[],this.dateFormat="DD/MM/YYYY",this.minDate="",this.maxDate="",this.mode="single",this.hasFeedback=!1,this.label="",this.hintText="",this.noFlip=!1,this.drop="down",this.defaultValue="",this.invalid=!1,this.view="days",this.selectedDateRange=[],this.focusedTabIndex=3,this.initialDisplayDate=new Date,this._makeInputValueString=(e,t,s)=>{if(!e&&!t)return this.value;const i=e=>Va(e,Ba[s].fnsPattern);switch(this.mode){case"single":e&&(this.value=i(e));break;case"range":e&&t&&(this.value=`${i(e)} - ${i(t)}`),e&&!t&&(this.value=`${i(e)} - ${this.dateFormat}`)}return this.value},this._dialogAriaLabels={days:"Choose date",months:"Choose month",years:"Choose year"},this.floatingOpts={placement:"bottom-end"}}isValueEmpty(){return""===this.value||"DD/MM/YYYY"===this.value||"DD/MM/YYYY - DD/MM/YYYY"===this.value}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}setInvalid(e){this.invalid=e,this.datepickerInput&&this.datepickerInput.setInvalid(e)}setValidity(e,t,s){return this._mixinSetValidity(e,t,s)}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}async connectedCallback(){if(super.connectedCallback(),this.addEventListener("sgds-view",this._handleViewChanged),this.addEventListener("sgds-change-calendar",this._handleDateChanged),this.addEventListener("sgds-update-focus",this._handleFocusDateChanged),this.addEventListener("sgds-selectmonth",this._handleSelectMonth),this.addEventListener("sgds-selectyear",this._handleSelectYear),this.addEventListener("sgds-selectdates",this._handleSelectDatesAndClose),this.addEventListener("i-sgds-selectdates-input",this._handleSelectDatesInput),this.addEventListener("i-sgds-empty-input",this._handleEmptyInput),this.addEventListener("keydown",this._handleTab),this.addEventListener("sgds-hide",this._handleCloseMenu),this.addEventListener("sgds-show",this._handleOpenMenu),this.addEventListener("blur",this._mixinCheckValidity),this.initialValue=this.value?this.value.split(" - ").map(e=>e.trim()):this.initialValue,this.initialDisplayDate=this.displayDate||new Date,this.initialValue&&this.initialValue.length>0){const e=new RegExp(this._getDateFormatRegex()),t=this.initialValue.filter(t=>!e.test(t));if(t.length>0)return console.error("Invalid date format in initialValue:",t);{const e=this.initialValue.map(e=>Fa(Ha(e,Ba[this.dateFormat].fnsPattern)));this._handleSelectDates(e)}}else this.displayDate=this.initialDisplayDate;(await this.datepickerInputAsync).setInvalid(this.invalid)}async firstUpdated(e){if(super.firstUpdated(e),this.menuIsOpen){const e=await this.datepickerInputAsync;await this.updateFloatingPosition();(await this.calendar).focusOnCalendar(e)}}_getDateFormatRegex(){return this.dateFormat.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace("MM","\\d{2}").replace("DD","\\d{2}").replace("YYYY","\\d{4}").replace("/","\\/")}_handleTab(e){if(!this.menuIsOpen)return;const t=Array(4);e.shiftKey&&"Tab"===e.key?(e.preventDefault(),this.focusedTabIndex=(this.focusedTabIndex-1+t.length)%t.length):"Tab"===e.key&&(e.preventDefault(),this.focusedTabIndex=(this.focusedTabIndex+1+t.length)%t.length)}_handleValueChange(){this.emit("sgds-change-date")}async _handleCloseMenu(){if(0===this.selectedDateRange.length)this.displayDate=this.initialDisplayDate;else{const e=this.selectedDateRange.length;this.displayDate=this.selectedDateRange[e-1];(await this.calendar)._updateFocusedDate()}await this.updateComplete;(await this.datepickerInputAsync).focus()}async _handleOpenMenu(){const e=await this.calendar,t=await this.datepickerInputAsync;e.focusOnCalendar(t)}_handleSelectDatesInput(e){this._handleSelectDates(e.detail)}async _handleSelectDates(e){e.sort((e,t)=>e.getTime()-t.getTime()),this.displayDate=e[0],this.focusedDate=e[0],this.selectedDateRange=e;const t=this._makeInputValueString(this.selectedDateRange[0],this.selectedDateRange[1],this.dateFormat);this.value=t;(await this.datepickerInputAsync).updateMaskValue(),this._manageInternalsValid()}async _handleSelectDatesAndClose(e){await this._handleSelectDates(e.detail),("range"===this.mode&&2===this.selectedDateRange.length||"single"===this.mode&&1===this.selectedDateRange.length)&&this.hideMenu()}_handleViewChanged(e){this.view=e.detail}_handleDateChanged(e){this.displayDate=e.detail}_handleFocusDateChanged(e){this.focusedDate=e.detail}_handleSelectMonth(e){this.displayDate=e.detail}_handleSelectYear(e){this.displayDate=e.detail}async _handleInvalidInput(){this.selectedDateRange=[],this.displayDate=this.initialDisplayDate,this._mixinShouldSkipSgdsValidation()||(this.invalid=!0,this._manageInternalsBadInput())}async _handleEmptyInput(){this.required&&this._manageEmptyInput()}async _resetDatepicker(e=""){this.displayDate=this.initialDisplayDate,this.selectedDateRange=[],this.value=e,this.view="days";const t=await this.datepickerInputAsync;t.setInvalid(this.invalid),t.destroyInputMask(),await t.applyInputMask(),this._mixinResetValidity(t),this.isValueEmpty()&&this._handleEmptyInput()}_manageInternalsBadInput(){this._mixinSetValidity({badInput:!0},"Invalid date input",this.datepickerInput)}_manageEmptyInput(){this._mixinSetValidity({valueMissing:!0},"Please fill in this field",this.datepickerInput)}_manageInternalsValid(){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||(this._mixinSetValidity({}),this.invalid=this.datepickerInput.invalid=!1)}async _mixinResetFormControl(){this._resetDatepicker(this.defaultValue)}async _handleInputMaskChange(e){this.value=e.detail,this.isValueEmpty()&&this._resetDatepicker()}render(){return ee`
|
|
678
678
|
<div class="datepicker-container m-width-160">
|
|
679
679
|
<sgds-datepicker-input
|
|
680
680
|
.value=${ia(this.value)}
|
|
@@ -738,7 +738,7 @@ const xa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
738
738
|
></sgds-datepicker-calendar>
|
|
739
739
|
</div>
|
|
740
740
|
</div>
|
|
741
|
-
`}}io.styles=[...Vi.styles,Pi,so],io.dependencies={"sgds-datepicker-input":to,"sgds-datepicker-calendar":Ua,"sgds-datepicker-header":Ka,"sgds-button":Yi,"sgds-icon-button":Ya},e([Ve({type:Boolean,reflect:!0})],io.prototype,"required",void 0),e([Ve({reflect:!0})],io.prototype,"name",void 0),e([Ve({type:Boolean,reflect:!0})],io.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],io.prototype,"noValidate",void 0),e([Ve({type:String,reflect:!0})],io.prototype,"value",void 0),e([Ve({type:Array,reflect:!0})],io.prototype,"initialValue",void 0),e([Ve({type:String})],io.prototype,"minDate",void 0),e([Ve({type:String})],io.prototype,"maxDate",void 0),e([Ve({type:String,reflect:!0})],io.prototype,"mode",void 0),e([Ve({type:String,reflect:!0})],io.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],io.prototype,"hasFeedback",void 0),e([Ve({reflect:!0})],io.prototype,"label",void 0),e([Ve({reflect:!0})],io.prototype,"hintText",void 0),e([Ve({type:Boolean,reflect:!0,state:!1})],io.prototype,"noFlip",void 0),e([Ve({type:String,reflect:!0,state:!1})],io.prototype,"drop",void 0),e([Ve({attribute:!1})],io.prototype,"displayDate",void 0),e([ra()],io.prototype,"defaultValue",void 0),e([Ve({type:Boolean,reflect:!0})],io.prototype,"invalid",void 0),e([ze()],io.prototype,"view",void 0),e([ze()],io.prototype,"selectedDateRange",void 0),e([ze()],io.prototype,"focusedDate",void 0),e([ze()],io.prototype,"focusedTabIndex",void 0),e([
|
|
741
|
+
`}}io.styles=[...Vi.styles,Pi,so],io.dependencies={"sgds-datepicker-input":to,"sgds-datepicker-calendar":Ua,"sgds-datepicker-header":Ka,"sgds-button":Yi,"sgds-icon-button":Ya},e([Ve({type:Boolean,reflect:!0})],io.prototype,"required",void 0),e([Ve({reflect:!0})],io.prototype,"name",void 0),e([Ve({type:Boolean,reflect:!0})],io.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],io.prototype,"noValidate",void 0),e([Ve({type:String,reflect:!0})],io.prototype,"value",void 0),e([Ve({type:Array,reflect:!0})],io.prototype,"initialValue",void 0),e([Ve({type:String})],io.prototype,"minDate",void 0),e([Ve({type:String})],io.prototype,"maxDate",void 0),e([Ve({type:String,reflect:!0})],io.prototype,"mode",void 0),e([Ve({type:String,reflect:!0})],io.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],io.prototype,"hasFeedback",void 0),e([Ve({reflect:!0})],io.prototype,"label",void 0),e([Ve({reflect:!0})],io.prototype,"hintText",void 0),e([Ve({type:Boolean,reflect:!0,state:!1})],io.prototype,"noFlip",void 0),e([Ve({type:String,reflect:!0,state:!1})],io.prototype,"drop",void 0),e([Ve({attribute:!1})],io.prototype,"displayDate",void 0),e([ra()],io.prototype,"defaultValue",void 0),e([Ve({type:Boolean,reflect:!0})],io.prototype,"invalid",void 0),e([ze()],io.prototype,"view",void 0),e([ze()],io.prototype,"selectedDateRange",void 0),e([ze()],io.prototype,"focusedDate",void 0),e([ze()],io.prototype,"focusedTabIndex",void 0),e([De("sgds-datepicker-calendar")],io.prototype,"calendar",void 0),e([De("sgds-datepicker-input")],io.prototype,"datepickerInputAsync",void 0),e([Le("sgds-datepicker-input")],io.prototype,"datepickerInput",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],io.prototype,"_handleValueChange",null),lt("sgds-datepicker",io);var ao=n`:host([bordered]) .container{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-md)}.container{display:flex;flex-direction:column}slot[name=title]::slotted(*){color:var(--sgds-heading-color-default);font-size:var(--sgds-font-size-heading-sm);font-weight:var(--sgds-font-weight-semibold);letter-spacing:var(--sgds-letter-spacing-tight);line-height:var(--sgds-line-height-sm)}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-xs)}.header{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.has-header{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);padding:var(--sgds-padding-lg) var(--sgds-padding-xl)}`;class oo extends Be{constructor(){super(...arguments),this.bordered=!1,this.stacked=!1,this.hasTitleSlot=!1,this.hasDescriptionSlot=!1,this.hasSlotController=new $i(this,"title","description")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","list"),this.updateComplete.then(()=>{this._updateDescriptionLists()})}_updateDescriptionLists(){this._descriptionLists&&this._descriptionLists.forEach((e,t)=>{this.stacked?e.setAttribute("stacked",""):e.removeAttribute("stacked"),this.bordered?e.setAttribute("bordered",""):e.removeAttribute("bordered"),t===this._descriptionLists.length-1&&e.setAttribute("isLastChild","")})}updated(e){e.has("stacked")&&this._updateDescriptionLists(),e.has("bordered")&&this._updateDescriptionLists(),this.hasTitleSlot||(this.hasTitleSlot=this.hasSlotController.test("title")),this.hasDescriptionSlot||(this.hasDescriptionSlot=this.hasSlotController.test("description"))}render(){return ee`
|
|
742
742
|
<div class="container">
|
|
743
743
|
<div
|
|
744
744
|
class="${We({header:!0,"has-header":this.hasTitleSlot||this.hasDescriptionSlot})}"
|
|
@@ -750,7 +750,7 @@ const xa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
750
750
|
<slot></slot>
|
|
751
751
|
</div>
|
|
752
752
|
</div>
|
|
753
|
-
`}}oo.styles=[...Be.styles,ao],e([Ve({type:Boolean,reflect:!0})],oo.prototype,"bordered",void 0),e([Ve({type:Boolean,reflect:!0})],oo.prototype,"stacked",void 0),e([Ve({type:Boolean})],oo.prototype,"hasTitleSlot",void 0),e([Ve({type:Boolean})],oo.prototype,"hasDescriptionSlot",void 0),e([
|
|
753
|
+
`}}oo.styles=[...Be.styles,ao],e([Ve({type:Boolean,reflect:!0})],oo.prototype,"bordered",void 0),e([Ve({type:Boolean,reflect:!0})],oo.prototype,"stacked",void 0),e([Ve({type:Boolean})],oo.prototype,"hasTitleSlot",void 0),e([Ve({type:Boolean})],oo.prototype,"hasDescriptionSlot",void 0),e([Ie({flatten:!0})],oo.prototype,"_descriptionLists",void 0);var no=n`:host([bordered][islastchild]) .container:last-child{border-bottom:none}.container{align-items:flex-start;border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs);justify-content:flex-start;padding:var(--sgds-padding-lg) var(--sgds-padding-xl)}.data-container,.label-container{flex:1}.label-container{max-width:var(--sgds-dimension-280)}.label{color:var(--sgds-color-default);font-weight:var(--sgds-font-weight-semibold)}.data,.label{font-size:var(--sgds-font-size-label-md)}.data{color:var(--sgds-color-subtle);font-weight:var(--sgds-font-weight-regular);margin:0}@media (min-width:512px){:host(:not([stacked])) .container{flex-direction:row;gap:var(--sgds-gap-2-xl)}}`;let ro=0;class lo extends Be{constructor(){super(...arguments),this.attrId=++ro,this.componentId=`sgds-description-list-${this.attrId}`,this.stacked=!1,this.bordered=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","listitem")}render(){return ee`
|
|
754
754
|
<div class="container">
|
|
755
755
|
<div class="label-container">
|
|
756
756
|
<span class="label">
|
|
@@ -797,7 +797,7 @@ const xa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
797
797
|
</div>
|
|
798
798
|
</div>
|
|
799
799
|
</div>
|
|
800
|
-
`}}mo.styles=[...Be.styles,vo],mo.dependencies={"sgds-close-button":ft},e([Le(".drawer")],mo.prototype,"drawer",void 0),e([Le(".drawer-panel")],mo.prototype,"panel",void 0),e([Le(".drawer-overlay")],mo.prototype,"overlay",void 0),e([Ve({type:Boolean,reflect:!0})],mo.prototype,"open",void 0),e([Ve({type:String,reflect:!0})],mo.prototype,"size",void 0),e([Ve({type:String,reflect:!0})],mo.prototype,"placement",void 0),e([Ve({type:String})],mo.prototype,"ariaLabel",void 0),e([Ve({type:Boolean,reflect:!0})],mo.prototype,"contained",void 0),e([ot("open",{waitUntilFirstUpdate:!0})],mo.prototype,"handleOpenChange",null),e([ot("contained",{waitUntilFirstUpdate:!0})],mo.prototype,"handleNoModalChange",null),it("drawer.showTop",{keyframes:[{opacity:0,translate:"0 -100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideTop",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 -100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showBottom",{keyframes:[{opacity:0,translate:"0 100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideBottom",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}}),it("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}}),it("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),it("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),lt("sgds-drawer",mo),lt("sgds-dropdown",Li),lt("sgds-dropdown-item",
|
|
800
|
+
`}}mo.styles=[...Be.styles,vo],mo.dependencies={"sgds-close-button":ft},e([Le(".drawer")],mo.prototype,"drawer",void 0),e([Le(".drawer-panel")],mo.prototype,"panel",void 0),e([Le(".drawer-overlay")],mo.prototype,"overlay",void 0),e([Ve({type:Boolean,reflect:!0})],mo.prototype,"open",void 0),e([Ve({type:String,reflect:!0})],mo.prototype,"size",void 0),e([Ve({type:String,reflect:!0})],mo.prototype,"placement",void 0),e([Ve({type:String})],mo.prototype,"ariaLabel",void 0),e([Ve({type:Boolean,reflect:!0})],mo.prototype,"contained",void 0),e([ot("open",{waitUntilFirstUpdate:!0})],mo.prototype,"handleOpenChange",null),e([ot("contained",{waitUntilFirstUpdate:!0})],mo.prototype,"handleNoModalChange",null),it("drawer.showTop",{keyframes:[{opacity:0,translate:"0 -100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideTop",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 -100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showBottom",{keyframes:[{opacity:0,translate:"0 100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideBottom",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}}),it("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}}),it("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),it("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),lt("sgds-drawer",mo),lt("sgds-dropdown",Li),lt("sgds-dropdown-item",Ii);var fo=n`.file-upload-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.file-upload-list{display:flex;flex-direction:column;gap:var(--sgds-form-gap-xl);list-style-type:none;margin-top:0}.file-upload-list.has-files{margin-top:var(--sgds-margin-xl)}.filesize{color:var(--sgds-form-color-subtle)}@keyframes fileUploadEnter{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes fileUploadExit{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}.file-upload-list-item-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md);max-height:500px;overflow:hidden;transition:max-height var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard),opacity var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.file-upload-list-item-container.file-upload-exit{max-height:0;opacity:0}.file-upload-list-item{align-items:center;animation:fileUploadEnter var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter);background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-muted);border-radius:var(--sgds-form-border-radius-md);display:flex;gap:var(--sgds-form-gap-lg);padding:var(--sgds-form-padding-y) calc(var(--sgds-form-padding-x) + var(--sgds-padding-2-xl)) var(--sgds-form-padding-y) var(--sgds-form-padding-x);position:relative;transition:transform var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.file-upload-list-item.file-upload-error{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.file-upload-list-item.file-upload-exit{animation:fileUploadExit var(--sgds-motion-duration-standard) var(--sgds-motion-easing-exit)}.file-upload-list-item span:not(:first-of-type){cursor:pointer}.file-upload-item-error{align-items:flex-start;display:flex;gap:var(--sgds-form-gap-lg)}.file-upload-item-error sgds-icon{color:var(--sgds-color-muted);flex-shrink:0;margin-top:2px}.file-upload-item-error-message{color:var(--sgds-form-danger-color-default);font-size:var(--sgds-font-size-label-sm,);line-height:var(--sgds-line-height-2-xs)}ul{margin:0;padding:0}input{display:none}sgds-button{cursor:pointer;width:fit-content}sgds-close-button{position:absolute;right:8px;top:8px}sgds-icon.valid{color:var(--sgds-form-success-color-default)}sgds-icon.invalid{color:var(--sgds-color-muted)}.drag-drop-zone{align-items:center;background-color:var(--sgds-surface-raised);border:var(--sgds-border-width-1) dashed var(--sgds-border-color-default);border-radius:var(--sgds-border-radius-md);display:flex;flex-direction:column;gap:var(--sgds-gap-md);justify-content:center;padding:var(--sgds-padding-2-xl)}.drag-drop-text{font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs)}.drag-drop-zone:focus,.drag-drop-zone:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}:host([disabled]) .file-upload-container>:not(sgds-button):not(.invalid-feedback-container){opacity:var(--sgds-opacity-50)}:host([disabled]){cursor:not-allowed;pointer-events:none}:host([disabled]) .drag-drop-zone:focus,:host([disabled]) .drag-drop-zone:focus-visible{outline:none}:host([invalid]:not([disabled])) .drag-drop-zone{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}:host([invalid]:not([disabled])) .drag-drop-zone:focus,:host([invalid]:not([disabled])) .drag-drop-zone:focus-visible{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}:host(:not([disabled]):not([invalid])) .drag-drop-zone:hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}`;class bo extends(da(fa)){constructor(){super(...arguments),this.multiple=!1,this.accept="",this.hasFeedback=!1,this.required=!1,this.variant="default",this.ariaLabel="Choose files",this.noValidate=!1,this.selectedFiles=[],this.exitingFile=null,this.fileMetadata=new Map,this._isTouched=!1,this._isProgrammaticChange=!1,this.inputRef=jt(),this._dragZoneRef=jt(),this._dragCounter=0,this._isDialogOpen=!1}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}get files(){return this.selectedFiles}setFileUploadState(e,t,s){const i=this.selectedFiles[e];i&&(this.fileMetadata.set(i,{uploading:"loading"===t,error:s}),this.requestUpdate())}_setFileList(e,t=0,s){if(this.emit("sgds-change",{detail:e}),this.emit("sgds-files-selected",{detail:e}),e.length>t){const s=Array.from(e).slice(t),i=new DataTransfer;s.forEach(e=>i.items.add(e)),this.emit("sgds-add-files",{detail:i.files})}else if(e.length===t&&t>0&&!s){const t=new DataTransfer;Array.from(e).forEach(e=>t.items.add(e)),this.emit("sgds-add-files",{detail:t.files})}e.length<t&&s&&this.emit("sgds-remove-file",{detail:{file:s,files:e}})}_handleClick(e){if(e.preventDefault(),!this.disabled){this._isDialogOpen=!0;const e=this.inputRef.value;null==e||e.click()}}_handleCancel(){this._isDialogOpen=!1,this._isTouched=!0,this._mixinShouldSkipSgdsValidation()||this.setInvalid(!this._mixinCheckValidity())}_handleChange(e){this._isDialogOpen=!1;const t=e.target,s=t.files,i=this.selectedFiles.length,a=0===s.length&&!this._isProgrammaticChange,o=s.length>0&&!this._isProgrammaticChange,n=o&&this.multiple&&this.selectedFiles.length>0;a&&this.selectedFiles.length>0?this._restoreNativeInput(t):n?this._appendFiles(t,s):s.length>0&&(this.selectedFiles=Array.from(s)),o&&this._setFileList(t.files,i),a&&!this._isTouched||super._mixinHandleChange(e)}_restoreNativeInput(e){const t=new DataTransfer;this.selectedFiles.forEach(e=>t.items.add(e)),e.files=t.files}_appendFiles(e,t){const s=[...this.selectedFiles,...Array.from(t)];this.selectedFiles=s;const i=new DataTransfer;s.forEach(e=>i.items.add(e)),e.files=i.files}_removeFileHandler(e){const t=this.selectedFiles[e];this.exitingFile=t,this.requestUpdate(),setTimeout(()=>{const s=this.inputRef.value;if(!s)return;const i=this.selectedFiles.length,a=new DataTransfer;this.selectedFiles.forEach((t,s)=>{e!==s&&a.items.add(t)}),this._isProgrammaticChange=!0,s.files=a.files,this._setFileList(a.files,i,t),this.selectedFiles=Array.from(a.files),this.exitingFile=null,this.requestUpdate(),s.dispatchEvent(new Event("change",{bubbles:!0})),this._isProgrammaticChange=!1},300)}_clearAllFiles(){const e=this.inputRef.value,t=this.selectedFiles.length,s=new DataTransfer;e&&(e.files=s.files),this._setFileList(s.files,t),this.selectedFiles=Array.from(s.files)}_mixinResetFormControl(){this._clearAllFiles(),this._mixinResetValidity(this.input)}_handleDisabledChange(){this.setInvalid(!1)}_handleBlur(){const e=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||e.defaultPrevented||this._isDialogOpen||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&this.setInvalid(!this._mixinCheckValidity())}_renderLabel(){const e=ee` <label id=${this._labelId} class="form-label"> ${this.label} </label> `;return this.label&&e}_renderHintText(){const e=ee` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}_renderFeedback(){return ee`
|
|
801
801
|
<div class="invalid-feedback-container">
|
|
802
802
|
<sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
|
|
803
803
|
<div id="${this._controlId}-invalid" class="invalid-feedback">
|
|
@@ -979,7 +979,7 @@ class Mo{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
979
979
|
* @license
|
|
980
980
|
* Copyright 2022 Google LLC
|
|
981
981
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
982
|
-
*/function Ao({context:e,subscribe:t}){return(s,i)=>{"object"==typeof i?i.addInitializer(function(){new Mo(this,{context:e,callback:e=>{s.set.call(this,e)},subscribe:t})}):s.constructor.addInitializer(s=>{new Mo(s,{context:e,callback:e=>{s[i]=e},subscribe:t})})}}const Lo=1024,
|
|
982
|
+
*/function Ao({context:e,subscribe:t}){return(s,i)=>{"object"==typeof i?i.addInitializer(function(){new Mo(this,{context:e,callback:e=>{s.set.call(this,e)},subscribe:t})}):s.constructor.addInitializer(s=>{new Mo(s,{context:e,callback:e=>{s[i]=e},subscribe:t})})}}const Lo=1024,Do=768,Io="mainnav-context",Eo="mainnav-expanded-context";var Ho=n`:host{display:block}nav{background-color:var(--sgds-surface-default);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08);position:relative;z-index:var(--sgds-z-index-floating)}.navbar{align-items:stretch;display:flex;flex-wrap:wrap;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-xs);justify-content:space-between;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);min-height:80px;padding:0 var(--sgds-mainnav-mobile-padding-x);width:100%}:host([fluid]) .navbar{max-width:none}.navbar-brand{align-items:center;color:var(--sgds-color-default);display:flex;text-decoration:none;white-space:nowrap}.navbar-brand:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.navbar-nav{display:flex;flex-direction:column;height:100%;margin-bottom:0;margin-top:0;width:100%}nav>.navbar-body{background-color:var(--sgds-surface-default);border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-translucent);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08);padding:var(--sgds-padding-md) 0;position:absolute;transition:transform .2s ease-in-out;width:100%;z-index:var(--sgds-z-index-floating)}nav>.navbar-body .navbar-nav{height:100dvh;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px)}nav>.navbar-body slot::slotted(:not(sgds-mainnav-item):not(sgds-mainnav-dropdown)){padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}.navbar-collapse{align-items:center;flex-basis:100%;flex-grow:1}.navbar-toggler{align-self:center}.navbar-nav-scroll{overflow-y:auto}@media (min-width:512px){.navbar-expand-sm{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (min-width:1024px){.navbar{padding:0 var(--sgds-mainnav-padding-x)}.navbar-expand-lg{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (min-width:1280px){.navbar-expand-xl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .nav-link{padding-left:var(--mainnav-nav-link-padding-x);padding-right:var(--mainnav-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (min-width:1440px){.navbar-expand-xxl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}}.navbar-expand{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}slot[name=non-collapsible]{align-items:center;display:flex;gap:var(--sgds-spacer-4);margin-left:auto}slot[name=non-collapsible].non-collapsible-empty{display:none}.slot-end{align-items:stretch;display:flex;gap:var(--sgds-gap-xs);margin-left:auto}.slot-end::slotted(:not([name$=-mainnav-item]):not([name$=-mainnav-dropdown])){align-self:center}`;const Bo={sm:512,md:Do,lg:Lo,xl:1280,xxl:1440,never:1/0,always:-1};class Oo extends Be{constructor(){super(...arguments),this._breakpointReached=!1,this.expanded=!1,this.expanding=!1,this.hasNonCollapsibleSlot=!1,this.brandHref="",this.collapseId=Zi("mainnav","collapse"),this.expand="lg",this.fluid=!1,this.breakpointReached=!1,this.hasSlotController=new $i(this,"non-collapsible"),this._handleMobileNavBound=this._handleMobileNav.bind(this)}get defaultSlotItems(){return[...this.defaultNodes||[]].filter(e=>void 0!==e.tagName)}get endSlotItems(){return[...this.endNodes||[]].filter(e=>void 0!==e.tagName)}connectedCallback(){super.connectedCallback(),this._handleResize(),window.addEventListener("click",e=>this._handleClickOutOfElement(e,this.body)),window.addEventListener("resize",this._handleResize.bind(this))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("click",e=>this._handleClickOutOfElement(e,this.body)),window.removeEventListener("resize",this._handleResize.bind(this))}firstUpdated(e){super.firstUpdated(e),this.breakpointReached&&this.body&&(this.expanded=!1,this.body.hidden=!0,this._handleMobileNav(),this._breakpointReached=!0)}updated(){this.hasNonCollapsibleSlot||(this.hasNonCollapsibleSlot=this.hasSlotController.test("non-collapsible"))}_handleClickOutOfElement(e,t){e.composedPath().includes(t)||e.composedPath().includes(this.header)||this.hide()}_handleSummaryClick(){this.expanded?this.hide():(document.body.style.overflow="hidden",this.show())}_handleResize(){const e=window.innerWidth<Bo[this.expand];e!==this.breakpointReached?this.requestUpdate():(this.body&&(this.body.hidden=!0),this.expanding=!1),e?(this._handleMobileNav(),this._breakpointReached||(this._breakpointReached=!0,window.addEventListener("scrollend",this._handleMobileNavBound))):(this._handleDesktopNav(),this._breakpointReached=!1,window.removeEventListener("scrollend",this._handleMobileNavBound))}async _handleMobileNav(){if(!this.nav)return;this.nav.appendChild(this.body),await customElements.whenDefined("sgds-masthead");const{bottom:e}=this.nav.getBoundingClientRect(),t=parseFloat(getComputedStyle(this.body).paddingTop)+parseFloat(getComputedStyle(this.body).paddingBottom);this.navScroll.style.maxHeight=`calc(100dvh - ${e}px - ${t}px)`}_handleDesktopNav(){var e;null===(e=this.navbar)||void 0===e||e.insertBefore(this.body,this.nonCollapsibleSlot)}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!1);await Qe(this.body),this.body.hidden=!1;const{keyframes:e,options:t}=st(this,"mainnav.show");await Ge(this.body,Xe(e,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("sgds-after-show")}async _animateToHide(){if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!0);await Qe(this.body);const{keyframes:e,options:t}=st(this,"mainnav.hide");await Ge(this.body,Xe(e,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("sgds-after-hide")}async handleOpenChange(){this.expanding?(await this._animateToShow(),this.expanded=!0):(this.header.focus(),await this._animateToHide(),this.expanded=!1)}async show(){if(!this.expanded)return this.expanding=!0,at(this,"sgds-after-show")}async hide(){if(this.expanded)return this.expanding=!1,document.body.style.removeProperty("overflow"),at(this,"sgds-after-hide")}_handleDefaultSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{e.setAttribute("expand",this.expand)})}_handleSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{e.setAttribute("name",e.tagName.toLowerCase()),e.setAttribute("expand",this.expand)})}render(){return this.breakpointReached=window.innerWidth<Bo[this.expand],ee`
|
|
983
983
|
<nav>
|
|
984
984
|
<div class="navbar ${this._expandClass()}">
|
|
985
985
|
<a class="navbar-brand" href=${this.brandHref} aria-label="brand-link">
|
|
@@ -1011,7 +1011,7 @@ class Mo{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
1011
1011
|
></sgds-icon-button>
|
|
1012
1012
|
</div>
|
|
1013
1013
|
</nav>
|
|
1014
|
-
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}Oo.styles=[...Be.styles,Ho],Oo.dependencies={"sgds-icon-button":Ya},e([Po({context:
|
|
1014
|
+
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}Oo.styles=[...Be.styles,Ho],Oo.dependencies={"sgds-icon-button":Ya},e([Po({context:Io}),ze()],Oo.prototype,"_breakpointReached",void 0),e([Po({context:Eo}),ze()],Oo.prototype,"expanded",void 0),e([ze()],Oo.prototype,"expanding",void 0),e([Le("nav")],Oo.prototype,"nav",void 0),e([Le(".navbar")],Oo.prototype,"navbar",void 0),e([Le(".navbar-toggler")],Oo.prototype,"header",void 0),e([Le(".navbar-body")],Oo.prototype,"body",void 0),e([Le(".navbar-nav-scroll")],Oo.prototype,"navScroll",void 0),e([Le("slot[name='non-collapsible']")],Oo.prototype,"nonCollapsibleSlot",void 0),e([Ve({type:Boolean})],Oo.prototype,"hasNonCollapsibleSlot",void 0),e([Ve({type:String})],Oo.prototype,"brandHref",void 0),e([Ve({type:String})],Oo.prototype,"expand",void 0),e([Ve({type:Boolean,reflect:!0})],Oo.prototype,"fluid",void 0),e([ze()],Oo.prototype,"breakpointReached",void 0),e([Ie()],Oo.prototype,"defaultNodes",void 0),e([Ie({slot:"end"})],Oo.prototype,"endNodes",void 0),e([ot("expanding",{waitUntilFirstUpdate:!0})],Oo.prototype,"handleOpenChange",null),it("mainnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),it("mainnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var To=n`:host([expand=always]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media (min-width:512px){:host([expand=sm]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:768px){:host([expand=md]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1024px){:host(:not([expand])) .nav-link,:host([expand=lg]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1280px){:host([expand=xl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1440px){:host([expand=xxl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}.nav-link{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-2-xs,20px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}.nav-link.show,.nav-link:not(.disabled).active{border-color:var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):hover{color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link.disabled{cursor:not-allowed;opacity:var(--sgds-opacity-40)}.dropdown-items{background-color:var(--sgds-surface-default);height:100%;left:100%;overflow-y:auto;padding:var(--sgds-padding-md) 0;position:absolute;top:0;width:100%}.dropdown-items a{align-items:center;color:var(--sgds-color-default);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-2-xs,20px);margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}.dropdown-items a:hover{color:var(--sgds-primary-color-default)}.dropdown-items a:focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus);outline-offset:-5px}slot[name=toggler]::slotted(*){flex:1}sgds-dropdown{display:block;height:100%}@media screen and (min-width:1024px){.dropdown-items a,.nav-link{padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`;const Fo="Enter";class Ro extends Be{constructor(){super(...arguments),this._breakpointReached=!0,this.togglerId=Zi("dropdown","button"),this.active=!1,this.disabled=!1}get defaultSlotItems(){return[...this.defaultNodes||[]].filter(e=>void 0!==e.tagName)}updated(){this._breakpointReached&&(this._copyTextToMenu(),this._resetDropdownMenu(),this._hideDropdownMenuItems())}_handleSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{var t;e.addEventListener("keydown",this._handleKeyboardMenuItemsEvent.bind(this));const s=e.shadowRoot.querySelector(".dropdown-item");s.classList.add("mainnav-dropdown-link");const i=(null===(t=e.shadowRoot)||void 0===t?void 0:t.querySelector("a"))||e.querySelector("a");i.tabIndex=-1,s.classList.contains("disabled")?(i.setAttribute("href","javascript:void(0)"),i.setAttribute("tabindex","-1")):i.addEventListener("click",e=>{e.target.closest("sgds-mainnav").hide()})})}_handleDesktopSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.classList.remove("mainnav-dropdown-link");e.shadowRoot.querySelector(".dropdown-item slot").assignedElements({flatten:!0}).forEach(e=>{t.classList.contains("disabled")&&(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1"))})})}_handleKeyboardMenuItemsEvent(e){if(!this._breakpointReached)return;const t=this.defaultSlotItems.filter(e=>!e.hasAttribute("disabled")),s=[this.menuHeaderButton,...t],i=s.length;if(0===i)return;const a=s[0],o=s[i-1].shadowRoot.querySelector(".dropdown-item");let n=document.activeElement;if(n===this&&(n=this.shadowRoot.activeElement),"Tab"===e.key)if(e.shiftKey)n===a&&(e.preventDefault(),setTimeout(()=>{o.focus()},0));else{const t=n.shadowRoot?n.shadowRoot.querySelector(".dropdown-item"):null;t&&t===o&&(e.preventDefault(),a.focus())}}_copyTextToMenu(){this.menuHeaderText.innerHTML=this.togglerNodes[0].innerHTML}_hideDropdownMenuItems(){this.dropdownItems.style.display="none",this.dropdownItems.setAttribute("aria-hidden","true")}_resetDropdownMenu(){const e=this._getNavbarBody();return e?new Promise(t=>{const s=i=>{"transform"===i.propertyName&&(e.removeEventListener("transitionend",s),t())};getComputedStyle(e).transitionProperty.includes("transform")?(e.addEventListener("transitionend",s),e.style.removeProperty("transform")):(e.style.removeProperty("transform"),t())}):Promise.resolve()}_handleKeyboardOpen(e){this.disabled||e.key!==Fo&&" "!==e.key||(e.preventDefault(),this._openMenu())}_getNavbarBody(){const e=document.querySelector("sgds-mainnav");if(!(null==e?void 0:e.shadowRoot))return void console.warn("sgds-mainnav or its shadowRoot not found");const t=e.shadowRoot.querySelector(".navbar-body");if(t)return t;console.warn(".navbar-body not found in sgds-mainnav")}_openMenu(){this._getNavbarBody().style.transform="translateX(-100%)",this.dropdownItems.style.removeProperty("display"),this.dropdownItems.setAttribute("aria-hidden","false"),setTimeout(()=>{this.menuHeaderButton.focus()},50)}_handleHeaderKeyboardEvent(e){switch(e.key){case"Tab":this._handleKeyboardMenuItemsEvent(e);break;case Fo:case" ":e.preventDefault(),this._closeMenu()}}async _closeMenu(){await this._resetDropdownMenu(),this._hideDropdownMenuItems(),this.navLink.focus()}render(){const e=ee`
|
|
1015
1015
|
<a
|
|
1016
1016
|
class="${We({"nav-link":!0,active:this.active,disabled:this.disabled})}"
|
|
1017
1017
|
aria-disabled=${this.disabled?"true":"false"}
|
|
@@ -1048,7 +1048,7 @@ class Mo{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
1048
1048
|
<sgds-icon name="chevron-down" size="md"></sgds-icon>
|
|
1049
1049
|
</a>
|
|
1050
1050
|
<slot @slotchange=${this._handleDesktopSlotChange}></slot>
|
|
1051
|
-
</sgds-dropdown>`;return this._breakpointReached?e:t}}Ro.styles=[...Be.styles,Ai,Pi,To],Ro.dependencies={"sgds-dropdown":Li,"sgds-dropdown-item":Di,"sgds-icon":_t},e([Ao({context:Do,subscribe:!0}),ze()],Ro.prototype,"_breakpointReached",void 0),e([Ao({context:Eo,subscribe:!0}),ze()],Ro.prototype,"expanded",void 0),e([Le(".nav-link")],Ro.prototype,"navLink",void 0),e([Le(".dropdown-items")],Ro.prototype,"dropdownItems",void 0),e([Le(".dropdown-items a")],Ro.prototype,"menuHeaderButton",void 0),e([Le(".dropdown-items span")],Ro.prototype,"menuHeaderText",void 0),e([Ve({type:Boolean})],Ro.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],Ro.prototype,"disabled",void 0),e([Ve({type:String})],Ro.prototype,"ariaLabel",void 0),e([De({slot:"toggler"})],Ro.prototype,"togglerNodes",void 0),e([De()],Ro.prototype,"defaultNodes",void 0);var No=n`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media screen and (min-width:512px){:host([expand=sm]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=sm]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:768px){:host([expand=md]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=md]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1024px){:host([expand=lg]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=lg]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1280px){:host([expand=xl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1440px){:host([expand=xxl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xxl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (max-width:511px){:host(:not([disabled])[active][expand=sm]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:767px){:host(:not([disabled])[active][expand=md]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1023px){:host(:not([disabled])[active][expand=lg]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1279px){:host(:not([disabled])[active][expand=xl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1439px){:host(:not([disabled])[active][expand=xxl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}::slotted(*){--sgds-link-color-default:var(--sgds-color-default);--sgds-link-color-emphasis:var(--sgds-color-default);align-items:center;box-sizing:border-box;color:var(--sgds-color-default)!important;cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);height:auto!important;line-height:var(--sgds-line-height-2-xs,20px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none!important}@media screen and (min-width:1024px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}:host(:not([disabled])[active]) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important}:host(:not([disabled]):not([active])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-color-default)!important}:host(:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-color-default)!important}:host(:not([disabled]):not([active])) ::slotted(a:active){color:var(--sgds-color-default)!important}:host(:not([disabled])[active]) ::slotted(a:active){color:var(--sgds-primary-color-default)!important}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-40)}`;class jo extends Be{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase());if(s.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}})}if(1===s.length){const e=s[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",e=>{e.target.closest("sgds-mainnav").hide()})}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}jo.styles=[...Be.styles,No],e([Ve({type:Boolean,reflect:!0})],jo.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],jo.prototype,"disabled",void 0),e([ot("disabled")],jo.prototype,"_handleDisabled",null),lt("sgds-mainnav",Oo),lt("sgds-mainnav-dropdown",Ro),lt("sgds-mainnav-item",jo);var Uo=n`b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc;text-decoration:none!important}a[target=_blank]:after{height:var(--sgds-icon-size-sm,1rem)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-sm,1rem)!important}a:hover{color:#0022b9}.sgds-masthead{color-scheme:var(--sgds-color-scheme,only light);font-family:Inter,system-ui,sans-serif;font-size:.875rem;line-height:1.25rem}.banner{background-color:light-dark(#f7f7f7,#1a1a1a)}.container{margin-left:auto;margin-right:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:.25rem var(--sgds-mainnav-mobile-padding-x,1.25rem);width:100%}:host([fluid]) .container{max-width:none}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap:0 .75rem}.sgds-masthead-identify-icon{align-self:center;display:block;height:20px;transform:rotate(180deg);transition:transform .3s ease-in-out 0s;user-select:none;width:20px}.sgds-masthead-identify-icon.show{transform:rotate(0deg)}.sgds-masthead-button{align-items:center;color:light-dark(#0269d0,#60aaf4);cursor:pointer;display:flex;gap:4px}.sgds-masthead-button:hover{color:light-dark(#0151a0,#96c7f7)}.panel{background-color:light-dark(#f7f7f7,#1a1a1a)}.sgds-masthead .sgds-masthead-content{display:grid;grid-template-rows:0fr;opacity:0;overflow:hidden;padding-bottom:0;padding-top:0;transition:grid-template-rows .3s cubic-bezier(.25,0,.25,1),opacity .3s cubic-bezier(.25,0,.25,1),padding .3s cubic-bezier(.25,0,.25,1)}.sgds-masthead .sgds-masthead-content.show{grid-template-rows:1fr;opacity:1;padding-bottom:1rem;padding-top:1rem}.sgds-masthead .sgds-masthead-content>.content-grid{min-height:0}.content-grid{display:grid;gap:1rem;grid-template-columns:1fr}.icon{margin-top:-.1em}.wrapper{display:flex;gap:.5rem}.content{display:flex;flex-direction:column;gap:.25rem}.content .title{font-weight:600}.content article{color:light-dark(#525252,#a5a5a5)}.banner-icon,.banner-icon-inline{height:20px;width:20px}.banner-icon path,.banner-icon-inline path{fill:light-dark(#1a1a1a,#f3f3f3)}a.trusted-websites-link{color:light-dark(#0269d0,#60aaf4);text-decoration:underline;width:fit-content}a.trusted-websites-link:hover{color:light-dark(#0151a0,#96c7f7)}.sgds-masthead-button:focus-visible,a.trusted-websites-link:focus-visible{outline:4px solid #60aaf4}@media screen and (min-width:768px){.content-grid{gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}}@media screen and (min-width:1024px){.container{padding:.25rem var(--sgds-mainnav-padding-x,2rem)}}`,qo=n`svg{vertical-align:middle}`;class Yo extends Be{constructor(){super(...arguments),this.fluid=!1,this.toggleVisibility=!1}_handleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleVisibility())}_toggleVisibility(){this.toggleVisibility=!this.toggleVisibility}render(){return ee`
|
|
1051
|
+
</sgds-dropdown>`;return this._breakpointReached?e:t}}Ro.styles=[...Be.styles,Ai,Pi,To],Ro.dependencies={"sgds-dropdown":Li,"sgds-dropdown-item":Ii,"sgds-icon":_t},e([Ao({context:Io,subscribe:!0}),ze()],Ro.prototype,"_breakpointReached",void 0),e([Ao({context:Eo,subscribe:!0}),ze()],Ro.prototype,"expanded",void 0),e([Le(".nav-link")],Ro.prototype,"navLink",void 0),e([Le(".dropdown-items")],Ro.prototype,"dropdownItems",void 0),e([Le(".dropdown-items a")],Ro.prototype,"menuHeaderButton",void 0),e([Le(".dropdown-items span")],Ro.prototype,"menuHeaderText",void 0),e([Ve({type:Boolean})],Ro.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],Ro.prototype,"disabled",void 0),e([Ve({type:String})],Ro.prototype,"ariaLabel",void 0),e([Ie({slot:"toggler"})],Ro.prototype,"togglerNodes",void 0),e([Ie()],Ro.prototype,"defaultNodes",void 0);var No=n`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media screen and (min-width:512px){:host([expand=sm]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=sm]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:768px){:host([expand=md]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=md]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1024px){:host([expand=lg]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=lg]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1280px){:host([expand=xl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1440px){:host([expand=xxl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xxl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (max-width:511px){:host(:not([disabled])[active][expand=sm]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:767px){:host(:not([disabled])[active][expand=md]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1023px){:host(:not([disabled])[active][expand=lg]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1279px){:host(:not([disabled])[active][expand=xl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1439px){:host(:not([disabled])[active][expand=xxl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}::slotted(*){--sgds-link-color-default:var(--sgds-color-default);--sgds-link-color-emphasis:var(--sgds-color-default);align-items:center;box-sizing:border-box;color:var(--sgds-color-default)!important;cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);height:auto!important;line-height:var(--sgds-line-height-2-xs,20px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none!important}@media screen and (min-width:1024px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}:host(:not([disabled])[active]) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important}:host(:not([disabled]):not([active])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-color-default)!important}:host(:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-color-default)!important}:host(:not([disabled]):not([active])) ::slotted(a:active){color:var(--sgds-color-default)!important}:host(:not([disabled])[active]) ::slotted(a:active){color:var(--sgds-primary-color-default)!important}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-40)}`;class jo extends Be{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase());if(s.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}})}if(1===s.length){const e=s[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",e=>{e.target.closest("sgds-mainnav").hide()})}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}jo.styles=[...Be.styles,No],e([Ve({type:Boolean,reflect:!0})],jo.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],jo.prototype,"disabled",void 0),e([ot("disabled")],jo.prototype,"_handleDisabled",null),lt("sgds-mainnav",Oo),lt("sgds-mainnav-dropdown",Ro),lt("sgds-mainnav-item",jo);var Uo=n`b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc;text-decoration:none!important}a[target=_blank]:after{height:var(--sgds-icon-size-sm,1rem)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-sm,1rem)!important}a:hover{color:#0022b9}.sgds-masthead{color-scheme:var(--sgds-color-scheme,only light);font-family:Inter,system-ui,sans-serif;font-size:.875rem;line-height:1.25rem}.banner{background-color:light-dark(#f7f7f7,#1a1a1a)}.container{margin-left:auto;margin-right:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:.25rem var(--sgds-mainnav-mobile-padding-x,1.25rem);width:100%}:host([fluid]) .container{max-width:none}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap:0 .75rem}.sgds-masthead-identify-icon{align-self:center;display:block;height:20px;transform:rotate(180deg);transition:transform .3s ease-in-out 0s;user-select:none;width:20px}.sgds-masthead-identify-icon.show{transform:rotate(0deg)}.sgds-masthead-button{align-items:center;color:light-dark(#0269d0,#60aaf4);cursor:pointer;display:flex;gap:4px}.sgds-masthead-button:hover{color:light-dark(#0151a0,#96c7f7)}.panel{background-color:light-dark(#f7f7f7,#1a1a1a)}.sgds-masthead .sgds-masthead-content{display:grid;grid-template-rows:0fr;opacity:0;overflow:hidden;padding-bottom:0;padding-top:0;transition:grid-template-rows .3s cubic-bezier(.25,0,.25,1),opacity .3s cubic-bezier(.25,0,.25,1),padding .3s cubic-bezier(.25,0,.25,1)}.sgds-masthead .sgds-masthead-content.show{grid-template-rows:1fr;opacity:1;padding-bottom:1rem;padding-top:1rem}.sgds-masthead .sgds-masthead-content>.content-grid{min-height:0}.content-grid{display:grid;gap:1rem;grid-template-columns:1fr}.icon{margin-top:-.1em}.wrapper{display:flex;gap:.5rem}.content{display:flex;flex-direction:column;gap:.25rem}.content .title{font-weight:600}.content article{color:light-dark(#525252,#a5a5a5)}.banner-icon,.banner-icon-inline{height:20px;width:20px}.banner-icon path,.banner-icon-inline path{fill:light-dark(#1a1a1a,#f3f3f3)}a.trusted-websites-link{color:light-dark(#0269d0,#60aaf4);text-decoration:underline;width:fit-content}a.trusted-websites-link:hover{color:light-dark(#0151a0,#96c7f7)}.sgds-masthead-button:focus-visible,a.trusted-websites-link:focus-visible{outline:4px solid #60aaf4}@media screen and (min-width:768px){.content-grid{gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}}@media screen and (min-width:1024px){.container{padding:.25rem var(--sgds-mainnav-padding-x,2rem)}}`,qo=n`svg{vertical-align:middle}`;class Yo extends Be{constructor(){super(...arguments),this.fluid=!1,this.toggleVisibility=!1}_handleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleVisibility())}_toggleVisibility(){this.toggleVisibility=!this.toggleVisibility}render(){return ee`
|
|
1052
1052
|
<div id="sgds-masthead" class="sgds-masthead">
|
|
1053
1053
|
<div class="banner">
|
|
1054
1054
|
<div class="container">
|
|
@@ -1200,7 +1200,7 @@ class Mo{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
1200
1200
|
</div>
|
|
1201
1201
|
</div>
|
|
1202
1202
|
</div>
|
|
1203
|
-
`}}function Wo(e){const t=e.tagName.toLowerCase();return"-1"!==e.getAttribute("tabindex")&&(!e.hasAttribute("disabled")&&((!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&(!("input"===t&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&(null!==e.offsetParent&&("hidden"!==window.getComputedStyle(e).visibility&&(!("audio"!==t&&"video"!==t||!e.hasAttribute("controls"))||(!!e.hasAttribute("tabindex")||(!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(t)))))))))}Yo.styles=[...Be.styles,qo,$t,Uo],e([Ve({type:Boolean,reflect:!0})],Yo.prototype,"fluid",void 0),e([ze()],Yo.prototype,"toggleVisibility",void 0),lt("sgds-masthead",Yo);let Ko=[];class Go{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Ko.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Ko=Ko.filter(e=>e!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Ko[Ko.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){var t,s;const i=[];return function e(t){t instanceof HTMLElement&&(i.push(t),null!==t.shadowRoot&&"open"===t.shadowRoot.mode&&e(t.shadowRoot)),[...t.children].forEach(t=>e(t))}(e),{start:null!==(t=i.find(e=>Wo(e)))&&void 0!==t?t:null,end:null!==(s=i.reverse().find(e=>Wo(e)))&&void 0!==s?s:null}}(this.element),s="forward"===this.tabDirection?e:t;"function"==typeof(null==s?void 0:s.focus)&&s.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}}var Jo=n`:host(:not([size=fullscreen])) .modal-panel{background-color:var(--sgds-surface-default);max-width:var(--sgds-dimension-640);padding:var(--sgds-padding-xl)}:host([size=sm]) .modal-panel{max-width:var(--sgds-dimension-480)}:host([size=md]) .modal-panel{max-width:var(--sgds-dimension-640)}:host([size=lg]) .modal-panel{max-width:var(--sgds-dimension-800)}:host([size=xl]) .modal-panel{max-width:var(--sgds-dimension-1280)}:host([size=fullscreen]) .modal-overlay{background-color:var(--sgds-surface-default)}:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-xl) var(--sgds-margin-lg)}.modal{align-items:start;bottom:0;display:flex;font-family:var(--sgds-body-font-family);justify-content:center;left:0;position:fixed;right:0;top:0;z-index:var(--sgds-z-index-modal)}.modal-panel{border-radius:var(--sgds-border-radius-md);display:flex;flex-direction:column;gap:var(--sgds-gap-2-xl);margin:auto;max-height:calc(100% - var(--sgds-margin-xl) - var(--sgds-margin-xl));width:100%;z-index:2}.modal-panel:focus{outline:none}.modal-content{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-2-xl);min-height:0;position:relative}.modal-header__close{position:absolute;right:calc(var(--sgds-padding-md)*-1);top:calc(var(--sgds-padding-md)*-1)}@media screen and (min-width:512px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-xl)}}@media screen and (min-width:768px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-2-xl);max-height:calc(100% - var(--sgds-margin-2-xl) - var(--sgds-margin-2-xl))}}@media screen and (min-width:1024px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-4-xl) var(--sgds-margin-lg);max-height:calc(100% - var(--sgds-margin-4-xl) - var(--sgds-margin-4-xl));max-width:var(--sgds-dimension-888)}}@media screen and (min-width:1280px){:host([size=fullscreen]) .modal-panel{max-width:var(--sgds-dimension-1168)}}@media screen and (min-width:1440px){:host([size=fullscreen]) .modal-panel{max-width:var(--sgds-dimension-1312)}}.modal.show .modal-panel{opacity:1;transform:none}.modal-header{display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;max-width:var(--sgds-dimension-872)}.modal-header__title-description{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}:host([size=fullscreen]) .modal-header__title-description{gap:var(--sgds-gap-md)}slot[name=title]::slotted(*){align-items:center;display:flex;flex:1 1 auto;font-size:var(--sgds-font-size-heading-sm)!important;gap:1rem;line-height:var(--sgds-line-height-lg)!important;margin:var(--sgds-margin-none)!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);line-height:var(--sgds-line-height-xs);margin:var(--sgds-margin-none)!important}.modal-body{-webkit-overflow-scrolling:touch;flex:1 1 auto;overflow:auto}.modal-body slot::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none)}.modal-footer{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:var(--sgds-gap-md);justify-content:flex-end;padding-top:var(--sgds-padding-md)}.modal:not(.has-footer) .modal-footer{display:none}.modal-overlay{background-color:var(--sgds-bg-overlay);bottom:0;left:0;position:fixed;right:0;top:0}[hidden]{display:none}`;class Xo extends Be{constructor(){super(...arguments),this.hasSlotController=new $i(this,"footer"),this.open=!1,this.noAnimation=!1,this.size="md",this.hasFooterSlot=!1,this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Go(this),this._resizeHandler=this._debounce(this._onWindowResize.bind(this),200)}disconnectedCallback(){super.disconnectedCallback(),this._removeResizeListener(),go(this)}firstUpdated(e){super.firstUpdated(e),this._onWindowResize(),this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),uo(this))}updated(){this.hasFooterSlot||(this.hasFooterSlot=this.hasSlotController.test("footer"))}_debounce(e,t){let s;return(...i)=>{clearTimeout(s),s=window.setTimeout(()=>e(...i),t)}}_onWindowResize(){const e=this.panel.getBoundingClientRect().width,t=this.querySelectorAll("sgds-button[slot='footer']");this.panel&&(t.length<=1||(e<512||"fullscreen"===this.size&&e<
|
|
1203
|
+
`}}function Wo(e){const t=e.tagName.toLowerCase();return"-1"!==e.getAttribute("tabindex")&&(!e.hasAttribute("disabled")&&((!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&(!("input"===t&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&(null!==e.offsetParent&&("hidden"!==window.getComputedStyle(e).visibility&&(!("audio"!==t&&"video"!==t||!e.hasAttribute("controls"))||(!!e.hasAttribute("tabindex")||(!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(t)))))))))}Yo.styles=[...Be.styles,qo,$t,Uo],e([Ve({type:Boolean,reflect:!0})],Yo.prototype,"fluid",void 0),e([ze()],Yo.prototype,"toggleVisibility",void 0),lt("sgds-masthead",Yo);let Ko=[];class Go{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Ko.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Ko=Ko.filter(e=>e!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Ko[Ko.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){var t,s;const i=[];return function e(t){t instanceof HTMLElement&&(i.push(t),null!==t.shadowRoot&&"open"===t.shadowRoot.mode&&e(t.shadowRoot)),[...t.children].forEach(t=>e(t))}(e),{start:null!==(t=i.find(e=>Wo(e)))&&void 0!==t?t:null,end:null!==(s=i.reverse().find(e=>Wo(e)))&&void 0!==s?s:null}}(this.element),s="forward"===this.tabDirection?e:t;"function"==typeof(null==s?void 0:s.focus)&&s.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}}var Jo=n`:host(:not([size=fullscreen])) .modal-panel{background-color:var(--sgds-surface-default);max-width:var(--sgds-dimension-640);padding:var(--sgds-padding-xl)}:host([size=sm]) .modal-panel{max-width:var(--sgds-dimension-480)}:host([size=md]) .modal-panel{max-width:var(--sgds-dimension-640)}:host([size=lg]) .modal-panel{max-width:var(--sgds-dimension-800)}:host([size=xl]) .modal-panel{max-width:var(--sgds-dimension-1280)}:host([size=fullscreen]) .modal-overlay{background-color:var(--sgds-surface-default)}:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-xl) var(--sgds-margin-lg)}.modal{align-items:start;bottom:0;display:flex;font-family:var(--sgds-body-font-family);justify-content:center;left:0;position:fixed;right:0;top:0;z-index:var(--sgds-z-index-modal)}.modal-panel{border-radius:var(--sgds-border-radius-md);display:flex;flex-direction:column;gap:var(--sgds-gap-2-xl);margin:auto;max-height:calc(100% - var(--sgds-margin-xl) - var(--sgds-margin-xl));width:100%;z-index:2}.modal-panel:focus{outline:none}.modal-content{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-2-xl);min-height:0;position:relative}.modal-header__close{position:absolute;right:calc(var(--sgds-padding-md)*-1);top:calc(var(--sgds-padding-md)*-1)}@media screen and (min-width:512px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-xl)}}@media screen and (min-width:768px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-2-xl);max-height:calc(100% - var(--sgds-margin-2-xl) - var(--sgds-margin-2-xl))}}@media screen and (min-width:1024px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-4-xl) var(--sgds-margin-lg);max-height:calc(100% - var(--sgds-margin-4-xl) - var(--sgds-margin-4-xl));max-width:var(--sgds-dimension-888)}}@media screen and (min-width:1280px){:host([size=fullscreen]) .modal-panel{max-width:var(--sgds-dimension-1168)}}@media screen and (min-width:1440px){:host([size=fullscreen]) .modal-panel{max-width:var(--sgds-dimension-1312)}}.modal.show .modal-panel{opacity:1;transform:none}.modal-header{display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;max-width:var(--sgds-dimension-872)}.modal-header__title-description{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}:host([size=fullscreen]) .modal-header__title-description{gap:var(--sgds-gap-md)}slot[name=title]::slotted(*){align-items:center;display:flex;flex:1 1 auto;font-size:var(--sgds-font-size-heading-sm)!important;gap:1rem;line-height:var(--sgds-line-height-lg)!important;margin:var(--sgds-margin-none)!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);line-height:var(--sgds-line-height-xs);margin:var(--sgds-margin-none)!important}.modal-body{-webkit-overflow-scrolling:touch;flex:1 1 auto;overflow:auto}.modal-body slot::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none)}.modal-footer{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:var(--sgds-gap-md);justify-content:flex-end;padding-top:var(--sgds-padding-md)}.modal:not(.has-footer) .modal-footer{display:none}.modal-overlay{background-color:var(--sgds-bg-overlay);bottom:0;left:0;position:fixed;right:0;top:0}[hidden]{display:none}`;class Xo extends Be{constructor(){super(...arguments),this.hasSlotController=new $i(this,"footer"),this.open=!1,this.noAnimation=!1,this.size="md",this.hasFooterSlot=!1,this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Go(this),this._resizeHandler=this._debounce(this._onWindowResize.bind(this),200)}disconnectedCallback(){super.disconnectedCallback(),this._removeResizeListener(),go(this)}firstUpdated(e){super.firstUpdated(e),this._onWindowResize(),this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),uo(this))}updated(){this.hasFooterSlot||(this.hasFooterSlot=this.hasSlotController.test("footer"))}_debounce(e,t){let s;return(...i)=>{clearTimeout(s),s=window.setTimeout(()=>e(...i),t)}}_onWindowResize(){const e=this.panel.getBoundingClientRect().width,t=this.querySelectorAll("sgds-button[slot='footer']");this.panel&&(t.length<=1||(e<512||"fullscreen"===this.size&&e<Do?t.forEach(e=>{e.fullWidth=!0}):t.forEach(e=>{e.fullWidth=!1})))}_addResizeListener(){window.addEventListener("resize",this._resizeHandler)}_removeResizeListener(){window.removeEventListener("resize",this._resizeHandler)}async show(){if(!this.open)return this.open=!0,at(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,at(this,"sgds-after-hide")}requestClose(e){if(this.emit("sgds-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){const e=st(this,"modal.denyClose");return void Ge(this.panel,e.keyframes)}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(e){this.open&&"Escape"===e.key&&(e.stopPropagation(),this.requestClose("keyboard"))}_overlayClickHandler(){"fullscreen"!==this.size&&this.requestClose("overlay")}async handleOpenChange(){if(this.open){this.emit("sgds-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),uo(this),await Promise.all([Qe(this.dialog),Qe(this.overlay)]),this.dialog.hidden=!1;const e=st(this,"modal.show"),t=st(this,"modal.overlay.show");!this.noAnimation&&await Promise.all([Ge(this.panel,e.keyframes,e.options),Ge(this.overlay,t.keyframes,t.options)]),this.emit("sgds-after-show"),this.heading.focus(),this._addResizeListener()}else{this.emit("sgds-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([Qe(this.dialog),Qe(this.overlay)]);const e=st(this,"modal.hide"),t=st(this,"modal.overlay.hide");!this.noAnimation&&await Promise.all([Ge(this.overlay,t.keyframes,t.options).then(()=>{this.overlay.hidden=!0}),Ge(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,go(this);const s=this.originalTrigger;"function"==typeof(null==s?void 0:s.focus)&&setTimeout(()=>s.focus()),this.emit("sgds-after-hide"),this._removeResizeListener()}}render(){return ee`
|
|
1204
1204
|
<div
|
|
1205
1205
|
class=${We({modal:!0,show:this.open,"has-footer":this.hasFooterSlot})}
|
|
1206
1206
|
>
|
|
@@ -1351,7 +1351,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1351
1351
|
</div>
|
|
1352
1352
|
${this.label?ee`<span class="label">${this.label}</span>`:ie}
|
|
1353
1353
|
</div>
|
|
1354
|
-
`}}nn.styles=[...Be.styles,on],e([Ve({type:String,reflect:!0})],nn.prototype,"variant",void 0),e([Ve({type:Number,reflect:!0})],nn.prototype,"value",void 0),e([Ve({type:Number,reflect:!0})],nn.prototype,"ariamin",void 0),e([Ve({type:Number,reflect:!0})],nn.prototype,"ariamax",void 0),e([Ve({type:String,reflect:!0})],nn.prototype,"ariaLabel",void 0),e([Ve({type:String,reflect:!0})],nn.prototype,"arialabel",void 0),e([Ve({type:String,reflect:!0})],nn.prototype,"label",void 0),lt("sgds-progress-bar",nn);var rn=n`sgds-input{--input-min-width:var(--sgds-dimension-0)}.input-group{align-items:stretch;display:flex;gap:var(--sgds-gap-none)}.input-group>sgds-input{--input-border-radius:0;flex:1 1 auto;margin-inline:calc(var(--sgds-form-border-width-default)*-1);min-width:0;position:relative;z-index:1}.input-group>sgds-input:focus-within{z-index:3}.input-group>sgds-icon-button.minus-btn{--btn-border-radius:var(--sgds-form-border-radius-md) 0 0 var(--sgds-form-border-radius-md)}.input-group>sgds-icon-button.plus-btn{--btn-border-radius:0 var(--sgds-form-border-radius-md) var(--sgds-form-border-radius-md) 0}.input-group sgds-button:focus{z-index:3}.visually-hidden{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}`;class ln extends(da(fa)){constructor(){super(...arguments),this.value=0,this.step=1,this.noValidate=!1,this.readonly=!1,this.defaultValue=0}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}async _handleChange(){const
|
|
1354
|
+
`}}nn.styles=[...Be.styles,on],e([Ve({type:String,reflect:!0})],nn.prototype,"variant",void 0),e([Ve({type:Number,reflect:!0})],nn.prototype,"value",void 0),e([Ve({type:Number,reflect:!0})],nn.prototype,"ariamin",void 0),e([Ve({type:Number,reflect:!0})],nn.prototype,"ariamax",void 0),e([Ve({type:String,reflect:!0})],nn.prototype,"ariaLabel",void 0),e([Ve({type:String,reflect:!0})],nn.prototype,"arialabel",void 0),e([Ve({type:String,reflect:!0})],nn.prototype,"label",void 0),lt("sgds-progress-bar",nn);var rn=n`sgds-input{--input-min-width:var(--sgds-dimension-0)}.input-group{align-items:stretch;display:flex;gap:var(--sgds-gap-none)}.input-group>sgds-input{--input-border-radius:0;flex:1 1 auto;margin-inline:calc(var(--sgds-form-border-width-default)*-1);min-width:0;position:relative;z-index:1}.input-group>sgds-input:focus-within{z-index:3}.input-group>sgds-icon-button.minus-btn{--btn-border-radius:var(--sgds-form-border-radius-md) 0 0 var(--sgds-form-border-radius-md)}.input-group>sgds-icon-button.plus-btn{--btn-border-radius:0 var(--sgds-form-border-radius-md) var(--sgds-form-border-radius-md) 0}.input-group sgds-button:focus{z-index:3}.visually-hidden{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}`;class ln extends(da(fa)){constructor(){super(...arguments),this.value=0,this.step=1,this.noValidate=!1,this.readonly=!1,this.defaultValue=0}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}async _handleChange(e){e.stopPropagation();const t=await this._sgdsInput;(parseInt(t.value)<this.step||""===t.value)&&(t.value="0"),this.value=parseInt(t.value),this._mixinSetFormValue(),this.emit("sgds-change"),this._mixinShouldSkipSgdsValidation()||(this._mixinValidate(t.input),this.invalid=!this._mixinReportValidity())}async _handleInputChange(e){e.stopPropagation();const t=await this._sgdsInput;(parseInt(t.value)<this.step||""===t.value)&&(t.value="0"),this.value=parseInt(t.value),this._mixinSetFormValue(),this.emit("sgds-input"),this._mixinShouldSkipSgdsValidation()||(this.invalid=!1,this._mixinValidate(t.input))}async _mixinResetFormControl(){const e=await this._sgdsInput;this.value=this.defaultValue,e.input.value=this.value.toString(),this._mixinResetValidity(e.input)}_handleKeyDown(e){const t=["Backspace","ArrowUp","ArrowDown","ArrowLeft","ArrowRight",...Array.from(Array(10).keys()).map(e=>e.toString()),"Tab"];t.includes(e.key)||e.preventDefault()}_handleInvalid(){this.invalid=!0}_handleValid(){this.invalid=!1}plus(){this.plusBtn.click()}minus(){this.minusBtn.click()}async _onPlus(e){const t=await this._sgdsInput;e.preventDefault(),e.stopPropagation(),this.value=parseInt(t.value)+parseInt(t.step.toString()),this._validateOnClick(t.input),this.emit("sgds-change")}async _onMinus(e){const t=await this._sgdsInput;e.preventDefault(),e.stopPropagation(),this.value<this.step?this.value=0:this.value=parseInt(t.value)-parseInt(t.step.toString()),this._validateOnClick(t.input),this.emit("sgds-change")}async _validateOnClick(e){const t=await this._sgdsInput;await t.updateComplete,this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||(this._mixinValidate(e),this.invalid=!this._mixinReportValidity())}_renderFeedback(){const e="both"===this.hasFeedback||"text"===this.hasFeedback;return this.invalid&&e?gt` <div class="invalid-feedback-container">
|
|
1355
1355
|
<slot name="invalidIcon">
|
|
1356
1356
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
1357
1357
|
<path
|
|
@@ -1419,7 +1419,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1419
1419
|
<div id="${this._controlId}-announcer" aria-live="assertive" class="visually-hidden">${this.value}</div>
|
|
1420
1420
|
${this._renderFeedback()}
|
|
1421
1421
|
</div>
|
|
1422
|
-
`}}ln.styles=[...fa.styles,ma,qo,na,rn],ln.dependencies={"sgds-input":Qa,"sgds-icon-button":Ya},e([Le("sgds-icon-button[ariaLabel^='increase by']")],ln.prototype,"plusBtn",void 0),e([Le("sgds-icon-button[ariaLabel^='decrease by']")],ln.prototype,"minusBtn",void 0),e([Ve({type:Number,reflect:!0})],ln.prototype,"value",void 0),e([Ve({type:Number})],ln.prototype,"step",void 0),e([Ve({type:Number})],ln.prototype,"min",void 0),e([Ve({type:Number})],ln.prototype,"max",void 0),e([Ve({type:String,reflect:!0})],ln.prototype,"hasFeedback",void 0),e([Ve({type:String,reflect:!0})],ln.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],ln.prototype,"noValidate",void 0),e([Ve({type:Boolean,reflect:!0})],ln.prototype,"readonly",void 0),e([ra()],ln.prototype,"defaultValue",void 0),e([
|
|
1422
|
+
`}}ln.styles=[...fa.styles,ma,qo,na,rn],ln.dependencies={"sgds-input":Qa,"sgds-icon-button":Ya},e([Le("sgds-icon-button[ariaLabel^='increase by']")],ln.prototype,"plusBtn",void 0),e([Le("sgds-icon-button[ariaLabel^='decrease by']")],ln.prototype,"minusBtn",void 0),e([Ve({type:Number,reflect:!0})],ln.prototype,"value",void 0),e([Ve({type:Number})],ln.prototype,"step",void 0),e([Ve({type:Number})],ln.prototype,"min",void 0),e([Ve({type:Number})],ln.prototype,"max",void 0),e([Ve({type:String,reflect:!0})],ln.prototype,"hasFeedback",void 0),e([Ve({type:String,reflect:!0})],ln.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],ln.prototype,"noValidate",void 0),e([Ve({type:Boolean,reflect:!0})],ln.prototype,"readonly",void 0),e([ra()],ln.prototype,"defaultValue",void 0),e([De("sgds-input")],ln.prototype,"_sgdsInput",void 0),lt("sgds-quantity-toggle",ln);var dn=n`:host{outline:0}.form-check-input[type=radio]{border-radius:50%}.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg width="8" height="8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 4a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z" fill="%23fff"/></svg>')}.form-check-input[checked].is-invalid{background-color:var(--sgds-form-danger-surface-default)}`;class cn extends Be{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.invalid=!1,this.autofocus=!1,this.radioId=Zi("radio")}connectedCallback(){super.connectedCallback(),this.setInitialAttributes(),this.addEventListeners()}handleCheckedChange(){var e;this.checked&&this.autofocus&&(null===(e=this.input)||void 0===e||e.focus()),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleBlur(){this.emit("sgds-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.emit("sgds-focus")}addEventListeners(){this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("click",()=>this.handleClick()),this.addEventListener("focus",()=>this.handleFocus())}setInitialAttributes(){this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return ee`
|
|
1423
1423
|
<div class="form-check">
|
|
1424
1424
|
<input
|
|
1425
1425
|
class=${We({"form-check-input":!0,"is-invalid":this.invalid})}
|
|
@@ -1480,13 +1480,13 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1480
1480
|
</div>
|
|
1481
1481
|
`:ie}
|
|
1482
1482
|
</fieldset>
|
|
1483
|
-
`}}pn.styles=[...fa.styles,hn],e([Le("slot:not([name])")],pn.prototype,"defaultSlot",void 0),e([ze()],pn.prototype,"defaultValue",void 0),e([Ve({reflect:!0})],pn.prototype,"value",void 0),e([Ve({type:String,reflect:!0})],pn.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],pn.prototype,"hasFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],pn.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],pn.prototype,"noValidate",void 0),e([Ve({type:Boolean,reflect:!0})],pn.prototype,"autofocus",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],pn.prototype,"_handleValueChange",null),e([ot("invalid",{waitUntilFirstUpdate:!0})],pn.prototype,"_handleInvalidChange",null),e([ze()],pn.prototype,"_isTouched",void 0),e([
|
|
1483
|
+
`}}pn.styles=[...fa.styles,hn],e([Le("slot:not([name])")],pn.prototype,"defaultSlot",void 0),e([ze()],pn.prototype,"defaultValue",void 0),e([Ve({reflect:!0})],pn.prototype,"value",void 0),e([Ve({type:String,reflect:!0})],pn.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],pn.prototype,"hasFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],pn.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],pn.prototype,"noValidate",void 0),e([Ve({type:Boolean,reflect:!0})],pn.prototype,"autofocus",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],pn.prototype,"_handleValueChange",null),e([ot("invalid",{waitUntilFirstUpdate:!0})],pn.prototype,"_handleInvalidChange",null),e([ze()],pn.prototype,"_isTouched",void 0),e([Ie()],pn.prototype,"_radios",void 0),e([ot("_isTouched",{waitUntilFirstUpdate:!0})],pn.prototype,"_handleIsTouched",null),e([ot("disabled",{waitUntilFirstUpdate:!0})],pn.prototype,"_handleDisabledChange",null),lt("sgds-radio",cn),lt("sgds-radio-group",pn);var un=n`:host{--sidenav-sticky-top:0rem}.sticky{height:calc(100vh - var(--sidenav-sticky-top));overflow-y:visible;position:sticky;top:var(--sidenav-sticky-top)}`;class gn extends Be{constructor(){super(...arguments),this.sticky=!1}get items(){return[...this.defaultNodes||[]].filter(e=>void 0!==e.tagName)}async onToggle(e){const t="SGDS-SIDENAV-LINK"===e.target.tagName;if(e.defaultPrevented||t)return;this.items}render(){return ee`
|
|
1484
1484
|
<nav class=${We({sticky:this.sticky})}>
|
|
1485
1485
|
<div>
|
|
1486
1486
|
<slot @click=${this.onToggle}></slot>
|
|
1487
1487
|
</div>
|
|
1488
1488
|
</nav>
|
|
1489
|
-
`}}gn.styles=[...Be.styles,un],e([Ve({type:Boolean,attribute:!0})],gn.prototype,"sticky",void 0),e([
|
|
1489
|
+
`}}gn.styles=[...Be.styles,un],e([Ve({type:Boolean,attribute:!0})],gn.prototype,"sticky",void 0),e([Ie()],gn.prototype,"defaultNodes",void 0);var vn=n`:host([class^=second-level]) .sidenav-btn{font-weight:var(--sgds-font-weight-regular);padding-left:var(--sgds-padding-3-xl)}button{all:unset}.sidenav-btn{background:0;border:0;border-radius:var(--sgds-border-radius-md);display:flex;font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold);gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-xs);padding:var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm) calc(var(--sgds-padding-sm) + var(--sgds-padding-2-xs));text-align:initial;width:100%;.caret-icon,slot[name=caret-icon]::slotted(*){margin-bottom:auto;margin-left:auto;transform:rotate(180deg);transition:all .3s ease-in-out}}.sidenav-btn:hover:not(.disabled){background-color:var(--sgds-bg-translucent-subtle)}.sidenav-btn.active{color:var(--sgds-color-default)}.sidenav-btn.disabled{opacity:var(--sgds-opacity-40);pointer-events:none}.sidenav-btn:not(.active){.caret-icon,slot[name=caret-icon]::slotted(*){transform:rotate(0deg)}}.sidenav-btn:focus-visible:not(.disabled){background-color:var(--sgds-bg-translucent-subtle)}.sidenav-btn:focus-visible:not(.disabled){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.no-menu-default::slotted(a){background:0;border:0;border-radius:var(--sgds-border-radius-md);color:inherit!important;display:flex;font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold)!important;gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-xs)!important;padding:var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm) calc(var(--sgds-padding-sm) + var(--sgds-padding-2-xs));text-decoration:none!important}.no-menu-default::slotted(a:focus-visible){background-color:var(--sgds-bg-translucent-subtle)}.no-menu-default::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([class^=first-level][active]) .no-menu-default::slotted(a){background-color:var(--sgds-primary-surface-translucent);color:var(--sgds-primary-color-emphasis)!important}:host([class^=first-level][disabled]) .no-menu-default::slotted(a){opacity:var(--sgds-opacity-40);pointer-events:none}`;class mn extends Be{constructor(){super(...arguments),this.active=!1,this.disabled=!1,this.isLink=!1,this._collapseId=Zi("sidenav","collapse"),this._buttonId=Zi("sidenav","button"),this._levelId=Zi("sidenav","this"),this._firstLevelId="first-level-"+this._levelId,this._secondLevelId="second-level-"+this._levelId,this._thirdLevelId="third-level-"+this._levelId,this.index="-1"}_onToggle(){this.emit("sgds-toggle",{detail:{index:this.index}})}async show(){if(!this.isLink&&!this.active)return this.active=!0,at(this,"sgds-after-show")}async hide(){if(!this.isLink&&this.active)return this.active=!1,at(this,"sgds-after-hide")}connectedCallback(){super.connectedCallback(),this.classList.add(this._firstLevelId)}firstUpdated(e){super.firstUpdated(e),this.isLink||(this.body.hidden=!this.active,this.body.style.height=this.active?"auto":"0"),this._handleOpenMenu()}_handleOpenMenu(){this.active||(this.active=this._items.some(e=>e.active))}_handleSummaryClick(){this.active?this.hide():this.show(),this._onToggle(),this.header.focus()}_handleSummaryKeyDown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.active?this.hide():this.show()),"ArrowUp"!==e.key&&"ArrowLeft"!==e.key||(e.preventDefault(),this.hide()),"ArrowDown"!==e.key&&"ArrowRight"!==e.key||(e.preventDefault(),this.show())}async _handleOpenChange(){if(!this.isLink)if(this.active){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.active=!1);await Qe(this.body),this.body.hidden=!1;const{keyframes:e,options:t}=st(this,"sidenav.show");await Ge(this.body,Xe(e,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("sgds-after-show")}else{if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.active=!0);await Qe(this.body);const{keyframes:e,options:t}=st(this,"sidenav.hide");await Ge(this.body,Xe(e,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("sgds-after-hide")}}_handleSlotChange(e){const t=e.target.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase());if(t.length>1)return console.error("More than one anchor tag is added to sgds-sidenav-item");if(1===t.length){const e=t[0];return this.disabled&&e.setAttribute("tabindex","-1"),this.active&&e.setAttribute("aria-current","true"),this.isLink=!0}e.target.assignedElements({flatten:!0}).filter(e=>"sgds-sidenav-item"===e.tagName.toLowerCase()).forEach(e=>{const t=Array.from(e.classList).filter(e=>e.startsWith("first-level"))[0];e.classList.replace(t,this._secondLevelId)}),Array.from(this.classList).some(e=>e.startsWith("second-level"))&&this._items.forEach(e=>e.classList.add(this._thirdLevelId)),this._handleOpenMenu()}render(){const e=ee`
|
|
1490
1490
|
<button
|
|
1491
1491
|
@click=${this._handleSummaryClick}
|
|
1492
1492
|
@keydown=${this._handleSummaryKeyDown}
|
|
@@ -1512,7 +1512,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1512
1512
|
</div>
|
|
1513
1513
|
`,t=ee` <slot @slotchange=${this._handleSlotChange} class="no-menu-default"></slot> `;return ee`
|
|
1514
1514
|
<div class="sidenav-item" aria-haspopup="${!this.isLink}">${this.isLink?t:e}</div>
|
|
1515
|
-
`}}mn.styles=[...Be.styles,vn],mn.dependencies={"sgds-icon":_t},e([Le(".sidenav-body")],mn.prototype,"body",void 0),e([Le(".sidenav-btn")],mn.prototype,"header",void 0),e([Ve({type:Boolean,reflect:!0})],mn.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],mn.prototype,"disabled",void 0),e([Ve({type:String})],mn.prototype,"ariaLabel",void 0),e([ze()],mn.prototype,"isLink",void 0),e([ot("active",{waitUntilFirstUpdate:!0})],mn.prototype,"_handleOpenChange",null),e([
|
|
1515
|
+
`}}mn.styles=[...Be.styles,vn],mn.dependencies={"sgds-icon":_t},e([Le(".sidenav-body")],mn.prototype,"body",void 0),e([Le(".sidenav-btn")],mn.prototype,"header",void 0),e([Ve({type:Boolean,reflect:!0})],mn.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],mn.prototype,"disabled",void 0),e([Ve({type:String})],mn.prototype,"ariaLabel",void 0),e([ze()],mn.prototype,"isLink",void 0),e([ot("active",{waitUntilFirstUpdate:!0})],mn.prototype,"_handleOpenChange",null),e([Ie()],mn.prototype,"_items",void 0),it("sidenav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),it("sidenav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var fn=n`:host([class^=third-level]) ::slotted(a){padding-left:calc(var(--sgds-padding-xl) + var(--sgds-padding-3-xl))}::slotted(a){--sgds-link-color-default:var(--sgds-color-default);border-radius:var(--sgds-border-radius-md);color:var(--sgds-color-default,var(--sgds-link-color-default));display:block;padding:var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-3-xl);text-decoration:none!important}:host([active]) ::slotted(a){--sgds-link-color-default:var(--sgds-primary-color-emphasis);background-color:var(--sgds-primary-surface-translucent);color:var(--sgds-primary-color-emphasis,var(--sgds-link-color-default))}:host(:not([disabled]):not([active])) ::slotted(a:hover){background-color:var(--sgds-bg-translucent-subtle)}::slotted(a:focus),::slotted(a:focus-visible),::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-color-default,var(--sgds-link-color-emphasis))}:host([active]) ::slotted(a:focus),:host([active]) ::slotted(a:focus-visible),:host([active]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-emphasis);color:var(--sgds-primary-color-emphasis,var(--sgds-link-color-emphasis))}:host([disabled]) ::slotted(a){opacity:var(--sgds-opacity-40);pointer-events:none}:host([disabled]) ::slotted(a:focus-visible){outline:0}::slotted(a:focus-visible){background-color:var(--sgds-bg-translucent-subtle)}::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([active]) ::slotted(a:focus-visible){background-color:var(--sgds-primary-bg-translucent)}`;class bn extends Be{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-disabled",`${this.disabled}`)}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`),this._anchor[0].setAttribute("aria-disabled",`${this.disabled}`),this.disabled||this._anchor[0].removeAttribute("tabindex")}_handleSlotChange(){this._anchor[0].setAttribute("aria-disabled",`${this.disabled}`),this.disabled&&(this._anchor[0].setAttribute("tabindex","-1"),this._anchor[0].removeAttribute("href"),this._anchor[0].setAttribute("role","link"))}render(){return ee` <slot @slotchange=${this._handleSlotChange}></slot> `}}bn.styles=[...Be.styles,fn],e([Ve({type:Boolean,reflect:!0})],bn.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],bn.prototype,"disabled",void 0),e([Ie({flatten:!0})],bn.prototype,"_anchor",void 0),e([ot("disabled",{waitUntilFirstUpdate:!0})],bn.prototype,"_handleDisabled",null),lt("sgds-sidenav",gn),lt("sgds-sidenav-item",mn),lt("sgds-sidenav-link",bn);var wn=n`.skeleton{--bg:var(--sgds-bg-translucent-subtle);background-color:var(--bg);border-radius:var(--sgds-border-radius-sm);display:flex;flex-direction:column;gap:var(--sgds-gap-xs);max-width:100%}.skeleton.skeleton-paragraph{background-color:transparent}.skeleton.skeleton-paragraph.auto-size-rows>div[class*=skeleton-row]{background-color:var(--sgds-bg-translucent);border-radius:var(--sgds-border-radius-sm);height:-webkit-fill-available}.sheen{--sheen-color:var(--sgds-bg-translucent);animation:sheen 8s ease-in-out infinite;background:linear-gradient(270deg,var(--bg) 0,var(--sheen-color) 33.33%,var(--sheen-color) 66.67%,var(--bg) 100%);background-size:400% 100%}@keyframes sheen{0%{background-position:200% 0}to{background-position:-200% 0}}`;class yn extends Be{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="",this.sheen=!1}render(){const e={width:this.width||void 0,height:this.height||void 0,borderRadius:this.borderRadius||void 0};return ee`
|
|
1516
1516
|
<div
|
|
1517
1517
|
class=${We({skeleton:!0,"skeleton-paragraph":this.rows>0,"auto-size-rows":this.rows>0,sheen:this.sheen&&!this.rows})}
|
|
1518
1518
|
style=${Object.entries(e).filter(([e,t])=>t).map(([e,t])=>`${e.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${t}`).join("; ")}
|
|
@@ -1546,7 +1546,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1546
1546
|
</div>
|
|
1547
1547
|
`)}
|
|
1548
1548
|
</div>
|
|
1549
|
-
`}}xn.styles=[...Be.styles,_n],xn.dependencies={"sgds-icon":_t},e([Ve({type:Array})],xn.prototype,"steps",void 0),e([Ve({type:Number,reflect:!0})],xn.prototype,"activeStep",void 0),e([Ve({type:String,reflect:!0})],xn.prototype,"orientation",void 0),e([Ve({type:Boolean,reflect:!0})],xn.prototype,"clickable",void 0),e([Ve({type:Boolean,reflect:!0})],xn.prototype,"linear",void 0),e([ra("activeStep")],xn.prototype,"defaultActiveStep",void 0),e([
|
|
1549
|
+
`}}xn.styles=[...Be.styles,_n],xn.dependencies={"sgds-icon":_t},e([Ve({type:Array})],xn.prototype,"steps",void 0),e([Ve({type:Number,reflect:!0})],xn.prototype,"activeStep",void 0),e([Ve({type:String,reflect:!0})],xn.prototype,"orientation",void 0),e([Ve({type:Boolean,reflect:!0})],xn.prototype,"clickable",void 0),e([Ve({type:Boolean,reflect:!0})],xn.prototype,"linear",void 0),e([ra("activeStep")],xn.prototype,"defaultActiveStep",void 0),e([Ie()],xn.prototype,"_slotNodes",void 0),e([Ve({type:Boolean})],xn.prototype,"hasDefaultSlot",void 0),e([ot("activeStep",{waitUntilFirstUpdate:!0})],xn.prototype,"_handleActiveStepChange",null),e([ot("clickable",{waitUntilFirstUpdate:!0})],xn.prototype,"_handleClickableChange",null),e([ot("orientation",{waitUntilFirstUpdate:!0})],xn.prototype,"_handleOrientationChange",null);var kn=n`:host{display:contents}.stepper-item-container{flex-basis:1em;flex-grow:1;flex-shrink:1;position:relative;width:fit-content}.stepper-item,.stepper-item-container{align-items:center;display:flex;flex-direction:column}.stepper-item{gap:var(--sgds-gap-sm)}.stepper-item.vertical{align-items:flex-start;flex-direction:row;margin-bottom:var(--sgds-padding-xl)}.stepper-item.clickable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.stepper-item:not(.first):not(.vertical):before{background:var(--sgds-border-color-translucent);content:" ";height:var(--sgds-dimension-2);left:calc(-50% + 16px);position:absolute;top:15px;width:calc(100% - var(--sgds-dimension-32))}:host(:not(.last)) .stepper-item-container .stepper-item.vertical:after{background:var(--sgds-bg-translucent);content:" ";height:calc(100% - var(--sgds-dimension-32));left:15px;position:absolute;top:32px;width:var(--sgds-dimension-2)}.stepper-item-container .stepper-item.active:not(.first):before,.stepper-item-container .stepper-item.completed:not(.first):before,:host(:not(.last)) .stepper-item-container .stepper-item.completed:after{background:var(--sgds-primary-border-color-default)}.stepper-item.clickable{cursor:pointer}.stepper-marker{align-items:center;background:var(--sgds-bg-translucent);border:var(--sgds-border-width-2) solid var(--sgds-border-color-transparent);border-radius:50%;color:var(--sgds-color-default);display:flex;flex-shrink:0;height:var(--sgds-dimension-32);justify-content:center;width:var(--sgds-dimension-32);z-index:1}.stepper-detail{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs);max-width:var(--sgds-dimension-128);text-align:center}.stepper-item.vertical .stepper-detail{max-width:unset;padding:var(--sgds-padding-2-xs) 0 0;text-align:left}.stepper-item:not(.active):not(.completed) .stepper-label{color:var(--sgds-color-subtle)}.stepper-item.clickable:focus .stepper-marker,.stepper-item.clickable:focus-visible .stepper-marker,.stepper-item.clickable:hover .stepper-marker{background-color:var(--sgds-primary-surface-emphasis);border-color:var(--sgds-border-color-transparent);color:var(--sgds-color-fixed-light)}.stepper-item.clickable:focus .stepper-label,.stepper-item.clickable:focus-visible .stepper-label,.stepper-item.clickable:hover .stepper-label{color:var(--sgds-primary-color-emphasis)}.stepper-item.clickable .stepper-label{color:var(--sgds-primary-color-default)}.stepper-item.completed .stepper-marker{background-color:var(--sgds-bg-transparent);border:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.stepper-item.active .stepper-marker{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}.stepper-slot{color:var(--sgds-color-subtle);display:flex;flex-direction:column;font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);gap:var(--sgds-gap-xs);letter-spacing:var(--sgds-letter-spacing-normal);line-height:var(--sgds-line-height-2-xs)}.stepper-item.disabled{opacity:var(--sgds-opacity-40)}`;class Cn extends Be{constructor(){super(...arguments),this.stepHeader="",this.clickable=!1,this.active=!1,this.disabled=!1,this.completed=!1,this.stepIndex=0,this.orientation="horizontal",this.isFirstOfType=!1}render(){const e=!this.disabled&&this.clickable;return ee`
|
|
1550
1550
|
<div class="stepper-item-container">
|
|
1551
1551
|
<div
|
|
1552
1552
|
class="stepper-item ${We({first:this.isFirstOfType,active:this.active,completed:this.completed,clickable:this.clickable,vertical:"vertical"===this.orientation,disabled:this.disabled})}"
|
|
@@ -1628,7 +1628,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1628
1628
|
`:ie}
|
|
1629
1629
|
</div>
|
|
1630
1630
|
</div>
|
|
1631
|
-
`}}zn.styles=[...Be.styles,Mn],zn.dependencies={"sgds-close-button":ft,"sgds-icon":_t,"sgds-icon-button":Ya},e([Ve({type:Boolean,reflect:!0})],zn.prototype,"show",void 0),e([Ve({type:Boolean,reflect:!0})],zn.prototype,"dismissible",void 0),e([Po({context:Zn}),Ve({type:Boolean})],zn.prototype,"noClampAction",void 0),e([Ve({type:Boolean,reflect:!0})],zn.prototype,"fluid",void 0),e([
|
|
1631
|
+
`}}zn.styles=[...Be.styles,Mn],zn.dependencies={"sgds-close-button":ft,"sgds-icon":_t,"sgds-icon-button":Ya},e([Ve({type:Boolean,reflect:!0})],zn.prototype,"show",void 0),e([Ve({type:Boolean,reflect:!0})],zn.prototype,"dismissible",void 0),e([Po({context:Zn}),Ve({type:Boolean})],zn.prototype,"noClampAction",void 0),e([Ve({type:Boolean,reflect:!0})],zn.prototype,"fluid",void 0),e([Ie({flatten:!0})],zn.prototype,"bannerItem",void 0),e([Le(".banner")],zn.prototype,"banner",void 0),e([Po({context:Vn}),ze()],zn.prototype,"childCount",void 0),e([ze()],zn.prototype,"_intervalId",void 0),e([ze()],zn.prototype,"_currentIndex",void 0),e([ot("show",{waitUntilFirstUpdate:!0})],zn.prototype,"_handleShowChange",null),it("banner.item.next",{keyframes:[{opacity:0,transform:"translateY(-100%)"},{opacity:1,transform:"translateY(0)"}],options:{duration:500,easing:"cubic-bezier(0.45,0.05,0.55,0.95)"}}),it("banner.item.prev",{keyframes:[{opacity:0,transform:"translateY(100%)"},{opacity:1,transform:"translateY(0)"}],options:{duration:500,easing:"cubic-bezier(0.45,0.05,0.55,0.95)"}});var Pn=n`:host{display:block;font-size:var(--sgds-font-size-label-sm);font-style:normal;font-weight:var(--sgds-font-weight-regular,400);letter-spacing:var(--sgds-letter-spacing-normal,0);line-height:var(--sgds-line-height-2-xs);width:inherit}::slotted(:not(sgds-icon)){color:var(--sgds-color-fixed-light)!important;font-size:var(--sgds-font-size-label-sm)!important;line-height:var(--sgds-line-height-2-xs)!important}.banner-item{color:var(--sgds-color-fixed-light);display:flex;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-2-xs) 0}.message{line-clamp:5;-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;max-height:calc(var(--sgds-line-height-2-xs)*5);overflow:hidden;word-break:break-word}.message.truncated:after{background-color:var(--sgds-surface-fixed-dark);bottom:0;content:"";height:var(--sgds-line-height-2-xs);position:absolute;right:0;text-align:right;width:10ch}.clamped-container{display:inline-block;margin-right:var(--sgds-margin-2-xl);max-width:var(--sgds-dimension-872);position:relative}.show-more{bottom:0;position:absolute;right:0;white-space:nowrap}.show-more__link{cursor:pointer;text-decoration:underline}.action{align-items:center;display:flex;gap:var(--sgds-gap-2-xs,4px);margin-top:6px;min-height:var(--sgds-line-height-20);white-space:nowrap}slot[name=action]::slotted(a){color:var(--sgds-color-fixed-light)!important;font-size:var(--sgds-font-size-label-sm)!important;text-decoration:none!important}.banner-item__message_and__action{display:flex;flex:1 0 0;flex-direction:column;gap:var(--sgds-gap-xs)}@media (min-width:1024px){.banner-item__message_and__action{align-items:center;flex-direction:row;gap:var(--sgds-gap-sm)}.action{margin-left:auto;margin-top:0}.message{line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;max-height:calc(var(--sgds-line-height-2-xs)*2)}::slotted(sgds-icon){align-self:center}}`;class An extends Be{constructor(){super(...arguments),this.hasActionSlot=!1,this.noClampAction=!1,this.clamped=!1,this.siblingsCount=0,this.hasSlotController=new $i(this,"action","icon","badge")}async firstUpdated(e){super.firstUpdated(e),await this.updateComplete,this._clampCheck(),this._resizeObserver=new ResizeObserver(()=>this._clampCheck()),this._resizeObserver.observe(this.shadowRoot.querySelector(".message"))}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver&&this._resizeObserver.disconnect()}updated(){this.hasActionSlot||(this.hasActionSlot=this.hasSlotController.test("action")),this.hasSlotController.test("icon")&&this.hasSlotController.test("badge")&&console.error("Both icon and badge slot are used in the same banner item. This is not recommended as it may cause layout issues.")}_clampCheck(){const e=this.shadowRoot.querySelector(".message");requestAnimationFrame(()=>{this.clamped=e.scrollHeight>e.clientHeight})}_handleShowMoreClick(){this.emit("sgds-show-more")}render(){return ee`
|
|
1632
1632
|
<div class="banner-item">
|
|
1633
1633
|
<slot name="icon"></slot>
|
|
1634
1634
|
<div class="banner-item__message_and__action">
|
|
@@ -1648,7 +1648,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1648
1648
|
`:ie}
|
|
1649
1649
|
</div>
|
|
1650
1650
|
</div>
|
|
1651
|
-
`}}An.styles=[...Be.styles,Pn],e([Ve({type:Boolean})],An.prototype,"hasActionSlot",void 0),e([Ao({context:Zn,subscribe:!0}),Ve({type:Boolean})],An.prototype,"noClampAction",void 0),e([ze()],An.prototype,"clamped",void 0),e([Ao({context:Vn,subscribe:!0}),ze()],An.prototype,"siblingsCount",void 0),customElements.define("sgds-system-banner",zn),customElements.define("sgds-system-banner-item",An);var Ln=n`:host([density=compact]) .tab{font-size:var(--sgds-font-size-label-sm);padding:var(--sgds-spacer-3) var(--sgds-spacer-5)}:host(:not([active])) .tab{cursor:pointer}:host([variant=solid]) .tab{background-color:var(--sgds-bg-translucent-subtle);border-radius:var(--sgds-border-radius-md)}:host([variant=solid][active]) .tab{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus,:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=solid]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent)}:host([disabled]) .tab{cursor:not-allowed;opacity:var(--sgds-opacity-40)}:host([variant=underlined][active]) .tab{color:var(--sgds-primary-color-default)}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus,:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent-subtle);outline:0}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=underlined]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent-subtle)}:host([fullWidth][orientation=horizontal]) .tab{justify-content:center}.tab{align-items:center;color:var(--sgds-color-default);display:flex;gap:var(--sgds-spacer-3);padding:var(--sgds-spacer-4) var(--sgds-spacer-5);position:relative}.tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;let
|
|
1651
|
+
`}}An.styles=[...Be.styles,Pn],e([Ve({type:Boolean})],An.prototype,"hasActionSlot",void 0),e([Ao({context:Zn,subscribe:!0}),Ve({type:Boolean})],An.prototype,"noClampAction",void 0),e([ze()],An.prototype,"clamped",void 0),e([Ao({context:Vn,subscribe:!0}),ze()],An.prototype,"siblingsCount",void 0),customElements.define("sgds-system-banner",zn),customElements.define("sgds-system-banner-item",An);var Ln=n`:host([density=compact]) .tab{font-size:var(--sgds-font-size-label-sm);padding:var(--sgds-spacer-3) var(--sgds-spacer-5)}:host(:not([active])) .tab{cursor:pointer}:host([variant=solid]) .tab{background-color:var(--sgds-bg-translucent-subtle);border-radius:var(--sgds-border-radius-md)}:host([variant=solid][active]) .tab{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus,:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=solid]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent)}:host([disabled]) .tab{cursor:not-allowed;opacity:var(--sgds-opacity-40)}:host([variant=underlined][active]) .tab{color:var(--sgds-primary-color-default)}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus,:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent-subtle);outline:0}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=underlined]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent-subtle)}:host([fullWidth][orientation=horizontal]) .tab{justify-content:center}.tab{align-items:center;color:var(--sgds-color-default);display:flex;gap:var(--sgds-spacer-3);padding:var(--sgds-spacer-4) var(--sgds-spacer-5);position:relative}.tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;let Dn=0;class In extends Be{constructor(){super(...arguments),this.attrId=++Dn,this.componentId=`sgds-tab-${this.attrId}`,this.panel="",this.active=!1,this.disabled=!1,this.ariaLabel=""}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tab")}focus(e){var t,s;null===(s=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".tab"))||void 0===s||s.focus(e)}blur(){this.tab.blur()}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.disabled&&(this.active=!1)}render(){return ee`
|
|
1652
1652
|
<div
|
|
1653
1653
|
data-testid="inner-tab"
|
|
1654
1654
|
tabindex=${this.disabled?"-1":"0"}
|
|
@@ -1658,7 +1658,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1658
1658
|
<slot name="icon"></slot>
|
|
1659
1659
|
<slot></slot>
|
|
1660
1660
|
</div>
|
|
1661
|
-
`}}
|
|
1661
|
+
`}}In.styles=[Ln],e([Le(".tab")],In.prototype,"tab",void 0),e([Ve({reflect:!0})],In.prototype,"panel",void 0),e([Ve({type:Boolean,reflect:!0})],In.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],In.prototype,"disabled",void 0),e([Ve({type:String})],In.prototype,"ariaLabel",void 0),e([ot("active")],In.prototype,"handleActiveChange",null),e([ot("disabled")],In.prototype,"handleDisabledChange",null);var En=n`.tab-group{display:flex;flex-direction:column;gap:var(--sgds-gap-xl)}.tab-group__nav{display:flex;flex-direction:row}.tab-group__content{flex:1}:host([orientation=vertical]) .tab-group{flex-direction:row}:host([orientation=vertical]) .tab-group__nav{flex-direction:column}:host([variant=solid]) .tab-group__nav{gap:var(--sgds-gap-xs)}:host([variant=underlined][orientation=horizontal]) .tab-group__nav{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:flex;flex-direction:row;position:relative}:host([variant=underlined][orientation=vertical]) .tab-group__nav{border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:relative}:host([variant=underlined][orientation=horizontal]) .tab-group__indicator{background-color:var(--sgds-primary-surface-default);bottom:-1px;height:var(--sgds-border-width-4);position:absolute;transition:left .3s cubic-bezier(.25,0,.25,1),width .3s cubic-bezier(.25,0,.25,1)}:host([variant=underlined][orientation=vertical]) .tab-group__indicator{background-color:var(--sgds-primary-surface-default);position:absolute;right:-1px;transition:top .3s cubic-bezier(.25,0,.25,1),height .3s cubic-bezier(.25,0,.25,1);width:var(--sgds-border-width-4)}:host([variant=solid]) .tab-group__indicator{display:none}:host([fullWidth][orientation=horizontal]) slot[name=nav]::slotted(sgds-tab){width:100%}`;class Hn extends Be{constructor(){super(...arguments),this._indicatorAnimating=!1,this._tabs=[],this._panels=[],this.variant="underlined",this.orientation="horizontal",this.density="default",this.fullWidth=!1}connectedCallback(){const e=Promise.all([customElements.whenDefined("sgds-tab"),customElements.whenDefined("sgds-tab-panel")]);super.connectedCallback(),this._resizeObserver=new ResizeObserver(()=>{this._activeTab&&"underlined"===this.variant&&!this._indicatorAnimating&&this._animateIndicator(void 0,this._activeTab)}),this._tabResizeObserver=new ResizeObserver(()=>{this._activeTab&&"underlined"===this.variant&&!this._indicatorAnimating&&this._animateIndicator(void 0,this._activeTab)}),this._mutationObserver=new MutationObserver(e=>{e.some(e=>!["aria-labelledby","aria-controls"].includes(e.attributeName))&&setTimeout(()=>this._setAriaLabels()),e.some(e=>"disabled"===e.attributeName)&&this._syncTabsAndPanels()}),this.updateComplete.then(()=>{this._syncTabsAndPanels(),this._mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this._resizeObserver.observe(this._nav),e.then(()=>{new IntersectionObserver((e,t)=>{var s;e[0].intersectionRatio>0&&(this._setAriaLabels(),this._setActiveTab(null!==(s=this._getActiveTab())&&void 0!==s?s:this._tabs[0],{emitEvents:!1}),t.unobserve(e[0].target))}).observe(this._tabGroup)})})}disconnectedCallback(){this._mutationObserver.disconnect(),this._resizeObserver.unobserve(this._nav),this._tabResizeObserver.disconnect()}show(e){const t=this._tabs.find(t=>t.panel===e);t&&this._setActiveTab(t)}_getAllTabs(e={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter(t=>e.includeDisabled?"sgds-tab"===t.tagName.toLowerCase():"sgds-tab"===t.tagName.toLowerCase()&&!t.disabled)}_getAllPanels(){return[...this._body.assignedElements()].filter(e=>"sgds-tab-panel"===e.tagName.toLowerCase())}_getActiveTab(){return this._tabs.find(e=>e.active)}_handleClick(e){const t=e.target.closest("sgds-tab");(null==t?void 0:t.closest("sgds-tab-group"))===this&&null!==t&&this._setActiveTab(t)}_handleKeyDown(e){const t=e.target.closest("sgds-tab");if((null==t?void 0:t.closest("sgds-tab-group"))===this&&(["Enter"," "].includes(e.key)&&null!==t&&(this._setActiveTab(t),e.preventDefault()),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key))){const t=this._tabs.find(e=>e.matches(":focus"));if("sgds-tab"===(null==t?void 0:t.tagName.toLowerCase())){let s=this._tabs.indexOf(t);"Home"===e.key?s=0:"End"===e.key?s=this._tabs.length-1:"ArrowUp"===e.key||"ArrowLeft"===e.key?s--:"ArrowDown"!==e.key&&"ArrowRight"!==e.key||s++,s<0&&(s=this._tabs.length-1),s>this._tabs.length-1&&(s=0),this._tabs[s].focus({preventScroll:!0}),this._setActiveTab(this._tabs[s]),e.preventDefault()}}}_setActiveTab(e,t){if(t=Object.assign({emitEvents:!0},t),e!==this._activeTab&&!e.disabled){const s=this._activeTab;this._activeTab=e,this._tabs.forEach(e=>{e.active=e===this._activeTab}),this._panels.map(e=>{var t;return e.active=e.name===(null===(t=this._activeTab)||void 0===t?void 0:t.panel)}),"underlined"===this.variant&&this._animateIndicator(s,e),t.emitEvents&&(s&&this.emit("sgds-tab-hide",{detail:{name:s.panel}}),this.emit("sgds-tab-show",{detail:{name:this._activeTab.panel}}))}}_animateIndicator(e,t){if(!this._indicator||!this._nav)return;const s=this._nav.getBoundingClientRect(),i=t.getBoundingClientRect();if(e?(this._indicatorAnimating=!0,this._indicator.style.removeProperty("transition")):this._indicator.style.transition="none","vertical"===this.orientation?Object.assign(this._indicator.style,{top:i.top-s.top+"px",height:`${i.height}px`}):Object.assign(this._indicator.style,{left:i.left-s.left+"px",width:`${i.width}px`}),e){const e=()=>{this._indicatorAnimating=!1,this._indicator.removeEventListener("transitionend",e)};this._indicator.addEventListener("transitionend",e),setTimeout(()=>{this._indicatorAnimating=!1},350)}else requestAnimationFrame(()=>{this._indicator.style.removeProperty("transition")})}_setAriaLabels(){this._tabs.forEach(e=>{const t=this._panels.find(t=>t.name===e.panel);t&&(e.setAttribute("aria-controls",t.getAttribute("id")),t.setAttribute("aria-labelledby",e.getAttribute("id")))})}_syncTabsAndPanels(){this._tabs.forEach(e=>{var t;return null===(t=this._tabResizeObserver)||void 0===t?void 0:t.unobserve(e)}),this._tabs=this._getAllTabs({includeDisabled:!1}),this._panels=this._getAllPanels(),this._tabs.forEach(e=>{var t;return null===(t=this._tabResizeObserver)||void 0===t?void 0:t.observe(e)})}_updateTabsAttribute(e){if(!this._navSlot)return;this._navSlot.forEach(t=>{t.setAttribute(e,this[e])})}_handleSlotChange(){this._updateTabsAttribute("variant"),this._updateTabsAttribute("orientation"),this._updateTabsAttribute("density"),this._updateTabsAttribute("fullWidth"),this._syncTabsAndPanels()}willUpdate(e){e.has("variant")&&this._updateTabsAttribute("variant"),e.has("orientation")&&this._updateTabsAttribute("orientation"),e.has("density")&&this._updateTabsAttribute("density"),e.has("fullWidth")&&this._updateTabsAttribute("fullWidth")}render(){return ee`
|
|
1662
1662
|
<div class="tab-group" @click=${this._handleClick} @keydown=${this._handleKeyDown}>
|
|
1663
1663
|
<div class="tab-group__nav" role="tablist">
|
|
1664
1664
|
<slot name="nav" @slotchange=${this._handleSlotChange}></slot>
|
|
@@ -1669,11 +1669,11 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1669
1669
|
<slot class="tab-group__body" @slotchange=${this._syncTabsAndPanels}></slot>
|
|
1670
1670
|
</div>
|
|
1671
1671
|
</div>
|
|
1672
|
-
`}}Hn.styles=[...Be.styles,En],e([Le(".tab-group")],Hn.prototype,"_tabGroup",void 0),e([Le(".tab-group__body")],Hn.prototype,"_body",void 0),e([Le(".tab-group__nav")],Hn.prototype,"_nav",void 0),e([Le(".tab-group__indicator")],Hn.prototype,"_indicator",void 0),e([Ve({type:String,reflect:!0})],Hn.prototype,"variant",void 0),e([Ve({type:String,reflect:!0})],Hn.prototype,"orientation",void 0),e([Ve({type:String,reflect:!0})],Hn.prototype,"density",void 0),e([Ve({type:Boolean,reflect:!0})],Hn.prototype,"fullWidth",void 0),e([
|
|
1672
|
+
`}}Hn.styles=[...Be.styles,En],e([Le(".tab-group")],Hn.prototype,"_tabGroup",void 0),e([Le(".tab-group__body")],Hn.prototype,"_body",void 0),e([Le(".tab-group__nav")],Hn.prototype,"_nav",void 0),e([Le(".tab-group__indicator")],Hn.prototype,"_indicator",void 0),e([Ve({type:String,reflect:!0})],Hn.prototype,"variant",void 0),e([Ve({type:String,reflect:!0})],Hn.prototype,"orientation",void 0),e([Ve({type:String,reflect:!0})],Hn.prototype,"density",void 0),e([Ve({type:Boolean,reflect:!0})],Hn.prototype,"fullWidth",void 0),e([Ie({slot:"nav",flatten:!0})],Hn.prototype,"_navSlot",void 0);var Bn=n`:host(:not([active])){display:none}.tab-panel{display:block}.tab-panel:not(.tab-panel--active){display:none}`;let On=0;class Tn extends Be{constructor(){super(...arguments),this.attrId=++On,this.componentId=`sgds-tab-panel-${this.attrId}`,this.name="",this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}_handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true"),this.inert=!this.active}render(){return ee`
|
|
1673
1673
|
<slot
|
|
1674
1674
|
class=${We({"tab-panel":!0,"tab-panel--active":this.active})}
|
|
1675
1675
|
></slot>
|
|
1676
|
-
`}}Tn.styles=[...Be.styles,Bn],e([Ve({reflect:!0})],Tn.prototype,"name",void 0),e([Ve({type:Boolean,reflect:!0})],Tn.prototype,"active",void 0),e([ot("active")],Tn.prototype,"_handleActiveChange",null),lt("sgds-tab",
|
|
1676
|
+
`}}Tn.styles=[...Be.styles,Bn],e([Ve({reflect:!0})],Tn.prototype,"name",void 0),e([Ve({type:Boolean,reflect:!0})],Tn.prototype,"active",void 0),e([ot("active")],Tn.prototype,"_handleActiveChange",null),lt("sgds-tab",In),lt("sgds-tab-group",Hn),lt("sgds-tab-panel",Tn);var Fn=n`tbody,td,th,thead,tr{border:var(--sgds-border-width-0) solid;border-color:inherit}th{font-weight:var(--sgds-font-weight-semibold);text-align:-webkit-match-parent}table{border-collapse:collapse;caption-side:bottom}.table{display:table;font-size:var(--sgds-font-size-label-sm);table-layout:auto;width:100%}:host([layout=fixed]) .table{table-layout:fixed}.hidden{display:none}.table>:not(caption) td,.table>:not(caption) th{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.table>:not(caption) td>div,.table>:not(caption) th>div{align-items:center;display:flex;min-height:var(--sgds-dimension-56);padding:var(--sgds-padding-sm) var(--sgds-padding-md)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table>:not(:first-child){border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-emphasis)}.table-responsive{-webkit-overflow-scrolling:touch;overflow-x:auto}:host([tableBorder]) .table{border:var(--sgds-border-width-1) solid;border-color:var(--sgds-border-color-muted);border-bottom:0}:host([tableBorder]) .table.no-border{border:0}:host([headerBackground]) th{background-color:var(--sgds-surface-raised)}@media (max-width:575.98px){.table-responsive-sm{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:767.98px){.table-responsive-md{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:991.98px){.table-responsive-lg{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1199.98px){.table-responsive-xl{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1399.98px){.table-responsive-xxl{-webkit-overflow-scrolling:touch;overflow-x:auto}}`;const Rn="table-header-background";class Nn extends Be{constructor(){super(...arguments),this.rowHeader=[],this.columnHeader=[],this.tableData=[],this.headerPosition="horizontal",this.headerBackground=!1,this.tableBorder=!1,this.layout="auto",this.hasDefaultSlot=!1,this._headerBackground=!1,this.hasSlotController=new $i(this,"[default]")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]")),this._headerBackground=this.headerBackground}_renderTable(){if("horizontal"===this.headerPosition)return ee`
|
|
1677
1677
|
<thead>
|
|
1678
1678
|
<tr>
|
|
1679
1679
|
${this.rowHeader.map(e=>ee` <th><div>${e}</div></th> `)}
|
|
@@ -1803,7 +1803,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1803
1803
|
<ul class="contents">
|
|
1804
1804
|
<slot name="contents"></slot>
|
|
1805
1805
|
</ul>
|
|
1806
|
-
</div> `}}ir.styles=[...Be.styles,sr],lt("sgds-table-of-contents",ir);var ar=n`:host{display:block;position:relative;z-index:var(--sgds-z-index-sticky)}nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:relative;width:100%}.subnav{flex-direction:column;flex-wrap:nowrap}.header-container,.subnav{align-items:flex-start;display:flex}.header-container{gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);width:100%}slot[name=header]::slotted(*){--sgds-margin-xs:var(--sgds-margin-none);flex:1 1 auto;margin-bottom:var(--sgds-margin-xs,--sgds-margin-none);padding-top:var(--sgds-padding-none)}.subnav-toggler{cursor:pointer;transition:transform .2s ease-in-out}.subnav-toggler:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.subnav:not(.collapsed) .subnav-toggler{transform:rotate(-180deg)}.subnav-nav-group{display:flex;flex:1 1 0}.subnav-nav,.subnav-nav-group{align-items:flex-start;flex-direction:column;width:100%}.subnav-nav{display:none;overflow-y:auto;transition:transform .2s ease-in-out}.subnav-nav ::slotted(*){width:100%}.subnav-actions{bottom:0;display:flex;flex-direction:column;gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);position:sticky;width:100%}.no-actions{display:none}slot[name=actions]::slotted(*){width:100%}@media screen and (max-width:1023px){.subnav.sgds-container{max-width:inherit}}@media screen and (min-width:512px){.subnav-actions{flex-direction:row}}@media screen and (min-width:768px){nav{border-bottom:var(--sgds-border-width-0)}.subnav{flex-direction:row}.subnav.collapsed{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.header-container{padding:var(--sgds-padding-lg) var(--sgds-padding-2-xl)}.subnav-nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);left:0;position:absolute;top:100%}.subnav-actions{align-items:center;flex-direction:row;padding:var(--sgds-padding-sm) var(--sgds-padding-2-xl) var(--sgds-padding-sm) var(--sgds-padding-none);position:inherit}}@media screen and (min-width:1024px){nav{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:inherit}.subnav{flex-wrap:wrap;gap:var(--sgds-gap-xl);row-gap:var(--sgds-gap-none)}.subnav.collapsed{border-bottom:var(--sgds-border-width-0)}.header-container{flex:1;padding:var(--sgds-padding-none);width:auto}slot[name=header]::slotted(*){padding-top:var(--sgds-padding-lg);white-space:nowrap}.subnav-nav-group{align-items:center;flex:inherit;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-xl);justify-content:space-between;row-gap:var(--sgds-gap-none);width:auto}.subnav-nav{align-items:center;background-color:inherit;border-bottom:var(--sgds-border-width-0);display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-lg);overflow-y:inherit;position:inherit;row-gap:0;transition:none;width:auto}.subnav-nav ::slotted(*){width:inherit}.subnav-toggler{display:none}.subnav-actions{padding:var(--sgds-padding-sm) var(--sgds-padding-none);width:auto}slot[name=actions]::slotted(*){width:inherit}}`;const or=["Enter"," "];class nr extends Be{constructor(){super(...arguments),this.hasActionsSlot=!1,this.isCollapsed=!1,this.isMenuOpen=!1,this.hasSlotController=new $i(this,"actions"),this._handleResize=async()=>{this.isCollapsed=window.innerWidth<Lo,await this.updateComplete,this.isCollapsed||(this.isMenuOpen=!1),this._updateMobileLayout()},this._updateMobileLayout=()=>{if(this.nav&&this.headerContainer&&this.mobileActions&&this.mobileNav)if(this.isCollapsed){const{top:e}=this.nav.getBoundingClientRect(),t=this.headerContainer.clientHeight,s=this.mobileActions.clientHeight,i=window.innerWidth>=
|
|
1806
|
+
</div> `}}ir.styles=[...Be.styles,sr],lt("sgds-table-of-contents",ir);var ar=n`:host{display:block;position:relative;z-index:var(--sgds-z-index-sticky)}nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:relative;width:100%}.subnav{flex-direction:column;flex-wrap:nowrap}.header-container,.subnav{align-items:flex-start;display:flex}.header-container{gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);width:100%}slot[name=header]::slotted(*){--sgds-margin-xs:var(--sgds-margin-none);flex:1 1 auto;margin-bottom:var(--sgds-margin-xs,--sgds-margin-none);padding-top:var(--sgds-padding-none)}.subnav-toggler{cursor:pointer;transition:transform .2s ease-in-out}.subnav-toggler:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.subnav:not(.collapsed) .subnav-toggler{transform:rotate(-180deg)}.subnav-nav-group{display:flex;flex:1 1 0}.subnav-nav,.subnav-nav-group{align-items:flex-start;flex-direction:column;width:100%}.subnav-nav{display:none;overflow-y:auto;transition:transform .2s ease-in-out}.subnav-nav ::slotted(*){width:100%}.subnav-actions{bottom:0;display:flex;flex-direction:column;gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);position:sticky;width:100%}.no-actions{display:none}slot[name=actions]::slotted(*){width:100%}@media screen and (max-width:1023px){.subnav.sgds-container{max-width:inherit}}@media screen and (min-width:512px){.subnav-actions{flex-direction:row}}@media screen and (min-width:768px){nav{border-bottom:var(--sgds-border-width-0)}.subnav{flex-direction:row}.subnav.collapsed{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.header-container{padding:var(--sgds-padding-lg) var(--sgds-padding-2-xl)}.subnav-nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);left:0;position:absolute;top:100%}.subnav-actions{align-items:center;flex-direction:row;padding:var(--sgds-padding-sm) var(--sgds-padding-2-xl) var(--sgds-padding-sm) var(--sgds-padding-none);position:inherit}}@media screen and (min-width:1024px){nav{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:inherit}.subnav{flex-wrap:wrap;gap:var(--sgds-gap-xl);row-gap:var(--sgds-gap-none)}.subnav.collapsed{border-bottom:var(--sgds-border-width-0)}.header-container{flex:1;padding:var(--sgds-padding-none);width:auto}slot[name=header]::slotted(*){padding-top:var(--sgds-padding-lg);white-space:nowrap}.subnav-nav-group{align-items:center;flex:inherit;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-xl);justify-content:space-between;row-gap:var(--sgds-gap-none);width:auto}.subnav-nav{align-items:center;background-color:inherit;border-bottom:var(--sgds-border-width-0);display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-lg);overflow-y:inherit;position:inherit;row-gap:0;transition:none;width:auto}.subnav-nav ::slotted(*){width:inherit}.subnav-toggler{display:none}.subnav-actions{padding:var(--sgds-padding-sm) var(--sgds-padding-none);width:auto}slot[name=actions]::slotted(*){width:inherit}}`;const or=["Enter"," "];class nr extends Be{constructor(){super(...arguments),this.hasActionsSlot=!1,this.isCollapsed=!1,this.isMenuOpen=!1,this.hasSlotController=new $i(this,"actions"),this._handleResize=async()=>{this.isCollapsed=window.innerWidth<Lo,await this.updateComplete,this.isCollapsed||(this.isMenuOpen=!1),this._updateMobileLayout()},this._updateMobileLayout=()=>{if(this.nav&&this.headerContainer&&this.mobileActions&&this.mobileNav)if(this.isCollapsed){const{top:e}=this.nav.getBoundingClientRect(),t=this.headerContainer.clientHeight,s=this.mobileActions.clientHeight,i=window.innerWidth>=Do&&window.innerWidth<Lo?e+t:e+t+s;this.mobileNav.style.maxHeight=`calc(100dvh - ${i}px)`,this.style.minHeight=`${this.nav.clientHeight}px`,this.nav.style.position="absolute"}else this.mobileNav.style.maxHeight="none",this.style.minHeight="auto",this.nav.style.position="relative"},this._toggleMenu=()=>{var e;this.isMenuOpen?this.hide():(this._lockBodyScroll(),this.show()),null===(e=this.toggler)||void 0===e||e.focus()}}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._handleResize),window.addEventListener("click",e=>this._handleClickOutOfElement(e,this.navGroup))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),window.removeEventListener("click",e=>this._handleClickOutOfElement(e,this.navGroup))}firstUpdated(e){super.firstUpdated(e),this._handleResize()}updated(){this.hasActionsSlot||(this.hasActionsSlot=this.hasSlotController.test("actions"))}_handleClickOutOfElement(e,t){e.composedPath().includes(t)||e.composedPath().includes(this.toggler)||this.hide()}async _onKeyboardToggle(e){or.includes(e.key)&&(e.preventDefault(),this._toggleMenu())}async show(){if(!this.isMenuOpen)return this.isMenuOpen=!0,at(this,"sgds-after-show")}async hide(){if(this.isMenuOpen)return this.isMenuOpen=!1,this._unlockBodyScroll(),at(this,"sgds-after-hide")}_lockBodyScroll(){if("undefined"==typeof window)return;const e=window.scrollY;document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%"}_unlockBodyScroll(){if("undefined"==typeof window)return;const e=-1*parseInt(document.body.style.top||"0");document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,e)}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!1);await Qe(this.mobileNav),this.isCollapsed&&(this.mobileNav.style.display="flex");const{keyframes:e,options:t}=st(this,"subnav.show");await Ge(this.mobileNav,Xe(e,this.mobileNav.scrollHeight),t),this.emit("sgds-after-show")}async _animateToHide(){if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!0);await Qe(this.mobileNav);const{keyframes:e,options:t}=st(this,"subnav.hide");await Ge(this.mobileNav,Xe(e,this.mobileNav.scrollHeight),t),this.isCollapsed&&(this.mobileNav.style.display="none"),this.emit("sgds-after-hide")}async handleOpenChange(){this.isMenuOpen?this._animateToShow():this._animateToHide()}async handleCollapsedChange(){await this.updateComplete,this.mobileNav.style.display=this.isCollapsed?"none":"flex"}render(){return ee`
|
|
1807
1807
|
<nav aria-label="Sub navigation">
|
|
1808
1808
|
<div
|
|
1809
1809
|
class=${We({"sgds-container":!0,subnav:!0,collapsed:!this.isMenuOpen})}
|
|
@@ -1894,7 +1894,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1894
1894
|
${this.loading?this._renderLoadingMenu():ie}
|
|
1895
1895
|
</div>
|
|
1896
1896
|
</div>
|
|
1897
|
-
`}}hr.styles=[...ha.styles,na,dr],hr.childName="sgds-select-option",hr.dependencies={"sgds-icon":_t,"sgds-spinner":$a,[hr.childName]:cr},e([Ve({type:Boolean,reflect:!0})],hr.prototype,"noValidate",void 0),e([
|
|
1897
|
+
`}}hr.styles=[...ha.styles,na,dr],hr.childName="sgds-select-option",hr.dependencies={"sgds-icon":_t,"sgds-spinner":$a,[hr.childName]:cr},e([Ve({type:Boolean,reflect:!0})],hr.prototype,"noValidate",void 0),e([Ie({flatten:!0,selector:"sgds-select-option"})],hr.prototype,"options",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],hr.prototype,"_handleValueChange",null),lt("sgds-select",hr),lt("sgds-select-option",cr);var pr=n`:host([noPadding]) .card{background-color:inherit;border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent)}:host([orientation=vertical][noPadding]) .card-body{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none)}:host([orientation=vertical][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none)}:host([orientation=horizontal][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl)}:host([orientation=horizontal][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none)}:host([tinted]:not([noPadding])) .card-tinted-bg{background-color:var(--sgds-bg-translucent-subtle);opacity:var(--sgds-opacity-50)}:host([orientation][noPadding]) .card-media{padding:var(--sgds-padding-none)}slot[name=image-badge]::slotted(*){left:20px;position:absolute;top:20px}slot[name=image-action]::slotted(*){position:absolute;right:20px;top:20px}`;class ur extends ea{constructor(){super(...arguments),this.noPadding=!1,this.imagePosition="before",this.imageAdjustment="default"}get linkSlotItems(){if(!this.linkNode||0===this.linkNode.length)return null;const e=this.linkNode[0];return e.querySelector("a")||e}get footerSlotItems(){if(!this.footerNode||0===this.footerNode.length)return null;const e=this.footerNode[0];return e.querySelector("a")||e}firstUpdated(e){var t,s;if(super.firstUpdated(e),0===this._imageNode.length){const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".card-image"),i=null===(s=this.shadowRoot)||void 0===s?void 0:s.querySelector(".card-body");e&&(e.style.display="none"),i&&this.noPadding&&(i.style.padding="0px")}if(this.stretchedLink){const e=this.footerSlotItems,t=this.linkSlotItems;this._forwardAnchorAttributes((null==e?void 0:e.href)?e:t)}}handleImgSlotChange(e){if(e.target.assignedNodes({flatten:!0}).length>1)return console.error("Multiple elements passed into SgdsCard's image slot")}render(){const e=this.stretchedLink?pt`a`:pt`div`,t=!this.stretchedLink||this.disabled?-1:0;return gt`
|
|
1898
1898
|
<${e}
|
|
1899
1899
|
class="card ${We({disabled:this.disabled})}"
|
|
1900
1900
|
tabindex=${t}
|
|
@@ -1921,7 +1921,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1921
1921
|
</slot>
|
|
1922
1922
|
</div>
|
|
1923
1923
|
</${e}>
|
|
1924
|
-
`}}ur.styles=[...ea.styles,pr],e([Ee({slot:"image",flatten:!0})],ur.prototype,"_imageNode",void 0),e([
|
|
1924
|
+
`}}ur.styles=[...ea.styles,pr],e([Ee({slot:"image",flatten:!0})],ur.prototype,"_imageNode",void 0),e([Ie({slot:"footer"})],ur.prototype,"footerNode",void 0),e([Ie({slot:"link"})],ur.prototype,"linkNode",void 0),e([Ve({type:Boolean,reflect:!0})],ur.prototype,"noPadding",void 0),e([Ve({type:String,reflect:!0})],ur.prototype,"imagePosition",void 0),e([Ve({type:String,reflect:!0})],ur.prototype,"imageAdjustment",void 0),lt("sgds-image-card",ur);var gr=n`:host([noPadding]) .card{background-color:inherit;border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent)}:host([orientation=vertical][noPadding]) .card-body{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none)}:host([orientation=vertical][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none)}:host([orientation=horizontal][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl)}:host([orientation=horizontal][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none)}:host([tinted]:not([noPadding])) .card-tinted-bg{background-color:var(--sgds-bg-translucent-subtle);opacity:var(--sgds-opacity-50)}:host([orientation][noPadding]) .card-media{padding:var(--sgds-padding-none)}slot[name=thumbnail]::slotted(*){height:var(--sgds-dimension-64)!important;max-width:var(--sgds-dimension-128)!important;min-width:var(--sgds-dimension-64)!important;object-fit:contain;object-position:left;width:100%}`;class vr extends ea{constructor(){super(...arguments),this.noPadding=!1}_getAnchorFromSlot(e){if(!e||0===e.length)return null;const t=e[0];return t.querySelector("a")||t}_handleThumbnailSlotChange(e){var t,s;if(0===e.target.assignedElements({flatten:!0}).length&&("vertical"===this.orientation&&0===this._upperNode.length||"horizontal"===this.orientation)){const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".card-media");e&&(e.style.display="none");const i=null===(s=this.shadowRoot)||void 0===s?void 0:s.querySelector(".card-body");i&&this.noPadding&&(i.style.padding="0px")}}_handleFooterSlotChange(e){const t=e.target.assignedElements({flatten:!0}),s=this._getAnchorFromSlot(t);this.stretchedLink&&this._forwardAnchorAttributes(s)}_handleLinkSlotChange(e){this.warnLinkSlotMisused(e);const t=e.target.assignedElements({flatten:!0}),s=this._getAnchorFromSlot(t);this.stretchedLink&&this._forwardAnchorAttributes(s)}render(){const e=this.stretchedLink?pt`a`:pt`div`,t=!this.stretchedLink||this.disabled?-1:0;return gt`
|
|
1925
1925
|
<${e}
|
|
1926
1926
|
class="card ${We({disabled:this.disabled})}"
|
|
1927
1927
|
tabindex=${t}
|
|
@@ -1973,7 +1973,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
1973
1973
|
</slot>
|
|
1974
1974
|
</div>
|
|
1975
1975
|
</${e}>
|
|
1976
|
-
`}}fr.styles=[...ea.styles,mr],e([Ee({slot:"icon",flatten:!0})],fr.prototype,"_iconNode",void 0),e([Ee({slot:"upper",flatten:!0})],fr.prototype,"_upperNode",void 0),e([
|
|
1976
|
+
`}}fr.styles=[...ea.styles,mr],e([Ee({slot:"icon",flatten:!0})],fr.prototype,"_iconNode",void 0),e([Ee({slot:"upper",flatten:!0})],fr.prototype,"_upperNode",void 0),e([Ie({slot:"footer"})],fr.prototype,"footerNode",void 0),e([Ie({slot:"link"})],fr.prototype,"linkNode",void 0),e([Ve({type:Boolean,reflect:!0})],fr.prototype,"noPadding",void 0),lt("sgds-icon-card",fr);var br=n`.sidebar{display:flex;flex-direction:column;height:100%;position:relative;transition:width var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);width:var(--sgds-dimension-288);z-index:var(--sgds-z-index-sticky)}.sidebar:not(.overlay).sidebar--collapsed{width:var(--sgds-dimension-72)}.overlay{left:0;position:absolute;top:0}.overlay.sidebar--collapsed{width:var(--sgds-dimension-0)}.sidebar-top{align-items:center;display:flex;gap:var(--sgds-gap-md);justify-content:space-between;padding:0 var(--sgds-padding-xs)}:not(.overlay).sidebar--collapsed .sidebar-brand-name{display:none}:not(.overlay).sidebar--collapsed .sidebar-top{justify-content:center}.sidebar-main{background-color:var(--sgds-surface-default);border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);height:100%;overflow-x:hidden;overflow-y:auto;padding:var(--sgds-padding-lg) 0;position:relative;z-index:1}.overlay .sidebar-main{left:0;transition:left var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.overlay.sidebar--collapsed .sidebar-main{left:calc(var(--sgds-dimension-288)*-1)}.sidebar-wrapper{display:flex;flex-direction:column;height:100%;justify-content:space-between}.sidebar-content{display:flex;flex:1;flex-direction:column;gap:var(--sgds-gap-md);margin-top:var(--sgds-margin-lg);overflow-y:auto}slot[name=lower]::slotted(*){margin-top:var(--sgds-margin-lg)}.sidebar-nested-overlay{background-color:var(--sgds-surface-raised);overflow-y:auto;padding:var(--sgds-padding-md) var(--sgds-padding-xs);transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);transition-property:opacity left;width:var(--sgds-dimension-288);z-index:0}.sidebar--overlay,.sidebar-nested-overlay{bottom:0;left:0;opacity:0;pointer-events:none;position:absolute;top:0}.sidebar--overlay{background-color:var(--sgds-bg-overlay);content:"";transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);width:100vw}.sidebar--overlay.show{opacity:1;pointer-events:unset}.sidebar-nested-overlay.show{border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);left:var(--sgds-dimension-288);opacity:1;pointer-events:auto}:not(.overlay).sidebar--collapsed .sidebar-nested-overlay.show{left:var(--sgds-dimension-72)}.sidebar-nested-overlay sgds-icon-button{display:none}.sidebar::-webkit-scrollbar{width:var(--sgds-dimension-2)}.sidebar::-webkit-scrollbar-track{background:transparent}.sidebar::-webkit-scrollbar-thumb{background:var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-xs)}.sidebar::-webkit-scrollbar-thumb:hover{background:var(--sgds-color-subtle)}@media screen and (max-width:767px){.sidebar-nested-overlay sgds-icon-button{display:block}.sidebar,.sidebar-nested-overlay{width:var(--sgds-dimension-256)}.sidebar-nested-overlay,.sidebar-nested-overlay.show{left:var(--sgds-dimension-256)}}@media screen and (max-width:511px){.sidebar--overlay{display:none}.sidebar{position:absolute;width:100dvw}.sidebar-nested-overlay{left:-100dvw;width:100dvw;z-index:2}.sidebar-nested-overlay.show,:not(.overlay).sidebar--collapsed .sidebar-nested-overlay.show{left:0}.overlay.sidebar--collapsed .sidebar-main{left:calc(100dvw*-1)}}`;const wr="sidebar-active-group",yr="sidebar-active",_r="sidebar-collapsed",xr="sidebar-drawer-items",kr="sidebar-drawer-open",Cr="sidebar-drawer-overlay";var $r=n`.sidebar-item{border-radius:var(--sgds-border-radius-md);cursor:pointer;padding:var(--sgds-padding-xs);transition:background-color .15s ease-in-out,color .15s ease-in-out}.sidebar-item.active,.sidebar-item:focus-visible,.sidebar-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.sidebar-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-item-label-wrapper,.sidebar-item-label-wrapper>div{align-items:center;display:flex;gap:var(--sgds-gap-xs)}.sidebar-item-label-wrapper{justify-content:space-between;padding:var(--sgds-padding-3-xs) var(--sgds-padding-2-xs)}.sidebar-item-label{-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;display:-webkit-box;font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs);max-height:calc(var(--sgds-line-height-20, 20px)*2);overflow:hidden}.sidebar-item-label.offset{color:var(--sgds-color-subtle);margin-left:var(--sgds-margin-2-xl)}.sidebar-item-leaf.active .sidebar-item-label.offset,.sidebar-item-leaf:focus-visible .sidebar-item-label.offset,.sidebar-item-leaf:hover .sidebar-item-label.offset{color:var(--sgds-color-default)}.sidebar-item-leaf.active,.sidebar-item-leaf:focus-visible,.sidebar-item-leaf:hover{background-color:var(--sgds-bg-translucent-subtle)}.sidebar-item-label-wrapper .sidebar-item.active{background-color:var(--sgds-surface-raised);color:var(--sgds-primary-color-default)}.sidebar-item-label-wrapper .sidebar-item-indicator{align-items:center;display:flex;gap:var(--sgds-gap-2-xs)}.sidebar-item--collapsed{margin:auto;width:var(--sgds-dimension-40)}.sidebar-item--collapsed .sidebar-item-indicator,.sidebar-item--collapsed .sidebar-item-label{display:none}.sidebar-item--collapsed .sidebar-item-label-wrapper{justify-content:center}.sidebar-submenu{overflow:hidden}.sidebar-submenu>div{margin-top:-100%;opacity:0;pointer-events:none;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.sidebar-submenu.show>div{margin-top:0;opacity:1;pointer-events:auto}.sidebar-submenu--collapsed{display:none}`;class Sr extends Be{constructor(){super(...arguments),this.title="",this.name="",this._sidebarCollapsed=!1,this._sidebarActiveItem=null,this._sidebarActiveGroup=null,this._drawerItems=null,this._showDrawer=!1,this._isOverlay=!1,this._childLevel=1,this._selected=!1,this._hidden=!1,this._childElements=[],this._childActive=!1}connectedCallback(){super.connectedCallback(),this._getChildLevel(),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown)}firstUpdated(e){super.firstUpdated(e),this._getChildLevel()}updated(){var e;if(2===this._childLevel)this._hidden=!this.closest(".sidebar-nested-overlay");else if(this._childLevel>=3){const t=!!this.closest(".sidebar-nested-overlay"),s=this.parentElement,i=null!==(e=null==s?void 0:s.showMenu)&&void 0!==e&&e;this._hidden=!t||!i}}_handleSlotChange(){this._childElements=this._defaultNodes}_handleClick(){this.emit("i-sgds-click",{detail:{element:this,level:this._childLevel}})}_handleKeyDown(e){var t,s;const i=e.target;switch(e.key){case" ":case"Enter":return e.preventDefault(),e.stopPropagation(),void(e.target===this&&this._handleClick());case"ArrowLeft":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this)this._showDrawer&&this._handleClick();else{if(i._childLevel>=2&&(null===(t=this._sidebarActiveGroup)||void 0===t?void 0:t.shadowRoot)){const e=this._sidebarActiveGroup.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}}return;case"ArrowRight":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this){if(null===(s=this._drawerItems)||void 0===s?void 0:s.length)if(this._showDrawer){const e=this._drawerItems[0];if(null==e?void 0:e.shadowRoot){const t=e.shadowRoot.querySelector("[tabindex]");null==t||t.focus()}}else this._handleClick()}else 1===this._childLevel&&this._childElements.length>0&&this._handleClick();return}}_getChildLevel(){let e=this.parentElement,t=1;for(;"sgds-sidebar-group"===(null==e?void 0:e.tagName.toLowerCase());)t+=1,e=e.parentElement;const s=null==e?void 0:e.classList.contains("sidebar-nested-overlay");this._childLevel=s?t+1:t}}Sr.styles=Vi.styles,e([Ve({type:String,reflect:!0})],Sr.prototype,"title",void 0),e([Ve({type:String,reflect:!0})],Sr.prototype,"name",void 0),e([Ao({context:_r,subscribe:!0}),ze()],Sr.prototype,"_sidebarCollapsed",void 0),e([Ao({context:yr,subscribe:!0}),ze()],Sr.prototype,"_sidebarActiveItem",void 0),e([Ao({context:wr,subscribe:!0}),ze()],Sr.prototype,"_sidebarActiveGroup",void 0),e([Ao({context:xr,subscribe:!0}),ze()],Sr.prototype,"_drawerItems",void 0),e([Ao({context:kr,subscribe:!0}),ze()],Sr.prototype,"_showDrawer",void 0),e([Ao({context:Cr,subscribe:!0}),ze()],Sr.prototype,"_isOverlay",void 0),e([ze()],Sr.prototype,"_childLevel",void 0),e([ze()],Sr.prototype,"_selected",void 0),e([ze()],Sr.prototype,"_hidden",void 0),e([ze()],Sr.prototype,"_childElements",void 0),e([ze()],Sr.prototype,"_childActive",void 0),e([Ie({flatten:!0})],Sr.prototype,"_defaultNodes",void 0);class Mr extends Sr{constructor(){super(...arguments),this._showMenu=!1}get showMenu(){return this._showMenu}_handleActiveItemContext(){this._childLevel>1&&this._sidebarActiveItem&&this.contains(this._sidebarActiveItem)&&(this._showMenu=!0)}_handleClick(){1!==this._childLevel?(this._showMenu=!this._showMenu,this._childElements.forEach(e=>{e._hidden=!this._showMenu})):super._handleClick()}_getIcon(){return 1===this._childLevel?"chevron-right":this._showMenu?"chevron-down":"chevron-up"}_handleSlotChange(){super._handleSlotChange(),this._childElements.forEach(e=>{e._hidden=!this._showMenu})}render(){return ee`
|
|
1977
1977
|
<div
|
|
1978
1978
|
role="button"
|
|
1979
1979
|
class=${We({"sidebar-item":!0,"sidebar-item--collapsed":!this._isOverlay&&this._sidebarCollapsed&&1===this._childLevel,active:this._selected})}
|
|
@@ -2002,7 +2002,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
2002
2002
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2003
2003
|
</div>
|
|
2004
2004
|
</div>
|
|
2005
|
-
`}}Mr.styles=[...Be.styles,$r],Mr.dependencies={"sgds-icon":_t},e([ze()],Mr.prototype,"_showMenu",void 0),e([ot("_sidebarActiveItem")],Mr.prototype,"_handleActiveItemContext",null);class Zr extends Be{constructor(){super(...arguments),this.collapsed=!1,this.active="",this.scrim=!1,this.variant="collapsible",this.ariaLabel="Sidebar navigation",this._sidebarActiveGroup=null,this._sidebarCollapsed=!1,this._sidebarActiveItem=null,this._drawerItems=[],this._showDrawer=!1,this._isOverlay=!1,this._isNarrowViewport=!1,this._boundHandleResize=this._handleResize.bind(this),this._boundHandleItemClick=this._handleItemClick.bind(this),this._handleClickOutOfElement=e=>{if((e.composedPath().find(e=>{var t;return null===(t=null==e?void 0:e.classList)||void 0===t?void 0:t.contains("sidebar--overlay")})||!e.composedPath().includes(this))&&(this._showDrawer=!1,this._isOverlay)){e.target.getAttribute("data-sidebar-toggler")||(this.collapsed=!0)}}}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this._handleActive()}),null===window||void 0===window||window.addEventListener("resize",this._boundHandleResize),this._handleResize(),this.addEventListener("i-sgds-click",this._boundHandleItemClick)}disconnectedCallback(){super.disconnectedCallback(),null===document||void 0===document||document.removeEventListener("click",this._handleClickOutOfElement),null===window||void 0===window||window.removeEventListener("resize",this._boundHandleResize),this.removeEventListener("i-sgds-click",this._boundHandleItemClick)}firstUpdated(){null===document||void 0===document||document.addEventListener("click",this._handleClickOutOfElement),this._updateOverlayState()}updated(){this._handleActive()}_handleCollapsed(){"persistent"!==this.variant&&(this._sidebarCollapsed=this.collapsed)}_handleActiveItem(e){if(!this._sidebarActiveItem)return;this._getAllItems().forEach(e=>e._selected=!1),this._drawerItems.forEach(e=>e._selected=!1),e&&(e._selected=!1);const t=this._sidebarActiveItem._childLevel;if(this._sidebarActiveItem._selected=!0,1===t)this._sidebarActiveItem._childElements.length>0?this._setNodesToDrawer(this._sidebarActiveItem):this._revertNodesToParent();else{let e=this._sidebarActiveItem.parentElement;for(;e instanceof Mr&&e._childLevel>=1;)1===e._childLevel&&(e.classList.contains("sidebar-nested-overlay")||this._setNodesToDrawer(e)),e._selected=!0,e=e.parentElement;this._sidebarActiveGroup&&(this._sidebarActiveGroup._selected=!0)}}_handleActive(){this.active?this._sidebarActiveItem=this._getActiveChild():this._sidebarActiveItem=null}_getActiveChild(){var e;const t=e=>{var s;for(const i of e){if(i.name===this.active)return i;if(null===(s=i._childElements)||void 0===s?void 0:s.length){const e=t(i._childElements);if(e)return e}}return null};return null!==(e=t(this._defaultNodes))&&void 0!==e?e:t(this._drawerItems)}_handleResize(){const e=window.innerWidth<1280;e!==this._isNarrowViewport&&(this._isNarrowViewport=e,this.collapsed=this._isNarrowViewport),this._updateOverlayState()}_updateOverlayState(){"overlay"===this.variant?this._isOverlay=!0:"collapsible"===this.variant?this._isOverlay=window.innerWidth<
|
|
2005
|
+
`}}Mr.styles=[...Be.styles,$r],Mr.dependencies={"sgds-icon":_t},e([ze()],Mr.prototype,"_showMenu",void 0),e([ot("_sidebarActiveItem")],Mr.prototype,"_handleActiveItemContext",null);class Zr extends Be{constructor(){super(...arguments),this.collapsed=!1,this.active="",this.scrim=!1,this.variant="collapsible",this.ariaLabel="Sidebar navigation",this._sidebarActiveGroup=null,this._sidebarCollapsed=!1,this._sidebarActiveItem=null,this._drawerItems=[],this._showDrawer=!1,this._isOverlay=!1,this._isNarrowViewport=!1,this._boundHandleResize=this._handleResize.bind(this),this._boundHandleItemClick=this._handleItemClick.bind(this),this._handleClickOutOfElement=e=>{if((e.composedPath().find(e=>{var t;return null===(t=null==e?void 0:e.classList)||void 0===t?void 0:t.contains("sidebar--overlay")})||!e.composedPath().includes(this))&&(this._showDrawer=!1,this._isOverlay)){e.target.getAttribute("data-sidebar-toggler")||(this.collapsed=!0)}}}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this._handleActive()}),null===window||void 0===window||window.addEventListener("resize",this._boundHandleResize),this._handleResize(),this.addEventListener("i-sgds-click",this._boundHandleItemClick)}disconnectedCallback(){super.disconnectedCallback(),null===document||void 0===document||document.removeEventListener("click",this._handleClickOutOfElement),null===window||void 0===window||window.removeEventListener("resize",this._boundHandleResize),this.removeEventListener("i-sgds-click",this._boundHandleItemClick)}firstUpdated(){null===document||void 0===document||document.addEventListener("click",this._handleClickOutOfElement),this._updateOverlayState()}updated(){this._handleActive()}_handleCollapsed(){"persistent"!==this.variant&&(this._sidebarCollapsed=this.collapsed)}_handleActiveItem(e){if(!this._sidebarActiveItem)return;this._getAllItems().forEach(e=>e._selected=!1),this._drawerItems.forEach(e=>e._selected=!1),e&&(e._selected=!1);const t=this._sidebarActiveItem._childLevel;if(this._sidebarActiveItem._selected=!0,1===t)this._sidebarActiveItem._childElements.length>0?this._setNodesToDrawer(this._sidebarActiveItem):this._revertNodesToParent();else{let e=this._sidebarActiveItem.parentElement;for(;e instanceof Mr&&e._childLevel>=1;)1===e._childLevel&&(e.classList.contains("sidebar-nested-overlay")||this._setNodesToDrawer(e)),e._selected=!0,e=e.parentElement;this._sidebarActiveGroup&&(this._sidebarActiveGroup._selected=!0)}}_handleActive(){this.active?this._sidebarActiveItem=this._getActiveChild():this._sidebarActiveItem=null}_getActiveChild(){var e;const t=e=>{var s;for(const i of e){if(i.name===this.active)return i;if(null===(s=i._childElements)||void 0===s?void 0:s.length){const e=t(i._childElements);if(e)return e}}return null};return null!==(e=t(this._defaultNodes))&&void 0!==e?e:t(this._drawerItems)}_handleResize(){const e=window.innerWidth<1280;e!==this._isNarrowViewport&&(this._isNarrowViewport=e,this.collapsed=this._isNarrowViewport),this._updateOverlayState()}_updateOverlayState(){"overlay"===this.variant?this._isOverlay=!0:"collapsible"===this.variant?this._isOverlay=window.innerWidth<Do:this._isOverlay=!1}_setNodesToDrawer(e){e&&(this._sidebarActiveGroup&&e!==this._sidebarActiveGroup&&this._revertNodesToParent(),this._sidebarActiveGroup=e,this._drawerItems=[...this._sidebarActiveGroup._childElements])}_revertNodesToParent(){this._sidebarActiveGroup&&(this._drawerItems.forEach(e=>{var t;null===(t=this._sidebarActiveGroup)||void 0===t||t.append(e)}),this._drawerItems=[]),this._sidebarActiveGroup=null}_getAllItems(){var e;const t=e=>{var s;const i=[];for(const a of e)i.push(a),(null===(s=a._childElements)||void 0===s?void 0:s.length)&&i.push(...t(a._childElements));return i};return t(null!==(e=this._defaultNodes)&&void 0!==e?e:[])}_handleItemClick(e){const t=e.detail.element;if(t===this._sidebarActiveGroup)this._showDrawer=!this._showDrawer;else{if(this.active!==t.name){const e=this._getAllItems();this.active=t.name,e.forEach(e=>e._selected=!1)}if(t._childElements.length>0)this._showDrawer=!0;else{this._showDrawer=!1;const e=t.querySelector(":scope > a");e&&e.click()}this.emit("sgds-select",{detail:{activeItem:t.name}})}}toggleCollapsed(){"persistent"!==this.variant&&(this.collapsed=!this.collapsed)}render(){return ee`
|
|
2006
2006
|
<nav
|
|
2007
2007
|
class=${We({sidebar:!0,"sidebar--collapsed":this._sidebarCollapsed,overlay:this._isOverlay})}
|
|
2008
2008
|
aria-label=${this.ariaLabel}
|
|
@@ -2050,7 +2050,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
2050
2050
|
${this._drawerItems}
|
|
2051
2051
|
</div>
|
|
2052
2052
|
</nav>
|
|
2053
|
-
`}}Zr.styles=[...Be.styles,br],Zr.dependencies={"sgds-icon-button":Ya},e([Ve({type:Boolean,reflect:!0})],Zr.prototype,"collapsed",void 0),e([Ve({type:String,reflect:!0})],Zr.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],Zr.prototype,"scrim",void 0),e([Ve({type:String,reflect:!0})],Zr.prototype,"variant",void 0),e([Ve({type:String})],Zr.prototype,"ariaLabel",void 0),e([Po({context:wr}),ze()],Zr.prototype,"_sidebarActiveGroup",void 0),e([Po({context:_r}),ze()],Zr.prototype,"_sidebarCollapsed",void 0),e([Po({context:yr}),ze()],Zr.prototype,"_sidebarActiveItem",void 0),e([Po({context:xr}),ze()],Zr.prototype,"_drawerItems",void 0),e([Po({context:kr}),ze()],Zr.prototype,"_showDrawer",void 0),e([Po({context:Cr}),ze()],Zr.prototype,"_isOverlay",void 0),e([
|
|
2053
|
+
`}}Zr.styles=[...Be.styles,br],Zr.dependencies={"sgds-icon-button":Ya},e([Ve({type:Boolean,reflect:!0})],Zr.prototype,"collapsed",void 0),e([Ve({type:String,reflect:!0})],Zr.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],Zr.prototype,"scrim",void 0),e([Ve({type:String,reflect:!0})],Zr.prototype,"variant",void 0),e([Ve({type:String})],Zr.prototype,"ariaLabel",void 0),e([Po({context:wr}),ze()],Zr.prototype,"_sidebarActiveGroup",void 0),e([Po({context:_r}),ze()],Zr.prototype,"_sidebarCollapsed",void 0),e([Po({context:yr}),ze()],Zr.prototype,"_sidebarActiveItem",void 0),e([Po({context:xr}),ze()],Zr.prototype,"_drawerItems",void 0),e([Po({context:kr}),ze()],Zr.prototype,"_showDrawer",void 0),e([Po({context:Cr}),ze()],Zr.prototype,"_isOverlay",void 0),e([Ie()],Zr.prototype,"_defaultNodes",void 0),e([ze()],Zr.prototype,"_isNarrowViewport",void 0),e([ot("collapsed")],Zr.prototype,"_handleCollapsed",null),e([ot("_sidebarActiveItem")],Zr.prototype,"_handleActiveItem",null),e([ot("active")],Zr.prototype,"_handleActive",null);class Vr extends Sr{render(){return ee`
|
|
2054
2054
|
<div
|
|
2055
2055
|
class=${We({"sidebar-item":!0,"sidebar-item--collapsed":!this._isOverlay&&this._sidebarCollapsed&&1===this._childLevel,"sidebar-item-leaf":this._childLevel>2,active:this._selected})}
|
|
2056
2056
|
@click=${()=>this._handleClick()}
|
|
@@ -2105,11 +2105,11 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
2105
2105
|
:host {
|
|
2106
2106
|
display: contents;
|
|
2107
2107
|
}
|
|
2108
|
-
`],e([Ve({type:Number,reflect:!0})],Lr.prototype,"colspan",void 0),e([Ve({type:Number,reflect:!0})],Lr.prototype,"rowspan",void 0);class
|
|
2108
|
+
`],e([Ve({type:Number,reflect:!0})],Lr.prototype,"colspan",void 0),e([Ve({type:Number,reflect:!0})],Lr.prototype,"rowspan",void 0);class Dr extends Be{constructor(){super(...arguments),this.textAlign="left",this.sorting=!1,this.sortKey=""}handleSortClick(){if(!this.sorting)return;const e="ascending"===this.ariasort?"descending":"descending"===this.ariasort?"none":"ascending";this.ariasort=e,this.emit("i-sgds-sort",{detail:{key:this.sortKey,direction:e},bubbles:!0,composed:!0})}render(){return ee`<slot></slot>`}}Dr.styles=[...Be.styles,n`
|
|
2109
2109
|
:host {
|
|
2110
2110
|
display: contents;
|
|
2111
2111
|
}
|
|
2112
|
-
`],e([Ve({type:String,reflect:!0})],
|
|
2112
|
+
`],e([Ve({type:String,reflect:!0})],Dr.prototype,"width",void 0),e([Ve({type:Number,reflect:!0})],Dr.prototype,"colspan",void 0),e([Ve({type:Number,reflect:!0})],Dr.prototype,"rowspan",void 0),e([Ve({type:String,reflect:!0})],Dr.prototype,"textAlign",void 0),e([Ve({type:String,reflect:!0})],Dr.prototype,"ariasort",void 0),e([Ve({type:Boolean,reflect:!0})],Dr.prototype,"sorting",void 0),e([Ve({type:String,reflect:!0})],Dr.prototype,"sortKey",void 0);class Ir extends Be{constructor(){super(...arguments),this.rowData={},this.expand=!1,this.open=!1,this.checked=!1,this.showCheckbox=!1,this.showExpandPlaceholder=!1,this.columnAlignments=[],this.hasDataRows=!1,this._isHeaderRow=!1,this._cellSlotNames=new WeakMap}get checkbox(){var e;return null!==(e=this._checkboxEl)&&void 0!==e?e:null}connectedCallback(){super.connectedCallback(),this._lightDomObserver=new MutationObserver(()=>this._handleLightDomChange()),this._lightDomObserver.observe(this,{childList:!0}),this._handleLightDomChange()}disconnectedCallback(){var e;null===(e=this._lightDomObserver)||void 0===e||e.disconnect(),super.disconnectedCallback()}firstUpdated(){this._expandableBody&&(this._expandableBody.hidden=!this.open)}async handleExpandedChange(){if(this.open){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.open=!1);await Qe(this._expandableBody),this._expandableBody.hidden=!1;const{keyframes:e,options:t}=st(this,"row.expand.show");await Ge(this._expandableBody,Xe(e,this._expandableBody.scrollHeight),t),this.emit("sgds-after-show")}else{if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.open=!0);await Qe(this._expandableBody);const{keyframes:e,options:t}=st(this,"row.expand.hide");await Ge(this._expandableBody,Xe(e,this._expandableBody.scrollHeight),t),this._expandableBody.hidden=!0,this.emit("sgds-after-hide")}}async handleCheckedChange(){this.checked&&this.emit("i-sgds-change",{detail:{checked:!0}})}async show(){if(!this.open)return this.open=!0,at(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,at(this,"sgds-after-hide")}getCellText(e){var t;const s=this._getCells().filter(e=>e instanceof Lr),i=s[e];return i?(null!==(t=i.textContent)&&void 0!==t?t:"").trim():""}_getCells(){return Array.from(this.children).filter(e=>e instanceof Lr||e instanceof Dr)}_syncCellSlots(e){e.forEach(t=>{const s=`cell-${e.indexOf(t)}`;this._cellSlotNames.set(t,s),t.getAttribute("slot")!==s&&t.setAttribute("slot",s)})}_handleLightDomChange(){const e=this._getCells();this._syncCellSlots(e),this._isHeaderRow=e.some(e=>e instanceof Dr),this.requestUpdate()}_onCheckboxChange(e){this.emit("i-sgds-change",{detail:{checked:e.target.checked}})}_toggleExpand(){this.open?this.hide():this.show()}_onExpandKeyDown(e){"Enter"===e.key&&(e.preventDefault(),this._toggleExpand())}_onSortKeyDown(e,t){"Enter"===e.key&&(e.preventDefault(),t.handleSortClick())}_renderCell(e,t){var s;const i=this._cellSlotNames.get(e);if(e instanceof Dr)return ee`<th
|
|
2113
2113
|
width=${Ke(e.width)}
|
|
2114
2114
|
colspan=${Ke(e.colspan)}
|
|
2115
2115
|
rowspan=${Ke(e.rowspan)}
|
|
@@ -2171,7 +2171,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
2171
2171
|
</td>
|
|
2172
2172
|
</tr>
|
|
2173
2173
|
`:ie}
|
|
2174
|
-
`}}
|
|
2174
|
+
`}}Ir.styles=[...Be.styles,Ar],Ir.dependencies={"sgds-checkbox":ya,"sgds-data-table-cell":Lr,"sgds-data-table-head":Dr,"sgds-icon":_t},e([Ve({type:Object,reflect:!0})],Ir.prototype,"rowData",void 0),e([Ve({type:Boolean,reflect:!0})],Ir.prototype,"expand",void 0),e([Ve({type:Boolean,reflect:!0})],Ir.prototype,"open",void 0),e([Ve({type:Boolean,reflect:!0})],Ir.prototype,"checked",void 0),e([Ve({type:Boolean})],Ir.prototype,"showCheckbox",void 0),e([Ve({type:Boolean})],Ir.prototype,"showExpandPlaceholder",void 0),e([Ve({attribute:!1})],Ir.prototype,"columnAlignments",void 0),e([Ve({type:Boolean})],Ir.prototype,"hasDataRows",void 0),e([Le(".expandable-body")],Ir.prototype,"_expandableBody",void 0),e([Le("sgds-checkbox")],Ir.prototype,"_checkboxEl",void 0),e([ze()],Ir.prototype,"_isHeaderRow",void 0),e([ot("open",{waitUntilFirstUpdate:!0})],Ir.prototype,"handleExpandedChange",null),e([ot("checked")],Ir.prototype,"handleCheckedChange",null),it("row.expand.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"ease-in-out"}}),it("row.expand.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"ease-in-out"}});class Er extends Be{constructor(){super(...arguments),this.multiSelect=!1,this.dataLength=0,this.currentPage=1,this.itemsPerPage=5,this.footerText="",this.hideFooter=!1,this.isLoading=!1,this.serverSort=!1,this.layout="auto",this.mode="client",this.tableRows=[],this.headerRows=[],this._headerCells=[],this._initialRowPositions=new WeakMap,this._hasCapturedInitialRowPositions=!1,this._rowHandlers=new WeakMap}connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}_isRowChecked(e){var t;return e.checked||!0===(null===(t=e.checkbox)||void 0===t?void 0:t.checked)}_updateHeaderCheckbox(){const e=this.tableRows.filter(e=>this._isRowChecked(e)).length,t=e===this.tableRows.length&&e>0;this.headerRows.forEach(s=>{s.checked=t,s.checkbox&&(s.checkbox.checked=t,s.checkbox.indeterminate=e>0&&!t)})}async _syncHeaderCheckboxAfterRender(){if(!this.multiSelect||0===this.headerRows.length)return;const e=[...this.headerRows,...this.tableRows];await Promise.all(e.map(e=>e.updateComplete)),this._updateHeaderCheckbox()}_emitRowSelect(){const e=this.tableRows.filter(e=>this._isRowChecked(e)).map(e=>e.rowData);this.emit("sgds-row-select",{detail:{selected:e}})}_attachRowListener(e){const t=this._rowHandlers.get(e);t&&e.removeEventListener("i-sgds-change",t);const s=t=>{const{checked:s}=t.detail;this.headerRows.includes(e)?this.tableRows.forEach(e=>{e.checked=s,e.checkbox&&(e.checkbox.checked=s)}):(e.checked=s,this._updateHeaderCheckbox()),this._emitRowSelect()};this._rowHandlers.set(e,s),e.addEventListener("i-sgds-change",s)}_configureRows(){const e=this.tableRows.some(e=>e.expand),t=this.tableRows.length>0;this.headerRows.forEach(s=>{s.showCheckbox=this.multiSelect,s.showExpandPlaceholder=e,s.hasDataRows=t,this.multiSelect&&this._attachRowListener(s)}),this.tableRows.forEach(t=>{t.showCheckbox=this.multiSelect,t.showExpandPlaceholder=!t.expand&&e,this.multiSelect&&this._attachRowListener(t)}),this.multiSelect&&this._syncHeaderCheckboxAfterRender(),this._applyColumnAlignment()}_applyColumnAlignment(){const e=this._headerCells.reduce((e,t)=>{var s;const i=Number(t.colspan)>0?Number(t.colspan):1,a=null!==(s=t.textAlign)&&void 0!==s?s:"left";for(let t=0;t<i;t++)e.push(a);return e},[]);this.headerRows.forEach(t=>{t.columnAlignments=[...e]}),this.tableRows.forEach(t=>{t.columnAlignments=[...e]})}_extractCellText(e,t){const s=e.getCellText(t);if(s)return s;const i=Array.from(e.children).filter(e=>"sgds-data-table-cell"===e.tagName.toLowerCase())[t];return((null==i?void 0:i.textContent)||"").trim()}_toComparableValue(e,t,s){return t&&e.rowData&&t in e.rowData?e.rowData[t]:this._extractCellText(e,s)}_compareValues(e,t,s){if(e===t)return 0;const i=Number(e),a=Number(t);if(Number.isFinite(i)&&Number.isFinite(a))return"ascending"===s?i-a:a-i;const o=String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"});return"ascending"===s?o:-o}_resetOtherHeaderSortStates(e){this._headerCells.forEach(t=>{t!==e&&t.sorting&&(t.ariasort="none")})}_getRowsInInitialPositionOrder(e){return[...e].sort((e,t)=>{const s=this._initialRowPositions.get(e),i=this._initialRowPositions.get(t);return void 0===s&&void 0===i?0:void 0===s?1:void 0===i?-1:s-i})}_captureInitialRowPositions(e){this._hasCapturedInitialRowPositions||(e.forEach((e,t)=>{this._initialRowPositions.set(e,t)}),this._hasCapturedInitialRowPositions=!0)}_handleSort(e){const t=e.composedPath().find(e=>e instanceof Dr);if(!t||!t.sorting)return;const{key:s,direction:i}=e.detail,a=t?this._headerCells.indexOf(t):-1;if(this._resetOtherHeaderSortStates(t),this.serverSort)return e.stopPropagation(),void this.emit("sgds-sort",{detail:{key:s,direction:i}});if(!(a<0)){if("none"===i)return this.tableRows=this._getRowsInInitialPositionOrder(this.tableRows),this._syncDomRowOrder(),void this._updateVisibleRows();if("client"===this.mode){const e=(this.currentPage-1)*this.itemsPerPage,t=e+this.itemsPerPage,o=[...this.tableRows],n=o.slice(e,t).sort((e,t)=>{const o=this._toComparableValue(e,s,a),n=this._toComparableValue(t,s,a);return this._compareValues(o,n,i)});return o.splice(e,n.length,...n),this.tableRows=o,this._syncDomRowOrder(),void this._updateVisibleRows()}this.tableRows=[...this.tableRows].sort((e,t)=>{const o=this._toComparableValue(e,s,a),n=this._toComparableValue(t,s,a);return this._compareValues(o,n,i)}),this._syncDomRowOrder(),this._updateVisibleRows()}}_syncDomRowOrder(){var e;const t=null===(e=this.tableRows[0])||void 0===e?void 0:e.parentElement;t&&this.tableRows.forEach(e=>t.appendChild(e))}_handleSlotChange(e){const t=e.target.assignedElements({flatten:!0}).filter(e=>e instanceof Ir),s=e=>Array.from(e.children).filter(e=>{const t=e.tagName.toLowerCase();return!("sgds-data-table-cell"!==t&&"sgds-data-table-head"!==t)&&"content"!==e.getAttribute("slot")});this.headerRows=t.filter(e=>s(e).some(e=>"sgds-data-table-head"===e.tagName.toLowerCase())),this.tableRows=t.filter(e=>{const t=s(e);return t.length>0&&t.every(e=>"sgds-data-table-cell"===e.tagName.toLowerCase())}),this._headerCells=this.headerRows.reduce((e,t)=>{const s=Array.from(t.children).filter(e=>e instanceof Dr);return e.push(...s),e},[]),this._captureInitialRowPositions(this.tableRows),this._headerCells.forEach(e=>{e.sorting&&!e.ariasort&&(e.ariasort="none")}),this._configureRows(),this._updateVisibleRows()}_updateVisibleRows(){if("server"===this.mode)return void this.tableRows.forEach(e=>e.style.display=this.isLoading?"none":"");const e=this.dataLength||this.tableRows.length,t=Math.max(1,Math.ceil(e/this.itemsPerPage));if(this.currentPage>t)return void(this.currentPage=t);const s=(this.currentPage-1)*this.itemsPerPage,i=new Set(this.tableRows.slice(s,s+this.itemsPerPage));this.tableRows.forEach(e=>e.style.display=i.has(e)?"":"none")}updated(e){(e.has("currentPage")||e.has("itemsPerPage")||e.has("mode")||e.has("isLoading"))&&this._updateVisibleRows(),e.has("multiSelect")&&this._configureRows(),this.multiSelect&&(e.has("tableRows")||e.has("headerRows"))&&this._syncHeaderCheckboxAfterRender()}render(){const e=this.dataLength||this.tableRows.length,t=(this.currentPage-1)*this.itemsPerPage,s=Math.min(t+this.itemsPerPage,e),i=0===e?0:t+1,a=!this.isLoading&&0===this.tableRows.length;return ee`
|
|
2175
2175
|
<div class="data-table">
|
|
2176
2176
|
<div>
|
|
2177
2177
|
<slot @slotchange=${this._handleSlotChange} @i-sgds-sort=${this._handleSort} class="table"></slot>
|
|
@@ -2195,7 +2195,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
2195
2195
|
:host {
|
|
2196
2196
|
display: block;
|
|
2197
2197
|
}
|
|
2198
|
-
`],Er.dependencies={"sgds-pagination":en,"sgds-data-table-cell":Lr,"sgds-data-table-head":
|
|
2198
|
+
`],Er.dependencies={"sgds-pagination":en,"sgds-data-table-cell":Lr,"sgds-data-table-head":Dr,"sgds-spinner":$a},e([Ve({type:Boolean})],Er.prototype,"multiSelect",void 0),e([Ve({type:Number})],Er.prototype,"dataLength",void 0),e([Ve({type:Number})],Er.prototype,"currentPage",void 0),e([Ve({type:Number})],Er.prototype,"itemsPerPage",void 0),e([Ve({type:String})],Er.prototype,"footerText",void 0),e([Ve({type:Boolean})],Er.prototype,"hideFooter",void 0),e([Ve({type:Boolean})],Er.prototype,"isLoading",void 0),e([Ve({type:Boolean})],Er.prototype,"serverSort",void 0),e([Ve({type:String,reflect:!0})],Er.prototype,"layout",void 0),e([Ve({type:String})],Er.prototype,"mode",void 0),e([ze()],Er.prototype,"tableRows",void 0),e([ze()],Er.prototype,"headerRows",void 0),lt("sgds-data-table",Er),lt("sgds-data-table-row",Ir),lt("sgds-data-table-cell",Lr),lt("sgds-data-table-head",Dr);var Hr=ee`
|
|
2199
2199
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2200
2200
|
<path
|
|
2201
2201
|
fill="currentColor"
|
|
@@ -2455,7 +2455,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
2455
2455
|
clip-rule="evenodd"
|
|
2456
2456
|
/>
|
|
2457
2457
|
</svg>
|
|
2458
|
-
`,
|
|
2458
|
+
`,Dl=Object.freeze({__proto__:null,default:Ll}),Il=ee`
|
|
2459
2459
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2460
2460
|
<path
|
|
2461
2461
|
fill="currentColor"
|
|
@@ -2464,7 +2464,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
2464
2464
|
clip-rule="evenodd"
|
|
2465
2465
|
/>
|
|
2466
2466
|
</svg>
|
|
2467
|
-
`,El=Object.freeze({__proto__:null,default:
|
|
2467
|
+
`,El=Object.freeze({__proto__:null,default:Il}),Hl=ee`
|
|
2468
2468
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2469
2469
|
<path
|
|
2470
2470
|
fill="currentColor"
|
|
@@ -2734,7 +2734,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
2734
2734
|
clip-rule="evenodd"
|
|
2735
2735
|
/>
|
|
2736
2736
|
</svg>
|
|
2737
|
-
`,
|
|
2737
|
+
`,Dd=Object.freeze({__proto__:null,default:Ld}),Id=ee`
|
|
2738
2738
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2739
2739
|
<path
|
|
2740
2740
|
fill="currentColor"
|
|
@@ -2747,7 +2747,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
2747
2747
|
clip-rule="evenodd"
|
|
2748
2748
|
/>
|
|
2749
2749
|
</svg>
|
|
2750
|
-
`,Ed=Object.freeze({__proto__:null,default:
|
|
2750
|
+
`,Ed=Object.freeze({__proto__:null,default:Id}),Hd=ee`
|
|
2751
2751
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2752
2752
|
<path
|
|
2753
2753
|
fill="currentColor"
|
|
@@ -3035,7 +3035,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
3035
3035
|
d="M21 12.055C21 7.054 16.97 3 12.001 3 7.03 3.001 3 7.054 3 12.056c0 4.519 3.291 8.265 7.593 8.944v-6.327H8.309v-2.617h2.286V10.06c0-2.27 1.344-3.522 3.4-3.522.985 0 2.014.176 2.014.176v2.228h-1.135c-1.117 0-1.466.698-1.466 1.415v1.698h2.495l-.398 2.617h-2.098v6.327C17.71 20.319 21 16.574 21 12.055Z"
|
|
3036
3036
|
/>
|
|
3037
3037
|
</svg>
|
|
3038
|
-
`,
|
|
3038
|
+
`,Dc=Object.freeze({__proto__:null,default:Lc}),Ic=ee`
|
|
3039
3039
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3040
3040
|
<path
|
|
3041
3041
|
fill="currentColor"
|
|
@@ -3044,7 +3044,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
3044
3044
|
clip-rule="evenodd"
|
|
3045
3045
|
/>
|
|
3046
3046
|
</svg>
|
|
3047
|
-
`,Ec=Object.freeze({__proto__:null,default:
|
|
3047
|
+
`,Ec=Object.freeze({__proto__:null,default:Ic}),Hc=ee`
|
|
3048
3048
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3049
3049
|
<path
|
|
3050
3050
|
fill="currentColor"
|
|
@@ -3314,7 +3314,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
3314
3314
|
clip-rule="evenodd"
|
|
3315
3315
|
/>
|
|
3316
3316
|
</svg>
|
|
3317
|
-
`,
|
|
3317
|
+
`,Dh=Object.freeze({__proto__:null,default:Lh}),Ih=ee`
|
|
3318
3318
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3319
3319
|
<path
|
|
3320
3320
|
fill="currentColor"
|
|
@@ -3323,7 +3323,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
3323
3323
|
clip-rule="evenodd"
|
|
3324
3324
|
/>
|
|
3325
3325
|
</svg>
|
|
3326
|
-
`,Eh=Object.freeze({__proto__:null,default:
|
|
3326
|
+
`,Eh=Object.freeze({__proto__:null,default:Ih}),Hh=ee`
|
|
3327
3327
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3328
3328
|
<path
|
|
3329
3329
|
fill="currentColor"
|
|
@@ -3574,7 +3574,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
3574
3574
|
d="M2.375 6c0-.345.28-.625.625-.625h18a.625.625 0 1 1 0 1.25H3A.625.625 0 0 1 2.375 6Zm0 6c0-.345.28-.625.625-.625h18a.625.625 0 1 1 0 1.25H3A.625.625 0 0 1 2.375 12Zm0 6c0-.345.28-.625.625-.625h12a.625.625 0 1 1 0 1.25H3A.625.625 0 0 1 2.375 18Z"
|
|
3575
3575
|
/>
|
|
3576
3576
|
</svg>
|
|
3577
|
-
`,
|
|
3577
|
+
`,Dp=Object.freeze({__proto__:null,default:Lp}),Ip=ee`
|
|
3578
3578
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3579
3579
|
<path
|
|
3580
3580
|
fill="currentColor"
|
|
@@ -3587,7 +3587,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
3587
3587
|
d="M5.35 9.475c.345 0 .625.28.625.625V12a6.025 6.025 0 0 0 12.05 0v-1.9a.625.625 0 1 1 1.25 0V12a7.276 7.276 0 0 1-6.65 7.248v1.627H15.8a.625.625 0 1 1 0 1.25H8.2a.625.625 0 1 1 0-1.25h3.175v-1.627A7.276 7.276 0 0 1 4.725 12v-1.9c0-.345.28-.625.625-.625Z"
|
|
3588
3588
|
/>
|
|
3589
3589
|
</svg>
|
|
3590
|
-
`,Ep=Object.freeze({__proto__:null,default:
|
|
3590
|
+
`,Ep=Object.freeze({__proto__:null,default:Ip}),Hp=ee`
|
|
3591
3591
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3592
3592
|
<path
|
|
3593
3593
|
fill="currentColor"
|
|
@@ -3839,7 +3839,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
3839
3839
|
clip-rule="evenodd"
|
|
3840
3840
|
/>
|
|
3841
3841
|
</svg>
|
|
3842
|
-
`,
|
|
3842
|
+
`,Du=Object.freeze({__proto__:null,default:Lu}),Iu=ee`
|
|
3843
3843
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3844
3844
|
<path
|
|
3845
3845
|
fill="currentColor"
|
|
@@ -3848,7 +3848,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
3848
3848
|
clip-rule="evenodd"
|
|
3849
3849
|
/>
|
|
3850
3850
|
</svg>
|
|
3851
|
-
`,Eu=Object.freeze({__proto__:null,default:
|
|
3851
|
+
`,Eu=Object.freeze({__proto__:null,default:Iu}),Hu=ee`
|
|
3852
3852
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3853
3853
|
<path
|
|
3854
3854
|
fill="currentColor"
|
|
@@ -4120,7 +4120,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
4120
4120
|
clip-rule="evenodd"
|
|
4121
4121
|
/>
|
|
4122
4122
|
</svg>
|
|
4123
|
-
`,
|
|
4123
|
+
`,Dg=Object.freeze({__proto__:null,default:Lg}),Ig=ee`
|
|
4124
4124
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
4125
4125
|
<path
|
|
4126
4126
|
fill="currentColor"
|
|
@@ -4129,7 +4129,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
4129
4129
|
clip-rule="evenodd"
|
|
4130
4130
|
/>
|
|
4131
4131
|
</svg>
|
|
4132
|
-
`,Eg=Object.freeze({__proto__:null,default:
|
|
4132
|
+
`,Eg=Object.freeze({__proto__:null,default:Ig}),Hg=ee`
|
|
4133
4133
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
4134
4134
|
<path
|
|
4135
4135
|
fill="currentColor"
|
|
@@ -4413,7 +4413,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
4413
4413
|
clip-rule="evenodd"
|
|
4414
4414
|
/>
|
|
4415
4415
|
</svg>
|
|
4416
|
-
`,
|
|
4416
|
+
`,Dv=Object.freeze({__proto__:null,default:Lv}),Iv=ee`
|
|
4417
4417
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
4418
4418
|
<path
|
|
4419
4419
|
fill="currentColor"
|
|
@@ -4422,7 +4422,7 @@ const tn="important",sn=" !"+tn;const an=qe(class extends Ye{constructor(e){if(s
|
|
|
4422
4422
|
clip-rule="evenodd"
|
|
4423
4423
|
/>
|
|
4424
4424
|
</svg>
|
|
4425
|
-
`,Ev=Object.freeze({__proto__:null,default:
|
|
4425
|
+
`,Ev=Object.freeze({__proto__:null,default:Iv}),Hv=ee`
|
|
4426
4426
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
4427
4427
|
<path
|
|
4428
4428
|
fill="currentColor"
|