@solid-design-system/components 4.9.0 → 4.11.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 (245) hide show
  1. package/cdn/chunks/{chunk.2UXSSPPW.js → chunk.KVDKWL34.js} +1 -1
  2. package/cdn/chunks/chunk.RZINWES7.js +3 -0
  3. package/cdn/components/drawer/drawer.js +1 -1
  4. package/cdn/components/switch/switch.js +1 -1
  5. package/cdn/custom-elements.json +244 -244
  6. package/cdn/solid-components.bundle.js +2 -2
  7. package/cdn/solid-components.iife.js +2 -2
  8. package/cdn/solid-components.js +1 -1
  9. package/cdn/vscode.html-custom-data.json +42 -42
  10. package/cdn/web-types.json +95 -95
  11. package/cdn-versioned/_components/menu/menu.js +1 -1
  12. package/cdn-versioned/_components/menu/menu.styles.js +1 -1
  13. package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
  14. package/cdn-versioned/chunks/chunk.2XZZWTI2.js +1 -1
  15. package/cdn-versioned/chunks/chunk.4D5G5PFQ.js +1 -1
  16. package/cdn-versioned/chunks/chunk.4GU3VMG2.js +1 -1
  17. package/cdn-versioned/chunks/chunk.53YBES5S.js +1 -1
  18. package/cdn-versioned/chunks/chunk.5HYU75RE.js +1 -1
  19. package/cdn-versioned/chunks/chunk.67UPRVLG.js +4 -4
  20. package/cdn-versioned/chunks/chunk.6HLS5XU2.js +1 -1
  21. package/cdn-versioned/chunks/chunk.A3AHQI37.js +1 -1
  22. package/cdn-versioned/chunks/chunk.ADDDVS6W.js +1 -1
  23. package/cdn-versioned/chunks/chunk.AHXJHNQ7.js +1 -1
  24. package/cdn-versioned/chunks/chunk.B62VWQ7C.js +1 -1
  25. package/cdn-versioned/chunks/chunk.BRAJGYMM.js +1 -1
  26. package/cdn-versioned/chunks/chunk.C74Q5TJX.js +3 -3
  27. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  28. package/cdn-versioned/chunks/chunk.CIKOD7QT.js +1 -1
  29. package/cdn-versioned/chunks/chunk.DQ3ZESZK.js +2 -2
  30. package/cdn-versioned/chunks/chunk.E4JOV74T.js +1 -1
  31. package/cdn-versioned/chunks/chunk.E4YB3LZK.js +1 -1
  32. package/cdn-versioned/chunks/chunk.ETB7FHWC.js +1 -1
  33. package/cdn-versioned/chunks/chunk.F3EVJTED.js +1 -1
  34. package/cdn-versioned/chunks/chunk.FZHMZAIV.js +1 -1
  35. package/cdn-versioned/chunks/chunk.GUCU2YK5.js +1 -1
  36. package/cdn-versioned/chunks/chunk.HB2MDLS4.js +1 -1
  37. package/cdn-versioned/chunks/chunk.HBBILILZ.js +1 -1
  38. package/cdn-versioned/chunks/chunk.HT7C2KQ3.js +1 -1
  39. package/cdn-versioned/chunks/chunk.HTEPIDNH.js +2 -2
  40. package/cdn-versioned/chunks/chunk.HVKAMCXX.js +1 -1
  41. package/cdn-versioned/chunks/chunk.JIODFCR2.js +1 -1
  42. package/cdn-versioned/chunks/chunk.JXFEK45U.js +1 -1
  43. package/cdn-versioned/chunks/{chunk.2UXSSPPW.js → chunk.KVDKWL34.js} +1 -1
  44. package/cdn-versioned/chunks/chunk.NPUXUQCC.js +1 -1
  45. package/cdn-versioned/chunks/chunk.PTSISQCW.js +1 -1
  46. package/cdn-versioned/chunks/chunk.QLGX6E5R.js +1 -1
  47. package/cdn-versioned/chunks/chunk.QM2SZYDM.js +1 -1
  48. package/cdn-versioned/chunks/chunk.QVTWOB7V.js +4 -4
  49. package/cdn-versioned/chunks/chunk.QX3REGZG.js +1 -1
  50. package/cdn-versioned/chunks/chunk.RATITDF2.js +1 -1
  51. package/cdn-versioned/chunks/chunk.RKVW7KG4.js +1 -1
  52. package/cdn-versioned/chunks/chunk.RZINWES7.js +3 -0
  53. package/cdn-versioned/chunks/chunk.SJYLPRLG.js +1 -1
  54. package/cdn-versioned/chunks/chunk.SKIEUJZN.js +1 -1
  55. package/cdn-versioned/chunks/chunk.T4JP7QUW.js +1 -1
  56. package/cdn-versioned/chunks/chunk.TMVIWO7D.js +1 -1
  57. package/cdn-versioned/chunks/chunk.TSSJABGO.js +1 -1
  58. package/cdn-versioned/chunks/chunk.UKXOMULO.js +1 -1
  59. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  60. package/cdn-versioned/chunks/chunk.WKQAOKOH.js +1 -1
  61. package/cdn-versioned/chunks/chunk.XXPYJZI4.js +1 -1
  62. package/cdn-versioned/chunks/chunk.Y3WFK6NY.js +1 -1
  63. package/cdn-versioned/chunks/chunk.YMXJOB2H.js +1 -1
  64. package/cdn-versioned/chunks/chunk.YSFDXYDA.js +1 -1
  65. package/cdn-versioned/chunks/chunk.ZB5RQUA2.js +1 -1
  66. package/cdn-versioned/chunks/chunk.ZXGG5GRH.js +1 -1
  67. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  68. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  69. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  70. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  71. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  72. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  73. package/cdn-versioned/components/button/button.d.ts +1 -1
  74. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  75. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  76. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  77. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  78. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  79. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  80. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  81. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  82. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  83. package/cdn-versioned/components/drawer/drawer.js +1 -1
  84. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  85. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  86. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  87. package/cdn-versioned/components/header/header.d.ts +1 -1
  88. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  89. package/cdn-versioned/components/include/include.d.ts +1 -1
  90. package/cdn-versioned/components/input/input.d.ts +1 -1
  91. package/cdn-versioned/components/link/link.d.ts +1 -1
  92. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  93. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  94. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  95. package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
  96. package/cdn-versioned/components/option/option.d.ts +1 -1
  97. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  98. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  99. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  100. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  101. package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
  102. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  103. package/cdn-versioned/components/select/select.d.ts +1 -1
  104. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  105. package/cdn-versioned/components/step/step.d.ts +1 -1
  106. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  107. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  108. package/cdn-versioned/components/switch/switch.js +1 -1
  109. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  110. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  111. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  112. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  113. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  114. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  115. package/cdn-versioned/components/video/video.d.ts +1 -1
  116. package/cdn-versioned/custom-elements.json +450 -450
  117. package/cdn-versioned/internal/form.js +3 -3
  118. package/cdn-versioned/solid-components.bundle.js +16 -16
  119. package/cdn-versioned/solid-components.css +2 -2
  120. package/cdn-versioned/solid-components.iife.js +16 -16
  121. package/cdn-versioned/solid-components.js +1 -1
  122. package/cdn-versioned/vscode.html-custom-data.json +120 -120
  123. package/cdn-versioned/web-types.json +227 -227
  124. package/dist/chunks/{chunk.QAP7MKCU.js → chunk.IFJ7LPJV.js} +7 -7
  125. package/dist/chunks/{chunk.CYM2Q7GX.js → chunk.ZXC3A5GK.js} +3 -3
  126. package/dist/components/drawer/drawer.js +1 -1
  127. package/dist/components/switch/switch.js +1 -1
  128. package/dist/custom-elements.json +244 -244
  129. package/dist/solid-components.js +2 -2
  130. package/dist/vscode.html-custom-data.json +42 -42
  131. package/dist/web-types.json +95 -95
  132. package/dist-versioned/_components/menu/menu.js +1 -1
  133. package/dist-versioned/_components/menu/menu.styles.js +1 -1
  134. package/dist-versioned/_components/menu-item/menu-item.js +2 -2
  135. package/dist-versioned/chunks/chunk.27LAMXW5.js +5 -5
  136. package/dist-versioned/chunks/chunk.4LV4VHB5.js +9 -9
  137. package/dist-versioned/chunks/chunk.4TLTIOIY.js +2 -2
  138. package/dist-versioned/chunks/chunk.4UEQEUQ5.js +1 -1
  139. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  140. package/dist-versioned/chunks/chunk.6V7KPUGO.js +2 -2
  141. package/dist-versioned/chunks/chunk.7VCFYOV5.js +1 -1
  142. package/dist-versioned/chunks/chunk.B7BIS5Y4.js +1 -1
  143. package/dist-versioned/chunks/chunk.BABTMD4T.js +4 -4
  144. package/dist-versioned/chunks/chunk.BJSTXBIQ.js +2 -2
  145. package/dist-versioned/chunks/chunk.BWIRKW7E.js +26 -26
  146. package/dist-versioned/chunks/chunk.C2LS4326.js +2 -2
  147. package/dist-versioned/chunks/chunk.C4WMHAOW.js +1 -1
  148. package/dist-versioned/chunks/chunk.CMK6UTW6.js +2 -2
  149. package/dist-versioned/chunks/chunk.CWJB3CZO.js +1 -1
  150. package/dist-versioned/chunks/chunk.DYRAOE5L.js +2 -2
  151. package/dist-versioned/chunks/chunk.E73VDVFB.js +5 -5
  152. package/dist-versioned/chunks/chunk.ECH5BTRG.js +6 -6
  153. package/dist-versioned/chunks/chunk.EQRUJQQW.js +2 -2
  154. package/dist-versioned/chunks/chunk.ERRAXV4M.js +1 -1
  155. package/dist-versioned/chunks/chunk.EYTEM45R.js +3 -3
  156. package/dist-versioned/chunks/chunk.F4UAU4OM.js +5 -5
  157. package/dist-versioned/chunks/chunk.GAJFV5V3.js +2 -2
  158. package/dist-versioned/chunks/chunk.H36YEYQD.js +3 -3
  159. package/dist-versioned/chunks/chunk.HEYBJG64.js +4 -4
  160. package/dist-versioned/chunks/{chunk.QAP7MKCU.js → chunk.IFJ7LPJV.js} +9 -9
  161. package/dist-versioned/chunks/chunk.JNJHWACL.js +3 -3
  162. package/dist-versioned/chunks/chunk.JNTED6KG.js +5 -5
  163. package/dist-versioned/chunks/chunk.JQD4QY3H.js +5 -5
  164. package/dist-versioned/chunks/chunk.KNZPI3QD.js +2 -2
  165. package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
  166. package/dist-versioned/chunks/chunk.KWP3CREC.js +8 -8
  167. package/dist-versioned/chunks/chunk.LOW4LWP6.js +2 -2
  168. package/dist-versioned/chunks/chunk.LQKJMBVH.js +2 -2
  169. package/dist-versioned/chunks/chunk.LW7RVQTS.js +2 -2
  170. package/dist-versioned/chunks/chunk.MSSKOOJJ.js +11 -11
  171. package/dist-versioned/chunks/chunk.NI45NXZV.js +3 -3
  172. package/dist-versioned/chunks/chunk.O7OXBLZU.js +2 -2
  173. package/dist-versioned/chunks/chunk.OWACJFST.js +1 -1
  174. package/dist-versioned/chunks/chunk.QCQLFJGJ.js +13 -13
  175. package/dist-versioned/chunks/chunk.QEQDPEN2.js +1 -1
  176. package/dist-versioned/chunks/chunk.QTZYBV5A.js +24 -24
  177. package/dist-versioned/chunks/chunk.R3PPZNKA.js +2 -2
  178. package/dist-versioned/chunks/chunk.RWUFX5GL.js +1 -1
  179. package/dist-versioned/chunks/chunk.T5QL4V5F.js +1 -1
  180. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  181. package/dist-versioned/chunks/chunk.ULQU6P3E.js +6 -6
  182. package/dist-versioned/chunks/chunk.VOWE6LHF.js +14 -14
  183. package/dist-versioned/chunks/chunk.VUKS4CBF.js +1 -1
  184. package/dist-versioned/chunks/chunk.X7IRGFBS.js +1 -1
  185. package/dist-versioned/chunks/chunk.YGRJQZFR.js +1 -1
  186. package/dist-versioned/chunks/chunk.ZMWGNTP6.js +5 -5
  187. package/dist-versioned/chunks/{chunk.CYM2Q7GX.js → chunk.ZXC3A5GK.js} +4 -4
  188. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  189. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  190. package/dist-versioned/components/animation/animation.d.ts +1 -1
  191. package/dist-versioned/components/audio/audio.d.ts +1 -1
  192. package/dist-versioned/components/badge/badge.d.ts +1 -1
  193. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  194. package/dist-versioned/components/button/button.d.ts +1 -1
  195. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  196. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  197. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  198. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  199. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  200. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  201. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  202. package/dist-versioned/components/divider/divider.d.ts +1 -1
  203. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  204. package/dist-versioned/components/drawer/drawer.js +1 -1
  205. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  206. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  207. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  208. package/dist-versioned/components/header/header.d.ts +1 -1
  209. package/dist-versioned/components/icon/icon.d.ts +1 -1
  210. package/dist-versioned/components/include/include.d.ts +1 -1
  211. package/dist-versioned/components/input/input.d.ts +1 -1
  212. package/dist-versioned/components/link/link.d.ts +1 -1
  213. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  214. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  215. package/dist-versioned/components/notification/notification.d.ts +1 -1
  216. package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
  217. package/dist-versioned/components/option/option.d.ts +1 -1
  218. package/dist-versioned/components/popup/popup.d.ts +1 -1
  219. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  220. package/dist-versioned/components/radio/radio.d.ts +1 -1
  221. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  222. package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
  223. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  224. package/dist-versioned/components/select/select.d.ts +1 -1
  225. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  226. package/dist-versioned/components/step/step.d.ts +1 -1
  227. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  228. package/dist-versioned/components/switch/switch.d.ts +1 -1
  229. package/dist-versioned/components/switch/switch.js +1 -1
  230. package/dist-versioned/components/tab/tab.d.ts +1 -1
  231. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  232. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  233. package/dist-versioned/components/tag/tag.d.ts +1 -1
  234. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  235. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  236. package/dist-versioned/components/video/video.d.ts +1 -1
  237. package/dist-versioned/custom-elements.json +450 -450
  238. package/dist-versioned/internal/form.js +3 -3
  239. package/dist-versioned/solid-components.css +2 -2
  240. package/dist-versioned/solid-components.js +2 -2
  241. package/dist-versioned/vscode.html-custom-data.json +120 -120
  242. package/dist-versioned/web-types.json +227 -227
  243. package/package.json +2 -2
  244. package/cdn/chunks/chunk.QJ2PJAKH.js +0 -3
  245. package/cdn-versioned/chunks/chunk.QJ2PJAKH.js +0 -3
@@ -118,7 +118,7 @@
118
118
  removable-indicator:tag__removable-indicator,
119
119
  " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let r=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||r)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let r=t.target.closest("sd-option"),a=this.value;r&&!r.disabled&&(this.multiple?(this.toggleOptionSelection(r),this.lastOption=r,this.setOrderedSelectedOptions(r),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(r),this.setSelectedOptions(r)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==a&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let r=this.getCurrentOption(),a=e.indexOf(r),n=Math.max(0,a);if(t){let d=a+1;n=d>e.length-1?0:d}else{let d=a-1;n=d<0?e.length-1:d}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),qt(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let r=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),r.forEach(a=>{a.current=!1,a.setAttribute("aria-selected","false"),a.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let a=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());a&&(a.selected=e!=null?e:!a.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(r=>e.includes(r.value)):t.find(r=>r.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(r=>{r.selected=this.compareOptions(r,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(r=>this.compareOptions(r,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(r=>this.compareOptions(r,e))?this.selectedOptions=this.selectedOptions.filter(r=>!this.compareOptions(r,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,r,a;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((r=this.selectedOptions[0])==null?void 0:r.getTextLabel())||"",this.selectedTextLabel=((a=this.selectedOptions[0])==null?void 0:a.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(r=>this.filter(r,t)||t==="").map(r=>{var g,E,k;let a=r.cloneNode(!0);if(a.current=a.value===((g=this.lastOption)==null?void 0:g.value),a.selected=r.selected,a.checkbox=r.checkbox,a.size=r.size,!(((E=r.parentElement)==null?void 0:E.tagName.toLowerCase())==="sd-optgroup"))return a;let d=r.parentElement,h=(k=d.querySelector('[slot="label"]'))==null?void 0:k.cloneNode(!0),p=e.find(C=>C.id===d.id);if(p){p==null||p.appendChild(a),h&&(p==null||p.appendChild(h));return}let f=d.cloneNode();return f.appendChild(a),h&&f.appendChild(h),e.push(f),f}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await j(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:r,options:a}=B(this,"combobox.show",{dir:this.localize.dir()});await N(this.popup.popup,r,a),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await j(this);let{keyframes:t,options:e}=B(this,"combobox.hide",{dir:this.localize.dir()});await N(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([q(this,"sd-after-show"),q(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,q(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return Rs(Or(this.defaultSlot)).flat()}getSlottedOptGroups(){return Us(Or(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let r=this.findOptionByValue(t,this.value);this.selectedTextLabel=(r==null?void 0:r.getTextLabel())||"",t.forEach((a,n)=>{this.multiple&&(a.checkbox=!0),a.id=a.id||`sd-combobox-option-${n}`}),e.forEach((a,n)=>{a.id=a.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),r=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,n=this.helpText?!0:!!r,d=this.clearable&&!this.disabled&&!this.visuallyDisabled,h=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",p=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",f=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",g={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],E={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],k={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return u`<div part="form-control" class="${c("relative text-left",p,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${a&&"inline-block mb-2"}" aria-hidden="${!a}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${c("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[h],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${c("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
120
120
  popup:popup__content,
121
- "><div part="combobox" class="${c("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?u`<slot part="left" name="left" class="${c("inline-flex",E,f,k)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?u`<div part="tags" class="${c("flex items-center gap-1",E)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${c("appearance-none outline-none bg-transparent flex-auto min-w-0",p,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder")}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(C=>C==null?void 0:C.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",p)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${d?u`<button part="clear-button" class="${c("flex justify-center",g,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",k)}" name="closing-round" library="system"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${c(g,k,"text-error")}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",g,k)}" library="system" name="status-check"></sd-icon>`:""}<slot name="right" part="right" class="${c("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",k)}">${this.type!=="search"?u`<sd-icon class="${c("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="system" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?u`<button class="${c("flex items-center sd-interactive",g)}" type="button"><sd-icon class="${c(f,k)}" library="system" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:u`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${w(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?u`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700 mt-2" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};T.styles=[...m.styles,v`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{height:var(--sd-spacing-4,1rem);right:var(--sd-spacing-4,1rem);width:var(--sd-spacing-4,1rem)}:host([size=md]) .combobox-button{height:var(--sd-spacing-6,1.5rem);right:.85rem;width:var(--sd-spacing-6,1.5rem)}:host([size=lg]) .combobox-button{height:var(--sd-spacing-8,2rem);right:var(--sd-spacing-3,.75rem);width:var(--sd-spacing-8,2rem)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],o([b("sd-popup")],T.prototype,"popup",2),o([b('[part="combobox"]')],T.prototype,"combobox",2),o([b('[part="display-input"]')],T.prototype,"displayInput",2),o([b(".value-input")],T.prototype,"valueInput",2),o([b('[part="listbox"]')],T.prototype,"listbox",2),o([b('[part="tags"]')],T.prototype,"tagWrapper",2),o([b('[part="filtered-listbox"]')],T.prototype,"filteredWrapper",2),o([b("slot:not([name])")],T.prototype,"defaultSlot",2),o([b("#invalid-message")],T.prototype,"invalidMessage",2),o([$()],T.prototype,"hasFocus",2),o([$()],T.prototype,"displayInputValue",2),o([$()],T.prototype,"selectedTextLabel",2),o([$()],T.prototype,"selectedOptions",2),o([$()],T.prototype,"filteredOptions",2),o([$()],T.prototype,"allOptions",2),o([$()],T.prototype,"lastOption",2),o([$()],T.prototype,"showValidStyle",2),o([$()],T.prototype,"showInvalidStyle",2),o([$()],T.prototype,"deletedTagLabel",2),o([l({reflect:!0})],T.prototype,"name",2),o([l({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],T.prototype,"value",2),o([It()],T.prototype,"defaultValue",2),o([l({type:String,reflect:!0})],T.prototype,"size",2),o([l({type:String,reflect:!0})],T.prototype,"placeholder",2),o([l({type:String,attribute:"max-options-tag-label",reflect:!0})],T.prototype,"maxOptionsTagLabel",2),o([l({type:Boolean,reflect:!0})],T.prototype,"disabled",2),o([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],T.prototype,"visuallyDisabled",2),o([l({type:Boolean,reflect:!0})],T.prototype,"clearable",2),o([l({type:Boolean,reflect:!0})],T.prototype,"open",2),o([l({type:Boolean,reflect:!0})],T.prototype,"hoist",2),o([l({type:String,reflect:!0})],T.prototype,"label",2),o([l({type:String,reflect:!0})],T.prototype,"placement",2),o([l({type:String,attribute:"help-text",reflect:!0})],T.prototype,"helpText",2),o([l({type:String,reflect:!0})],T.prototype,"form",2),o([l({type:Boolean,reflect:!0})],T.prototype,"required",2),o([l({type:String,reflect:!0})],T.prototype,"type",2),o([$()],T.prototype,"currentPlacement",2),o([l()],T.prototype,"getOption",2),o([l({type:Boolean,reflect:!0})],T.prototype,"multiple",2),o([l({type:Boolean,reflect:!0})],T.prototype,"useTags",2),o([l({type:Number,reflect:!0,attribute:"max-options-visible"})],T.prototype,"maxOptionsVisible",2),o([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],T.prototype,"styleOnValid",2),o([l()],T.prototype,"filter",2),o([l()],T.prototype,"getTag",2),o([x("filter",{waitUntilFirstUpdate:!0})],T.prototype,"handleFilterChange",1),o([x("useTags",{waitUntilFirstUpdate:!0})],T.prototype,"handleUseTagsChange",1),o([x("size",{waitUntilFirstUpdate:!0})],T.prototype,"applySizeToOptions",1),o([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],T.prototype,"handleDisabledChange",1),o([x("value",{waitUntilFirstUpdate:!0})],T.prototype,"handleValueChange",1),o([x("displayInputValue",{waitUntilFirstUpdate:!0})],T.prototype,"handleDisplayInputValueChange",1),o([x("open",{waitUntilFirstUpdate:!0})],T.prototype,"handleOpenChange",1),T=o([y("sd-combobox")],T);I("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});I("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});function fi(s=document.activeElement){if(s!=null&&s.shadowRoot){let i=s.shadowRoot.activeElement;if(i)return fi(i)}return s}function qs(s){let i=s.tagName.toLowerCase();return s.getAttribute("tabindex")==="-1"||s.hasAttribute("disabled")||s.hasAttribute("aria-disabled")&&s.getAttribute("aria-disabled")!=="false"||i==="input"&&s.getAttribute("type")==="radio"&&!s.hasAttribute("checked")||s.offsetParent===null&&!(s.getRootNode()instanceof ShadowRoot)||window.getComputedStyle(s).visibility==="hidden"?!1:(i==="audio"||i==="video")&&s.hasAttribute("controls")||s.hasAttribute("tabindex")||s.hasAttribute("contenteditable")&&s.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(i)}function ji(s){var a,n;let i=[];function t(d){d instanceof HTMLElement&&(i.push(d),d.shadowRoot!==null&&d.shadowRoot.mode==="open"&&t(d.shadowRoot)),[...d.children].forEach(h=>t(h))}t(s);let e=(a=i.find(d=>qs(d)))!=null?a:null,r=(n=i.reverse().find(d=>qs(d)))!=null?n:null;return{start:e,end:r}}var gi=[],Ie=class{constructor(i){this.tabDirection="forward";this.element=i,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){gi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){gi=gi.filter(i=>i!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return gi[gi.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){let{start:i,end:t}=ji(this.element),e=this.tabDirection==="forward"?i:t;typeof(e==null?void 0:e.focus)=="function"&&e.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(i){i.key==="Tab"&&i.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}};var kt=class extends m{constructor(){super(...arguments);this.hasSlotController=new S(this,"footer");this.localize=new M(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Ie(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),_e(this))}disconnectedCallback(){super.disconnectedCallback(),He(this)}get prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=B(this,"dialog.denyClose",{dir:this.localize.dir()});N(this.panel,r.keyframes,r.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=fi(),this.modal.activate(),_e(this);let t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([j(this.dialog),j(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")});let e=this.prefersReducedMotion?B(this,"dialog.showReducedMotion",{dir:this.localize.dir()}):B(this,"dialog.show",{dir:this.localize.dir()}),r=B(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([N(this.panel,e.keyframes,e.options),N(this.overlay,r.keyframes,r.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([j(this.dialog),j(this.overlay)]);let t=this.prefersReducedMotion?B(this,"dialog.hideReducedMotion",{dir:this.localize.dir()}):B(this,"dialog.hide",{dir:this.localize.dir()}),e=B(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([N(this.overlay,e.keyframes,e.options).then(()=>{this.overlay.hidden=!0}),N(this.panel,t.keyframes,t.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,He(this);let r=this.originalTrigger;typeof(r==null?void 0:r.focus)=="function"&&setTimeout(()=>r.focus()),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}render(){return u`<div part="base" class="${c("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${c("flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted overflow-y-auto",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${w(this.headline?this.headline:void 0)}" aria-labelledby="${w(this.headline?void 0:"title")}" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?u`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>`:u`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":u`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${c("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};kt.styles=[...m.styles,v`:host{--width:662px}[part=panel]{max-height:80vh;width:var(--width)}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=body]{min-height:50px}[part=footer]{width:100%}}`],o([b('[part="base"]')],kt.prototype,"dialog",2),o([b('[part="panel"]')],kt.prototype,"panel",2),o([b('[part="overlay"]')],kt.prototype,"overlay",2),o([l({type:Boolean,reflect:!0})],kt.prototype,"open",2),o([l({type:String,reflect:!0})],kt.prototype,"headline",2),o([l({attribute:"no-close-button",type:Boolean,reflect:!0})],kt.prototype,"noCloseButton",2),o([x("open",{waitUntilFirstUpdate:!0})],kt.prototype,"handleOpenChange",1),kt=o([y("sd-dialog")],kt);I("dialog.show",{keyframes:[{opacity:0,transform:"translate(-50%, 100%)"},{opacity:1,transform:"translate(0, 0)"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});I("dialog.showReducedMotion",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});I("dialog.hide",{keyframes:[{opacity:1,transform:"translate(0, 0)"},{opacity:0,transform:"translate(50%, -100%)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});I("dialog.hideReducedMotion",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});I("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});I("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});I("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});var Pt=class extends m{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return u`<hr part="main" aria-orientation="${this.orientation}" class="${c(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};Pt.styles=[...m.styles,v`:host{margin:var(--sd-spacing-0,0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],o([l({type:String,reflect:!0})],Pt.prototype,"orientation",2),o([l({type:Boolean,reflect:!0})],Pt.prototype,"inverted",2),Pt=o([y("sd-divider")],Pt);function Sr(s){return s.charAt(0).toUpperCase()+s.slice(1)}var dt=class extends m{constructor(){super(...arguments);this.hasSlotController=new S(this,"footer");this.localize=new M(this);this.modal=new Ie(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=t=>{this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),_e(this)))}disconnectedCallback(){super.disconnectedCallback(),He(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=B(this,"drawer.denyClose",{dir:this.localize.dir()});N(this.panel,r.keyframes,r.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var e;let t=(e=this.closeButton.shadowRoot)==null?void 0:e.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=fi(),this.contained||(this.modal.activate(),_e(this));let r=this.querySelector("[autofocus]");r&&r.removeAttribute("autofocus"),await Promise.all([j(this.drawer),j(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(r?r.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),r?r.setAttribute("autofocus",""):this.closeButton.focus()});let a=B(this,`drawer.show${Sr(this.placement)}`,{dir:this.localize.dir()}),n=B(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([N(this.panel,a.keyframes,a.options),N(this.overlay,n.keyframes,n.options)]),t==null||t.setAttribute("aria-controls","drawer"),t==null||t.setAttribute("aria-expanded","true"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),He(this)),await Promise.all([j(this.drawer),j(this.overlay)]);let r=B(this,`drawer.hide${Sr(this.placement)}`,{dir:this.localize.dir()}),a=B(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([N(this.overlay,a.keyframes,a.options).then(()=>{this.overlay.hidden=!0}),N(this.panel,r.keyframes,r.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let n=this.originalTrigger;typeof(n==null?void 0:n.focus)=="function"&&setTimeout(()=>n.focus()),t==null||t.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),_e(this)),this.open&&this.contained&&(this.modal.deactivate(),He(this))}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${c("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${c("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${c("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 right-2"><sd-icon label="${this.localize.term("close")}" name="close" library="system"></sd-icon></sd-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon label="${this.localize.term("close")}" name="close" library="system"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" tabindex="0"><slot></slot></div><footer part="footer" class="${c(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};dt.styles=[...m.styles,v`:host{--width:25rem;display:contents}:host([contained]){z-index:auto}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],o([b("[part=base]")],dt.prototype,"drawer",2),o([b("[part=panel]")],dt.prototype,"panel",2),o([b("[part=overlay]")],dt.prototype,"overlay",2),o([b("[part=close-button]")],dt.prototype,"closeButton",2),o([l({type:Boolean,reflect:!0})],dt.prototype,"open",2),o([l({type:String,attribute:"label",reflect:!0})],dt.prototype,"label",2),o([l({type:String,reflect:!0})],dt.prototype,"placement",2),o([l({type:Boolean,reflect:!0})],dt.prototype,"contained",2),o([l({attribute:"no-header",type:Boolean,reflect:!0})],dt.prototype,"noHeader",2),o([x("open",{waitUntilFirstUpdate:!0})],dt.prototype,"handleOpenChange",1),o([x("contained",{waitUntilFirstUpdate:!0})],dt.prototype,"handleNoModalChange",1),dt=o([y("sd-drawer")],dt);I("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}});I("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}});I("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}});I("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}});I("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}});I("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});I("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});var et=class extends m{constructor(){super(...arguments);this.localize=new M(this);this.open=!1;this.rounded=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.noAutoSize=!1;this.noFlip=!1;this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}getAccessibleTrigger(){let e=this.trigger.assignedElements({flatten:!0}).find(a=>ji(a).start),r=null;if(e)switch(e.tagName.toLowerCase()){case"sd-button":case"sd-icon-button":r=e.button;break;case"sd-navigation-item":r=e.button;break;default:r=e}return r}updateAccessibleTrigger(){let t=this.getAccessibleTrigger();t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded",this.open?"true":"false"))}focusOnTrigger(){let t=this.getAccessibleTrigger();typeof(t==null?void 0:t.focus)=="function"&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="sd-menu")}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){var e;if(t.key==="Tab"){if(this.open&&((e=document.activeElement)==null?void 0:e.tagName.toLowerCase())==="sd-menu-item"){t.preventDefault(),this.hide(),this.focusOnTrigger();return}setTimeout(()=>{var a,n,d,h,p,f,g,E,k,C,L,O;let r=((p=(h=(d=(n=(a=document.activeElement)==null?void 0:a.shadowRoot)==null?void 0:n.activeElement)==null?void 0:d.shadowRoot)==null?void 0:h.activeElement)==null?void 0:p.getRootNode())instanceof ShadowRoot?(k=(E=(g=(f=document.activeElement)==null?void 0:f.shadowRoot)==null?void 0:g.activeElement)==null?void 0:E.shadowRoot)==null?void 0:k.activeElement:((C=this.containingElement)==null?void 0:C.getRootNode())instanceof ShadowRoot?(O=(L=document.activeElement)==null?void 0:L.shadowRoot)==null?void 0:O.activeElement:document.activeElement;(!this.containingElement||(r==null?void 0:r.closest(this.containingElement.tagName.toLowerCase()))!==this.containingElement)&&this.hide()})}}handleDocumentMouseDown(t){let e=t.composedPath();this.containingElement&&!e.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(t){let e=t.target;qt(e,this.panel)}handlePanelSelect(t){let e=t.target;!this.stayOpenOnSelect&&e.tagName.toLowerCase()==="sd-menu"&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(t){if(t.key==="Escape"&&this.open){t.stopPropagation(),this.focusOnTrigger(),this.hide();return}if([" ","Enter"].includes(t.key)){t.preventDefault(),this.handleTriggerClick();return}let e=this.getMenu();if(e){let r=e.defaultSlot.assignedElements({flatten:!0}),a=r[0],n=r[r.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),r.length>0&&requestAnimationFrame(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(e.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(e.setCurrentItem(n),n.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await j(this),this.panel.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=B(this,"dropdown.show",{dir:this.localize.dir()});await N(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await j(this);let{keyframes:t,options:e}=B(this,"dropdown.hide",{dir:this.localize.dir()});await N(this.popup.popup,t,e),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return u`<sd-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${c("shadow bg-white block",this.open?"pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-popup>`}};et.styles=[...m.styles,v`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],o([b("#dropdown")],et.prototype,"popup",2),o([b("[part=trigger]")],et.prototype,"trigger",2),o([b("[part=panel]")],et.prototype,"panel",2),o([l({type:Boolean,reflect:!0})],et.prototype,"open",2),o([l({type:Boolean,reflect:!0})],et.prototype,"rounded",2),o([l({type:String,reflect:!0})],et.prototype,"placement",2),o([l({type:Boolean,reflect:!0})],et.prototype,"disabled",2),o([l({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],et.prototype,"stayOpenOnSelect",2),o([l({type:Object})],et.prototype,"containingElement",2),o([l({type:Number,reflect:!0})],et.prototype,"distance",2),o([l({type:Number,reflect:!0})],et.prototype,"skidding",2),o([l({type:Boolean,reflect:!0,attribute:"no-auto-size"})],et.prototype,"noAutoSize",2),o([l({type:Boolean,reflect:!0,attribute:"no-flip"})],et.prototype,"noFlip",2),o([l({type:Boolean,reflect:!0})],et.prototype,"hoist",2),o([x("open",{waitUntilFirstUpdate:!0})],et.prototype,"handleOpenChange",1),et=o([y("sd-dropdown")],et);I("dropdown.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});I("dropdown.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Mt=class extends m{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new M(this)}updateMaxHeight(){var e;let t=(e=this.contentPreview)==null?void 0:e.scrollHeight.toString();this.style.setProperty("--max-height-pixel",`${t}px`),this.style.setProperty("--max-height",t)}onToggleClick(){this.updateMaxHeight(),this.open=!this.open}onOpenChange(){this.open?(this.emit("sd-show"),this.updateComplete.then(()=>{this.emit("sd-after-show")})):(this.emit("sd-hide"),this.updateComplete.then(()=>{this.emit("sd-after-hide")})),this.details.setAttribute("open",this.open.toString())}async show(){if(!this.open)return this.onToggleClick(),q(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),q(this,"sd-after-hide")}render(){return u`<div part="base" class="flex flex-col-reverse gap-4"><button part="toggle" class="${c("sd-interactive sd-interactive--reset",this.inverted&&"sd-interactive--inverted",this.inverted?"!focus-visible:focus-outline-inverted":"!focus-visible:focus-outline")}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${c("h-full justify-center w-full text-base flex items-center toggle")}">${this.open?u`<slot name="toggle-open"><sd-icon class="mr-2 text-xl" library="system" name="chevron-up"></sd-icon>${this.localize.term("showLess")}</slot>`:u`<slot name="toggle-closed"><sd-icon class="mr-2 text-xl" library="system" name="chevron-down"></sd-icon>${this.localize.term("showMore")}</slot>`}</div></button><details part="details" ?inert="${w(!this.open)}"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details></div>`}firstUpdated(){this.cloneContentToLightDOM(),this.details.setAttribute("open",this.open.toString())}cloneContentToLightDOM(){let t=document.createElement("div");t.setAttribute("slot","clone"),Array.from(this.childNodes).forEach(r=>{let a=r.cloneNode(!0);t.appendChild(a)}),this.appendChild(t)}};Mt.styles=[...m.styles,v`:host{--gradient-color-start:hsla(0,0%,100%,0);--gradient-color-end:#fff;--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(--gradient-color-start) 0%,var(--gradient-color-end) 80%,var(--gradient-color-end) 100%;display:inline-block;position:relative;width:100%}.toggle::-moz-focus-inner{border-style:none;padding:var(--sd-spacing-0,0)}details>summary::-webkit-details-marker,details[open] summary{display:none}summary{max-block-size:var(--component-expandable-max-block-size)}:host([open]) summary{max-block-size:var(--max-height-pixel,1000vh)}.content{max-block-size:var(--component-expandable-max-block-size)}:host([open]) .content{max-block-size:var(--max-height-pixel,1000vh)}:host(:not([open])) .content:after{background:linear-gradient(180deg,var(--gradient));bottom:var(--sd-spacing-0,0);content:" ";display:block;height:var(--gradient-height);left:var(--sd-spacing-0,0);position:absolute;width:100%}:host([inverted]:not([open])) .content:after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,rgba(0,53,142,0) 0,#00358e 80%,#00358e 100%))}`],o([b(".content-preview")],Mt.prototype,"contentPreview",2),o([b("details")],Mt.prototype,"details",2),o([l({type:Boolean,reflect:!0})],Mt.prototype,"open",2),o([l({type:Boolean,reflect:!0})],Mt.prototype,"inverted",2),o([x("open",{waitUntilFirstUpdate:!0})],Mt.prototype,"onOpenChange",1),Mt=o([y("sd-expandable")],Mt);var Et=class extends m{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary";this.activeSide="front"}connectedCallback(){super.connectedCallback()}flipFront(){this.activeSide="back",this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),setTimeout(()=>{this.back.focus()})}flipBack(){this.activeSide="front",this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),setTimeout(()=>{this.front.focus()})}handleFrontKeydown(t){t.code==="Enter"&&this.front===t.target&&this.flipFront()}handleBackKeydown(t){t.code==="Enter"&&this.back===t.target&&this.flipBack()}render(){return u`<div part="base" class="${c("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${w(this.activeSide==="back"||void 0)}" class="${c("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${c("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${c("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"><slot name="front"></slot></div><div part="front-secondary-gradient" class="${c("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.frontVariant])}"></div><sd-button part="front-button" size="md" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.frontVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.frontVariant]}" class="${c("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-icon library="system" name="reload" label="Flip to Back"></sd-icon></sd-button></div><div part="back" tabindex="0" aria-hidden="${this.activeSide==="front"}" inert="${w(this.activeSide==="front"||void 0)}" class="${c("flip-card__side flip-card__side--back overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.backVariant==="primary"&&"bg-primary",this.backVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-back" class="${c("absolute h-full w-full -z-20",(this.backVariant==="primary"||this.backVariant==="primary-100")&&"hidden")}"><slot name="media-back"></slot></div><div part="back-slot-container" class="${c("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.backVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.backVariant])}"><slot name="back"></slot></div><div part="back-secondary-gradient" class="${c("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.backVariant])}"></div><sd-button size="md" part="back-button" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.backVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.backVariant]}" class="${c("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-icon library="system" name="reload" label="Flip to Front"></sd-icon></sd-button></div></div>`}};Et.styles=[...m.styles,v`:host{aspect-ratio:3/4;display:block;--name:"";--height:480px;height:var(--height)}.flip-card{perspective:100rem}.flip-card__side{backface-visibility:hidden}.flip-card__side--back{transform:rotateY(180deg)}.clicked--front{transform:rotateY(-180deg)}.clicked--back{transform:rotateY(0)}.flip-card__side--back.vertical{transform:rotateX(180deg)}.clicked--front.vertical{transform:rotateX(-180deg)}.clicked--back.vertical{transform:rotateX(0)}.flip-card__gradient{flex:.4 1 0}`],o([b('[part="front"]')],Et.prototype,"front",2),o([b('[part="back"]')],Et.prototype,"back",2),o([l({reflect:!0,attribute:"flip-direction"})],Et.prototype,"flipDirection",2),o([l({reflect:!0})],Et.prototype,"placement",2),o([l({type:String,reflect:!0,attribute:"front-variant"})],Et.prototype,"frontVariant",2),o([l({type:String,reflect:!0,attribute:"back-variant"})],Et.prototype,"backVariant",2),o([$()],Et.prototype,"activeSide",2),Et=o([y("sd-flipcard")],Et);var re=class extends m{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setCalculatedHeightProperty=this.setCalculatedHeightProperty.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this)}firstUpdated(){this.toggleHeightCalculation()}toggleHeightCalculation(){var t;this.fixed?(this.setCalculatedHeightProperty(),this.addResizeObserver()):(this.setCalculatedHeightProperty(),(t=this.resizeObserver)==null||t.disconnect(),this.resizeObserver=void 0)}disconnectedCallback(){super.disconnectedCallback()}updated(t){super.updated(t),t.has("fixed")&&this.toggleHeightCalculation()}onResize(){this.fixed&&this.setCalculatedHeightProperty()}addResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.onResize()}),this.refHeaderElement&&this.resizeObserver.observe(this.refHeaderElement)}setCalculatedHeightProperty(){this.fixed&&this.refHeaderElement?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.refHeaderElement.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return u`<header class="w-full bg-white relative" role="banner" @slotchange="${this.handleSlotChange}"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}handleSlotChange(t){t.target.assignedElements().length>0&&(this.refHeaderElement=t.currentTarget,this.setCalculatedHeightProperty())}};re.styles=[...m.styles,v`:host{display:block}:host([fixed]){left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:"";height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],o([l({reflect:!0,type:Boolean})],re.prototype,"fixed",2),o([Ni(100)],re.prototype,"onResize",1),re=o([y("sd-header")],re);var Bt=class extends m{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(t){let e=document.createElement("script");[...t.attributes].forEach(r=>e.setAttribute(r.name,r.value)),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}async handleSrcChange(){try{let t=this.src,e=await Bi(t,this.mode);if(t!==this.src)return;if(!e.ok){this.emit("sd-error",{detail:{status:e.status}});return}this.innerHTML=e.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(r=>this.executeScript(r)),this.emit("sd-load")}catch(t){this.emit("sd-error",{detail:{status:-1}})}}render(){return u`<slot></slot>`}};Bt.styles=[...m.styles,v`:host{display:block}`],o([l({reflect:!0})],Bt.prototype,"src",2),o([l({type:String,reflect:!0})],Bt.prototype,"mode",2),o([l({attribute:"allow-scripts",type:Boolean,reflect:!0})],Bt.prototype,"allowScripts",2),o([x("src")],Bt.prototype,"handleSrcChange",1),Bt=o([y("sd-include")],Bt);var bi=(s,i)=>{var e;let t=s._$AN;if(t===void 0)return!1;for(let r of t)(e=r._$AO)==null||e.call(r,i,!1),bi(r,i);return!0},Yi=s=>{let i,t;do{if((i=s._$AM)===void 0)break;t=i._$AN,t.delete(s),s=i}while((t==null?void 0:t.size)===0)},Ks=s=>{for(let i;i=s._$AM;s=i){let t=i._$AN;if(t===void 0)i._$AN=t=new Set;else if(t.has(s))break;t.add(s),Yn(i)}};function Kn(s){this._$AN!==void 0?(Yi(this),this._$AM=s,Ks(this)):this._$AM=s}function jn(s,i=!1,t=0){let e=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(i)if(Array.isArray(e))for(let a=t;a<e.length;a++)bi(e[a],!1),Yi(e[a]);else e!=null&&(bi(e,!1),Yi(e));else bi(this,s)}var Yn=s=>{var i,t;s.type==Ot.CHILD&&((i=s._$AP)!=null||(s._$AP=jn),(t=s._$AQ)!=null||(s._$AQ=Kn))},Xi=class extends Ee{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),Ks(this),this.isConnected=i._$AU}_$AO(i,t=!0){var e,r;i!==this.isConnected&&(this.isConnected=i,i?(e=this.reconnected)==null||e.call(this):(r=this.disconnected)==null||r.call(this)),t&&(bi(this,i),Yi(this))}setValue(i){if(qi(this._$Ct))this._$Ct._$AI(i,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=i,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var Dr=class extends Xi{constructor(t){super(t);this.handlePointerDown=t=>{t.button!==0||this.host.disabled||this.spinOnLongPressCallback(t)};this.handlePointerUp=t=>{t==null||t.preventDefault(),t==null||t.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(t.type!==Ot.ELEMENT||!(t.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(t){return Y}update(t,[e]){return this.callbacks===void 0&&this.host===void 0&&(this.host=t.element,this.callbacks=H({},e),this.host.addEventListener("pointerdown",this.handlePointerDown)),vt}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(t){var e;t.preventDefault(),t.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(e=this.observer)==null||e.disconnect(),this.observer=new MutationObserver(r=>{r.forEach(a=>{a.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var t;clearInterval(this.interval),clearTimeout(this.timeout),(t=this.observer)==null||t.disconnect()}},_r=de(Dr);var js,Xn=(js=navigator.userAgentData)==null?void 0:js.brands.some(s=>s.brand.includes("Chromium")),Zn=Xn?!1:navigator.userAgent.includes("Firefox"),A=class extends m{constructor(){super(...arguments);this.formControlController=new ht(this);this.hasSlotController=new S(this,"help-text","label","left","right","message","placeholder");this.localize=new M(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var t,e;return(e=(t=this.input)==null?void 0:t.valueAsDate)!=null?e:null}set valueAsDate(t){let e=document.createElement("input");e.type="date",e.valueAsDate=t,this.value=e.value}get valueAsNumber(){var t,e;return(e=(t=this.input)==null?void 0:t.valueAsNumber)!=null?e:parseFloat(this.value)}set valueAsNumber(t){let e=document.createElement("input");e.type="number",e.valueAsNumber=t,this.value=e.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(t){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),t.stopPropagation()}handleSearchClick(t){this.emit("sd-search"),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleKeyDown(t){let e=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;t.key==="Enter"&&!e&&setTimeout(()=>{!t.defaultPrevented&&!t.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let t=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=t}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let t=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=t}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,e,r="none"){this.input.setSelectionRange(t,e,r)}setRangeText(t,e,r,a){this.input.setRangeText(t,e,r,a),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var t;return(t=this.input)==null?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,a=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),n=!!t.tooltip,d=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",h=this.size==="sm"?"text-sm":"text-base",p={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[d],f=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",g={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],E={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return u`<div part="form-control" class="${c((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e||n?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c(e?"inline-block":"hidden",h)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${c("absolute w-full h-full pointer-events-none border rounded-default transition-[border] ease-in-out duration-medium hover:duration-fast",p)}"></div><div part="base" class="${c("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",d==="disabled"||d==="visuallyDisabled"?"text-neutral-500":"text-black")}">${t.left?u`<slot name="left" part="left" class="${c("inline-flex",this.size==="sm"?"mr-1":"mr-2",f,E)}"></slot>`:""} <input part="input" id="input" class="${c("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder-neutral-500 cursor-not-allowed":"placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",h)}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${w(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${w(this.placeholder)}" minlength="${w(this.minlength)}" maxlength="${w(this.maxlength)}" min="${w(this.min)}" max="${w(this.max)}" step="${w(this.step)}" .value="${he(this.value)}" autocapitalize="${w(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${w(this.autocomplete)}" autocorrect="${w(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${w(this.pattern)}" enterkeyhint="${w(this.enterkeyhint)}" inputmode="${w(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${a?u`<button part="clear-button" class="${c("flex justify-center",g)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",E)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?u`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="${c("flex items-center sd-interactive",g)}" type="button" @click="${this.handlePasswordToggle}">${this.passwordVisible?u`<slot name="show-password-icon"><sd-icon class="${c(f,E)}" library="system" name="eye"></sd-icon></slot>`:u`<slot name="hide-password-icon"><sd-icon class="${c(f,E)}" library="system" name="eye-crossed-out"></sd-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!Zn?u`<sd-icon class="${c(f,g,E)}" library="system" name="calendar"></sd-icon>`:""} ${this.type==="time"?u`<sd-icon class="${c(f,g,E)}" library="system" name="clock"></sd-icon>`:""} ${this.type==="search"?u`<button class="${c("flex items-center sd-interactive",g)}" type="button" @click="${this.handleSearchClick}"><sd-icon class="${c(f,E)}" library="system" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${c("text-error",g,E)}" library="system" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?u`<sd-icon class="${c("text-success flex-shrink-0",g,E)}" library="system" name="status-check" part="valid-icon"></sd-icon>`:""} ${t.right?u`<slot name="right" part="right" class="${c("inline-flex",f,g,E)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?u`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${_r({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-icon name="system/minus-circle" label="Decrease value" class="${c(f,g,E)}"></sd-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${_r({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-icon name="system/plus-circle" label="Decrease value" class="${c(f,g,E)}"></sd-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};A.styles=[...m.styles,v`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],o([b("#input")],A.prototype,"input",2),o([b("#invalid-message")],A.prototype,"invalidMessage",2),o([$()],A.prototype,"hasFocus",2),o([$()],A.prototype,"showValidStyle",2),o([$()],A.prototype,"showInvalidStyle",2),o([l({type:String,reflect:!0})],A.prototype,"type",2),o([l({type:String,reflect:!0})],A.prototype,"size",2),o([l({type:String,reflect:!0})],A.prototype,"inputmode",2),o([l()],A.prototype,"value",2),o([It()],A.prototype,"defaultValue",2),o([l({type:String,reflect:!0})],A.prototype,"placeholder",2),o([l({type:String,reflect:!0})],A.prototype,"label",2),o([l({type:String,attribute:"help-text",reflect:!0})],A.prototype,"helpText",2),o([l({type:Boolean,reflect:!0})],A.prototype,"clearable",2),o([l({type:Boolean,reflect:!0})],A.prototype,"disabled",2),o([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],A.prototype,"visuallyDisabled",2),o([l({type:Boolean,reflect:!0})],A.prototype,"readonly",2),o([l({attribute:"password-toggle",type:Boolean,reflect:!0})],A.prototype,"passwordToggle",2),o([l({attribute:"password-visible",type:Boolean,reflect:!0})],A.prototype,"passwordVisible",2),o([l({attribute:"spin-buttons",type:Boolean,reflect:!0})],A.prototype,"spinButtons",2),o([l({type:Number,reflect:!0})],A.prototype,"minlength",2),o([l({type:Number,reflect:!0})],A.prototype,"maxlength",2),o([l({reflect:!0})],A.prototype,"min",2),o([l({reflect:!0})],A.prototype,"max",2),o([l({type:String,reflect:!0})],A.prototype,"form",2),o([l({type:String,reflect:!0})],A.prototype,"name",2),o([l({type:String,reflect:!0})],A.prototype,"title",2),o([l({type:Boolean,reflect:!0})],A.prototype,"required",2),o([l()],A.prototype,"pattern",2),o([l({reflect:!0})],A.prototype,"step",2),o([l({type:String,reflect:!0})],A.prototype,"autocapitalize",2),o([l({type:String,reflect:!0})],A.prototype,"autocorrect",2),o([l({reflect:!0})],A.prototype,"autocomplete",2),o([l({type:Boolean,reflect:!0})],A.prototype,"autofocus",2),o([l({type:String,reflect:!0})],A.prototype,"enterkeyhint",2),o([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],A.prototype,"styleOnValid",2),o([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],A.prototype,"spellcheck",2),o([x("disabled",{waitUntilFirstUpdate:!0})],A.prototype,"handleDisabledChange",1),o([x("step",{waitUntilFirstUpdate:!0})],A.prototype,"handleStepChange",1),o([x("value",{waitUntilFirstUpdate:!0})],A.prototype,"handleValueChange",1),A=o([y("sd-input")],A);var wt=class extends m{constructor(){super(...arguments);this.hasSlotController=new S(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href="";this.visuallyDisabled=!1}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(t){this.visuallyDisabled&&(t.preventDefault(),t.stopPropagation())}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){let t={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return u`<a part="base" class="${c("inline",this.href&&!this.visuallyDisabled?"cursor-pointer":"",this.visuallyDisabled?"cursor-not-allowed focus-visible:focus-outline":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline",visuallyDisabled:this.inverted?"text-neutral-600":"text-neutral-500"}[this.href&&!this.visuallyDisabled?"enabled":this.visuallyDisabled?"visuallyDisabled":"disabled"],this.standalone&&"flex items-start")}" href="${w(this.href||void 0)}" target="${w(this.target||void 0)}" download="${w(this.download)}" rel="${w(this.target?"noreferrer noopener":void 0)}" aria-disabled="${!this.href||this.visuallyDisabled?"true":"false"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${c("inline",t["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${c("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};wt.styles=[...m.styles,v`::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],o([b("a")],wt.prototype,"button",2),o([l({type:Boolean,reflect:!0})],wt.prototype,"standalone",2),o([l({type:String,reflect:!0})],wt.prototype,"size",2),o([l({type:Boolean,reflect:!0})],wt.prototype,"inverted",2),o([l({type:String,reflect:!0})],wt.prototype,"href",2),o([l({type:Boolean,attribute:"visually-disabled",reflect:!0})],wt.prototype,"visuallyDisabled",2),o([l({type:String,reflect:!0})],wt.prototype,"target",2),o([l({reflect:!0})],wt.prototype,"download",2),wt=o([y("sd-link")],wt);var $t=class extends m{constructor(){super(...arguments);this.variant="main";this.state="default";this.animated=!1;this.notInteractive=!1;this.href="";this.label="";this.marker={cluster:Ke`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" opacity="1" r="20"/><circle cx="25" cy="25" opacity=".3" r="25"/></svg>`,main:Ke`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z"/><circle cx="30" cy="28" r="10" fill="#fff"/></svg>`,place:Ke`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd"/></svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let t=this.isLink(),e=this.notInteractive?Q`div`:t?Q`a`:Q`button`;return F`<${e} part="base" class="${c("flex justify-center",!this.notInteractive&&"focus:outline focus:outline-2 focus:outline-primary focus:outline-offset-2")}" href="${w(t?this.href:void 0)}" target="${w(t?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${w(this.notInteractive||t?void 0:"button")}" aria-label="${w(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${w(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${c("inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-all duration-200 ease-in-out hover:scale-110 hover:fill-primary-500",this.variant==="main"&&this.state==="hover"&&"fill-accent-550",this.variant==="main"&&this.state==="active"&&"fill-accent-700",this.variant==="main"&&!this.notInteractive&&"hover:fill-accent-550 active:fill-accent-700",this.variant==="place"&&this.state==="default"&&"fill-white",this.variant==="place"&&this.state==="hover"&&"fill-primary-100",this.variant==="place"&&this.state==="active"&&"fill-primary-200",this.variant==="place"&&!this.notInteractive&&"hover:fill-primary-100",{cluster:"fill-primary",main:"fill-accent",place:""}[this.variant])}">${this.marker[this.variant]}</div><div id="content" part="content" class="${c("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${e}>`}};$t.styles=[...m.styles,v`:host{display:block}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem)*var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1));margin-top:calc(var(--sd-spacing-2,.5rem)*-1)}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow:drop-shadow(var(--sd-shadow,0px 1px 3px #515151));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}`],o([l({type:String,reflect:!0})],$t.prototype,"variant",2),o([l({type:String,reflect:!0})],$t.prototype,"state",2),o([l({type:Boolean,reflect:!0})],$t.prototype,"animated",2),o([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],$t.prototype,"notInteractive",2),o([l({type:String,reflect:!0})],$t.prototype,"href",2),o([l({type:String,reflect:!0})],$t.prototype,"target",2),o([l({reflect:!0})],$t.prototype,"label",2),$t=o([y("sd-map-marker")],$t);var rt=class extends m{constructor(){super(...arguments);this.hasSlotController=new S(this,"[default]","description","children");this.localize=new M(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?Q`summary`:this.separated?Q`div`:this.isLink?Q`a`:Q`button`}render(){let t=this.tag,e=this.isLink,r=this.isButton,a=this.isAccordion,n={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},d=this.vertical?"pb-3":"pb-2",h=F`<${t} part="base" class="${c("cursor-pointer relative focus-visible:focus-outline",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",this.current&&"font-bold",a?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px] px-4")}" aria-current="${w(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${w(r?this.disabled:void 0)}" href="${w(e?this.href:void 0)}" target="${w(e?this.target:void 0)}" download="${w(e?this.download:void 0)}" rel="${w(e&&this.target?"noreferrer noopener":void 0)}" role="${e?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:a?this.handleClickSummary:r?this.handleClickButton:void 0}"><div part="current-indicator" class="${c("absolute bg-accent left-0 pointer-events-none",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-[calc(100%-16px)] bottom-0 left-2 group-hover:w-full group-hover:left-0",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${c("relative pt-3 inline-flex justify-between items-center",a?"grow":"w-full",n.description||this.separated?"pb-1":d,this.calculatePaddingX)}">${this.divider&&this.vertical?F`<sd-divider part="divider" class="${c("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?F`<a class="${c("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px]",!n.description&&"py-4")}" href="${w(e?this.href:void 0)}" target="${w(e?this.target:void 0)}" download="${w(e?this.download:void 0)}"><slot part="content" class="inline"></slot></a>`:F`<slot part="content" class="inline"></slot>`} </span>${(this.chevron||n.children)&&this.vertical?this.separated?F`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${c("mr-4 h-6 w-6 transition-all",a||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon></button>`:F`<sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${c("h-6 w-6 ml-2 transition-all",a?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${n.description&&this.vertical?F`<slot name="description" part="description" class="${c("inline-block text-sm text-left text-black",a||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX,d)}"></slot>`:""}</${t}>`;return a?F`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${h}<slot name="children"></slot></details>`:this.separated?F`<div part="details" id="navigation-item-details" class="relative flex flex-col">${h}${this.open?F`<slot name="children"></slot>`:""}</div>`:F`${h}`}};rt.styles=[...m.styles,v`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}[part=current-indicator]{--tw-scale-x:0;--tw-scale-y:0;opacity:var(--sd-opacity-0,0);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:var(--sd-duration-fast,.15s);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([current]) [part=current-indicator]{--tw-scale-x:1;--tw-scale-y:1;opacity:var(--sd-opacity-100,1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}`],o([b('a[part="base"], button[part="base"]')],rt.prototype,"button",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"vertical",2),o([l({type:String,reflect:!0})],rt.prototype,"size",2),o([l({reflect:!0})],rt.prototype,"href",2),o([l({type:String,reflect:!0})],rt.prototype,"target",2),o([l({reflect:!0})],rt.prototype,"download",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"current",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"disabled",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"chevron",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"relaxed",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"divider",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"indented",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"open",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"separated",2),rt=o([y("sd-navigation-item")],rt);var Zi={"top-right":null,"bottom-center":null},Wn=()=>{Object.entries(Zi).forEach(([s])=>{let i=document.querySelector(`#sd-toast-stack--${s}`);if(i){i.setAttribute("role","region"),Zi[s]=i;return}Zi[s]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${s}`,className:`sd-toast-stack sd-toast-stack--${s}`})})};Wn();var pt=class extends m{constructor(){super(...arguments);this.localize=new M(this);this.variant="info";this.open=!1;this.closable=!1;this.duration=1/0;this.durationIndicator=!1;this.toastStack="top-right";this.remainingDuration=this.duration;this.startTime=Date.now()}get stack(){return Zi[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications"))}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.base.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>{this.hide()},this.remainingDuration))}handleCloseClick(){this.hide()}handleKeyDown(t){this.closable&&t.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await j(this.base),this.base.hidden=!1;let{keyframes:t,options:e}=B(this,"notification.show",{dir:this.localize.dir()});await N(this.base,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await j(this.base);let{keyframes:t,options:e}=B(this,"notification.hide",{dir:this.localize.dir()});await N(this.base,t,e),this.base.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}async toast(){return new Promise(t=>{this.stack.parentElement===null&&document.body.append(this.stack),this.stack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{this.stack.removeChild(this),t()},{once:!0})})}render(){return u`<div part="base" class="${c("w-full overflow-hidden flex items-stretch relative m-2 focus-visible:focus-outline")}" id="notification" tabindex="0" role="alert" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><slot name="icon" part="icon" class="${c("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="system" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${c("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 border-neutral-400")}"><slot id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?u`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?u`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${c("absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute border border-neutral-400"></div>`:""}</div>`}};pt.styles=[...m.styles,v`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],o([b('[part~="base"]')],pt.prototype,"base",2),o([b('[part~="close-button"]')],pt.prototype,"close",2),o([l({type:String,reflect:!0})],pt.prototype,"variant",2),o([l({type:Boolean,reflect:!0})],pt.prototype,"open",2),o([l({type:Boolean,reflect:!0})],pt.prototype,"closable",2),o([l({type:Number,reflect:!0})],pt.prototype,"duration",2),o([l({type:Boolean,reflect:!0,attribute:"duration-indicator"})],pt.prototype,"durationIndicator",2),o([l({type:String,reflect:!0,attribute:"toast-stack"})],pt.prototype,"toastStack",2),o([x("open",{waitUntilFirstUpdate:!0})],pt.prototype,"handleOpenChange",1),o([x("duration")],pt.prototype,"handleDurationChange",1),pt=o([y("sd-notification")],pt);I("notification.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});I("notification.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});var nt=class extends m{constructor(){super(...arguments);this.hasSlotController=new S(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.isKeyboardFocus=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var t;return((t=this.textContent)!=null?t:"").trim()}render(){let t={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return u`<div part="base" class="${c("px-4 flex items-center w-full transition-colors duration-fast ease-in-out text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-700 cursor-not-allowed":"cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.isKeyboardFocus?"focus-outline focus-outline-offset":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${c("absolute w-full left-0 top-0 pointer-events-none transition-[height,top] duration-fast ease-in-out border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?u`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${c("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"border-neutral-800")}">${this.selected?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-icon>`:""}</span>`:""} ${t.left?u`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${t.right?u`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};nt.styles=[...m.styles,v`:host{display:block;outline:2px solid transparent!important;outline-offset:2px!important;position:relative;width:100%}.focus-outline-offset{outline-offset:-2px}`],o([b('[part="base"]')],nt.prototype,"defaultSlot",2),o([$()],nt.prototype,"current",2),o([$()],nt.prototype,"selected",2),o([$()],nt.prototype,"hasHover",2),o([$()],nt.prototype,"isKeyboardFocus",2),o([l({type:String,reflect:!0})],nt.prototype,"size",2),o([l({type:Boolean,reflect:!0})],nt.prototype,"checkbox",2),o([l({type:Boolean,reflect:!0})],nt.prototype,"disabled",2),o([l({type:String,reflect:!0})],nt.prototype,"value",2),o([x("disabled")],nt.prototype,"handleDisabledChange",1),o([x("selected")],nt.prototype,"handleSelectedChange",1),o([x("value")],nt.prototype,"handleValueChange",1),nt=o([y("sd-option")],nt);var St=class extends m{constructor(){super(...arguments);this.localize=new M(this);this.disabled=!1;this.label=""}handleDisableOptions(){let{disabled:t}=this;this.defaultSlot.assignedElements().filter(e=>e.tagName.toLowerCase()==="sd-option").forEach(e=>{e.disabled=t})}handleDisabledChange(){this.handleDisableOptions()}render(){let{disabled:t}=this;return F`<div role="${t?"presentation":"group"}" class="${c(this.disabled?"text-neutral-500":"")}" part="base" aria-labelledby="group-label"><sd-divider id="divider" class="pt-2 pb-4" part="divider"></sd-divider><div part="label-container" class="${c(this.disabled?"text-neutral-500":"text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="listbox" part="options" aria-label="${this.localize.term("optionGroup")}"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`}};St.dependencies={"sd-divider":Pt},St.styles=[...m.styles,v`:host{--display-divider:block}#divider{display:var(--display-divider)}`],o([b("slot:not([name])")],St.prototype,"defaultSlot",2),o([l({reflect:!0,type:Boolean})],St.prototype,"disabled",2),o([l({type:String,reflect:!0})],St.prototype,"label",2),o([x("disabled",{waitUntilFirstUpdate:!0})],St.prototype,"handleDisabledChange",1),St=o([y("sd-optgroup")],St);var se=Math.min,Ct=Math.max,yi=Math.round,wi=Math.floor,Kt=s=>({x:s,y:s}),Qn={left:"right",right:"left",bottom:"top",top:"bottom"},Jn={start:"end",end:"start"};function Qi(s,i,t){return Ct(s,se(i,t))}function Pe(s,i){return typeof s=="function"?s(i):s}function pe(s){return s.split("-")[0]}function Be(s){return s.split("-")[1]}function Hr(s){return s==="x"?"y":"x"}function Ji(s){return s==="y"?"height":"width"}function ue(s){return["top","bottom"].includes(pe(s))?"y":"x"}function Gi(s){return Hr(ue(s))}function Ys(s,i,t){t===void 0&&(t=!1);let e=Be(s),r=Gi(s),a=Ji(r),n=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return i.reference[a]>i.floating[a]&&(n=vi(n)),[n,vi(n)]}function Xs(s){let i=vi(s);return[Wi(s),i,Wi(i)]}function Wi(s){return s.replace(/start|end/g,i=>Jn[i])}function Gn(s,i,t){let e=["left","right"],r=["right","left"],a=["top","bottom"],n=["bottom","top"];switch(s){case"top":case"bottom":return t?i?r:e:i?e:r;case"left":case"right":return i?a:n;default:return[]}}function Zs(s,i,t,e){let r=Be(s),a=Gn(pe(s),t==="start",e);return r&&(a=a.map(n=>n+"-"+r),i&&(a=a.concat(a.map(Wi)))),a}function vi(s){return s.replace(/left|right|bottom|top/g,i=>Qn[i])}function tl(s){return H({top:0,right:0,bottom:0,left:0},s)}function Ir(s){return typeof s!="number"?tl(s):{top:s,right:s,bottom:s,left:s}}function Fe(s){let{x:i,y:t,width:e,height:r}=s;return{width:e,height:r,top:t,left:i,right:i+e,bottom:t+r,x:i,y:t}}function Ws(s,i,t){let{reference:e,floating:r}=s,a=ue(i),n=Gi(i),d=Ji(n),h=pe(i),p=a==="y",f=e.x+e.width/2-r.width/2,g=e.y+e.height/2-r.height/2,E=e[d]/2-r[d]/2,k;switch(h){case"top":k={x:f,y:e.y-r.height};break;case"bottom":k={x:f,y:e.y+e.height};break;case"right":k={x:e.x+e.width,y:g};break;case"left":k={x:e.x-r.width,y:g};break;default:k={x:e.x,y:e.y}}switch(Be(i)){case"start":k[n]-=E*(t&&p?-1:1);break;case"end":k[n]+=E*(t&&p?-1:1);break}return k}var Qs=async(s,i,t)=>{let{placement:e="bottom",strategy:r="absolute",middleware:a=[],platform:n}=t,d=a.filter(Boolean),h=await(n.isRTL==null?void 0:n.isRTL(i)),p=await n.getElementRects({reference:s,floating:i,strategy:r}),{x:f,y:g}=Ws(p,e,h),E=e,k={},C=0;for(let L=0;L<d.length;L++){let{name:O,fn:_}=d[L],{x:P,y:V,data:W,reset:Z}=await _({x:f,y:g,initialPlacement:e,placement:E,strategy:r,middlewareData:k,rects:p,platform:n,elements:{reference:s,floating:i}});f=P!=null?P:f,g=V!=null?V:g,k=lt(H({},k),{[O]:H(H({},k[O]),W)}),Z&&C<=50&&(C++,typeof Z=="object"&&(Z.placement&&(E=Z.placement),Z.rects&&(p=Z.rects===!0?await n.getElementRects({reference:s,floating:i,strategy:r}):Z.rects),{x:f,y:g}=Ws(p,E,h)),L=-1)}return{x:f,y:g,placement:E,strategy:r,middlewareData:k}};async function tr(s,i){var t;i===void 0&&(i={});let{x:e,y:r,platform:a,rects:n,elements:d,strategy:h}=s,{boundary:p="clippingAncestors",rootBoundary:f="viewport",elementContext:g="floating",altBoundary:E=!1,padding:k=0}=Pe(i,s),C=Ir(k),O=d[E?g==="floating"?"reference":"floating":g],_=Fe(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(O)))==null||t?O:O.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(d.floating)),boundary:p,rootBoundary:f,strategy:h})),P=g==="floating"?{x:e,y:r,width:n.floating.width,height:n.floating.height}:n.reference,V=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d.floating)),W=await(a.isElement==null?void 0:a.isElement(V))?await(a.getScale==null?void 0:a.getScale(V))||{x:1,y:1}:{x:1,y:1},Z=Fe(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:P,offsetParent:V,strategy:h}):P);return{top:(_.top-Z.top+C.top)/W.y,bottom:(Z.bottom-_.bottom+C.bottom)/W.y,left:(_.left-Z.left+C.left)/W.x,right:(Z.right-_.right+C.right)/W.x}}var Js=s=>({name:"arrow",options:s,async fn(i){let{x:t,y:e,placement:r,rects:a,platform:n,elements:d,middlewareData:h}=i,{element:p,padding:f=0}=Pe(s,i)||{};if(p==null)return{};let g=Ir(f),E={x:t,y:e},k=Gi(r),C=Ji(k),L=await n.getDimensions(p),O=k==="y",_=O?"top":"left",P=O?"bottom":"right",V=O?"clientHeight":"clientWidth",W=a.reference[C]+a.reference[k]-E[k]-a.floating[C],Z=E[k]-a.reference[k],Rt=await(n.getOffsetParent==null?void 0:n.getOffsetParent(p)),bt=Rt?Rt[V]:0;(!bt||!await(n.isElement==null?void 0:n.isElement(Rt)))&&(bt=d.floating[V]||a.floating[C]);let ae=W/2-Z/2,Qt=bt/2-L[C]/2-1,_t=se(g[_],Qt),ge=se(g[P],Qt),Jt=_t,be=bt-L[C]-ge,At=bt/2-L[C]/2+ae,Ne=Qi(Jt,At,be),Ut=!h.arrow&&Be(r)!=null&&At!==Ne&&a.reference[C]/2-(At<Jt?_t:ge)-L[C]/2<0,Ce=Ut?At<Jt?At-Jt:At-be:0;return{[k]:E[k]+Ce,data:H({[k]:Ne,centerOffset:At-Ne-Ce},Ut&&{alignmentOffset:Ce}),reset:Ut}}});var Gs=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(i){var t,e;let{placement:r,middlewareData:a,rects:n,initialPlacement:d,platform:h,elements:p}=i,Ne=Pe(s,i),{mainAxis:f=!0,crossAxis:g=!0,fallbackPlacements:E,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:L=!0}=Ne,O=Ci(Ne,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let _=pe(r),P=ue(d),V=pe(d)===d,W=await(h.isRTL==null?void 0:h.isRTL(p.floating)),Z=E||(V||!L?[vi(d)]:Xs(d)),Rt=C!=="none";!E&&Rt&&Z.push(...Zs(d,L,C,W));let bt=[d,...Z],ae=await tr(i,O),Qt=[],_t=((e=a.flip)==null?void 0:e.overflows)||[];if(f&&Qt.push(ae[_]),g){let Ut=Ys(r,n,W);Qt.push(ae[Ut[0]],ae[Ut[1]])}if(_t=[..._t,{placement:r,overflows:Qt}],!Qt.every(Ut=>Ut<=0)){var ge,Jt;let Ut=(((ge=a.flip)==null?void 0:ge.index)||0)+1,Ce=bt[Ut];if(Ce){var be;let ve=g==="alignment"?P!==ue(Ce):!1,Gt=((be=_t[0])==null?void 0:be.overflows[0])>0;if(!ve||Gt)return{data:{index:Ut,overflows:_t},reset:{placement:Ce}}}let Ge=(Jt=_t.filter(ve=>ve.overflows[0]<=0).sort((ve,Gt)=>ve.overflows[1]-Gt.overflows[1])[0])==null?void 0:Jt.placement;if(!Ge)switch(k){case"bestFit":{var At;let ve=(At=_t.filter(Gt=>{if(Rt){let ye=ue(Gt.placement);return ye===P||ye==="y"}return!0}).map(Gt=>[Gt.placement,Gt.overflows.filter(ye=>ye>0).reduce((ye,Eo)=>ye+Eo,0)]).sort((Gt,ye)=>Gt[1]-ye[1])[0])==null?void 0:At[0];ve&&(Ge=ve);break}case"initialPlacement":Ge=d;break}if(r!==Ge)return{reset:{placement:Ge}}}return{}}}};async function el(s,i){let{placement:t,platform:e,elements:r}=s,a=await(e.isRTL==null?void 0:e.isRTL(r.floating)),n=pe(t),d=Be(t),h=ue(t)==="y",p=["left","top"].includes(n)?-1:1,f=a&&h?-1:1,g=Pe(i,s),{mainAxis:E,crossAxis:k,alignmentAxis:C}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return d&&typeof C=="number"&&(k=d==="end"?C*-1:C),h?{x:k*f,y:E*p}:{x:E*p,y:k*f}}var to=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(i){var t,e;let{x:r,y:a,placement:n,middlewareData:d}=i,h=await el(i,s);return n===((t=d.offset)==null?void 0:t.placement)&&(e=d.arrow)!=null&&e.alignmentOffset?{}:{x:r+h.x,y:a+h.y,data:lt(H({},h),{placement:n})}}}},eo=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(i){let{x:t,y:e,placement:r}=i,O=Pe(s,i),{mainAxis:a=!0,crossAxis:n=!1,limiter:d={fn:_=>{let{x:P,y:V}=_;return{x:P,y:V}}}}=O,h=Ci(O,["mainAxis","crossAxis","limiter"]),p={x:t,y:e},f=await tr(i,h),g=ue(pe(r)),E=Hr(g),k=p[E],C=p[g];if(a){let _=E==="y"?"top":"left",P=E==="y"?"bottom":"right",V=k+f[_],W=k-f[P];k=Qi(V,k,W)}if(n){let _=g==="y"?"top":"left",P=g==="y"?"bottom":"right",V=C+f[_],W=C-f[P];C=Qi(V,C,W)}let L=d.fn(lt(H({},i),{[E]:k,[g]:C}));return lt(H({},L),{data:{x:L.x-t,y:L.y-e,enabled:{[E]:a,[g]:n}}})}}};var io=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(i){var t,e;let{placement:r,rects:a,platform:n,elements:d}=i,_t=Pe(s,i),{apply:h=()=>{}}=_t,p=Ci(_t,["apply"]),f=await tr(i,p),g=pe(r),E=Be(r),k=ue(r)==="y",{width:C,height:L}=a.floating,O,_;g==="top"||g==="bottom"?(O=g,_=E===(await(n.isRTL==null?void 0:n.isRTL(d.floating))?"start":"end")?"left":"right"):(_=g,O=E==="end"?"top":"bottom");let P=L-f.top-f.bottom,V=C-f.left-f.right,W=se(L-f[O],P),Z=se(C-f[_],V),Rt=!i.middlewareData.shift,bt=W,ae=Z;if((t=i.middlewareData.shift)!=null&&t.enabled.x&&(ae=V),(e=i.middlewareData.shift)!=null&&e.enabled.y&&(bt=P),Rt&&!E){let ge=Ct(f.left,0),Jt=Ct(f.right,0),be=Ct(f.top,0),At=Ct(f.bottom,0);k?ae=C-2*(ge!==0||Jt!==0?ge+Jt:Ct(f.left,f.right)):bt=L-2*(be!==0||At!==0?be+At:Ct(f.top,f.bottom))}await h(lt(H({},i),{availableWidth:ae,availableHeight:bt}));let Qt=await n.getDimensions(d.floating);return C!==Qt.width||L!==Qt.height?{reset:{rects:!0}}:{}}}};function er(){return typeof window!="undefined"}function Ve(s){return so(s)?(s.nodeName||"").toLowerCase():"#document"}function Lt(s){var i;return(s==null||(i=s.ownerDocument)==null?void 0:i.defaultView)||window}function jt(s){var i;return(i=(so(s)?s.ownerDocument:s.document)||window.document)==null?void 0:i.documentElement}function so(s){return er()?s instanceof Node||s instanceof Lt(s).Node:!1}function Ft(s){return er()?s instanceof Element||s instanceof Lt(s).Element:!1}function Yt(s){return er()?s instanceof HTMLElement||s instanceof Lt(s).HTMLElement:!1}function ro(s){return!er()||typeof ShadowRoot=="undefined"?!1:s instanceof ShadowRoot||s instanceof Lt(s).ShadowRoot}function Qe(s){let{overflow:i,overflowX:t,overflowY:e,display:r}=Vt(s);return/auto|scroll|overlay|hidden|clip/.test(i+e+t)&&!["inline","contents"].includes(r)}function oo(s){return["table","td","th"].includes(Ve(s))}function xi(s){return[":popover-open",":modal"].some(i=>{try{return s.matches(i)}catch(t){return!1}})}function ir(s){let i=rr(),t=Ft(s)?Vt(s):s;return["transform","translate","scale","rotate","perspective"].some(e=>t[e]?t[e]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!i&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!i&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(e=>(t.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(t.contain||"").includes(e))}function ao(s){let i=me(s);for(;Yt(i)&&!Re(i);){if(ir(i))return i;if(xi(i))return null;i=me(i)}return null}function rr(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Re(s){return["html","body","#document"].includes(Ve(s))}function Vt(s){return Lt(s).getComputedStyle(s)}function ki(s){return Ft(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function me(s){if(Ve(s)==="html")return s;let i=s.assignedSlot||s.parentNode||ro(s)&&s.host||jt(s);return ro(i)?i.host:i}function no(s){let i=me(s);return Re(i)?s.ownerDocument?s.ownerDocument.body:s.body:Yt(i)&&Qe(i)?i:no(i)}function We(s,i,t){var e;i===void 0&&(i=[]),t===void 0&&(t=!0);let r=no(s),a=r===((e=s.ownerDocument)==null?void 0:e.body),n=Lt(r);if(a){let d=sr(n);return i.concat(n,n.visualViewport||[],Qe(r)?r:[],d&&t?We(d):[])}return i.concat(r,We(r,[],t))}function sr(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function ho(s){let i=Vt(s),t=parseFloat(i.width)||0,e=parseFloat(i.height)||0,r=Yt(s),a=r?s.offsetWidth:t,n=r?s.offsetHeight:e,d=yi(t)!==a||yi(e)!==n;return d&&(t=a,e=n),{width:t,height:e,$:d}}function Br(s){return Ft(s)?s:s.contextElement}function Je(s){let i=Br(s);if(!Yt(i))return Kt(1);let t=i.getBoundingClientRect(),{width:e,height:r,$:a}=ho(i),n=(a?yi(t.width):t.width)/e,d=(a?yi(t.height):t.height)/r;return(!n||!Number.isFinite(n))&&(n=1),(!d||!Number.isFinite(d))&&(d=1),{x:n,y:d}}var il=Kt(0);function po(s){let i=Lt(s);return!rr()||!i.visualViewport?il:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function rl(s,i,t){return i===void 0&&(i=!1),!t||i&&t!==Lt(s)?!1:i}function Ue(s,i,t,e){i===void 0&&(i=!1),t===void 0&&(t=!1);let r=s.getBoundingClientRect(),a=Br(s),n=Kt(1);i&&(e?Ft(e)&&(n=Je(e)):n=Je(s));let d=rl(a,t,e)?po(a):Kt(0),h=(r.left+d.x)/n.x,p=(r.top+d.y)/n.y,f=r.width/n.x,g=r.height/n.y;if(a){let E=Lt(a),k=e&&Ft(e)?Lt(e):e,C=E,L=sr(C);for(;L&&e&&k!==C;){let O=Je(L),_=L.getBoundingClientRect(),P=Vt(L),V=_.left+(L.clientLeft+parseFloat(P.paddingLeft))*O.x,W=_.top+(L.clientTop+parseFloat(P.paddingTop))*O.y;h*=O.x,p*=O.y,f*=O.x,g*=O.y,h+=V,p+=W,C=Lt(L),L=sr(C)}}return Fe({width:f,height:g,x:h,y:p})}function Fr(s,i){let t=ki(s).scrollLeft;return i?i.left+t:Ue(jt(s)).left+t}function uo(s,i,t){t===void 0&&(t=!1);let e=s.getBoundingClientRect(),r=e.left+i.scrollLeft-(t?0:Fr(s,e)),a=e.top+i.scrollTop;return{x:r,y:a}}function sl(s){let{elements:i,rect:t,offsetParent:e,strategy:r}=s,a=r==="fixed",n=jt(e),d=i?xi(i.floating):!1;if(e===n||d&&a)return t;let h={scrollLeft:0,scrollTop:0},p=Kt(1),f=Kt(0),g=Yt(e);if((g||!g&&!a)&&((Ve(e)!=="body"||Qe(n))&&(h=ki(e)),Yt(e))){let k=Ue(e);p=Je(e),f.x=k.x+e.clientLeft,f.y=k.y+e.clientTop}let E=n&&!g&&!a?uo(n,h,!0):Kt(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-h.scrollLeft*p.x+f.x+E.x,y:t.y*p.y-h.scrollTop*p.y+f.y+E.y}}function ol(s){return Array.from(s.getClientRects())}function al(s){let i=jt(s),t=ki(s),e=s.ownerDocument.body,r=Ct(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),a=Ct(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),n=-t.scrollLeft+Fr(s),d=-t.scrollTop;return Vt(e).direction==="rtl"&&(n+=Ct(i.clientWidth,e.clientWidth)-r),{width:r,height:a,x:n,y:d}}function nl(s,i){let t=Lt(s),e=jt(s),r=t.visualViewport,a=e.clientWidth,n=e.clientHeight,d=0,h=0;if(r){a=r.width,n=r.height;let p=rr();(!p||p&&i==="fixed")&&(d=r.offsetLeft,h=r.offsetTop)}return{width:a,height:n,x:d,y:h}}function ll(s,i){let t=Ue(s,!0,i==="fixed"),e=t.top+s.clientTop,r=t.left+s.clientLeft,a=Yt(s)?Je(s):Kt(1),n=s.clientWidth*a.x,d=s.clientHeight*a.y,h=r*a.x,p=e*a.y;return{width:n,height:d,x:h,y:p}}function lo(s,i,t){let e;if(i==="viewport")e=nl(s,t);else if(i==="document")e=al(jt(s));else if(Ft(i))e=ll(i,t);else{let r=po(s);e={x:i.x-r.x,y:i.y-r.y,width:i.width,height:i.height}}return Fe(e)}function mo(s,i){let t=me(s);return t===i||!Ft(t)||Re(t)?!1:Vt(t).position==="fixed"||mo(t,i)}function dl(s,i){let t=i.get(s);if(t)return t;let e=We(s,[],!1).filter(d=>Ft(d)&&Ve(d)!=="body"),r=null,a=Vt(s).position==="fixed",n=a?me(s):s;for(;Ft(n)&&!Re(n);){let d=Vt(n),h=ir(n);!h&&d.position==="fixed"&&(r=null),(a?!h&&!r:!h&&d.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Qe(n)&&!h&&mo(s,n))?e=e.filter(f=>f!==n):r=d,n=me(n)}return i.set(s,e),e}function cl(s){let{element:i,boundary:t,rootBoundary:e,strategy:r}=s,n=[...t==="clippingAncestors"?xi(i)?[]:dl(i,this._c):[].concat(t),e],d=n[0],h=n.reduce((p,f)=>{let g=lo(i,f,r);return p.top=Ct(g.top,p.top),p.right=se(g.right,p.right),p.bottom=se(g.bottom,p.bottom),p.left=Ct(g.left,p.left),p},lo(i,d,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function hl(s){let{width:i,height:t}=ho(s);return{width:i,height:t}}function pl(s,i,t){let e=Yt(i),r=jt(i),a=t==="fixed",n=Ue(s,!0,a,i),d={scrollLeft:0,scrollTop:0},h=Kt(0);function p(){h.x=Fr(r)}if(e||!e&&!a)if((Ve(i)!=="body"||Qe(r))&&(d=ki(i)),e){let k=Ue(i,!0,a,i);h.x=k.x+i.clientLeft,h.y=k.y+i.clientTop}else r&&p();a&&!e&&r&&p();let f=r&&!e&&!a?uo(r,d):Kt(0),g=n.left+d.scrollLeft-h.x-f.x,E=n.top+d.scrollTop-h.y-f.y;return{x:g,y:E,width:n.width,height:n.height}}function Pr(s){return Vt(s).position==="static"}function co(s,i){if(!Yt(s)||Vt(s).position==="fixed")return null;if(i)return i(s);let t=s.offsetParent;return jt(s)===t&&(t=t.ownerDocument.body),t}function fo(s,i){let t=Lt(s);if(xi(s))return t;if(!Yt(s)){let r=me(s);for(;r&&!Re(r);){if(Ft(r)&&!Pr(r))return r;r=me(r)}return t}let e=co(s,i);for(;e&&oo(e)&&Pr(e);)e=co(e,i);return e&&Re(e)&&Pr(e)&&!ir(e)?t:e||ao(s)||t}var ul=async function(s){let i=this.getOffsetParent||fo,t=this.getDimensions,e=await t(s.floating);return{reference:pl(s.reference,await i(s.floating),s.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function ml(s){return Vt(s).direction==="rtl"}var fl={convertOffsetParentRelativeRectToViewportRelativeRect:sl,getDocumentElement:jt,getClippingRect:cl,getOffsetParent:fo,getElementRects:ul,getClientRects:ol,getDimensions:hl,getScale:Je,isElement:Ft,isRTL:ml};function go(s,i){return s.x===i.x&&s.y===i.y&&s.width===i.width&&s.height===i.height}function gl(s,i){let t=null,e,r=jt(s);function a(){var d;clearTimeout(e),(d=t)==null||d.disconnect(),t=null}function n(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),a();let p=s.getBoundingClientRect(),{left:f,top:g,width:E,height:k}=p;if(d||i(),!E||!k)return;let C=wi(g),L=wi(r.clientWidth-(f+E)),O=wi(r.clientHeight-(g+k)),_=wi(f),V={rootMargin:-C+"px "+-L+"px "+-O+"px "+-_+"px",threshold:Ct(0,se(1,h))||1},W=!0;function Z(Rt){let bt=Rt[0].intersectionRatio;if(bt!==h){if(!W)return n();bt?n(!1,bt):e=setTimeout(()=>{n(!1,1e-7)},1e3)}bt===1&&!go(p,s.getBoundingClientRect())&&n(),W=!1}try{t=new IntersectionObserver(Z,lt(H({},V),{root:r.ownerDocument}))}catch(Rt){t=new IntersectionObserver(Z,V)}t.observe(s)}return n(!0),a}function bo(s,i,t,e){e===void 0&&(e={});let{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:n=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=e,p=Br(s),f=r||a?[...p?We(p):[],...We(i)]:[];f.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});let g=p&&d?gl(p,t):null,E=-1,k=null;n&&(k=new ResizeObserver(_=>{let[P]=_;P&&P.target===p&&k&&(k.unobserve(i),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var V;(V=k)==null||V.observe(i)})),t()}),p&&!h&&k.observe(p),k.observe(i));let C,L=h?Ue(s):null;h&&O();function O(){let _=Ue(s);L&&!go(L,_)&&t(),L=_,C=requestAnimationFrame(O)}return t(),()=>{var _;f.forEach(P=>{r&&P.removeEventListener("scroll",t),a&&P.removeEventListener("resize",t)}),g==null||g(),(_=k)==null||_.disconnect(),k=null,h&&cancelAnimationFrame(C)}}var vo=to;var yo=eo,wo=Gs,Vr=io;var xo=Js;var ko=(s,i,t)=>{let e=new Map,r=H({platform:fl},t),a=lt(H({},r.platform),{_c:e});return Qs(s,i,lt(H({},r),{platform:a}))};var U=class extends m{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(e=>this.handleCurrentPlacementChange(e));let t={attributes:!0};this.mutationObserver.observe(this,t)}handleCurrentPlacementChange(t){return t.forEach(e=>{if(e.attributeName==="data-current-placement"){let r=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:r})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=bo(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[vo({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Vr({apply:({rects:e})=>{let r=this.sync==="width"||this.sync==="both",a=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${e.reference.width}px`:"",this.popup.style.height=a?`${e.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(wo({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(yo({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Vr({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:e,availableHeight:r})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${r}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${e}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(xo({element:this.arrowEl,padding:this.arrowPadding})),ko(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then(({x:e,y:r,middlewareData:a,placement:n})=>{let d=getComputedStyle(this).direction==="rtl",h={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),Object.assign(this.popup.style,{left:`${e}px`,top:`${r}px`}),this.arrow){let p=a.arrow.x,f=a.arrow.y,g="",E="",k="",C="";if(this.arrowPlacement==="start"){let L=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";g=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",E=d?L:"",C=d?"":L}else if(this.arrowPlacement==="end"){let L=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";E=d?"":L,C=d?L:"",k=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(C=typeof p=="number"?"calc(50% - var(--arrow-size-diagonal))":"",g=typeof f=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(C=typeof p=="number"?`${p}px`:"",g=typeof f=="number"?`${f}px`:"");Object.assign(this.arrowEl.style,{top:g,right:E,bottom:k,left:C,[h]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return u`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${c("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?u`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};U.styles=[...m.styles,v`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],o([b('[part="popup"]')],U.prototype,"popup",2),o([b('[part="arrow"]')],U.prototype,"arrowEl",2),o([l({reflect:!0})],U.prototype,"anchor",2),o([l({type:Boolean,reflect:!0})],U.prototype,"active",2),o([l({type:String,reflect:!0})],U.prototype,"placement",2),o([l({type:String,reflect:!0})],U.prototype,"strategy",2),o([l({type:Number,reflect:!0})],U.prototype,"distance",2),o([l({type:Number,reflect:!0})],U.prototype,"skidding",2),o([l({type:Boolean,reflect:!0})],U.prototype,"arrow",2),o([l({type:String,attribute:"arrow-placement",reflect:!0})],U.prototype,"arrowPlacement",2),o([l({attribute:"arrow-padding",type:Number,reflect:!0})],U.prototype,"arrowPadding",2),o([l({type:Boolean,reflect:!0})],U.prototype,"flip",2),o([l({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(e=>e.trim()).filter(e=>e!==""),toAttribute:t=>t.join(" ")}})],U.prototype,"flipFallbackPlacements",2),o([l({type:String,attribute:"flip-fallback-strategy"})],U.prototype,"flipFallbackStrategy",2),o([l({type:Object})],U.prototype,"flipBoundary",2),o([l({attribute:"flip-padding",type:Number})],U.prototype,"flipPadding",2),o([l({type:Boolean})],U.prototype,"shift",2),o([l({type:Object})],U.prototype,"shiftBoundary",2),o([l({attribute:"shift-padding",type:Number})],U.prototype,"shiftPadding",2),o([l({type:String,attribute:"auto-size"})],U.prototype,"autoSize",2),o([l()],U.prototype,"sync",2),o([l({type:Object})],U.prototype,"autoSizeBoundary",2),o([l({attribute:"auto-size-padding",type:Number})],U.prototype,"autoSizePadding",2),U=o([y("sd-popup")],U);var fe=class extends ut{constructor(){super(...arguments);this.expandable=!1}render(){let t=this.expandable?Q`details`:Q`div`,e=this.expandable?Q`summary`:Q`div`;return F`
121
+ "><div part="combobox" class="${c("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?u`<slot part="left" name="left" class="${c("inline-flex",E,f,k)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?u`<div part="tags" class="${c("flex items-center gap-1",E)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${c("appearance-none outline-none bg-transparent flex-auto min-w-0",p,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder")}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(C=>C==null?void 0:C.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",p)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${d?u`<button part="clear-button" class="${c("flex justify-center",g,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",k)}" name="closing-round" library="system"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${c(g,k,"text-error")}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",g,k)}" library="system" name="status-check"></sd-icon>`:""}<slot name="right" part="right" class="${c("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",k)}">${this.type!=="search"?u`<sd-icon class="${c("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="system" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?u`<button class="${c("flex items-center sd-interactive",g)}" type="button"><sd-icon class="${c(f,k)}" library="system" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:u`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${w(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?u`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700 mt-2" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};T.styles=[...m.styles,v`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{height:var(--sd-spacing-4,1rem);right:var(--sd-spacing-4,1rem);width:var(--sd-spacing-4,1rem)}:host([size=md]) .combobox-button{height:var(--sd-spacing-6,1.5rem);right:.85rem;width:var(--sd-spacing-6,1.5rem)}:host([size=lg]) .combobox-button{height:var(--sd-spacing-8,2rem);right:var(--sd-spacing-3,.75rem);width:var(--sd-spacing-8,2rem)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],o([b("sd-popup")],T.prototype,"popup",2),o([b('[part="combobox"]')],T.prototype,"combobox",2),o([b('[part="display-input"]')],T.prototype,"displayInput",2),o([b(".value-input")],T.prototype,"valueInput",2),o([b('[part="listbox"]')],T.prototype,"listbox",2),o([b('[part="tags"]')],T.prototype,"tagWrapper",2),o([b('[part="filtered-listbox"]')],T.prototype,"filteredWrapper",2),o([b("slot:not([name])")],T.prototype,"defaultSlot",2),o([b("#invalid-message")],T.prototype,"invalidMessage",2),o([$()],T.prototype,"hasFocus",2),o([$()],T.prototype,"displayInputValue",2),o([$()],T.prototype,"selectedTextLabel",2),o([$()],T.prototype,"selectedOptions",2),o([$()],T.prototype,"filteredOptions",2),o([$()],T.prototype,"allOptions",2),o([$()],T.prototype,"lastOption",2),o([$()],T.prototype,"showValidStyle",2),o([$()],T.prototype,"showInvalidStyle",2),o([$()],T.prototype,"deletedTagLabel",2),o([l({reflect:!0})],T.prototype,"name",2),o([l({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],T.prototype,"value",2),o([It()],T.prototype,"defaultValue",2),o([l({type:String,reflect:!0})],T.prototype,"size",2),o([l({type:String,reflect:!0})],T.prototype,"placeholder",2),o([l({type:String,attribute:"max-options-tag-label",reflect:!0})],T.prototype,"maxOptionsTagLabel",2),o([l({type:Boolean,reflect:!0})],T.prototype,"disabled",2),o([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],T.prototype,"visuallyDisabled",2),o([l({type:Boolean,reflect:!0})],T.prototype,"clearable",2),o([l({type:Boolean,reflect:!0})],T.prototype,"open",2),o([l({type:Boolean,reflect:!0})],T.prototype,"hoist",2),o([l({type:String,reflect:!0})],T.prototype,"label",2),o([l({type:String,reflect:!0})],T.prototype,"placement",2),o([l({type:String,attribute:"help-text",reflect:!0})],T.prototype,"helpText",2),o([l({type:String,reflect:!0})],T.prototype,"form",2),o([l({type:Boolean,reflect:!0})],T.prototype,"required",2),o([l({type:String,reflect:!0})],T.prototype,"type",2),o([$()],T.prototype,"currentPlacement",2),o([l()],T.prototype,"getOption",2),o([l({type:Boolean,reflect:!0})],T.prototype,"multiple",2),o([l({type:Boolean,reflect:!0})],T.prototype,"useTags",2),o([l({type:Number,reflect:!0,attribute:"max-options-visible"})],T.prototype,"maxOptionsVisible",2),o([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],T.prototype,"styleOnValid",2),o([l()],T.prototype,"filter",2),o([l()],T.prototype,"getTag",2),o([x("filter",{waitUntilFirstUpdate:!0})],T.prototype,"handleFilterChange",1),o([x("useTags",{waitUntilFirstUpdate:!0})],T.prototype,"handleUseTagsChange",1),o([x("size",{waitUntilFirstUpdate:!0})],T.prototype,"applySizeToOptions",1),o([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],T.prototype,"handleDisabledChange",1),o([x("value",{waitUntilFirstUpdate:!0})],T.prototype,"handleValueChange",1),o([x("displayInputValue",{waitUntilFirstUpdate:!0})],T.prototype,"handleDisplayInputValueChange",1),o([x("open",{waitUntilFirstUpdate:!0})],T.prototype,"handleOpenChange",1),T=o([y("sd-combobox")],T);I("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});I("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});function fi(s=document.activeElement){if(s!=null&&s.shadowRoot){let i=s.shadowRoot.activeElement;if(i)return fi(i)}return s}function qs(s){let i=s.tagName.toLowerCase();return s.getAttribute("tabindex")==="-1"||s.hasAttribute("disabled")||s.hasAttribute("aria-disabled")&&s.getAttribute("aria-disabled")!=="false"||i==="input"&&s.getAttribute("type")==="radio"&&!s.hasAttribute("checked")||s.offsetParent===null&&!(s.getRootNode()instanceof ShadowRoot)||window.getComputedStyle(s).visibility==="hidden"?!1:(i==="audio"||i==="video")&&s.hasAttribute("controls")||s.hasAttribute("tabindex")||s.hasAttribute("contenteditable")&&s.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(i)}function ji(s){var a,n;let i=[];function t(d){d instanceof HTMLElement&&(i.push(d),d.shadowRoot!==null&&d.shadowRoot.mode==="open"&&t(d.shadowRoot)),[...d.children].forEach(h=>t(h))}t(s);let e=(a=i.find(d=>qs(d)))!=null?a:null,r=(n=i.reverse().find(d=>qs(d)))!=null?n:null;return{start:e,end:r}}var gi=[],Ie=class{constructor(i){this.tabDirection="forward";this.element=i,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){gi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){gi=gi.filter(i=>i!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return gi[gi.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){let{start:i,end:t}=ji(this.element),e=this.tabDirection==="forward"?i:t;typeof(e==null?void 0:e.focus)=="function"&&e.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(i){i.key==="Tab"&&i.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}};var kt=class extends m{constructor(){super(...arguments);this.hasSlotController=new S(this,"footer");this.localize=new M(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Ie(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),_e(this))}disconnectedCallback(){super.disconnectedCallback(),He(this)}get prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=B(this,"dialog.denyClose",{dir:this.localize.dir()});N(this.panel,r.keyframes,r.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=fi(),this.modal.activate(),_e(this);let t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([j(this.dialog),j(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")});let e=this.prefersReducedMotion?B(this,"dialog.showReducedMotion",{dir:this.localize.dir()}):B(this,"dialog.show",{dir:this.localize.dir()}),r=B(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([N(this.panel,e.keyframes,e.options),N(this.overlay,r.keyframes,r.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([j(this.dialog),j(this.overlay)]);let t=this.prefersReducedMotion?B(this,"dialog.hideReducedMotion",{dir:this.localize.dir()}):B(this,"dialog.hide",{dir:this.localize.dir()}),e=B(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([N(this.overlay,e.keyframes,e.options).then(()=>{this.overlay.hidden=!0}),N(this.panel,t.keyframes,t.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,He(this);let r=this.originalTrigger;typeof(r==null?void 0:r.focus)=="function"&&setTimeout(()=>r.focus()),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}render(){return u`<div part="base" class="${c("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${c("flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted overflow-y-auto",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${w(this.headline?this.headline:void 0)}" aria-labelledby="${w(this.headline?void 0:"title")}" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?u`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>`:u`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":u`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${c("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};kt.styles=[...m.styles,v`:host{--width:662px}[part=panel]{max-height:80vh;width:var(--width)}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=body]{min-height:50px}[part=footer]{width:100%}}`],o([b('[part="base"]')],kt.prototype,"dialog",2),o([b('[part="panel"]')],kt.prototype,"panel",2),o([b('[part="overlay"]')],kt.prototype,"overlay",2),o([l({type:Boolean,reflect:!0})],kt.prototype,"open",2),o([l({type:String,reflect:!0})],kt.prototype,"headline",2),o([l({attribute:"no-close-button",type:Boolean,reflect:!0})],kt.prototype,"noCloseButton",2),o([x("open",{waitUntilFirstUpdate:!0})],kt.prototype,"handleOpenChange",1),kt=o([y("sd-dialog")],kt);I("dialog.show",{keyframes:[{opacity:0,transform:"translate(-50%, 100%)"},{opacity:1,transform:"translate(0, 0)"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});I("dialog.showReducedMotion",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});I("dialog.hide",{keyframes:[{opacity:1,transform:"translate(0, 0)"},{opacity:0,transform:"translate(50%, -100%)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});I("dialog.hideReducedMotion",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});I("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});I("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});I("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});var Pt=class extends m{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return u`<hr part="main" aria-orientation="${this.orientation}" class="${c(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};Pt.styles=[...m.styles,v`:host{margin:var(--sd-spacing-0,0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],o([l({type:String,reflect:!0})],Pt.prototype,"orientation",2),o([l({type:Boolean,reflect:!0})],Pt.prototype,"inverted",2),Pt=o([y("sd-divider")],Pt);function Sr(s){return s.charAt(0).toUpperCase()+s.slice(1)}var dt=class extends m{constructor(){super(...arguments);this.hasSlotController=new S(this,"footer");this.localize=new M(this);this.modal=new Ie(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=t=>{this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),_e(this)))}disconnectedCallback(){super.disconnectedCallback(),He(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=B(this,"drawer.denyClose",{dir:this.localize.dir()});N(this.panel,r.keyframes,r.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var e;let t=(e=this.closeButton.shadowRoot)==null?void 0:e.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=fi(),this.contained||(this.modal.activate(),_e(this));let r=this.querySelector("[autofocus]");r&&r.removeAttribute("autofocus"),await Promise.all([j(this.drawer),j(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(r?r.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),r?r.setAttribute("autofocus",""):this.closeButton.focus()});let a=B(this,`drawer.show${Sr(this.placement)}`,{dir:this.localize.dir()}),n=B(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([N(this.panel,a.keyframes,a.options),N(this.overlay,n.keyframes,n.options)]),t==null||t.setAttribute("aria-controls","drawer"),t==null||t.setAttribute("aria-expanded","true"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),He(this)),await Promise.all([j(this.drawer),j(this.overlay)]);let r=B(this,`drawer.hide${Sr(this.placement)}`,{dir:this.localize.dir()}),a=B(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([N(this.overlay,a.keyframes,a.options).then(()=>{this.overlay.hidden=!0}),N(this.panel,r.keyframes,r.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let n=this.originalTrigger;typeof(n==null?void 0:n.focus)=="function"&&setTimeout(()=>n.focus()),t==null||t.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),_e(this)),this.open&&this.contained&&(this.modal.deactivate(),He(this))}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${c("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${c("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${c("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 right-2"><sd-icon label="${this.localize.term("close")}" name="close" library="system"></sd-icon></sd-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon label="${this.localize.term("close")}" name="close" library="system"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" tabindex="0"><slot></slot></div><footer part="footer" class="${c(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};dt.styles=[...m.styles,v`:host{--width:25rem;display:contents}:host([contained]){z-index:auto}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],o([b("[part=base]")],dt.prototype,"drawer",2),o([b("[part=panel]")],dt.prototype,"panel",2),o([b("[part=overlay]")],dt.prototype,"overlay",2),o([b("[part=close-button]")],dt.prototype,"closeButton",2),o([l({type:Boolean,reflect:!0})],dt.prototype,"open",2),o([l({type:String,attribute:"label",reflect:!0})],dt.prototype,"label",2),o([l({type:String,reflect:!0})],dt.prototype,"placement",2),o([l({type:Boolean,reflect:!0})],dt.prototype,"contained",2),o([l({attribute:"no-header",type:Boolean,reflect:!0})],dt.prototype,"noHeader",2),o([x("open",{waitUntilFirstUpdate:!0})],dt.prototype,"handleOpenChange",1),o([x("contained",{waitUntilFirstUpdate:!0})],dt.prototype,"handleNoModalChange",1),dt=o([y("sd-drawer")],dt);I("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});I("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});I("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});I("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});I("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});I("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});I("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});var et=class extends m{constructor(){super(...arguments);this.localize=new M(this);this.open=!1;this.rounded=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.noAutoSize=!1;this.noFlip=!1;this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}getAccessibleTrigger(){let e=this.trigger.assignedElements({flatten:!0}).find(a=>ji(a).start),r=null;if(e)switch(e.tagName.toLowerCase()){case"sd-button":case"sd-icon-button":r=e.button;break;case"sd-navigation-item":r=e.button;break;default:r=e}return r}updateAccessibleTrigger(){let t=this.getAccessibleTrigger();t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded",this.open?"true":"false"))}focusOnTrigger(){let t=this.getAccessibleTrigger();typeof(t==null?void 0:t.focus)=="function"&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="sd-menu")}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){var e;if(t.key==="Tab"){if(this.open&&((e=document.activeElement)==null?void 0:e.tagName.toLowerCase())==="sd-menu-item"){t.preventDefault(),this.hide(),this.focusOnTrigger();return}setTimeout(()=>{var a,n,d,h,p,f,g,E,k,C,L,O;let r=((p=(h=(d=(n=(a=document.activeElement)==null?void 0:a.shadowRoot)==null?void 0:n.activeElement)==null?void 0:d.shadowRoot)==null?void 0:h.activeElement)==null?void 0:p.getRootNode())instanceof ShadowRoot?(k=(E=(g=(f=document.activeElement)==null?void 0:f.shadowRoot)==null?void 0:g.activeElement)==null?void 0:E.shadowRoot)==null?void 0:k.activeElement:((C=this.containingElement)==null?void 0:C.getRootNode())instanceof ShadowRoot?(O=(L=document.activeElement)==null?void 0:L.shadowRoot)==null?void 0:O.activeElement:document.activeElement;(!this.containingElement||(r==null?void 0:r.closest(this.containingElement.tagName.toLowerCase()))!==this.containingElement)&&this.hide()})}}handleDocumentMouseDown(t){let e=t.composedPath();this.containingElement&&!e.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(t){let e=t.target;qt(e,this.panel)}handlePanelSelect(t){let e=t.target;!this.stayOpenOnSelect&&e.tagName.toLowerCase()==="sd-menu"&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(t){if(t.key==="Escape"&&this.open){t.stopPropagation(),this.focusOnTrigger(),this.hide();return}if([" ","Enter"].includes(t.key)){t.preventDefault(),this.handleTriggerClick();return}let e=this.getMenu();if(e){let r=e.defaultSlot.assignedElements({flatten:!0}),a=r[0],n=r[r.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),r.length>0&&requestAnimationFrame(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(e.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(e.setCurrentItem(n),n.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await j(this),this.panel.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=B(this,"dropdown.show",{dir:this.localize.dir()});await N(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await j(this);let{keyframes:t,options:e}=B(this,"dropdown.hide",{dir:this.localize.dir()});await N(this.popup.popup,t,e),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return u`<sd-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${c("shadow bg-white block",this.open?"pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-popup>`}};et.styles=[...m.styles,v`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],o([b("#dropdown")],et.prototype,"popup",2),o([b("[part=trigger]")],et.prototype,"trigger",2),o([b("[part=panel]")],et.prototype,"panel",2),o([l({type:Boolean,reflect:!0})],et.prototype,"open",2),o([l({type:Boolean,reflect:!0})],et.prototype,"rounded",2),o([l({type:String,reflect:!0})],et.prototype,"placement",2),o([l({type:Boolean,reflect:!0})],et.prototype,"disabled",2),o([l({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],et.prototype,"stayOpenOnSelect",2),o([l({type:Object})],et.prototype,"containingElement",2),o([l({type:Number,reflect:!0})],et.prototype,"distance",2),o([l({type:Number,reflect:!0})],et.prototype,"skidding",2),o([l({type:Boolean,reflect:!0,attribute:"no-auto-size"})],et.prototype,"noAutoSize",2),o([l({type:Boolean,reflect:!0,attribute:"no-flip"})],et.prototype,"noFlip",2),o([l({type:Boolean,reflect:!0})],et.prototype,"hoist",2),o([x("open",{waitUntilFirstUpdate:!0})],et.prototype,"handleOpenChange",1),et=o([y("sd-dropdown")],et);I("dropdown.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});I("dropdown.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Mt=class extends m{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new M(this)}updateMaxHeight(){var e;let t=(e=this.contentPreview)==null?void 0:e.scrollHeight.toString();this.style.setProperty("--max-height-pixel",`${t}px`),this.style.setProperty("--max-height",t)}onToggleClick(){this.updateMaxHeight(),this.open=!this.open}onOpenChange(){this.open?(this.emit("sd-show"),this.updateComplete.then(()=>{this.emit("sd-after-show")})):(this.emit("sd-hide"),this.updateComplete.then(()=>{this.emit("sd-after-hide")})),this.details.setAttribute("open",this.open.toString())}async show(){if(!this.open)return this.onToggleClick(),q(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),q(this,"sd-after-hide")}render(){return u`<div part="base" class="flex flex-col-reverse gap-4"><button part="toggle" class="${c("sd-interactive sd-interactive--reset",this.inverted&&"sd-interactive--inverted",this.inverted?"!focus-visible:focus-outline-inverted":"!focus-visible:focus-outline")}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${c("h-full justify-center w-full text-base flex items-center toggle")}">${this.open?u`<slot name="toggle-open"><sd-icon class="mr-2 text-xl" library="system" name="chevron-up"></sd-icon>${this.localize.term("showLess")}</slot>`:u`<slot name="toggle-closed"><sd-icon class="mr-2 text-xl" library="system" name="chevron-down"></sd-icon>${this.localize.term("showMore")}</slot>`}</div></button><details part="details" ?inert="${w(!this.open)}"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details></div>`}firstUpdated(){this.cloneContentToLightDOM(),this.details.setAttribute("open",this.open.toString())}cloneContentToLightDOM(){let t=document.createElement("div");t.setAttribute("slot","clone"),Array.from(this.childNodes).forEach(r=>{let a=r.cloneNode(!0);t.appendChild(a)}),this.appendChild(t)}};Mt.styles=[...m.styles,v`:host{--gradient-color-start:hsla(0,0%,100%,0);--gradient-color-end:#fff;--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(--gradient-color-start) 0%,var(--gradient-color-end) 80%,var(--gradient-color-end) 100%;display:inline-block;position:relative;width:100%}.toggle::-moz-focus-inner{border-style:none;padding:var(--sd-spacing-0,0)}details>summary::-webkit-details-marker,details[open] summary{display:none}summary{max-block-size:var(--component-expandable-max-block-size)}:host([open]) summary{max-block-size:var(--max-height-pixel,1000vh)}.content{max-block-size:var(--component-expandable-max-block-size)}:host([open]) .content{max-block-size:var(--max-height-pixel,1000vh)}:host(:not([open])) .content:after{background:linear-gradient(180deg,var(--gradient));bottom:var(--sd-spacing-0,0);content:" ";display:block;height:var(--gradient-height);left:var(--sd-spacing-0,0);position:absolute;width:100%}:host([inverted]:not([open])) .content:after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,rgba(0,53,142,0) 0,#00358e 80%,#00358e 100%))}`],o([b(".content-preview")],Mt.prototype,"contentPreview",2),o([b("details")],Mt.prototype,"details",2),o([l({type:Boolean,reflect:!0})],Mt.prototype,"open",2),o([l({type:Boolean,reflect:!0})],Mt.prototype,"inverted",2),o([x("open",{waitUntilFirstUpdate:!0})],Mt.prototype,"onOpenChange",1),Mt=o([y("sd-expandable")],Mt);var Et=class extends m{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary";this.activeSide="front"}connectedCallback(){super.connectedCallback()}flipFront(){this.activeSide="back",this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),setTimeout(()=>{this.back.focus()})}flipBack(){this.activeSide="front",this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),setTimeout(()=>{this.front.focus()})}handleFrontKeydown(t){t.code==="Enter"&&this.front===t.target&&this.flipFront()}handleBackKeydown(t){t.code==="Enter"&&this.back===t.target&&this.flipBack()}render(){return u`<div part="base" class="${c("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${w(this.activeSide==="back"||void 0)}" class="${c("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${c("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${c("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"><slot name="front"></slot></div><div part="front-secondary-gradient" class="${c("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.frontVariant])}"></div><sd-button part="front-button" size="md" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.frontVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.frontVariant]}" class="${c("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-icon library="system" name="reload" label="Flip to Back"></sd-icon></sd-button></div><div part="back" tabindex="0" aria-hidden="${this.activeSide==="front"}" inert="${w(this.activeSide==="front"||void 0)}" class="${c("flip-card__side flip-card__side--back overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.backVariant==="primary"&&"bg-primary",this.backVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-back" class="${c("absolute h-full w-full -z-20",(this.backVariant==="primary"||this.backVariant==="primary-100")&&"hidden")}"><slot name="media-back"></slot></div><div part="back-slot-container" class="${c("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.backVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.backVariant])}"><slot name="back"></slot></div><div part="back-secondary-gradient" class="${c("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.backVariant])}"></div><sd-button size="md" part="back-button" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.backVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.backVariant]}" class="${c("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-icon library="system" name="reload" label="Flip to Front"></sd-icon></sd-button></div></div>`}};Et.styles=[...m.styles,v`:host{aspect-ratio:3/4;display:block;--name:"";--height:480px;height:var(--height)}.flip-card{perspective:100rem}.flip-card__side{backface-visibility:hidden}.flip-card__side--back{transform:rotateY(180deg)}.clicked--front{transform:rotateY(-180deg)}.clicked--back{transform:rotateY(0)}.flip-card__side--back.vertical{transform:rotateX(180deg)}.clicked--front.vertical{transform:rotateX(-180deg)}.clicked--back.vertical{transform:rotateX(0)}.flip-card__gradient{flex:.4 1 0}`],o([b('[part="front"]')],Et.prototype,"front",2),o([b('[part="back"]')],Et.prototype,"back",2),o([l({reflect:!0,attribute:"flip-direction"})],Et.prototype,"flipDirection",2),o([l({reflect:!0})],Et.prototype,"placement",2),o([l({type:String,reflect:!0,attribute:"front-variant"})],Et.prototype,"frontVariant",2),o([l({type:String,reflect:!0,attribute:"back-variant"})],Et.prototype,"backVariant",2),o([$()],Et.prototype,"activeSide",2),Et=o([y("sd-flipcard")],Et);var re=class extends m{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setCalculatedHeightProperty=this.setCalculatedHeightProperty.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this)}firstUpdated(){this.toggleHeightCalculation()}toggleHeightCalculation(){var t;this.fixed?(this.setCalculatedHeightProperty(),this.addResizeObserver()):(this.setCalculatedHeightProperty(),(t=this.resizeObserver)==null||t.disconnect(),this.resizeObserver=void 0)}disconnectedCallback(){super.disconnectedCallback()}updated(t){super.updated(t),t.has("fixed")&&this.toggleHeightCalculation()}onResize(){this.fixed&&this.setCalculatedHeightProperty()}addResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.onResize()}),this.refHeaderElement&&this.resizeObserver.observe(this.refHeaderElement)}setCalculatedHeightProperty(){this.fixed&&this.refHeaderElement?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.refHeaderElement.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return u`<header class="w-full bg-white relative" role="banner" @slotchange="${this.handleSlotChange}"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}handleSlotChange(t){t.target.assignedElements().length>0&&(this.refHeaderElement=t.currentTarget,this.setCalculatedHeightProperty())}};re.styles=[...m.styles,v`:host{display:block}:host([fixed]){left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:"";height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],o([l({reflect:!0,type:Boolean})],re.prototype,"fixed",2),o([Ni(100)],re.prototype,"onResize",1),re=o([y("sd-header")],re);var Bt=class extends m{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(t){let e=document.createElement("script");[...t.attributes].forEach(r=>e.setAttribute(r.name,r.value)),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}async handleSrcChange(){try{let t=this.src,e=await Bi(t,this.mode);if(t!==this.src)return;if(!e.ok){this.emit("sd-error",{detail:{status:e.status}});return}this.innerHTML=e.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(r=>this.executeScript(r)),this.emit("sd-load")}catch(t){this.emit("sd-error",{detail:{status:-1}})}}render(){return u`<slot></slot>`}};Bt.styles=[...m.styles,v`:host{display:block}`],o([l({reflect:!0})],Bt.prototype,"src",2),o([l({type:String,reflect:!0})],Bt.prototype,"mode",2),o([l({attribute:"allow-scripts",type:Boolean,reflect:!0})],Bt.prototype,"allowScripts",2),o([x("src")],Bt.prototype,"handleSrcChange",1),Bt=o([y("sd-include")],Bt);var bi=(s,i)=>{var e;let t=s._$AN;if(t===void 0)return!1;for(let r of t)(e=r._$AO)==null||e.call(r,i,!1),bi(r,i);return!0},Yi=s=>{let i,t;do{if((i=s._$AM)===void 0)break;t=i._$AN,t.delete(s),s=i}while((t==null?void 0:t.size)===0)},Ks=s=>{for(let i;i=s._$AM;s=i){let t=i._$AN;if(t===void 0)i._$AN=t=new Set;else if(t.has(s))break;t.add(s),Yn(i)}};function Kn(s){this._$AN!==void 0?(Yi(this),this._$AM=s,Ks(this)):this._$AM=s}function jn(s,i=!1,t=0){let e=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(i)if(Array.isArray(e))for(let a=t;a<e.length;a++)bi(e[a],!1),Yi(e[a]);else e!=null&&(bi(e,!1),Yi(e));else bi(this,s)}var Yn=s=>{var i,t;s.type==Ot.CHILD&&((i=s._$AP)!=null||(s._$AP=jn),(t=s._$AQ)!=null||(s._$AQ=Kn))},Xi=class extends Ee{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),Ks(this),this.isConnected=i._$AU}_$AO(i,t=!0){var e,r;i!==this.isConnected&&(this.isConnected=i,i?(e=this.reconnected)==null||e.call(this):(r=this.disconnected)==null||r.call(this)),t&&(bi(this,i),Yi(this))}setValue(i){if(qi(this._$Ct))this._$Ct._$AI(i,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=i,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var Dr=class extends Xi{constructor(t){super(t);this.handlePointerDown=t=>{t.button!==0||this.host.disabled||this.spinOnLongPressCallback(t)};this.handlePointerUp=t=>{t==null||t.preventDefault(),t==null||t.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(t.type!==Ot.ELEMENT||!(t.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(t){return Y}update(t,[e]){return this.callbacks===void 0&&this.host===void 0&&(this.host=t.element,this.callbacks=H({},e),this.host.addEventListener("pointerdown",this.handlePointerDown)),vt}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(t){var e;t.preventDefault(),t.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(e=this.observer)==null||e.disconnect(),this.observer=new MutationObserver(r=>{r.forEach(a=>{a.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var t;clearInterval(this.interval),clearTimeout(this.timeout),(t=this.observer)==null||t.disconnect()}},_r=de(Dr);var js,Xn=(js=navigator.userAgentData)==null?void 0:js.brands.some(s=>s.brand.includes("Chromium")),Zn=Xn?!1:navigator.userAgent.includes("Firefox"),A=class extends m{constructor(){super(...arguments);this.formControlController=new ht(this);this.hasSlotController=new S(this,"help-text","label","left","right","message","placeholder");this.localize=new M(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var t,e;return(e=(t=this.input)==null?void 0:t.valueAsDate)!=null?e:null}set valueAsDate(t){let e=document.createElement("input");e.type="date",e.valueAsDate=t,this.value=e.value}get valueAsNumber(){var t,e;return(e=(t=this.input)==null?void 0:t.valueAsNumber)!=null?e:parseFloat(this.value)}set valueAsNumber(t){let e=document.createElement("input");e.type="number",e.valueAsNumber=t,this.value=e.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(t){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),t.stopPropagation()}handleSearchClick(t){this.emit("sd-search"),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleKeyDown(t){let e=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;t.key==="Enter"&&!e&&setTimeout(()=>{!t.defaultPrevented&&!t.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let t=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=t}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let t=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=t}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,e,r="none"){this.input.setSelectionRange(t,e,r)}setRangeText(t,e,r,a){this.input.setRangeText(t,e,r,a),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var t;return(t=this.input)==null?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,a=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),n=!!t.tooltip,d=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",h=this.size==="sm"?"text-sm":"text-base",p={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[d],f=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",g={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],E={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return u`<div part="form-control" class="${c((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e||n?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c(e?"inline-block":"hidden",h)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${c("absolute w-full h-full pointer-events-none border rounded-default transition-[border] ease-in-out duration-medium hover:duration-fast",p)}"></div><div part="base" class="${c("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",d==="disabled"||d==="visuallyDisabled"?"text-neutral-500":"text-black")}">${t.left?u`<slot name="left" part="left" class="${c("inline-flex",this.size==="sm"?"mr-1":"mr-2",f,E)}"></slot>`:""} <input part="input" id="input" class="${c("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder-neutral-500 cursor-not-allowed":"placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",h)}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${w(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${w(this.placeholder)}" minlength="${w(this.minlength)}" maxlength="${w(this.maxlength)}" min="${w(this.min)}" max="${w(this.max)}" step="${w(this.step)}" .value="${he(this.value)}" autocapitalize="${w(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${w(this.autocomplete)}" autocorrect="${w(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${w(this.pattern)}" enterkeyhint="${w(this.enterkeyhint)}" inputmode="${w(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${a?u`<button part="clear-button" class="${c("flex justify-center",g)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",E)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?u`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="${c("flex items-center sd-interactive",g)}" type="button" @click="${this.handlePasswordToggle}">${this.passwordVisible?u`<slot name="show-password-icon"><sd-icon class="${c(f,E)}" library="system" name="eye"></sd-icon></slot>`:u`<slot name="hide-password-icon"><sd-icon class="${c(f,E)}" library="system" name="eye-crossed-out"></sd-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!Zn?u`<sd-icon class="${c(f,g,E)}" library="system" name="calendar"></sd-icon>`:""} ${this.type==="time"?u`<sd-icon class="${c(f,g,E)}" library="system" name="clock"></sd-icon>`:""} ${this.type==="search"?u`<button class="${c("flex items-center sd-interactive",g)}" type="button" @click="${this.handleSearchClick}"><sd-icon class="${c(f,E)}" library="system" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${c("text-error",g,E)}" library="system" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?u`<sd-icon class="${c("text-success flex-shrink-0",g,E)}" library="system" name="status-check" part="valid-icon"></sd-icon>`:""} ${t.right?u`<slot name="right" part="right" class="${c("inline-flex",f,g,E)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?u`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${_r({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-icon name="system/minus-circle" label="Decrease value" class="${c(f,g,E)}"></sd-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${_r({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-icon name="system/plus-circle" label="Decrease value" class="${c(f,g,E)}"></sd-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};A.styles=[...m.styles,v`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],o([b("#input")],A.prototype,"input",2),o([b("#invalid-message")],A.prototype,"invalidMessage",2),o([$()],A.prototype,"hasFocus",2),o([$()],A.prototype,"showValidStyle",2),o([$()],A.prototype,"showInvalidStyle",2),o([l({type:String,reflect:!0})],A.prototype,"type",2),o([l({type:String,reflect:!0})],A.prototype,"size",2),o([l({type:String,reflect:!0})],A.prototype,"inputmode",2),o([l()],A.prototype,"value",2),o([It()],A.prototype,"defaultValue",2),o([l({type:String,reflect:!0})],A.prototype,"placeholder",2),o([l({type:String,reflect:!0})],A.prototype,"label",2),o([l({type:String,attribute:"help-text",reflect:!0})],A.prototype,"helpText",2),o([l({type:Boolean,reflect:!0})],A.prototype,"clearable",2),o([l({type:Boolean,reflect:!0})],A.prototype,"disabled",2),o([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],A.prototype,"visuallyDisabled",2),o([l({type:Boolean,reflect:!0})],A.prototype,"readonly",2),o([l({attribute:"password-toggle",type:Boolean,reflect:!0})],A.prototype,"passwordToggle",2),o([l({attribute:"password-visible",type:Boolean,reflect:!0})],A.prototype,"passwordVisible",2),o([l({attribute:"spin-buttons",type:Boolean,reflect:!0})],A.prototype,"spinButtons",2),o([l({type:Number,reflect:!0})],A.prototype,"minlength",2),o([l({type:Number,reflect:!0})],A.prototype,"maxlength",2),o([l({reflect:!0})],A.prototype,"min",2),o([l({reflect:!0})],A.prototype,"max",2),o([l({type:String,reflect:!0})],A.prototype,"form",2),o([l({type:String,reflect:!0})],A.prototype,"name",2),o([l({type:String,reflect:!0})],A.prototype,"title",2),o([l({type:Boolean,reflect:!0})],A.prototype,"required",2),o([l()],A.prototype,"pattern",2),o([l({reflect:!0})],A.prototype,"step",2),o([l({type:String,reflect:!0})],A.prototype,"autocapitalize",2),o([l({type:String,reflect:!0})],A.prototype,"autocorrect",2),o([l({reflect:!0})],A.prototype,"autocomplete",2),o([l({type:Boolean,reflect:!0})],A.prototype,"autofocus",2),o([l({type:String,reflect:!0})],A.prototype,"enterkeyhint",2),o([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],A.prototype,"styleOnValid",2),o([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],A.prototype,"spellcheck",2),o([x("disabled",{waitUntilFirstUpdate:!0})],A.prototype,"handleDisabledChange",1),o([x("step",{waitUntilFirstUpdate:!0})],A.prototype,"handleStepChange",1),o([x("value",{waitUntilFirstUpdate:!0})],A.prototype,"handleValueChange",1),A=o([y("sd-input")],A);var wt=class extends m{constructor(){super(...arguments);this.hasSlotController=new S(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href="";this.visuallyDisabled=!1}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(t){this.visuallyDisabled&&(t.preventDefault(),t.stopPropagation())}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){let t={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return u`<a part="base" class="${c("inline",this.href&&!this.visuallyDisabled?"cursor-pointer":"",this.visuallyDisabled?"cursor-not-allowed focus-visible:focus-outline":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline",visuallyDisabled:this.inverted?"text-neutral-600":"text-neutral-500"}[this.href&&!this.visuallyDisabled?"enabled":this.visuallyDisabled?"visuallyDisabled":"disabled"],this.standalone&&"flex items-start")}" href="${w(this.href||void 0)}" target="${w(this.target||void 0)}" download="${w(this.download)}" rel="${w(this.target?"noreferrer noopener":void 0)}" aria-disabled="${!this.href||this.visuallyDisabled?"true":"false"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${c("inline",t["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${c("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};wt.styles=[...m.styles,v`::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],o([b("a")],wt.prototype,"button",2),o([l({type:Boolean,reflect:!0})],wt.prototype,"standalone",2),o([l({type:String,reflect:!0})],wt.prototype,"size",2),o([l({type:Boolean,reflect:!0})],wt.prototype,"inverted",2),o([l({type:String,reflect:!0})],wt.prototype,"href",2),o([l({type:Boolean,attribute:"visually-disabled",reflect:!0})],wt.prototype,"visuallyDisabled",2),o([l({type:String,reflect:!0})],wt.prototype,"target",2),o([l({reflect:!0})],wt.prototype,"download",2),wt=o([y("sd-link")],wt);var $t=class extends m{constructor(){super(...arguments);this.variant="main";this.state="default";this.animated=!1;this.notInteractive=!1;this.href="";this.label="";this.marker={cluster:Ke`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" opacity="1" r="20"/><circle cx="25" cy="25" opacity=".3" r="25"/></svg>`,main:Ke`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z"/><circle cx="30" cy="28" r="10" fill="#fff"/></svg>`,place:Ke`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd"/></svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let t=this.isLink(),e=this.notInteractive?Q`div`:t?Q`a`:Q`button`;return F`<${e} part="base" class="${c("flex justify-center",!this.notInteractive&&"focus:outline focus:outline-2 focus:outline-primary focus:outline-offset-2")}" href="${w(t?this.href:void 0)}" target="${w(t?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${w(this.notInteractive||t?void 0:"button")}" aria-label="${w(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${w(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${c("inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-all duration-200 ease-in-out hover:scale-110 hover:fill-primary-500",this.variant==="main"&&this.state==="hover"&&"fill-accent-550",this.variant==="main"&&this.state==="active"&&"fill-accent-700",this.variant==="main"&&!this.notInteractive&&"hover:fill-accent-550 active:fill-accent-700",this.variant==="place"&&this.state==="default"&&"fill-white",this.variant==="place"&&this.state==="hover"&&"fill-primary-100",this.variant==="place"&&this.state==="active"&&"fill-primary-200",this.variant==="place"&&!this.notInteractive&&"hover:fill-primary-100",{cluster:"fill-primary",main:"fill-accent",place:""}[this.variant])}">${this.marker[this.variant]}</div><div id="content" part="content" class="${c("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${e}>`}};$t.styles=[...m.styles,v`:host{display:block}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem)*var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1));margin-top:calc(var(--sd-spacing-2,.5rem)*-1)}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow:drop-shadow(var(--sd-shadow,0px 1px 3px #515151));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}`],o([l({type:String,reflect:!0})],$t.prototype,"variant",2),o([l({type:String,reflect:!0})],$t.prototype,"state",2),o([l({type:Boolean,reflect:!0})],$t.prototype,"animated",2),o([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],$t.prototype,"notInteractive",2),o([l({type:String,reflect:!0})],$t.prototype,"href",2),o([l({type:String,reflect:!0})],$t.prototype,"target",2),o([l({reflect:!0})],$t.prototype,"label",2),$t=o([y("sd-map-marker")],$t);var rt=class extends m{constructor(){super(...arguments);this.hasSlotController=new S(this,"[default]","description","children");this.localize=new M(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?Q`summary`:this.separated?Q`div`:this.isLink?Q`a`:Q`button`}render(){let t=this.tag,e=this.isLink,r=this.isButton,a=this.isAccordion,n={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},d=this.vertical?"pb-3":"pb-2",h=F`<${t} part="base" class="${c("cursor-pointer relative focus-visible:focus-outline",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",this.current&&"font-bold",a?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px] px-4")}" aria-current="${w(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${w(r?this.disabled:void 0)}" href="${w(e?this.href:void 0)}" target="${w(e?this.target:void 0)}" download="${w(e?this.download:void 0)}" rel="${w(e&&this.target?"noreferrer noopener":void 0)}" role="${e?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:a?this.handleClickSummary:r?this.handleClickButton:void 0}"><div part="current-indicator" class="${c("absolute bg-accent left-0 pointer-events-none",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-[calc(100%-16px)] bottom-0 left-2 group-hover:w-full group-hover:left-0",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${c("relative pt-3 inline-flex justify-between items-center",a?"grow":"w-full",n.description||this.separated?"pb-1":d,this.calculatePaddingX)}">${this.divider&&this.vertical?F`<sd-divider part="divider" class="${c("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?F`<a class="${c("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px]",!n.description&&"py-4")}" href="${w(e?this.href:void 0)}" target="${w(e?this.target:void 0)}" download="${w(e?this.download:void 0)}"><slot part="content" class="inline"></slot></a>`:F`<slot part="content" class="inline"></slot>`} </span>${(this.chevron||n.children)&&this.vertical?this.separated?F`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${c("mr-4 h-6 w-6 transition-all",a||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon></button>`:F`<sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${c("h-6 w-6 ml-2 transition-all",a?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${n.description&&this.vertical?F`<slot name="description" part="description" class="${c("inline-block text-sm text-left text-black",a||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX,d)}"></slot>`:""}</${t}>`;return a?F`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${h}<slot name="children"></slot></details>`:this.separated?F`<div part="details" id="navigation-item-details" class="relative flex flex-col">${h}${this.open?F`<slot name="children"></slot>`:""}</div>`:F`${h}`}};rt.styles=[...m.styles,v`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}[part=current-indicator]{--tw-scale-x:0;--tw-scale-y:0;opacity:var(--sd-opacity-0,0);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:var(--sd-duration-fast,.15s);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([current]) [part=current-indicator]{--tw-scale-x:1;--tw-scale-y:1;opacity:var(--sd-opacity-100,1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}`],o([b('a[part="base"], button[part="base"]')],rt.prototype,"button",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"vertical",2),o([l({type:String,reflect:!0})],rt.prototype,"size",2),o([l({reflect:!0})],rt.prototype,"href",2),o([l({type:String,reflect:!0})],rt.prototype,"target",2),o([l({reflect:!0})],rt.prototype,"download",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"current",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"disabled",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"chevron",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"relaxed",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"divider",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"indented",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"open",2),o([l({type:Boolean,reflect:!0})],rt.prototype,"separated",2),rt=o([y("sd-navigation-item")],rt);var Zi={"top-right":null,"bottom-center":null},Wn=()=>{Object.entries(Zi).forEach(([s])=>{let i=document.querySelector(`#sd-toast-stack--${s}`);if(i){i.setAttribute("role","region"),Zi[s]=i;return}Zi[s]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${s}`,className:`sd-toast-stack sd-toast-stack--${s}`})})};Wn();var pt=class extends m{constructor(){super(...arguments);this.localize=new M(this);this.variant="info";this.open=!1;this.closable=!1;this.duration=1/0;this.durationIndicator=!1;this.toastStack="top-right";this.remainingDuration=this.duration;this.startTime=Date.now()}get stack(){return Zi[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications"))}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.base.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>{this.hide()},this.remainingDuration))}handleCloseClick(){this.hide()}handleKeyDown(t){this.closable&&t.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await j(this.base),this.base.hidden=!1;let{keyframes:t,options:e}=B(this,"notification.show",{dir:this.localize.dir()});await N(this.base,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await j(this.base);let{keyframes:t,options:e}=B(this,"notification.hide",{dir:this.localize.dir()});await N(this.base,t,e),this.base.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}async toast(){return new Promise(t=>{this.stack.parentElement===null&&document.body.append(this.stack),this.stack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{this.stack.removeChild(this),t()},{once:!0})})}render(){return u`<div part="base" class="${c("w-full overflow-hidden flex items-stretch relative m-2 focus-visible:focus-outline")}" id="notification" tabindex="0" role="alert" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><slot name="icon" part="icon" class="${c("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="system" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${c("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 border-neutral-400")}"><slot id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?u`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?u`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${c("absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute border border-neutral-400"></div>`:""}</div>`}};pt.styles=[...m.styles,v`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],o([b('[part~="base"]')],pt.prototype,"base",2),o([b('[part~="close-button"]')],pt.prototype,"close",2),o([l({type:String,reflect:!0})],pt.prototype,"variant",2),o([l({type:Boolean,reflect:!0})],pt.prototype,"open",2),o([l({type:Boolean,reflect:!0})],pt.prototype,"closable",2),o([l({type:Number,reflect:!0})],pt.prototype,"duration",2),o([l({type:Boolean,reflect:!0,attribute:"duration-indicator"})],pt.prototype,"durationIndicator",2),o([l({type:String,reflect:!0,attribute:"toast-stack"})],pt.prototype,"toastStack",2),o([x("open",{waitUntilFirstUpdate:!0})],pt.prototype,"handleOpenChange",1),o([x("duration")],pt.prototype,"handleDurationChange",1),pt=o([y("sd-notification")],pt);I("notification.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});I("notification.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});var nt=class extends m{constructor(){super(...arguments);this.hasSlotController=new S(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.isKeyboardFocus=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var t;return((t=this.textContent)!=null?t:"").trim()}render(){let t={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return u`<div part="base" class="${c("px-4 flex items-center w-full transition-colors duration-fast ease-in-out text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-700 cursor-not-allowed":"cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.isKeyboardFocus?"focus-outline focus-outline-offset":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${c("absolute w-full left-0 top-0 pointer-events-none transition-[height,top] duration-fast ease-in-out border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?u`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${c("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"border-neutral-800")}">${this.selected?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-icon>`:""}</span>`:""} ${t.left?u`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${t.right?u`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};nt.styles=[...m.styles,v`:host{display:block;outline:2px solid transparent!important;outline-offset:2px!important;position:relative;width:100%}.focus-outline-offset{outline-offset:-2px}`],o([b('[part="base"]')],nt.prototype,"defaultSlot",2),o([$()],nt.prototype,"current",2),o([$()],nt.prototype,"selected",2),o([$()],nt.prototype,"hasHover",2),o([$()],nt.prototype,"isKeyboardFocus",2),o([l({type:String,reflect:!0})],nt.prototype,"size",2),o([l({type:Boolean,reflect:!0})],nt.prototype,"checkbox",2),o([l({type:Boolean,reflect:!0})],nt.prototype,"disabled",2),o([l({type:String,reflect:!0})],nt.prototype,"value",2),o([x("disabled")],nt.prototype,"handleDisabledChange",1),o([x("selected")],nt.prototype,"handleSelectedChange",1),o([x("value")],nt.prototype,"handleValueChange",1),nt=o([y("sd-option")],nt);var St=class extends m{constructor(){super(...arguments);this.localize=new M(this);this.disabled=!1;this.label=""}handleDisableOptions(){let{disabled:t}=this;this.defaultSlot.assignedElements().filter(e=>e.tagName.toLowerCase()==="sd-option").forEach(e=>{e.disabled=t})}handleDisabledChange(){this.handleDisableOptions()}render(){let{disabled:t}=this;return F`<div role="${t?"presentation":"group"}" class="${c(this.disabled?"text-neutral-500":"")}" part="base" aria-labelledby="group-label"><sd-divider id="divider" class="pt-2 pb-4" part="divider"></sd-divider><div part="label-container" class="${c(this.disabled?"text-neutral-500":"text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="listbox" part="options" aria-label="${this.localize.term("optionGroup")}"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`}};St.dependencies={"sd-divider":Pt},St.styles=[...m.styles,v`:host{--display-divider:block}#divider{display:var(--display-divider)}`],o([b("slot:not([name])")],St.prototype,"defaultSlot",2),o([l({reflect:!0,type:Boolean})],St.prototype,"disabled",2),o([l({type:String,reflect:!0})],St.prototype,"label",2),o([x("disabled",{waitUntilFirstUpdate:!0})],St.prototype,"handleDisabledChange",1),St=o([y("sd-optgroup")],St);var se=Math.min,Ct=Math.max,yi=Math.round,wi=Math.floor,Kt=s=>({x:s,y:s}),Qn={left:"right",right:"left",bottom:"top",top:"bottom"},Jn={start:"end",end:"start"};function Qi(s,i,t){return Ct(s,se(i,t))}function Pe(s,i){return typeof s=="function"?s(i):s}function pe(s){return s.split("-")[0]}function Be(s){return s.split("-")[1]}function Hr(s){return s==="x"?"y":"x"}function Ji(s){return s==="y"?"height":"width"}function ue(s){return["top","bottom"].includes(pe(s))?"y":"x"}function Gi(s){return Hr(ue(s))}function Ys(s,i,t){t===void 0&&(t=!1);let e=Be(s),r=Gi(s),a=Ji(r),n=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return i.reference[a]>i.floating[a]&&(n=vi(n)),[n,vi(n)]}function Xs(s){let i=vi(s);return[Wi(s),i,Wi(i)]}function Wi(s){return s.replace(/start|end/g,i=>Jn[i])}function Gn(s,i,t){let e=["left","right"],r=["right","left"],a=["top","bottom"],n=["bottom","top"];switch(s){case"top":case"bottom":return t?i?r:e:i?e:r;case"left":case"right":return i?a:n;default:return[]}}function Zs(s,i,t,e){let r=Be(s),a=Gn(pe(s),t==="start",e);return r&&(a=a.map(n=>n+"-"+r),i&&(a=a.concat(a.map(Wi)))),a}function vi(s){return s.replace(/left|right|bottom|top/g,i=>Qn[i])}function tl(s){return H({top:0,right:0,bottom:0,left:0},s)}function Ir(s){return typeof s!="number"?tl(s):{top:s,right:s,bottom:s,left:s}}function Fe(s){let{x:i,y:t,width:e,height:r}=s;return{width:e,height:r,top:t,left:i,right:i+e,bottom:t+r,x:i,y:t}}function Ws(s,i,t){let{reference:e,floating:r}=s,a=ue(i),n=Gi(i),d=Ji(n),h=pe(i),p=a==="y",f=e.x+e.width/2-r.width/2,g=e.y+e.height/2-r.height/2,E=e[d]/2-r[d]/2,k;switch(h){case"top":k={x:f,y:e.y-r.height};break;case"bottom":k={x:f,y:e.y+e.height};break;case"right":k={x:e.x+e.width,y:g};break;case"left":k={x:e.x-r.width,y:g};break;default:k={x:e.x,y:e.y}}switch(Be(i)){case"start":k[n]-=E*(t&&p?-1:1);break;case"end":k[n]+=E*(t&&p?-1:1);break}return k}var Qs=async(s,i,t)=>{let{placement:e="bottom",strategy:r="absolute",middleware:a=[],platform:n}=t,d=a.filter(Boolean),h=await(n.isRTL==null?void 0:n.isRTL(i)),p=await n.getElementRects({reference:s,floating:i,strategy:r}),{x:f,y:g}=Ws(p,e,h),E=e,k={},C=0;for(let L=0;L<d.length;L++){let{name:O,fn:_}=d[L],{x:P,y:V,data:W,reset:Z}=await _({x:f,y:g,initialPlacement:e,placement:E,strategy:r,middlewareData:k,rects:p,platform:n,elements:{reference:s,floating:i}});f=P!=null?P:f,g=V!=null?V:g,k=lt(H({},k),{[O]:H(H({},k[O]),W)}),Z&&C<=50&&(C++,typeof Z=="object"&&(Z.placement&&(E=Z.placement),Z.rects&&(p=Z.rects===!0?await n.getElementRects({reference:s,floating:i,strategy:r}):Z.rects),{x:f,y:g}=Ws(p,E,h)),L=-1)}return{x:f,y:g,placement:E,strategy:r,middlewareData:k}};async function tr(s,i){var t;i===void 0&&(i={});let{x:e,y:r,platform:a,rects:n,elements:d,strategy:h}=s,{boundary:p="clippingAncestors",rootBoundary:f="viewport",elementContext:g="floating",altBoundary:E=!1,padding:k=0}=Pe(i,s),C=Ir(k),O=d[E?g==="floating"?"reference":"floating":g],_=Fe(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(O)))==null||t?O:O.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(d.floating)),boundary:p,rootBoundary:f,strategy:h})),P=g==="floating"?{x:e,y:r,width:n.floating.width,height:n.floating.height}:n.reference,V=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d.floating)),W=await(a.isElement==null?void 0:a.isElement(V))?await(a.getScale==null?void 0:a.getScale(V))||{x:1,y:1}:{x:1,y:1},Z=Fe(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:P,offsetParent:V,strategy:h}):P);return{top:(_.top-Z.top+C.top)/W.y,bottom:(Z.bottom-_.bottom+C.bottom)/W.y,left:(_.left-Z.left+C.left)/W.x,right:(Z.right-_.right+C.right)/W.x}}var Js=s=>({name:"arrow",options:s,async fn(i){let{x:t,y:e,placement:r,rects:a,platform:n,elements:d,middlewareData:h}=i,{element:p,padding:f=0}=Pe(s,i)||{};if(p==null)return{};let g=Ir(f),E={x:t,y:e},k=Gi(r),C=Ji(k),L=await n.getDimensions(p),O=k==="y",_=O?"top":"left",P=O?"bottom":"right",V=O?"clientHeight":"clientWidth",W=a.reference[C]+a.reference[k]-E[k]-a.floating[C],Z=E[k]-a.reference[k],Rt=await(n.getOffsetParent==null?void 0:n.getOffsetParent(p)),bt=Rt?Rt[V]:0;(!bt||!await(n.isElement==null?void 0:n.isElement(Rt)))&&(bt=d.floating[V]||a.floating[C]);let ae=W/2-Z/2,Qt=bt/2-L[C]/2-1,_t=se(g[_],Qt),ge=se(g[P],Qt),Jt=_t,be=bt-L[C]-ge,At=bt/2-L[C]/2+ae,Ne=Qi(Jt,At,be),Ut=!h.arrow&&Be(r)!=null&&At!==Ne&&a.reference[C]/2-(At<Jt?_t:ge)-L[C]/2<0,Ce=Ut?At<Jt?At-Jt:At-be:0;return{[k]:E[k]+Ce,data:H({[k]:Ne,centerOffset:At-Ne-Ce},Ut&&{alignmentOffset:Ce}),reset:Ut}}});var Gs=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(i){var t,e;let{placement:r,middlewareData:a,rects:n,initialPlacement:d,platform:h,elements:p}=i,Ne=Pe(s,i),{mainAxis:f=!0,crossAxis:g=!0,fallbackPlacements:E,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:L=!0}=Ne,O=Ci(Ne,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let _=pe(r),P=ue(d),V=pe(d)===d,W=await(h.isRTL==null?void 0:h.isRTL(p.floating)),Z=E||(V||!L?[vi(d)]:Xs(d)),Rt=C!=="none";!E&&Rt&&Z.push(...Zs(d,L,C,W));let bt=[d,...Z],ae=await tr(i,O),Qt=[],_t=((e=a.flip)==null?void 0:e.overflows)||[];if(f&&Qt.push(ae[_]),g){let Ut=Ys(r,n,W);Qt.push(ae[Ut[0]],ae[Ut[1]])}if(_t=[..._t,{placement:r,overflows:Qt}],!Qt.every(Ut=>Ut<=0)){var ge,Jt;let Ut=(((ge=a.flip)==null?void 0:ge.index)||0)+1,Ce=bt[Ut];if(Ce){var be;let ve=g==="alignment"?P!==ue(Ce):!1,Gt=((be=_t[0])==null?void 0:be.overflows[0])>0;if(!ve||Gt)return{data:{index:Ut,overflows:_t},reset:{placement:Ce}}}let Ge=(Jt=_t.filter(ve=>ve.overflows[0]<=0).sort((ve,Gt)=>ve.overflows[1]-Gt.overflows[1])[0])==null?void 0:Jt.placement;if(!Ge)switch(k){case"bestFit":{var At;let ve=(At=_t.filter(Gt=>{if(Rt){let ye=ue(Gt.placement);return ye===P||ye==="y"}return!0}).map(Gt=>[Gt.placement,Gt.overflows.filter(ye=>ye>0).reduce((ye,Eo)=>ye+Eo,0)]).sort((Gt,ye)=>Gt[1]-ye[1])[0])==null?void 0:At[0];ve&&(Ge=ve);break}case"initialPlacement":Ge=d;break}if(r!==Ge)return{reset:{placement:Ge}}}return{}}}};async function el(s,i){let{placement:t,platform:e,elements:r}=s,a=await(e.isRTL==null?void 0:e.isRTL(r.floating)),n=pe(t),d=Be(t),h=ue(t)==="y",p=["left","top"].includes(n)?-1:1,f=a&&h?-1:1,g=Pe(i,s),{mainAxis:E,crossAxis:k,alignmentAxis:C}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return d&&typeof C=="number"&&(k=d==="end"?C*-1:C),h?{x:k*f,y:E*p}:{x:E*p,y:k*f}}var to=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(i){var t,e;let{x:r,y:a,placement:n,middlewareData:d}=i,h=await el(i,s);return n===((t=d.offset)==null?void 0:t.placement)&&(e=d.arrow)!=null&&e.alignmentOffset?{}:{x:r+h.x,y:a+h.y,data:lt(H({},h),{placement:n})}}}},eo=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(i){let{x:t,y:e,placement:r}=i,O=Pe(s,i),{mainAxis:a=!0,crossAxis:n=!1,limiter:d={fn:_=>{let{x:P,y:V}=_;return{x:P,y:V}}}}=O,h=Ci(O,["mainAxis","crossAxis","limiter"]),p={x:t,y:e},f=await tr(i,h),g=ue(pe(r)),E=Hr(g),k=p[E],C=p[g];if(a){let _=E==="y"?"top":"left",P=E==="y"?"bottom":"right",V=k+f[_],W=k-f[P];k=Qi(V,k,W)}if(n){let _=g==="y"?"top":"left",P=g==="y"?"bottom":"right",V=C+f[_],W=C-f[P];C=Qi(V,C,W)}let L=d.fn(lt(H({},i),{[E]:k,[g]:C}));return lt(H({},L),{data:{x:L.x-t,y:L.y-e,enabled:{[E]:a,[g]:n}}})}}};var io=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(i){var t,e;let{placement:r,rects:a,platform:n,elements:d}=i,_t=Pe(s,i),{apply:h=()=>{}}=_t,p=Ci(_t,["apply"]),f=await tr(i,p),g=pe(r),E=Be(r),k=ue(r)==="y",{width:C,height:L}=a.floating,O,_;g==="top"||g==="bottom"?(O=g,_=E===(await(n.isRTL==null?void 0:n.isRTL(d.floating))?"start":"end")?"left":"right"):(_=g,O=E==="end"?"top":"bottom");let P=L-f.top-f.bottom,V=C-f.left-f.right,W=se(L-f[O],P),Z=se(C-f[_],V),Rt=!i.middlewareData.shift,bt=W,ae=Z;if((t=i.middlewareData.shift)!=null&&t.enabled.x&&(ae=V),(e=i.middlewareData.shift)!=null&&e.enabled.y&&(bt=P),Rt&&!E){let ge=Ct(f.left,0),Jt=Ct(f.right,0),be=Ct(f.top,0),At=Ct(f.bottom,0);k?ae=C-2*(ge!==0||Jt!==0?ge+Jt:Ct(f.left,f.right)):bt=L-2*(be!==0||At!==0?be+At:Ct(f.top,f.bottom))}await h(lt(H({},i),{availableWidth:ae,availableHeight:bt}));let Qt=await n.getDimensions(d.floating);return C!==Qt.width||L!==Qt.height?{reset:{rects:!0}}:{}}}};function er(){return typeof window!="undefined"}function Ve(s){return so(s)?(s.nodeName||"").toLowerCase():"#document"}function Lt(s){var i;return(s==null||(i=s.ownerDocument)==null?void 0:i.defaultView)||window}function jt(s){var i;return(i=(so(s)?s.ownerDocument:s.document)||window.document)==null?void 0:i.documentElement}function so(s){return er()?s instanceof Node||s instanceof Lt(s).Node:!1}function Ft(s){return er()?s instanceof Element||s instanceof Lt(s).Element:!1}function Yt(s){return er()?s instanceof HTMLElement||s instanceof Lt(s).HTMLElement:!1}function ro(s){return!er()||typeof ShadowRoot=="undefined"?!1:s instanceof ShadowRoot||s instanceof Lt(s).ShadowRoot}function Qe(s){let{overflow:i,overflowX:t,overflowY:e,display:r}=Vt(s);return/auto|scroll|overlay|hidden|clip/.test(i+e+t)&&!["inline","contents"].includes(r)}function oo(s){return["table","td","th"].includes(Ve(s))}function xi(s){return[":popover-open",":modal"].some(i=>{try{return s.matches(i)}catch(t){return!1}})}function ir(s){let i=rr(),t=Ft(s)?Vt(s):s;return["transform","translate","scale","rotate","perspective"].some(e=>t[e]?t[e]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!i&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!i&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(e=>(t.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(t.contain||"").includes(e))}function ao(s){let i=me(s);for(;Yt(i)&&!Re(i);){if(ir(i))return i;if(xi(i))return null;i=me(i)}return null}function rr(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Re(s){return["html","body","#document"].includes(Ve(s))}function Vt(s){return Lt(s).getComputedStyle(s)}function ki(s){return Ft(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function me(s){if(Ve(s)==="html")return s;let i=s.assignedSlot||s.parentNode||ro(s)&&s.host||jt(s);return ro(i)?i.host:i}function no(s){let i=me(s);return Re(i)?s.ownerDocument?s.ownerDocument.body:s.body:Yt(i)&&Qe(i)?i:no(i)}function We(s,i,t){var e;i===void 0&&(i=[]),t===void 0&&(t=!0);let r=no(s),a=r===((e=s.ownerDocument)==null?void 0:e.body),n=Lt(r);if(a){let d=sr(n);return i.concat(n,n.visualViewport||[],Qe(r)?r:[],d&&t?We(d):[])}return i.concat(r,We(r,[],t))}function sr(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function ho(s){let i=Vt(s),t=parseFloat(i.width)||0,e=parseFloat(i.height)||0,r=Yt(s),a=r?s.offsetWidth:t,n=r?s.offsetHeight:e,d=yi(t)!==a||yi(e)!==n;return d&&(t=a,e=n),{width:t,height:e,$:d}}function Br(s){return Ft(s)?s:s.contextElement}function Je(s){let i=Br(s);if(!Yt(i))return Kt(1);let t=i.getBoundingClientRect(),{width:e,height:r,$:a}=ho(i),n=(a?yi(t.width):t.width)/e,d=(a?yi(t.height):t.height)/r;return(!n||!Number.isFinite(n))&&(n=1),(!d||!Number.isFinite(d))&&(d=1),{x:n,y:d}}var il=Kt(0);function po(s){let i=Lt(s);return!rr()||!i.visualViewport?il:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function rl(s,i,t){return i===void 0&&(i=!1),!t||i&&t!==Lt(s)?!1:i}function Ue(s,i,t,e){i===void 0&&(i=!1),t===void 0&&(t=!1);let r=s.getBoundingClientRect(),a=Br(s),n=Kt(1);i&&(e?Ft(e)&&(n=Je(e)):n=Je(s));let d=rl(a,t,e)?po(a):Kt(0),h=(r.left+d.x)/n.x,p=(r.top+d.y)/n.y,f=r.width/n.x,g=r.height/n.y;if(a){let E=Lt(a),k=e&&Ft(e)?Lt(e):e,C=E,L=sr(C);for(;L&&e&&k!==C;){let O=Je(L),_=L.getBoundingClientRect(),P=Vt(L),V=_.left+(L.clientLeft+parseFloat(P.paddingLeft))*O.x,W=_.top+(L.clientTop+parseFloat(P.paddingTop))*O.y;h*=O.x,p*=O.y,f*=O.x,g*=O.y,h+=V,p+=W,C=Lt(L),L=sr(C)}}return Fe({width:f,height:g,x:h,y:p})}function Fr(s,i){let t=ki(s).scrollLeft;return i?i.left+t:Ue(jt(s)).left+t}function uo(s,i,t){t===void 0&&(t=!1);let e=s.getBoundingClientRect(),r=e.left+i.scrollLeft-(t?0:Fr(s,e)),a=e.top+i.scrollTop;return{x:r,y:a}}function sl(s){let{elements:i,rect:t,offsetParent:e,strategy:r}=s,a=r==="fixed",n=jt(e),d=i?xi(i.floating):!1;if(e===n||d&&a)return t;let h={scrollLeft:0,scrollTop:0},p=Kt(1),f=Kt(0),g=Yt(e);if((g||!g&&!a)&&((Ve(e)!=="body"||Qe(n))&&(h=ki(e)),Yt(e))){let k=Ue(e);p=Je(e),f.x=k.x+e.clientLeft,f.y=k.y+e.clientTop}let E=n&&!g&&!a?uo(n,h,!0):Kt(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-h.scrollLeft*p.x+f.x+E.x,y:t.y*p.y-h.scrollTop*p.y+f.y+E.y}}function ol(s){return Array.from(s.getClientRects())}function al(s){let i=jt(s),t=ki(s),e=s.ownerDocument.body,r=Ct(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),a=Ct(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),n=-t.scrollLeft+Fr(s),d=-t.scrollTop;return Vt(e).direction==="rtl"&&(n+=Ct(i.clientWidth,e.clientWidth)-r),{width:r,height:a,x:n,y:d}}function nl(s,i){let t=Lt(s),e=jt(s),r=t.visualViewport,a=e.clientWidth,n=e.clientHeight,d=0,h=0;if(r){a=r.width,n=r.height;let p=rr();(!p||p&&i==="fixed")&&(d=r.offsetLeft,h=r.offsetTop)}return{width:a,height:n,x:d,y:h}}function ll(s,i){let t=Ue(s,!0,i==="fixed"),e=t.top+s.clientTop,r=t.left+s.clientLeft,a=Yt(s)?Je(s):Kt(1),n=s.clientWidth*a.x,d=s.clientHeight*a.y,h=r*a.x,p=e*a.y;return{width:n,height:d,x:h,y:p}}function lo(s,i,t){let e;if(i==="viewport")e=nl(s,t);else if(i==="document")e=al(jt(s));else if(Ft(i))e=ll(i,t);else{let r=po(s);e={x:i.x-r.x,y:i.y-r.y,width:i.width,height:i.height}}return Fe(e)}function mo(s,i){let t=me(s);return t===i||!Ft(t)||Re(t)?!1:Vt(t).position==="fixed"||mo(t,i)}function dl(s,i){let t=i.get(s);if(t)return t;let e=We(s,[],!1).filter(d=>Ft(d)&&Ve(d)!=="body"),r=null,a=Vt(s).position==="fixed",n=a?me(s):s;for(;Ft(n)&&!Re(n);){let d=Vt(n),h=ir(n);!h&&d.position==="fixed"&&(r=null),(a?!h&&!r:!h&&d.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Qe(n)&&!h&&mo(s,n))?e=e.filter(f=>f!==n):r=d,n=me(n)}return i.set(s,e),e}function cl(s){let{element:i,boundary:t,rootBoundary:e,strategy:r}=s,n=[...t==="clippingAncestors"?xi(i)?[]:dl(i,this._c):[].concat(t),e],d=n[0],h=n.reduce((p,f)=>{let g=lo(i,f,r);return p.top=Ct(g.top,p.top),p.right=se(g.right,p.right),p.bottom=se(g.bottom,p.bottom),p.left=Ct(g.left,p.left),p},lo(i,d,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function hl(s){let{width:i,height:t}=ho(s);return{width:i,height:t}}function pl(s,i,t){let e=Yt(i),r=jt(i),a=t==="fixed",n=Ue(s,!0,a,i),d={scrollLeft:0,scrollTop:0},h=Kt(0);function p(){h.x=Fr(r)}if(e||!e&&!a)if((Ve(i)!=="body"||Qe(r))&&(d=ki(i)),e){let k=Ue(i,!0,a,i);h.x=k.x+i.clientLeft,h.y=k.y+i.clientTop}else r&&p();a&&!e&&r&&p();let f=r&&!e&&!a?uo(r,d):Kt(0),g=n.left+d.scrollLeft-h.x-f.x,E=n.top+d.scrollTop-h.y-f.y;return{x:g,y:E,width:n.width,height:n.height}}function Pr(s){return Vt(s).position==="static"}function co(s,i){if(!Yt(s)||Vt(s).position==="fixed")return null;if(i)return i(s);let t=s.offsetParent;return jt(s)===t&&(t=t.ownerDocument.body),t}function fo(s,i){let t=Lt(s);if(xi(s))return t;if(!Yt(s)){let r=me(s);for(;r&&!Re(r);){if(Ft(r)&&!Pr(r))return r;r=me(r)}return t}let e=co(s,i);for(;e&&oo(e)&&Pr(e);)e=co(e,i);return e&&Re(e)&&Pr(e)&&!ir(e)?t:e||ao(s)||t}var ul=async function(s){let i=this.getOffsetParent||fo,t=this.getDimensions,e=await t(s.floating);return{reference:pl(s.reference,await i(s.floating),s.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function ml(s){return Vt(s).direction==="rtl"}var fl={convertOffsetParentRelativeRectToViewportRelativeRect:sl,getDocumentElement:jt,getClippingRect:cl,getOffsetParent:fo,getElementRects:ul,getClientRects:ol,getDimensions:hl,getScale:Je,isElement:Ft,isRTL:ml};function go(s,i){return s.x===i.x&&s.y===i.y&&s.width===i.width&&s.height===i.height}function gl(s,i){let t=null,e,r=jt(s);function a(){var d;clearTimeout(e),(d=t)==null||d.disconnect(),t=null}function n(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),a();let p=s.getBoundingClientRect(),{left:f,top:g,width:E,height:k}=p;if(d||i(),!E||!k)return;let C=wi(g),L=wi(r.clientWidth-(f+E)),O=wi(r.clientHeight-(g+k)),_=wi(f),V={rootMargin:-C+"px "+-L+"px "+-O+"px "+-_+"px",threshold:Ct(0,se(1,h))||1},W=!0;function Z(Rt){let bt=Rt[0].intersectionRatio;if(bt!==h){if(!W)return n();bt?n(!1,bt):e=setTimeout(()=>{n(!1,1e-7)},1e3)}bt===1&&!go(p,s.getBoundingClientRect())&&n(),W=!1}try{t=new IntersectionObserver(Z,lt(H({},V),{root:r.ownerDocument}))}catch(Rt){t=new IntersectionObserver(Z,V)}t.observe(s)}return n(!0),a}function bo(s,i,t,e){e===void 0&&(e={});let{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:n=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=e,p=Br(s),f=r||a?[...p?We(p):[],...We(i)]:[];f.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});let g=p&&d?gl(p,t):null,E=-1,k=null;n&&(k=new ResizeObserver(_=>{let[P]=_;P&&P.target===p&&k&&(k.unobserve(i),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var V;(V=k)==null||V.observe(i)})),t()}),p&&!h&&k.observe(p),k.observe(i));let C,L=h?Ue(s):null;h&&O();function O(){let _=Ue(s);L&&!go(L,_)&&t(),L=_,C=requestAnimationFrame(O)}return t(),()=>{var _;f.forEach(P=>{r&&P.removeEventListener("scroll",t),a&&P.removeEventListener("resize",t)}),g==null||g(),(_=k)==null||_.disconnect(),k=null,h&&cancelAnimationFrame(C)}}var vo=to;var yo=eo,wo=Gs,Vr=io;var xo=Js;var ko=(s,i,t)=>{let e=new Map,r=H({platform:fl},t),a=lt(H({},r.platform),{_c:e});return Qs(s,i,lt(H({},r),{platform:a}))};var U=class extends m{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(e=>this.handleCurrentPlacementChange(e));let t={attributes:!0};this.mutationObserver.observe(this,t)}handleCurrentPlacementChange(t){return t.forEach(e=>{if(e.attributeName==="data-current-placement"){let r=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:r})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=bo(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[vo({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Vr({apply:({rects:e})=>{let r=this.sync==="width"||this.sync==="both",a=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${e.reference.width}px`:"",this.popup.style.height=a?`${e.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(wo({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(yo({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Vr({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:e,availableHeight:r})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${r}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${e}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(xo({element:this.arrowEl,padding:this.arrowPadding})),ko(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then(({x:e,y:r,middlewareData:a,placement:n})=>{let d=getComputedStyle(this).direction==="rtl",h={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),Object.assign(this.popup.style,{left:`${e}px`,top:`${r}px`}),this.arrow){let p=a.arrow.x,f=a.arrow.y,g="",E="",k="",C="";if(this.arrowPlacement==="start"){let L=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";g=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",E=d?L:"",C=d?"":L}else if(this.arrowPlacement==="end"){let L=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";E=d?"":L,C=d?L:"",k=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(C=typeof p=="number"?"calc(50% - var(--arrow-size-diagonal))":"",g=typeof f=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(C=typeof p=="number"?`${p}px`:"",g=typeof f=="number"?`${f}px`:"");Object.assign(this.arrowEl.style,{top:g,right:E,bottom:k,left:C,[h]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return u`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${c("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?u`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};U.styles=[...m.styles,v`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],o([b('[part="popup"]')],U.prototype,"popup",2),o([b('[part="arrow"]')],U.prototype,"arrowEl",2),o([l({reflect:!0})],U.prototype,"anchor",2),o([l({type:Boolean,reflect:!0})],U.prototype,"active",2),o([l({type:String,reflect:!0})],U.prototype,"placement",2),o([l({type:String,reflect:!0})],U.prototype,"strategy",2),o([l({type:Number,reflect:!0})],U.prototype,"distance",2),o([l({type:Number,reflect:!0})],U.prototype,"skidding",2),o([l({type:Boolean,reflect:!0})],U.prototype,"arrow",2),o([l({type:String,attribute:"arrow-placement",reflect:!0})],U.prototype,"arrowPlacement",2),o([l({attribute:"arrow-padding",type:Number,reflect:!0})],U.prototype,"arrowPadding",2),o([l({type:Boolean,reflect:!0})],U.prototype,"flip",2),o([l({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(e=>e.trim()).filter(e=>e!==""),toAttribute:t=>t.join(" ")}})],U.prototype,"flipFallbackPlacements",2),o([l({type:String,attribute:"flip-fallback-strategy"})],U.prototype,"flipFallbackStrategy",2),o([l({type:Object})],U.prototype,"flipBoundary",2),o([l({attribute:"flip-padding",type:Number})],U.prototype,"flipPadding",2),o([l({type:Boolean})],U.prototype,"shift",2),o([l({type:Object})],U.prototype,"shiftBoundary",2),o([l({attribute:"shift-padding",type:Number})],U.prototype,"shiftPadding",2),o([l({type:String,attribute:"auto-size"})],U.prototype,"autoSize",2),o([l()],U.prototype,"sync",2),o([l({type:Object})],U.prototype,"autoSizeBoundary",2),o([l({attribute:"auto-size-padding",type:Number})],U.prototype,"autoSizePadding",2),U=o([y("sd-popup")],U);var fe=class extends ut{constructor(){super(...arguments);this.expandable=!1}render(){let t=this.expandable?Q`details`:Q`div`,e=this.expandable?Q`summary`:Q`div`;return F`
122
122
  <${t} part="base" class="sm:p-6">
123
123
  <${e}
124
124
  part="header"
@@ -169,7 +169,7 @@
169
169
  popup:popup__content,
170
170
  "><div class="${c("relative w-full h-full grid grid-cols-1 rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200")}" slot="anchor"><div class="${c("input-container flex items-center w-full h-full px-4",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size])}"><input name="${this.name}" form="${this.form}" part="display-input" class="${c("top-0 left-0 appearance-none outline-none flex-grow bg-transparent w-full placeholder-neutral-700",h,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" .disabled="${this.disabled}" placeholder="${this.placeholder||this.localize.term("selectDefaultPlaceholder")}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="-1"> ${this.multiple&&this.useTags?u`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(g=>g==null?void 0:g.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",h)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${a?u`<button part="clear-button" class="${c("select__clear flex justify-center",p,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700 z-10",f)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${c(p,f,"text-error")}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",p,f)}" library="system" name="status-check"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${c("inline-flex ml-2 items-center transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",f)}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-icon></slot></div><button part="combobox" class="${c("relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",h,this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"min-h-[32px]",md:"min-h-[40px]",lg:"min-h-[48px]"}[this.size])}" type="button" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-labelledby="label"></button></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700 mt-2" part="form-control-help-text" id="help-text" aria-hidden="${r?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};z.styles=[...m.styles,v`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}`],o([je({selector:"sd-option"})],z.prototype,"_optionsInDefaultSlot",2),o([b("sd-popup")],z.prototype,"popup",2),o([b('[part="combobox"]')],z.prototype,"combobox",2),o([b('[part="display-input"]')],z.prototype,"displayInput",2),o([b(".value-input")],z.prototype,"valueInput",2),o([b('[part="listbox"]')],z.prototype,"listbox",2),o([b("#invalid-message")],z.prototype,"invalidMessage",2),o([$()],z.prototype,"displayLabel",2),o([$()],z.prototype,"deletedTagLabel",2),o([$()],z.prototype,"hasFocus",2),o([$()],z.prototype,"currentOption",2),o([$()],z.prototype,"selectedOptions",2),o([$()],z.prototype,"showValidStyle",2),o([$()],z.prototype,"showInvalidStyle",2),o([It()],z.prototype,"defaultValue",2),o([l({type:Boolean,reflect:!0})],z.prototype,"open",2),o([l({type:String,reflect:!0})],z.prototype,"size",2),o([l({type:String,reflect:!0})],z.prototype,"placement",2),o([l({type:String,reflect:!0})],z.prototype,"label",2),o([l({type:String,reflect:!0})],z.prototype,"placeholder",2),o([l({type:String,attribute:"max-options-tag-label",reflect:!0})],z.prototype,"maxOptionsTagLabel",2),o([l({type:Boolean,reflect:!0})],z.prototype,"disabled",2),o([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],z.prototype,"visuallyDisabled",2),o([l({type:String,attribute:"help-text",reflect:!0})],z.prototype,"helpText",2),o([$()],z.prototype,"currentPlacement",2),o([l({type:Boolean,reflect:!0})],z.prototype,"clearable",2),o([l({type:Boolean,reflect:!0})],z.prototype,"multiple",2),o([l({type:Boolean,reflect:!0})],z.prototype,"useTags",2),o([l({attribute:"max-options-visible",type:Number,reflect:!0})],z.prototype,"maxOptionsVisible",2),o([l({reflect:!0})],z.prototype,"form",2),o([l({reflect:!0})],z.prototype,"name",2),o([l({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],z.prototype,"value",2),o([l({type:Boolean,reflect:!0})],z.prototype,"required",2),o([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],z.prototype,"styleOnValid",2),o([l({type:Boolean,reflect:!0})],z.prototype,"hoist",2),o([l()],z.prototype,"getTag",2),o([x("useTags",{waitUntilFirstUpdate:!0})],z.prototype,"handleUseTagsChange",1),o([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],z.prototype,"handleDisabledChange",1),o([x("open",{waitUntilFirstUpdate:!0})],z.prototype,"handleOpenChange",1),o([x("size",{waitUntilFirstUpdate:!0})],z.prototype,"applySizeToOptions",1),o([x("value",{waitUntilFirstUpdate:!0})],z.prototype,"handleValueChange",1),z=o([y("sd-select")],z);I("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});I("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var st=class extends m{constructor(){super(...arguments);this.hasSlotController=new S(this,"label","[default]");this.size="lg";this.orientation="horizontal";this.disabled=!1;this.current=!1;this.noTail=!1;this.notInteractive=!1;this.label="";this.description="";this.index=1;this.href=""}connectedCallback(){super.connectedCallback()}isLink(){return!!this.href}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleCurrentChange(){this.current&&(this.disabled=!1)}handleDisabledChange(){this.disabled&&(this.current=!1)}handleInteractivityChange(){this.notInteractive&&(this.current=!1,this.disabled=!1)}render(){let t=this.isLink(),e=this.notInteractive?Q`div`:t?Q`a`:Q`button`,r=this.hasSlotController.test("label"),a=this.label?!0:r,n=this.hasSlotController.test("[default]"),d=this.description?!0:n;return F`<div role="listitem" part="base" class="${c("flex pt-1",this.orientation==="horizontal"?"flex-col w-full":"flex-row gap-4 items-stretch h-full w-min overflow-hidden",!this.disabled&&!this.current&&!this.notInteractive&&"group")}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><div part="circle-and-tail-container" class="${c("flex shrink-0 gap-2",this.noTail&&"w-max",this.orientation==="horizontal"?"flex-row":"flex-col items-stretch",this.orientation==="horizontal"?this.size==="lg"?"translateLg":"translateSm":this.size==="lg"?"mt-1":"mt-3")}"><${e} part="circle" href="${w(t?this.href:void 0)}" aria-disabled="${w(this.disabled||void 0)}" aria-current="${this.current?"step":void 0}" aria-labelledby="${w(this.notInteractive||!a?void 0:"label")}" aria-describedby="${w(this.notInteractive||!d?void 0:"description")}" class="${c("border rounded-full aspect-square circle flex items-center justify-center shrink-0 font-bold select-none",this.disabled?"focus-visible:outline-none cursor-not-allowed":"focus-visible:focus-outline group-hover:cursor-pointer",this.notInteractive?this.size==="lg"?"not-interactive-lg":"w-12":this.size==="lg"?"w-12":"w-8",this.disabled&&"border-neutral-400 text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&"border-primary group-hover:bg-primary-100 group-hover:border-primary-500",this.notInteractive&&"border-neutral-400",this.current&&"bg-accent border-none text-white")}"><slot name="circle-content" class="${c(!this.disabled&&!this.current&&!this.notInteractive&&"text-primary group-hover:text-primary-500 group-hover:fill-primary-500",this.notInteractive&&"text-primary",this.size==="lg"?"text-lg":"text-sm")}">${!this.disabled&&!this.current&&!this.notInteractive?F`<sd-icon name="status-check" library="system"></sd-icon>`:F`${this.index}`}</slot></${e}>${this.noTail?"":F`<div part="tail" class="${c(this.orientation==="horizontal"?"border-t w-full my-auto mr-2":"border-l flex-grow flex-shrink-0 basis-auto h-full w-[1px] mx-auto",!this.disabled&&!this.current&&!this.notInteractive?" border-primary group-hover:border-primary-500":"border-neutral-400")}"></div>`}</div><div part="text-container" class="${c("mt-4 break-words flex flex-col gap-2",this.orientation==="horizontal"?"text-center w-40":"w-max text-left",this.disabled&&"!text-neutral-700",this.notInteractive?"ml-3":"mr-4")}"><div part="label" id="label" class="${c("!font-bold sd-paragraph",this.disabled&&"!text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive?"!text-primary group-hover:!text-primary-500 group-hover:cursor-pointer":"text-black")}"><slot name="label">${this.label}</slot></div><div part="description" id="description" class="${c("sd-paragraph sd-paragraph--size-sm",this.disabled&&"!text-neutral-700")}">${this.description||F`<slot></slot>`}</div></div></div>`}};st.styles=[...m.styles,v`:host{flex:1 1 0%}:host([no-tail]){flex-grow:0}.translateLg{transform:translateX(3.438rem)}.translateSm{transform:translateX(4rem)}.not-interactive-lg{width:4.5rem}`],o([l({type:String,reflect:!0})],st.prototype,"size",2),o([l({type:String,reflect:!0})],st.prototype,"orientation",2),o([l({type:Boolean,reflect:!0})],st.prototype,"disabled",2),o([l({type:Boolean,reflect:!0})],st.prototype,"current",2),o([l({reflect:!0,type:Boolean,attribute:"no-tail"})],st.prototype,"noTail",2),o([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],st.prototype,"notInteractive",2),o([l({type:String,reflect:!0})],st.prototype,"label",2),o([l({type:String,reflect:!0})],st.prototype,"description",2),o([l({type:Number,reflect:!0,attribute:"index"})],st.prototype,"index",2),o([l({type:String,reflect:!0})],st.prototype,"href",2),o([x("current")],st.prototype,"handleCurrentChange",1),o([x("disabled")],st.prototype,"handleDisabledChange",1),o([x("notInteractive")],st.prototype,"handleInteractivityChange",1),st=o([y("sd-step")],st);var gt=class extends m{constructor(){super(...arguments);this.steps=[];this.size="lg";this.orientation="horizontal";this.activeStep=0;this.notInteractive=!1;this.label=""}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.steps=this.getAllSteps(),this.steps[this.steps.length-1].noTail=!0;let t;this.steps.forEach((e,r)=>{e.index=r+1,e.size=this.size,e.orientation=this.orientation,this.notInteractive?(e.current=!1,e.disabled=!1,e.notInteractive=!0):e.current&&(t=r)}),this.setActiveStep(t||this.activeStep)})}updateSize(){this.steps.forEach(t=>{t.size=this.size})}updateOrientation(){this.steps.forEach(t=>{t.orientation=this.orientation})}getAllSteps(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-step")}setActiveStep(t){t>=0&&t<this.steps.length&&!this.notInteractive&&(this.activeStep=t,this.steps.forEach((e,r)=>{r===t?e.current=!0:r>t?e.disabled=!0:e.current=!1}))}handleInteractivityChange(){this.notInteractive&&this.steps.forEach(t=>{t.current=!1,t.disabled=!1,t.notInteractive=!0})}render(){return u`<div role="${this.notInteractive?"group":"navigation"}" class="h-full" aria-label="${this.label}"><div role="list" part="base" class="${c("flex",this.orientation==="vertical"&&"flex-col h-full")}"><slot part="body"></slot></div></div>`}};gt.styles=[...m.styles,v`:host{width:-moz-max-content;width:max-content}`],o([b("[part=body]")],gt.prototype,"body",2),o([l({type:String,reflect:!0})],gt.prototype,"size",2),o([l({type:String,reflect:!0})],gt.prototype,"orientation",2),o([l({type:Number,reflect:!0,attribute:"active-step"})],gt.prototype,"activeStep",2),o([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],gt.prototype,"notInteractive",2),o([l({type:String,reflect:!0})],gt.prototype,"label",2),o([x("size",{waitUntilFirstUpdate:!0})],gt.prototype,"updateSize",1),o([x("orientation",{waitUntilFirstUpdate:!0})],gt.prototype,"updateOrientation",1),o([x("notInteractive")],gt.prototype,"handleInteractivityChange",1),gt=o([y("sd-step-group")],gt);var ot=class extends m{constructor(){super(...arguments);this.formControlController=new ht(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.showInvalidStyle=!1;this.title="";this.name="";this.disabled=!1;this.checked=!1;this.defaultChecked=!1;this.form="";this.required=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){return u`<label part="base" class="${c("group flex items-center text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed")}"><input id="input" class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" role="switch" title="${this.title}" name="${this.name}" value="${w(this.value)}" .checked="${he(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="invalid-message" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"}" class="${c(`relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100
171
171
  peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2
172
- peer-focus-visible:outline-primary`,this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?"border-error bg-error hover:bg-error-400":this.checked?"border-accent bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${c("w-2.5 h-2.5 rounded-full transition-transform ease-in-out duration-200",this.disabled&&this.checked?"bg-white translate-x-2":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?"bg-white -translate-x-2":this.checked?"translate-x-2 bg-white":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};ot.styles=[...m.styles,v`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label:after{content:" *"}`],o([b("input")],ot.prototype,"input",2),o([b("#invalid-message")],ot.prototype,"invalidMessage",2),o([$()],ot.prototype,"showInvalidStyle",2),o([l({type:String,reflect:!0})],ot.prototype,"title",2),o([l({type:String,reflect:!0})],ot.prototype,"name",2),o([l()],ot.prototype,"value",2),o([l({type:Boolean,reflect:!0})],ot.prototype,"disabled",2),o([l({type:Boolean,reflect:!0})],ot.prototype,"checked",2),o([It("checked")],ot.prototype,"defaultChecked",2),o([l({reflect:!0})],ot.prototype,"form",2),o([l({type:Boolean,reflect:!0})],ot.prototype,"required",2),o([x("disabled",{waitUntilFirstUpdate:!0})],ot.prototype,"handleDisabledChange",1),o([x(["checked"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleStateChange",1),ot=o([y("sd-switch")],ot);var bl=0,xt=class extends m{constructor(){super(...arguments);this.attrId=++bl;this.componentId=`sd-tab-${this.attrId}`;this.hasSlotController=new S(this,"left");this.variant="default";this.active=!1;this.disabled=!1;this.visuallyDisabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let t={left:this.hasSlotController.test("left")};return u`<div part="base" class="${c("inline-flex justify-center min-w-max items-center h-12 px-3 leading-none select-none cursor-pointer group relative focus-visible:focus-outline outline-2 !-outline-offset-2",this.variant==="container"&&" rounded-[4px_4px_0_0]",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled||this.visuallyDisabled?"!cursor-not-allowed":"hover:bg-neutral-200")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${c("flex h-full items-center justify-center whitespace-nowrap",this.disabled||this.visuallyDisabled&&"opacity-50 ")}"><slot name="left" class="${c(t.left&&"block pr-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><slot class="${c(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><div part="active-tab-indicator" class="${c((!this.active||this.disabled)&&"hidden","absolute bottom-0 h-1 bg-accent",this.variant==="default"?"w-full":"w-3/4 group-hover:w-full transition-all duration-200 ease-in-out")}"></div><div part="hover-bottom-border" class="${c(!this.active&&!this.disabled&&"absolute w-full h-0.25 bottom-0 border-b border-neutral-400 invisible group-hover:visible")}"></div></div></div>`}};xt.styles=[...m.styles,v`:host{box-sizing:border-box;display:block}.tab--active-container-border:after{border-width:1px;content:"";height:100%;position:absolute;width:100%;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));border-bottom:none;border-radius:4px 4px 0 0}`],o([b("[part=base]")],xt.prototype,"tab",2),o([l({type:String,reflect:!0})],xt.prototype,"variant",2),o([l({type:Boolean,reflect:!0})],xt.prototype,"active",2),o([l({type:Boolean,reflect:!0})],xt.prototype,"disabled",2),o([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],xt.prototype,"visuallyDisabled",2),o([l({type:String,reflect:!0})],xt.prototype,"panel",2),o([x("active")],xt.prototype,"handleActiveChange",1),o([x(["disabled","visually-disabled"])],xt.prototype,"handleDisabledChange",1),xt=o([y("sd-tab")],xt);var zt=class extends m{constructor(){super(...arguments);this.localize=new M(this);this.tabs=[];this.panels=[];this.hasScrollControls=!1;this.variant="default";this.activation="auto"}connectedCallback(){let t=Promise.all([customElements.whenDefined("sd-tab"),customElements.whenDefined("sd-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollControls()}),this.mutationObserver=new MutationObserver(e=>{e.some(r=>!["aria-labelledby","aria-controls"].includes(r.attributeName))&&setTimeout(()=>this.setAriaLabels()),e.some(r=>r.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),t.then(()=>{new IntersectionObserver((r,a)=>{var n;r[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((n=this.activeTab)!=null?n:this.tabs[0],{emitEvents:!1}),a.unobserve(r[0].target))}).observe(this.tabGroup)})})}disconnectedCallback(){var t;this.mutationObserver.disconnect(),this.nav&&((t=this.resizeObserver)==null||t.unobserve(this.nav))}getAllTabs(t={includeDisabled:!0}){let e=this.shadowRoot.querySelector('slot[name="nav"]');return Array.from(e.assignedElements()).map(r=>r.tagName.toLocaleLowerCase()==="sd-tab"?r:r.querySelector("sd-tab")).filter(r=>r&&t.includeDisabled?r.tagName.toLowerCase()==="sd-tab":r.tagName.toLowerCase()==="sd-tab"&&!r.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-tab-panel")}getActiveTab(){return this.tabs.find(t=>t.matches(":focus"))}handleClick(t){let r=t.target.closest("sd-tab");(r==null?void 0:r.closest("sd-tab-group"))===this&&r!==null&&this.setActiveTab(r,{scrollBehavior:"smooth"})}handleKeyDown(t){let r=t.target.closest("sd-tab");if((r==null?void 0:r.closest("sd-tab-group"))===this){if(["Enter"," "].includes(t.key)&&r!==null&&(this.setActiveTab(r,{scrollBehavior:"smooth"}),t.preventDefault()),["Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab());r!==null&&qt(this.tabs[n+1],this.nav,"horizontal")}if(["Shift","Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab());r!==null&&qt(this.tabs[n-1],this.nav,"horizontal")}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let n=this.tabs.find(h=>h.matches(":focus")),d=this.localize.dir()==="rtl";if((n==null?void 0:n.tagName.toLowerCase())==="sd-tab"){let h=this.tabs.indexOf(n);t.key==="Home"?h=0:t.key==="End"?h=this.tabs.length-1:t.key===(d?"ArrowRight":"ArrowLeft")||t.key==="ArrowUp"?h--:(t.key===(d?"ArrowLeft":"ArrowRight")||t.key==="ArrowDown")&&h++,h<0&&(h=this.tabs.length-1),h>this.tabs.length-1&&(h=0),this.tabs[h].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[h],{scrollBehavior:"smooth"}),qt(this.tabs[h],this.nav,"horizontal"),t.preventDefault()}}}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,e){if(e=H({emitEvents:!0,scrollBehavior:"auto"},e),t!==this.activeTab&&!t.disabled&&!t.visuallyDisabled){let r=this.activeTab;this.activeTab=t,this.tabs.map(a=>a.active=a===this.activeTab),this.panels.map(a=>{var n;return a.active=a.name===((n=this.activeTab)==null?void 0:n.panel)}),qt(this.activeTab,this.nav,"horizontal",e.scrollBehavior),e.emitEvents&&(r&&this.emit("sd-tab-hide",{detail:{name:r.panel}}),this.emit("sd-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(t=>{let e=this.panels.find(r=>r.name===t.panel);e&&t.setAttribute("aria-controls",e.getAttribute("id"))})}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.panels.forEach(t=>{t.tabIndex=0}),this.updateComplete.then(()=>this.updateScrollControls()),this.tabs.length!==0&&this.tabs[0].variant==="container"&&(this.variant="container")}updateScrollControls(){this.hasScrollControls=this.nav.scrollWidth>this.nav.clientWidth}show(t){let e=this.tabs.find(r=>r.panel===t);e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}render(){let t=this.localize.dir()==="rtl";return u`<div part="base" class="${c("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${c(this.hasScrollControls&&"relative py-0 px-12")}">${this.hasScrollControls?u`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${c("sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"left-auto right-0")}" @click="${this.handleScrollToStart}"><sd-icon library="system" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${c("flex flex-auto relative flex-row")}" role="tablist"><div part="separation" class="w-full border-[0.25px] border-neutral-400 absolute bottom-0"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls?u`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${c("sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"right-auto left-0")}" @click="${this.handleScrollToEnd}"><sd-icon library="system" name="${t?"chevron-down":"chevron-up"}" label="next" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}</div><slot part="body" class="${c("block auto py-8 px-6",this.variant==="container"&&"border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`}};zt.styles=[...m.styles,v`:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}:focus-within::slotted(sd-tab-panel){outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}::slotted(sd-tab-panel){--padding:1rem 0}`],o([b("[part=base]")],zt.prototype,"tabGroup",2),o([b("[part=body]")],zt.prototype,"body",2),o([b("[part=scroll-container]")],zt.prototype,"nav",2),o([$()],zt.prototype,"hasScrollControls",2),o([$()],zt.prototype,"variant",2),o([l({type:String,reflect:!0})],zt.prototype,"activation",2),zt=o([y("sd-tab-group")],zt);var vl=0,Zt=class extends m{constructor(){super(...arguments);this.attrId=++vl;this.componentId=`sd-tab-panel-${this.attrId}`;this.name="";this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return u`<slot part="base" class="${c("block",this.active&&"tab-panel--active")}"></slot>`}};Zt.styles=[...m.styles,v`:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],o([l({type:String,reflect:!0})],Zt.prototype,"name",2),o([l({type:Boolean,reflect:!0})],Zt.prototype,"active",2),o([x("active")],Zt.prototype,"handleActiveChange",1),Zt=o([y("sd-tab-panel")],Zt);var Dt=class extends m{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.hasSlotController=new S(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let t=this.variant==="white border-neutral-400"||this.inset,e={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline")};return u`<div class="${c("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],this._orientation==="vertical"&&"flex-col",this._orientation==="horizontal"&&"flex-row gap-8",this._orientation==="horizontal"&&t&&"py-8 px-10")}" part="base"><div style="${this._orientation==="horizontal"?`width: var(--distribution-content, 100%); ${t?"width: var(--distribution-content, calc(100% - 2rem));":""}`:""}" class="${c("flex flex-col text-left order-2",this._orientation==="horizontal"&&"flex flex-col",this._orientation==="vertical"&&t&&"m-4")}" part="content"><div class="flex flex-col-reverse"><div part="headline" class="${c("text-lg font-bold m-0",this.variant==="primary"?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. &lt;h2>)</slot></div><div part="meta" class="${c("gap-2 mb-4",!e["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${c(!e["teaser-has-default"]&&"hidden")}" role="group" aria-labelledby="headline"><slot></slot></div></div><div part="media" id="media" style="${this._orientation==="horizontal"?"width: var(--distribution-media, 100%);":""}" class="${c("order-1",!t&&this._orientation==="vertical"&&"mb-4",!e["teaser-has-media"]&&"hidden",this.variant==="white border-neutral-400"&&this._orientation==="vertical"&&"mx-[-1px] mt-[-1px]")}"><slot name="media"></slot></div></div>`}};Dt.styles=[...m.styles,v`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}`],o([l({type:String,reflect:!0})],Dt.prototype,"variant",2),o([l({reflect:!0,type:Number})],Dt.prototype,"breakpoint",2),o([l({type:Boolean,reflect:!0})],Dt.prototype,"inset",2),o([b('[part="base"]')],Dt.prototype,"teaser",2),o([$()],Dt.prototype,"_orientation",2),Dt=o([y("sd-teaser")],Dt);var oe=class extends m{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new S(this,"[default]","media","meta","headline","expandable")}render(){let t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return u`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${c("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.6] to-60%")}"></div><div class="${c({white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"bg-neutral-100/[.8] group-hover:bg-neutral-100/90",primary:"bg-primary/[.8] text-white group-hover:bg-primary/90","primary-100":"bg-primary-100/[.8] group-hover:bg-primary-100/90","gradient-light":"bg-gradient-to-t from-white/90 to-white/[.8]","gradient-dark":"bg-gradient-to-t from-primary-800/75 to-primary-800/[.6] text-white"}[this.variant])}"><div class="flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here (e. g. &lt;h2>)</slot></div><div part="meta" class="${c("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${c("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${c(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${c("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};oe.styles=[...m.styles,v`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}:host([variant=white]) .background:focus-within{background-color:rgb(var(--sd-color-white,255 255 255)/var(--sd-opacity-90,.9))}:host([variant=neutral-100]) .background:focus-within{background-color:rgb(var(--sd-color-neutral-100,246 246 246)/var(--sd-opacity-90,.9))}:host([variant=primary]) .background:focus-within{background-color:rgb(var(--sd-color-primary,0 53 142)/var(--sd-opacity-90,.9))}:host([variant=primary-100]) .background:focus-within{background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--sd-opacity-90,.9))}`],o([l({type:String,reflect:!0})],oe.prototype,"variant",2),o([b('[part="base"]')],oe.prototype,"teaserMedia",2),oe=o([y("sd-teaser-media")],oe);var D=class extends m{constructor(){super(...arguments);this.formControlController=new ht(this);this.hasSlotController=new S(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.form="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(t){if(t){typeof t.top=="number"&&(this.textarea.scrollTop=t.top),typeof t.left=="number"&&(this.textarea.scrollLeft=t.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(t,e,r="none"){this.textarea.setSelectionRange(t,e,r)}setRangeText(t,e,r,a){this.textarea.setRangeText(t,e,r,a),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var t;return(t=this.textarea)==null?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(t){this.textarea.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,a=!!t.tooltip,n=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",d=this.size==="sm"?"text-sm":"text-base",h={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return u`<div part="form-control" class="flex flex-col h-full text-left">${e||a?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c(e?"inline-block":"hidden",d)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${c("absolute w-full h-full pointer-events-none border rounded-default",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[n])}"></div><div part="base" class="${c("textarea h-full flex items-top rounded-default group",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",n==="disabled"||n==="visuallyDisabled"?"text-neutral-500":"text-black")}"><textarea part="textarea" id="input" class="${c("ps-4 flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none group-has-[sd-icon]:pe-8",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],this.disabled&&"cursor-not-allowed",d)}" title="${this.title}" name="${w(this.name)}" .value="${he(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${w(this.placeholder)}" minlength="${w(this.minlength)}" maxlength="${w(this.maxlength)}" rows="${w(this.rows)}" autocapitalize="${w(this.autocapitalize)}" autocorrect="${w(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${w(this.spellcheck)}" enterkeyhint="${w(this.enterkeyhint)}" inputmode="${w(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?u`<sd-icon class="${c("text-error absolute right-4 bg-white pointer-events-none group-hover:bg-neutral-200",h)}" library="system" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon class="${c("text-success absolute right-4 bg-white pointer-events-none group-hover:bg-neutral-200",h)}" library="system" name="status-check" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",r?"block":"hidden")}" aria-hidden="${r?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};D.styles=[...m.styles,v`:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([required]) #label:after{content:" *"}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],o([b("#input")],D.prototype,"textarea",2),o([b("#invalid-message")],D.prototype,"invalidMessage",2),o([$()],D.prototype,"hasFocus",2),o([$()],D.prototype,"showValidStyle",2),o([$()],D.prototype,"showInvalidStyle",2),o([l({type:String,reflect:!0})],D.prototype,"title",2),o([l({type:String,reflect:!0})],D.prototype,"name",2),o([l()],D.prototype,"value",2),o([l({type:String,reflect:!0})],D.prototype,"size",2),o([l({type:String,reflect:!0})],D.prototype,"label",2),o([l({type:String,attribute:"help-text",reflect:!0})],D.prototype,"helpText",2),o([l({type:String,reflect:!0})],D.prototype,"placeholder",2),o([l({type:Number,reflect:!0})],D.prototype,"rows",2),o([l({type:Boolean,reflect:!0})],D.prototype,"disabled",2),o([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],D.prototype,"visuallyDisabled",2),o([l({type:Boolean,reflect:!0})],D.prototype,"readonly",2),o([l({type:String,reflect:!0})],D.prototype,"form",2),o([l({type:Boolean,reflect:!0})],D.prototype,"required",2),o([l({type:Number,reflect:!0})],D.prototype,"minlength",2),o([l({type:Number,reflect:!0})],D.prototype,"maxlength",2),o([l({type:String,reflect:!0})],D.prototype,"autocapitalize",2),o([l({type:String,reflect:!0})],D.prototype,"autocorrect",2),o([l({reflect:!0})],D.prototype,"autocomplete",2),o([l({type:Boolean,reflect:!0})],D.prototype,"autofocus",2),o([l({type:String,reflect:!0})],D.prototype,"enterkeyhint",2),o([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],D.prototype,"styleOnValid",2),o([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],D.prototype,"spellcheck",2),o([l({type:String,reflect:!0})],D.prototype,"inputmode",2),o([It()],D.prototype,"defaultValue",2),o([x("disabled",{waitUntilFirstUpdate:!0})],D.prototype,"handleDisabledChange",1),o([x("rows",{waitUntilFirstUpdate:!0})],D.prototype,"handleRowsChange",1),o([x("value",{waitUntilFirstUpdate:!0})],D.prototype,"handleValueChange",1),D=o([y("sd-textarea")],D);var at=class extends m{constructor(){super(...arguments);this.localize=new M(this);this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction)}get hasCustomTrigger(){return!!this.querySelector("*:not([slot])")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(r=>{var a,n;r.nodeType===Node.TEXT_NODE&&!((a=r==null?void 0:r.textContent)!=null&&a.trim())&&((n=r==null?void 0:r.parentNode)==null||n.removeChild(r))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let t=Ye(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasTrigger("hover")){let t=Ye(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),t)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await j(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=B(this,"tooltip.show",{dir:this.localize.dir()});await N(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await j(this.body);let{keyframes:t,options:e}=B(this,"tooltip.hide",{dir:this.localize.dir()});await N(this.popup.popup,t,e),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),q(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return u`<sd-popup part="base" exportparts="
172
+ peer-focus-visible:outline-primary transition-colors ease-in-out duration-medium hover:duration-fast`,this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?"border-error hover:border-error-400 bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"border-accent hover:bg-accent-550 bg-accent hover:border-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${c("w-2.5 h-2.5 rounded-full transition[transform,colors] ease-in-out duration-medium",this.disabled&&this.checked?"bg-white translate-x-2":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?"bg-white -translate-x-2":this.checked?"translate-x-2 bg-white":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};ot.styles=[...m.styles,v`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label:after{content:" *"}`],o([b("input")],ot.prototype,"input",2),o([b("#invalid-message")],ot.prototype,"invalidMessage",2),o([$()],ot.prototype,"showInvalidStyle",2),o([l({type:String,reflect:!0})],ot.prototype,"title",2),o([l({type:String,reflect:!0})],ot.prototype,"name",2),o([l()],ot.prototype,"value",2),o([l({type:Boolean,reflect:!0})],ot.prototype,"disabled",2),o([l({type:Boolean,reflect:!0})],ot.prototype,"checked",2),o([It("checked")],ot.prototype,"defaultChecked",2),o([l({reflect:!0})],ot.prototype,"form",2),o([l({type:Boolean,reflect:!0})],ot.prototype,"required",2),o([x("disabled",{waitUntilFirstUpdate:!0})],ot.prototype,"handleDisabledChange",1),o([x(["checked"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleStateChange",1),ot=o([y("sd-switch")],ot);var bl=0,xt=class extends m{constructor(){super(...arguments);this.attrId=++bl;this.componentId=`sd-tab-${this.attrId}`;this.hasSlotController=new S(this,"left");this.variant="default";this.active=!1;this.disabled=!1;this.visuallyDisabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let t={left:this.hasSlotController.test("left")};return u`<div part="base" class="${c("inline-flex justify-center min-w-max items-center h-12 px-3 leading-none select-none cursor-pointer group relative focus-visible:focus-outline outline-2 !-outline-offset-2",this.variant==="container"&&" rounded-[4px_4px_0_0]",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled||this.visuallyDisabled?"!cursor-not-allowed":"hover:bg-neutral-200")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${c("flex h-full items-center justify-center whitespace-nowrap",this.disabled||this.visuallyDisabled&&"opacity-50 ")}"><slot name="left" class="${c(t.left&&"block pr-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><slot class="${c(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><div part="active-tab-indicator" class="${c((!this.active||this.disabled)&&"hidden","absolute bottom-0 h-1 bg-accent",this.variant==="default"?"w-full":"w-3/4 group-hover:w-full transition-all duration-200 ease-in-out")}"></div><div part="hover-bottom-border" class="${c(!this.active&&!this.disabled&&"absolute w-full h-0.25 bottom-0 border-b border-neutral-400 invisible group-hover:visible")}"></div></div></div>`}};xt.styles=[...m.styles,v`:host{box-sizing:border-box;display:block}.tab--active-container-border:after{border-width:1px;content:"";height:100%;position:absolute;width:100%;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));border-bottom:none;border-radius:4px 4px 0 0}`],o([b("[part=base]")],xt.prototype,"tab",2),o([l({type:String,reflect:!0})],xt.prototype,"variant",2),o([l({type:Boolean,reflect:!0})],xt.prototype,"active",2),o([l({type:Boolean,reflect:!0})],xt.prototype,"disabled",2),o([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],xt.prototype,"visuallyDisabled",2),o([l({type:String,reflect:!0})],xt.prototype,"panel",2),o([x("active")],xt.prototype,"handleActiveChange",1),o([x(["disabled","visually-disabled"])],xt.prototype,"handleDisabledChange",1),xt=o([y("sd-tab")],xt);var zt=class extends m{constructor(){super(...arguments);this.localize=new M(this);this.tabs=[];this.panels=[];this.hasScrollControls=!1;this.variant="default";this.activation="auto"}connectedCallback(){let t=Promise.all([customElements.whenDefined("sd-tab"),customElements.whenDefined("sd-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollControls()}),this.mutationObserver=new MutationObserver(e=>{e.some(r=>!["aria-labelledby","aria-controls"].includes(r.attributeName))&&setTimeout(()=>this.setAriaLabels()),e.some(r=>r.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),t.then(()=>{new IntersectionObserver((r,a)=>{var n;r[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((n=this.activeTab)!=null?n:this.tabs[0],{emitEvents:!1}),a.unobserve(r[0].target))}).observe(this.tabGroup)})})}disconnectedCallback(){var t;this.mutationObserver.disconnect(),this.nav&&((t=this.resizeObserver)==null||t.unobserve(this.nav))}getAllTabs(t={includeDisabled:!0}){let e=this.shadowRoot.querySelector('slot[name="nav"]');return Array.from(e.assignedElements()).map(r=>r.tagName.toLocaleLowerCase()==="sd-tab"?r:r.querySelector("sd-tab")).filter(r=>r&&t.includeDisabled?r.tagName.toLowerCase()==="sd-tab":r.tagName.toLowerCase()==="sd-tab"&&!r.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-tab-panel")}getActiveTab(){return this.tabs.find(t=>t.matches(":focus"))}handleClick(t){let r=t.target.closest("sd-tab");(r==null?void 0:r.closest("sd-tab-group"))===this&&r!==null&&this.setActiveTab(r,{scrollBehavior:"smooth"})}handleKeyDown(t){let r=t.target.closest("sd-tab");if((r==null?void 0:r.closest("sd-tab-group"))===this){if(["Enter"," "].includes(t.key)&&r!==null&&(this.setActiveTab(r,{scrollBehavior:"smooth"}),t.preventDefault()),["Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab());r!==null&&qt(this.tabs[n+1],this.nav,"horizontal")}if(["Shift","Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab());r!==null&&qt(this.tabs[n-1],this.nav,"horizontal")}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let n=this.tabs.find(h=>h.matches(":focus")),d=this.localize.dir()==="rtl";if((n==null?void 0:n.tagName.toLowerCase())==="sd-tab"){let h=this.tabs.indexOf(n);t.key==="Home"?h=0:t.key==="End"?h=this.tabs.length-1:t.key===(d?"ArrowRight":"ArrowLeft")||t.key==="ArrowUp"?h--:(t.key===(d?"ArrowLeft":"ArrowRight")||t.key==="ArrowDown")&&h++,h<0&&(h=this.tabs.length-1),h>this.tabs.length-1&&(h=0),this.tabs[h].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[h],{scrollBehavior:"smooth"}),qt(this.tabs[h],this.nav,"horizontal"),t.preventDefault()}}}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,e){if(e=H({emitEvents:!0,scrollBehavior:"auto"},e),t!==this.activeTab&&!t.disabled&&!t.visuallyDisabled){let r=this.activeTab;this.activeTab=t,this.tabs.map(a=>a.active=a===this.activeTab),this.panels.map(a=>{var n;return a.active=a.name===((n=this.activeTab)==null?void 0:n.panel)}),qt(this.activeTab,this.nav,"horizontal",e.scrollBehavior),e.emitEvents&&(r&&this.emit("sd-tab-hide",{detail:{name:r.panel}}),this.emit("sd-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(t=>{let e=this.panels.find(r=>r.name===t.panel);e&&t.setAttribute("aria-controls",e.getAttribute("id"))})}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.panels.forEach(t=>{t.tabIndex=0}),this.updateComplete.then(()=>this.updateScrollControls()),this.tabs.length!==0&&this.tabs[0].variant==="container"&&(this.variant="container")}updateScrollControls(){this.hasScrollControls=this.nav.scrollWidth>this.nav.clientWidth}show(t){let e=this.tabs.find(r=>r.panel===t);e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}render(){let t=this.localize.dir()==="rtl";return u`<div part="base" class="${c("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${c(this.hasScrollControls&&"relative py-0 px-12")}">${this.hasScrollControls?u`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${c("sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"left-auto right-0")}" @click="${this.handleScrollToStart}"><sd-icon library="system" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${c("flex flex-auto relative flex-row")}" role="tablist"><div part="separation" class="w-full border-[0.25px] border-neutral-400 absolute bottom-0"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls?u`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${c("sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"right-auto left-0")}" @click="${this.handleScrollToEnd}"><sd-icon library="system" name="${t?"chevron-down":"chevron-up"}" label="next" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}</div><slot part="body" class="${c("block auto py-8 px-6",this.variant==="container"&&"border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`}};zt.styles=[...m.styles,v`:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}:focus-within::slotted(sd-tab-panel){outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}::slotted(sd-tab-panel){--padding:1rem 0}`],o([b("[part=base]")],zt.prototype,"tabGroup",2),o([b("[part=body]")],zt.prototype,"body",2),o([b("[part=scroll-container]")],zt.prototype,"nav",2),o([$()],zt.prototype,"hasScrollControls",2),o([$()],zt.prototype,"variant",2),o([l({type:String,reflect:!0})],zt.prototype,"activation",2),zt=o([y("sd-tab-group")],zt);var vl=0,Zt=class extends m{constructor(){super(...arguments);this.attrId=++vl;this.componentId=`sd-tab-panel-${this.attrId}`;this.name="";this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return u`<slot part="base" class="${c("block",this.active&&"tab-panel--active")}"></slot>`}};Zt.styles=[...m.styles,v`:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],o([l({type:String,reflect:!0})],Zt.prototype,"name",2),o([l({type:Boolean,reflect:!0})],Zt.prototype,"active",2),o([x("active")],Zt.prototype,"handleActiveChange",1),Zt=o([y("sd-tab-panel")],Zt);var Dt=class extends m{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.hasSlotController=new S(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let t=this.variant==="white border-neutral-400"||this.inset,e={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline")};return u`<div class="${c("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],this._orientation==="vertical"&&"flex-col",this._orientation==="horizontal"&&"flex-row gap-8",this._orientation==="horizontal"&&t&&"py-8 px-10")}" part="base"><div style="${this._orientation==="horizontal"?`width: var(--distribution-content, 100%); ${t?"width: var(--distribution-content, calc(100% - 2rem));":""}`:""}" class="${c("flex flex-col text-left order-2",this._orientation==="horizontal"&&"flex flex-col",this._orientation==="vertical"&&t&&"m-4")}" part="content"><div class="flex flex-col-reverse"><div part="headline" class="${c("text-lg font-bold m-0",this.variant==="primary"?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. &lt;h2>)</slot></div><div part="meta" class="${c("gap-2 mb-4",!e["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${c(!e["teaser-has-default"]&&"hidden")}" role="group" aria-labelledby="headline"><slot></slot></div></div><div part="media" id="media" style="${this._orientation==="horizontal"?"width: var(--distribution-media, 100%);":""}" class="${c("order-1",!t&&this._orientation==="vertical"&&"mb-4",!e["teaser-has-media"]&&"hidden",this.variant==="white border-neutral-400"&&this._orientation==="vertical"&&"mx-[-1px] mt-[-1px]")}"><slot name="media"></slot></div></div>`}};Dt.styles=[...m.styles,v`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}`],o([l({type:String,reflect:!0})],Dt.prototype,"variant",2),o([l({reflect:!0,type:Number})],Dt.prototype,"breakpoint",2),o([l({type:Boolean,reflect:!0})],Dt.prototype,"inset",2),o([b('[part="base"]')],Dt.prototype,"teaser",2),o([$()],Dt.prototype,"_orientation",2),Dt=o([y("sd-teaser")],Dt);var oe=class extends m{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new S(this,"[default]","media","meta","headline","expandable")}render(){let t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return u`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${c("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.6] to-60%")}"></div><div class="${c({white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"bg-neutral-100/[.8] group-hover:bg-neutral-100/90",primary:"bg-primary/[.8] text-white group-hover:bg-primary/90","primary-100":"bg-primary-100/[.8] group-hover:bg-primary-100/90","gradient-light":"bg-gradient-to-t from-white/90 to-white/[.8]","gradient-dark":"bg-gradient-to-t from-primary-800/75 to-primary-800/[.6] text-white"}[this.variant])}"><div class="flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here (e. g. &lt;h2>)</slot></div><div part="meta" class="${c("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${c("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${c(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${c("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};oe.styles=[...m.styles,v`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}:host([variant=white]) .background:focus-within{background-color:rgb(var(--sd-color-white,255 255 255)/var(--sd-opacity-90,.9))}:host([variant=neutral-100]) .background:focus-within{background-color:rgb(var(--sd-color-neutral-100,246 246 246)/var(--sd-opacity-90,.9))}:host([variant=primary]) .background:focus-within{background-color:rgb(var(--sd-color-primary,0 53 142)/var(--sd-opacity-90,.9))}:host([variant=primary-100]) .background:focus-within{background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--sd-opacity-90,.9))}`],o([l({type:String,reflect:!0})],oe.prototype,"variant",2),o([b('[part="base"]')],oe.prototype,"teaserMedia",2),oe=o([y("sd-teaser-media")],oe);var D=class extends m{constructor(){super(...arguments);this.formControlController=new ht(this);this.hasSlotController=new S(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.form="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(t){if(t){typeof t.top=="number"&&(this.textarea.scrollTop=t.top),typeof t.left=="number"&&(this.textarea.scrollLeft=t.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(t,e,r="none"){this.textarea.setSelectionRange(t,e,r)}setRangeText(t,e,r,a){this.textarea.setRangeText(t,e,r,a),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var t;return(t=this.textarea)==null?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(t){this.textarea.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,a=!!t.tooltip,n=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",d=this.size==="sm"?"text-sm":"text-base",h={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return u`<div part="form-control" class="flex flex-col h-full text-left">${e||a?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c(e?"inline-block":"hidden",d)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${c("absolute w-full h-full pointer-events-none border rounded-default",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[n])}"></div><div part="base" class="${c("textarea h-full flex items-top rounded-default group",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",n==="disabled"||n==="visuallyDisabled"?"text-neutral-500":"text-black")}"><textarea part="textarea" id="input" class="${c("ps-4 flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none group-has-[sd-icon]:pe-8",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],this.disabled&&"cursor-not-allowed",d)}" title="${this.title}" name="${w(this.name)}" .value="${he(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${w(this.placeholder)}" minlength="${w(this.minlength)}" maxlength="${w(this.maxlength)}" rows="${w(this.rows)}" autocapitalize="${w(this.autocapitalize)}" autocorrect="${w(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${w(this.spellcheck)}" enterkeyhint="${w(this.enterkeyhint)}" inputmode="${w(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?u`<sd-icon class="${c("text-error absolute right-4 bg-white pointer-events-none group-hover:bg-neutral-200",h)}" library="system" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon class="${c("text-success absolute right-4 bg-white pointer-events-none group-hover:bg-neutral-200",h)}" library="system" name="status-check" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",r?"block":"hidden")}" aria-hidden="${r?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};D.styles=[...m.styles,v`:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([required]) #label:after{content:" *"}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],o([b("#input")],D.prototype,"textarea",2),o([b("#invalid-message")],D.prototype,"invalidMessage",2),o([$()],D.prototype,"hasFocus",2),o([$()],D.prototype,"showValidStyle",2),o([$()],D.prototype,"showInvalidStyle",2),o([l({type:String,reflect:!0})],D.prototype,"title",2),o([l({type:String,reflect:!0})],D.prototype,"name",2),o([l()],D.prototype,"value",2),o([l({type:String,reflect:!0})],D.prototype,"size",2),o([l({type:String,reflect:!0})],D.prototype,"label",2),o([l({type:String,attribute:"help-text",reflect:!0})],D.prototype,"helpText",2),o([l({type:String,reflect:!0})],D.prototype,"placeholder",2),o([l({type:Number,reflect:!0})],D.prototype,"rows",2),o([l({type:Boolean,reflect:!0})],D.prototype,"disabled",2),o([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],D.prototype,"visuallyDisabled",2),o([l({type:Boolean,reflect:!0})],D.prototype,"readonly",2),o([l({type:String,reflect:!0})],D.prototype,"form",2),o([l({type:Boolean,reflect:!0})],D.prototype,"required",2),o([l({type:Number,reflect:!0})],D.prototype,"minlength",2),o([l({type:Number,reflect:!0})],D.prototype,"maxlength",2),o([l({type:String,reflect:!0})],D.prototype,"autocapitalize",2),o([l({type:String,reflect:!0})],D.prototype,"autocorrect",2),o([l({reflect:!0})],D.prototype,"autocomplete",2),o([l({type:Boolean,reflect:!0})],D.prototype,"autofocus",2),o([l({type:String,reflect:!0})],D.prototype,"enterkeyhint",2),o([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],D.prototype,"styleOnValid",2),o([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],D.prototype,"spellcheck",2),o([l({type:String,reflect:!0})],D.prototype,"inputmode",2),o([It()],D.prototype,"defaultValue",2),o([x("disabled",{waitUntilFirstUpdate:!0})],D.prototype,"handleDisabledChange",1),o([x("rows",{waitUntilFirstUpdate:!0})],D.prototype,"handleRowsChange",1),o([x("value",{waitUntilFirstUpdate:!0})],D.prototype,"handleValueChange",1),D=o([y("sd-textarea")],D);var at=class extends m{constructor(){super(...arguments);this.localize=new M(this);this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction)}get hasCustomTrigger(){return!!this.querySelector("*:not([slot])")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(r=>{var a,n;r.nodeType===Node.TEXT_NODE&&!((a=r==null?void 0:r.textContent)!=null&&a.trim())&&((n=r==null?void 0:r.parentNode)==null||n.removeChild(r))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let t=Ye(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasTrigger("hover")){let t=Ye(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),t)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await j(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=B(this,"tooltip.show",{dir:this.localize.dir()});await N(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await j(this.body);let{keyframes:t,options:e}=B(this,"tooltip.hide",{dir:this.localize.dir()});await N(this.popup.popup,t,e),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),q(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return u`<sd-popup part="base" exportparts="
173
173
  popup:base__popup,
174
174
  arrow:base__arrow
175
175
  " class="${c(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[t?"start":e?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger?u`<slot slot="anchor"></slot>`:u`<button slot="anchor" aria-describedby="tooltip" class="${c("flex sd-interactive rounded-full",this.size==="lg"?"text-xl":"text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-icon library="system" name="info-circle" label="Tooltip" class="${c(this.disabled&&"sd-interactive--disabled")}"></sd-icon></button>`}<slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-popup>`}};at.styles=[...m.styles,v`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-popup[placement^=top]::part(popup){transform-origin:bottom}sd-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],o([b("slot:not([name])")],at.prototype,"defaultSlot",2),o([b("#tooltip")],at.prototype,"body",2),o([b("sd-popup")],at.prototype,"popup",2),o([l({type:String,reflect:!0})],at.prototype,"size",2),o([l({type:String,reflect:!0})],at.prototype,"content",2),o([l({type:String,reflect:!0})],at.prototype,"placement",2),o([l({type:Boolean,reflect:!0})],at.prototype,"disabled",2),o([l({type:Boolean,reflect:!0})],at.prototype,"open",2),o([l({type:String,reflect:!0})],at.prototype,"trigger",2),o([l({type:Boolean,reflect:!0})],at.prototype,"hoist",2),o([x("open",{waitUntilFirstUpdate:!0})],at.prototype,"handleOpenChange",1),o([x(["content","hoist","placement"])],at.prototype,"handleOptionsChange",1),o([x("disabled")],at.prototype,"handleDisabledChange",1),at=o([y("sd-tooltip")],at);I("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}});I("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});var Wt=class extends m{constructor(){super(...arguments);this.localize=new M(this);this.playing=!1;this.isBelowBreakpoint=!1;this.hasSlotController=new S(this,"[default]","play-icon","poster")}get poster(){let t=this.shadowRoot.querySelector("slot[name=poster]");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}get video(){return this.querySelector("video")}async hidePoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("sd-duration-medium",300))),this.poster.style.display="none")}setVideoInert(t){var e,r;t?(e=this.video)==null||e.setAttribute("inert",""):(r=this.video)==null||r.removeAttribute("inert")}play(){var t;this.emit("sd-play"),this.playing=!0,(t=this.video)==null||t.play(),this.hidePoster(),this.setVideoInert(!1)}handleKeydown(t){t instanceof KeyboardEvent&&(t.key==="Enter"||t.key===" ")&&(this.play(),setTimeout(()=>{var e;(e=this.video)==null||e.focus()}))}handleButtonResize(){this.hostEl.clientWidth<=414&&!this.isBelowBreakpoint&&(this.isBelowBreakpoint=!0),this.hostEl.clientWidth>414&&this.isBelowBreakpoint&&(this.isBelowBreakpoint=!1)}connectedCallback(){super.connectedCallback(),this.setVideoInert(!0),this.resizeObserver=new ResizeObserver(()=>this.handleButtonResize()),this.updateComplete.then(()=>{this.resizeObserver.observe(this.hostEl)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.hostEl)}render(){return u`<div part="base" class="cursor-pointer"><button part="play-button" aria-label="${this.localize.term("playVideo")}" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${c(this.playing&&"pointer-events-none","group w-full h-full absolute top-0 left-0 z-30 text-primary hover:text-primary-500 sd-interactive sd-interactive--reset focus-visible:focus-outline")}"><div part="play-button-bg" class="${c(this.playing?"opacity-0":"opacity-100",this.isBelowBreakpoint?"w-[48px] h-[48px]":"w-[96px] h-[96px]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white bg-opacity-75 rounded-full play-pause-transition outline-2 outline-offset-2 group-focus-visible:outline")}"><slot name="play-icon" part="play-icon" class="${c(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-icon id="default-play-icon" library="system" name="start"></sd-icon></slot></div></button> ${this.hasSlotController.test("poster")?u`<div part="poster-wrapper" class="absolute left-0 top-0 w-full z-10 overflow-hidden"><slot name="poster" role="presentation"></slot></div>`:null}<slot></slot></div>`}};Wt.styles=[...m.styles,v`:host{display:inline-block;overflow:hidden;position:relative}.play-pause-transition,::slotted([slot=poster]){--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}#default-play-icon,::slotted([slot=play-icon]){left:50%;position:absolute;top:50%;--tw-translate-x:-50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:has([part=play-button]:hover) ::slotted([slot=poster]){--tw-scale-x:1.1!important;--tw-scale-y:1.1!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}`],o([b("[part=base]")],Wt.prototype,"hostEl",2),o([l({type:Boolean,reflect:!0})],Wt.prototype,"playing",2),o([l({type:Boolean})],Wt.prototype,"isBelowBreakpoint",2),Wt=o([y("sd-video")],Wt);function yl(s,{setValueOnSelection:i,scrollSelectionIntoView:t}={setValueOnSelection:!0,scrollSelectionIntoView:!0}){let e=s?typeof s=="string"?document.querySelector(s):s:document.querySelector("#autoComplete"),r=e.shadowRoot.querySelector("input"),a=n=>n[0];return r.addEventListener("init",()=>{var f,g;let n=(f=e.shadowRoot)==null?void 0:f.querySelector("ul");n==null||n.setAttribute("part","listbox");let d=document.createElement("sd-popup");d.appendChild(n),(g=e.shadowRoot)==null||g.appendChild(d),d==null||d.setAttribute("exportparts","popup__content"),d&&(d.active=!1,d.autoSize="vertical",d.autoSizePadding=16,d.placement="bottom-start",d.anchor=e,d.sync="width");let h=a`sd-popup::part(popup){border-bottom-left-radius:var(--sd-border-radius-default,.25rem);border-bottom-right-radius:var(--sd-border-radius-default,.25rem);border-width:0 2px 2px;overflow-y:scroll;z-index:var(--sd-z-index-dropdown,900);--tw-border-opacity:1;border-color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-2,.5rem);--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-popup li{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}sd-popup li:hover:not([disabled]){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-100,246 246 246)/var(--tw-bg-opacity,1))}sd-popup li{list-style-type:""}sd-popup li mark{background-color:transparent;font-weight:700}sd-popup li:not(:has(sd-option)){cursor:pointer;font-size:var(--sd-font-size-base,1rem);padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-4,1rem);--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity,1))}sd-popup li:not(:has(sd-option)):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1))}sd-popup li[aria-selected=true]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1))}`,p=new CSSStyleSheet;p.replaceSync(h),e.shadowRoot.adoptedStyleSheets=[...e.shadowRoot.adoptedStyleSheets,p]}),i&&r.addEventListener("selection",n=>{var d;e.value=(d=n==null?void 0:n.detail)==null?void 0:d.selection.value}),r.addEventListener("open",()=>{var n,d,h,p,f,g;(d=(n=e.shadowRoot)==null?void 0:n.querySelector("sd-popup"))==null||d.setAttribute("active","true"),(p=(h=e.shadowRoot)==null?void 0:h.querySelector('[part="border"]'))==null||p.classList.add("rounded-b-none"),(g=(f=e.shadowRoot)==null?void 0:f.querySelector('[part="form-control"]'))==null||g.classList.add("z-50")}),r.addEventListener("close",()=>{var n,d,h,p,f,g;(d=(n=e.shadowRoot)==null?void 0:n.querySelector("sd-popup"))==null||d.removeAttribute("active"),(p=(h=e.shadowRoot)==null?void 0:h.querySelector('[part="border"]'))==null||p.classList.remove("rounded-b-none"),(g=(f=e.shadowRoot)==null?void 0:f.querySelector('[part="form-control"]'))==null||g.classList.remove("z-50")}),t&&r.addEventListener("navigate",()=>{let n=e.shadowRoot.querySelector('[aria-selected="true"]');n==null||n.scrollIntoView({block:"nearest"})}),{config:{selector:()=>r,resultsList:{tag:"ul"},wrapper:!1}}}return zo(wl);})();