@govtechsg/sgds-web-component 3.27.0-rc.3 → 3.27.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.
Files changed (202) hide show
  1. package/base/dropdown-list-element.js +2 -9
  2. package/base/dropdown-list-element.js.map +1 -1
  3. package/components/Breadcrumb/index.umd.min.js +5 -5
  4. package/components/Breadcrumb/index.umd.min.js.map +1 -1
  5. package/components/ComboBox/index.umd.min.js +1 -1
  6. package/components/ComboBox/index.umd.min.js.map +1 -1
  7. package/components/DataTable/data-table.js +1 -1
  8. package/components/DataTable/index.umd.min.js +49 -42
  9. package/components/DataTable/index.umd.min.js.map +1 -1
  10. package/components/DataTable/sgds-data-table-cell.d.ts +2 -2
  11. package/components/DataTable/sgds-data-table-cell.js.map +1 -1
  12. package/components/DataTable/sgds-data-table-head.d.ts +2 -2
  13. package/components/DataTable/sgds-data-table-head.js.map +1 -1
  14. package/components/DataTable/sgds-data-table-row.d.ts +0 -3
  15. package/components/DataTable/sgds-data-table-row.js +0 -13
  16. package/components/DataTable/sgds-data-table-row.js.map +1 -1
  17. package/components/DataTable/sgds-data-table.d.ts +7 -4
  18. package/components/DataTable/sgds-data-table.js +49 -38
  19. package/components/DataTable/sgds-data-table.js.map +1 -1
  20. package/components/DataTable/types.d.ts +7 -0
  21. package/components/Datepicker/index.umd.min.js +1 -1
  22. package/components/Dropdown/dropdown-item.js +1 -1
  23. package/components/Dropdown/index.umd.min.js +5 -5
  24. package/components/Dropdown/index.umd.min.js.map +1 -1
  25. package/components/Dropdown/sgds-dropdown-item.d.ts +0 -2
  26. package/components/Dropdown/sgds-dropdown-item.js +2 -8
  27. package/components/Dropdown/sgds-dropdown-item.js.map +1 -1
  28. package/components/Footer/index.umd.min.js +1 -1
  29. package/components/Footer/index.umd.min.js.map +1 -1
  30. package/components/Footer/sgds-footer.js +1 -1
  31. package/components/Footer/sgds-footer.js.map +1 -1
  32. package/components/Input/index.umd.min.js +1 -1
  33. package/components/Mainnav/index.d.ts +0 -2
  34. package/components/Mainnav/index.js +0 -2
  35. package/components/Mainnav/index.js.map +1 -1
  36. package/components/Mainnav/index.umd.min.js +285 -338
  37. package/components/Mainnav/index.umd.min.js.map +1 -1
  38. package/components/Mainnav/mainnav-dropdown.js +1 -1
  39. package/components/Mainnav/mainnav-item.js +1 -1
  40. package/components/Mainnav/mainnav.js +1 -1
  41. package/components/Mainnav/sgds-mainnav.d.ts +51 -8
  42. package/components/Mainnav/sgds-mainnav.js +238 -40
  43. package/components/Mainnav/sgds-mainnav.js.map +1 -1
  44. package/components/OverflowMenu/index.umd.min.js +5 -5
  45. package/components/OverflowMenu/index.umd.min.js.map +1 -1
  46. package/components/QuantityToggle/index.umd.min.js +1 -1
  47. package/components/Select/index.umd.min.js +21 -21
  48. package/components/Select/index.umd.min.js.map +1 -1
  49. package/components/Tab/index.umd.min.js +1 -1
  50. package/components/Tab/index.umd.min.js.map +1 -1
  51. package/components/Tab/tab-panel.js +1 -1
  52. package/components/Textarea/index.umd.min.js +1 -1
  53. package/components/index.d.ts +0 -3
  54. package/components/index.js +0 -3
  55. package/components/index.js.map +1 -1
  56. package/components/index.umd.min.js +587 -665
  57. package/components/index.umd.min.js.map +1 -1
  58. package/css/fouc.css +5 -8
  59. package/custom-elements.json +15246 -17418
  60. package/index.d.ts +0 -1
  61. package/index.js +0 -1
  62. package/index.js.map +1 -1
  63. package/index.umd.min.js +353 -441
  64. package/index.umd.min.js.map +1 -1
  65. package/package.json +1 -1
  66. package/react/base/dropdown-list-element.cjs.js +2 -9
  67. package/react/base/dropdown-list-element.cjs.js.map +1 -1
  68. package/react/base/dropdown-list-element.js +2 -9
  69. package/react/base/dropdown-list-element.js.map +1 -1
  70. package/react/components/DataTable/data-table.cjs.js +1 -1
  71. package/react/components/DataTable/data-table.js +1 -1
  72. package/react/components/DataTable/sgds-data-table-cell.cjs.js.map +1 -1
  73. package/react/components/DataTable/sgds-data-table-cell.js.map +1 -1
  74. package/react/components/DataTable/sgds-data-table-head.cjs.js.map +1 -1
  75. package/react/components/DataTable/sgds-data-table-head.js.map +1 -1
  76. package/react/components/DataTable/sgds-data-table-row.cjs.js +0 -13
  77. package/react/components/DataTable/sgds-data-table-row.cjs.js.map +1 -1
  78. package/react/components/DataTable/sgds-data-table-row.js +0 -13
  79. package/react/components/DataTable/sgds-data-table-row.js.map +1 -1
  80. package/react/components/DataTable/sgds-data-table.cjs.js +49 -38
  81. package/react/components/DataTable/sgds-data-table.cjs.js.map +1 -1
  82. package/react/components/DataTable/sgds-data-table.js +49 -38
  83. package/react/components/DataTable/sgds-data-table.js.map +1 -1
  84. package/react/components/Dropdown/dropdown-item.cjs.js +1 -1
  85. package/react/components/Dropdown/dropdown-item.js +1 -1
  86. package/react/components/Dropdown/sgds-dropdown-item.cjs.js +2 -8
  87. package/react/components/Dropdown/sgds-dropdown-item.cjs.js.map +1 -1
  88. package/react/components/Dropdown/sgds-dropdown-item.js +2 -8
  89. package/react/components/Dropdown/sgds-dropdown-item.js.map +1 -1
  90. package/react/components/Footer/sgds-footer.cjs.js +1 -1
  91. package/react/components/Footer/sgds-footer.cjs.js.map +1 -1
  92. package/react/components/Footer/sgds-footer.js +1 -1
  93. package/react/components/Footer/sgds-footer.js.map +1 -1
  94. package/react/components/Mainnav/mainnav-dropdown.cjs.js +1 -1
  95. package/react/components/Mainnav/mainnav-dropdown.js +1 -1
  96. package/react/components/Mainnav/mainnav-item.cjs.js +1 -1
  97. package/react/components/Mainnav/mainnav-item.js +1 -1
  98. package/react/components/Mainnav/mainnav.cjs.js +1 -1
  99. package/react/components/Mainnav/mainnav.js +1 -1
  100. package/react/components/Mainnav/sgds-mainnav.cjs.js +237 -39
  101. package/react/components/Mainnav/sgds-mainnav.cjs.js.map +1 -1
  102. package/react/components/Mainnav/sgds-mainnav.js +238 -40
  103. package/react/components/Mainnav/sgds-mainnav.js.map +1 -1
  104. package/react/components/Tab/tab-panel.cjs.js +1 -1
  105. package/react/components/Tab/tab-panel.js +1 -1
  106. package/react/index.cjs.js +146 -152
  107. package/react/index.cjs.js.map +1 -1
  108. package/react/index.d.ts +5 -8
  109. package/react/index.js +5 -8
  110. package/react/index.js.map +1 -1
  111. package/react/styles/form-text-control.cjs.js +1 -1
  112. package/react/styles/form-text-control.js +1 -1
  113. package/styles/form-text-control.js +1 -1
  114. package/themes/blue.css +11 -11
  115. package/themes/cyan.css +10 -10
  116. package/themes/day.css +1 -1
  117. package/themes/gt/blue.css +11 -11
  118. package/themes/gt/cyan.css +10 -10
  119. package/themes/gt/magenta.css +11 -11
  120. package/themes/gt/pink.css +11 -11
  121. package/themes/gt/purple.css +11 -11
  122. package/themes/gt/red.css +11 -11
  123. package/themes/magenta.css +11 -11
  124. package/themes/pink.css +11 -11
  125. package/themes/purple.css +11 -11
  126. package/themes/red.css +11 -11
  127. package/themes/root.css +0 -5
  128. package/types/react.d.ts +97 -148
  129. package/base/nav-element.d.ts +0 -64
  130. package/base/nav-element.js +0 -263
  131. package/base/nav-element.js.map +0 -1
  132. package/base/nav-profile-element.d.ts +0 -47
  133. package/base/nav-profile-element.js +0 -191
  134. package/base/nav-profile-element.js.map +0 -1
  135. package/base/nav-profile.js +0 -6
  136. package/base/nav-profile.js.map +0 -1
  137. package/components/Appnav/appnav-context.d.ts +0 -6
  138. package/components/Appnav/appnav-context.js +0 -7
  139. package/components/Appnav/appnav-context.js.map +0 -1
  140. package/components/Appnav/appnav.js +0 -6
  141. package/components/Appnav/appnav.js.map +0 -1
  142. package/components/Appnav/index.d.ts +0 -9
  143. package/components/Appnav/index.js +0 -8
  144. package/components/Appnav/index.js.map +0 -1
  145. package/components/Appnav/index.umd.min.js +0 -2535
  146. package/components/Appnav/index.umd.min.js.map +0 -1
  147. package/components/Appnav/sgds-appnav-profile.d.ts +0 -17
  148. package/components/Appnav/sgds-appnav-profile.js +0 -31
  149. package/components/Appnav/sgds-appnav-profile.js.map +0 -1
  150. package/components/Appnav/sgds-appnav.d.ts +0 -44
  151. package/components/Appnav/sgds-appnav.js +0 -183
  152. package/components/Appnav/sgds-appnav.js.map +0 -1
  153. package/components/Mainnav/sgds-mainnav-profile.d.ts +0 -15
  154. package/components/Mainnav/sgds-mainnav-profile.js +0 -29
  155. package/components/Mainnav/sgds-mainnav-profile.js.map +0 -1
  156. package/react/appnav/index.cjs.js +0 -45
  157. package/react/appnav/index.cjs.js.map +0 -1
  158. package/react/appnav/index.d.ts +0 -4
  159. package/react/appnav/index.js +0 -21
  160. package/react/appnav/index.js.map +0 -1
  161. package/react/appnav-profile/index.cjs.js +0 -40
  162. package/react/appnav-profile/index.cjs.js.map +0 -1
  163. package/react/appnav-profile/index.d.ts +0 -4
  164. package/react/appnav-profile/index.js +0 -16
  165. package/react/appnav-profile/index.js.map +0 -1
  166. package/react/base/nav-element.cjs.js +0 -268
  167. package/react/base/nav-element.cjs.js.map +0 -1
  168. package/react/base/nav-element.js +0 -264
  169. package/react/base/nav-element.js.map +0 -1
  170. package/react/base/nav-profile-element.cjs.js +0 -196
  171. package/react/base/nav-profile-element.cjs.js.map +0 -1
  172. package/react/base/nav-profile-element.js +0 -192
  173. package/react/base/nav-profile-element.js.map +0 -1
  174. package/react/base/nav-profile.cjs.js +0 -11
  175. package/react/base/nav-profile.cjs.js.map +0 -1
  176. package/react/base/nav-profile.js +0 -7
  177. package/react/base/nav-profile.js.map +0 -1
  178. package/react/components/Appnav/appnav-context.cjs.js +0 -13
  179. package/react/components/Appnav/appnav-context.cjs.js.map +0 -1
  180. package/react/components/Appnav/appnav-context.js +0 -8
  181. package/react/components/Appnav/appnav-context.js.map +0 -1
  182. package/react/components/Appnav/appnav.cjs.js +0 -11
  183. package/react/components/Appnav/appnav.cjs.js.map +0 -1
  184. package/react/components/Appnav/appnav.js +0 -7
  185. package/react/components/Appnav/appnav.js.map +0 -1
  186. package/react/components/Appnav/sgds-appnav-profile.cjs.js +0 -37
  187. package/react/components/Appnav/sgds-appnav-profile.cjs.js.map +0 -1
  188. package/react/components/Appnav/sgds-appnav-profile.js +0 -32
  189. package/react/components/Appnav/sgds-appnav-profile.js.map +0 -1
  190. package/react/components/Appnav/sgds-appnav.cjs.js +0 -189
  191. package/react/components/Appnav/sgds-appnav.cjs.js.map +0 -1
  192. package/react/components/Appnav/sgds-appnav.js +0 -184
  193. package/react/components/Appnav/sgds-appnav.js.map +0 -1
  194. package/react/components/Mainnav/sgds-mainnav-profile.cjs.js +0 -35
  195. package/react/components/Mainnav/sgds-mainnav-profile.cjs.js.map +0 -1
  196. package/react/components/Mainnav/sgds-mainnav-profile.js +0 -30
  197. package/react/components/Mainnav/sgds-mainnav-profile.js.map +0 -1
  198. package/react/mainnav-profile/index.cjs.js +0 -40
  199. package/react/mainnav-profile/index.cjs.js.map +0 -1
  200. package/react/mainnav-profile/index.d.ts +0 -4
  201. package/react/mainnav-profile/index.js +0 -16
  202. package/react/mainnav-profile/index.js.map +0 -1
@@ -77,7 +77,7 @@ function Pe(e){return(t,l)=>ze(t,l,{async get(){return await this.updateComplete
77
77
  * @license
78
78
  * Copyright 2020 Google LLC
79
79
  * SPDX-License-Identifier: BSD-3-Clause
80
- */const Fe=()=>new Ne;class Ne{}const qe=new WeakMap,We=F(class extends De{render(e){return C}update(e,[t]){const l=t!==this.G;return l&&void 0!==this.G&&this.rt(void 0),(l||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),C}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let l=qe.get(t);void 0===l&&(l=new WeakMap,qe.set(t,l)),void 0!==l.get(this.G)&&this.G.call(this.ht,void 0),l.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?qe.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),Ge=["top","right","bottom","left"],Ke=Math.min,Ye=Math.max,Xe=Math.round,Je=Math.floor,Qe=e=>({x:e,y:e}),et={left:"right",right:"left",bottom:"top",top:"bottom"},tt={start:"end",end:"start"};function lt(e,t,l){return Ye(e,Ke(t,l))}function it(e,t){return"function"==typeof e?e(t):e}function ot(e){return e.split("-")[0]}function rt(e){return e.split("-")[1]}function nt(e){return"x"===e?"y":"x"}function at(e){return"y"===e?"height":"width"}const st=new Set(["top","bottom"]);function ct(e){return st.has(ot(e))?"y":"x"}function dt(e){return nt(ct(e))}function ht(e,t,l){void 0===l&&(l=!1);const i=rt(e),o=dt(e),r=at(o);let n="x"===o?i===(l?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(n=wt(n)),[n,wt(n)]}function ut(e){return e.replace(/start|end/g,e=>tt[e])}const vt=["left","right"],ft=["right","left"],pt=["top","bottom"],gt=["bottom","top"];function mt(e,t,l,i){const o=rt(e);let r=function(e,t,l){switch(e){case"top":case"bottom":return l?t?ft:vt:t?vt:ft;case"left":case"right":return t?pt:gt;default:return[]}}(ot(e),"start"===l,i);return o&&(r=r.map(e=>e+"-"+o),t&&(r=r.concat(r.map(ut)))),r}function wt(e){return e.replace(/left|right|bottom|top/g,e=>et[e])}function _t(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 bt(e){const{x:t,y:l,width:i,height:o}=e;return{width:i,height:o,top:l,left:t,right:t+i,bottom:l+o,x:t,y:l}}function xt(e,t,l){let{reference:i,floating:o}=e;const r=ct(t),n=dt(t),a=at(n),s=ot(t),c="y"===r,d=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,u=i[a]/2-o[a]/2;let v;switch(s){case"top":v={x:d,y:i.y-o.height};break;case"bottom":v={x:d,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:h};break;case"left":v={x:i.x-o.width,y:h};break;default:v={x:i.x,y:i.y}}switch(rt(t)){case"start":v[n]-=u*(l&&c?-1:1);break;case"end":v[n]+=u*(l&&c?-1:1)}return v}async function yt(e,t){var l;void 0===t&&(t={});const{x:i,y:o,platform:r,rects:n,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:v=0}=it(t,e),f=_t(v),p=a[u?"floating"===h?"reference":"floating":h],g=bt(await r.getClippingRect({element:null==(l=await(null==r.isElement?void 0:r.isElement(p)))||l?p:p.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:s})),m="floating"===h?{x:i,y:o,width:n.floating.width,height:n.floating.height}:n.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),_=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},b=bt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:w,strategy:s}):m);return{top:(g.top-b.top+f.top)/_.y,bottom:(b.bottom-g.bottom+f.bottom)/_.y,left:(g.left-b.left+f.left)/_.x,right:(b.right-g.right+f.right)/_.x}}function Zt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ct(e){return Ge.some(t=>e[t]>=0)}const Mt=new Set(["left","top"]);function Vt(){return"undefined"!=typeof window}function At(e){return $t(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function kt(e){var t;return null==(t=($t(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function $t(e){return!!Vt()&&(e instanceof Node||e instanceof Ht(e).Node)}function Ot(e){return!!Vt()&&(e instanceof Element||e instanceof Ht(e).Element)}function zt(e){return!!Vt()&&(e instanceof HTMLElement||e instanceof Ht(e).HTMLElement)}function Pt(e){return!(!Vt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot)}const Bt=new Set(["inline","contents"]);function St(e){const{overflow:t,overflowX:l,overflowY:i,display:o}=Wt(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+l)&&!Bt.has(o)}const jt=new Set(["table","td","th"]);function Lt(e){return jt.has(At(e))}const Et=[":popover-open",":modal"];function It(e){return Et.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Rt=["transform","translate","scale","rotate","perspective"],Tt=["transform","translate","scale","rotate","perspective","filter"],Ut=["paint","layout","strict","content"];function Dt(e){const t=Ft(),l=Ot(e)?Wt(e):e;return Rt.some(e=>!!l[e]&&"none"!==l[e])||!!l.containerType&&"normal"!==l.containerType||!t&&!!l.backdropFilter&&"none"!==l.backdropFilter||!t&&!!l.filter&&"none"!==l.filter||Tt.some(e=>(l.willChange||"").includes(e))||Ut.some(e=>(l.contain||"").includes(e))}function Ft(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Nt=new Set(["html","body","#document"]);function qt(e){return Nt.has(At(e))}function Wt(e){return Ht(e).getComputedStyle(e)}function Gt(e){return Ot(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kt(e){if("html"===At(e))return e;const t=e.assignedSlot||e.parentNode||Pt(e)&&e.host||kt(e);return Pt(t)?t.host:t}function Yt(e){const t=Kt(e);return qt(t)?e.ownerDocument?e.ownerDocument.body:e.body:zt(t)&&St(t)?t:Yt(t)}function Xt(e,t,l){var i;void 0===t&&(t=[]),void 0===l&&(l=!0);const o=Yt(e),r=o===(null==(i=e.ownerDocument)?void 0:i.body),n=Ht(o);if(r){const e=Jt(n);return t.concat(n,n.visualViewport||[],St(o)?o:[],e&&l?Xt(e):[])}return t.concat(o,Xt(o,[],l))}function Jt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qt(e){const t=Wt(e);let l=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=zt(e),r=o?e.offsetWidth:l,n=o?e.offsetHeight:i,a=Xe(l)!==r||Xe(i)!==n;return a&&(l=r,i=n),{width:l,height:i,$:a}}function el(e){return Ot(e)?e:e.contextElement}function tl(e){const t=el(e);if(!zt(t))return Qe(1);const l=t.getBoundingClientRect(),{width:i,height:o,$:r}=Qt(t);let n=(r?Xe(l.width):l.width)/i,a=(r?Xe(l.height):l.height)/o;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const ll=Qe(0);function il(e){const t=Ht(e);return Ft()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ll}function ol(e,t,l,i){void 0===t&&(t=!1),void 0===l&&(l=!1);const o=e.getBoundingClientRect(),r=el(e);let n=Qe(1);t&&(i?Ot(i)&&(n=tl(i)):n=tl(e));const a=function(e,t,l){return void 0===t&&(t=!1),!(!l||t&&l!==Ht(e))&&t}(r,l,i)?il(r):Qe(0);let s=(o.left+a.x)/n.x,c=(o.top+a.y)/n.y,d=o.width/n.x,h=o.height/n.y;if(r){const e=Ht(r),t=i&&Ot(i)?Ht(i):i;let l=e,o=Jt(l);for(;o&&i&&t!==l;){const e=tl(o),t=o.getBoundingClientRect(),i=Wt(o),r=t.left+(o.clientLeft+parseFloat(i.paddingLeft))*e.x,n=t.top+(o.clientTop+parseFloat(i.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,h*=e.y,s+=r,c+=n,l=Ht(o),o=Jt(l)}}return bt({width:d,height:h,x:s,y:c})}function rl(e,t){const l=Gt(e).scrollLeft;return t?t.left+l:ol(kt(e)).left+l}function nl(e,t){const l=e.getBoundingClientRect();return{x:l.left+t.scrollLeft-rl(e,l),y:l.top+t.scrollTop}}const al=new Set(["absolute","fixed"]);function sl(e,t,l){let i;if("viewport"===t)i=function(e,t){const l=Ht(e),i=kt(e),o=l.visualViewport;let r=i.clientWidth,n=i.clientHeight,a=0,s=0;if(o){r=o.width,n=o.height;const e=Ft();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}const c=rl(i);if(c<=0){const e=i.ownerDocument,t=e.body,l=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(l.marginLeft)+parseFloat(l.marginRight)||0,n=Math.abs(i.clientWidth-t.clientWidth-o);n<=25&&(r-=n)}else c<=25&&(r+=c);return{width:r,height:n,x:a,y:s}}(e,l);else if("document"===t)i=function(e){const t=kt(e),l=Gt(e),i=e.ownerDocument.body,o=Ye(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=Ye(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let n=-l.scrollLeft+rl(e);const a=-l.scrollTop;return"rtl"===Wt(i).direction&&(n+=Ye(t.clientWidth,i.clientWidth)-o),{width:o,height:r,x:n,y:a}}(kt(e));else if(Ot(t))i=function(e,t){const l=ol(e,!0,"fixed"===t),i=l.top+e.clientTop,o=l.left+e.clientLeft,r=zt(e)?tl(e):Qe(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:o*r.x,y:i*r.y}}(t,l);else{const l=il(e);i={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return bt(i)}function cl(e,t){const l=Kt(e);return!(l===t||!Ot(l)||qt(l))&&("fixed"===Wt(l).position||cl(l,t))}function dl(e,t,l){const i=zt(t),o=kt(t),r="fixed"===l,n=ol(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const s=Qe(0);function c(){s.x=rl(o)}if(i||!i&&!r)if(("body"!==At(t)||St(o))&&(a=Gt(t)),i){const e=ol(t,!0,r,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();r&&!i&&o&&c();const d=!o||i||r?Qe(0):nl(o,a);return{x:n.left+a.scrollLeft-s.x-d.x,y:n.top+a.scrollTop-s.y-d.y,width:n.width,height:n.height}}function hl(e){return"static"===Wt(e).position}function ul(e,t){if(!zt(e)||"fixed"===Wt(e).position)return null;if(t)return t(e);let l=e.offsetParent;return kt(e)===l&&(l=l.ownerDocument.body),l}function vl(e,t){const l=Ht(e);if(It(e))return l;if(!zt(e)){let t=Kt(e);for(;t&&!qt(t);){if(Ot(t)&&!hl(t))return t;t=Kt(t)}return l}let i=ul(e,t);for(;i&&Lt(i)&&hl(i);)i=ul(i,t);return i&&qt(i)&&hl(i)&&!Dt(i)?l:i||function(e){let t=Kt(e);for(;zt(t)&&!qt(t);){if(Dt(t))return t;if(It(t))return null;t=Kt(t)}return null}(e)||l}const fl={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:l,offsetParent:i,strategy:o}=e;const r="fixed"===o,n=kt(i),a=!!t&&It(t.floating);if(i===n||a&&r)return l;let s={scrollLeft:0,scrollTop:0},c=Qe(1);const d=Qe(0),h=zt(i);if((h||!h&&!r)&&(("body"!==At(i)||St(n))&&(s=Gt(i)),zt(i))){const e=ol(i);c=tl(i),d.x=e.x+i.clientLeft,d.y=e.y+i.clientTop}const u=!n||h||r?Qe(0):nl(n,s);return{width:l.width*c.x,height:l.height*c.y,x:l.x*c.x-s.scrollLeft*c.x+d.x+u.x,y:l.y*c.y-s.scrollTop*c.y+d.y+u.y}},getDocumentElement:kt,getClippingRect:function(e){let{element:t,boundary:l,rootBoundary:i,strategy:o}=e;const r=[..."clippingAncestors"===l?It(t)?[]:function(e,t){const l=t.get(e);if(l)return l;let i=Xt(e,[],!1).filter(e=>Ot(e)&&"body"!==At(e)),o=null;const r="fixed"===Wt(e).position;let n=r?Kt(e):e;for(;Ot(n)&&!qt(n);){const t=Wt(n),l=Dt(n);l||"fixed"!==t.position||(o=null),(r?!l&&!o:!l&&"static"===t.position&&o&&al.has(o.position)||St(n)&&!l&&cl(e,n))?i=i.filter(e=>e!==n):o=t,n=Kt(n)}return t.set(e,i),i}(t,this._c):[].concat(l),i],n=r[0],a=r.reduce((e,l)=>{const i=sl(t,l,o);return e.top=Ye(i.top,e.top),e.right=Ke(i.right,e.right),e.bottom=Ke(i.bottom,e.bottom),e.left=Ye(i.left,e.left),e},sl(t,n,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:vl,getElementRects:async function(e){const t=this.getOffsetParent||vl,l=this.getDimensions,i=await l(e.floating);return{reference:dl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:l}=Qt(e);return{width:t,height:l}},getScale:tl,isElement:Ot,isRTL:function(e){return"rtl"===Wt(e).direction}};function pl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gl(e,t,l,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=i,c=el(e),d=o||r?[...c?Xt(c):[],...Xt(t)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",l,{passive:!0}),r&&e.addEventListener("resize",l)});const h=c&&a?function(e,t){let l,i=null;const o=kt(e);function r(){var e;clearTimeout(l),null==(e=i)||e.disconnect(),i=null}return function n(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),r();const c=e.getBoundingClientRect(),{left:d,top:h,width:u,height:v}=c;if(a||t(),!u||!v)return;const f={rootMargin:-Je(h)+"px "+-Je(o.clientWidth-(d+u))+"px "+-Je(o.clientHeight-(h+v))+"px "+-Je(d)+"px",threshold:Ye(0,Ke(1,s))||1};let p=!0;function g(t){const i=t[0].intersectionRatio;if(i!==s){if(!p)return n();i?n(!1,i):l=setTimeout(()=>{n(!1,1e-7)},1e3)}1!==i||pl(c,e.getBoundingClientRect())||n(),p=!1}try{i=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){i=new IntersectionObserver(g,f)}i.observe(e)}(!0),r}(c,l):null;let u,v=-1,f=null;n&&(f=new ResizeObserver(e=>{let[i]=e;i&&i.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),l()}),c&&!s&&f.observe(c),f.observe(t));let p=s?ol(e):null;return s&&function t(){const i=ol(e);p&&!pl(p,i)&&l();p=i,u=requestAnimationFrame(t)}(),l(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",l),r&&e.removeEventListener("resize",l)}),null==h||h(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(u)}}const ml=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var l,i;const{x:o,y:r,placement:n,middlewareData:a}=t,s=await async function(e,t){const{placement:l,platform:i,elements:o}=e,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),n=ot(l),a=rt(l),s="y"===ct(l),c=Mt.has(n)?-1:1,d=r&&s?-1:1,h=it(t,e);let{mainAxis:u,crossAxis:v,alignmentAxis:f}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof f&&(v="end"===a?-1*f:f),s?{x:v*d,y:u*c}:{x:u*c,y:v*d}}(t,e);return n===(null==(l=a.offset)?void 0:l.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:o+s.x,y:r+s.y,data:{...s,placement:n}}}}},wl=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:l,y:i,placement:o}=t,{mainAxis:r=!0,crossAxis:n=!1,limiter:a={fn:e=>{let{x:t,y:l}=e;return{x:t,y:l}}},...s}=it(e,t),c={x:l,y:i},d=await yt(t,s),h=ct(ot(o)),u=nt(h);let v=c[u],f=c[h];if(r){const e="y"===u?"bottom":"right";v=lt(v+d["y"===u?"top":"left"],v,v-d[e])}if(n){const e="y"===h?"bottom":"right";f=lt(f+d["y"===h?"top":"left"],f,f-d[e])}const p=a.fn({...t,[u]:v,[h]:f});return{...p,data:{x:p.x-l,y:p.y-i,enabled:{[u]:r,[h]:n}}}}}},_l=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var l,i;const{placement:o,middlewareData:r,rects:n,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:p=!0,...g}=it(e,t);if(null!=(l=r.arrow)&&l.alignmentOffset)return{};const m=ot(o),w=ct(a),_=ot(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=u||(_||!p?[wt(a)]:function(e){const t=wt(e);return[ut(e),t,ut(t)]}(a)),y="none"!==f;!u&&y&&x.push(...mt(a,p,f,b));const Z=[a,...x],C=await yt(t,g),M=[];let V=(null==(i=r.flip)?void 0:i.overflows)||[];if(d&&M.push(C[m]),h){const e=ht(o,n,b);M.push(C[e[0]],C[e[1]])}if(V=[...V,{placement:o,overflows:M}],!M.every(e=>e<=0)){var A,H;const e=((null==(A=r.flip)?void 0:A.index)||0)+1,t=Z[e];if(t){if(!("alignment"===h&&w!==ct(t))||V.every(e=>ct(e.placement)!==w||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let l=null==(H=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:H.placement;if(!l)switch(v){case"bestFit":{var k;const e=null==(k=V.filter(e=>{if(y){const t=ct(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:k[0];e&&(l=e);break}case"initialPlacement":l=a}if(o!==l)return{reset:{placement:l}}}return{}}}},bl=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var l,i;const{placement:o,rects:r,platform:n,elements:a}=t,{apply:s=()=>{},...c}=it(e,t),d=await yt(t,c),h=ot(o),u=rt(o),v="y"===ct(o),{width:f,height:p}=r.floating;let g,m;"top"===h||"bottom"===h?(g=h,m=u===(await(null==n.isRTL?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(m=h,g="end"===u?"top":"bottom");const w=p-d.top-d.bottom,_=f-d.left-d.right,b=Ke(p-d[g],w),x=Ke(f-d[m],_),y=!t.middlewareData.shift;let Z=b,C=x;if(null!=(l=t.middlewareData.shift)&&l.enabled.x&&(C=_),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(Z=w),y&&!u){const e=Ye(d.left,0),t=Ye(d.right,0),l=Ye(d.top,0),i=Ye(d.bottom,0);v?C=f-2*(0!==e||0!==t?e+t:Ye(d.left,d.right)):Z=p-2*(0!==l||0!==i?l+i:Ye(d.top,d.bottom))}await s({...t,availableWidth:C,availableHeight:Z});const M=await n.getDimensions(a.floating);return f!==M.width||p!==M.height?{reset:{rects:!0}}:{}}}},xl=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:l}=t,{strategy:i="referenceHidden",...o}=it(e,t);switch(i){case"referenceHidden":{const e=Zt(await yt(t,{...o,elementContext:"reference"}),l.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ct(e)}}}case"escaped":{const e=Zt(await yt(t,{...o,altBoundary:!0}),l.floating);return{data:{escapedOffsets:e,escaped:Ct(e)}}}default:return{}}}}},yl=(e,t,l)=>{const i=new Map,o={platform:fl,...l},r={...o.platform,_c:i};return(async(e,t,l)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:n}=l,a=r.filter(Boolean),s=await(null==n.isRTL?void 0:n.isRTL(t));let c=await n.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=xt(c,i,s),u=i,v={},f=0;for(let l=0;l<a.length;l++){const{name:r,fn:p}=a[l],{x:g,y:m,data:w,reset:_}=await p({x:d,y:h,initialPlacement:i,placement:u,strategy:o,middlewareData:v,rects:c,platform:n,elements:{reference:e,floating:t}});d=null!=g?g:d,h=null!=m?m:h,v={...v,[r]:{...v[r],...w}},_&&f<=50&&(f++,"object"==typeof _&&(_.placement&&(u=_.placement),_.rects&&(c=!0===_.rects?await n.getElementRects({reference:e,floating:t,strategy:o}):_.rects),({x:d,y:h}=xt(c,u,s))),l=-1)}return{x:d,y:h,placement:u,strategy:o,middlewareData:v}})(e,t,{...o,platform:r})};var Zl=ae`: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%}`,Cl=ae`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,Ml=ae`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs)}.form-text.disabled{opacity:var(--sgds-opacity-40)}`,Vl=ae`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.m-width-160{min-width:var(--sgds-dimension-160)}.m-width-256{min-width:var(--sgds-dimension-256)}.form-label{color:var(--sgds-form-color-default);font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-xl);height:var(--sgds-dimension-48);justify-content:center;overflow:hidden;padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-label-md);line-height:var(--sgds-line-height-xs);min-width:0;outline:none;padding:0;width:100%}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-40)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;const Al=(e="value")=>(t,l)=>{const i=t.constructor,o=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(t,r,n){var a;const s=i.getPropertyOptions(e);if(t===("string"==typeof s.attribute?s.attribute:e).toLowerCase()){const t=s.converter||xe,i=("function"==typeof t?t:null!==(a=null==t?void 0:t.fromAttribute)&&void 0!==a?a:xe.fromAttribute)(n,s.type);this[e]!==i&&(this[l]=i)}o.call(this,t,r,n)}};function Hl(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class kl{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,l){return this._internals.setValidity(e,t,l)}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 l in t)t[l]&&(this.validationError=l.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const $l=t=>{class l extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new kl(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this._isTouched&&(this._isTouched=!1),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinValidate(e){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinSetFormValue(){const e=this.value;this._internals.setFormValue(e)}_mixinCheckValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.checkValidity()}_mixinReportValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.reportValidity()}_mixinGetValidity(){return this._internals.validity}_mixinGetValidationMessage(){return this._internals.validationMessage}_mixinSetValidity(e,t,l){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,l)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return l.formAssociated=!0,e([Pe("sgds-input")],l.prototype,"sgdsInput",void 0),e([Pe("sgds-datepicker-input")],l.prototype,"sgdsDatepickerInput",void 0),l};var Ol=ae`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;color:var(--sgds-body-color-default,#1a1a1a);display:block;font-family:var(--sgds-font-family-brand,"Inter",system-ui,sans-serif);font-size:var(--sgds-font-size-body-md,1rem);font-weight:var(--sgds-font-weight-regular,400);line-height:var(--sgds-line-height-xs,24px);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}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.1ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}::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 zl extends Ve{emit(e,t){const l=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(l),l}static define(e,t=this,l={}){if(customElements.get(e));else try{customElements.define(e,t,l)}catch(i){customElements.define(e,class extends t{},l)}}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}))}))}}function Pl(e,t,l){return new Promise(i=>{if((null==l?void 0:l.duration)===1/0)throw new Error("Promise-based animations must be finite.");const o=e.animate(t,Object.assign(Object.assign({},l),{duration:Bl()?0:null==l?void 0:l.duration}));o.addEventListener("cancel",i,{once:!0}),o.addEventListener("finish",i,{once:!0})})}function Bl(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}zl.styles=[Ol],zl.dependencies={},e([$e({type:Boolean,reflect:!0})],zl.prototype,"ssr",void 0);const Sl=new Map,jl=new WeakMap;function Ll(e,t){const l=jl.get(e);if(null==l?void 0:l[t])return l[t];const i=Sl.get(t);return i||{keyframes:[],options:{duration:0}}}function El(e,t){Sl.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}class Il extends zl{constructor(){super(...arguments),this.myDropdown=Fe(),this.dropdownMenuId=Hl("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=Fe(),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(){if(!this.disabled&&!this.menuIsOpen){if(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this._startAutoUpdate(),this.menuRef.value){const e=(this.menuRef.value.getAttribute("data-placement")||"").startsWith("top")?"4px":"-4px",{options:t}=Ll(this,"dropdown.show");await Pl(this.menuRef.value,[{opacity:0,transform:`translateY(${e})`},{opacity:1,transform:"translateY(0)"}],t)}this.emit("sgds-after-show")}}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=gl(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}async hideMenu(e){if(this.menuIsOpen){if(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuRef.value){const e=(this.menuRef.value.getAttribute("data-placement")||"").startsWith("top")?"4px":"-4px",{options:t}=Ll(this,"dropdown.hide");await Pl(this.menuRef.value,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:`translateY(${e})`}],t)}this.menuIsOpen=!1,this.emit("sgds-after-hide"),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 l=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)},i=t.map(l),o=e.map(e=>{const o=l(e),r=i.indexOf(o);return-1!==r?t[r]:e}).concat(t.filter(t=>!e.some(e=>l(e)===l(t))));return o}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=[ml(8),this.noFlip?void 0:_l(),wl()].filter(Boolean);let l=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(l=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const i=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:l}),{x:o,y:r,strategy:n,placement:a}=await yl(this.myDropdown.value,this.menuRef.value,i);this.menuRef.value.setAttribute("data-placement",a),Object.assign(this.menuRef.value.style,{position:n,left:`${o}px`,top:`${r}px`})}}e([$e({type:Boolean,state:!0})],Il.prototype,"noFlip",void 0),e([$e({type:Boolean,reflect:!0,state:!0})],Il.prototype,"menuAlignRight",void 0),e([$e({type:String,reflect:!0,state:!0})],Il.prototype,"drop",void 0),e([$e({type:Object})],Il.prototype,"floatingOpts",void 0),e([$e({type:Boolean,reflect:!0})],Il.prototype,"menuIsOpen",void 0),e([$e({type:Boolean,reflect:!0})],Il.prototype,"disabled",void 0),e([$e({type:Boolean,reflect:!0})],Il.prototype,"readonly",void 0),El("dropdown.show",{keyframes:[],options:{duration:200,easing:"cubic-bezier(0.1, 0, 0.5, 0)"}}),El("dropdown.hide",{keyframes:[],options:{duration:200,easing:"cubic-bezier(0.15, 0.6, 0.6, 1)"}});class Rl extends Il{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(),l=t.find(t=>e.composedPath().includes(t));if(!l)return;const i=t.indexOf(l);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1,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 l=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");l&&l.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"Escape":this.menuIsOpen&&(e.preventDefault(),this.hideMenu());break;case"Enter":t.find(t=>e.composedPath().includes(t))&&this.handleSelectSlot(e);break}}_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=>"menuitem"===e.getAttribute("role")&&!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&&!e.readonly)}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const l=(e%t.length+t.length)%t.length,i=t[l];this.emit("i-sgds-option-focus",{detail:{option:i}}),this.nextDropdownItemNo=(l+1)%t.length,this.prevDropdownItemNo=(l-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===i?"0":"-1"),e===i&&t.focus()})}}Rl.styles=Il.styles,e([function(e,t){return(l,i,o)=>{const r=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof i?l:o??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return ze(l,i,{get(){let l=e.call(this);return void 0===l&&(l=r(this),(null!==l||this.hasUpdated)&&t.call(this,l)),l}})}return ze(l,i,{get(){return r(this)}})}}("ul.dropdown-menu")],Rl.prototype,"menu",void 0),e([Oe()],Rl.prototype,"nextDropdownItemNo",void 0),e([Oe()],Rl.prototype,"prevDropdownItemNo",void 0),e([$e({type:Boolean,reflect:!0})],Rl.prototype,"hidden",void 0);var Tl=ae`.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 Ul extends($l(Rl)){setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.loading=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.autocomplete="on",this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Hl("input"),this._labelId=Hl("label"),this.floatingOpts={middleware:[bl({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",async e=>{var t;if(this._mixinShouldSkipSgdsValidation())return;const l=this.constructor.childName,i=(null===(t=e.relatedTarget)||void 0===t?void 0:t.tagName.toLowerCase())===l;this.invalid=!i&&!this._mixinReportValidity()})}reportValidity(){return this._mixinReportValidity()}setValidity(e,t,l){return this._mixinSetValidity(e,t,l)}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?y` <div class="invalid-feedback-container">
80
+ */const Fe=()=>new Ne;class Ne{}const qe=new WeakMap,We=F(class extends De{render(e){return C}update(e,[t]){const l=t!==this.G;return l&&void 0!==this.G&&this.rt(void 0),(l||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),C}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let l=qe.get(t);void 0===l&&(l=new WeakMap,qe.set(t,l)),void 0!==l.get(this.G)&&this.G.call(this.ht,void 0),l.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?qe.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),Ge=["top","right","bottom","left"],Ke=Math.min,Ye=Math.max,Xe=Math.round,Je=Math.floor,Qe=e=>({x:e,y:e}),et={left:"right",right:"left",bottom:"top",top:"bottom"},tt={start:"end",end:"start"};function lt(e,t,l){return Ye(e,Ke(t,l))}function it(e,t){return"function"==typeof e?e(t):e}function ot(e){return e.split("-")[0]}function rt(e){return e.split("-")[1]}function nt(e){return"x"===e?"y":"x"}function at(e){return"y"===e?"height":"width"}const st=new Set(["top","bottom"]);function ct(e){return st.has(ot(e))?"y":"x"}function dt(e){return nt(ct(e))}function ht(e,t,l){void 0===l&&(l=!1);const i=rt(e),o=dt(e),r=at(o);let n="x"===o?i===(l?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(n=wt(n)),[n,wt(n)]}function ut(e){return e.replace(/start|end/g,e=>tt[e])}const vt=["left","right"],ft=["right","left"],pt=["top","bottom"],gt=["bottom","top"];function mt(e,t,l,i){const o=rt(e);let r=function(e,t,l){switch(e){case"top":case"bottom":return l?t?ft:vt:t?vt:ft;case"left":case"right":return t?pt:gt;default:return[]}}(ot(e),"start"===l,i);return o&&(r=r.map(e=>e+"-"+o),t&&(r=r.concat(r.map(ut)))),r}function wt(e){return e.replace(/left|right|bottom|top/g,e=>et[e])}function _t(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 bt(e){const{x:t,y:l,width:i,height:o}=e;return{width:i,height:o,top:l,left:t,right:t+i,bottom:l+o,x:t,y:l}}function xt(e,t,l){let{reference:i,floating:o}=e;const r=ct(t),n=dt(t),a=at(n),s=ot(t),c="y"===r,d=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,u=i[a]/2-o[a]/2;let v;switch(s){case"top":v={x:d,y:i.y-o.height};break;case"bottom":v={x:d,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:h};break;case"left":v={x:i.x-o.width,y:h};break;default:v={x:i.x,y:i.y}}switch(rt(t)){case"start":v[n]-=u*(l&&c?-1:1);break;case"end":v[n]+=u*(l&&c?-1:1)}return v}async function yt(e,t){var l;void 0===t&&(t={});const{x:i,y:o,platform:r,rects:n,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:v=0}=it(t,e),f=_t(v),p=a[u?"floating"===h?"reference":"floating":h],g=bt(await r.getClippingRect({element:null==(l=await(null==r.isElement?void 0:r.isElement(p)))||l?p:p.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:s})),m="floating"===h?{x:i,y:o,width:n.floating.width,height:n.floating.height}:n.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),_=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},b=bt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:w,strategy:s}):m);return{top:(g.top-b.top+f.top)/_.y,bottom:(b.bottom-g.bottom+f.bottom)/_.y,left:(g.left-b.left+f.left)/_.x,right:(b.right-g.right+f.right)/_.x}}function Zt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ct(e){return Ge.some(t=>e[t]>=0)}const Mt=new Set(["left","top"]);function Vt(){return"undefined"!=typeof window}function At(e){return $t(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function kt(e){var t;return null==(t=($t(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function $t(e){return!!Vt()&&(e instanceof Node||e instanceof Ht(e).Node)}function Ot(e){return!!Vt()&&(e instanceof Element||e instanceof Ht(e).Element)}function zt(e){return!!Vt()&&(e instanceof HTMLElement||e instanceof Ht(e).HTMLElement)}function Pt(e){return!(!Vt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot)}const Bt=new Set(["inline","contents"]);function St(e){const{overflow:t,overflowX:l,overflowY:i,display:o}=Wt(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+l)&&!Bt.has(o)}const jt=new Set(["table","td","th"]);function Lt(e){return jt.has(At(e))}const Et=[":popover-open",":modal"];function It(e){return Et.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Rt=["transform","translate","scale","rotate","perspective"],Tt=["transform","translate","scale","rotate","perspective","filter"],Ut=["paint","layout","strict","content"];function Dt(e){const t=Ft(),l=Ot(e)?Wt(e):e;return Rt.some(e=>!!l[e]&&"none"!==l[e])||!!l.containerType&&"normal"!==l.containerType||!t&&!!l.backdropFilter&&"none"!==l.backdropFilter||!t&&!!l.filter&&"none"!==l.filter||Tt.some(e=>(l.willChange||"").includes(e))||Ut.some(e=>(l.contain||"").includes(e))}function Ft(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Nt=new Set(["html","body","#document"]);function qt(e){return Nt.has(At(e))}function Wt(e){return Ht(e).getComputedStyle(e)}function Gt(e){return Ot(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kt(e){if("html"===At(e))return e;const t=e.assignedSlot||e.parentNode||Pt(e)&&e.host||kt(e);return Pt(t)?t.host:t}function Yt(e){const t=Kt(e);return qt(t)?e.ownerDocument?e.ownerDocument.body:e.body:zt(t)&&St(t)?t:Yt(t)}function Xt(e,t,l){var i;void 0===t&&(t=[]),void 0===l&&(l=!0);const o=Yt(e),r=o===(null==(i=e.ownerDocument)?void 0:i.body),n=Ht(o);if(r){const e=Jt(n);return t.concat(n,n.visualViewport||[],St(o)?o:[],e&&l?Xt(e):[])}return t.concat(o,Xt(o,[],l))}function Jt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qt(e){const t=Wt(e);let l=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=zt(e),r=o?e.offsetWidth:l,n=o?e.offsetHeight:i,a=Xe(l)!==r||Xe(i)!==n;return a&&(l=r,i=n),{width:l,height:i,$:a}}function el(e){return Ot(e)?e:e.contextElement}function tl(e){const t=el(e);if(!zt(t))return Qe(1);const l=t.getBoundingClientRect(),{width:i,height:o,$:r}=Qt(t);let n=(r?Xe(l.width):l.width)/i,a=(r?Xe(l.height):l.height)/o;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const ll=Qe(0);function il(e){const t=Ht(e);return Ft()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ll}function ol(e,t,l,i){void 0===t&&(t=!1),void 0===l&&(l=!1);const o=e.getBoundingClientRect(),r=el(e);let n=Qe(1);t&&(i?Ot(i)&&(n=tl(i)):n=tl(e));const a=function(e,t,l){return void 0===t&&(t=!1),!(!l||t&&l!==Ht(e))&&t}(r,l,i)?il(r):Qe(0);let s=(o.left+a.x)/n.x,c=(o.top+a.y)/n.y,d=o.width/n.x,h=o.height/n.y;if(r){const e=Ht(r),t=i&&Ot(i)?Ht(i):i;let l=e,o=Jt(l);for(;o&&i&&t!==l;){const e=tl(o),t=o.getBoundingClientRect(),i=Wt(o),r=t.left+(o.clientLeft+parseFloat(i.paddingLeft))*e.x,n=t.top+(o.clientTop+parseFloat(i.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,h*=e.y,s+=r,c+=n,l=Ht(o),o=Jt(l)}}return bt({width:d,height:h,x:s,y:c})}function rl(e,t){const l=Gt(e).scrollLeft;return t?t.left+l:ol(kt(e)).left+l}function nl(e,t){const l=e.getBoundingClientRect();return{x:l.left+t.scrollLeft-rl(e,l),y:l.top+t.scrollTop}}const al=new Set(["absolute","fixed"]);function sl(e,t,l){let i;if("viewport"===t)i=function(e,t){const l=Ht(e),i=kt(e),o=l.visualViewport;let r=i.clientWidth,n=i.clientHeight,a=0,s=0;if(o){r=o.width,n=o.height;const e=Ft();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}const c=rl(i);if(c<=0){const e=i.ownerDocument,t=e.body,l=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(l.marginLeft)+parseFloat(l.marginRight)||0,n=Math.abs(i.clientWidth-t.clientWidth-o);n<=25&&(r-=n)}else c<=25&&(r+=c);return{width:r,height:n,x:a,y:s}}(e,l);else if("document"===t)i=function(e){const t=kt(e),l=Gt(e),i=e.ownerDocument.body,o=Ye(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=Ye(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let n=-l.scrollLeft+rl(e);const a=-l.scrollTop;return"rtl"===Wt(i).direction&&(n+=Ye(t.clientWidth,i.clientWidth)-o),{width:o,height:r,x:n,y:a}}(kt(e));else if(Ot(t))i=function(e,t){const l=ol(e,!0,"fixed"===t),i=l.top+e.clientTop,o=l.left+e.clientLeft,r=zt(e)?tl(e):Qe(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:o*r.x,y:i*r.y}}(t,l);else{const l=il(e);i={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return bt(i)}function cl(e,t){const l=Kt(e);return!(l===t||!Ot(l)||qt(l))&&("fixed"===Wt(l).position||cl(l,t))}function dl(e,t,l){const i=zt(t),o=kt(t),r="fixed"===l,n=ol(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const s=Qe(0);function c(){s.x=rl(o)}if(i||!i&&!r)if(("body"!==At(t)||St(o))&&(a=Gt(t)),i){const e=ol(t,!0,r,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();r&&!i&&o&&c();const d=!o||i||r?Qe(0):nl(o,a);return{x:n.left+a.scrollLeft-s.x-d.x,y:n.top+a.scrollTop-s.y-d.y,width:n.width,height:n.height}}function hl(e){return"static"===Wt(e).position}function ul(e,t){if(!zt(e)||"fixed"===Wt(e).position)return null;if(t)return t(e);let l=e.offsetParent;return kt(e)===l&&(l=l.ownerDocument.body),l}function vl(e,t){const l=Ht(e);if(It(e))return l;if(!zt(e)){let t=Kt(e);for(;t&&!qt(t);){if(Ot(t)&&!hl(t))return t;t=Kt(t)}return l}let i=ul(e,t);for(;i&&Lt(i)&&hl(i);)i=ul(i,t);return i&&qt(i)&&hl(i)&&!Dt(i)?l:i||function(e){let t=Kt(e);for(;zt(t)&&!qt(t);){if(Dt(t))return t;if(It(t))return null;t=Kt(t)}return null}(e)||l}const fl={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:l,offsetParent:i,strategy:o}=e;const r="fixed"===o,n=kt(i),a=!!t&&It(t.floating);if(i===n||a&&r)return l;let s={scrollLeft:0,scrollTop:0},c=Qe(1);const d=Qe(0),h=zt(i);if((h||!h&&!r)&&(("body"!==At(i)||St(n))&&(s=Gt(i)),zt(i))){const e=ol(i);c=tl(i),d.x=e.x+i.clientLeft,d.y=e.y+i.clientTop}const u=!n||h||r?Qe(0):nl(n,s);return{width:l.width*c.x,height:l.height*c.y,x:l.x*c.x-s.scrollLeft*c.x+d.x+u.x,y:l.y*c.y-s.scrollTop*c.y+d.y+u.y}},getDocumentElement:kt,getClippingRect:function(e){let{element:t,boundary:l,rootBoundary:i,strategy:o}=e;const r=[..."clippingAncestors"===l?It(t)?[]:function(e,t){const l=t.get(e);if(l)return l;let i=Xt(e,[],!1).filter(e=>Ot(e)&&"body"!==At(e)),o=null;const r="fixed"===Wt(e).position;let n=r?Kt(e):e;for(;Ot(n)&&!qt(n);){const t=Wt(n),l=Dt(n);l||"fixed"!==t.position||(o=null),(r?!l&&!o:!l&&"static"===t.position&&o&&al.has(o.position)||St(n)&&!l&&cl(e,n))?i=i.filter(e=>e!==n):o=t,n=Kt(n)}return t.set(e,i),i}(t,this._c):[].concat(l),i],n=r[0],a=r.reduce((e,l)=>{const i=sl(t,l,o);return e.top=Ye(i.top,e.top),e.right=Ke(i.right,e.right),e.bottom=Ke(i.bottom,e.bottom),e.left=Ye(i.left,e.left),e},sl(t,n,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:vl,getElementRects:async function(e){const t=this.getOffsetParent||vl,l=this.getDimensions,i=await l(e.floating);return{reference:dl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:l}=Qt(e);return{width:t,height:l}},getScale:tl,isElement:Ot,isRTL:function(e){return"rtl"===Wt(e).direction}};function pl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gl(e,t,l,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=i,c=el(e),d=o||r?[...c?Xt(c):[],...Xt(t)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",l,{passive:!0}),r&&e.addEventListener("resize",l)});const h=c&&a?function(e,t){let l,i=null;const o=kt(e);function r(){var e;clearTimeout(l),null==(e=i)||e.disconnect(),i=null}return function n(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),r();const c=e.getBoundingClientRect(),{left:d,top:h,width:u,height:v}=c;if(a||t(),!u||!v)return;const f={rootMargin:-Je(h)+"px "+-Je(o.clientWidth-(d+u))+"px "+-Je(o.clientHeight-(h+v))+"px "+-Je(d)+"px",threshold:Ye(0,Ke(1,s))||1};let p=!0;function g(t){const i=t[0].intersectionRatio;if(i!==s){if(!p)return n();i?n(!1,i):l=setTimeout(()=>{n(!1,1e-7)},1e3)}1!==i||pl(c,e.getBoundingClientRect())||n(),p=!1}try{i=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){i=new IntersectionObserver(g,f)}i.observe(e)}(!0),r}(c,l):null;let u,v=-1,f=null;n&&(f=new ResizeObserver(e=>{let[i]=e;i&&i.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),l()}),c&&!s&&f.observe(c),f.observe(t));let p=s?ol(e):null;return s&&function t(){const i=ol(e);p&&!pl(p,i)&&l();p=i,u=requestAnimationFrame(t)}(),l(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",l),r&&e.removeEventListener("resize",l)}),null==h||h(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(u)}}const ml=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var l,i;const{x:o,y:r,placement:n,middlewareData:a}=t,s=await async function(e,t){const{placement:l,platform:i,elements:o}=e,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),n=ot(l),a=rt(l),s="y"===ct(l),c=Mt.has(n)?-1:1,d=r&&s?-1:1,h=it(t,e);let{mainAxis:u,crossAxis:v,alignmentAxis:f}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof f&&(v="end"===a?-1*f:f),s?{x:v*d,y:u*c}:{x:u*c,y:v*d}}(t,e);return n===(null==(l=a.offset)?void 0:l.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:o+s.x,y:r+s.y,data:{...s,placement:n}}}}},wl=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:l,y:i,placement:o}=t,{mainAxis:r=!0,crossAxis:n=!1,limiter:a={fn:e=>{let{x:t,y:l}=e;return{x:t,y:l}}},...s}=it(e,t),c={x:l,y:i},d=await yt(t,s),h=ct(ot(o)),u=nt(h);let v=c[u],f=c[h];if(r){const e="y"===u?"bottom":"right";v=lt(v+d["y"===u?"top":"left"],v,v-d[e])}if(n){const e="y"===h?"bottom":"right";f=lt(f+d["y"===h?"top":"left"],f,f-d[e])}const p=a.fn({...t,[u]:v,[h]:f});return{...p,data:{x:p.x-l,y:p.y-i,enabled:{[u]:r,[h]:n}}}}}},_l=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var l,i;const{placement:o,middlewareData:r,rects:n,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:p=!0,...g}=it(e,t);if(null!=(l=r.arrow)&&l.alignmentOffset)return{};const m=ot(o),w=ct(a),_=ot(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=u||(_||!p?[wt(a)]:function(e){const t=wt(e);return[ut(e),t,ut(t)]}(a)),y="none"!==f;!u&&y&&x.push(...mt(a,p,f,b));const Z=[a,...x],C=await yt(t,g),M=[];let V=(null==(i=r.flip)?void 0:i.overflows)||[];if(d&&M.push(C[m]),h){const e=ht(o,n,b);M.push(C[e[0]],C[e[1]])}if(V=[...V,{placement:o,overflows:M}],!M.every(e=>e<=0)){var A,H;const e=((null==(A=r.flip)?void 0:A.index)||0)+1,t=Z[e];if(t){if(!("alignment"===h&&w!==ct(t))||V.every(e=>ct(e.placement)!==w||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let l=null==(H=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:H.placement;if(!l)switch(v){case"bestFit":{var k;const e=null==(k=V.filter(e=>{if(y){const t=ct(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:k[0];e&&(l=e);break}case"initialPlacement":l=a}if(o!==l)return{reset:{placement:l}}}return{}}}},bl=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var l,i;const{placement:o,rects:r,platform:n,elements:a}=t,{apply:s=()=>{},...c}=it(e,t),d=await yt(t,c),h=ot(o),u=rt(o),v="y"===ct(o),{width:f,height:p}=r.floating;let g,m;"top"===h||"bottom"===h?(g=h,m=u===(await(null==n.isRTL?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(m=h,g="end"===u?"top":"bottom");const w=p-d.top-d.bottom,_=f-d.left-d.right,b=Ke(p-d[g],w),x=Ke(f-d[m],_),y=!t.middlewareData.shift;let Z=b,C=x;if(null!=(l=t.middlewareData.shift)&&l.enabled.x&&(C=_),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(Z=w),y&&!u){const e=Ye(d.left,0),t=Ye(d.right,0),l=Ye(d.top,0),i=Ye(d.bottom,0);v?C=f-2*(0!==e||0!==t?e+t:Ye(d.left,d.right)):Z=p-2*(0!==l||0!==i?l+i:Ye(d.top,d.bottom))}await s({...t,availableWidth:C,availableHeight:Z});const M=await n.getDimensions(a.floating);return f!==M.width||p!==M.height?{reset:{rects:!0}}:{}}}},xl=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:l}=t,{strategy:i="referenceHidden",...o}=it(e,t);switch(i){case"referenceHidden":{const e=Zt(await yt(t,{...o,elementContext:"reference"}),l.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ct(e)}}}case"escaped":{const e=Zt(await yt(t,{...o,altBoundary:!0}),l.floating);return{data:{escapedOffsets:e,escaped:Ct(e)}}}default:return{}}}}},yl=(e,t,l)=>{const i=new Map,o={platform:fl,...l},r={...o.platform,_c:i};return(async(e,t,l)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:n}=l,a=r.filter(Boolean),s=await(null==n.isRTL?void 0:n.isRTL(t));let c=await n.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=xt(c,i,s),u=i,v={},f=0;for(let l=0;l<a.length;l++){const{name:r,fn:p}=a[l],{x:g,y:m,data:w,reset:_}=await p({x:d,y:h,initialPlacement:i,placement:u,strategy:o,middlewareData:v,rects:c,platform:n,elements:{reference:e,floating:t}});d=null!=g?g:d,h=null!=m?m:h,v={...v,[r]:{...v[r],...w}},_&&f<=50&&(f++,"object"==typeof _&&(_.placement&&(u=_.placement),_.rects&&(c=!0===_.rects?await n.getElementRects({reference:e,floating:t,strategy:o}):_.rects),({x:d,y:h}=xt(c,u,s))),l=-1)}return{x:d,y:h,placement:u,strategy:o,middlewareData:v}})(e,t,{...o,platform:r})};var Zl=ae`: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%}`,Cl=ae`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,Ml=ae`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs)}.form-text.disabled{opacity:var(--sgds-opacity-40)}`,Vl=ae`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.m-width-160{min-width:var(--sgds-dimension-160)}.m-width-256{min-width:var(--sgds-dimension-256)}.form-label{color:var(--sgds-form-color-default);font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;overflow:hidden;padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-label-md);line-height:var(--sgds-line-height-xs);min-width:0;outline:none;padding:0;width:100%}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-40)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;const Al=(e="value")=>(t,l)=>{const i=t.constructor,o=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(t,r,n){var a;const s=i.getPropertyOptions(e);if(t===("string"==typeof s.attribute?s.attribute:e).toLowerCase()){const t=s.converter||xe,i=("function"==typeof t?t:null!==(a=null==t?void 0:t.fromAttribute)&&void 0!==a?a:xe.fromAttribute)(n,s.type);this[e]!==i&&(this[l]=i)}o.call(this,t,r,n)}};function Hl(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class kl{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,l){return this._internals.setValidity(e,t,l)}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 l in t)t[l]&&(this.validationError=l.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const $l=t=>{class l extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new kl(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this._isTouched&&(this._isTouched=!1),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinValidate(e){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinSetFormValue(){const e=this.value;this._internals.setFormValue(e)}_mixinCheckValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.checkValidity()}_mixinReportValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.reportValidity()}_mixinGetValidity(){return this._internals.validity}_mixinGetValidationMessage(){return this._internals.validationMessage}_mixinSetValidity(e,t,l){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,l)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return l.formAssociated=!0,e([Pe("sgds-input")],l.prototype,"sgdsInput",void 0),e([Pe("sgds-datepicker-input")],l.prototype,"sgdsDatepickerInput",void 0),l};var Ol=ae`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;color:var(--sgds-body-color-default,#1a1a1a);display:block;font-family:var(--sgds-font-family-brand,"Inter",system-ui,sans-serif);font-size:var(--sgds-font-size-body-md,1rem);font-weight:var(--sgds-font-weight-regular,400);line-height:var(--sgds-line-height-xs,24px);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}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.1ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}::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 zl extends Ve{emit(e,t){const l=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(l),l}static define(e,t=this,l={}){if(customElements.get(e));else try{customElements.define(e,t,l)}catch(i){customElements.define(e,class extends t{},l)}}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}))}))}}function Pl(e,t,l){return new Promise(i=>{if((null==l?void 0:l.duration)===1/0)throw new Error("Promise-based animations must be finite.");const o=e.animate(t,Object.assign(Object.assign({},l),{duration:Bl()?0:null==l?void 0:l.duration}));o.addEventListener("cancel",i,{once:!0}),o.addEventListener("finish",i,{once:!0})})}function Bl(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}zl.styles=[Ol],zl.dependencies={},e([$e({type:Boolean,reflect:!0})],zl.prototype,"ssr",void 0);const Sl=new Map,jl=new WeakMap;function Ll(e,t){const l=jl.get(e);if(null==l?void 0:l[t])return l[t];const i=Sl.get(t);return i||{keyframes:[],options:{duration:0}}}function El(e,t){Sl.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}class Il extends zl{constructor(){super(...arguments),this.myDropdown=Fe(),this.dropdownMenuId=Hl("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=Fe(),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(){if(!this.disabled&&!this.menuIsOpen){if(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this._startAutoUpdate(),this.menuRef.value){const e=(this.menuRef.value.getAttribute("data-placement")||"").startsWith("top")?"4px":"-4px",{options:t}=Ll(this,"dropdown.show");await Pl(this.menuRef.value,[{opacity:0,transform:`translateY(${e})`},{opacity:1,transform:"translateY(0)"}],t)}this.emit("sgds-after-show")}}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=gl(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}async hideMenu(e){if(this.menuIsOpen){if(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuRef.value){const e=(this.menuRef.value.getAttribute("data-placement")||"").startsWith("top")?"4px":"-4px",{options:t}=Ll(this,"dropdown.hide");await Pl(this.menuRef.value,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:`translateY(${e})`}],t)}this.menuIsOpen=!1,this.emit("sgds-after-hide"),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 l=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)},i=t.map(l),o=e.map(e=>{const o=l(e),r=i.indexOf(o);return-1!==r?t[r]:e}).concat(t.filter(t=>!e.some(e=>l(e)===l(t))));return o}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=[ml(8),this.noFlip?void 0:_l(),wl()].filter(Boolean);let l=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(l=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const i=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:l}),{x:o,y:r,strategy:n,placement:a}=await yl(this.myDropdown.value,this.menuRef.value,i);this.menuRef.value.setAttribute("data-placement",a),Object.assign(this.menuRef.value.style,{position:n,left:`${o}px`,top:`${r}px`})}}e([$e({type:Boolean,state:!0})],Il.prototype,"noFlip",void 0),e([$e({type:Boolean,reflect:!0,state:!0})],Il.prototype,"menuAlignRight",void 0),e([$e({type:String,reflect:!0,state:!0})],Il.prototype,"drop",void 0),e([$e({type:Object})],Il.prototype,"floatingOpts",void 0),e([$e({type:Boolean,reflect:!0})],Il.prototype,"menuIsOpen",void 0),e([$e({type:Boolean,reflect:!0})],Il.prototype,"disabled",void 0),e([$e({type:Boolean,reflect:!0})],Il.prototype,"readonly",void 0),El("dropdown.show",{keyframes:[],options:{duration:200,easing:"cubic-bezier(0.1, 0, 0.5, 0)"}}),El("dropdown.hide",{keyframes:[],options:{duration:200,easing:"cubic-bezier(0.15, 0.6, 0.6, 1)"}});class Rl extends Il{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(),l=t.find(t=>e.composedPath().includes(t));if(!l)return;const i=t.indexOf(l);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1,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 l=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");l&&l.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.find(t=>e.composedPath().includes(t))&&this.handleSelectSlot(e);break}}_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 l=(e%t.length+t.length)%t.length,i=t[l];this.emit("i-sgds-option-focus",{detail:{option:i}}),this.nextDropdownItemNo=(l+1)%t.length,this.prevDropdownItemNo=(l-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===i?"0":"-1"),e===i&&t.focus()})}}Rl.styles=Il.styles,e([function(e,t){return(l,i,o)=>{const r=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof i?l:o??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return ze(l,i,{get(){let l=e.call(this);return void 0===l&&(l=r(this),(null!==l||this.hasUpdated)&&t.call(this,l)),l}})}return ze(l,i,{get(){return r(this)}})}}("ul.dropdown-menu")],Rl.prototype,"menu",void 0),e([Oe()],Rl.prototype,"nextDropdownItemNo",void 0),e([Oe()],Rl.prototype,"prevDropdownItemNo",void 0),e([$e({type:Boolean,reflect:!0})],Rl.prototype,"hidden",void 0);var Tl=ae`.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 Ul extends($l(Rl)){setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.loading=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.autocomplete="on",this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Hl("input"),this._labelId=Hl("label"),this.floatingOpts={middleware:[bl({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",async e=>{var t;if(this._mixinShouldSkipSgdsValidation())return;const l=this.constructor.childName,i=(null===(t=e.relatedTarget)||void 0===t?void 0:t.tagName.toLowerCase())===l;this.invalid=!i&&!this._mixinReportValidity()})}reportValidity(){return this._mixinReportValidity()}setValidity(e,t,l){return this._mixinSetValidity(e,t,l)}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?y` <div class="invalid-feedback-container">
81
81
  <slot name="invalidIcon">
82
82
  <sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
83
83
  </slot>