@govtechsg/sgds-web-component 3.15.1-rc.2 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Badge/index.umd.min.js +1 -1
- package/components/Badge/index.umd.min.js.map +1 -1
- package/components/Breadcrumb/index.umd.min.js +6 -6
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +2 -2
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/Datepicker/index.umd.min.js +1 -1
- package/components/Datepicker/index.umd.min.js.map +1 -1
- package/components/Drawer/drawer.js +1 -1
- package/components/Drawer/index.umd.min.js +1 -1
- package/components/Drawer/index.umd.min.js.map +1 -1
- package/components/Dropdown/dropdown-menu.js +1 -1
- package/components/Dropdown/index.umd.min.js +1 -1
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +9 -9
- package/components/Mainnav/index.umd.min.js.map +1 -1
- package/components/Mainnav/mainnav.js +1 -1
- package/components/Modal/index.umd.min.js +1 -1
- package/components/Modal/index.umd.min.js.map +1 -1
- package/components/Modal/modal.js +1 -1
- package/components/OverflowMenu/index.umd.min.js +6 -6
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/Select/index.umd.min.js +1 -1
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/Subnav/index.umd.min.js +1 -1
- package/components/Subnav/index.umd.min.js.map +1 -1
- package/components/Subnav/subnav.js +1 -1
- package/components/Toast/index.umd.min.js +1 -1
- package/components/Toast/index.umd.min.js.map +1 -1
- package/components/Toast/toast-container.js +1 -1
- package/components/Tooltip/index.umd.min.js +1 -1
- package/components/Tooltip/index.umd.min.js.map +1 -1
- package/components/Tooltip/tooltip.js +1 -1
- package/components/index.d.ts +0 -1
- package/components/index.js +0 -1
- package/components/index.js.map +1 -1
- package/components/index.umd.min.js +64 -116
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +1 -5
- package/css/utility.css +0 -14
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/index.umd.min.js +63 -194
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/components/Drawer/drawer.cjs.js +1 -1
- package/react/components/Drawer/drawer.js +1 -1
- package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-menu.js +1 -1
- package/react/components/Mainnav/mainnav.cjs.js +1 -1
- package/react/components/Mainnav/mainnav.js +1 -1
- package/react/components/Modal/modal.cjs.js +1 -1
- package/react/components/Modal/modal.js +1 -1
- package/react/components/Subnav/subnav.cjs.js +1 -1
- package/react/components/Subnav/subnav.js +1 -1
- package/react/components/Toast/toast-container.cjs.js +1 -1
- package/react/components/Toast/toast-container.js +1 -1
- package/react/components/Tooltip/tooltip.cjs.js +1 -1
- package/react/components/Tooltip/tooltip.js +1 -1
- package/react/index.cjs.js +54 -62
- package/react/index.cjs.js.map +1 -1
- package/react/index.d.ts +1 -5
- package/react/index.js +1 -5
- package/react/index.js.map +1 -1
- package/themes/root.css +0 -13
- package/components/Sidebar/index.d.ts +0 -16
- package/components/Sidebar/index.js +0 -10
- package/components/Sidebar/index.js.map +0 -1
- package/components/Sidebar/index.umd.min.js +0 -2501
- package/components/Sidebar/index.umd.min.js.map +0 -1
- package/components/Sidebar/sgds-sidebar-group.d.ts +0 -51
- package/components/Sidebar/sgds-sidebar-group.js +0 -123
- package/components/Sidebar/sgds-sidebar-group.js.map +0 -1
- package/components/Sidebar/sgds-sidebar-item.d.ts +0 -17
- package/components/Sidebar/sgds-sidebar-item.js +0 -61
- package/components/Sidebar/sgds-sidebar-item.js.map +0 -1
- package/components/Sidebar/sgds-sidebar-section.d.ts +0 -56
- package/components/Sidebar/sgds-sidebar-section.js +0 -125
- package/components/Sidebar/sgds-sidebar-section.js.map +0 -1
- package/components/Sidebar/sgds-sidebar.d.ts +0 -161
- package/components/Sidebar/sgds-sidebar.js +0 -424
- package/components/Sidebar/sgds-sidebar.js.map +0 -1
- package/components/Sidebar/sidebar-context.d.ts +0 -51
- package/components/Sidebar/sidebar-context.js +0 -45
- package/components/Sidebar/sidebar-context.js.map +0 -1
- package/components/Sidebar/sidebar-element.d.ts +0 -112
- package/components/Sidebar/sidebar-element.js +0 -280
- package/components/Sidebar/sidebar-element.js.map +0 -1
- package/components/Sidebar/sidebar-item.js +0 -6
- package/components/Sidebar/sidebar-item.js.map +0 -1
- package/components/Sidebar/sidebar-section.js +0 -6
- package/components/Sidebar/sidebar-section.js.map +0 -1
- package/components/Sidebar/sidebar.js +0 -6
- package/components/Sidebar/sidebar.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-group.cjs.js +0 -129
- package/react/components/Sidebar/sgds-sidebar-group.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-group.js +0 -124
- package/react/components/Sidebar/sgds-sidebar-group.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-item.cjs.js +0 -67
- package/react/components/Sidebar/sgds-sidebar-item.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-item.js +0 -62
- package/react/components/Sidebar/sgds-sidebar-item.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js +0 -131
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-section.js +0 -126
- package/react/components/Sidebar/sgds-sidebar-section.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar.cjs.js +0 -430
- package/react/components/Sidebar/sgds-sidebar.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar.js +0 -425
- package/react/components/Sidebar/sgds-sidebar.js.map +0 -1
- package/react/components/Sidebar/sidebar-context.cjs.js +0 -54
- package/react/components/Sidebar/sidebar-context.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar-context.js +0 -46
- package/react/components/Sidebar/sidebar-context.js.map +0 -1
- package/react/components/Sidebar/sidebar-element.cjs.js +0 -285
- package/react/components/Sidebar/sidebar-element.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar-element.js +0 -281
- package/react/components/Sidebar/sidebar-element.js.map +0 -1
- package/react/components/Sidebar/sidebar-item.cjs.js +0 -11
- package/react/components/Sidebar/sidebar-item.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar-item.js +0 -7
- package/react/components/Sidebar/sidebar-item.js.map +0 -1
- package/react/components/Sidebar/sidebar-section.cjs.js +0 -11
- package/react/components/Sidebar/sidebar-section.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar-section.js +0 -7
- package/react/components/Sidebar/sidebar-section.js.map +0 -1
- package/react/components/Sidebar/sidebar.cjs.js +0 -11
- package/react/components/Sidebar/sidebar.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar.js +0 -7
- package/react/components/Sidebar/sidebar.js.map +0 -1
- package/react/sidebar/index.cjs.js +0 -42
- package/react/sidebar/index.cjs.js.map +0 -1
- package/react/sidebar/index.d.ts +0 -2
- package/react/sidebar/index.js +0 -18
- package/react/sidebar/index.js.map +0 -1
- package/react/sidebar-group/index.cjs.js +0 -40
- package/react/sidebar-group/index.cjs.js.map +0 -1
- package/react/sidebar-group/index.d.ts +0 -2
- package/react/sidebar-group/index.js +0 -16
- package/react/sidebar-group/index.js.map +0 -1
- package/react/sidebar-item/index.cjs.js +0 -40
- package/react/sidebar-item/index.cjs.js.map +0 -1
- package/react/sidebar-item/index.d.ts +0 -2
- package/react/sidebar-item/index.js +0 -16
- package/react/sidebar-item/index.js.map +0 -1
- package/react/sidebar-section/index.cjs.js +0 -40
- package/react/sidebar-section/index.cjs.js.map +0 -1
- package/react/sidebar-section/index.d.ts +0 -2
- package/react/sidebar-section/index.js +0 -16
- package/react/sidebar-section/index.js.map +0 -1
|
@@ -78,7 +78,7 @@ function Ge(e){return(t,i)=>je(t,i,{async get(){return await this.updateComplete
|
|
|
78
78
|
* @license
|
|
79
79
|
* Copyright 2020 Google LLC
|
|
80
80
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
81
|
-
*/const st=()=>new nt;class nt{}const rt=new WeakMap;const ct=te(class extends ot{render(e){return L}update(e,[t]){const i=t!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),L}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=rt.get(t);void 0===i&&(i=new WeakMap,rt.set(t,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.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?rt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),dt=["top","right","bottom","left"],ht=Math.min,vt=Math.max,ut=Math.round,pt=Math.floor,gt=e=>({x:e,y:e}),ft={left:"right",right:"left",bottom:"top",top:"bottom"},mt={start:"end",end:"start"};function wt(e,t,i){return vt(e,ht(t,i))}function bt(e,t){return"function"==typeof e?e(t):e}function xt(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function Ct(e){return"x"===e?"y":"x"}function Zt(e){return"y"===e?"height":"width"}const _t=new Set(["top","bottom"]);function Mt(e){return _t.has(xt(e))?"y":"x"}function Vt(e){return Ct(Mt(e))}function kt(e,t,i){void 0===i&&(i=!1);const l=yt(e),a=Vt(e),o=Zt(a);let s="x"===a?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Et(s)),[s,Et(s)]}function Ht(e){return e.replace(/start|end/g,e=>mt[e])}const $t=["left","right"],St=["right","left"],Bt=["top","bottom"],At=["bottom","top"];function Lt(e,t,i,l){const a=yt(e);let o=function(e,t,i){switch(e){case"top":case"bottom":return i?t?St:$t:t?$t:St;case"left":case"right":return t?Bt:At;default:return[]}}(xt(e),"start"===i,l);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(Ht)))),o}function Et(e){return e.replace(/left|right|bottom|top/g,e=>ft[e])}function It(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 Tt(e){const{x:t,y:i,width:l,height:a}=e;return{width:l,height:a,top:i,left:t,right:t+l,bottom:i+a,x:t,y:i}}function Pt(e,t,i){let{reference:l,floating:a}=e;const o=Mt(t),s=Vt(t),n=Zt(s),r=xt(t),c="y"===o,d=l.x+l.width/2-a.width/2,h=l.y+l.height/2-a.height/2,v=l[n]/2-a[n]/2;let u;switch(r){case"top":u={x:d,y:l.y-a.height};break;case"bottom":u={x:d,y:l.y+l.height};break;case"right":u={x:l.x+l.width,y:h};break;case"left":u={x:l.x-a.width,y:h};break;default:u={x:l.x,y:l.y}}switch(yt(t)){case"start":u[s]-=v*(i&&c?-1:1);break;case"end":u[s]+=v*(i&&c?-1:1)}return u}async function Rt(e,t){var i;void 0===t&&(t={});const{x:l,y:a,platform:o,rects:s,elements:n,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:u=0}=bt(t,e),p=It(u),g=n[v?"floating"===h?"reference":"floating":h],f=Tt(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(g)))||i?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(n.floating)),boundary:c,rootBoundary:d,strategy:r})),m="floating"===h?{x:l,y:a,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==o.getOffsetParent?void 0:o.getOffsetParent(n.floating)),b=await(null==o.isElement?void 0:o.isElement(w))&&await(null==o.getScale?void 0:o.getScale(w))||{x:1,y:1},x=Tt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:m,offsetParent:w,strategy:r}):m);return{top:(f.top-x.top+p.top)/b.y,bottom:(x.bottom-f.bottom+p.bottom)/b.y,left:(f.left-x.left+p.left)/b.x,right:(x.right-f.right+p.right)/b.x}}function Ot(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zt(e){return dt.some(t=>e[t]>=0)}const Dt=new Set(["left","top"]);function Ut(){return"undefined"!=typeof window}function Ft(e){return qt(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Wt(e){var t;return null==(t=(qt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function qt(e){return!!Ut()&&(e instanceof Node||e instanceof Nt(e).Node)}function jt(e){return!!Ut()&&(e instanceof Element||e instanceof Nt(e).Element)}function Kt(e){return!!Ut()&&(e instanceof HTMLElement||e instanceof Nt(e).HTMLElement)}function Gt(e){return!(!Ut()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot)}const Jt=new Set(["inline","contents"]);function Xt(e){const{overflow:t,overflowX:i,overflowY:l,display:a}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!Jt.has(a)}const Yt=new Set(["table","td","th"]);function Qt(e){return Yt.has(Ft(e))}const ei=[":popover-open",":modal"];function ti(e){return ei.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ii=["transform","translate","scale","rotate","perspective"],li=["transform","translate","scale","rotate","perspective","filter"],ai=["paint","layout","strict","content"];function oi(e){const t=si(),i=jt(e)?ci(e):e;return ii.some(e=>!!i[e]&&"none"!==i[e])||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||li.some(e=>(i.willChange||"").includes(e))||ai.some(e=>(i.contain||"").includes(e))}function si(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ni=new Set(["html","body","#document"]);function ri(e){return ni.has(Ft(e))}function ci(e){return Nt(e).getComputedStyle(e)}function di(e){return jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if("html"===Ft(e))return e;const t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||Wt(e);return Gt(t)?t.host:t}function vi(e){const t=hi(e);return ri(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kt(t)&&Xt(t)?t:vi(t)}function ui(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const a=vi(e),o=a===(null==(l=e.ownerDocument)?void 0:l.body),s=Nt(a);if(o){const e=pi(s);return t.concat(s,s.visualViewport||[],Xt(a)?a:[],e&&i?ui(e):[])}return t.concat(a,ui(a,[],i))}function pi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gi(e){const t=ci(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const a=Kt(e),o=a?e.offsetWidth:i,s=a?e.offsetHeight:l,n=ut(i)!==o||ut(l)!==s;return n&&(i=o,l=s),{width:i,height:l,$:n}}function fi(e){return jt(e)?e:e.contextElement}function mi(e){const t=fi(e);if(!Kt(t))return gt(1);const i=t.getBoundingClientRect(),{width:l,height:a,$:o}=gi(t);let s=(o?ut(i.width):i.width)/l,n=(o?ut(i.height):i.height)/a;return s&&Number.isFinite(s)||(s=1),n&&Number.isFinite(n)||(n=1),{x:s,y:n}}const wi=gt(0);function bi(e){const t=Nt(e);return si()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wi}function xi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const a=e.getBoundingClientRect(),o=fi(e);let s=gt(1);t&&(l?jt(l)&&(s=mi(l)):s=mi(e));const n=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Nt(e))&&t}(o,i,l)?bi(o):gt(0);let r=(a.left+n.x)/s.x,c=(a.top+n.y)/s.y,d=a.width/s.x,h=a.height/s.y;if(o){const e=Nt(o),t=l&&jt(l)?Nt(l):l;let i=e,a=pi(i);for(;a&&l&&t!==i;){const e=mi(a),t=a.getBoundingClientRect(),l=ci(a),o=t.left+(a.clientLeft+parseFloat(l.paddingLeft))*e.x,s=t.top+(a.clientTop+parseFloat(l.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=o,c+=s,i=Nt(a),a=pi(i)}}return Tt({width:d,height:h,x:r,y:c})}function yi(e,t){const i=di(e).scrollLeft;return t?t.left+i:xi(Wt(e)).left+i}function Ci(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-yi(e,i),y:i.top+t.scrollTop}}const Zi=new Set(["absolute","fixed"]);function _i(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=Nt(e),l=Wt(e),a=i.visualViewport;let o=l.clientWidth,s=l.clientHeight,n=0,r=0;if(a){o=a.width,s=a.height;const e=si();(!e||e&&"fixed"===t)&&(n=a.offsetLeft,r=a.offsetTop)}const c=yi(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,s=Math.abs(l.clientWidth-t.clientWidth-a);s<=25&&(o-=s)}else c<=25&&(o+=c);return{width:o,height:s,x:n,y:r}}(e,i);else if("document"===t)l=function(e){const t=Wt(e),i=di(e),l=e.ownerDocument.body,a=vt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),o=vt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let s=-i.scrollLeft+yi(e);const n=-i.scrollTop;return"rtl"===ci(l).direction&&(s+=vt(t.clientWidth,l.clientWidth)-a),{width:a,height:o,x:s,y:n}}(Wt(e));else if(jt(t))l=function(e,t){const i=xi(e,!0,"fixed"===t),l=i.top+e.clientTop,a=i.left+e.clientLeft,o=Kt(e)?mi(e):gt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:l*o.y}}(t,i);else{const i=bi(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Tt(l)}function Mi(e,t){const i=hi(e);return!(i===t||!jt(i)||ri(i))&&("fixed"===ci(i).position||Mi(i,t))}function Vi(e,t,i){const l=Kt(t),a=Wt(t),o="fixed"===i,s=xi(e,!0,o,t);let n={scrollLeft:0,scrollTop:0};const r=gt(0);function c(){r.x=yi(a)}if(l||!l&&!o)if(("body"!==Ft(t)||Xt(a))&&(n=di(t)),l){const e=xi(t,!0,o,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else a&&c();o&&!l&&a&&c();const d=!a||l||o?gt(0):Ci(a,n);return{x:s.left+n.scrollLeft-r.x-d.x,y:s.top+n.scrollTop-r.y-d.y,width:s.width,height:s.height}}function ki(e){return"static"===ci(e).position}function Hi(e,t){if(!Kt(e)||"fixed"===ci(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Wt(e)===i&&(i=i.ownerDocument.body),i}function $i(e,t){const i=Nt(e);if(ti(e))return i;if(!Kt(e)){let t=hi(e);for(;t&&!ri(t);){if(jt(t)&&!ki(t))return t;t=hi(t)}return i}let l=Hi(e,t);for(;l&&Qt(l)&&ki(l);)l=Hi(l,t);return l&&ri(l)&&ki(l)&&!oi(l)?i:l||function(e){let t=hi(e);for(;Kt(t)&&!ri(t);){if(oi(t))return t;if(ti(t))return null;t=hi(t)}return null}(e)||i}const Si={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:a}=e;const o="fixed"===a,s=Wt(l),n=!!t&&ti(t.floating);if(l===s||n&&o)return i;let r={scrollLeft:0,scrollTop:0},c=gt(1);const d=gt(0),h=Kt(l);if((h||!h&&!o)&&(("body"!==Ft(l)||Xt(s))&&(r=di(l)),Kt(l))){const e=xi(l);c=mi(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const v=!s||h||o?gt(0):Ci(s,r);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-r.scrollLeft*c.x+d.x+v.x,y:i.y*c.y-r.scrollTop*c.y+d.y+v.y}},getDocumentElement:Wt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:a}=e;const o=[..."clippingAncestors"===i?ti(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=ui(e,[],!1).filter(e=>jt(e)&&"body"!==Ft(e)),a=null;const o="fixed"===ci(e).position;let s=o?hi(e):e;for(;jt(s)&&!ri(s);){const t=ci(s),i=oi(s);i||"fixed"!==t.position||(a=null),(o?!i&&!a:!i&&"static"===t.position&&a&&Zi.has(a.position)||Xt(s)&&!i&&Mi(e,s))?l=l.filter(e=>e!==s):a=t,s=hi(s)}return t.set(e,l),l}(t,this._c):[].concat(i),l],s=o[0],n=o.reduce((e,i)=>{const l=_i(t,i,a);return e.top=vt(l.top,e.top),e.right=ht(l.right,e.right),e.bottom=ht(l.bottom,e.bottom),e.left=vt(l.left,e.left),e},_i(t,s,a));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:$i,getElementRects:async function(e){const t=this.getOffsetParent||$i,i=this.getDimensions,l=await i(e.floating);return{reference:Vi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=gi(e);return{width:t,height:i}},getScale:mi,isElement:jt,isRTL:function(e){return"rtl"===ci(e).direction}};function Bi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ai(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:r=!1}=l,c=fi(e),d=a||o?[...c?ui(c):[],...ui(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",i,{passive:!0}),o&&e.addEventListener("resize",i)});const h=c&&n?function(e,t){let i,l=null;const a=Wt(e);function o(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function s(n,r){void 0===n&&(n=!1),void 0===r&&(r=1),o();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:u}=c;if(n||t(),!v||!u)return;const p={rootMargin:-pt(h)+"px "+-pt(a.clientWidth-(d+v))+"px "+-pt(a.clientHeight-(h+u))+"px "+-pt(d)+"px",threshold:vt(0,ht(1,r))||1};let g=!0;function f(t){const l=t[0].intersectionRatio;if(l!==r){if(!g)return s();l?s(!1,l):i=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==l||Bi(c,e.getBoundingClientRect())||s(),g=!1}try{l=new IntersectionObserver(f,{...p,root:a.ownerDocument})}catch(e){l=new IntersectionObserver(f,p)}l.observe(e)}(!0),o}(c,i):null;let v,u=-1,p=null;s&&(p=new ResizeObserver(e=>{let[l]=e;l&&l.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),i()}),c&&!r&&p.observe(c),p.observe(t));let g=r?xi(e):null;return r&&function t(){const l=xi(e);g&&!Bi(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",i),o&&e.removeEventListener("resize",i)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,r&&cancelAnimationFrame(v)}}const Li=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:a,y:o,placement:s,middlewareData:n}=t,r=await async function(e,t){const{placement:i,platform:l,elements:a}=e,o=await(null==l.isRTL?void 0:l.isRTL(a.floating)),s=xt(i),n=yt(i),r="y"===Mt(i),c=Dt.has(s)?-1:1,d=o&&r?-1:1,h=bt(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return n&&"number"==typeof p&&(u="end"===n?-1*p:p),r?{x:u*d,y:v*c}:{x:v*c,y:u*d}}(t,e);return s===(null==(i=n.offset)?void 0:i.placement)&&null!=(l=n.arrow)&&l.alignmentOffset?{}:{x:a+r.x,y:o+r.y,data:{...r,placement:s}}}}},Ei=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:n={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...r}=bt(e,t),c={x:i,y:l},d=await Rt(t,r),h=Mt(xt(a)),v=Ct(h);let u=c[v],p=c[h];if(o){const e="y"===v?"bottom":"right";u=wt(u+d["y"===v?"top":"left"],u,u-d[e])}if(s){const e="y"===h?"bottom":"right";p=wt(p+d["y"===h?"top":"left"],p,p-d[e])}const g=n.fn({...t,[v]:u,[h]:p});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:o,[h]:s}}}}}},Ii=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:a,middlewareData:o,rects:s,initialPlacement:n,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...f}=bt(e,t);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const m=xt(a),w=Mt(n),b=xt(n)===n,x=await(null==r.isRTL?void 0:r.isRTL(c.floating)),y=v||(b||!g?[Et(n)]:function(e){const t=Et(e);return[Ht(e),t,Ht(t)]}(n)),C="none"!==p;!v&&C&&y.push(...Lt(n,g,p,x));const Z=[n,...y],_=await Rt(t,f),M=[];let V=(null==(l=o.flip)?void 0:l.overflows)||[];if(d&&M.push(_[m]),h){const e=kt(a,s,x);M.push(_[e[0]],_[e[1]])}if(V=[...V,{placement:a,overflows:M}],!M.every(e=>e<=0)){var k,H;const e=((null==(k=o.flip)?void 0:k.index)||0)+1,t=Z[e];if(t){if(!("alignment"===h&&w!==Mt(t))||V.every(e=>Mt(e.placement)!==w||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==(H=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:H.placement;if(!i)switch(u){case"bestFit":{var $;const e=null==($=V.filter(e=>{if(C){const t=Mt(e.placement);return t===w||"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:$[0];e&&(i=e);break}case"initialPlacement":i=n}if(a!==i)return{reset:{placement:i}}}return{}}}},Ti=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,l;const{placement:a,rects:o,platform:s,elements:n}=t,{apply:r=()=>{},...c}=bt(e,t),d=await Rt(t,c),h=xt(a),v=yt(a),u="y"===Mt(a),{width:p,height:g}=o.floating;let f,m;"top"===h||"bottom"===h?(f=h,m=v===(await(null==s.isRTL?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(m=h,f="end"===v?"top":"bottom");const w=g-d.top-d.bottom,b=p-d.left-d.right,x=ht(g-d[f],w),y=ht(p-d[m],b),C=!t.middlewareData.shift;let Z=x,_=y;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(_=b),null!=(l=t.middlewareData.shift)&&l.enabled.y&&(Z=w),C&&!v){const e=vt(d.left,0),t=vt(d.right,0),i=vt(d.top,0),l=vt(d.bottom,0);u?_=p-2*(0!==e||0!==t?e+t:vt(d.left,d.right)):Z=g-2*(0!==i||0!==l?i+l:vt(d.top,d.bottom))}await r({...t,availableWidth:_,availableHeight:Z});const M=await s.getDimensions(n.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}},Pi=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i}=t,{strategy:l="referenceHidden",...a}=bt(e,t);switch(l){case"referenceHidden":{const e=Ot(await Rt(t,{...a,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:zt(e)}}}case"escaped":{const e=Ot(await Rt(t,{...a,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:zt(e)}}}default:return{}}}}},Ri=(e,t,i)=>{const l=new Map,a={platform:Si,...i},o={...a.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:a="absolute",middleware:o=[],platform:s}=i,n=o.filter(Boolean),r=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:h}=Pt(c,l,r),v=l,u={},p=0;for(let i=0;i<n.length;i++){const{name:o,fn:g}=n[i],{x:f,y:m,data:w,reset:b}=await g({x:d,y:h,initialPlacement:l,placement:v,strategy:a,middlewareData:u,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=m?m:h,u={...u,[o]:{...u[o],...w}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(v=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:d,y:h}=Pt(c,v,r))),i=-1)}return{x:d,y:h,placement:v,strategy:a,middlewareData:u}})(e,t,{...a,platform:o})};var Oi=we`:host([menuisopen]:not([disabled]):not([readonly])) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-192);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:var(--sgds-z-index-floating)}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,zi=we`.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-14);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,Di=we`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-14);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,Ui=we`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.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-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);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-size:var(--sgds-font-size-16);line-height:var(--sgds-line-height-24);outline:none;padding:0}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.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-50)}.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 Fi=(e="value")=>(t,i)=>{const l=t.constructor,a=l.prototype.attributeChangedCallback;l.prototype.attributeChangedCallback=function(t,o,s){var n;const r=l.getPropertyOptions(e);if(t===("string"==typeof r.attribute?r.attribute:e).toLowerCase()){const t=r.converter||Le,l=("function"==typeof t?t:null!==(n=null==t?void 0:t.fromAttribute)&&void 0!==n?n:Le.fromAttribute)(s,r.type);this[e]!==l&&(this[i]=l)}a.call(this,t,o,s)}};function Ni(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Wi{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,i){return this._internals.setValidity(e,t,i)}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 i in t)t[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const qi=t=>{class i extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Wi(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._mixinShouldSkipSgdsValidation()||(this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1))}_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,i){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,i)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return i.formAssociated=!0,e([Ge("sgds-input")],i.prototype,"sgdsInput",void 0),e([Ge("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var ji=we`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class Ki extends Oe{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){if(customElements.get(e));else try{customElements.define(e,t,i)}catch(l){customElements.define(e,class extends t{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach(e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}Ki.styles=[ji],Ki.dependencies={},e([We({type:Boolean,reflect:!0})],Ki.prototype,"ssr",void 0);class Gi extends Ki{constructor(){super(...arguments),this.myDropdown=st(),this.dropdownMenuId=Ni("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=st(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this._startAutoUpdate())}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Ai(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout(()=>this.emit("sgds-after-hide"),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const i=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},l=t.map(i),a=e.map(e=>{const a=i(e),o=l.indexOf(a);return-1!==o?t[o]:e}).concat(t.filter(t=>!e.some(e=>i(e)===i(t))));return a}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Li(8),this.noFlip?void 0:Ii(),Ei()].filter(Boolean);let i=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(i=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const l=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:i}),{x:a,y:o,strategy:s,placement:n}=await Ri(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",n),Object.assign(this.menuRef.value.style,{position:s,left:`${a}px`,top:`${o}px`})}}e([We({type:Boolean,state:!0})],Gi.prototype,"noFlip",void 0),e([We({type:Boolean,reflect:!0,state:!0})],Gi.prototype,"menuAlignRight",void 0),e([We({type:String,reflect:!0,state:!0})],Gi.prototype,"drop",void 0),e([We({type:Object})],Gi.prototype,"floatingOpts",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"menuIsOpen",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"disabled",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"readonly",void 0);class Ji extends Gi{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),i=t.indexOf(e.target);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1;const l=e.target;l.disabled||(this.emit("sgds-select",{detail:{item:l}}),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach(e=>{var t;const i=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");i&&i.removeAttribute("tabindex")})}_handleKeyboardMenuItemsEvent(e){if(this.readonly)return;const t=this._getActiveMenuItems();if(0!==t.length)switch(e.key){case"ArrowDown":e.preventDefault(),this._setMenuItem(this.nextDropdownItemNo);break;case"ArrowUp":e.preventDefault(),this._setMenuItem(this.prevDropdownItemNo);break;case"Tab":if(!this.menuIsOpen)return;e.preventDefault(),e.shiftKey?this._setMenuItem(this.prevDropdownItemNo):this._setMenuItem(this.nextDropdownItemNo);break;case"Enter":t.includes(e.target)&&this.handleSelectSlot(e)}}_getMenuItems(){var e,t;if(this.shadowRoot.querySelector("slot#default")){return null===(e=this.shadowRoot.querySelector("slot#default"))||void 0===e?void 0:e.assignedElements({flatten:!0}).filter(e=>!e.classList.contains("empty-menu")&&!e.hasAttribute("hidden"))}if(null===(t=this.menu)||void 0===t?void 0:t.hasChildNodes()){return[...Array.from(this.menu.children)]}return[]}_getActiveMenuItems(){return this._getMenuItems().filter(e=>!e.disabled&&!e.hidden)}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const i=(e%t.length+t.length)%t.length,l=t[i];this.emit("i-sgds-option-focus",{detail:{option:l}}),this.nextDropdownItemNo=(i+1)%t.length,this.prevDropdownItemNo=(i-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===l?"0":"-1"),e===l&&t.focus()})}}var Xi,Yi;Ji.styles=Gi.styles,e([(Xi="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(Xi)??null;if(null===i&&Yi&&!e.hasUpdated){const e="object"==typeof t?t.name:t;Ke("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${Xi}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return i};if(Yi){const{get:a,set:o}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return je(e,t,{get(){let e=a.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&o.call(this,e)),e}})}return je(e,t,{get(){return l(this)}})})],Ji.prototype,"menu",void 0),e([qe()],Ji.prototype,"nextDropdownItemNo",void 0),e([qe()],Ji.prototype,"prevDropdownItemNo",void 0),e([We({type:Boolean,reflect:!0})],Ji.prototype,"hidden",void 0);var Qi=we`.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 el extends(qi(Ji)){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.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Ni("input"),this._labelId=Ni("label"),this.floatingOpts={middleware:[Ti({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",async e=>{var t;const i=this.constructor.childName,l=(null===(t=e.relatedTarget)||void 0===t?void 0:t.tagName.toLowerCase())===i;this.invalid=!l&&!this._mixinReportValidity()})}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?S` <div class="invalid-feedback-container">
|
|
81
|
+
*/const st=()=>new nt;class nt{}const rt=new WeakMap;const ct=te(class extends ot{render(e){return L}update(e,[t]){const i=t!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),L}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=rt.get(t);void 0===i&&(i=new WeakMap,rt.set(t,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.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?rt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),dt=["top","right","bottom","left"],ht=Math.min,vt=Math.max,ut=Math.round,pt=Math.floor,gt=e=>({x:e,y:e}),ft={left:"right",right:"left",bottom:"top",top:"bottom"},mt={start:"end",end:"start"};function wt(e,t,i){return vt(e,ht(t,i))}function bt(e,t){return"function"==typeof e?e(t):e}function xt(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function Ct(e){return"x"===e?"y":"x"}function Zt(e){return"y"===e?"height":"width"}const _t=new Set(["top","bottom"]);function Mt(e){return _t.has(xt(e))?"y":"x"}function Vt(e){return Ct(Mt(e))}function kt(e,t,i){void 0===i&&(i=!1);const l=yt(e),a=Vt(e),o=Zt(a);let s="x"===a?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Et(s)),[s,Et(s)]}function Ht(e){return e.replace(/start|end/g,e=>mt[e])}const $t=["left","right"],St=["right","left"],Bt=["top","bottom"],At=["bottom","top"];function Lt(e,t,i,l){const a=yt(e);let o=function(e,t,i){switch(e){case"top":case"bottom":return i?t?St:$t:t?$t:St;case"left":case"right":return t?Bt:At;default:return[]}}(xt(e),"start"===i,l);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(Ht)))),o}function Et(e){return e.replace(/left|right|bottom|top/g,e=>ft[e])}function It(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 Tt(e){const{x:t,y:i,width:l,height:a}=e;return{width:l,height:a,top:i,left:t,right:t+l,bottom:i+a,x:t,y:i}}function Pt(e,t,i){let{reference:l,floating:a}=e;const o=Mt(t),s=Vt(t),n=Zt(s),r=xt(t),c="y"===o,d=l.x+l.width/2-a.width/2,h=l.y+l.height/2-a.height/2,v=l[n]/2-a[n]/2;let u;switch(r){case"top":u={x:d,y:l.y-a.height};break;case"bottom":u={x:d,y:l.y+l.height};break;case"right":u={x:l.x+l.width,y:h};break;case"left":u={x:l.x-a.width,y:h};break;default:u={x:l.x,y:l.y}}switch(yt(t)){case"start":u[s]-=v*(i&&c?-1:1);break;case"end":u[s]+=v*(i&&c?-1:1)}return u}async function Rt(e,t){var i;void 0===t&&(t={});const{x:l,y:a,platform:o,rects:s,elements:n,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:u=0}=bt(t,e),p=It(u),g=n[v?"floating"===h?"reference":"floating":h],f=Tt(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(g)))||i?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(n.floating)),boundary:c,rootBoundary:d,strategy:r})),m="floating"===h?{x:l,y:a,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==o.getOffsetParent?void 0:o.getOffsetParent(n.floating)),b=await(null==o.isElement?void 0:o.isElement(w))&&await(null==o.getScale?void 0:o.getScale(w))||{x:1,y:1},x=Tt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:m,offsetParent:w,strategy:r}):m);return{top:(f.top-x.top+p.top)/b.y,bottom:(x.bottom-f.bottom+p.bottom)/b.y,left:(f.left-x.left+p.left)/b.x,right:(x.right-f.right+p.right)/b.x}}function Ot(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zt(e){return dt.some(t=>e[t]>=0)}const Dt=new Set(["left","top"]);function Ut(){return"undefined"!=typeof window}function Ft(e){return qt(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Wt(e){var t;return null==(t=(qt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function qt(e){return!!Ut()&&(e instanceof Node||e instanceof Nt(e).Node)}function jt(e){return!!Ut()&&(e instanceof Element||e instanceof Nt(e).Element)}function Kt(e){return!!Ut()&&(e instanceof HTMLElement||e instanceof Nt(e).HTMLElement)}function Gt(e){return!(!Ut()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot)}const Jt=new Set(["inline","contents"]);function Xt(e){const{overflow:t,overflowX:i,overflowY:l,display:a}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!Jt.has(a)}const Yt=new Set(["table","td","th"]);function Qt(e){return Yt.has(Ft(e))}const ei=[":popover-open",":modal"];function ti(e){return ei.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ii=["transform","translate","scale","rotate","perspective"],li=["transform","translate","scale","rotate","perspective","filter"],ai=["paint","layout","strict","content"];function oi(e){const t=si(),i=jt(e)?ci(e):e;return ii.some(e=>!!i[e]&&"none"!==i[e])||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||li.some(e=>(i.willChange||"").includes(e))||ai.some(e=>(i.contain||"").includes(e))}function si(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ni=new Set(["html","body","#document"]);function ri(e){return ni.has(Ft(e))}function ci(e){return Nt(e).getComputedStyle(e)}function di(e){return jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if("html"===Ft(e))return e;const t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||Wt(e);return Gt(t)?t.host:t}function vi(e){const t=hi(e);return ri(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kt(t)&&Xt(t)?t:vi(t)}function ui(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const a=vi(e),o=a===(null==(l=e.ownerDocument)?void 0:l.body),s=Nt(a);if(o){const e=pi(s);return t.concat(s,s.visualViewport||[],Xt(a)?a:[],e&&i?ui(e):[])}return t.concat(a,ui(a,[],i))}function pi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gi(e){const t=ci(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const a=Kt(e),o=a?e.offsetWidth:i,s=a?e.offsetHeight:l,n=ut(i)!==o||ut(l)!==s;return n&&(i=o,l=s),{width:i,height:l,$:n}}function fi(e){return jt(e)?e:e.contextElement}function mi(e){const t=fi(e);if(!Kt(t))return gt(1);const i=t.getBoundingClientRect(),{width:l,height:a,$:o}=gi(t);let s=(o?ut(i.width):i.width)/l,n=(o?ut(i.height):i.height)/a;return s&&Number.isFinite(s)||(s=1),n&&Number.isFinite(n)||(n=1),{x:s,y:n}}const wi=gt(0);function bi(e){const t=Nt(e);return si()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wi}function xi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const a=e.getBoundingClientRect(),o=fi(e);let s=gt(1);t&&(l?jt(l)&&(s=mi(l)):s=mi(e));const n=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Nt(e))&&t}(o,i,l)?bi(o):gt(0);let r=(a.left+n.x)/s.x,c=(a.top+n.y)/s.y,d=a.width/s.x,h=a.height/s.y;if(o){const e=Nt(o),t=l&&jt(l)?Nt(l):l;let i=e,a=pi(i);for(;a&&l&&t!==i;){const e=mi(a),t=a.getBoundingClientRect(),l=ci(a),o=t.left+(a.clientLeft+parseFloat(l.paddingLeft))*e.x,s=t.top+(a.clientTop+parseFloat(l.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=o,c+=s,i=Nt(a),a=pi(i)}}return Tt({width:d,height:h,x:r,y:c})}function yi(e,t){const i=di(e).scrollLeft;return t?t.left+i:xi(Wt(e)).left+i}function Ci(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-yi(e,i),y:i.top+t.scrollTop}}const Zi=new Set(["absolute","fixed"]);function _i(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=Nt(e),l=Wt(e),a=i.visualViewport;let o=l.clientWidth,s=l.clientHeight,n=0,r=0;if(a){o=a.width,s=a.height;const e=si();(!e||e&&"fixed"===t)&&(n=a.offsetLeft,r=a.offsetTop)}const c=yi(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,s=Math.abs(l.clientWidth-t.clientWidth-a);s<=25&&(o-=s)}else c<=25&&(o+=c);return{width:o,height:s,x:n,y:r}}(e,i);else if("document"===t)l=function(e){const t=Wt(e),i=di(e),l=e.ownerDocument.body,a=vt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),o=vt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let s=-i.scrollLeft+yi(e);const n=-i.scrollTop;return"rtl"===ci(l).direction&&(s+=vt(t.clientWidth,l.clientWidth)-a),{width:a,height:o,x:s,y:n}}(Wt(e));else if(jt(t))l=function(e,t){const i=xi(e,!0,"fixed"===t),l=i.top+e.clientTop,a=i.left+e.clientLeft,o=Kt(e)?mi(e):gt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:l*o.y}}(t,i);else{const i=bi(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Tt(l)}function Mi(e,t){const i=hi(e);return!(i===t||!jt(i)||ri(i))&&("fixed"===ci(i).position||Mi(i,t))}function Vi(e,t,i){const l=Kt(t),a=Wt(t),o="fixed"===i,s=xi(e,!0,o,t);let n={scrollLeft:0,scrollTop:0};const r=gt(0);function c(){r.x=yi(a)}if(l||!l&&!o)if(("body"!==Ft(t)||Xt(a))&&(n=di(t)),l){const e=xi(t,!0,o,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else a&&c();o&&!l&&a&&c();const d=!a||l||o?gt(0):Ci(a,n);return{x:s.left+n.scrollLeft-r.x-d.x,y:s.top+n.scrollTop-r.y-d.y,width:s.width,height:s.height}}function ki(e){return"static"===ci(e).position}function Hi(e,t){if(!Kt(e)||"fixed"===ci(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Wt(e)===i&&(i=i.ownerDocument.body),i}function $i(e,t){const i=Nt(e);if(ti(e))return i;if(!Kt(e)){let t=hi(e);for(;t&&!ri(t);){if(jt(t)&&!ki(t))return t;t=hi(t)}return i}let l=Hi(e,t);for(;l&&Qt(l)&&ki(l);)l=Hi(l,t);return l&&ri(l)&&ki(l)&&!oi(l)?i:l||function(e){let t=hi(e);for(;Kt(t)&&!ri(t);){if(oi(t))return t;if(ti(t))return null;t=hi(t)}return null}(e)||i}const Si={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:a}=e;const o="fixed"===a,s=Wt(l),n=!!t&&ti(t.floating);if(l===s||n&&o)return i;let r={scrollLeft:0,scrollTop:0},c=gt(1);const d=gt(0),h=Kt(l);if((h||!h&&!o)&&(("body"!==Ft(l)||Xt(s))&&(r=di(l)),Kt(l))){const e=xi(l);c=mi(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const v=!s||h||o?gt(0):Ci(s,r);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-r.scrollLeft*c.x+d.x+v.x,y:i.y*c.y-r.scrollTop*c.y+d.y+v.y}},getDocumentElement:Wt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:a}=e;const o=[..."clippingAncestors"===i?ti(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=ui(e,[],!1).filter(e=>jt(e)&&"body"!==Ft(e)),a=null;const o="fixed"===ci(e).position;let s=o?hi(e):e;for(;jt(s)&&!ri(s);){const t=ci(s),i=oi(s);i||"fixed"!==t.position||(a=null),(o?!i&&!a:!i&&"static"===t.position&&a&&Zi.has(a.position)||Xt(s)&&!i&&Mi(e,s))?l=l.filter(e=>e!==s):a=t,s=hi(s)}return t.set(e,l),l}(t,this._c):[].concat(i),l],s=o[0],n=o.reduce((e,i)=>{const l=_i(t,i,a);return e.top=vt(l.top,e.top),e.right=ht(l.right,e.right),e.bottom=ht(l.bottom,e.bottom),e.left=vt(l.left,e.left),e},_i(t,s,a));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:$i,getElementRects:async function(e){const t=this.getOffsetParent||$i,i=this.getDimensions,l=await i(e.floating);return{reference:Vi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=gi(e);return{width:t,height:i}},getScale:mi,isElement:jt,isRTL:function(e){return"rtl"===ci(e).direction}};function Bi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ai(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:r=!1}=l,c=fi(e),d=a||o?[...c?ui(c):[],...ui(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",i,{passive:!0}),o&&e.addEventListener("resize",i)});const h=c&&n?function(e,t){let i,l=null;const a=Wt(e);function o(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function s(n,r){void 0===n&&(n=!1),void 0===r&&(r=1),o();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:u}=c;if(n||t(),!v||!u)return;const p={rootMargin:-pt(h)+"px "+-pt(a.clientWidth-(d+v))+"px "+-pt(a.clientHeight-(h+u))+"px "+-pt(d)+"px",threshold:vt(0,ht(1,r))||1};let g=!0;function f(t){const l=t[0].intersectionRatio;if(l!==r){if(!g)return s();l?s(!1,l):i=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==l||Bi(c,e.getBoundingClientRect())||s(),g=!1}try{l=new IntersectionObserver(f,{...p,root:a.ownerDocument})}catch(e){l=new IntersectionObserver(f,p)}l.observe(e)}(!0),o}(c,i):null;let v,u=-1,p=null;s&&(p=new ResizeObserver(e=>{let[l]=e;l&&l.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),i()}),c&&!r&&p.observe(c),p.observe(t));let g=r?xi(e):null;return r&&function t(){const l=xi(e);g&&!Bi(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",i),o&&e.removeEventListener("resize",i)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,r&&cancelAnimationFrame(v)}}const Li=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:a,y:o,placement:s,middlewareData:n}=t,r=await async function(e,t){const{placement:i,platform:l,elements:a}=e,o=await(null==l.isRTL?void 0:l.isRTL(a.floating)),s=xt(i),n=yt(i),r="y"===Mt(i),c=Dt.has(s)?-1:1,d=o&&r?-1:1,h=bt(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return n&&"number"==typeof p&&(u="end"===n?-1*p:p),r?{x:u*d,y:v*c}:{x:v*c,y:u*d}}(t,e);return s===(null==(i=n.offset)?void 0:i.placement)&&null!=(l=n.arrow)&&l.alignmentOffset?{}:{x:a+r.x,y:o+r.y,data:{...r,placement:s}}}}},Ei=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:n={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...r}=bt(e,t),c={x:i,y:l},d=await Rt(t,r),h=Mt(xt(a)),v=Ct(h);let u=c[v],p=c[h];if(o){const e="y"===v?"bottom":"right";u=wt(u+d["y"===v?"top":"left"],u,u-d[e])}if(s){const e="y"===h?"bottom":"right";p=wt(p+d["y"===h?"top":"left"],p,p-d[e])}const g=n.fn({...t,[v]:u,[h]:p});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:o,[h]:s}}}}}},Ii=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:a,middlewareData:o,rects:s,initialPlacement:n,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...f}=bt(e,t);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const m=xt(a),w=Mt(n),b=xt(n)===n,x=await(null==r.isRTL?void 0:r.isRTL(c.floating)),y=v||(b||!g?[Et(n)]:function(e){const t=Et(e);return[Ht(e),t,Ht(t)]}(n)),C="none"!==p;!v&&C&&y.push(...Lt(n,g,p,x));const Z=[n,...y],_=await Rt(t,f),M=[];let V=(null==(l=o.flip)?void 0:l.overflows)||[];if(d&&M.push(_[m]),h){const e=kt(a,s,x);M.push(_[e[0]],_[e[1]])}if(V=[...V,{placement:a,overflows:M}],!M.every(e=>e<=0)){var k,H;const e=((null==(k=o.flip)?void 0:k.index)||0)+1,t=Z[e];if(t){if(!("alignment"===h&&w!==Mt(t))||V.every(e=>Mt(e.placement)!==w||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==(H=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:H.placement;if(!i)switch(u){case"bestFit":{var $;const e=null==($=V.filter(e=>{if(C){const t=Mt(e.placement);return t===w||"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:$[0];e&&(i=e);break}case"initialPlacement":i=n}if(a!==i)return{reset:{placement:i}}}return{}}}},Ti=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,l;const{placement:a,rects:o,platform:s,elements:n}=t,{apply:r=()=>{},...c}=bt(e,t),d=await Rt(t,c),h=xt(a),v=yt(a),u="y"===Mt(a),{width:p,height:g}=o.floating;let f,m;"top"===h||"bottom"===h?(f=h,m=v===(await(null==s.isRTL?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(m=h,f="end"===v?"top":"bottom");const w=g-d.top-d.bottom,b=p-d.left-d.right,x=ht(g-d[f],w),y=ht(p-d[m],b),C=!t.middlewareData.shift;let Z=x,_=y;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(_=b),null!=(l=t.middlewareData.shift)&&l.enabled.y&&(Z=w),C&&!v){const e=vt(d.left,0),t=vt(d.right,0),i=vt(d.top,0),l=vt(d.bottom,0);u?_=p-2*(0!==e||0!==t?e+t:vt(d.left,d.right)):Z=g-2*(0!==i||0!==l?i+l:vt(d.top,d.bottom))}await r({...t,availableWidth:_,availableHeight:Z});const M=await s.getDimensions(n.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}},Pi=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i}=t,{strategy:l="referenceHidden",...a}=bt(e,t);switch(l){case"referenceHidden":{const e=Ot(await Rt(t,{...a,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:zt(e)}}}case"escaped":{const e=Ot(await Rt(t,{...a,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:zt(e)}}}default:return{}}}}},Ri=(e,t,i)=>{const l=new Map,a={platform:Si,...i},o={...a.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:a="absolute",middleware:o=[],platform:s}=i,n=o.filter(Boolean),r=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:h}=Pt(c,l,r),v=l,u={},p=0;for(let i=0;i<n.length;i++){const{name:o,fn:g}=n[i],{x:f,y:m,data:w,reset:b}=await g({x:d,y:h,initialPlacement:l,placement:v,strategy:a,middlewareData:u,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=m?m:h,u={...u,[o]:{...u[o],...w}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(v=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:d,y:h}=Pt(c,v,r))),i=-1)}return{x:d,y:h,placement:v,strategy:a,middlewareData:u}})(e,t,{...a,platform:o})};var Oi=we`:host([menuisopen]:not([disabled]):not([readonly])) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-192);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1050}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,zi=we`.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-14);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,Di=we`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-14);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,Ui=we`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.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-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);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-size:var(--sgds-font-size-16);line-height:var(--sgds-line-height-24);outline:none;padding:0}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.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-50)}.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 Fi=(e="value")=>(t,i)=>{const l=t.constructor,a=l.prototype.attributeChangedCallback;l.prototype.attributeChangedCallback=function(t,o,s){var n;const r=l.getPropertyOptions(e);if(t===("string"==typeof r.attribute?r.attribute:e).toLowerCase()){const t=r.converter||Le,l=("function"==typeof t?t:null!==(n=null==t?void 0:t.fromAttribute)&&void 0!==n?n:Le.fromAttribute)(s,r.type);this[e]!==l&&(this[i]=l)}a.call(this,t,o,s)}};function Ni(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Wi{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,i){return this._internals.setValidity(e,t,i)}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 i in t)t[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const qi=t=>{class i extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Wi(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._mixinShouldSkipSgdsValidation()||(this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1))}_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,i){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,i)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return i.formAssociated=!0,e([Ge("sgds-input")],i.prototype,"sgdsInput",void 0),e([Ge("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var ji=we`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class Ki extends Oe{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){if(customElements.get(e));else try{customElements.define(e,t,i)}catch(l){customElements.define(e,class extends t{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach(e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}Ki.styles=[ji],Ki.dependencies={},e([We({type:Boolean,reflect:!0})],Ki.prototype,"ssr",void 0);class Gi extends Ki{constructor(){super(...arguments),this.myDropdown=st(),this.dropdownMenuId=Ni("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=st(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this._startAutoUpdate())}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Ai(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout(()=>this.emit("sgds-after-hide"),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const i=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},l=t.map(i),a=e.map(e=>{const a=i(e),o=l.indexOf(a);return-1!==o?t[o]:e}).concat(t.filter(t=>!e.some(e=>i(e)===i(t))));return a}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Li(8),this.noFlip?void 0:Ii(),Ei()].filter(Boolean);let i=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(i=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const l=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:i}),{x:a,y:o,strategy:s,placement:n}=await Ri(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",n),Object.assign(this.menuRef.value.style,{position:s,left:`${a}px`,top:`${o}px`})}}e([We({type:Boolean,state:!0})],Gi.prototype,"noFlip",void 0),e([We({type:Boolean,reflect:!0,state:!0})],Gi.prototype,"menuAlignRight",void 0),e([We({type:String,reflect:!0,state:!0})],Gi.prototype,"drop",void 0),e([We({type:Object})],Gi.prototype,"floatingOpts",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"menuIsOpen",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"disabled",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"readonly",void 0);class Ji extends Gi{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),i=t.indexOf(e.target);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1;const l=e.target;l.disabled||(this.emit("sgds-select",{detail:{item:l}}),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach(e=>{var t;const i=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");i&&i.removeAttribute("tabindex")})}_handleKeyboardMenuItemsEvent(e){if(this.readonly)return;const t=this._getActiveMenuItems();if(0!==t.length)switch(e.key){case"ArrowDown":e.preventDefault(),this._setMenuItem(this.nextDropdownItemNo);break;case"ArrowUp":e.preventDefault(),this._setMenuItem(this.prevDropdownItemNo);break;case"Tab":if(!this.menuIsOpen)return;e.preventDefault(),e.shiftKey?this._setMenuItem(this.prevDropdownItemNo):this._setMenuItem(this.nextDropdownItemNo);break;case"Enter":t.includes(e.target)&&this.handleSelectSlot(e)}}_getMenuItems(){var e,t;if(this.shadowRoot.querySelector("slot#default")){return null===(e=this.shadowRoot.querySelector("slot#default"))||void 0===e?void 0:e.assignedElements({flatten:!0}).filter(e=>!e.classList.contains("empty-menu")&&!e.hasAttribute("hidden"))}if(null===(t=this.menu)||void 0===t?void 0:t.hasChildNodes()){return[...Array.from(this.menu.children)]}return[]}_getActiveMenuItems(){return this._getMenuItems().filter(e=>!e.disabled&&!e.hidden)}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const i=(e%t.length+t.length)%t.length,l=t[i];this.emit("i-sgds-option-focus",{detail:{option:l}}),this.nextDropdownItemNo=(i+1)%t.length,this.prevDropdownItemNo=(i-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===l?"0":"-1"),e===l&&t.focus()})}}var Xi,Yi;Ji.styles=Gi.styles,e([(Xi="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(Xi)??null;if(null===i&&Yi&&!e.hasUpdated){const e="object"==typeof t?t.name:t;Ke("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${Xi}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return i};if(Yi){const{get:a,set:o}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return je(e,t,{get(){let e=a.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&o.call(this,e)),e}})}return je(e,t,{get(){return l(this)}})})],Ji.prototype,"menu",void 0),e([qe()],Ji.prototype,"nextDropdownItemNo",void 0),e([qe()],Ji.prototype,"prevDropdownItemNo",void 0),e([We({type:Boolean,reflect:!0})],Ji.prototype,"hidden",void 0);var Qi=we`.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 el extends(qi(Ji)){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.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Ni("input"),this._labelId=Ni("label"),this.floatingOpts={middleware:[Ti({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",async e=>{var t;const i=this.constructor.childName,l=(null===(t=e.relatedTarget)||void 0===t?void 0:t.tagName.toLowerCase())===i;this.invalid=!l&&!this._mixinReportValidity()})}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?S` <div class="invalid-feedback-container">
|
|
82
82
|
<slot name="invalidIcon">
|
|
83
83
|
<sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
|
|
84
84
|
</slot>
|
|
@@ -92,7 +92,7 @@ function Ge(e){return(t,i)=>je(t,i,{async get(){return await this.updateComplete
|
|
|
92
92
|
class=${Xe({"form-label":!0,required:this.required})}
|
|
93
93
|
>${this.label}</label
|
|
94
94
|
>
|
|
95
|
-
`;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)),i=await Promise.all(t);return null==i?void 0:i.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 S` <div class="empty-menu">No options</div> `}_renderLoadingMenu(){return S`<div class="loading-menu"><sgds-spinner size="xs" tone="brand"></sgds-spinner>Loading...</div>`}}function tl(e,t){const i=Object.assign({waitUntilFirstUpdate:!1},t);return(t,l)=>{const{update:a}=t;if(e in t){const o=e;t.update=function(e){if(e.has(o)){const t=e.get(o),a=this[o];t!==a&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[l](t,a))}a.call(this,e)}}}}el.styles=[...Ji.styles,Oi,Di,zi,Ui,Qi],e([We({reflect:!0})],el.prototype,"label",void 0),e([We({reflect:!0})],el.prototype,"hintText",void 0),e([We({reflect:!0})],el.prototype,"name",void 0),e([We({type:String,reflect:!0})],el.prototype,"placeholder",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"autofocus",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"disabled",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"required",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"loading",void 0),e([We({type:String,reflect:!0})],el.prototype,"value",void 0),e([qe()],el.prototype,"displayValue",void 0),e([Fi()],el.prototype,"defaultValue",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"hasFeedback",void 0),e([We({type:String,reflect:!0})],el.prototype,"invalidFeedback",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"invalid",void 0),e([We({type:Array})],el.prototype,"menuList",void 0),e([qe()],el.prototype,"selectedItems",void 0),e([qe()],el.prototype,"filteredList",void 0),e([Ge("input.form-control")],el.prototype,"_input",void 0);var il=we`:host{cursor:default;display:inline-flex;max-width:100%}:host([variant=accent]) .badge{background-color:var(--sgds-accent-surface-default)}:host([variant=success]) .badge{background-color:var(--sgds-success-surface-default)}:host([variant=danger]) .badge{background-color:var(--sgds-danger-surface-default)}:host([variant=warning]) .badge{background-color:var(--sgds-warning-surface-default);color:var(--sgds-color-fixed-dark)}:host([variant=cyan]) .badge{background-color:var(--sgds-cyan-surface-default)}:host([variant=purple]) .badge{background-color:var(--sgds-purple-surface-default)}:host([variant=neutral]) .badge{background-color:var(--sgds-neutral-surface-default)}:host([variant=white]) .badge{background-color:var(--sgds-surface-fixed-light);color:var(--sgds-color-fixed-dark)}:host([variant=accent][outlined]) .badge{background-color:var(--sgds-accent-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-accent-border-color-muted);color:var(--sgds-accent-color-fixed-dark)}:host([variant=success][outlined]) .badge{background-color:var(--sgds-success-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-success-border-color-muted);color:var(--sgds-success-color-fixed-dark)}:host([variant=danger][outlined]) .badge{background-color:var(--sgds-danger-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-danger-border-color-muted);color:var(--sgds-danger-color-fixed-dark)}:host([variant=warning][outlined]) .badge{background-color:var(--sgds-warning-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-warning-border-color-muted);color:var(--sgds-warning-color-fixed-dark)}:host([variant=cyan][outlined]) .badge{background-color:var(--sgds-cyan-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-cyan-border-color-muted);color:var(--sgds-cyan-color-fixed-dark)}:host([variant=purple][outlined]) .badge{background-color:var(--sgds-purple-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-purple-border-color-muted);color:var(--sgds-purple-color-fixed-dark)}:host([variant=neutral][outlined]) .badge{background-color:var(--sgds-neutral-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-neutral-border-color-muted);color:var(--sgds-color-fixed-dark)}:host([variant=white][outlined]) .badge{background-color:var(--sgds-surface-fixed-light);border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);color:var(--sgds-color-fixed-dark)}sgds-tooltip{display:block;max-width:100%}.badge{align-items:center;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-sm);color:var(--sgds-color-fixed-light);display:inline-flex;font-size:var(--sgds-font-size-14);height:var(--sgds-dimension-24,24px);justify-content:center;max-width:var(--sgds-dimension-192);min-width:var(--sgds-dimension-24);padding:var(--sgds-padding-none) var(--sgds-padding-xs)}.badge.outlined{background-color:var(--sgds-primary-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-primary-border-color-muted);color:var(--sgds-primary-color-fixed-dark)}.badge.full-width{max-width:100%}.badge-label{line-height:var(--sgds-line-height-20);padding:var(--sgds-padding-none) var(--sgds-padding-3-xs)}.badge-dismissible{padding-right:0}.badge-dimissible sgds-close-button{--sgds-close-btn-border-radius:var(--sgds-border-radius-sm)}.badge.truncated .badge-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}slot::slotted(*){font-size:var(--sgds-font-size-14);font-weight:var(--sgds-font-weight-regular)}`,ll=we`: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-14);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:
|
|
95
|
+
`;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)),i=await Promise.all(t);return null==i?void 0:i.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 S` <div class="empty-menu">No options</div> `}_renderLoadingMenu(){return S`<div class="loading-menu"><sgds-spinner size="xs" tone="brand"></sgds-spinner>Loading...</div>`}}function tl(e,t){const i=Object.assign({waitUntilFirstUpdate:!1},t);return(t,l)=>{const{update:a}=t;if(e in t){const o=e;t.update=function(e){if(e.has(o)){const t=e.get(o),a=this[o];t!==a&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[l](t,a))}a.call(this,e)}}}}el.styles=[...Ji.styles,Oi,Di,zi,Ui,Qi],e([We({reflect:!0})],el.prototype,"label",void 0),e([We({reflect:!0})],el.prototype,"hintText",void 0),e([We({reflect:!0})],el.prototype,"name",void 0),e([We({type:String,reflect:!0})],el.prototype,"placeholder",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"autofocus",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"disabled",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"required",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"loading",void 0),e([We({type:String,reflect:!0})],el.prototype,"value",void 0),e([qe()],el.prototype,"displayValue",void 0),e([Fi()],el.prototype,"defaultValue",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"hasFeedback",void 0),e([We({type:String,reflect:!0})],el.prototype,"invalidFeedback",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"invalid",void 0),e([We({type:Array})],el.prototype,"menuList",void 0),e([qe()],el.prototype,"selectedItems",void 0),e([qe()],el.prototype,"filteredList",void 0),e([Ge("input.form-control")],el.prototype,"_input",void 0);var il=we`:host{cursor:default;display:inline-flex;max-width:100%}:host([variant=accent]) .badge{background-color:var(--sgds-accent-surface-default)}:host([variant=success]) .badge{background-color:var(--sgds-success-surface-default)}:host([variant=danger]) .badge{background-color:var(--sgds-danger-surface-default)}:host([variant=warning]) .badge{background-color:var(--sgds-warning-surface-default);color:var(--sgds-color-fixed-dark)}:host([variant=cyan]) .badge{background-color:var(--sgds-cyan-surface-default)}:host([variant=purple]) .badge{background-color:var(--sgds-purple-surface-default)}:host([variant=neutral]) .badge{background-color:var(--sgds-neutral-surface-default)}:host([variant=white]) .badge{background-color:var(--sgds-surface-fixed-light);color:var(--sgds-color-fixed-dark)}:host([variant=accent][outlined]) .badge{background-color:var(--sgds-accent-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-accent-border-color-muted);color:var(--sgds-accent-color-fixed-dark)}:host([variant=success][outlined]) .badge{background-color:var(--sgds-success-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-success-border-color-muted);color:var(--sgds-success-color-fixed-dark)}:host([variant=danger][outlined]) .badge{background-color:var(--sgds-danger-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-danger-border-color-muted);color:var(--sgds-danger-color-fixed-dark)}:host([variant=warning][outlined]) .badge{background-color:var(--sgds-warning-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-warning-border-color-muted);color:var(--sgds-warning-color-fixed-dark)}:host([variant=cyan][outlined]) .badge{background-color:var(--sgds-cyan-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-cyan-border-color-muted);color:var(--sgds-cyan-color-fixed-dark)}:host([variant=purple][outlined]) .badge{background-color:var(--sgds-purple-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-purple-border-color-muted);color:var(--sgds-purple-color-fixed-dark)}:host([variant=neutral][outlined]) .badge{background-color:var(--sgds-neutral-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-neutral-border-color-muted);color:var(--sgds-color-fixed-dark)}:host([variant=white][outlined]) .badge{background-color:var(--sgds-surface-fixed-light);border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);color:var(--sgds-color-fixed-dark)}sgds-tooltip{display:block;max-width:100%}.badge{align-items:center;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-sm);color:var(--sgds-color-fixed-light);display:inline-flex;font-size:var(--sgds-font-size-14);height:var(--sgds-dimension-24,24px);justify-content:center;max-width:var(--sgds-dimension-192);min-width:var(--sgds-dimension-24);padding:var(--sgds-padding-none) var(--sgds-padding-xs)}.badge.outlined{background-color:var(--sgds-primary-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-primary-border-color-muted);color:var(--sgds-primary-color-fixed-dark)}.badge.full-width{max-width:100%}.badge-label{line-height:var(--sgds-line-height-20);padding:var(--sgds-padding-none) var(--sgds-padding-3-xs)}.badge-dismissible{padding-right:0}.badge-dimissible sgds-close-button{--sgds-close-btn-border-radius:var(--sgds-border-radius-sm)}.badge.truncated .badge-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}slot::slotted(*){font-size:var(--sgds-font-size-14);font-weight:var(--sgds-font-weight-regular)}`,ll=we`: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-14);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:900}div{max-width:fit-content}`;class al extends Ki{constructor(){super(...arguments),this._myTooltip=st(),this._tooltipBubble=st(),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:i,strategy:l,middlewareData:a}=await Ri(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[Li(8),Ii(),Ei(),Pi()]});this._tooltipBubble.value.setAttribute("data-placement",i),Object.assign(this._tooltipBubble.value.style,{position:l,left:`${e}px`,top:`${t}px`});const{referenceHidden:o,escaped:s}=a.hide||{};this._tooltipBubble.value.style.visibility=o||s?"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=Ai(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 S`
|
|
96
96
|
<div ${ct(this._myTooltip)} class="tooltip-placeholder">
|
|
97
97
|
<slot @slotchange=${()=>this._handleSlotChange()}></slot>
|
|
98
98
|
${this.open?S`<div ${ct(this._tooltipBubble)} class="tooltip" role="tooltip">${this.content}</div>`:null}
|