@solid-design-system/components 5.17.3 → 5.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/chunks/{chunk.OALWSM3O.js → chunk.2BJ2C4KJ.js} +1 -1
- package/cdn/chunks/{chunk.RA443RIU.js → chunk.3JWASMHA.js} +1 -1
- package/cdn/chunks/{chunk.EJ53UZAH.js → chunk.4J65J73K.js} +1 -1
- package/cdn/chunks/{chunk.WXCWIGGA.js → chunk.5NA5FPVP.js} +1 -1
- package/cdn/chunks/{chunk.QA4IMHPN.js → chunk.BNEUFNMD.js} +1 -1
- package/cdn/chunks/{chunk.3IIXXHDU.js → chunk.CGRZP57A.js} +1 -1
- package/cdn/chunks/{chunk.A3JIHNSA.js → chunk.CRNIIYRQ.js} +1 -1
- package/cdn/chunks/{chunk.2EALHLXK.js → chunk.DDWSCBR4.js} +1 -1
- package/cdn/chunks/{chunk.NHRDKMJ2.js → chunk.FQIDFHLC.js} +1 -1
- package/cdn/chunks/{chunk.77ILLS4Y.js → chunk.GOSISPTJ.js} +1 -1
- package/cdn/chunks/{chunk.GL6UZCPR.js → chunk.HSNB4ATX.js} +1 -1
- package/cdn/chunks/{chunk.DQZCD222.js → chunk.JG6RMAYJ.js} +1 -1
- package/cdn/chunks/{chunk.Y2W5QWC2.js → chunk.KCCQQPC4.js} +1 -1
- package/cdn/chunks/{chunk.5QEHHAZM.js → chunk.KJBQCEBR.js} +1 -1
- package/cdn/chunks/{chunk.XC3BXXLT.js → chunk.KVGDPJCO.js} +1 -1
- package/cdn/chunks/{chunk.AIKEEW3O.js → chunk.KVPWZ3SQ.js} +1 -1
- package/cdn/chunks/{chunk.P27UO4F7.js → chunk.MVHKKRCJ.js} +1 -1
- package/cdn/chunks/{chunk.JBCMRE2B.js → chunk.N5IH4J5O.js} +1 -1
- package/cdn/chunks/{chunk.6VP2ZCAS.js → chunk.NUXZZZOB.js} +1 -1
- package/cdn/chunks/{chunk.VT6UO2RZ.js → chunk.OJDTF27C.js} +1 -1
- package/cdn/chunks/{chunk.CBKOYO75.js → chunk.POZTBFKZ.js} +1 -1
- package/cdn/chunks/{chunk.RB7JD5HX.js → chunk.PW3ZAK5N.js} +1 -1
- package/cdn/chunks/{chunk.ONID6Y4B.js → chunk.QTBRQZA4.js} +1 -1
- package/cdn/chunks/{chunk.CB5UZBO7.js → chunk.S7ISN7A3.js} +1 -1
- package/cdn/chunks/{chunk.QY52MD43.js → chunk.SBEFJOEM.js} +1 -1
- package/cdn/chunks/{chunk.VFHY6JH5.js → chunk.SWLB4ROM.js} +1 -1
- package/cdn/chunks/{chunk.UYOW77KV.js → chunk.SZ735ZPQ.js} +1 -1
- package/cdn/chunks/{chunk.5RICNJCU.js → chunk.VLNSVRON.js} +1 -1
- package/cdn/chunks/{chunk.B3KOELSU.js → chunk.WU3EK7GA.js} +1 -1
- package/cdn/chunks/{chunk.D522QBIA.js → chunk.XKAZX6LK.js} +1 -1
- package/cdn/chunks/{chunk.26UUKTU3.js → chunk.Y7WD7FKF.js} +1 -1
- package/cdn/chunks/{chunk.PUVBXT4E.js → chunk.YQDY7B5X.js} +1 -1
- package/cdn/chunks/{chunk.JFW27V4M.js → chunk.ZKTAW77Y.js} +1 -1
- package/cdn/components/accordion/accordion.js +1 -1
- package/cdn/components/accordion-group/accordion-group.js +1 -1
- package/cdn/components/audio/audio.js +1 -1
- package/cdn/components/breadcrumb/breadcrumb.d.ts +2 -0
- package/cdn/components/breadcrumb/breadcrumb.js +1 -1
- package/cdn/components/breadcrumb-item/breadcrumb-item.d.ts +1 -0
- package/cdn/components/breadcrumb-item/breadcrumb-item.js +1 -1
- package/cdn/components/button/button.js +1 -1
- package/cdn/components/carousel/carousel.js +1 -1
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/datepicker/datepicker.js +1 -1
- package/cdn/components/dialog/dialog.js +1 -1
- package/cdn/components/drawer/drawer.js +1 -1
- package/cdn/components/dropdown/dropdown.js +1 -1
- package/cdn/components/expandable/expandable.js +1 -1
- package/cdn/components/flipcard/flipcard.js +1 -1
- package/cdn/components/input/input.js +1 -1
- package/cdn/components/link/link.js +1 -1
- package/cdn/components/loader/loader.js +1 -1
- package/cdn/components/navigation-item/navigation-item.js +1 -1
- package/cdn/components/notification/notification.js +1 -1
- package/cdn/components/optgroup/optgroup.js +1 -1
- package/cdn/components/quickfact/quickfact.js +1 -1
- package/cdn/components/radio-button/radio-button.js +1 -1
- package/cdn/components/range/range.js +1 -1
- package/cdn/components/range-tick/range-tick.js +1 -1
- package/cdn/components/scrollable/scrollable.js +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/spinner/spinner.js +1 -1
- package/cdn/components/step/step.js +1 -1
- package/cdn/components/switch/switch.js +1 -1
- package/cdn/components/tab/tab.js +1 -1
- package/cdn/components/tab-group/tab-group.js +1 -1
- package/cdn/components/tag/tag.js +1 -1
- package/cdn/components/textarea/textarea.js +1 -1
- package/cdn/components/tooltip/tooltip.js +1 -1
- package/cdn/components/video/video.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +9 -9
- package/cdn/solid-components.iife.js +9 -9
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/{chunk.OALWSM3O.js → chunk.2BJ2C4KJ.js} +2 -2
- package/cdn-versioned/chunks/chunk.2RB56T64.js +1 -1
- package/cdn-versioned/chunks/{chunk.RA443RIU.js → chunk.3JWASMHA.js} +1 -1
- package/cdn-versioned/chunks/{chunk.EJ53UZAH.js → chunk.4J65J73K.js} +1 -1
- package/cdn-versioned/chunks/chunk.554VRD5O.js +1 -1
- package/cdn-versioned/chunks/{chunk.WXCWIGGA.js → chunk.5NA5FPVP.js} +1 -1
- package/cdn-versioned/chunks/chunk.5U7KWI7D.js +1 -1
- package/cdn-versioned/chunks/chunk.6AAU7PWL.js +1 -1
- package/cdn-versioned/chunks/chunk.74MFKQVH.js +1 -1
- package/cdn-versioned/chunks/chunk.7VPHQARL.js +1 -1
- package/cdn-versioned/chunks/chunk.B3VZW2ML.js +1 -1
- package/cdn-versioned/chunks/chunk.BNEUFNMD.js +1 -0
- package/cdn-versioned/chunks/chunk.CBHHJZN6.js +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/{chunk.3IIXXHDU.js → chunk.CGRZP57A.js} +4 -4
- package/cdn-versioned/chunks/{chunk.A3JIHNSA.js → chunk.CRNIIYRQ.js} +1 -1
- package/cdn-versioned/chunks/{chunk.2EALHLXK.js → chunk.DDWSCBR4.js} +1 -1
- package/cdn-versioned/chunks/chunk.F53EIQNF.js +1 -1
- package/cdn-versioned/chunks/{chunk.NHRDKMJ2.js → chunk.FQIDFHLC.js} +1 -1
- package/cdn-versioned/chunks/{chunk.77ILLS4Y.js → chunk.GOSISPTJ.js} +2 -2
- package/cdn-versioned/chunks/chunk.GQDFOCWS.js +1 -1
- package/cdn-versioned/chunks/chunk.HJ4O4XQA.js +1 -1
- package/cdn-versioned/chunks/chunk.HQ24LF7U.js +1 -1
- package/cdn-versioned/chunks/{chunk.GL6UZCPR.js → chunk.HSNB4ATX.js} +2 -2
- package/cdn-versioned/chunks/chunk.IFFIHJ7H.js +1 -1
- package/cdn-versioned/chunks/{chunk.DQZCD222.js → chunk.JG6RMAYJ.js} +4 -4
- package/cdn-versioned/chunks/chunk.JRAB7FGM.js +1 -1
- package/cdn-versioned/chunks/{chunk.Y2W5QWC2.js → chunk.KCCQQPC4.js} +2 -2
- package/cdn-versioned/chunks/{chunk.5QEHHAZM.js → chunk.KJBQCEBR.js} +1 -1
- package/cdn-versioned/chunks/{chunk.XC3BXXLT.js → chunk.KVGDPJCO.js} +1 -1
- package/cdn-versioned/chunks/{chunk.AIKEEW3O.js → chunk.KVPWZ3SQ.js} +1 -1
- package/cdn-versioned/chunks/{chunk.P27UO4F7.js → chunk.MVHKKRCJ.js} +1 -1
- package/cdn-versioned/chunks/chunk.N3DPICKQ.js +1 -1
- package/cdn-versioned/chunks/{chunk.JBCMRE2B.js → chunk.N5IH4J5O.js} +1 -1
- package/cdn-versioned/chunks/chunk.NRBNWX7R.js +1 -1
- package/cdn-versioned/chunks/{chunk.6VP2ZCAS.js → chunk.NUXZZZOB.js} +1 -1
- package/cdn-versioned/chunks/{chunk.VT6UO2RZ.js → chunk.OJDTF27C.js} +1 -1
- package/cdn-versioned/chunks/chunk.P4PCDJDP.js +1 -1
- package/cdn-versioned/chunks/chunk.PL3XERRG.js +1 -1
- package/cdn-versioned/chunks/{chunk.CBKOYO75.js → chunk.POZTBFKZ.js} +1 -1
- package/cdn-versioned/chunks/{chunk.RB7JD5HX.js → chunk.PW3ZAK5N.js} +1 -1
- package/cdn-versioned/chunks/chunk.QHA5FHZ4.js +1 -1
- package/cdn-versioned/chunks/chunk.QRBNZ6PN.js +1 -1
- package/cdn-versioned/chunks/{chunk.ONID6Y4B.js → chunk.QTBRQZA4.js} +1 -1
- package/cdn-versioned/chunks/chunk.R3MXPZLV.js +1 -1
- package/cdn-versioned/chunks/{chunk.CB5UZBO7.js → chunk.S7ISN7A3.js} +1 -1
- package/cdn-versioned/chunks/{chunk.QY52MD43.js → chunk.SBEFJOEM.js} +1 -1
- package/cdn-versioned/chunks/{chunk.VFHY6JH5.js → chunk.SWLB4ROM.js} +1 -1
- package/cdn-versioned/chunks/{chunk.UYOW77KV.js → chunk.SZ735ZPQ.js} +1 -1
- package/cdn-versioned/chunks/chunk.TAGI2L4O.js +1 -1
- package/cdn-versioned/chunks/chunk.U46CUDX6.js +1 -1
- package/cdn-versioned/chunks/chunk.VFQHNBSI.js +1 -1
- package/cdn-versioned/chunks/{chunk.5RICNJCU.js → chunk.VLNSVRON.js} +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/{chunk.B3KOELSU.js → chunk.WU3EK7GA.js} +1 -1
- package/cdn-versioned/chunks/chunk.WWJY5MSS.js +1 -1
- package/cdn-versioned/chunks/chunk.XG5NB6MH.js +1 -1
- package/cdn-versioned/chunks/{chunk.D522QBIA.js → chunk.XKAZX6LK.js} +1 -1
- package/cdn-versioned/chunks/chunk.XSWG5G46.js +1 -1
- package/cdn-versioned/chunks/{chunk.26UUKTU3.js → chunk.Y7WD7FKF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.PUVBXT4E.js → chunk.YQDY7B5X.js} +1 -1
- package/cdn-versioned/chunks/chunk.YVT3NH6Q.js +1 -1
- package/cdn-versioned/chunks/{chunk.JFW27V4M.js → chunk.ZKTAW77Y.js} +1 -1
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion/accordion.js +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.js +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.js +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +3 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.js +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +2 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.js +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button/button.js +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.js +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.js +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/cdn-versioned/components/datepicker/datepicker.js +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.js +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.js +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.js +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.js +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.js +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/input/input.js +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/link/link.js +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.js +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.js +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.js +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.js +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.js +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range/range.js +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.js +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.js +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/select/select.js +1 -1
- package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/spinner/spinner.js +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step/step.js +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.js +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.js +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.js +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.js +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.js +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.js +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/components/video/video.js +1 -1
- package/cdn-versioned/custom-elements.json +248 -248
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +15 -15
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +16 -16
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +94 -94
- package/cdn-versioned/web-types.json +163 -163
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb.js +15 -1
- package/dist/components/breadcrumb-item/breadcrumb-item.d.ts +1 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.js +3 -1
- package/dist/components/combobox/combobox.js +1 -1
- package/dist/components/select/select.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +11 -11
- package/dist/web-types.json +1 -1
- package/dist-versioned/chunks/chunk.22JGWQHD.js +1 -1
- package/dist-versioned/chunks/chunk.23MU4JA7.js +2 -2
- package/dist-versioned/chunks/chunk.2SPLNABG.js +2 -2
- package/dist-versioned/chunks/chunk.2YP3NW54.js +6 -6
- package/dist-versioned/chunks/chunk.35JOBQN4.js +3 -3
- package/dist-versioned/chunks/chunk.3EBQKONT.js +12 -12
- package/dist-versioned/chunks/chunk.45D7TZY2.js +1 -1
- package/dist-versioned/chunks/chunk.4JRGV2NE.js +3 -3
- package/dist-versioned/chunks/chunk.5ELWG4EZ.js +1 -1
- package/dist-versioned/chunks/chunk.5XO674YZ.js +1 -1
- package/dist-versioned/chunks/chunk.6AKV5ZRR.js +2 -2
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.6LF3BYIY.js +1 -1
- package/dist-versioned/chunks/{chunk.TJSVPPLH.js → chunk.6NUXZTM2.js} +3 -3
- package/dist-versioned/chunks/chunk.6RK24NSS.js +24 -24
- package/dist-versioned/chunks/chunk.76BN4PS7.js +3 -3
- package/dist-versioned/chunks/chunk.7UTDD55I.js +3 -3
- package/dist-versioned/chunks/chunk.B3QSQ6K7.js +2 -2
- package/dist-versioned/chunks/chunk.CJ7IHVFY.js +1 -1
- package/dist-versioned/chunks/chunk.CURHDJV6.js +2 -2
- package/dist-versioned/chunks/chunk.CVZH2VLL.js +2 -2
- package/dist-versioned/chunks/chunk.D2O3R3AC.js +26 -26
- package/dist-versioned/chunks/chunk.EBA2FO3J.js +4 -4
- package/dist-versioned/chunks/chunk.EGKZTSJA.js +4 -4
- package/dist-versioned/chunks/chunk.EX2IEIQK.js +5 -5
- package/dist-versioned/chunks/chunk.EZZAAWNK.js +4 -4
- package/dist-versioned/chunks/chunk.FRJAG3MQ.js +1 -1
- package/dist-versioned/chunks/chunk.FUCATISJ.js +4 -4
- package/dist-versioned/chunks/chunk.FWUEEHWY.js +3 -3
- package/dist-versioned/chunks/chunk.H2XMCGBK.js +5 -5
- package/dist-versioned/chunks/chunk.H7UEA2NY.js +1 -1
- package/dist-versioned/chunks/chunk.HTE3DLUD.js +2 -2
- package/dist-versioned/chunks/chunk.IITIHE4Z.js +1 -1
- package/dist-versioned/chunks/chunk.JTJV2AFL.js +1 -1
- package/dist-versioned/chunks/chunk.K6PSDQZI.js +8 -8
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KFBDKQWY.js +5 -5
- package/dist-versioned/chunks/chunk.KS2U7CKH.js +2 -2
- package/dist-versioned/chunks/chunk.KUFA6W6P.js +11 -11
- package/dist-versioned/chunks/chunk.LWQJ57CH.js +14 -14
- package/dist-versioned/chunks/chunk.MEJBDCOK.js +5 -5
- package/dist-versioned/chunks/chunk.OSB344JT.js +1 -1
- package/dist-versioned/chunks/chunk.OTS2TILR.js +1 -1
- package/dist-versioned/chunks/chunk.OV64576E.js +2 -2
- package/dist-versioned/chunks/chunk.PCW75LUJ.js +2 -2
- package/dist-versioned/chunks/chunk.PUZMRDRJ.js +2 -2
- package/dist-versioned/chunks/chunk.Q5Z4C6HX.js +5 -5
- package/dist-versioned/chunks/chunk.SA3RNF6V.js +2 -2
- package/dist-versioned/chunks/chunk.SNMM5N5T.js +12 -12
- package/dist-versioned/chunks/chunk.TJ25B2BK.js +6 -6
- package/dist-versioned/chunks/chunk.UIJDENWT.js +2 -2
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.VELQG4FG.js +1 -1
- package/dist-versioned/chunks/chunk.VJRTQGCU.js +3 -3
- package/dist-versioned/chunks/chunk.VVVV5UPF.js +1 -1
- package/dist-versioned/chunks/chunk.VW5P7PCS.js +1 -1
- package/dist-versioned/chunks/chunk.WGE2DGAT.js +2 -2
- package/dist-versioned/chunks/chunk.X6JCFJHB.js +1 -1
- package/dist-versioned/chunks/chunk.XCQC3F3H.js +3 -3
- package/dist-versioned/chunks/chunk.Y7FP242S.js +2 -2
- package/dist-versioned/chunks/chunk.YRMXXHY5.js +2 -2
- package/dist-versioned/chunks/{chunk.CQ67F2XR.js → chunk.YXOOAMIC.js} +6 -6
- package/dist-versioned/chunks/chunk.ZYCUZKFW.js +1 -1
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +3 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.js +15 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +2 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.js +3 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.js +1 -1
- package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/select/select.js +1 -1
- package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +248 -248
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +11 -11
- package/dist-versioned/vscode.html-custom-data.json +94 -94
- package/dist-versioned/web-types.json +163 -163
- package/package.json +1 -1
- package/cdn-versioned/chunks/chunk.QA4IMHPN.js +0 -1
- /package/dist/chunks/{chunk.TJSVPPLH.js → chunk.6NUXZTM2.js} +0 -0
- /package/dist/chunks/{chunk.CQ67F2XR.js → chunk.YXOOAMIC.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var SolidComponents=(()=>{var fi=Object.defineProperty,ja=Object.defineProperties,os=Object.getOwnPropertyDescriptor,Wa=Object.getOwnPropertyDescriptors,Xa=Object.getOwnPropertyNames,Vi=Object.getOwnPropertySymbols;var Cr=Object.prototype.hasOwnProperty,ns=Object.prototype.propertyIsEnumerable;var as=(s,i,t)=>i in s?fi(s,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[i]=t,N=(s,i)=>{for(var t in i||(i={}))Cr.call(i,t)&&as(s,t,i[t]);if(Vi)for(var t of Vi(i))ns.call(i,t)&&as(s,t,i[t]);return s},bt=(s,i)=>ja(s,Wa(i));var Fi=(s,i)=>{var t={};for(var e in s)Cr.call(s,e)&&i.indexOf(e)<0&&(t[e]=s[e]);if(s!=null&&Vi)for(var e of Vi(s))i.indexOf(e)<0&&ns.call(s,e)&&(t[e]=s[e]);return t};var ls=(s,i)=>{for(var t in i)fi(s,t,{get:i[t],enumerable:!0})},Za=(s,i,t,e)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of Xa(i))!Cr.call(s,r)&&r!==t&&fi(s,r,{get:()=>i[r],enumerable:!(e=os(i,r))||e.enumerable});return s};var Qa=s=>Za(fi({},"__esModule",{value:!0}),s),a=(s,i,t,e)=>{for(var r=e>1?void 0:e?os(i,t):i,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=(e?n(i,t,r):n(r))||r);return e&&r&&fi(i,t,r),r};var id={};ls(id,{LocalizeController:()=>A,SdAccordion:()=>Tt,SdAccordionGroup:()=>ce,SdAnimation:()=>at,SdAudio:()=>lt,SdBadge:()=>ie,SdBrandshape:()=>jt,SdBreadcrumb:()=>_t,SdBreadcrumbItem:()=>Yt,SdButton:()=>Z,SdCarousel:()=>Q,SdCarouselItem:()=>he,SdCheckbox:()=>ot,SdCheckboxGroup:()=>Rt,SdCombobox:()=>z,SdDatepicker:()=>_,SdDialog:()=>Ht,SdDivider:()=>me,SdDrawer:()=>vt,SdDropdown:()=>dt,SdExpandable:()=>Nt,SdFlipcard:()=>Vt,SdHeader:()=>oe,SdIcon:()=>At,SdInclude:()=>Zt,SdInput:()=>H,SdLink:()=>Ot,SdLoader:()=>we,SdMapMarker:()=>Ft,SdMenu:()=>Ee,SdMenuItem:()=>kt,SdNavigationItem:()=>ct,SdNotification:()=>yt,SdOptgroup:()=>Qt,SdOption:()=>gt,SdPopup:()=>G,SdQuickfact:()=>$e,SdRadio:()=>wt,SdRadioButton:()=>Mt,SdRadioGroup:()=>et,SdRange:()=>rt,SdRangeTick:()=>Le,SdScrollable:()=>ht,SdSelect:()=>V,SdSkeleton:()=>Me,SdSpinner:()=>Se,SdStep:()=>nt,SdStepGroup:()=>St,SdSwitch:()=>mt,SdTab:()=>zt,SdTabGroup:()=>Ct,SdTabPanel:()=>ne,SdTag:()=>Lt,SdTeaser:()=>qt,SdTeaserMedia:()=>fe,SdTextarea:()=>R,SdTooltip:()=>ft,SdVideo:()=>le,registerIconLibrary:()=>Bs,setupAutocomplete:()=>ed,unregisterIconLibrary:()=>_r});var Bi=globalThis,Ri=Bi.ShadowRoot&&(Bi.ShadyCSS===void 0||Bi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Er=Symbol(),ds=new WeakMap,gi=class{constructor(i,t,e){if(this._$cssResult$=!0,e!==Er)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=i,this.t=t}get styleSheet(){let i=this.o,t=this.t;if(Ri&&i===void 0){let e=t!==void 0&&t.length===1;e&&(i=ds.get(t)),i===void 0&&((this.o=i=new CSSStyleSheet).replaceSync(this.cssText),e&&ds.set(t,i))}return i}toString(){return this.cssText}},Ui=s=>new gi(typeof s=="string"?s:s+"",void 0,Er),x=(s,...i)=>{let t=s.length===1?s[0]:i.reduce(((e,r,o)=>e+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+s[o+1]),s[0]);return new gi(t,s,Er)},cs=(s,i)=>{if(Ri)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(let t of i){let e=document.createElement("style"),r=Bi.litNonce;r!==void 0&&e.setAttribute("nonce",r),e.textContent=t.cssText,s.appendChild(e)}},$r=Ri?s=>s:s=>s instanceof CSSStyleSheet?(i=>{let t="";for(let e of i.cssRules)t+=e.cssText;return Ui(t)})(s):s;var{is:Ga,defineProperty:Ja,getOwnPropertyDescriptor:to,getOwnPropertyNames:eo,getOwnPropertySymbols:io,getPrototypeOf:ro}=Object,De=globalThis,hs=De.trustedTypes,so=hs?hs.emptyScript:"",Tr=De.reactiveElementPolyfillSupport,bi=(s,i)=>s,Ae={toAttribute(s,i){switch(i){case Boolean:s=s?so:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,i){let t=s;switch(i){case Boolean:t=s!==null;break;case Number:t=s===null?null:Number(s);break;case Object:case Array:try{t=JSON.parse(s)}catch(e){t=null}}return t}},Ni=(s,i)=>!Ga(s,i),ps={attribute:!0,type:String,converter:Ae,reflect:!1,useDefault:!1,hasChanged:Ni},us,ms;(us=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(ms=De.litPropertyMetadata)!=null||(De.litPropertyMetadata=new WeakMap);var be=class extends HTMLElement{static addInitializer(i){var t;this._$Ei(),((t=this.l)!=null?t:this.l=[]).push(i)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(i,t=ps){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(i)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(i,t),!t.noAccessor){let e=Symbol(),r=this.getPropertyDescriptor(i,e,t);r!==void 0&&Ja(this.prototype,i,r)}}static getPropertyDescriptor(i,t,e){var n;let{get:r,set:o}=(n=to(this.prototype,i))!=null?n:{get(){return this[t]},set(d){this[t]=d}};return{get:r,set(d){let c=r==null?void 0:r.call(this);o==null||o.call(this,d),this.requestUpdate(i,c,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(i){var t;return(t=this.elementProperties.get(i))!=null?t:ps}static _$Ei(){if(this.hasOwnProperty(bi("elementProperties")))return;let i=ro(this);i.finalize(),i.l!==void 0&&(this.l=[...i.l]),this.elementProperties=new Map(i.elementProperties)}static finalize(){if(this.hasOwnProperty(bi("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(bi("properties"))){let t=this.properties,e=[...eo(t),...io(t)];for(let r of e)this.createProperty(r,t[r])}let i=this[Symbol.metadata];if(i!==null){let t=litPropertyMetadata.get(i);if(t!==void 0)for(let[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(let[t,e]of this.elementProperties){let r=this._$Eu(t,e);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(i){let t=[];if(Array.isArray(i)){let e=new Set(i.flat(1/0).reverse());for(let r of e)t.unshift($r(r))}else i!==void 0&&t.push($r(i));return t}static _$Eu(i,t){let e=t.attribute;return e===!1?void 0:typeof e=="string"?e:typeof i=="string"?i.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var i;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(i=this.constructor.l)==null||i.forEach((t=>t(this)))}addController(i){var t,e;((t=this._$EO)!=null?t:this._$EO=new Set).add(i),this.renderRoot!==void 0&&this.isConnected&&((e=i.hostConnected)==null||e.call(i))}removeController(i){var t;(t=this._$EO)==null||t.delete(i)}_$E_(){let i=new Map,t=this.constructor.elementProperties;for(let e of t.keys())this.hasOwnProperty(e)&&(i.set(e,this[e]),delete this[e]);i.size>0&&(this._$Ep=i)}createRenderRoot(){var t;let i=(t=this.shadowRoot)!=null?t:this.attachShadow(this.constructor.shadowRootOptions);return cs(i,this.constructor.elementStyles),i}connectedCallback(){var i,t;(i=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((e=>{var r;return(r=e.hostConnected)==null?void 0:r.call(e)}))}enableUpdating(i){}disconnectedCallback(){var i;(i=this._$EO)==null||i.forEach((t=>{var e;return(e=t.hostDisconnected)==null?void 0:e.call(t)}))}attributeChangedCallback(i,t,e){this._$AK(i,e)}_$ET(i,t){var o;let e=this.constructor.elementProperties.get(i),r=this.constructor._$Eu(i,e);if(r!==void 0&&e.reflect===!0){let n=(((o=e.converter)==null?void 0:o.toAttribute)!==void 0?e.converter:Ae).toAttribute(t,e.type);this._$Em=i,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(i,t){var o,n,d,c;let e=this.constructor,r=e._$Eh.get(i);if(r!==void 0&&this._$Em!==r){let p=e.getPropertyOptions(r),m=typeof p.converter=="function"?{fromAttribute:p.converter}:((o=p.converter)==null?void 0:o.fromAttribute)!==void 0?p.converter:Ae;this._$Em=r,this[r]=(c=(d=m.fromAttribute(t,p.type))!=null?d:(n=this._$Ej)==null?void 0:n.get(r))!=null?c:null,this._$Em=null}}requestUpdate(i,t,e){var r,o;if(i!==void 0){let n=this.constructor,d=this[i];if(e!=null||(e=n.getPropertyOptions(i)),!(((r=e.hasChanged)!=null?r:Ni)(d,t)||e.useDefault&&e.reflect&&d===((o=this._$Ej)==null?void 0:o.get(i))&&!this.hasAttribute(n._$Eu(i,e))))return;this.C(i,t,e)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(i,t,{useDefault:e,reflect:r,wrapped:o},n){var d,c,p;e&&!((d=this._$Ej)!=null?d:this._$Ej=new Map).has(i)&&(this._$Ej.set(i,(c=n!=null?n:t)!=null?c:this[i]),o!==!0||n!==void 0)||(this._$AL.has(i)||(this.hasUpdated||e||(t=void 0),this._$AL.set(i,t)),r===!0&&this._$Em!==i&&((p=this._$Eq)!=null?p:this._$Eq=new Set).add(i))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let i=this.scheduleUpdate();return i!=null&&await i,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e,r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,d]of this._$Ep)this[n]=d;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,d]of o){let{wrapped:c}=d,p=this[n];c!==!0||this._$AL.has(n)||p===void 0||this.C(n,void 0,d,p)}}let i=!1,t=this._$AL;try{i=this.shouldUpdate(t),i?(this.willUpdate(t),(r=this._$EO)==null||r.forEach((o=>{var n;return(n=o.hostUpdate)==null?void 0:n.call(o)})),this.update(t)):this._$EM()}catch(o){throw i=!1,this._$EM(),o}i&&this._$AE(t)}willUpdate(i){}_$AE(i){var t;(t=this._$EO)==null||t.forEach((e=>{var r;return(r=e.hostUpdated)==null?void 0:r.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(i)),this.updated(i)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(i){return!0}update(i){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(i){}firstUpdated(i){}},fs;be.elementStyles=[],be.shadowRootOptions={mode:"open"},be[bi("elementProperties")]=new Map,be[bi("finalized")]=new Map,Tr==null||Tr({ReactiveElement:be}),((fs=De.reactiveElementVersions)!=null?fs:De.reactiveElementVersions=[]).push("2.1.0");var yi=globalThis,qi=yi.trustedTypes,gs=qi?qi.createPolicy("lit-html",{createHTML:s=>s}):void 0,Sr="$lit$",ve=`lit$${Math.random().toFixed(9).slice(2)}$`,zr="?"+ve,ao=`<${zr}>`,Re=document,wi=()=>Re.createComment(""),xi=s=>s===null||typeof s!="object"&&typeof s!="function",Dr=Array.isArray,Cs=s=>Dr(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",Lr=`[
|
|
1
|
+
"use strict";var SolidComponents=(()=>{var fi=Object.defineProperty,ja=Object.defineProperties,os=Object.getOwnPropertyDescriptor,Wa=Object.getOwnPropertyDescriptors,Xa=Object.getOwnPropertyNames,Vi=Object.getOwnPropertySymbols;var Cr=Object.prototype.hasOwnProperty,ns=Object.prototype.propertyIsEnumerable;var as=(s,i,t)=>i in s?fi(s,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[i]=t,N=(s,i)=>{for(var t in i||(i={}))Cr.call(i,t)&&as(s,t,i[t]);if(Vi)for(var t of Vi(i))ns.call(i,t)&&as(s,t,i[t]);return s},bt=(s,i)=>ja(s,Wa(i));var Fi=(s,i)=>{var t={};for(var e in s)Cr.call(s,e)&&i.indexOf(e)<0&&(t[e]=s[e]);if(s!=null&&Vi)for(var e of Vi(s))i.indexOf(e)<0&&ns.call(s,e)&&(t[e]=s[e]);return t};var ls=(s,i)=>{for(var t in i)fi(s,t,{get:i[t],enumerable:!0})},Za=(s,i,t,e)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of Xa(i))!Cr.call(s,r)&&r!==t&&fi(s,r,{get:()=>i[r],enumerable:!(e=os(i,r))||e.enumerable});return s};var Qa=s=>Za(fi({},"__esModule",{value:!0}),s),a=(s,i,t,e)=>{for(var r=e>1?void 0:e?os(i,t):i,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=(e?n(i,t,r):n(r))||r);return e&&r&&fi(i,t,r),r};var id={};ls(id,{LocalizeController:()=>A,SdAccordion:()=>Tt,SdAccordionGroup:()=>ce,SdAnimation:()=>at,SdAudio:()=>lt,SdBadge:()=>ie,SdBrandshape:()=>jt,SdBreadcrumb:()=>Pt,SdBreadcrumbItem:()=>Yt,SdButton:()=>Z,SdCarousel:()=>G,SdCarouselItem:()=>ue,SdCheckbox:()=>ot,SdCheckboxGroup:()=>Ut,SdCombobox:()=>z,SdDatepicker:()=>_,SdDialog:()=>Ht,SdDivider:()=>me,SdDrawer:()=>vt,SdDropdown:()=>dt,SdExpandable:()=>Nt,SdFlipcard:()=>Vt,SdHeader:()=>oe,SdIcon:()=>At,SdInclude:()=>Zt,SdInput:()=>H,SdLink:()=>Ot,SdLoader:()=>we,SdMapMarker:()=>Ft,SdMenu:()=>Ee,SdMenuItem:()=>kt,SdNavigationItem:()=>ct,SdNotification:()=>yt,SdOptgroup:()=>Qt,SdOption:()=>gt,SdPopup:()=>Q,SdQuickfact:()=>$e,SdRadio:()=>wt,SdRadioButton:()=>Mt,SdRadioGroup:()=>et,SdRange:()=>rt,SdRangeTick:()=>Le,SdScrollable:()=>ht,SdSelect:()=>V,SdSkeleton:()=>Me,SdSpinner:()=>Se,SdStep:()=>nt,SdStepGroup:()=>St,SdSwitch:()=>mt,SdTab:()=>zt,SdTabGroup:()=>Ct,SdTabPanel:()=>ne,SdTag:()=>Lt,SdTeaser:()=>qt,SdTeaserMedia:()=>fe,SdTextarea:()=>R,SdTooltip:()=>ft,SdVideo:()=>le,registerIconLibrary:()=>Bs,setupAutocomplete:()=>ed,unregisterIconLibrary:()=>_r});var Bi=globalThis,Ri=Bi.ShadowRoot&&(Bi.ShadyCSS===void 0||Bi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Er=Symbol(),ds=new WeakMap,gi=class{constructor(i,t,e){if(this._$cssResult$=!0,e!==Er)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=i,this.t=t}get styleSheet(){let i=this.o,t=this.t;if(Ri&&i===void 0){let e=t!==void 0&&t.length===1;e&&(i=ds.get(t)),i===void 0&&((this.o=i=new CSSStyleSheet).replaceSync(this.cssText),e&&ds.set(t,i))}return i}toString(){return this.cssText}},Ui=s=>new gi(typeof s=="string"?s:s+"",void 0,Er),x=(s,...i)=>{let t=s.length===1?s[0]:i.reduce(((e,r,o)=>e+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+s[o+1]),s[0]);return new gi(t,s,Er)},cs=(s,i)=>{if(Ri)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(let t of i){let e=document.createElement("style"),r=Bi.litNonce;r!==void 0&&e.setAttribute("nonce",r),e.textContent=t.cssText,s.appendChild(e)}},$r=Ri?s=>s:s=>s instanceof CSSStyleSheet?(i=>{let t="";for(let e of i.cssRules)t+=e.cssText;return Ui(t)})(s):s;var{is:Ga,defineProperty:Ja,getOwnPropertyDescriptor:to,getOwnPropertyNames:eo,getOwnPropertySymbols:io,getPrototypeOf:ro}=Object,De=globalThis,hs=De.trustedTypes,so=hs?hs.emptyScript:"",Tr=De.reactiveElementPolyfillSupport,bi=(s,i)=>s,Ae={toAttribute(s,i){switch(i){case Boolean:s=s?so:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,i){let t=s;switch(i){case Boolean:t=s!==null;break;case Number:t=s===null?null:Number(s);break;case Object:case Array:try{t=JSON.parse(s)}catch(e){t=null}}return t}},Ni=(s,i)=>!Ga(s,i),ps={attribute:!0,type:String,converter:Ae,reflect:!1,useDefault:!1,hasChanged:Ni},us,ms;(us=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(ms=De.litPropertyMetadata)!=null||(De.litPropertyMetadata=new WeakMap);var be=class extends HTMLElement{static addInitializer(i){var t;this._$Ei(),((t=this.l)!=null?t:this.l=[]).push(i)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(i,t=ps){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(i)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(i,t),!t.noAccessor){let e=Symbol(),r=this.getPropertyDescriptor(i,e,t);r!==void 0&&Ja(this.prototype,i,r)}}static getPropertyDescriptor(i,t,e){var n;let{get:r,set:o}=(n=to(this.prototype,i))!=null?n:{get(){return this[t]},set(d){this[t]=d}};return{get:r,set(d){let c=r==null?void 0:r.call(this);o==null||o.call(this,d),this.requestUpdate(i,c,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(i){var t;return(t=this.elementProperties.get(i))!=null?t:ps}static _$Ei(){if(this.hasOwnProperty(bi("elementProperties")))return;let i=ro(this);i.finalize(),i.l!==void 0&&(this.l=[...i.l]),this.elementProperties=new Map(i.elementProperties)}static finalize(){if(this.hasOwnProperty(bi("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(bi("properties"))){let t=this.properties,e=[...eo(t),...io(t)];for(let r of e)this.createProperty(r,t[r])}let i=this[Symbol.metadata];if(i!==null){let t=litPropertyMetadata.get(i);if(t!==void 0)for(let[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(let[t,e]of this.elementProperties){let r=this._$Eu(t,e);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(i){let t=[];if(Array.isArray(i)){let e=new Set(i.flat(1/0).reverse());for(let r of e)t.unshift($r(r))}else i!==void 0&&t.push($r(i));return t}static _$Eu(i,t){let e=t.attribute;return e===!1?void 0:typeof e=="string"?e:typeof i=="string"?i.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var i;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(i=this.constructor.l)==null||i.forEach((t=>t(this)))}addController(i){var t,e;((t=this._$EO)!=null?t:this._$EO=new Set).add(i),this.renderRoot!==void 0&&this.isConnected&&((e=i.hostConnected)==null||e.call(i))}removeController(i){var t;(t=this._$EO)==null||t.delete(i)}_$E_(){let i=new Map,t=this.constructor.elementProperties;for(let e of t.keys())this.hasOwnProperty(e)&&(i.set(e,this[e]),delete this[e]);i.size>0&&(this._$Ep=i)}createRenderRoot(){var t;let i=(t=this.shadowRoot)!=null?t:this.attachShadow(this.constructor.shadowRootOptions);return cs(i,this.constructor.elementStyles),i}connectedCallback(){var i,t;(i=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((e=>{var r;return(r=e.hostConnected)==null?void 0:r.call(e)}))}enableUpdating(i){}disconnectedCallback(){var i;(i=this._$EO)==null||i.forEach((t=>{var e;return(e=t.hostDisconnected)==null?void 0:e.call(t)}))}attributeChangedCallback(i,t,e){this._$AK(i,e)}_$ET(i,t){var o;let e=this.constructor.elementProperties.get(i),r=this.constructor._$Eu(i,e);if(r!==void 0&&e.reflect===!0){let n=(((o=e.converter)==null?void 0:o.toAttribute)!==void 0?e.converter:Ae).toAttribute(t,e.type);this._$Em=i,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(i,t){var o,n,d,c;let e=this.constructor,r=e._$Eh.get(i);if(r!==void 0&&this._$Em!==r){let p=e.getPropertyOptions(r),m=typeof p.converter=="function"?{fromAttribute:p.converter}:((o=p.converter)==null?void 0:o.fromAttribute)!==void 0?p.converter:Ae;this._$Em=r,this[r]=(c=(d=m.fromAttribute(t,p.type))!=null?d:(n=this._$Ej)==null?void 0:n.get(r))!=null?c:null,this._$Em=null}}requestUpdate(i,t,e){var r,o;if(i!==void 0){let n=this.constructor,d=this[i];if(e!=null||(e=n.getPropertyOptions(i)),!(((r=e.hasChanged)!=null?r:Ni)(d,t)||e.useDefault&&e.reflect&&d===((o=this._$Ej)==null?void 0:o.get(i))&&!this.hasAttribute(n._$Eu(i,e))))return;this.C(i,t,e)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(i,t,{useDefault:e,reflect:r,wrapped:o},n){var d,c,p;e&&!((d=this._$Ej)!=null?d:this._$Ej=new Map).has(i)&&(this._$Ej.set(i,(c=n!=null?n:t)!=null?c:this[i]),o!==!0||n!==void 0)||(this._$AL.has(i)||(this.hasUpdated||e||(t=void 0),this._$AL.set(i,t)),r===!0&&this._$Em!==i&&((p=this._$Eq)!=null?p:this._$Eq=new Set).add(i))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let i=this.scheduleUpdate();return i!=null&&await i,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e,r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,d]of this._$Ep)this[n]=d;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,d]of o){let{wrapped:c}=d,p=this[n];c!==!0||this._$AL.has(n)||p===void 0||this.C(n,void 0,d,p)}}let i=!1,t=this._$AL;try{i=this.shouldUpdate(t),i?(this.willUpdate(t),(r=this._$EO)==null||r.forEach((o=>{var n;return(n=o.hostUpdate)==null?void 0:n.call(o)})),this.update(t)):this._$EM()}catch(o){throw i=!1,this._$EM(),o}i&&this._$AE(t)}willUpdate(i){}_$AE(i){var t;(t=this._$EO)==null||t.forEach((e=>{var r;return(r=e.hostUpdated)==null?void 0:r.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(i)),this.updated(i)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(i){return!0}update(i){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(i){}firstUpdated(i){}},fs;be.elementStyles=[],be.shadowRootOptions={mode:"open"},be[bi("elementProperties")]=new Map,be[bi("finalized")]=new Map,Tr==null||Tr({ReactiveElement:be}),((fs=De.reactiveElementVersions)!=null?fs:De.reactiveElementVersions=[]).push("2.1.0");var yi=globalThis,qi=yi.trustedTypes,gs=qi?qi.createPolicy("lit-html",{createHTML:s=>s}):void 0,Sr="$lit$",ve=`lit$${Math.random().toFixed(9).slice(2)}$`,zr="?"+ve,ao=`<${zr}>`,Re=document,wi=()=>Re.createComment(""),xi=s=>s===null||typeof s!="object"&&typeof s!="function",Dr=Array.isArray,Cs=s=>Dr(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",Lr=`[
|
|
2
2
|
\f\r]`,vi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bs=/-->/g,vs=/>/g,Fe=RegExp(`>|${Lr}(?:([^\\s"'>=/]+)(${Lr}*=${Lr}*(?:[^
|
|
3
3
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),ys=/'/g,ws=/"/g,Es=/^(?:script|style|textarea|title)$/i,Ar=s=>(i,...t)=>({_$litType$:s,strings:i,values:t}),u=Ar(1),$s=Ar(2),Ts=Ar(3),Dt=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),xs=new WeakMap,Be=Re.createTreeWalker(Re,129);function Ls(s,i){if(!Dr(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return gs!==void 0?gs.createHTML(i):i}var Ms=(s,i)=>{let t=s.length-1,e=[],r,o=i===2?"<svg>":i===3?"<math>":"",n=vi;for(let d=0;d<t;d++){let c=s[d],p,m,f=-1,y=0;for(;y<c.length&&(n.lastIndex=y,m=n.exec(c),m!==null);)y=n.lastIndex,n===vi?m[1]==="!--"?n=bs:m[1]!==void 0?n=vs:m[2]!==void 0?(Es.test(m[2])&&(r=RegExp("</"+m[2],"g")),n=Fe):m[3]!==void 0&&(n=Fe):n===Fe?m[0]===">"?(n=r!=null?r:vi,f=-1):m[1]===void 0?f=-2:(f=n.lastIndex-m[2].length,p=m[1],n=m[3]===void 0?Fe:m[3]==='"'?ws:ys):n===ws||n===ys?n=Fe:n===bs||n===vs?n=vi:(n=Fe,r=void 0);let b=n===Fe&&s[d+1].startsWith("/>")?" ":"";o+=n===vi?c+ao:f>=0?(e.push(p),c.slice(0,f)+Sr+c.slice(f)+ve+b):c+ve+(f===-2?d:b)}return[Ls(s,o+(s[t]||"<?>")+(i===2?"</svg>":i===3?"</math>":"")),e]},ki=class s{constructor({strings:i,_$litType$:t},e){let r;this.parts=[];let o=0,n=0,d=i.length-1,c=this.parts,[p,m]=Ms(i,t);if(this.el=s.createElement(p,e),Be.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(r=Be.nextNode())!==null&&c.length<d;){if(r.nodeType===1){if(r.hasAttributes())for(let f of r.getAttributeNames())if(f.endsWith(Sr)){let y=m[n++],b=r.getAttribute(f).split(ve),k=/([.?@])?(.*)/.exec(y);c.push({type:1,index:o,name:k[2],strings:b,ctor:k[1]==="."?Yi:k[1]==="?"?ji:k[1]==="@"?Wi:Ne}),r.removeAttribute(f)}else f.startsWith(ve)&&(c.push({type:6,index:o}),r.removeAttribute(f));if(Es.test(r.tagName)){let f=r.textContent.split(ve),y=f.length-1;if(y>0){r.textContent=qi?qi.emptyScript:"";for(let b=0;b<y;b++)r.append(f[b],wi()),Be.nextNode(),c.push({type:2,index:++o});r.append(f[y],wi())}}}else if(r.nodeType===8)if(r.data===zr)c.push({type:2,index:o});else{let f=-1;for(;(f=r.data.indexOf(ve,f+1))!==-1;)c.push({type:7,index:o}),f+=ve.length-1}o++}}static createElement(i,t){let e=Re.createElement("template");return e.innerHTML=i,e}};function Ue(s,i,t=s,e){var n,d,c;if(i===Dt)return i;let r=e!==void 0?(n=t._$Co)==null?void 0:n[e]:t._$Cl,o=xi(i)?void 0:i._$litDirective$;return(r==null?void 0:r.constructor)!==o&&((d=r==null?void 0:r._$AO)==null||d.call(r,!1),o===void 0?r=void 0:(r=new o(s),r._$AT(s,t,e)),e!==void 0?((c=t._$Co)!=null?c:t._$Co=[])[e]=r:t._$Cl=r),r!==void 0&&(i=Ue(s,r._$AS(s,i.values),r,e)),i}var Ki=class{constructor(i,t){this._$AV=[],this._$AN=void 0,this._$AD=i,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(i){var p;let{el:{content:t},parts:e}=this._$AD,r=((p=i==null?void 0:i.creationScope)!=null?p:Re).importNode(t,!0);Be.currentNode=r;let o=Be.nextNode(),n=0,d=0,c=e[0];for(;c!==void 0;){if(n===c.index){let m;c.type===2?m=new ri(o,o.nextSibling,this,i):c.type===1?m=new c.ctor(o,c.name,c.strings,this,i):c.type===6&&(m=new Xi(o,this,i)),this._$AV.push(m),c=e[++d]}n!==(c==null?void 0:c.index)&&(o=Be.nextNode(),n++)}return Be.currentNode=Re,r}p(i){let t=0;for(let e of this._$AV)e!==void 0&&(e.strings!==void 0?(e._$AI(i,e,t),t+=e.strings.length-2):e._$AI(i[t])),t++}},ri=class s{get _$AU(){var i,t;return(t=(i=this._$AM)==null?void 0:i._$AU)!=null?t:this._$Cv}constructor(i,t,e,r){var o;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=i,this._$AB=t,this._$AM=e,this.options=r,this._$Cv=(o=r==null?void 0:r.isConnected)!=null?o:!0}get parentNode(){let i=this._$AA.parentNode,t=this._$AM;return t!==void 0&&(i==null?void 0:i.nodeType)===11&&(i=t.parentNode),i}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(i,t=this){i=Ue(this,i,t),xi(i)?i===j||i==null||i===""?(this._$AH!==j&&this._$AR(),this._$AH=j):i!==this._$AH&&i!==Dt&&this._(i):i._$litType$!==void 0?this.$(i):i.nodeType!==void 0?this.T(i):Cs(i)?this.k(i):this._(i)}O(i){return this._$AA.parentNode.insertBefore(i,this._$AB)}T(i){this._$AH!==i&&(this._$AR(),this._$AH=this.O(i))}_(i){this._$AH!==j&&xi(this._$AH)?this._$AA.nextSibling.data=i:this.T(Re.createTextNode(i)),this._$AH=i}$(i){var o;let{values:t,_$litType$:e}=i,r=typeof e=="number"?this._$AC(i):(e.el===void 0&&(e.el=ki.createElement(Ls(e.h,e.h[0]),this.options)),e);if(((o=this._$AH)==null?void 0:o._$AD)===r)this._$AH.p(t);else{let n=new Ki(r,this),d=n.u(this.options);n.p(t),this.T(d),this._$AH=n}}_$AC(i){let t=xs.get(i.strings);return t===void 0&&xs.set(i.strings,t=new ki(i)),t}k(i){Dr(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,e,r=0;for(let o of i)r===t.length?t.push(e=new s(this.O(wi()),this.O(wi()),this,this.options)):e=t[r],e._$AI(o),r++;r<t.length&&(this._$AR(e&&e._$AB.nextSibling,r),t.length=r)}_$AR(i=this._$AA.nextSibling,t){var e;for((e=this._$AP)==null?void 0:e.call(this,!1,!0,t);i!==this._$AB;){let r=i.nextSibling;i.remove(),i=r}}setConnected(i){var t;this._$AM===void 0&&(this._$Cv=i,(t=this._$AP)==null||t.call(this,i))}},Ne=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(i,t,e,r,o){this.type=1,this._$AH=j,this._$AN=void 0,this.element=i,this.name=t,this._$AM=r,this.options=o,e.length>2||e[0]!==""||e[1]!==""?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=j}_$AI(i,t=this,e,r){let o=this.strings,n=!1;if(o===void 0)i=Ue(this,i,t,0),n=!xi(i)||i!==this._$AH&&i!==Dt,n&&(this._$AH=i);else{let d=i,c,p;for(i=o[0],c=0;c<o.length-1;c++)p=Ue(this,d[e+c],t,c),p===Dt&&(p=this._$AH[c]),n||(n=!xi(p)||p!==this._$AH[c]),p===j?i=j:i!==j&&(i+=(p!=null?p:"")+o[c+1]),this._$AH[c]=p}n&&!r&&this.j(i)}j(i){i===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,i!=null?i:"")}},Yi=class extends Ne{constructor(){super(...arguments),this.type=3}j(i){this.element[this.name]=i===j?void 0:i}},ji=class extends Ne{constructor(){super(...arguments),this.type=4}j(i){this.element.toggleAttribute(this.name,!!i&&i!==j)}},Wi=class extends Ne{constructor(i,t,e,r,o){super(i,t,e,r,o),this.type=5}_$AI(i,t=this){var n;if((i=(n=Ue(this,i,t,0))!=null?n:j)===Dt)return;let e=this._$AH,r=i===j&&e!==j||i.capture!==e.capture||i.once!==e.once||i.passive!==e.passive,o=i!==j&&(e===j||r);r&&this.element.removeEventListener(this.name,this,e),o&&this.element.addEventListener(this.name,this,i),this._$AH=i}handleEvent(i){var t,e;typeof this._$AH=="function"?this._$AH.call((e=(t=this.options)==null?void 0:t.host)!=null?e:this.element,i):this._$AH.handleEvent(i)}},Xi=class{constructor(i,t,e){this.element=i,this.type=6,this._$AN=void 0,this._$AM=t,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(i){Ue(this,i)}},Ss={M:Sr,P:ve,A:zr,C:1,L:Ms,R:Ki,D:Cs,V:Ue,I:ri,H:Ne,N:ji,U:Wi,B:Yi,F:Xi},Mr=yi.litHtmlPolyfillSupport,ks;Mr==null||Mr(ki,ri),((ks=yi.litHtmlVersions)!=null?ks:yi.litHtmlVersions=[]).push("3.3.1");var zs=(s,i,t)=>{var o,n;let e=(o=t==null?void 0:t.renderBefore)!=null?o:i,r=e._$litPart$;if(r===void 0){let d=(n=t==null?void 0:t.renderBefore)!=null?n:null;e._$litPart$=r=new ri(i.insertBefore(wi(),d),d,void 0,t!=null?t:{})}return r._$AI(s),r};var qe=globalThis,Oe=class extends be{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;let i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!=null||(t.renderBefore=i.firstChild),i}update(i){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(i),this._$Do=zs(t,this.renderRoot,this.renderOptions)}connectedCallback(){var i;super.connectedCallback(),(i=this._$Do)==null||i.setConnected(!0)}disconnectedCallback(){var i;super.disconnectedCallback(),(i=this._$Do)==null||i.setConnected(!1)}render(){return Dt}},Ds;Oe._$litElement$=!0,Oe.finalized=!0,(Ds=qe.litElementHydrateSupport)==null||Ds.call(qe,{LitElement:Oe});var Or=qe.litElementPolyfillSupport;Or==null||Or({LitElement:Oe});var As;((As=qe.litElementVersions)!=null?As:qe.litElementVersions=[]).push("4.2.0");var oo=(s,i)=>window.customElements.get(s)?(console.warn(`Custom element ${s} already defined. Registration skipped.`),i):(window.customElements.define(s,i),i),no=(s,i)=>{let{kind:t,elements:e}=i;return{kind:t,elements:e,finisher(r){if(window.customElements.get(s)){console.warn(`Custom element ${s} already defined. Registration skipped.`);return}window.customElements.define(s,r)}}},w=s=>i=>typeof i=="function"?oo(s,i):no(s,i);var lo={name:"default",resolver:s=>{let i=s.split("/");return(i[0]==="content"||i[0]==="system")&&(s="union-investment/"+s),`https://celum-icons.fe.union-investment.de/${s}.svg`},mutator:s=>{let i={currentColorFills:[],currentColorStrokes:[],greenFills:[],greenStrokes:[]};return i.currentColorFills=s.querySelectorAll('[fill="#00358e" i]'),i.currentColorStrokes=s.querySelectorAll('[stroke="#00358e" i]'),i.greenFills=s.querySelectorAll('[fill="#2d9d00" i]'),i.greenStrokes=s.querySelectorAll('[stroke="#2d9d00" i]'),i.currentColorFills.forEach(t=>{t.setAttribute("fill","currentColor")}),i.currentColorStrokes.forEach(t=>{t.setAttribute("stroke","currentColor")}),i.greenFills.forEach(t=>{t.setAttribute("fill","rgb(var(--sd-color-accent, 45 157 0) / var(--tw-bg-opacity, 1))")}),i.greenStrokes.forEach(t=>{t.setAttribute("stroke","rgb(var(--sd-color-accent, 45 157 0) / var(--tw-bg-opacity, 1))")}),s}},Os=lo;var Is={calendar:`
|
|
4
4
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
@@ -124,7 +124,9 @@
|
|
|
124
124
|
disabled:text-neutral-500 disabled:border-neutral-500`,tertiary:this.inverted?`border-transparent ${this.visuallyDisabled?"text-neutral-600 hover:text-neutral-600 active:text-neutral-600":"text-white hover:text-primary-100 active:text-primary-200"}
|
|
125
125
|
disabled:text-neutral-600`:`border-transparent ${this.visuallyDisabled?"text-neutral-500 hover:text-neutral-500 active:text-neutral-500":"text-primary hover:text-primary-500 active:text-primary-800"}
|
|
126
126
|
disabled:text-neutral-500`,cta:`text-white ${this.visuallyDisabled?"bg-neutral-500 border-neutral-500 hover:bg-neutral-500 active:bg-neutral-500":"bg-accent-500 border-transparent"}
|
|
127
|
-
${this.inverted?"disabled:bg-neutral-600 disabled:border-neutral-600":"disabled:bg-neutral-500 disabled:border-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${E(t?void 0:this.disabled)}" type="${E(t?void 0:this.type)}" title="${this.title}" name="${E(t?void 0:this.name)}" value="${E(t?void 0:this.value)}" href="${E(t?this.href:void 0)}" target="${E(t?this.target:void 0)}" download="${E(t?this.download:void 0)}" rel="${E(t&&this.target?"noreferrer noopener":void 0)}" role="${E(t?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${h("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${h("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${h("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${h("flex flex-auto items-center justify-end pointer-events-none",r["icon-only"]&&"hidden",this.loading&&"invisible",r["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${h("inline-flex items-center justify-center",r["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${h("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",r["icon-only"]&&"hidden",r["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?U`<sd-loader class="${h("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-loader>`:""}</${e}>`}};Z.styles=[...g.styles,x`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto);z-index:0}::slotted(sd-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--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))!important}::slotted(sd-icon),sd-loader{font-size:calc(var(--tw-varspacing)/2)}`],a([v("a, button")],Z.prototype,"button",2),a([si({selector:"sd-icon"})],Z.prototype,"_iconsInDefaultSlot",2),a([L()],Z.prototype,"invalid",2),a([l({type:String,reflect:!0})],Z.prototype,"title",2),a([l({type:String,reflect:!0})],Z.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],Z.prototype,"inverted",2),a([l({type:String,reflect:!0})],Z.prototype,"size",2),a([l({type:Boolean,reflect:!0})],Z.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],Z.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],Z.prototype,"loading",2),a([l({type:String,reflect:!0})],Z.prototype,"type",2),a([l({type:String,reflect:!0})],Z.prototype,"name",2),a([l()],Z.prototype,"value",2),a([l({type:String,reflect:!0})],Z.prototype,"href",2),a([l({type:String,reflect:!0})],Z.prototype,"target",2),a([l({reflect:!0})],Z.prototype,"download",2),a([l({reflect:!0})],Z.prototype,"form",2),a([l({attribute:"formaction"})],Z.prototype,"formAction",2),a([l({attribute:"formenctype"})],Z.prototype,"formEnctype",2),a([l({attribute:"formmethod"})],Z.prototype,"formMethod",2),a([l({attribute:"formnovalidate",type:Boolean})],Z.prototype,"formNoValidate",2),a([l({attribute:"formtarget"})],Z.prototype,"formTarget",2),a([C("disabled",{waitUntilFirstUpdate:!0})],Z.prototype,"handleDisabledChange",1),Z=a([w("sd-button")],Z);function je(s=document.activeElement){if(s!=null&&s.shadowRoot){let i=s.shadowRoot.activeElement;if(i)return je(i)}return s}function Js(s,i){return{top:Math.round(s.getBoundingClientRect().top-i.getBoundingClientRect().top),left:Math.round(s.getBoundingClientRect().left-i.getBoundingClientRect().left)}}var Yr=new Set;function hl(){let s=document.documentElement.clientWidth;return Math.abs(window.innerWidth-s)}function We(s){if(Yr.add(s),!document.body.classList.contains("sd-scroll-lock")){let i=hl();document.body.classList.add("sd-scroll-lock"),document.body.style.setProperty("--sd-scroll-lock-size",`${i}px`)}}function Xe(s){Yr.delete(s),Yr.size===0&&(document.body.classList.remove("sd-scroll-lock"),document.body.style.removeProperty("--sd-scrollbar-width"))}function ee(s,i,t="vertical",e="smooth"){let r=Js(s,i),o=r.top+i.scrollTop,n=r.left+i.scrollLeft,d=i.scrollLeft,c=i.scrollLeft+i.offsetWidth,p=i.scrollTop,m=i.scrollTop+i.offsetHeight;(t==="horizontal"||t==="both")&&(n<d?i.scrollTo({left:n,behavior:e}):n+s.clientWidth>c&&i.scrollTo({left:n-i.offsetWidth+s.clientWidth,behavior:e})),(t==="vertical"||t==="both")&&(o<p?i.scrollTo({top:o,behavior:e}):o+s.clientHeight>m&&i.scrollTo({top:o-i.offsetHeight+s.clientHeight,behavior:e}))}function li(s){return s.charAt(0).toUpperCase()+s.slice(1)}function jr(s){return s.replace(/-./g,i=>i[1].toUpperCase())}function ta(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 ar(s){var o,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(c=>t(c))}t(s);let e=(o=i.find(d=>ta(d)))!=null?o:null,r=(n=i.reverse().find(d=>ta(d)))!=null?n:null;return{start:e,end:r}}var Si=[],Ze=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(){Si.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Si=Si.filter(i=>i!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Si[Si.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){let{start:i,end:t}=ar(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 vt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"footer");this.localize=new A(this);this.modal=new Ze(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(),We(this)))}disconnectedCallback(){super.disconnectedCallback(),Xe(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=q(this,"drawer.denyClose",{dir:this.localize.dir()});K(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=je(),this.contained||(this.modal.activate(),We(this));let r=this.querySelector("[autofocus]");r&&r.removeAttribute("autofocus"),await Promise.all([W(this.drawer),W(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let o=q(this,`drawer.show${li(this.placement)}`,{dir:this.localize.dir()}),n=q(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([K(this.panel,o.keyframes,o.options),K(this.overlay,n.keyframes,n.options)]),t==null||t.setAttribute("aria-controls","drawer"),t==null||t.setAttribute("aria-expanded","true"),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()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),Xe(this)),await Promise.all([W(this.drawer),W(this.overlay)]);let r=q(this,`drawer.hide${li(this.placement)}`,{dir:this.localize.dir()}),o=q(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([K(this.overlay,o.keyframes,o.options).then(()=>{this.overlay.hidden=!0}),K(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(),We(this)),this.open&&this.contained&&(this.modal.deactivate(),Xe(this))}async show(){if(!this.open)return this.open=!0,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,J(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${h("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="${h("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="${h("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 end-2 z-10"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:64px"><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 ms-4 absolute top-2 end-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="_internal"></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="${h(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};vt.styles=[...g.styles,x`: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)}`],a([v("[part=base]")],vt.prototype,"drawer",2),a([v("[part=panel]")],vt.prototype,"panel",2),a([v("[part=overlay]")],vt.prototype,"overlay",2),a([v("[part=close-button]")],vt.prototype,"closeButton",2),a([l({type:Boolean,reflect:!0})],vt.prototype,"open",2),a([l({type:String,attribute:"label",reflect:!0})],vt.prototype,"label",2),a([l({type:String,reflect:!0})],vt.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],vt.prototype,"contained",2),a([l({attribute:"no-header",type:Boolean,reflect:!0})],vt.prototype,"noHeader",2),a([C("open",{waitUntilFirstUpdate:!0})],vt.prototype,"handleOpenChange",1),a([C("contained",{waitUntilFirstUpdate:!0})],vt.prototype,"handleNoModalChange",1),vt=a([w("sd-drawer")],vt);B("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"}});B("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"}});B("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"}});B("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"}});B("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});var _e=class{constructor(i){this.fixedEnd=!0;this.fixedStart=!0;this.gradient=!1;this.outline=!1;this.map=(i,t,e,r,o)=>(i-t)*(o-r)/(e-t)+r;this.damp=(i,t,e)=>2*(1-t/i)*(t/i)*e;this.canvas=i.canvas,this.frequency=i.frequency,this.phase=i.phase,this.amplitude=i.amplitude,this.color=i.color,this.shift=i.shift,this.lineWidth=2,this.damping=i.damping,this.context=this.canvas.getContext("2d"),this.paused=!0,this.playbackSpeed=1,this.origin={x:0,y:this.canvas.height}}drawPoint(i,t,e){if(!this.context)return;let r=this.lineWidth/2;if(this.context.beginPath(),this.outline&&(this.context.fillStyle=e,this.context.lineWidth=2,this.context.arc(i,t,r,0,2*Math.PI),this.context.fill()),this.gradient){let o=this.context.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(.1,e),o.addColorStop(1,"transparent"),this.context.fillStyle=o}else this.context.fillStyle=e;this.context.fillRect(i-r,t-r,r,this.canvas.height-t+r)}buildSine(i,t,e,r,o){for(let n=this.origin.x,d=this.origin.x+i;n<d;n+=1){let c=r*Math.sin(o*(n+t));this.fixedStart&&this.fixedEnd?this.drawPoint(n,this.origin.y+this.damp(d,n,this.damping)*c,e):this.fixedStart?this.drawPoint(n,this.origin.y+this.map(n,this.origin.x,d,0,this.damping)*c,e):this.fixedEnd?this.drawPoint(n,this.origin.y+(this.damping-this.map(n,this.origin.x,d,0,this.damping))*c,e):this.drawPoint(n,this.origin.y+c,e)}}redraw(){this.phase+=this.shift*(this.paused?1:2*this.playbackSpeed),this.buildSine(this.canvas.width,this.phase,this.color,this.amplitude,this.frequency)}setPlay(){this.paused=!1}setPause(){this.paused=!0}setPlaybackSpeed(i){this.playbackSpeed=i}};var lt=class extends g{constructor(){super();this.localize=new A(this);this.hasSlotController=new P(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=t=>this.localize.term("seconds",Number(t).toFixed(0)),this.animated&&this.initAnimation())}updated(t){if(t.has("animated")){let e=t.get("animated");!e&&this.animated?this.initAnimation():e&&!this.animated&&this.clear()}}get audioElement(){let t=this.shadowRoot.querySelector("slot");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let t=this.audioElement.currentTime;this.currentTime=this.formatTime(t),this.progress=t,this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.progressSlider.max=this.audioElement.duration}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.togglePlaybackSpeed())}formatTime(t){let e=Math.floor(t/60).toString().padStart(2,"0"),r=Math.floor(t%60).toString().padStart(2,"0");return`${e}:${r}`}handleAudioProgress(){if(!this.audioElement)return;let t=Number(this.progressSlider.value);this.audioElement.currentTime=t,this.progress=t,this.currentTime=this.formatTime(t)}handleAudioProgressKeydown(t){t.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),t.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var t;(t=this.audioElement)==null||t.pause()}handleThumbRelease(){var t;this.isPlaying&&((t=this.audioElement)==null||t.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(t){(t.key==="Enter"||t.key===" ")&&this.showTranscript()}rgbToHex(t){let e=t.match(/\d+/g);if(e&&e.length===3){let r=parseInt(e[0]),o=parseInt(e[1]),n=parseInt(e[2]),d=p=>p.toString(16).padStart(2,"0");return`#${d(r)}${d(o)}${d(n)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let t=this.audioPlayerContainer.querySelector(".playback-speed"),r=window.getComputedStyle(t).color,o;this.inverted?o="#FFFFFF33":o=this.rgbToHex(r)+"33",this.waveList=[new _e({canvas:this.canvas,color:o,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new _e({canvas:this.canvas,color:o,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new _e({canvas:this.canvas,color:o,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new _e({canvas:this.canvas,color:o,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new _e({canvas:this.canvas,color:o,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(t=>{t.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(t=>{t.redraw()}),await new Promise(t=>{setTimeout(t,1e3/30)}),await this.draw())}render(){let t=u`<div class="${h("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${h("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" title="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="mb-4">${this.isPlaying?u`<slot name="pause-icon"><sd-icon class="text-xl" name="pause" library="_internal"></sd-icon></slot>`:u`<slot name="play-icon"><sd-icon class="text-xl" name="start" library="_internal"></sd-icon></slot>`}</sd-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript")?u`<button class="${h("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen?this.localize.term("transcriptIsOpen"):this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-icon class="w-6 h-6" name="transcript" library="_internal"></sd-icon></button>`:null} <button class="${h("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="_internal"></sd-icon></button></div></div>`,e=u`<div class="${h("w-full flex justify-between",this.reversedLayout?"mb-0.5":"mt-0.5",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 !mb-4")}" part="timestamps"><div class="${h("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.currentTime}</div><div class="${h("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.duration}</div></div>`;return u`<div class="${h("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?t:null}<div class="relative">${this.animated&&!this.reversedLayout?u`${t}`:null} ${this.animated?u`<canvas class="w-full h-16 -mb-2"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?e:null}<sd-range part="progress-slider" no-tooltip min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-range></div>${this.hasSlotController.test("transcript")?u`<sd-drawer><slot name="transcript"></slot></sd-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?e:null}</div>`}};lt.styles=[...g.styles,x`sd-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-12,3rem);justify-content:center;width:var(--sd-spacing-12,3rem)}sd-button::part(motion-wrapper){border-radius:var(--sd-border-radius-full,9999px)}sd-button::part(label){align-items:center;display:flex;flex-grow:0}sd-range::part(form-control-label){display:none}:host([inverted]) sd-range::part(thumb){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));outline-color:rgb(var(--sd-color-white,255 255 255)/1)}:host([animated]) sd-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-range::part(track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-400,153 171 208)/var(--tw-bg-opacity,1))}:host([inverted]:not([animated])) sd-range::part(active-track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1))}`],a([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],lt.prototype,"reversedLayout",2),a([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],lt.prototype,"hideTimestamps",2),a([l({type:Boolean,reflect:!0})],lt.prototype,"animated",2),a([l({type:Boolean,reflect:!0})],lt.prototype,"inverted",2),a([l({type:Number,reflect:!0})],lt.prototype,"speed",2),a([L()],lt.prototype,"currentTime",2),a([L()],lt.prototype,"duration",2),a([L()],lt.prototype,"isPlaying",2),a([L()],lt.prototype,"isMuted",2),a([L()],lt.prototype,"isTranscriptOpen",2),a([L()],lt.prototype,"progress",2),a([v('[part="progress-slider"]')],lt.prototype,"progressSlider",2),a([v('[part="audio-player"]')],lt.prototype,"audioPlayerContainer",2),a([v("sd-drawer")],lt.prototype,"drawer",2),a([v("canvas")],lt.prototype,"canvas",2),lt=a([w("sd-audio")],lt);var ie=class extends g{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return u`<span part="base" aria-labelledby="content" class="${h("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"text-primary bg-primary-100 border-primary":"text-white bg-primary-500 border-white",green:this.inverted?"text-white bg-success border-primary":"text-white bg-success border-white",red:this.inverted?"text-white bg-error border-primary":"text-white bg-error border-white"}[this.variant])}"><span id="content" part="content" class="${h(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};ie.styles=[...g.styles,x`:host{align-items:center;display:inline-flex;justify-content:center}:host([size=md]){font-size:.625rem;height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem)}:host([size=lg]){font-size:.75rem;height:var(--sd-spacing-5,1.25rem);min-width:var(--sd-spacing-5,1.25rem)}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],a([l({type:String,reflect:!0})],ie.prototype,"size",2),a([l({type:String,reflect:!0})],ie.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],ie.prototype,"inverted",2),ie=a([w("sd-badge")],ie);var jt=class extends g{constructor(){super(...arguments);this.variant="primary";this.shapes=["top","middle","bottom"];this.componentBreakpoint=0}getSvg(t,e){return{0:this.smallSvg(e),414:this.mediumSvg(e),640:this.largeSvg(e)}[t]}largeSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M610.777 1.393.001 120.146 0 123h700.001V74.79c0-4.797-.462-9.585-1.381-14.294-7.909-40.537-47.237-66.998-87.843-59.103Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 123"><path d="M89.224 121.607 700 2.854 700.001 0h-700L0 48.21c0 4.797.463 9.584 1.381 14.294 7.909 40.537 47.237 66.998 87.843 59.103Z"/></svg>`}mediumSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 119"><path d="M597.75 1.6 0 118.046V121h700V85.872c0-5.509-.53-11.006-1.583-16.413-9.063-46.543-54.133-76.924-100.667-67.86Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M102.25 119.4 700 2.954V0H0v35.128c0 5.509.53 11.006 1.583 16.413 9.063 46.543 54.134 76.924 100.667 67.859Z"/></svg>`}smallSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 113"><path d="M566.951 2.08 0 112.466v2.934h700v-3.672c0-7.166-.689-14.314-2.059-21.348-11.789-60.557-70.436-100.09-130.99-88.3Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 116"><path d="M133.049 113.32 700 2.934V0H0v3.672c0 7.165.69 14.314 2.059 21.348 11.79 60.557 70.436 100.09 130.99 88.3Z"/></svg>`}setBreakpoint(){switch(!0){case this.containerElem.clientWidth<=414:this.componentBreakpoint=0;break;case this.containerElem.clientWidth<640:this.componentBreakpoint=414;break;default:this.componentBreakpoint=640}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setBreakpoint()),this.updateComplete.then(()=>{this.setBreakpoint(),this.resizeObserver.observe(this.containerElem)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.containerElem)}renderTopBrandshape(){return u`<div class="relative" part="shape-top">${this.getSvg(this.componentBreakpoint,"top")} ${this.renderWhitespaceFix("top")}</div>`}renderMiddleBrandshape(){return u`<div class="${h({0:"px-6 py-4",414:"px-10 py-8",640:"px-10 py-8"}[this.componentBreakpoint],"w-full block relative")}"><div part="shape-middle" class="${h({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],"w-full block absolute h-full top-0 left-0 z-0")}"></div><div class="${h("z-10 relative",this.variant==="image"&&"invisible opacity-0")}" part="content"><slot>${this.variant==="image"?"":u`<div class="h-8"></div>`}</slot></div></div>`}renderBottomBrandshape(){return u`<div class="relative" part="shape-bottom">${this.getSvg(this.componentBreakpoint,"bottom")}${this.renderWhitespaceFix("bottom")}</div>`}renderWhitespaceFix(t){return u`<div class="${h({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],{top:"bottom-0",bottom:"top-0"}[t],"block absolute left-0 w-full h-[1px]")}"></div>`}renderStylizedVariant(){return u`<div part="stylized-container" class="w-full overflow-hidden"><slot class="${h(this.variant!=="image"&&"hidden")}" name="image"></slot></div>`}renderShapes(){return u`${this.shapes.includes("top")?this.renderTopBrandshape():""} ${this.shapes.includes("middle")?this.renderMiddleBrandshape():""} ${this.shapes.includes("bottom")?this.renderBottomBrandshape():""}`}render(){let t=this.variant.startsWith("border-")||this.variant==="image";return u`<div class="${h({"neutral-100":"fill-neutral-100",primary:"fill-primary",white:"fill-white","border-white":"fill-transparent","border-primary":"fill-transparent",image:"fill-transparent"}[this.variant],"relative")}" part="base">${t?this.renderStylizedVariant():""} ${this.renderShapes()}</div>`}};jt.styles=[...g.styles,x`:host{container-type:inline-size;display:block;--angle:11deg;--radius:60px;--tan:tan(var(--angle));--adjacent:100cqw;--opposite:calc(var(--tan)*var(--adjacent));--curve:calc((var(--opposite) - (var(--radius)/3))*0.5)}@supports not (transform:skewY(11deg)){:host{--tan:0.1943803091}}@media (min-width:415px){:host{--radius:72px}}@media (min-width:640px){:host{--radius:84px}}:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{border-radius:0 var(--radius);height:calc(100% - var(--curve)*2);left:var(--sd-spacing-0,0);margin-top:calc(var(--curve));position:absolute;top:var(--sd-spacing-0,0);transform:skewY(calc(var(--angle)*-1))}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:calc(100% + var(--curve)*2)!important;-o-object-fit:cover;object-fit:cover;position:absolute!important;transform:translateY(calc(var(--curve)*-1)) skewY(var(--angle));width:100%}@supports not (height:100cqw){:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{height:100%;margin-top:0;transform:unset}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:100%!important;transform:unset}}:host([variant=border-primary]){--internal-border-color:rgb(var(--sd-color-primary,0 53 142))}:host([variant=border-white]){--internal-border-color:var(--sd-color-white,#fff)}:host([variant^=border-]) [part=stylized-container]:before{border-color:var(--internal-border-color,#000);border-style:solid;border-width:2px;content:"";right:var(--sd-spacing-0,0)}`],a([v("[part=base]")],jt.prototype,"containerElem",2),a([l({type:String,reflect:!0})],jt.prototype,"variant",2),a([l({type:Array})],jt.prototype,"shapes",2),a([L()],jt.prototype,"componentBreakpoint",2),jt=a([w("sd-brandshape")],jt);var _t=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.label="";this.itemPositionsCached=!1;this.isTruncated=!1}get items(){return this.querySelectorAll("sd-breadcrumb-item")}cacheItemPositions(){this.items.forEach(t=>{let{width:e}=t.getBoundingClientRect();t.dataset.size=`${e}`}),this.itemPositionsCached=!0}handleTruncation(){var o;if(document.documentElement.clientWidth<=1024)return;let{width:t}=this.base.getBoundingClientRect(),{width:e}=this.truncated.getBoundingClientRect();this.itemPositionsCached||this.cacheItemPositions(),this.dropdown.innerHTML="",this.isTruncated=!1;let r=0;for(let[n,d]of Array.from(this.items).reverse().entries()){let c=parseFloat(`${(o=d.dataset.size)!=null?o:d.getBoundingClientRect().width}`);if(d.hidden=!1,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0;continue}if(n===0||n===1){r+=c;continue}if(this.isTruncated=r+c+e>t,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0}else r+=c}}handleMobileChevron(){var e,r,o;let t=document.createElement("sd-icon");t.setAttribute("slot","icon-left"),t.setAttribute("library","_internal"),t.setAttribute("name","chevron-left"),t.setAttribute("class","text-base me-1 lg:hidden"),(o=(r=(e=Array.from(this.items).at(-2))==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("sd-link"))==null||o.appendChild(t)}handleSlotChange(){this.handleMobileChevron()}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.handleTruncation()),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}render(){return u`<nav part="base" class="flex items-center pb-1" aria-label="${this.label}"><sd-dropdown part="truncated" class="${h(!this.isTruncated&&"absolute opacity-0 pointer-events-none")}"><button slot="trigger" tabindex="${this.isTruncated?"0":"-1"}" aria-label="${this.localize.term("truncatedBreadcrumbs")}" aria-expanded="false" aria-haspopup="true" class="flex sd-interactive">[...]</button><ol part="truncated-dropdown" class="flex flex-col gap-4 px-2 py-3 min-w-40"></ol></sd-dropdown><ol part="list" class="flex items-center"><slot @slotchange="${this.handleSlotChange}"></slot></ol></nav>`}};_t.styles=[...g.styles,x`:host{display:block;position:relative}::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{border-radius:var(--sd-border-radius-full,9999px);content:var(--tw-content);display:none;height:var(--sd-spacing-1,.25rem);margin-left:var(--sd-spacing-2,.5rem);margin-right:var(--sd-spacing-2,.5rem);width:var(--sd-spacing-1,.25rem);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-bg-opacity,1))}@media (min-width:1024px){::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{content:var(--tw-content);display:inline-block}}::slotted(sd-breadcrumb-item:nth-last-child(2)){display:flex}@media (min-width:1024px){::slotted(sd-breadcrumb-item:nth-last-child(2)):after{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-accent,45 157 0)/var(--tw-bg-opacity,1))}}::slotted(sd-breadcrumb-item),sd-dropdown{align-items:center;display:none;font-size:var(--sd-font-size-sm,.875rem)}@media (min-width:1024px){::slotted(sd-breadcrumb-item),sd-dropdown{display:flex}}`],a([v('[part="base"]')],_t.prototype,"base",2),a([v('[part="truncated"]')],_t.prototype,"truncated",2),a([v('[part="truncated-dropdown"]')],_t.prototype,"dropdown",2),a([v("slot")],_t.prototype,"defaultSlot",2),a([l({type:String,reflect:!0})],_t.prototype,"label",2),a([L()],_t.prototype,"itemPositionsCached",2),a([L()],_t.prototype,"isTruncated",2),_t=a([w("sd-breadcrumb")],_t);var Yt=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.href="";this.current=!1}handleCurrentChange(){var t,e;!this.base||!this.current||(e=(t=this.base.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return u`<sd-link part="base" href="${E(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};Yt.styles=[...g.styles,x`:host{align-items:center;display:inline-flex}sd-link::part(base){align-items:center}sd-link::part(icon-left){display:inline-flex;margin-right:var(--sd-spacing-0,0)}sd-link sd-icon{margin:var(--sd-spacing-0,0)}:host([current]) sd-link::part(base){--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-700,104 104 104)/var(--tw-text-opacity,1))}:host([current]) sd-link::part(label){text-decoration-line:none}`],a([v('[part="base"]')],Yt.prototype,"base",2),a([l({type:String,reflect:!0})],Yt.prototype,"href",2),a([l({type:String,reflect:!0})],Yt.prototype,"target",2),a([l({type:Boolean,reflect:!0})],Yt.prototype,"current",2),a([C("current")],Yt.prototype,"handleCurrentChange",1),Yt=a([w("sd-breadcrumb-item")],Yt);var or=class{constructor(i,t){this.timerId=0;this.activeInteractions=0;this.paused=!1;this.stopped=!0;this.pause=()=>{this.activeInteractions++||(this.paused=!0,this.host.requestUpdate())};this.resume=()=>{--this.activeInteractions||(this.paused=!1,this.host.requestUpdate())};i.addController(this),this.host=i,this.tickCallback=t}hostConnected(){this.host.addEventListener("mouseenter",this.pause),this.host.addEventListener("mouseleave",this.resume),this.host.addEventListener("focusin",this.pause),this.host.addEventListener("focusout",this.resume),this.host.addEventListener("touchstart",this.pause,{passive:!0}),this.host.addEventListener("touchend",this.resume)}hostDisconnected(){this.stop(),this.host.removeEventListener("mouseenter",this.pause),this.host.removeEventListener("mouseleave",this.resume),this.host.removeEventListener("focusin",this.pause),this.host.removeEventListener("focusout",this.resume),this.host.removeEventListener("touchstart",this.pause),this.host.removeEventListener("touchend",this.resume)}start(i){this.stop(),this.stopped=!1,this.timerId=window.setInterval(()=>{this.paused||this.tickCallback()},i)}stop(){clearInterval(this.timerId),this.stopped=!0,this.host.requestUpdate()}};function ea(s,i,t){let e=r=>Object.is(r,-0)?0:r;return s<i?e(i):s>t?e(t):e(s)}var nr=class{constructor(i){this.heightCalculated=!1;this.isEnabled=!1;this.isCalculating=!1;this.fadeClasses={base:["absolute","top-0","left-0","w-full","h-full","visible","transition-opacity","duration-x-slow","ease-in-out"],active:["opacity-100","z-[1]"],inactive:["opacity-0","z-0"]};this.handleResize=()=>{this.isEnabled&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.isEnabled&&(this.heightCalculated=!1,this.calculateHeight())},250))};this.carousel=i}enable(){this.isEnabled||(this.isEnabled=!0,this.calculateHeight(),window.addEventListener("resize",this.handleResize))}disable(){this.isEnabled&&(this.isEnabled=!1,this.removeFadeStyles(),this.carousel.style.removeProperty("--carousel-height"),this.carousel.scrollContainer&&this.carousel.scrollContainer.style.removeProperty("height"),this.heightCalculated=!1,this.isCalculating=!1,window.removeEventListener("resize",this.handleResize),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0))}updateActiveSlide(i){if(!this.isEnabled)return;this.carousel.getSlides().forEach((e,r)=>{r===i?this.show(e):this.hide(e)})}show(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.active),i.removeAttribute("inert"),i.setAttribute("aria-hidden","false")}hide(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.inactive),i.toggleAttribute("inert",!0),i.setAttribute("aria-hidden","true")}removeFadeStyles(){this.carousel.getSlides().forEach(t=>{t.classList.remove(...this.getAllFadeClasses()),t.removeAttribute("inert"),t.removeAttribute("aria-hidden")})}getAllFadeClasses(){return[...this.fadeClasses.base,...this.fadeClasses.active,...this.fadeClasses.inactive]}calculateHeight(){if(this.heightCalculated||!this.isEnabled||this.isCalculating)return;let i=this.carousel.getSlides(),t=this.carousel.scrollContainer;if(i.length===0||!t)return;this.isCalculating=!0,t.style.removeProperty("height"),this.carousel.style.removeProperty("--carousel-height");let e=i.map(r=>{let o=r,n={position:o.style.position,opacity:o.style.opacity,zIndex:o.style.zIndex,transform:o.style.transform,classes:o.className};return o.classList.remove(...this.getAllFadeClasses()),o.classList.add("relative","opacity-1","z-auto","transform-none"),n});requestAnimationFrame(()=>{if(!this.isEnabled){this.isCalculating=!1;return}let r=i.map(n=>n.getBoundingClientRect().height),o=Math.max(...r);i.forEach((n,d)=>{let c=n,p=e[d];c.className=p.classes,["position","opacity","zIndex","transform"].forEach(m=>{let f=p[m];f?c.style.setProperty(m,f):c.style.removeProperty(m)})}),o>0&&(this.carousel.style.setProperty("--carousel-height",`${o}px`),t.style.height=`${o}px`,this.heightCalculated=!0,this.updateActiveSlide(this.carousel.activeSlide)),this.isCalculating=!1})}recalculateHeight(){this.isEnabled&&(this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.heightCalculated=!1,this.calculateHeight())}};function*ia(s,i){if(s!==void 0){let t=0;for(let e of s)yield i(e,t++)}}function*ra(s,i,t=1){let e=i===void 0?0:s;i!=null||(i=s);for(let r=e;t>0?r<i:i<r;r+=t)yield r}var sa=Symbol(),di=s=>(i,t,e)=>{let r=e.value;e.value=function(...o){clearTimeout(this[sa]),this[sa]=window.setTimeout(()=>{r.apply(this,o)},s)}};var zi=class{constructor(i){this.pointers=new Set;this.dragging=!1;this.scrolling=!1;this.mouseDragging=!1;this.handleScroll=()=>{this.scrolling||(this.scrolling=!0,this.host.requestUpdate()),this.handleScrollEnd()};this.handlePointerDown=i=>{if(i.pointerType==="touch")return;this.pointers.add(i.pointerId),this.mouseDragging&&!this.dragging&&i.button===0&&(i.preventDefault(),this.host.scrollContainer.addEventListener("pointermove",this.handlePointerMove))};this.handlePointerMove=i=>{let t=this.host.scrollContainer,e=!!i.movementX||!!i.movementY;!this.dragging&&e?(t.setPointerCapture(i.pointerId),this.handleDragStart()):t.hasPointerCapture(i.pointerId)&&this.handleDrag(i)};this.handlePointerUp=i=>{this.pointers.delete(i.pointerId),this.host.scrollContainer.releasePointerCapture(i.pointerId),this.pointers.size===0&&this.handleDragEnd()};this.handleTouchEnd=i=>{for(let t of i.changedTouches)this.pointers.delete(t.identifier)};this.handleTouchStart=i=>{for(let t of i.touches)this.pointers.add(t.identifier)};this.host=i,i.addController(this)}async hostConnected(){let i=this.host;await i.updateComplete;let t=i.scrollContainer;t.addEventListener("scroll",this.handleScroll,{passive:!0}),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointerup",this.handlePointerUp),t.addEventListener("pointercancel",this.handlePointerUp),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),t.addEventListener("touchend",this.handleTouchEnd)}hostDisconnected(){let t=this.host.scrollContainer;t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointerup",this.handlePointerUp),t.removeEventListener("pointercancel",this.handlePointerUp),t.removeEventListener("touchstart",this.handleTouchStart),t.removeEventListener("touchend",this.handleTouchEnd)}handleScrollEnd(){this.pointers.size?this.handleScrollEnd():(this.scrolling=!1,this.host.scrollContainer.dispatchEvent(new CustomEvent("scrollend",{bubbles:!1,cancelable:!1})),this.host.requestUpdate())}handleDragStart(){let i=this.host;this.dragging=!0,i.scrollContainer.style.setProperty("scroll-snap-type","unset"),i.requestUpdate()}handleDrag(i){this.host.scrollContainer.scrollBy({left:-i.movementX,top:-i.movementY})}async handleDragEnd(){let i=this.host,t=i.scrollContainer;t.removeEventListener("pointermove",this.handlePointerMove),this.dragging=!1;let e=t.scrollLeft,r=t.scrollTop;t.style.removeProperty("scroll-snap-type");let o=t.scrollLeft,n=t.scrollTop;t.style.setProperty("scroll-snap-type","unset"),t.scrollTo({left:e,top:r,behavior:"auto"}),t.scrollTo({left:o,top:n,behavior:$i()?"auto":"smooth"}),this.scrolling&&await J(t,"scrollend"),t.style.removeProperty("scroll-snap-type"),i.requestUpdate()}};a([di(100)],zi.prototype,"handleScrollEnd",1);var he=class extends g{static isCarouselItem(i){return i instanceof Element&&i.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return u`<slot></slot>`}};he.styles=[...g.styles,x`:host{align-items:center;aspect-ratio:var(--aspect-ratio);display:flex;flex-direction:column;height:100%;justify-content:center;scroll-snap-align:start;scroll-snap-stop:always;width:100%}::slotted(img){height:100%;-o-object-fit:cover;object-fit:cover;width:100%}`],he=a([w("sd-carousel-item")],he);var Q=class extends g{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new or(this,()=>this.next());this.scrollController=new zi(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new A(this);this.userInteracted=!1;this.fadeController=new nr(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(r=>[...r.addedNodes,...r.removedNodes].some(o=>he.isCarouselItem(o)&&!o.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction));let t=new IntersectionObserver(e=>{e.forEach(r=>{this.intersectionObserverEntries.set(r.target,r);let o=r.target;o.toggleAttribute("inert",!r.isIntersecting),o.classList.toggle("--in-view",r.isIntersecting),o.setAttribute("aria-hidden",r.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(r=>{r.forEach(o=>{o.isIntersecting&&o.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,r){return Math.ceil((t-e)/r)+1>0?Math.ceil((t-e)/r)+1:1}getCurrentPage(t,e,r,o){return Math.ceil((t-r)/o)-Math.ceil((t-r-e)/o)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,r=this.localize.dir()==="rtl",o=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!r&&t.key==="ArrowRight"||r&&t.key==="ArrowLeft",d=t.key==="ArrowUp"||!r&&t.key==="ArrowLeft"||r&&t.key==="ArrowRight";t.preventDefault(),d&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),o&&this.updateComplete.then(()=>{var p;let c=(p=this.shadowRoot)==null?void 0:p.querySelector('[part~="pagination-item--active"]');c&&c.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),r=[...this.intersectionObserverEntries.values()].find(o=>o.isIntersecting);if(this.loop&&(r!=null&&r.target.hasAttribute("data-clone"))){let o=Number(r.target.getAttribute("data-clone"));this.goToSlide(o,"auto");return}r&&(this.activeSlide=t.indexOf(r.target))}handleFocus(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","polite")}handleBlur(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","off")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var t,e;this.pausedAutoplay?(this.autoplayController.stop(),(t=this.autoplayControls)==null||t.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","true"))}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((r,o)=>{e.unobserve(r),r.classList.remove("--in-view"),r.classList.remove("--is-active"),r.setAttribute("aria-label",this.localize.term("slideNum",o+1,t.length)),r.hasAttribute("data-clone")&&r.remove()}),this.loop&&!this.fade){let r=this.slidesPerPage,o=t.slice(-r),n=t.slice(0,r);o.reverse().forEach((d,c)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(t.length-c-1)),this.prepend(p)}),n.forEach((d,c)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(c)),this.append(p)})}this.getSlides({excludeClones:!1}).forEach(r=>{e.observe(r)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((o,n)=>{o.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}});let r=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>r&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((r,o)=>{Math.abs(o-e)%e===0?r.style.removeProperty("scroll-snap-align"):r.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(t="smooth"){if(this.fade){let o=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(o);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,r=!1;for(;!r&&e>0;)e-=1,r=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:r,loop:o,scrollContainer:n,fade:d}=this,c=this.getSlides(),p=this.getSlides({excludeClones:!1}),m=(t+c.length)%c.length;if(this.activeSlide=m,d)return;let f=ea(t+(o?r:0),0,p.length+1),y=p[f],b=n.getBoundingClientRect(),k=y.getBoundingClientRect();if(n.scrollTo({left:k.left-b.left+n.scrollLeft,top:k.top-b.top+n.scrollTop,behavior:$i()?"auto":e}),this.userInteracted&&!this.loop){let T=this.activeSlide===c.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,M=this.activeSlide===0;T?this.previousButton.focus({preventScroll:!0}):M&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,r=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),o=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||o>1,d=this.loop||o<r,c=this.localize.dir()==="ltr";return u`<div part="base" class="${h("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${h("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(p=>!p.hasAttribute("data-clone")).length)}" aria-live="${this.autoplay?"off":"polite"}" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><slot></slot></div><div part="controls" class="${h("w-full flex items-center justify-center relative")}"><div part="navigation" class="${h("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${h("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${n?p=>{this.previous(),this.unblockAutoplay(p,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${h("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-down":"chevron-up"}"></sd-icon></slot></button> ${this.variant==="dot"?u`<div part="pagination-dot" role="tablist" class="${h("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${ia(ra(r),p=>{let m=p+1===o;return u`<button part="pagination-item ${m?"pagination-item--active":""}" class="${h("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",p+1,r)}" @click="${f=>{this.goToSlide(p*e),this.unblockAutoplay(f,this.paginationItems[p])}}" @keydown="${this.handleKeyDown}"><span class="${h("h-4 w-4 block border hover:border-primary-500 rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"border-white hover:border-primary-500":"border-primary",m&&"bg-accent border-none",m?this.inverted?"hover:bg-accent-300":"hover:bg-accent-550":"")}"></span></button>`})}</div>`:u`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${h("w-5 text-center border-b-2 border-accent",this.inverted?"text-white":"text-black")}">${o}</span> <span part="pagination-divider" class="${h("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${h("w-5 text-center",this.inverted?"text-white":"text-black")}">${r}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!d}" class="${h("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!d&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${d?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${d?p=>{this.next(),this.unblockAutoplay(p,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${h("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-up":"chevron-down"}"></sd-icon></slot></button></div><button class="${h("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${p=>{this.pausedAutoplay=!this.pausedAutoplay,p.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${h(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-icon></slot><slot name="autoplay-pause" class="${h(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button></div></div>`}};Q.styles=[...g.styles,x`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{display:block;height:var(--carousel-height);overflow:hidden;position:relative}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`],a([v('[part~="autoplay-controls"]')],Q.prototype,"autoplayControls",2),a([v('[part~="navigation-button--previous"]')],Q.prototype,"previousButton",2),a([v('[part~="navigation-button--next"]')],Q.prototype,"nextButton",2),a([Gi('[part~="pagination-item"]')],Q.prototype,"paginationItems",2),a([l({type:String,reflect:!0})],Q.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],Q.prototype,"inverted",2),a([l({type:Boolean,reflect:!0})],Q.prototype,"loop",2),a([l({type:Boolean,reflect:!0})],Q.prototype,"autoplay",2),a([l({type:Boolean,reflect:!0})],Q.prototype,"fade",2),a([l({type:Number,attribute:"slides-per-page",reflect:!0})],Q.prototype,"slidesPerPage",2),a([l({type:Number,attribute:"slides-per-move",reflect:!0})],Q.prototype,"slidesPerMove",2),a([v("slot:not([name])")],Q.prototype,"defaultSlot",2),a([v(".carousel__slides")],Q.prototype,"scrollContainer",2),a([v(".carousel__pagination")],Q.prototype,"paginationContainer",2),a([L()],Q.prototype,"activeSlide",2),a([L()],Q.prototype,"currentPage",2),a([L()],Q.prototype,"pausedAutoplay",2),a([C("pausedAutoplay")],Q.prototype,"handlePausedAutoplay",1),a([C("fade",{waitUntilFirstUpdate:!0})],Q.prototype,"handleFadeChange",1),a([C("loop",{waitUntilFirstUpdate:!0}),C("slidesPerPage",{waitUntilFirstUpdate:!0})],Q.prototype,"initializeSlides",1),a([C("activeSlide")],Q.prototype,"handleSlideChange",1),a([C("slidesPerMove")],Q.prototype,"handleSlidesPerMoveChange",1),a([C("autoplay")],Q.prototype,"handleAutoplayChange",1),Q=a([w("sd-carousel")],Q);var Bt=(s="value")=>(i,t)=>{let e=i.constructor,r=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(o,n,d){var m;let c=e.getPropertyOptions(s),p=typeof c.attribute=="string"?c.attribute:s;if(o===p){let f=c.converter||Ae,b=(typeof f=="function"?f:(m=f==null?void 0:f.fromAttribute)!=null?m:Ae.fromAttribute)(d,c.type);this[s]!==b&&(this[t]=b)}r.call(this,o,n,d)}};var{I:Yg}=Ss;var lr=s=>s.strings===void 0;var pl={},aa=(s,i=pl)=>s._$AH=i;var xe=te(class extends Ie{constructor(s){if(super(s),s.type!==Kt.PROPERTY&&s.type!==Kt.ATTRIBUTE&&s.type!==Kt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!lr(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[i]){if(i===Dt||i===j)return i;let t=s.element,e=s.name;if(s.type===Kt.PROPERTY){if(i===t[e])return Dt}else if(s.type===Kt.BOOLEAN_ATTRIBUTE){if(!!i===t.hasAttribute(e))return Dt}else if(s.type===Kt.ATTRIBUTE&&t.getAttribute(e)===i+"")return Dt;return aa(s),i}});var ot=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,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(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,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.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return u`<label part="base" class="${h("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${E(this.value)}" .indeterminate="${xe(this.indeterminate)}" .checked="${xe(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @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"} ${this.indeterminate?" control--indeterminate":""}" class="${h("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"><div class="${h("absolute h-3 transition-[width] right-0.25 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${h("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"group-hover:bg-neutral-200",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"></div></div>${this.checked?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?u`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${h("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};ot.styles=[...g.styles,x`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-width:0}:host([required]) #label:after{content:" *"}`],a([v('input[type="checkbox"]')],ot.prototype,"input",2),a([v("#invalid-message")],ot.prototype,"invalidMessage",2),a([l({type:String,reflect:!0})],ot.prototype,"title",2),a([l({type:String,reflect:!0})],ot.prototype,"name",2),a([l()],ot.prototype,"value",2),a([l({type:String,reflect:!0})],ot.prototype,"size",2),a([l({type:Boolean,reflect:!0})],ot.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],ot.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],ot.prototype,"checked",2),a([l({type:Boolean,reflect:!0})],ot.prototype,"indeterminate",2),a([Bt("checked")],ot.prototype,"defaultChecked",2),a([l({type:String,reflect:!0})],ot.prototype,"form",2),a([l({type:Boolean,reflect:!0})],ot.prototype,"required",2),a([L()],ot.prototype,"showInvalidStyle",2),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleDisabledChange",1),a([C(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleStateChange",1),ot=a([w("sd-checkbox")],ot);var Rt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-checkbox")]}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async e=>{await e.updateComplete,e.size=this.size}))}syncCheckboxes(){customElements.get("sd-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,r=this.hasSlotController.test("help-text"),o=this.helpText?!0:r,n=u`<slot @slotchange="${this.syncCheckboxes}"></slot>`,d=this.hasSlotController.test("tooltip");return u`<fieldset part="form-control" class="${h("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${e||d?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${h("p-0 font-bold leading-normal text-black",e?"flex":"hidden")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${d?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${h({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${n}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>`}};Rt.styles=[...g.styles,x`:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`],a([l({type:String,reflect:!0})],Rt.prototype,"size",2),a([l({type:String,reflect:!0})],Rt.prototype,"orientation",2),a([l({type:String,reflect:!0})],Rt.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],Rt.prototype,"helpText",2),a([C("size",{waitUntilFirstUpdate:!0})],Rt.prototype,"handleSizeChange",1),a([C("invalid",{waitUntilFirstUpdate:!0})],Rt.prototype,"handleInvalid",1),Rt=a([w("sd-checkbox-group")],Rt);var pe=Math.min,Pt=Math.max,Ai=Math.round,Oi=Math.floor,re=s=>({x:s,y:s}),ul={left:"right",right:"left",bottom:"top",top:"bottom"},ml={start:"end",end:"start"};function cr(s,i,t){return Pt(s,pe(i,t))}function Qe(s,i){return typeof s=="function"?s(i):s}function ke(s){return s.split("-")[0]}function Ge(s){return s.split("-")[1]}function Wr(s){return s==="x"?"y":"x"}function hr(s){return s==="y"?"height":"width"}var fl=new Set(["top","bottom"]);function ue(s){return fl.has(ke(s))?"y":"x"}function pr(s){return Wr(ue(s))}function la(s,i,t){t===void 0&&(t=!1);let e=Ge(s),r=pr(s),o=hr(r),n=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return i.reference[o]>i.floating[o]&&(n=Di(n)),[n,Di(n)]}function da(s){let i=Di(s);return[dr(s),i,dr(i)]}function dr(s){return s.replace(/start|end/g,i=>ml[i])}var oa=["left","right"],na=["right","left"],gl=["top","bottom"],bl=["bottom","top"];function vl(s,i,t){switch(s){case"top":case"bottom":return t?i?na:oa:i?oa:na;case"left":case"right":return i?gl:bl;default:return[]}}function ca(s,i,t,e){let r=Ge(s),o=vl(ke(s),t==="start",e);return r&&(o=o.map(n=>n+"-"+r),i&&(o=o.concat(o.map(dr)))),o}function Di(s){return s.replace(/left|right|bottom|top/g,i=>ul[i])}function yl(s){return N({top:0,right:0,bottom:0,left:0},s)}function Xr(s){return typeof s!="number"?yl(s):{top:s,right:s,bottom:s,left:s}}function Je(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 ha(s,i,t){let{reference:e,floating:r}=s,o=ue(i),n=pr(i),d=hr(n),c=ke(i),p=o==="y",m=e.x+e.width/2-r.width/2,f=e.y+e.height/2-r.height/2,y=e[d]/2-r[d]/2,b;switch(c){case"top":b={x:m,y:e.y-r.height};break;case"bottom":b={x:m,y:e.y+e.height};break;case"right":b={x:e.x+e.width,y:f};break;case"left":b={x:e.x-r.width,y:f};break;default:b={x:e.x,y:e.y}}switch(Ge(i)){case"start":b[n]-=y*(t&&p?-1:1);break;case"end":b[n]+=y*(t&&p?-1:1);break}return b}var pa=async(s,i,t)=>{let{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:n}=t,d=o.filter(Boolean),c=await(n.isRTL==null?void 0:n.isRTL(i)),p=await n.getElementRects({reference:s,floating:i,strategy:r}),{x:m,y:f}=ha(p,e,c),y=e,b={},k=0;for(let T=0;T<d.length;T++){let{name:M,fn:S}=d[T],{x:O,y:I,data:F,reset:D}=await S({x:m,y:f,initialPlacement:e,placement:y,strategy:r,middlewareData:b,rects:p,platform:n,elements:{reference:s,floating:i}});m=O!=null?O:m,f=I!=null?I:f,b=bt(N({},b),{[M]:N(N({},b[M]),F)}),D&&k<=50&&(k++,typeof D=="object"&&(D.placement&&(y=D.placement),D.rects&&(p=D.rects===!0?await n.getElementRects({reference:s,floating:i,strategy:r}):D.rects),{x:m,y:f}=ha(p,y,c)),T=-1)}return{x:m,y:f,placement:y,strategy:r,middlewareData:b}};async function ur(s,i){var t;i===void 0&&(i={});let{x:e,y:r,platform:o,rects:n,elements:d,strategy:c}=s,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:y=!1,padding:b=0}=Qe(i,s),k=Xr(b),M=d[y?f==="floating"?"reference":"floating":f],S=Je(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(M)))==null||t?M:M.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:p,rootBoundary:m,strategy:c})),O=f==="floating"?{x:e,y:r,width:n.floating.width,height:n.floating.height}:n.reference,I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),F=await(o.isElement==null?void 0:o.isElement(I))?await(o.getScale==null?void 0:o.getScale(I))||{x:1,y:1}:{x:1,y:1},D=Je(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:I,strategy:c}):O);return{top:(S.top-D.top+k.top)/F.y,bottom:(D.bottom-S.bottom+k.bottom)/F.y,left:(S.left-D.left+k.left)/F.x,right:(D.right-S.right+k.right)/F.x}}var ua=s=>({name:"arrow",options:s,async fn(i){let{x:t,y:e,placement:r,rects:o,platform:n,elements:d,middlewareData:c}=i,{element:p,padding:m=0}=Qe(s,i)||{};if(p==null)return{};let f=Xr(m),y={x:t,y:e},b=pr(r),k=hr(b),T=await n.getDimensions(p),M=b==="y",S=M?"top":"left",O=M?"bottom":"right",I=M?"clientHeight":"clientWidth",F=o.reference[k]+o.reference[b]-y[b]-o.floating[k],D=y[b]-o.reference[b],Y=await(n.getOffsetParent==null?void 0:n.getOffsetParent(p)),X=Y?Y[I]:0;(!X||!await(n.isElement==null?void 0:n.isElement(Y)))&&(X=d.floating[I]||o.floating[k]);let Et=F/2-D/2,xt=X/2-T[k]/2-1,st=pe(f[S],xt),It=pe(f[O],xt),tt=st,$t=X-T[k]-It,ut=X/2-T[k]/2+Et,Gt=cr(tt,ut,$t),He=!c.arrow&&Ge(r)!=null&&ut!==Gt&&o.reference[k]/2-(ut<tt?st:It)-T[k]/2<0,ge=He?ut<tt?ut-tt:ut-$t:0;return{[b]:y[b]+ge,data:N({[b]:Gt,centerOffset:ut-Gt-ge},He&&{alignmentOffset:ge}),reset:He}}});var ma=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(i){var t,e;let{placement:r,middlewareData:o,rects:n,initialPlacement:d,platform:c,elements:p}=i,ut=Qe(s,i),{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:T=!0}=ut,M=Fi(ut,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((t=o.arrow)!=null&&t.alignmentOffset)return{};let S=ke(r),O=ue(d),I=ke(d)===d,F=await(c.isRTL==null?void 0:c.isRTL(p.floating)),D=y||(I||!T?[Di(d)]:da(d)),Y=k!=="none";!y&&Y&&D.push(...ca(d,T,k,F));let X=[d,...D],Et=await ur(i,M),xt=[],st=((e=o.flip)==null?void 0:e.overflows)||[];if(m&&xt.push(Et[S]),f){let Gt=la(r,n,F);xt.push(Et[Gt[0]],Et[Gt[1]])}if(st=[...st,{placement:r,overflows:xt}],!xt.every(Gt=>Gt<=0)){var It,tt;let Gt=(((It=o.flip)==null?void 0:It.index)||0)+1,He=X[Gt];if(He&&(!(f==="alignment"?O!==ue(He):!1)||st.every(Jt=>ue(Jt.placement)===O?Jt.overflows[0]>0:!0)))return{data:{index:Gt,overflows:st},reset:{placement:He}};let ge=(tt=st.filter(Ve=>Ve.overflows[0]<=0).sort((Ve,Jt)=>Ve.overflows[1]-Jt.overflows[1])[0])==null?void 0:tt.placement;if(!ge)switch(b){case"bestFit":{var $t;let Ve=($t=st.filter(Jt=>{if(Y){let ze=ue(Jt.placement);return ze===O||ze==="y"}return!0}).map(Jt=>[Jt.placement,Jt.overflows.filter(ze=>ze>0).reduce((ze,Ya)=>ze+Ya,0)]).sort((Jt,ze)=>Jt[1]-ze[1])[0])==null?void 0:$t[0];Ve&&(ge=Ve);break}case"initialPlacement":ge=d;break}if(r!==ge)return{reset:{placement:ge}}}return{}}}};var wl=new Set(["left","top"]);async function xl(s,i){let{placement:t,platform:e,elements:r}=s,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),n=ke(t),d=Ge(t),c=ue(t)==="y",p=wl.has(n)?-1:1,m=o&&c?-1:1,f=Qe(i,s),{mainAxis:y,crossAxis:b,alignmentAxis:k}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return d&&typeof k=="number"&&(b=d==="end"?k*-1:k),c?{x:b*m,y:y*p}:{x:y*p,y:b*m}}var fa=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(i){var t,e;let{x:r,y:o,placement:n,middlewareData:d}=i,c=await xl(i,s);return n===((t=d.offset)==null?void 0:t.placement)&&(e=d.arrow)!=null&&e.alignmentOffset?{}:{x:r+c.x,y:o+c.y,data:bt(N({},c),{placement:n})}}}},ga=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(i){let{x:t,y:e,placement:r}=i,M=Qe(s,i),{mainAxis:o=!0,crossAxis:n=!1,limiter:d={fn:S=>{let{x:O,y:I}=S;return{x:O,y:I}}}}=M,c=Fi(M,["mainAxis","crossAxis","limiter"]),p={x:t,y:e},m=await ur(i,c),f=ue(ke(r)),y=Wr(f),b=p[y],k=p[f];if(o){let S=y==="y"?"top":"left",O=y==="y"?"bottom":"right",I=b+m[S],F=b-m[O];b=cr(I,b,F)}if(n){let S=f==="y"?"top":"left",O=f==="y"?"bottom":"right",I=k+m[S],F=k-m[O];k=cr(I,k,F)}let T=d.fn(bt(N({},i),{[y]:b,[f]:k}));return bt(N({},T),{data:{x:T.x-t,y:T.y-e,enabled:{[y]:o,[f]:n}}})}}};var ba=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(i){var t,e;let{placement:r,rects:o,platform:n,elements:d}=i,st=Qe(s,i),{apply:c=()=>{}}=st,p=Fi(st,["apply"]),m=await ur(i,p),f=ke(r),y=Ge(r),b=ue(r)==="y",{width:k,height:T}=o.floating,M,S;f==="top"||f==="bottom"?(M=f,S=y===(await(n.isRTL==null?void 0:n.isRTL(d.floating))?"start":"end")?"left":"right"):(S=f,M=y==="end"?"top":"bottom");let O=T-m.top-m.bottom,I=k-m.left-m.right,F=pe(T-m[M],O),D=pe(k-m[S],I),Y=!i.middlewareData.shift,X=F,Et=D;if((t=i.middlewareData.shift)!=null&&t.enabled.x&&(Et=I),(e=i.middlewareData.shift)!=null&&e.enabled.y&&(X=O),Y&&!y){let It=Pt(m.left,0),tt=Pt(m.right,0),$t=Pt(m.top,0),ut=Pt(m.bottom,0);b?Et=k-2*(It!==0||tt!==0?It+tt:Pt(m.left,m.right)):X=T-2*($t!==0||ut!==0?$t+ut:Pt(m.top,m.bottom))}await c(bt(N({},i),{availableWidth:Et,availableHeight:X}));let xt=await n.getDimensions(d.floating);return k!==xt.width||T!==xt.height?{reset:{rects:!0}}:{}}}};function mr(){return typeof window!="undefined"}function ti(s){return ya(s)?(s.nodeName||"").toLowerCase():"#document"}function Ut(s){var i;return(s==null||(i=s.ownerDocument)==null?void 0:i.defaultView)||window}function se(s){var i;return(i=(ya(s)?s.ownerDocument:s.document)||window.document)==null?void 0:i.documentElement}function ya(s){return mr()?s instanceof Node||s instanceof Ut(s).Node:!1}function Wt(s){return mr()?s instanceof Element||s instanceof Ut(s).Element:!1}function ae(s){return mr()?s instanceof HTMLElement||s instanceof Ut(s).HTMLElement:!1}function va(s){return!mr()||typeof ShadowRoot=="undefined"?!1:s instanceof ShadowRoot||s instanceof Ut(s).ShadowRoot}var kl=new Set(["inline","contents"]);function hi(s){let{overflow:i,overflowX:t,overflowY:e,display:r}=Xt(s);return/auto|scroll|overlay|hidden|clip/.test(i+e+t)&&!kl.has(r)}var Cl=new Set(["table","td","th"]);function wa(s){return Cl.has(ti(s))}var El=[":popover-open",":modal"];function Ii(s){return El.some(i=>{try{return s.matches(i)}catch(t){return!1}})}var $l=["transform","translate","scale","rotate","perspective"],Tl=["transform","translate","scale","rotate","perspective","filter"],Ll=["paint","layout","strict","content"];function fr(s){let i=gr(),t=Wt(s)?Xt(s):s;return $l.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)||Tl.some(e=>(t.willChange||"").includes(e))||Ll.some(e=>(t.contain||"").includes(e))}function xa(s){let i=Ce(s);for(;ae(i)&&!ei(i);){if(fr(i))return i;if(Ii(i))return null;i=Ce(i)}return null}function gr(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Ml=new Set(["html","body","#document"]);function ei(s){return Ml.has(ti(s))}function Xt(s){return Ut(s).getComputedStyle(s)}function _i(s){return Wt(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function Ce(s){if(ti(s)==="html")return s;let i=s.assignedSlot||s.parentNode||va(s)&&s.host||se(s);return va(i)?i.host:i}function ka(s){let i=Ce(s);return ei(i)?s.ownerDocument?s.ownerDocument.body:s.body:ae(i)&&hi(i)?i:ka(i)}function ci(s,i,t){var e;i===void 0&&(i=[]),t===void 0&&(t=!0);let r=ka(s),o=r===((e=s.ownerDocument)==null?void 0:e.body),n=Ut(r);if(o){let d=br(n);return i.concat(n,n.visualViewport||[],hi(r)?r:[],d&&t?ci(d):[])}return i.concat(r,ci(r,[],t))}function br(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function Ta(s){let i=Xt(s),t=parseFloat(i.width)||0,e=parseFloat(i.height)||0,r=ae(s),o=r?s.offsetWidth:t,n=r?s.offsetHeight:e,d=Ai(t)!==o||Ai(e)!==n;return d&&(t=o,e=n),{width:t,height:e,$:d}}function Qr(s){return Wt(s)?s:s.contextElement}function pi(s){let i=Qr(s);if(!ae(i))return re(1);let t=i.getBoundingClientRect(),{width:e,height:r,$:o}=Ta(i),n=(o?Ai(t.width):t.width)/e,d=(o?Ai(t.height):t.height)/r;return(!n||!Number.isFinite(n))&&(n=1),(!d||!Number.isFinite(d))&&(d=1),{x:n,y:d}}var Sl=re(0);function La(s){let i=Ut(s);return!gr()||!i.visualViewport?Sl:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function zl(s,i,t){return i===void 0&&(i=!1),!t||i&&t!==Ut(s)?!1:i}function ii(s,i,t,e){i===void 0&&(i=!1),t===void 0&&(t=!1);let r=s.getBoundingClientRect(),o=Qr(s),n=re(1);i&&(e?Wt(e)&&(n=pi(e)):n=pi(s));let d=zl(o,t,e)?La(o):re(0),c=(r.left+d.x)/n.x,p=(r.top+d.y)/n.y,m=r.width/n.x,f=r.height/n.y;if(o){let y=Ut(o),b=e&&Wt(e)?Ut(e):e,k=y,T=br(k);for(;T&&e&&b!==k;){let M=pi(T),S=T.getBoundingClientRect(),O=Xt(T),I=S.left+(T.clientLeft+parseFloat(O.paddingLeft))*M.x,F=S.top+(T.clientTop+parseFloat(O.paddingTop))*M.y;c*=M.x,p*=M.y,m*=M.x,f*=M.y,c+=I,p+=F,k=Ut(T),T=br(k)}}return Je({width:m,height:f,x:c,y:p})}function vr(s,i){let t=_i(s).scrollLeft;return i?i.left+t:ii(se(s)).left+t}function Ma(s,i){let t=s.getBoundingClientRect(),e=t.left+i.scrollLeft-vr(s,t),r=t.top+i.scrollTop;return{x:e,y:r}}function Dl(s){let{elements:i,rect:t,offsetParent:e,strategy:r}=s,o=r==="fixed",n=se(e),d=i?Ii(i.floating):!1;if(e===n||d&&o)return t;let c={scrollLeft:0,scrollTop:0},p=re(1),m=re(0),f=ae(e);if((f||!f&&!o)&&((ti(e)!=="body"||hi(n))&&(c=_i(e)),ae(e))){let b=ii(e);p=pi(e),m.x=b.x+e.clientLeft,m.y=b.y+e.clientTop}let y=n&&!f&&!o?Ma(n,c):re(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-c.scrollLeft*p.x+m.x+y.x,y:t.y*p.y-c.scrollTop*p.y+m.y+y.y}}function Al(s){return Array.from(s.getClientRects())}function Ol(s){let i=se(s),t=_i(s),e=s.ownerDocument.body,r=Pt(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),o=Pt(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),n=-t.scrollLeft+vr(s),d=-t.scrollTop;return Xt(e).direction==="rtl"&&(n+=Pt(i.clientWidth,e.clientWidth)-r),{width:r,height:o,x:n,y:d}}var Ca=25;function Il(s,i){let t=Ut(s),e=se(s),r=t.visualViewport,o=e.clientWidth,n=e.clientHeight,d=0,c=0;if(r){o=r.width,n=r.height;let m=gr();(!m||m&&i==="fixed")&&(d=r.offsetLeft,c=r.offsetTop)}let p=vr(e);if(p<=0){let m=e.ownerDocument,f=m.body,y=getComputedStyle(f),b=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,k=Math.abs(e.clientWidth-f.clientWidth-b);k<=Ca&&(o-=k)}else p<=Ca&&(o+=p);return{width:o,height:n,x:d,y:c}}var _l=new Set(["absolute","fixed"]);function Pl(s,i){let t=ii(s,!0,i==="fixed"),e=t.top+s.clientTop,r=t.left+s.clientLeft,o=ae(s)?pi(s):re(1),n=s.clientWidth*o.x,d=s.clientHeight*o.y,c=r*o.x,p=e*o.y;return{width:n,height:d,x:c,y:p}}function Ea(s,i,t){let e;if(i==="viewport")e=Il(s,t);else if(i==="document")e=Ol(se(s));else if(Wt(i))e=Pl(i,t);else{let r=La(s);e={x:i.x-r.x,y:i.y-r.y,width:i.width,height:i.height}}return Je(e)}function Sa(s,i){let t=Ce(s);return t===i||!Wt(t)||ei(t)?!1:Xt(t).position==="fixed"||Sa(t,i)}function Hl(s,i){let t=i.get(s);if(t)return t;let e=ci(s,[],!1).filter(d=>Wt(d)&&ti(d)!=="body"),r=null,o=Xt(s).position==="fixed",n=o?Ce(s):s;for(;Wt(n)&&!ei(n);){let d=Xt(n),c=fr(n);!c&&d.position==="fixed"&&(r=null),(o?!c&&!r:!c&&d.position==="static"&&!!r&&_l.has(r.position)||hi(n)&&!c&&Sa(s,n))?e=e.filter(m=>m!==n):r=d,n=Ce(n)}return i.set(s,e),e}function Vl(s){let{element:i,boundary:t,rootBoundary:e,strategy:r}=s,n=[...t==="clippingAncestors"?Ii(i)?[]:Hl(i,this._c):[].concat(t),e],d=n[0],c=n.reduce((p,m)=>{let f=Ea(i,m,r);return p.top=Pt(f.top,p.top),p.right=pe(f.right,p.right),p.bottom=pe(f.bottom,p.bottom),p.left=Pt(f.left,p.left),p},Ea(i,d,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fl(s){let{width:i,height:t}=Ta(s);return{width:i,height:t}}function Bl(s,i,t){let e=ae(i),r=se(i),o=t==="fixed",n=ii(s,!0,o,i),d={scrollLeft:0,scrollTop:0},c=re(0);function p(){c.x=vr(r)}if(e||!e&&!o)if((ti(i)!=="body"||hi(r))&&(d=_i(i)),e){let b=ii(i,!0,o,i);c.x=b.x+i.clientLeft,c.y=b.y+i.clientTop}else r&&p();o&&!e&&r&&p();let m=r&&!e&&!o?Ma(r,d):re(0),f=n.left+d.scrollLeft-c.x-m.x,y=n.top+d.scrollTop-c.y-m.y;return{x:f,y,width:n.width,height:n.height}}function Zr(s){return Xt(s).position==="static"}function $a(s,i){if(!ae(s)||Xt(s).position==="fixed")return null;if(i)return i(s);let t=s.offsetParent;return se(s)===t&&(t=t.ownerDocument.body),t}function za(s,i){let t=Ut(s);if(Ii(s))return t;if(!ae(s)){let r=Ce(s);for(;r&&!ei(r);){if(Wt(r)&&!Zr(r))return r;r=Ce(r)}return t}let e=$a(s,i);for(;e&&wa(e)&&Zr(e);)e=$a(e,i);return e&&ei(e)&&Zr(e)&&!fr(e)?t:e||xa(s)||t}var Rl=async function(s){let i=this.getOffsetParent||za,t=this.getDimensions,e=await t(s.floating);return{reference:Bl(s.reference,await i(s.floating),s.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function Ul(s){return Xt(s).direction==="rtl"}var Nl={convertOffsetParentRelativeRectToViewportRelativeRect:Dl,getDocumentElement:se,getClippingRect:Vl,getOffsetParent:za,getElementRects:Rl,getClientRects:Al,getDimensions:Fl,getScale:pi,isElement:Wt,isRTL:Ul};function Da(s,i){return s.x===i.x&&s.y===i.y&&s.width===i.width&&s.height===i.height}function ql(s,i){let t=null,e,r=se(s);function o(){var d;clearTimeout(e),(d=t)==null||d.disconnect(),t=null}function n(d,c){d===void 0&&(d=!1),c===void 0&&(c=1),o();let p=s.getBoundingClientRect(),{left:m,top:f,width:y,height:b}=p;if(d||i(),!y||!b)return;let k=Oi(f),T=Oi(r.clientWidth-(m+y)),M=Oi(r.clientHeight-(f+b)),S=Oi(m),I={rootMargin:-k+"px "+-T+"px "+-M+"px "+-S+"px",threshold:Pt(0,pe(1,c))||1},F=!0;function D(Y){let X=Y[0].intersectionRatio;if(X!==c){if(!F)return n();X?n(!1,X):e=setTimeout(()=>{n(!1,1e-7)},1e3)}X===1&&!Da(p,s.getBoundingClientRect())&&n(),F=!1}try{t=new IntersectionObserver(D,bt(N({},I),{root:r.ownerDocument}))}catch(Y){t=new IntersectionObserver(D,I)}t.observe(s)}return n(!0),o}function Aa(s,i,t,e){e===void 0&&(e={});let{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:n=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:c=!1}=e,p=Qr(s),m=r||o?[...p?ci(p):[],...ci(i)]:[];m.forEach(S=>{r&&S.addEventListener("scroll",t,{passive:!0}),o&&S.addEventListener("resize",t)});let f=p&&d?ql(p,t):null,y=-1,b=null;n&&(b=new ResizeObserver(S=>{let[O]=S;O&&O.target===p&&b&&(b.unobserve(i),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var I;(I=b)==null||I.observe(i)})),t()}),p&&!c&&b.observe(p),b.observe(i));let k,T=c?ii(s):null;c&&M();function M(){let S=ii(s);T&&!Da(T,S)&&t(),T=S,k=requestAnimationFrame(M)}return t(),()=>{var S;m.forEach(O=>{r&&O.removeEventListener("scroll",t),o&&O.removeEventListener("resize",t)}),f==null||f(),(S=b)==null||S.disconnect(),b=null,c&&cancelAnimationFrame(k)}}var Oa=fa;var Ia=ga,_a=ma,Gr=ba;var Pa=ua;var Ha=(s,i,t)=>{let e=new Map,r=N({platform:Nl},t),o=bt(N({},r.platform),{_c:e});return pa(s,i,bt(N({},r),{platform:o}))};var G=class extends g{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=Aa(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=[Oa({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Gr({apply:({rects:e})=>{let r=this.sync==="width"||this.sync==="both",o=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${e.reference.width}px`:"",this.popup.style.height=o?`${e.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(_a({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Ia({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Gr({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(Pa({element:this.arrowEl,padding:this.arrowPadding})),Ha(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then(({x:e,y:r,middlewareData:o,placement:n})=>{let d=getComputedStyle(this).direction==="rtl",c={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=o.arrow.x,m=o.arrow.y,f="",y="",b="",k="";if(this.arrowPlacement==="start"){let T=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",y=d?T:"",k=d?"":T}else if(this.arrowPlacement==="end"){let T=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";y=d?"":T,k=d?T:"",b=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(k=typeof p=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(k=typeof p=="number"?`${p}px`:"",f=typeof m=="number"?`${m}px`:"");Object.assign(this.arrowEl.style,{top:f,right:y,bottom:b,left:k,[c]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return u`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${h("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>`}};G.styles=[...g.styles,x`: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)}`],a([v('[part="popup"]')],G.prototype,"popup",2),a([v('[part="arrow"]')],G.prototype,"arrowEl",2),a([l({reflect:!0})],G.prototype,"anchor",2),a([l({type:Boolean,reflect:!0})],G.prototype,"active",2),a([l({type:String,reflect:!0})],G.prototype,"placement",2),a([l({type:String,reflect:!0})],G.prototype,"strategy",2),a([l({type:Number,reflect:!0})],G.prototype,"distance",2),a([l({type:Number,reflect:!0})],G.prototype,"skidding",2),a([l({type:Boolean,reflect:!0})],G.prototype,"arrow",2),a([l({type:String,attribute:"arrow-placement",reflect:!0})],G.prototype,"arrowPlacement",2),a([l({attribute:"arrow-padding",type:Number,reflect:!0})],G.prototype,"arrowPadding",2),a([l({type:Boolean,reflect:!0})],G.prototype,"flip",2),a([l({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(e=>e.trim()).filter(e=>e!==""),toAttribute:t=>t.join(" ")}})],G.prototype,"flipFallbackPlacements",2),a([l({type:String,attribute:"flip-fallback-strategy"})],G.prototype,"flipFallbackStrategy",2),a([l({type:Object})],G.prototype,"flipBoundary",2),a([l({attribute:"flip-padding",type:Number})],G.prototype,"flipPadding",2),a([l({type:Boolean})],G.prototype,"shift",2),a([l({type:Object})],G.prototype,"shiftBoundary",2),a([l({attribute:"shift-padding",type:Number})],G.prototype,"shiftPadding",2),a([l({type:String,attribute:"auto-size"})],G.prototype,"autoSize",2),a([l()],G.prototype,"sync",2),a([l({type:Object})],G.prototype,"autoSizeBoundary",2),a([l({attribute:"auto-size-padding",type:Number})],G.prototype,"autoSizePadding",2),G=a([w("sd-popup")],G);var Lt=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=t?it`a`:this.removable?it`div`:it`button`;return U`<${e} part="base" type="${E(t?void 0:"button")}" href="${E(t?this.href:void 0)}" rel="${E(t&&this.target?"noreferrer noopener":void 0)}" target="${E(t?this.target:void 0)}" download="${E(t?this.download:void 0)}" ?disabled="${E(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${E(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||this.removable?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${h("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":h("border-primary text-primary disabled:border-neutral-500 disabled:text-neutral-500",this.removable?"has-[button:hover]:border-primary-500 has-[button:hover]:bg-neutral-100 has-[button:hover]:text-primary-500":"hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500"),this.disabled&&!t&&"cursor-not-allowed")}"><slot id="content" part="content"></slot>${this.removable&&!t?U`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}"><slot part="removable-indicator" name="removable-indicator"><sd-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-icon></slot></button>`:""}</${e}>`}};Lt.styles=[...g.styles,x`:host{display:inline-block;transition-duration:.15s;transition-duration:var(--sd-duration-fast,.15s);transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host([size=lg])::part(removable-indicator){font-size:var(--sd-font-size-base,1rem)}:host([size=sm])::part(removable-indicator){font-size:.75rem}`],a([v("a, button, div")],Lt.prototype,"tag",2),a([l({type:String,reflect:!0})],Lt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],Lt.prototype,"selected",2),a([l({type:Boolean,reflect:!0})],Lt.prototype,"toggleable",2),a([l({type:Boolean,reflect:!0})],Lt.prototype,"removable",2),a([l({type:Boolean,reflect:!0})],Lt.prototype,"disabled",2),a([l({type:String,reflect:!0})],Lt.prototype,"href",2),a([l({type:String,reflect:!0})],Lt.prototype,"target",2),a([l({reflect:!0})],Lt.prototype,"download",2),Lt=a([w("sd-tag")],Lt);var Va=s=>s;var Jr=s=>Array.from(s.assignedElements({flatten:!0})),Kl=s=>s.tagName.toLocaleLowerCase()==="sd-option"?s:Array.from(s.querySelectorAll(":scope > sd-option")),Yl=s=>s.tagName.toLocaleLowerCase()==="sd-optgroup",Fa=s=>s.map(Kl),Ba=s=>s.filter(Yl),yr=s=>s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var z=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new P(this,"help-text","label");this.localize=new A(this);this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.deletedTagLabel="";this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.type="text";this.currentPlacement=this.placement;this.getOption=Va;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let r=yr(t.value),o=yr(t.getTextLabel()),n=yr(e);return r.includes(n)||o.includes(n)};this.getTag=t=>u`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
127
|
+
${this.inverted?"disabled:bg-neutral-600 disabled:border-neutral-600":"disabled:bg-neutral-500 disabled:border-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${E(t?void 0:this.disabled)}" type="${E(t?void 0:this.type)}" title="${this.title}" name="${E(t?void 0:this.name)}" value="${E(t?void 0:this.value)}" href="${E(t?this.href:void 0)}" target="${E(t?this.target:void 0)}" download="${E(t?this.download:void 0)}" rel="${E(t&&this.target?"noreferrer noopener":void 0)}" role="${E(t?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${h("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${h("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${h("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${h("flex flex-auto items-center justify-end pointer-events-none",r["icon-only"]&&"hidden",this.loading&&"invisible",r["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${h("inline-flex items-center justify-center",r["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${h("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",r["icon-only"]&&"hidden",r["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?U`<sd-loader class="${h("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-loader>`:""}</${e}>`}};Z.styles=[...g.styles,x`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto);z-index:0}::slotted(sd-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--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))!important}::slotted(sd-icon),sd-loader{font-size:calc(var(--tw-varspacing)/2)}`],a([v("a, button")],Z.prototype,"button",2),a([si({selector:"sd-icon"})],Z.prototype,"_iconsInDefaultSlot",2),a([L()],Z.prototype,"invalid",2),a([l({type:String,reflect:!0})],Z.prototype,"title",2),a([l({type:String,reflect:!0})],Z.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],Z.prototype,"inverted",2),a([l({type:String,reflect:!0})],Z.prototype,"size",2),a([l({type:Boolean,reflect:!0})],Z.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],Z.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],Z.prototype,"loading",2),a([l({type:String,reflect:!0})],Z.prototype,"type",2),a([l({type:String,reflect:!0})],Z.prototype,"name",2),a([l()],Z.prototype,"value",2),a([l({type:String,reflect:!0})],Z.prototype,"href",2),a([l({type:String,reflect:!0})],Z.prototype,"target",2),a([l({reflect:!0})],Z.prototype,"download",2),a([l({reflect:!0})],Z.prototype,"form",2),a([l({attribute:"formaction"})],Z.prototype,"formAction",2),a([l({attribute:"formenctype"})],Z.prototype,"formEnctype",2),a([l({attribute:"formmethod"})],Z.prototype,"formMethod",2),a([l({attribute:"formnovalidate",type:Boolean})],Z.prototype,"formNoValidate",2),a([l({attribute:"formtarget"})],Z.prototype,"formTarget",2),a([C("disabled",{waitUntilFirstUpdate:!0})],Z.prototype,"handleDisabledChange",1),Z=a([w("sd-button")],Z);function je(s=document.activeElement){if(s!=null&&s.shadowRoot){let i=s.shadowRoot.activeElement;if(i)return je(i)}return s}function Js(s,i){return{top:Math.round(s.getBoundingClientRect().top-i.getBoundingClientRect().top),left:Math.round(s.getBoundingClientRect().left-i.getBoundingClientRect().left)}}var Yr=new Set;function hl(){let s=document.documentElement.clientWidth;return Math.abs(window.innerWidth-s)}function We(s){if(Yr.add(s),!document.body.classList.contains("sd-scroll-lock")){let i=hl();document.body.classList.add("sd-scroll-lock"),document.body.style.setProperty("--sd-scroll-lock-size",`${i}px`)}}function Xe(s){Yr.delete(s),Yr.size===0&&(document.body.classList.remove("sd-scroll-lock"),document.body.style.removeProperty("--sd-scrollbar-width"))}function ee(s,i,t="vertical",e="smooth"){let r=Js(s,i),o=r.top+i.scrollTop,n=r.left+i.scrollLeft,d=i.scrollLeft,c=i.scrollLeft+i.offsetWidth,p=i.scrollTop,m=i.scrollTop+i.offsetHeight;(t==="horizontal"||t==="both")&&(n<d?i.scrollTo({left:n,behavior:e}):n+s.clientWidth>c&&i.scrollTo({left:n-i.offsetWidth+s.clientWidth,behavior:e})),(t==="vertical"||t==="both")&&(o<p?i.scrollTo({top:o,behavior:e}):o+s.clientHeight>m&&i.scrollTo({top:o-i.offsetHeight+s.clientHeight,behavior:e}))}function li(s){return s.charAt(0).toUpperCase()+s.slice(1)}function jr(s){return s.replace(/-./g,i=>i[1].toUpperCase())}function ta(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 ar(s){var o,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(c=>t(c))}t(s);let e=(o=i.find(d=>ta(d)))!=null?o:null,r=(n=i.reverse().find(d=>ta(d)))!=null?n:null;return{start:e,end:r}}var Si=[],Ze=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(){Si.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Si=Si.filter(i=>i!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Si[Si.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){let{start:i,end:t}=ar(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 vt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"footer");this.localize=new A(this);this.modal=new Ze(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(),We(this)))}disconnectedCallback(){super.disconnectedCallback(),Xe(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=q(this,"drawer.denyClose",{dir:this.localize.dir()});K(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=je(),this.contained||(this.modal.activate(),We(this));let r=this.querySelector("[autofocus]");r&&r.removeAttribute("autofocus"),await Promise.all([W(this.drawer),W(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let o=q(this,`drawer.show${li(this.placement)}`,{dir:this.localize.dir()}),n=q(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([K(this.panel,o.keyframes,o.options),K(this.overlay,n.keyframes,n.options)]),t==null||t.setAttribute("aria-controls","drawer"),t==null||t.setAttribute("aria-expanded","true"),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()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),Xe(this)),await Promise.all([W(this.drawer),W(this.overlay)]);let r=q(this,`drawer.hide${li(this.placement)}`,{dir:this.localize.dir()}),o=q(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([K(this.overlay,o.keyframes,o.options).then(()=>{this.overlay.hidden=!0}),K(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(),We(this)),this.open&&this.contained&&(this.modal.deactivate(),Xe(this))}async show(){if(!this.open)return this.open=!0,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,J(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${h("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="${h("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="${h("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 end-2 z-10"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:64px"><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 ms-4 absolute top-2 end-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="_internal"></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="${h(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};vt.styles=[...g.styles,x`: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)}`],a([v("[part=base]")],vt.prototype,"drawer",2),a([v("[part=panel]")],vt.prototype,"panel",2),a([v("[part=overlay]")],vt.prototype,"overlay",2),a([v("[part=close-button]")],vt.prototype,"closeButton",2),a([l({type:Boolean,reflect:!0})],vt.prototype,"open",2),a([l({type:String,attribute:"label",reflect:!0})],vt.prototype,"label",2),a([l({type:String,reflect:!0})],vt.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],vt.prototype,"contained",2),a([l({attribute:"no-header",type:Boolean,reflect:!0})],vt.prototype,"noHeader",2),a([C("open",{waitUntilFirstUpdate:!0})],vt.prototype,"handleOpenChange",1),a([C("contained",{waitUntilFirstUpdate:!0})],vt.prototype,"handleNoModalChange",1),vt=a([w("sd-drawer")],vt);B("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"}});B("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"}});B("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"}});B("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"}});B("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});var _e=class{constructor(i){this.fixedEnd=!0;this.fixedStart=!0;this.gradient=!1;this.outline=!1;this.map=(i,t,e,r,o)=>(i-t)*(o-r)/(e-t)+r;this.damp=(i,t,e)=>2*(1-t/i)*(t/i)*e;this.canvas=i.canvas,this.frequency=i.frequency,this.phase=i.phase,this.amplitude=i.amplitude,this.color=i.color,this.shift=i.shift,this.lineWidth=2,this.damping=i.damping,this.context=this.canvas.getContext("2d"),this.paused=!0,this.playbackSpeed=1,this.origin={x:0,y:this.canvas.height}}drawPoint(i,t,e){if(!this.context)return;let r=this.lineWidth/2;if(this.context.beginPath(),this.outline&&(this.context.fillStyle=e,this.context.lineWidth=2,this.context.arc(i,t,r,0,2*Math.PI),this.context.fill()),this.gradient){let o=this.context.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(.1,e),o.addColorStop(1,"transparent"),this.context.fillStyle=o}else this.context.fillStyle=e;this.context.fillRect(i-r,t-r,r,this.canvas.height-t+r)}buildSine(i,t,e,r,o){for(let n=this.origin.x,d=this.origin.x+i;n<d;n+=1){let c=r*Math.sin(o*(n+t));this.fixedStart&&this.fixedEnd?this.drawPoint(n,this.origin.y+this.damp(d,n,this.damping)*c,e):this.fixedStart?this.drawPoint(n,this.origin.y+this.map(n,this.origin.x,d,0,this.damping)*c,e):this.fixedEnd?this.drawPoint(n,this.origin.y+(this.damping-this.map(n,this.origin.x,d,0,this.damping))*c,e):this.drawPoint(n,this.origin.y+c,e)}}redraw(){this.phase+=this.shift*(this.paused?1:2*this.playbackSpeed),this.buildSine(this.canvas.width,this.phase,this.color,this.amplitude,this.frequency)}setPlay(){this.paused=!1}setPause(){this.paused=!0}setPlaybackSpeed(i){this.playbackSpeed=i}};var lt=class extends g{constructor(){super();this.localize=new A(this);this.hasSlotController=new P(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=t=>this.localize.term("seconds",Number(t).toFixed(0)),this.animated&&this.initAnimation())}updated(t){if(t.has("animated")){let e=t.get("animated");!e&&this.animated?this.initAnimation():e&&!this.animated&&this.clear()}}get audioElement(){let t=this.shadowRoot.querySelector("slot");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let t=this.audioElement.currentTime;this.currentTime=this.formatTime(t),this.progress=t,this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.progressSlider.max=this.audioElement.duration}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.togglePlaybackSpeed())}formatTime(t){let e=Math.floor(t/60).toString().padStart(2,"0"),r=Math.floor(t%60).toString().padStart(2,"0");return`${e}:${r}`}handleAudioProgress(){if(!this.audioElement)return;let t=Number(this.progressSlider.value);this.audioElement.currentTime=t,this.progress=t,this.currentTime=this.formatTime(t)}handleAudioProgressKeydown(t){t.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),t.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var t;(t=this.audioElement)==null||t.pause()}handleThumbRelease(){var t;this.isPlaying&&((t=this.audioElement)==null||t.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(t){(t.key==="Enter"||t.key===" ")&&this.showTranscript()}rgbToHex(t){let e=t.match(/\d+/g);if(e&&e.length===3){let r=parseInt(e[0]),o=parseInt(e[1]),n=parseInt(e[2]),d=p=>p.toString(16).padStart(2,"0");return`#${d(r)}${d(o)}${d(n)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let t=this.audioPlayerContainer.querySelector(".playback-speed"),r=window.getComputedStyle(t).color,o;this.inverted?o="#FFFFFF33":o=this.rgbToHex(r)+"33",this.waveList=[new _e({canvas:this.canvas,color:o,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new _e({canvas:this.canvas,color:o,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new _e({canvas:this.canvas,color:o,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new _e({canvas:this.canvas,color:o,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new _e({canvas:this.canvas,color:o,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(t=>{t.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(t=>{t.redraw()}),await new Promise(t=>{setTimeout(t,1e3/30)}),await this.draw())}render(){let t=u`<div class="${h("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${h("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" title="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="mb-4">${this.isPlaying?u`<slot name="pause-icon"><sd-icon class="text-xl" name="pause" library="_internal"></sd-icon></slot>`:u`<slot name="play-icon"><sd-icon class="text-xl" name="start" library="_internal"></sd-icon></slot>`}</sd-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript")?u`<button class="${h("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen?this.localize.term("transcriptIsOpen"):this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-icon class="w-6 h-6" name="transcript" library="_internal"></sd-icon></button>`:null} <button class="${h("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="_internal"></sd-icon></button></div></div>`,e=u`<div class="${h("w-full flex justify-between",this.reversedLayout?"mb-0.5":"mt-0.5",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 !mb-4")}" part="timestamps"><div class="${h("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.currentTime}</div><div class="${h("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.duration}</div></div>`;return u`<div class="${h("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?t:null}<div class="relative">${this.animated&&!this.reversedLayout?u`${t}`:null} ${this.animated?u`<canvas class="w-full h-16 -mb-2"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?e:null}<sd-range part="progress-slider" no-tooltip min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-range></div>${this.hasSlotController.test("transcript")?u`<sd-drawer><slot name="transcript"></slot></sd-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?e:null}</div>`}};lt.styles=[...g.styles,x`sd-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-12,3rem);justify-content:center;width:var(--sd-spacing-12,3rem)}sd-button::part(motion-wrapper){border-radius:var(--sd-border-radius-full,9999px)}sd-button::part(label){align-items:center;display:flex;flex-grow:0}sd-range::part(form-control-label){display:none}:host([inverted]) sd-range::part(thumb){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));outline-color:rgb(var(--sd-color-white,255 255 255)/1)}:host([animated]) sd-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-range::part(track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-400,153 171 208)/var(--tw-bg-opacity,1))}:host([inverted]:not([animated])) sd-range::part(active-track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1))}`],a([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],lt.prototype,"reversedLayout",2),a([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],lt.prototype,"hideTimestamps",2),a([l({type:Boolean,reflect:!0})],lt.prototype,"animated",2),a([l({type:Boolean,reflect:!0})],lt.prototype,"inverted",2),a([l({type:Number,reflect:!0})],lt.prototype,"speed",2),a([L()],lt.prototype,"currentTime",2),a([L()],lt.prototype,"duration",2),a([L()],lt.prototype,"isPlaying",2),a([L()],lt.prototype,"isMuted",2),a([L()],lt.prototype,"isTranscriptOpen",2),a([L()],lt.prototype,"progress",2),a([v('[part="progress-slider"]')],lt.prototype,"progressSlider",2),a([v('[part="audio-player"]')],lt.prototype,"audioPlayerContainer",2),a([v("sd-drawer")],lt.prototype,"drawer",2),a([v("canvas")],lt.prototype,"canvas",2),lt=a([w("sd-audio")],lt);var ie=class extends g{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return u`<span part="base" aria-labelledby="content" class="${h("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"text-primary bg-primary-100 border-primary":"text-white bg-primary-500 border-white",green:this.inverted?"text-white bg-success border-primary":"text-white bg-success border-white",red:this.inverted?"text-white bg-error border-primary":"text-white bg-error border-white"}[this.variant])}"><span id="content" part="content" class="${h(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};ie.styles=[...g.styles,x`:host{align-items:center;display:inline-flex;justify-content:center}:host([size=md]){font-size:.625rem;height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem)}:host([size=lg]){font-size:.75rem;height:var(--sd-spacing-5,1.25rem);min-width:var(--sd-spacing-5,1.25rem)}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],a([l({type:String,reflect:!0})],ie.prototype,"size",2),a([l({type:String,reflect:!0})],ie.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],ie.prototype,"inverted",2),ie=a([w("sd-badge")],ie);var jt=class extends g{constructor(){super(...arguments);this.variant="primary";this.shapes=["top","middle","bottom"];this.componentBreakpoint=0}getSvg(t,e){return{0:this.smallSvg(e),414:this.mediumSvg(e),640:this.largeSvg(e)}[t]}largeSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M610.777 1.393.001 120.146 0 123h700.001V74.79c0-4.797-.462-9.585-1.381-14.294-7.909-40.537-47.237-66.998-87.843-59.103Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 123"><path d="M89.224 121.607 700 2.854 700.001 0h-700L0 48.21c0 4.797.463 9.584 1.381 14.294 7.909 40.537 47.237 66.998 87.843 59.103Z"/></svg>`}mediumSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 119"><path d="M597.75 1.6 0 118.046V121h700V85.872c0-5.509-.53-11.006-1.583-16.413-9.063-46.543-54.133-76.924-100.667-67.86Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M102.25 119.4 700 2.954V0H0v35.128c0 5.509.53 11.006 1.583 16.413 9.063 46.543 54.134 76.924 100.667 67.859Z"/></svg>`}smallSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 113"><path d="M566.951 2.08 0 112.466v2.934h700v-3.672c0-7.166-.689-14.314-2.059-21.348-11.789-60.557-70.436-100.09-130.99-88.3Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 116"><path d="M133.049 113.32 700 2.934V0H0v3.672c0 7.165.69 14.314 2.059 21.348 11.79 60.557 70.436 100.09 130.99 88.3Z"/></svg>`}setBreakpoint(){switch(!0){case this.containerElem.clientWidth<=414:this.componentBreakpoint=0;break;case this.containerElem.clientWidth<640:this.componentBreakpoint=414;break;default:this.componentBreakpoint=640}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setBreakpoint()),this.updateComplete.then(()=>{this.setBreakpoint(),this.resizeObserver.observe(this.containerElem)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.containerElem)}renderTopBrandshape(){return u`<div class="relative" part="shape-top">${this.getSvg(this.componentBreakpoint,"top")} ${this.renderWhitespaceFix("top")}</div>`}renderMiddleBrandshape(){return u`<div class="${h({0:"px-6 py-4",414:"px-10 py-8",640:"px-10 py-8"}[this.componentBreakpoint],"w-full block relative")}"><div part="shape-middle" class="${h({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],"w-full block absolute h-full top-0 left-0 z-0")}"></div><div class="${h("z-10 relative",this.variant==="image"&&"invisible opacity-0")}" part="content"><slot>${this.variant==="image"?"":u`<div class="h-8"></div>`}</slot></div></div>`}renderBottomBrandshape(){return u`<div class="relative" part="shape-bottom">${this.getSvg(this.componentBreakpoint,"bottom")}${this.renderWhitespaceFix("bottom")}</div>`}renderWhitespaceFix(t){return u`<div class="${h({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],{top:"bottom-0",bottom:"top-0"}[t],"block absolute left-0 w-full h-[1px]")}"></div>`}renderStylizedVariant(){return u`<div part="stylized-container" class="w-full overflow-hidden"><slot class="${h(this.variant!=="image"&&"hidden")}" name="image"></slot></div>`}renderShapes(){return u`${this.shapes.includes("top")?this.renderTopBrandshape():""} ${this.shapes.includes("middle")?this.renderMiddleBrandshape():""} ${this.shapes.includes("bottom")?this.renderBottomBrandshape():""}`}render(){let t=this.variant.startsWith("border-")||this.variant==="image";return u`<div class="${h({"neutral-100":"fill-neutral-100",primary:"fill-primary",white:"fill-white","border-white":"fill-transparent","border-primary":"fill-transparent",image:"fill-transparent"}[this.variant],"relative")}" part="base">${t?this.renderStylizedVariant():""} ${this.renderShapes()}</div>`}};jt.styles=[...g.styles,x`:host{container-type:inline-size;display:block;--angle:11deg;--radius:60px;--tan:tan(var(--angle));--adjacent:100cqw;--opposite:calc(var(--tan)*var(--adjacent));--curve:calc((var(--opposite) - (var(--radius)/3))*0.5)}@supports not (transform:skewY(11deg)){:host{--tan:0.1943803091}}@media (min-width:415px){:host{--radius:72px}}@media (min-width:640px){:host{--radius:84px}}:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{border-radius:0 var(--radius);height:calc(100% - var(--curve)*2);left:var(--sd-spacing-0,0);margin-top:calc(var(--curve));position:absolute;top:var(--sd-spacing-0,0);transform:skewY(calc(var(--angle)*-1))}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:calc(100% + var(--curve)*2)!important;-o-object-fit:cover;object-fit:cover;position:absolute!important;transform:translateY(calc(var(--curve)*-1)) skewY(var(--angle));width:100%}@supports not (height:100cqw){:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{height:100%;margin-top:0;transform:unset}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:100%!important;transform:unset}}:host([variant=border-primary]){--internal-border-color:rgb(var(--sd-color-primary,0 53 142))}:host([variant=border-white]){--internal-border-color:var(--sd-color-white,#fff)}:host([variant^=border-]) [part=stylized-container]:before{border-color:var(--internal-border-color,#000);border-style:solid;border-width:2px;content:"";right:var(--sd-spacing-0,0)}`],a([v("[part=base]")],jt.prototype,"containerElem",2),a([l({type:String,reflect:!0})],jt.prototype,"variant",2),a([l({type:Array})],jt.prototype,"shapes",2),a([L()],jt.prototype,"componentBreakpoint",2),jt=a([w("sd-brandshape")],jt);var he=Math.min,_t=Math.max,Di=Math.round,Ai=Math.floor,re=s=>({x:s,y:s}),pl={left:"right",right:"left",bottom:"top",top:"bottom"},ul={start:"end",end:"start"};function nr(s,i,t){return _t(s,he(i,t))}function Qe(s,i){return typeof s=="function"?s(i):s}function xe(s){return s.split("-")[0]}function Ge(s){return s.split("-")[1]}function Wr(s){return s==="x"?"y":"x"}function lr(s){return s==="y"?"height":"width"}var ml=new Set(["top","bottom"]);function pe(s){return ml.has(xe(s))?"y":"x"}function dr(s){return Wr(pe(s))}function ra(s,i,t){t===void 0&&(t=!1);let e=Ge(s),r=dr(s),o=lr(r),n=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return i.reference[o]>i.floating[o]&&(n=zi(n)),[n,zi(n)]}function sa(s){let i=zi(s);return[or(s),i,or(i)]}function or(s){return s.replace(/start|end/g,i=>ul[i])}var ea=["left","right"],ia=["right","left"],fl=["top","bottom"],gl=["bottom","top"];function bl(s,i,t){switch(s){case"top":case"bottom":return t?i?ia:ea:i?ea:ia;case"left":case"right":return i?fl:gl;default:return[]}}function aa(s,i,t,e){let r=Ge(s),o=bl(xe(s),t==="start",e);return r&&(o=o.map(n=>n+"-"+r),i&&(o=o.concat(o.map(or)))),o}function zi(s){return s.replace(/left|right|bottom|top/g,i=>pl[i])}function vl(s){return N({top:0,right:0,bottom:0,left:0},s)}function Xr(s){return typeof s!="number"?vl(s):{top:s,right:s,bottom:s,left:s}}function Je(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 oa(s,i,t){let{reference:e,floating:r}=s,o=pe(i),n=dr(i),d=lr(n),c=xe(i),p=o==="y",m=e.x+e.width/2-r.width/2,f=e.y+e.height/2-r.height/2,y=e[d]/2-r[d]/2,b;switch(c){case"top":b={x:m,y:e.y-r.height};break;case"bottom":b={x:m,y:e.y+e.height};break;case"right":b={x:e.x+e.width,y:f};break;case"left":b={x:e.x-r.width,y:f};break;default:b={x:e.x,y:e.y}}switch(Ge(i)){case"start":b[n]-=y*(t&&p?-1:1);break;case"end":b[n]+=y*(t&&p?-1:1);break}return b}var na=async(s,i,t)=>{let{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:n}=t,d=o.filter(Boolean),c=await(n.isRTL==null?void 0:n.isRTL(i)),p=await n.getElementRects({reference:s,floating:i,strategy:r}),{x:m,y:f}=oa(p,e,c),y=e,b={},k=0;for(let T=0;T<d.length;T++){let{name:M,fn:S}=d[T],{x:O,y:I,data:F,reset:D}=await S({x:m,y:f,initialPlacement:e,placement:y,strategy:r,middlewareData:b,rects:p,platform:n,elements:{reference:s,floating:i}});m=O!=null?O:m,f=I!=null?I:f,b=bt(N({},b),{[M]:N(N({},b[M]),F)}),D&&k<=50&&(k++,typeof D=="object"&&(D.placement&&(y=D.placement),D.rects&&(p=D.rects===!0?await n.getElementRects({reference:s,floating:i,strategy:r}):D.rects),{x:m,y:f}=oa(p,y,c)),T=-1)}return{x:m,y:f,placement:y,strategy:r,middlewareData:b}};async function cr(s,i){var t;i===void 0&&(i={});let{x:e,y:r,platform:o,rects:n,elements:d,strategy:c}=s,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:y=!1,padding:b=0}=Qe(i,s),k=Xr(b),M=d[y?f==="floating"?"reference":"floating":f],S=Je(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(M)))==null||t?M:M.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:p,rootBoundary:m,strategy:c})),O=f==="floating"?{x:e,y:r,width:n.floating.width,height:n.floating.height}:n.reference,I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),F=await(o.isElement==null?void 0:o.isElement(I))?await(o.getScale==null?void 0:o.getScale(I))||{x:1,y:1}:{x:1,y:1},D=Je(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:I,strategy:c}):O);return{top:(S.top-D.top+k.top)/F.y,bottom:(D.bottom-S.bottom+k.bottom)/F.y,left:(S.left-D.left+k.left)/F.x,right:(D.right-S.right+k.right)/F.x}}var la=s=>({name:"arrow",options:s,async fn(i){let{x:t,y:e,placement:r,rects:o,platform:n,elements:d,middlewareData:c}=i,{element:p,padding:m=0}=Qe(s,i)||{};if(p==null)return{};let f=Xr(m),y={x:t,y:e},b=dr(r),k=lr(b),T=await n.getDimensions(p),M=b==="y",S=M?"top":"left",O=M?"bottom":"right",I=M?"clientHeight":"clientWidth",F=o.reference[k]+o.reference[b]-y[b]-o.floating[k],D=y[b]-o.reference[b],Y=await(n.getOffsetParent==null?void 0:n.getOffsetParent(p)),X=Y?Y[I]:0;(!X||!await(n.isElement==null?void 0:n.isElement(Y)))&&(X=d.floating[I]||o.floating[k]);let Et=F/2-D/2,xt=X/2-T[k]/2-1,st=he(f[S],xt),It=he(f[O],xt),tt=st,$t=X-T[k]-It,ut=X/2-T[k]/2+Et,Gt=nr(tt,ut,$t),He=!c.arrow&&Ge(r)!=null&&ut!==Gt&&o.reference[k]/2-(ut<tt?st:It)-T[k]/2<0,ge=He?ut<tt?ut-tt:ut-$t:0;return{[b]:y[b]+ge,data:N({[b]:Gt,centerOffset:ut-Gt-ge},He&&{alignmentOffset:ge}),reset:He}}});var da=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(i){var t,e;let{placement:r,middlewareData:o,rects:n,initialPlacement:d,platform:c,elements:p}=i,ut=Qe(s,i),{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:T=!0}=ut,M=Fi(ut,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((t=o.arrow)!=null&&t.alignmentOffset)return{};let S=xe(r),O=pe(d),I=xe(d)===d,F=await(c.isRTL==null?void 0:c.isRTL(p.floating)),D=y||(I||!T?[zi(d)]:sa(d)),Y=k!=="none";!y&&Y&&D.push(...aa(d,T,k,F));let X=[d,...D],Et=await cr(i,M),xt=[],st=((e=o.flip)==null?void 0:e.overflows)||[];if(m&&xt.push(Et[S]),f){let Gt=ra(r,n,F);xt.push(Et[Gt[0]],Et[Gt[1]])}if(st=[...st,{placement:r,overflows:xt}],!xt.every(Gt=>Gt<=0)){var It,tt;let Gt=(((It=o.flip)==null?void 0:It.index)||0)+1,He=X[Gt];if(He&&(!(f==="alignment"?O!==pe(He):!1)||st.every(Jt=>pe(Jt.placement)===O?Jt.overflows[0]>0:!0)))return{data:{index:Gt,overflows:st},reset:{placement:He}};let ge=(tt=st.filter(Ve=>Ve.overflows[0]<=0).sort((Ve,Jt)=>Ve.overflows[1]-Jt.overflows[1])[0])==null?void 0:tt.placement;if(!ge)switch(b){case"bestFit":{var $t;let Ve=($t=st.filter(Jt=>{if(Y){let ze=pe(Jt.placement);return ze===O||ze==="y"}return!0}).map(Jt=>[Jt.placement,Jt.overflows.filter(ze=>ze>0).reduce((ze,Ya)=>ze+Ya,0)]).sort((Jt,ze)=>Jt[1]-ze[1])[0])==null?void 0:$t[0];Ve&&(ge=Ve);break}case"initialPlacement":ge=d;break}if(r!==ge)return{reset:{placement:ge}}}return{}}}};var yl=new Set(["left","top"]);async function wl(s,i){let{placement:t,platform:e,elements:r}=s,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),n=xe(t),d=Ge(t),c=pe(t)==="y",p=yl.has(n)?-1:1,m=o&&c?-1:1,f=Qe(i,s),{mainAxis:y,crossAxis:b,alignmentAxis:k}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return d&&typeof k=="number"&&(b=d==="end"?k*-1:k),c?{x:b*m,y:y*p}:{x:y*p,y:b*m}}var ca=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(i){var t,e;let{x:r,y:o,placement:n,middlewareData:d}=i,c=await wl(i,s);return n===((t=d.offset)==null?void 0:t.placement)&&(e=d.arrow)!=null&&e.alignmentOffset?{}:{x:r+c.x,y:o+c.y,data:bt(N({},c),{placement:n})}}}},ha=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(i){let{x:t,y:e,placement:r}=i,M=Qe(s,i),{mainAxis:o=!0,crossAxis:n=!1,limiter:d={fn:S=>{let{x:O,y:I}=S;return{x:O,y:I}}}}=M,c=Fi(M,["mainAxis","crossAxis","limiter"]),p={x:t,y:e},m=await cr(i,c),f=pe(xe(r)),y=Wr(f),b=p[y],k=p[f];if(o){let S=y==="y"?"top":"left",O=y==="y"?"bottom":"right",I=b+m[S],F=b-m[O];b=nr(I,b,F)}if(n){let S=f==="y"?"top":"left",O=f==="y"?"bottom":"right",I=k+m[S],F=k-m[O];k=nr(I,k,F)}let T=d.fn(bt(N({},i),{[y]:b,[f]:k}));return bt(N({},T),{data:{x:T.x-t,y:T.y-e,enabled:{[y]:o,[f]:n}}})}}};var pa=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(i){var t,e;let{placement:r,rects:o,platform:n,elements:d}=i,st=Qe(s,i),{apply:c=()=>{}}=st,p=Fi(st,["apply"]),m=await cr(i,p),f=xe(r),y=Ge(r),b=pe(r)==="y",{width:k,height:T}=o.floating,M,S;f==="top"||f==="bottom"?(M=f,S=y===(await(n.isRTL==null?void 0:n.isRTL(d.floating))?"start":"end")?"left":"right"):(S=f,M=y==="end"?"top":"bottom");let O=T-m.top-m.bottom,I=k-m.left-m.right,F=he(T-m[M],O),D=he(k-m[S],I),Y=!i.middlewareData.shift,X=F,Et=D;if((t=i.middlewareData.shift)!=null&&t.enabled.x&&(Et=I),(e=i.middlewareData.shift)!=null&&e.enabled.y&&(X=O),Y&&!y){let It=_t(m.left,0),tt=_t(m.right,0),$t=_t(m.top,0),ut=_t(m.bottom,0);b?Et=k-2*(It!==0||tt!==0?It+tt:_t(m.left,m.right)):X=T-2*($t!==0||ut!==0?$t+ut:_t(m.top,m.bottom))}await c(bt(N({},i),{availableWidth:Et,availableHeight:X}));let xt=await n.getDimensions(d.floating);return k!==xt.width||T!==xt.height?{reset:{rects:!0}}:{}}}};function hr(){return typeof window!="undefined"}function ti(s){return ma(s)?(s.nodeName||"").toLowerCase():"#document"}function Bt(s){var i;return(s==null||(i=s.ownerDocument)==null?void 0:i.defaultView)||window}function se(s){var i;return(i=(ma(s)?s.ownerDocument:s.document)||window.document)==null?void 0:i.documentElement}function ma(s){return hr()?s instanceof Node||s instanceof Bt(s).Node:!1}function Wt(s){return hr()?s instanceof Element||s instanceof Bt(s).Element:!1}function ae(s){return hr()?s instanceof HTMLElement||s instanceof Bt(s).HTMLElement:!1}function ua(s){return!hr()||typeof ShadowRoot=="undefined"?!1:s instanceof ShadowRoot||s instanceof Bt(s).ShadowRoot}var xl=new Set(["inline","contents"]);function ci(s){let{overflow:i,overflowX:t,overflowY:e,display:r}=Xt(s);return/auto|scroll|overlay|hidden|clip/.test(i+e+t)&&!xl.has(r)}var kl=new Set(["table","td","th"]);function fa(s){return kl.has(ti(s))}var Cl=[":popover-open",":modal"];function Oi(s){return Cl.some(i=>{try{return s.matches(i)}catch(t){return!1}})}var El=["transform","translate","scale","rotate","perspective"],$l=["transform","translate","scale","rotate","perspective","filter"],Tl=["paint","layout","strict","content"];function pr(s){let i=ur(),t=Wt(s)?Xt(s):s;return El.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)||$l.some(e=>(t.willChange||"").includes(e))||Tl.some(e=>(t.contain||"").includes(e))}function ga(s){let i=ke(s);for(;ae(i)&&!ei(i);){if(pr(i))return i;if(Oi(i))return null;i=ke(i)}return null}function ur(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Ll=new Set(["html","body","#document"]);function ei(s){return Ll.has(ti(s))}function Xt(s){return Bt(s).getComputedStyle(s)}function Ii(s){return Wt(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function ke(s){if(ti(s)==="html")return s;let i=s.assignedSlot||s.parentNode||ua(s)&&s.host||se(s);return ua(i)?i.host:i}function ba(s){let i=ke(s);return ei(i)?s.ownerDocument?s.ownerDocument.body:s.body:ae(i)&&ci(i)?i:ba(i)}function di(s,i,t){var e;i===void 0&&(i=[]),t===void 0&&(t=!0);let r=ba(s),o=r===((e=s.ownerDocument)==null?void 0:e.body),n=Bt(r);if(o){let d=mr(n);return i.concat(n,n.visualViewport||[],ci(r)?r:[],d&&t?di(d):[])}return i.concat(r,di(r,[],t))}function mr(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function xa(s){let i=Xt(s),t=parseFloat(i.width)||0,e=parseFloat(i.height)||0,r=ae(s),o=r?s.offsetWidth:t,n=r?s.offsetHeight:e,d=Di(t)!==o||Di(e)!==n;return d&&(t=o,e=n),{width:t,height:e,$:d}}function Qr(s){return Wt(s)?s:s.contextElement}function hi(s){let i=Qr(s);if(!ae(i))return re(1);let t=i.getBoundingClientRect(),{width:e,height:r,$:o}=xa(i),n=(o?Di(t.width):t.width)/e,d=(o?Di(t.height):t.height)/r;return(!n||!Number.isFinite(n))&&(n=1),(!d||!Number.isFinite(d))&&(d=1),{x:n,y:d}}var Ml=re(0);function ka(s){let i=Bt(s);return!ur()||!i.visualViewport?Ml:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function Sl(s,i,t){return i===void 0&&(i=!1),!t||i&&t!==Bt(s)?!1:i}function ii(s,i,t,e){i===void 0&&(i=!1),t===void 0&&(t=!1);let r=s.getBoundingClientRect(),o=Qr(s),n=re(1);i&&(e?Wt(e)&&(n=hi(e)):n=hi(s));let d=Sl(o,t,e)?ka(o):re(0),c=(r.left+d.x)/n.x,p=(r.top+d.y)/n.y,m=r.width/n.x,f=r.height/n.y;if(o){let y=Bt(o),b=e&&Wt(e)?Bt(e):e,k=y,T=mr(k);for(;T&&e&&b!==k;){let M=hi(T),S=T.getBoundingClientRect(),O=Xt(T),I=S.left+(T.clientLeft+parseFloat(O.paddingLeft))*M.x,F=S.top+(T.clientTop+parseFloat(O.paddingTop))*M.y;c*=M.x,p*=M.y,m*=M.x,f*=M.y,c+=I,p+=F,k=Bt(T),T=mr(k)}}return Je({width:m,height:f,x:c,y:p})}function fr(s,i){let t=Ii(s).scrollLeft;return i?i.left+t:ii(se(s)).left+t}function Ca(s,i){let t=s.getBoundingClientRect(),e=t.left+i.scrollLeft-fr(s,t),r=t.top+i.scrollTop;return{x:e,y:r}}function zl(s){let{elements:i,rect:t,offsetParent:e,strategy:r}=s,o=r==="fixed",n=se(e),d=i?Oi(i.floating):!1;if(e===n||d&&o)return t;let c={scrollLeft:0,scrollTop:0},p=re(1),m=re(0),f=ae(e);if((f||!f&&!o)&&((ti(e)!=="body"||ci(n))&&(c=Ii(e)),ae(e))){let b=ii(e);p=hi(e),m.x=b.x+e.clientLeft,m.y=b.y+e.clientTop}let y=n&&!f&&!o?Ca(n,c):re(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-c.scrollLeft*p.x+m.x+y.x,y:t.y*p.y-c.scrollTop*p.y+m.y+y.y}}function Dl(s){return Array.from(s.getClientRects())}function Al(s){let i=se(s),t=Ii(s),e=s.ownerDocument.body,r=_t(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),o=_t(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),n=-t.scrollLeft+fr(s),d=-t.scrollTop;return Xt(e).direction==="rtl"&&(n+=_t(i.clientWidth,e.clientWidth)-r),{width:r,height:o,x:n,y:d}}var va=25;function Ol(s,i){let t=Bt(s),e=se(s),r=t.visualViewport,o=e.clientWidth,n=e.clientHeight,d=0,c=0;if(r){o=r.width,n=r.height;let m=ur();(!m||m&&i==="fixed")&&(d=r.offsetLeft,c=r.offsetTop)}let p=fr(e);if(p<=0){let m=e.ownerDocument,f=m.body,y=getComputedStyle(f),b=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,k=Math.abs(e.clientWidth-f.clientWidth-b);k<=va&&(o-=k)}else p<=va&&(o+=p);return{width:o,height:n,x:d,y:c}}var Il=new Set(["absolute","fixed"]);function _l(s,i){let t=ii(s,!0,i==="fixed"),e=t.top+s.clientTop,r=t.left+s.clientLeft,o=ae(s)?hi(s):re(1),n=s.clientWidth*o.x,d=s.clientHeight*o.y,c=r*o.x,p=e*o.y;return{width:n,height:d,x:c,y:p}}function ya(s,i,t){let e;if(i==="viewport")e=Ol(s,t);else if(i==="document")e=Al(se(s));else if(Wt(i))e=_l(i,t);else{let r=ka(s);e={x:i.x-r.x,y:i.y-r.y,width:i.width,height:i.height}}return Je(e)}function Ea(s,i){let t=ke(s);return t===i||!Wt(t)||ei(t)?!1:Xt(t).position==="fixed"||Ea(t,i)}function Pl(s,i){let t=i.get(s);if(t)return t;let e=di(s,[],!1).filter(d=>Wt(d)&&ti(d)!=="body"),r=null,o=Xt(s).position==="fixed",n=o?ke(s):s;for(;Wt(n)&&!ei(n);){let d=Xt(n),c=pr(n);!c&&d.position==="fixed"&&(r=null),(o?!c&&!r:!c&&d.position==="static"&&!!r&&Il.has(r.position)||ci(n)&&!c&&Ea(s,n))?e=e.filter(m=>m!==n):r=d,n=ke(n)}return i.set(s,e),e}function Hl(s){let{element:i,boundary:t,rootBoundary:e,strategy:r}=s,n=[...t==="clippingAncestors"?Oi(i)?[]:Pl(i,this._c):[].concat(t),e],d=n[0],c=n.reduce((p,m)=>{let f=ya(i,m,r);return p.top=_t(f.top,p.top),p.right=he(f.right,p.right),p.bottom=he(f.bottom,p.bottom),p.left=_t(f.left,p.left),p},ya(i,d,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Vl(s){let{width:i,height:t}=xa(s);return{width:i,height:t}}function Fl(s,i,t){let e=ae(i),r=se(i),o=t==="fixed",n=ii(s,!0,o,i),d={scrollLeft:0,scrollTop:0},c=re(0);function p(){c.x=fr(r)}if(e||!e&&!o)if((ti(i)!=="body"||ci(r))&&(d=Ii(i)),e){let b=ii(i,!0,o,i);c.x=b.x+i.clientLeft,c.y=b.y+i.clientTop}else r&&p();o&&!e&&r&&p();let m=r&&!e&&!o?Ca(r,d):re(0),f=n.left+d.scrollLeft-c.x-m.x,y=n.top+d.scrollTop-c.y-m.y;return{x:f,y,width:n.width,height:n.height}}function Zr(s){return Xt(s).position==="static"}function wa(s,i){if(!ae(s)||Xt(s).position==="fixed")return null;if(i)return i(s);let t=s.offsetParent;return se(s)===t&&(t=t.ownerDocument.body),t}function $a(s,i){let t=Bt(s);if(Oi(s))return t;if(!ae(s)){let r=ke(s);for(;r&&!ei(r);){if(Wt(r)&&!Zr(r))return r;r=ke(r)}return t}let e=wa(s,i);for(;e&&fa(e)&&Zr(e);)e=wa(e,i);return e&&ei(e)&&Zr(e)&&!pr(e)?t:e||ga(s)||t}var Bl=async function(s){let i=this.getOffsetParent||$a,t=this.getDimensions,e=await t(s.floating);return{reference:Fl(s.reference,await i(s.floating),s.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function Rl(s){return Xt(s).direction==="rtl"}var Ul={convertOffsetParentRelativeRectToViewportRelativeRect:zl,getDocumentElement:se,getClippingRect:Hl,getOffsetParent:$a,getElementRects:Bl,getClientRects:Dl,getDimensions:Vl,getScale:hi,isElement:Wt,isRTL:Rl};function Ta(s,i){return s.x===i.x&&s.y===i.y&&s.width===i.width&&s.height===i.height}function Nl(s,i){let t=null,e,r=se(s);function o(){var d;clearTimeout(e),(d=t)==null||d.disconnect(),t=null}function n(d,c){d===void 0&&(d=!1),c===void 0&&(c=1),o();let p=s.getBoundingClientRect(),{left:m,top:f,width:y,height:b}=p;if(d||i(),!y||!b)return;let k=Ai(f),T=Ai(r.clientWidth-(m+y)),M=Ai(r.clientHeight-(f+b)),S=Ai(m),I={rootMargin:-k+"px "+-T+"px "+-M+"px "+-S+"px",threshold:_t(0,he(1,c))||1},F=!0;function D(Y){let X=Y[0].intersectionRatio;if(X!==c){if(!F)return n();X?n(!1,X):e=setTimeout(()=>{n(!1,1e-7)},1e3)}X===1&&!Ta(p,s.getBoundingClientRect())&&n(),F=!1}try{t=new IntersectionObserver(D,bt(N({},I),{root:r.ownerDocument}))}catch(Y){t=new IntersectionObserver(D,I)}t.observe(s)}return n(!0),o}function La(s,i,t,e){e===void 0&&(e={});let{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:n=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:c=!1}=e,p=Qr(s),m=r||o?[...p?di(p):[],...di(i)]:[];m.forEach(S=>{r&&S.addEventListener("scroll",t,{passive:!0}),o&&S.addEventListener("resize",t)});let f=p&&d?Nl(p,t):null,y=-1,b=null;n&&(b=new ResizeObserver(S=>{let[O]=S;O&&O.target===p&&b&&(b.unobserve(i),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var I;(I=b)==null||I.observe(i)})),t()}),p&&!c&&b.observe(p),b.observe(i));let k,T=c?ii(s):null;c&&M();function M(){let S=ii(s);T&&!Ta(T,S)&&t(),T=S,k=requestAnimationFrame(M)}return t(),()=>{var S;m.forEach(O=>{r&&O.removeEventListener("scroll",t),o&&O.removeEventListener("resize",t)}),f==null||f(),(S=b)==null||S.disconnect(),b=null,c&&cancelAnimationFrame(k)}}var Ma=ca;var Sa=ha,za=da,Gr=pa;var Da=la;var Aa=(s,i,t)=>{let e=new Map,r=N({platform:Ul},t),o=bt(N({},r.platform),{_c:e});return na(s,i,bt(N({},r),{platform:o}))};var Q=class extends g{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=La(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=[Ma({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Gr({apply:({rects:e})=>{let r=this.sync==="width"||this.sync==="both",o=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${e.reference.width}px`:"",this.popup.style.height=o?`${e.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(za({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Sa({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Gr({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(Da({element:this.arrowEl,padding:this.arrowPadding})),Aa(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then(({x:e,y:r,middlewareData:o,placement:n})=>{let d=getComputedStyle(this).direction==="rtl",c={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=o.arrow.x,m=o.arrow.y,f="",y="",b="",k="";if(this.arrowPlacement==="start"){let T=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",y=d?T:"",k=d?"":T}else if(this.arrowPlacement==="end"){let T=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";y=d?"":T,k=d?T:"",b=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(k=typeof p=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(k=typeof p=="number"?`${p}px`:"",f=typeof m=="number"?`${m}px`:"");Object.assign(this.arrowEl.style,{top:f,right:y,bottom:b,left:k,[c]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return u`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${h("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>`}};Q.styles=[...g.styles,x`: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)}`],a([v('[part="popup"]')],Q.prototype,"popup",2),a([v('[part="arrow"]')],Q.prototype,"arrowEl",2),a([l({reflect:!0})],Q.prototype,"anchor",2),a([l({type:Boolean,reflect:!0})],Q.prototype,"active",2),a([l({type:String,reflect:!0})],Q.prototype,"placement",2),a([l({type:String,reflect:!0})],Q.prototype,"strategy",2),a([l({type:Number,reflect:!0})],Q.prototype,"distance",2),a([l({type:Number,reflect:!0})],Q.prototype,"skidding",2),a([l({type:Boolean,reflect:!0})],Q.prototype,"arrow",2),a([l({type:String,attribute:"arrow-placement",reflect:!0})],Q.prototype,"arrowPlacement",2),a([l({attribute:"arrow-padding",type:Number,reflect:!0})],Q.prototype,"arrowPadding",2),a([l({type:Boolean,reflect:!0})],Q.prototype,"flip",2),a([l({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(e=>e.trim()).filter(e=>e!==""),toAttribute:t=>t.join(" ")}})],Q.prototype,"flipFallbackPlacements",2),a([l({type:String,attribute:"flip-fallback-strategy"})],Q.prototype,"flipFallbackStrategy",2),a([l({type:Object})],Q.prototype,"flipBoundary",2),a([l({attribute:"flip-padding",type:Number})],Q.prototype,"flipPadding",2),a([l({type:Boolean})],Q.prototype,"shift",2),a([l({type:Object})],Q.prototype,"shiftBoundary",2),a([l({attribute:"shift-padding",type:Number})],Q.prototype,"shiftPadding",2),a([l({type:String,attribute:"auto-size"})],Q.prototype,"autoSize",2),a([l()],Q.prototype,"sync",2),a([l({type:Object})],Q.prototype,"autoSizeBoundary",2),a([l({attribute:"auto-size-padding",type:Number})],Q.prototype,"autoSizePadding",2),Q=a([w("sd-popup")],Q);function Oa(s,i){let t=s;for(;t;){if(t.matches(i))return t;if(t.parentElement)t=t.parentElement;else if(t.parentNode instanceof ShadowRoot)t=t.parentNode.host;else break}return null}var dt=class extends g{constructor(){super(...arguments);this.localize=new A(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(o=>ar(o).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(()=>{let r=je();(!r||!this.containingElement||Oa(r,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;ee(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}),o=r.find(d=>!d.disabled)||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(o),o.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,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,J(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 W(this),this.panel.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=q(this,"dropdown.show",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await W(this);let{keyframes:t,options:e}=q(this,"dropdown.hide",{dir:this.localize.dir()});await K(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" exportparts="
|
|
128
|
+
popup:base__popup,
|
|
129
|
+
" 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="${h("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>`}};dt.styles=[...g.styles,x`: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}`],a([v("#dropdown")],dt.prototype,"popup",2),a([v("[part=trigger]")],dt.prototype,"trigger",2),a([v("[part=panel]")],dt.prototype,"panel",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"open",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"rounded",2),a([l({type:String,reflect:!0})],dt.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"disabled",2),a([l({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],dt.prototype,"stayOpenOnSelect",2),a([l({type:Object})],dt.prototype,"containingElement",2),a([l({type:Number,reflect:!0})],dt.prototype,"distance",2),a([l({type:Number,reflect:!0})],dt.prototype,"skidding",2),a([l({type:Boolean,reflect:!0,attribute:"no-auto-size"})],dt.prototype,"noAutoSize",2),a([l({type:Boolean,reflect:!0,attribute:"no-flip"})],dt.prototype,"noFlip",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"hoist",2),a([C("open",{waitUntilFirstUpdate:!0})],dt.prototype,"handleOpenChange",1),dt=a([w("sd-dropdown")],dt);B("dropdown.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("dropdown.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Pt=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.label="";this.itemPositionsCached=!1;this.isTruncated=!1}get items(){return this.querySelectorAll("sd-breadcrumb-item")}cacheItemPositions(){this.items.forEach(t=>{let{width:e}=t.getBoundingClientRect();t.dataset.size=`${e}`}),this.itemPositionsCached=!0}handleTruncation(){var o;if(document.documentElement.clientWidth<=1024)return;let{width:t}=this.base.getBoundingClientRect(),{width:e}=this.truncated.getBoundingClientRect();this.itemPositionsCached||this.cacheItemPositions(),this.dropdown.innerHTML="",this.isTruncated=!1;let r=0;for(let[n,d]of Array.from(this.items).reverse().entries()){let c=parseFloat(`${(o=d.dataset.size)!=null?o:d.getBoundingClientRect().width}`);if(d.hidden=!1,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0;continue}if(n===0||n===1){r+=c;continue}if(this.isTruncated=r+c+e>t,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0}else r+=c}}handleMobileChevron(){var e,r,o;let t=document.createElement("sd-icon");t.setAttribute("slot","icon-left"),t.setAttribute("library","_internal"),t.setAttribute("name","chevron-left"),t.setAttribute("class","text-base me-1 lg:hidden"),(o=(r=(e=Array.from(this.items).at(-2))==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("sd-link"))==null||o.appendChild(t)}handleSlotChange(){this.handleMobileChevron()}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.handleTruncation()),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}render(){return u`<nav part="base" class="flex items-center pb-1" aria-label="${this.label}"><sd-dropdown part="truncated" class="${h(!this.isTruncated&&"absolute opacity-0 pointer-events-none")}"><button slot="trigger" tabindex="${this.isTruncated?"0":"-1"}" aria-label="${this.localize.term("truncatedBreadcrumbs")}" aria-expanded="false" aria-haspopup="true" class="flex sd-interactive">[...]</button><ol part="truncated-dropdown" class="flex flex-col gap-4 px-2 py-3 min-w-40"></ol></sd-dropdown><ol part="list" class="flex items-center"><slot @slotchange="${this.handleSlotChange}"></slot></ol></nav>`}};Pt.styles=[...g.styles,x`:host{display:block;position:relative}::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{border-radius:var(--sd-border-radius-full,9999px);content:var(--tw-content);display:none;height:var(--sd-spacing-1,.25rem);margin-left:var(--sd-spacing-2,.5rem);margin-right:var(--sd-spacing-2,.5rem);width:var(--sd-spacing-1,.25rem);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-bg-opacity,1))}@media (min-width:1024px){::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{content:var(--tw-content);display:inline-block}}::slotted(sd-breadcrumb-item:nth-last-child(2)){display:flex}@media (min-width:1024px){::slotted(sd-breadcrumb-item:nth-last-child(2)):after{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-accent,45 157 0)/var(--tw-bg-opacity,1))}}::slotted(sd-breadcrumb-item),sd-dropdown{align-items:center;display:none;font-size:var(--sd-font-size-sm,.875rem)}@media (min-width:1024px){::slotted(sd-breadcrumb-item),sd-dropdown{display:flex}}`],a([v('[part="base"]')],Pt.prototype,"base",2),a([v('[part="truncated"]')],Pt.prototype,"truncated",2),a([v('[part="truncated-dropdown"]')],Pt.prototype,"dropdown",2),a([v("slot")],Pt.prototype,"defaultSlot",2),a([l({type:String,reflect:!0})],Pt.prototype,"label",2),a([L()],Pt.prototype,"itemPositionsCached",2),a([L()],Pt.prototype,"isTruncated",2),Pt=a([w("sd-breadcrumb")],Pt);var Ot=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(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="${h("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="${E(this.href||void 0)}" target="${E(this.target||void 0)}" download="${E(this.download)}" rel="${E(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="${h("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="${h("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};Ot.styles=[...g.styles,x`::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)}`],a([v("a")],Ot.prototype,"button",2),a([l({type:Boolean,reflect:!0})],Ot.prototype,"standalone",2),a([l({type:String,reflect:!0})],Ot.prototype,"size",2),a([l({type:Boolean,reflect:!0})],Ot.prototype,"inverted",2),a([l({type:String,reflect:!0})],Ot.prototype,"href",2),a([l({type:Boolean,attribute:"visually-disabled",reflect:!0})],Ot.prototype,"visuallyDisabled",2),a([l({type:String,reflect:!0})],Ot.prototype,"target",2),a([l({reflect:!0})],Ot.prototype,"download",2),Ot=a([w("sd-link")],Ot);var Yt=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.href="";this.current=!1}handleCurrentChange(){var t,e;!this.base||!this.current||(e=(t=this.base.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return u`<sd-link part="base" href="${E(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};Yt.styles=[...g.styles,x`:host{align-items:center;display:inline-flex}sd-link::part(base){align-items:center}sd-link::part(icon-left){display:inline-flex;margin-right:var(--sd-spacing-0,0)}sd-link sd-icon{margin:var(--sd-spacing-0,0)}:host([current]) sd-link::part(base){--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-700,104 104 104)/var(--tw-text-opacity,1))}:host([current]) sd-link::part(label){text-decoration-line:none}`],a([v('[part="base"]')],Yt.prototype,"base",2),a([l({type:String,reflect:!0})],Yt.prototype,"href",2),a([l({type:String,reflect:!0})],Yt.prototype,"target",2),a([l({type:Boolean,reflect:!0})],Yt.prototype,"current",2),a([C("current")],Yt.prototype,"handleCurrentChange",1),Yt=a([w("sd-breadcrumb-item")],Yt);var gr=class{constructor(i,t){this.timerId=0;this.activeInteractions=0;this.paused=!1;this.stopped=!0;this.pause=()=>{this.activeInteractions++||(this.paused=!0,this.host.requestUpdate())};this.resume=()=>{--this.activeInteractions||(this.paused=!1,this.host.requestUpdate())};i.addController(this),this.host=i,this.tickCallback=t}hostConnected(){this.host.addEventListener("mouseenter",this.pause),this.host.addEventListener("mouseleave",this.resume),this.host.addEventListener("focusin",this.pause),this.host.addEventListener("focusout",this.resume),this.host.addEventListener("touchstart",this.pause,{passive:!0}),this.host.addEventListener("touchend",this.resume)}hostDisconnected(){this.stop(),this.host.removeEventListener("mouseenter",this.pause),this.host.removeEventListener("mouseleave",this.resume),this.host.removeEventListener("focusin",this.pause),this.host.removeEventListener("focusout",this.resume),this.host.removeEventListener("touchstart",this.pause),this.host.removeEventListener("touchend",this.resume)}start(i){this.stop(),this.stopped=!1,this.timerId=window.setInterval(()=>{this.paused||this.tickCallback()},i)}stop(){clearInterval(this.timerId),this.stopped=!0,this.host.requestUpdate()}};function Ia(s,i,t){let e=r=>Object.is(r,-0)?0:r;return s<i?e(i):s>t?e(t):e(s)}var br=class{constructor(i){this.heightCalculated=!1;this.isEnabled=!1;this.isCalculating=!1;this.fadeClasses={base:["absolute","top-0","left-0","w-full","h-full","visible","transition-opacity","duration-x-slow","ease-in-out"],active:["opacity-100","z-[1]"],inactive:["opacity-0","z-0"]};this.handleResize=()=>{this.isEnabled&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.isEnabled&&(this.heightCalculated=!1,this.calculateHeight())},250))};this.carousel=i}enable(){this.isEnabled||(this.isEnabled=!0,this.calculateHeight(),window.addEventListener("resize",this.handleResize))}disable(){this.isEnabled&&(this.isEnabled=!1,this.removeFadeStyles(),this.carousel.style.removeProperty("--carousel-height"),this.carousel.scrollContainer&&this.carousel.scrollContainer.style.removeProperty("height"),this.heightCalculated=!1,this.isCalculating=!1,window.removeEventListener("resize",this.handleResize),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0))}updateActiveSlide(i){if(!this.isEnabled)return;this.carousel.getSlides().forEach((e,r)=>{r===i?this.show(e):this.hide(e)})}show(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.active),i.removeAttribute("inert"),i.setAttribute("aria-hidden","false")}hide(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.inactive),i.toggleAttribute("inert",!0),i.setAttribute("aria-hidden","true")}removeFadeStyles(){this.carousel.getSlides().forEach(t=>{t.classList.remove(...this.getAllFadeClasses()),t.removeAttribute("inert"),t.removeAttribute("aria-hidden")})}getAllFadeClasses(){return[...this.fadeClasses.base,...this.fadeClasses.active,...this.fadeClasses.inactive]}calculateHeight(){if(this.heightCalculated||!this.isEnabled||this.isCalculating)return;let i=this.carousel.getSlides(),t=this.carousel.scrollContainer;if(i.length===0||!t)return;this.isCalculating=!0,t.style.removeProperty("height"),this.carousel.style.removeProperty("--carousel-height");let e=i.map(r=>{let o=r,n={position:o.style.position,opacity:o.style.opacity,zIndex:o.style.zIndex,transform:o.style.transform,classes:o.className};return o.classList.remove(...this.getAllFadeClasses()),o.classList.add("relative","opacity-1","z-auto","transform-none"),n});requestAnimationFrame(()=>{if(!this.isEnabled){this.isCalculating=!1;return}let r=i.map(n=>n.getBoundingClientRect().height),o=Math.max(...r);i.forEach((n,d)=>{let c=n,p=e[d];c.className=p.classes,["position","opacity","zIndex","transform"].forEach(m=>{let f=p[m];f?c.style.setProperty(m,f):c.style.removeProperty(m)})}),o>0&&(this.carousel.style.setProperty("--carousel-height",`${o}px`),t.style.height=`${o}px`,this.heightCalculated=!0,this.updateActiveSlide(this.carousel.activeSlide)),this.isCalculating=!1})}recalculateHeight(){this.isEnabled&&(this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.heightCalculated=!1,this.calculateHeight())}};function*_a(s,i){if(s!==void 0){let t=0;for(let e of s)yield i(e,t++)}}function*Pa(s,i,t=1){let e=i===void 0?0:s;i!=null||(i=s);for(let r=e;t>0?r<i:i<r;r+=t)yield r}var Ha=Symbol(),pi=s=>(i,t,e)=>{let r=e.value;e.value=function(...o){clearTimeout(this[Ha]),this[Ha]=window.setTimeout(()=>{r.apply(this,o)},s)}};var _i=class{constructor(i){this.pointers=new Set;this.dragging=!1;this.scrolling=!1;this.mouseDragging=!1;this.handleScroll=()=>{this.scrolling||(this.scrolling=!0,this.host.requestUpdate()),this.handleScrollEnd()};this.handlePointerDown=i=>{if(i.pointerType==="touch")return;this.pointers.add(i.pointerId),this.mouseDragging&&!this.dragging&&i.button===0&&(i.preventDefault(),this.host.scrollContainer.addEventListener("pointermove",this.handlePointerMove))};this.handlePointerMove=i=>{let t=this.host.scrollContainer,e=!!i.movementX||!!i.movementY;!this.dragging&&e?(t.setPointerCapture(i.pointerId),this.handleDragStart()):t.hasPointerCapture(i.pointerId)&&this.handleDrag(i)};this.handlePointerUp=i=>{this.pointers.delete(i.pointerId),this.host.scrollContainer.releasePointerCapture(i.pointerId),this.pointers.size===0&&this.handleDragEnd()};this.handleTouchEnd=i=>{for(let t of i.changedTouches)this.pointers.delete(t.identifier)};this.handleTouchStart=i=>{for(let t of i.touches)this.pointers.add(t.identifier)};this.host=i,i.addController(this)}async hostConnected(){let i=this.host;await i.updateComplete;let t=i.scrollContainer;t.addEventListener("scroll",this.handleScroll,{passive:!0}),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointerup",this.handlePointerUp),t.addEventListener("pointercancel",this.handlePointerUp),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),t.addEventListener("touchend",this.handleTouchEnd)}hostDisconnected(){let t=this.host.scrollContainer;t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointerup",this.handlePointerUp),t.removeEventListener("pointercancel",this.handlePointerUp),t.removeEventListener("touchstart",this.handleTouchStart),t.removeEventListener("touchend",this.handleTouchEnd)}handleScrollEnd(){this.pointers.size?this.handleScrollEnd():(this.scrolling=!1,this.host.scrollContainer.dispatchEvent(new CustomEvent("scrollend",{bubbles:!1,cancelable:!1})),this.host.requestUpdate())}handleDragStart(){let i=this.host;this.dragging=!0,i.scrollContainer.style.setProperty("scroll-snap-type","unset"),i.requestUpdate()}handleDrag(i){this.host.scrollContainer.scrollBy({left:-i.movementX,top:-i.movementY})}async handleDragEnd(){let i=this.host,t=i.scrollContainer;t.removeEventListener("pointermove",this.handlePointerMove),this.dragging=!1;let e=t.scrollLeft,r=t.scrollTop;t.style.removeProperty("scroll-snap-type");let o=t.scrollLeft,n=t.scrollTop;t.style.setProperty("scroll-snap-type","unset"),t.scrollTo({left:e,top:r,behavior:"auto"}),t.scrollTo({left:o,top:n,behavior:$i()?"auto":"smooth"}),this.scrolling&&await J(t,"scrollend"),t.style.removeProperty("scroll-snap-type"),i.requestUpdate()}};a([pi(100)],_i.prototype,"handleScrollEnd",1);var ue=class extends g{static isCarouselItem(i){return i instanceof Element&&i.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return u`<slot></slot>`}};ue.styles=[...g.styles,x`:host{align-items:center;aspect-ratio:var(--aspect-ratio);display:flex;flex-direction:column;height:100%;justify-content:center;scroll-snap-align:start;scroll-snap-stop:always;width:100%}::slotted(img){height:100%;-o-object-fit:cover;object-fit:cover;width:100%}`],ue=a([w("sd-carousel-item")],ue);var G=class extends g{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new gr(this,()=>this.next());this.scrollController=new _i(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new A(this);this.userInteracted=!1;this.fadeController=new br(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(r=>[...r.addedNodes,...r.removedNodes].some(o=>ue.isCarouselItem(o)&&!o.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction));let t=new IntersectionObserver(e=>{e.forEach(r=>{this.intersectionObserverEntries.set(r.target,r);let o=r.target;o.toggleAttribute("inert",!r.isIntersecting),o.classList.toggle("--in-view",r.isIntersecting),o.setAttribute("aria-hidden",r.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(r=>{r.forEach(o=>{o.isIntersecting&&o.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,r){return Math.ceil((t-e)/r)+1>0?Math.ceil((t-e)/r)+1:1}getCurrentPage(t,e,r,o){return Math.ceil((t-r)/o)-Math.ceil((t-r-e)/o)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,r=this.localize.dir()==="rtl",o=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!r&&t.key==="ArrowRight"||r&&t.key==="ArrowLeft",d=t.key==="ArrowUp"||!r&&t.key==="ArrowLeft"||r&&t.key==="ArrowRight";t.preventDefault(),d&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),o&&this.updateComplete.then(()=>{var p;let c=(p=this.shadowRoot)==null?void 0:p.querySelector('[part~="pagination-item--active"]');c&&c.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),r=[...this.intersectionObserverEntries.values()].find(o=>o.isIntersecting);if(this.loop&&(r!=null&&r.target.hasAttribute("data-clone"))){let o=Number(r.target.getAttribute("data-clone"));this.goToSlide(o,"auto");return}r&&(this.activeSlide=t.indexOf(r.target))}handleFocus(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","polite")}handleBlur(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","off")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var t,e;this.pausedAutoplay?(this.autoplayController.stop(),(t=this.autoplayControls)==null||t.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","true"))}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((r,o)=>{e.unobserve(r),r.classList.remove("--in-view"),r.classList.remove("--is-active"),r.setAttribute("aria-label",this.localize.term("slideNum",o+1,t.length)),r.hasAttribute("data-clone")&&r.remove()}),this.loop&&!this.fade){let r=this.slidesPerPage,o=t.slice(-r),n=t.slice(0,r);o.reverse().forEach((d,c)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(t.length-c-1)),this.prepend(p)}),n.forEach((d,c)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(c)),this.append(p)})}this.getSlides({excludeClones:!1}).forEach(r=>{e.observe(r)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((o,n)=>{o.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}});let r=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>r&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((r,o)=>{Math.abs(o-e)%e===0?r.style.removeProperty("scroll-snap-align"):r.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(t="smooth"){if(this.fade){let o=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(o);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,r=!1;for(;!r&&e>0;)e-=1,r=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:r,loop:o,scrollContainer:n,fade:d}=this,c=this.getSlides(),p=this.getSlides({excludeClones:!1}),m=(t+c.length)%c.length;if(this.activeSlide=m,d)return;let f=Ia(t+(o?r:0),0,p.length+1),y=p[f],b=n.getBoundingClientRect(),k=y.getBoundingClientRect();if(n.scrollTo({left:k.left-b.left+n.scrollLeft,top:k.top-b.top+n.scrollTop,behavior:$i()?"auto":e}),this.userInteracted&&!this.loop){let T=this.activeSlide===c.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,M=this.activeSlide===0;T?this.previousButton.focus({preventScroll:!0}):M&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,r=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),o=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||o>1,d=this.loop||o<r,c=this.localize.dir()==="ltr";return u`<div part="base" class="${h("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${h("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(p=>!p.hasAttribute("data-clone")).length)}" aria-live="${this.autoplay?"off":"polite"}" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><slot></slot></div><div part="controls" class="${h("w-full flex items-center justify-center relative")}"><div part="navigation" class="${h("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${h("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${n?p=>{this.previous(),this.unblockAutoplay(p,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${h("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-down":"chevron-up"}"></sd-icon></slot></button> ${this.variant==="dot"?u`<div part="pagination-dot" role="tablist" class="${h("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${_a(Pa(r),p=>{let m=p+1===o;return u`<button part="pagination-item ${m?"pagination-item--active":""}" class="${h("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",p+1,r)}" @click="${f=>{this.goToSlide(p*e),this.unblockAutoplay(f,this.paginationItems[p])}}" @keydown="${this.handleKeyDown}"><span class="${h("h-4 w-4 block border hover:border-primary-500 rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"border-white hover:border-primary-500":"border-primary",m&&"bg-accent border-none",m?this.inverted?"hover:bg-accent-300":"hover:bg-accent-550":"")}"></span></button>`})}</div>`:u`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${h("w-5 text-center border-b-2 border-accent",this.inverted?"text-white":"text-black")}">${o}</span> <span part="pagination-divider" class="${h("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${h("w-5 text-center",this.inverted?"text-white":"text-black")}">${r}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!d}" class="${h("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!d&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${d?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${d?p=>{this.next(),this.unblockAutoplay(p,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${h("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-up":"chevron-down"}"></sd-icon></slot></button></div><button class="${h("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${p=>{this.pausedAutoplay=!this.pausedAutoplay,p.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${h(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-icon></slot><slot name="autoplay-pause" class="${h(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button></div></div>`}};G.styles=[...g.styles,x`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{display:block;height:var(--carousel-height);overflow:hidden;position:relative}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`],a([v('[part~="autoplay-controls"]')],G.prototype,"autoplayControls",2),a([v('[part~="navigation-button--previous"]')],G.prototype,"previousButton",2),a([v('[part~="navigation-button--next"]')],G.prototype,"nextButton",2),a([Gi('[part~="pagination-item"]')],G.prototype,"paginationItems",2),a([l({type:String,reflect:!0})],G.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],G.prototype,"inverted",2),a([l({type:Boolean,reflect:!0})],G.prototype,"loop",2),a([l({type:Boolean,reflect:!0})],G.prototype,"autoplay",2),a([l({type:Boolean,reflect:!0})],G.prototype,"fade",2),a([l({type:Number,attribute:"slides-per-page",reflect:!0})],G.prototype,"slidesPerPage",2),a([l({type:Number,attribute:"slides-per-move",reflect:!0})],G.prototype,"slidesPerMove",2),a([v("slot:not([name])")],G.prototype,"defaultSlot",2),a([v(".carousel__slides")],G.prototype,"scrollContainer",2),a([v(".carousel__pagination")],G.prototype,"paginationContainer",2),a([L()],G.prototype,"activeSlide",2),a([L()],G.prototype,"currentPage",2),a([L()],G.prototype,"pausedAutoplay",2),a([C("pausedAutoplay")],G.prototype,"handlePausedAutoplay",1),a([C("fade",{waitUntilFirstUpdate:!0})],G.prototype,"handleFadeChange",1),a([C("loop",{waitUntilFirstUpdate:!0}),C("slidesPerPage",{waitUntilFirstUpdate:!0})],G.prototype,"initializeSlides",1),a([C("activeSlide")],G.prototype,"handleSlideChange",1),a([C("slidesPerMove")],G.prototype,"handleSlidesPerMoveChange",1),a([C("autoplay")],G.prototype,"handleAutoplayChange",1),G=a([w("sd-carousel")],G);var Rt=(s="value")=>(i,t)=>{let e=i.constructor,r=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(o,n,d){var m;let c=e.getPropertyOptions(s),p=typeof c.attribute=="string"?c.attribute:s;if(o===p){let f=c.converter||Ae,b=(typeof f=="function"?f:(m=f==null?void 0:f.fromAttribute)!=null?m:Ae.fromAttribute)(d,c.type);this[s]!==b&&(this[t]=b)}r.call(this,o,n,d)}};var{I:Wb}=Ss;var vr=s=>s.strings===void 0;var ql={},Va=(s,i=ql)=>s._$AH=i;var Ce=te(class extends Ie{constructor(s){if(super(s),s.type!==Kt.PROPERTY&&s.type!==Kt.ATTRIBUTE&&s.type!==Kt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!vr(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[i]){if(i===Dt||i===j)return i;let t=s.element,e=s.name;if(s.type===Kt.PROPERTY){if(i===t[e])return Dt}else if(s.type===Kt.BOOLEAN_ATTRIBUTE){if(!!i===t.hasAttribute(e))return Dt}else if(s.type===Kt.ATTRIBUTE&&t.getAttribute(e)===i+"")return Dt;return Va(s),i}});var ot=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,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(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,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.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return u`<label part="base" class="${h("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${E(this.value)}" .indeterminate="${Ce(this.indeterminate)}" .checked="${Ce(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @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"} ${this.indeterminate?" control--indeterminate":""}" class="${h("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"><div class="${h("absolute h-3 transition-[width] right-0.25 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${h("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"group-hover:bg-neutral-200",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"></div></div>${this.checked?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?u`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${h("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};ot.styles=[...g.styles,x`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-width:0}:host([required]) #label:after{content:" *"}`],a([v('input[type="checkbox"]')],ot.prototype,"input",2),a([v("#invalid-message")],ot.prototype,"invalidMessage",2),a([l({type:String,reflect:!0})],ot.prototype,"title",2),a([l({type:String,reflect:!0})],ot.prototype,"name",2),a([l()],ot.prototype,"value",2),a([l({type:String,reflect:!0})],ot.prototype,"size",2),a([l({type:Boolean,reflect:!0})],ot.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],ot.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],ot.prototype,"checked",2),a([l({type:Boolean,reflect:!0})],ot.prototype,"indeterminate",2),a([Rt("checked")],ot.prototype,"defaultChecked",2),a([l({type:String,reflect:!0})],ot.prototype,"form",2),a([l({type:Boolean,reflect:!0})],ot.prototype,"required",2),a([L()],ot.prototype,"showInvalidStyle",2),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleDisabledChange",1),a([C(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleStateChange",1),ot=a([w("sd-checkbox")],ot);var Ut=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-checkbox")]}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async e=>{await e.updateComplete,e.size=this.size}))}syncCheckboxes(){customElements.get("sd-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,r=this.hasSlotController.test("help-text"),o=this.helpText?!0:r,n=u`<slot @slotchange="${this.syncCheckboxes}"></slot>`,d=this.hasSlotController.test("tooltip");return u`<fieldset part="form-control" class="${h("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${e||d?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${h("p-0 font-bold leading-normal text-black",e?"flex":"hidden")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${d?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${h({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${n}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>`}};Ut.styles=[...g.styles,x`:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`],a([l({type:String,reflect:!0})],Ut.prototype,"size",2),a([l({type:String,reflect:!0})],Ut.prototype,"orientation",2),a([l({type:String,reflect:!0})],Ut.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],Ut.prototype,"helpText",2),a([C("size",{waitUntilFirstUpdate:!0})],Ut.prototype,"handleSizeChange",1),a([C("invalid",{waitUntilFirstUpdate:!0})],Ut.prototype,"handleInvalid",1),Ut=a([w("sd-checkbox-group")],Ut);var Lt=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=t?it`a`:this.removable?it`div`:it`button`;return U`<${e} part="base" type="${E(t?void 0:"button")}" href="${E(t?this.href:void 0)}" rel="${E(t&&this.target?"noreferrer noopener":void 0)}" target="${E(t?this.target:void 0)}" download="${E(t?this.download:void 0)}" ?disabled="${E(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${E(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||this.removable?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${h("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":h("border-primary text-primary disabled:border-neutral-500 disabled:text-neutral-500",this.removable?"has-[button:hover]:border-primary-500 has-[button:hover]:bg-neutral-100 has-[button:hover]:text-primary-500":"hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500"),this.disabled&&!t&&"cursor-not-allowed")}"><slot id="content" part="content"></slot>${this.removable&&!t?U`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}"><slot part="removable-indicator" name="removable-indicator"><sd-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-icon></slot></button>`:""}</${e}>`}};Lt.styles=[...g.styles,x`:host{display:inline-block;transition-duration:.15s;transition-duration:var(--sd-duration-fast,.15s);transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host([size=lg])::part(removable-indicator){font-size:var(--sd-font-size-base,1rem)}:host([size=sm])::part(removable-indicator){font-size:.75rem}`],a([v("a, button, div")],Lt.prototype,"tag",2),a([l({type:String,reflect:!0})],Lt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],Lt.prototype,"selected",2),a([l({type:Boolean,reflect:!0})],Lt.prototype,"toggleable",2),a([l({type:Boolean,reflect:!0})],Lt.prototype,"removable",2),a([l({type:Boolean,reflect:!0})],Lt.prototype,"disabled",2),a([l({type:String,reflect:!0})],Lt.prototype,"href",2),a([l({type:String,reflect:!0})],Lt.prototype,"target",2),a([l({reflect:!0})],Lt.prototype,"download",2),Lt=a([w("sd-tag")],Lt);var Fa=s=>s;var Jr=s=>Array.from(s.assignedElements({flatten:!0})),Kl=s=>s.tagName.toLocaleLowerCase()==="sd-option"?s:Array.from(s.querySelectorAll(":scope > sd-option")),Yl=s=>s.tagName.toLocaleLowerCase()==="sd-optgroup",Ba=s=>s.map(Kl),Ra=s=>s.filter(Yl),yr=s=>s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var z=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new P(this,"help-text","label");this.localize=new A(this);this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.deletedTagLabel="";this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.type="text";this.currentPlacement=this.placement;this.getOption=Fa;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let r=yr(t.value),o=yr(t.getTextLabel()),n=yr(e);return r.includes(n)||o.includes(n)};this.getTag=t=>u`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
128
130
|
base:tag__base,
|
|
129
131
|
content:tag__content,
|
|
130
132
|
removable-indicator:tag__removable-indicator,
|
|
@@ -132,11 +134,9 @@
|
|
|
132
134
|
base:tag__base,
|
|
133
135
|
content:tag__content,
|
|
134
136
|
removable-indicator:tag__removable-indicator,
|
|
135
|
-
" 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"),o=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!==o&&(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(),o=e.indexOf(r),n=Math.max(0,o);if(t){let d=o+1;n=d>e.length-1?0:d}else{let d=o-1;n=d<0?e.length-1:d}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),ee(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(o=>{o.current=!1,o.setAttribute("aria-selected","false"),o.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 o=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());o&&(o.selected=e!=null?e:!o.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,o;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=((o=this.selectedOptions[0])==null?void 0:o.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 f,y,b;let o=r.cloneNode(!0);if(o.current=o.value===((f=this.lastOption)==null?void 0:f.value),o.selected=r.selected,o.checkbox=r.checkbox,o.size=r.size,!(((y=r.parentElement)==null?void 0:y.tagName.toLowerCase())==="sd-optgroup"))return o;let d=r.parentElement,c=(b=d.querySelector('[slot="label"]'))==null?void 0:b.cloneNode(!0),p=e.find(k=>k.id===d.id);if(p){p==null||p.appendChild(o),c&&(p==null||p.appendChild(c));return}let m=d.cloneNode();return m.appendChild(o),c&&m.appendChild(c),e.push(m),m}).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 W(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:r,options:o}=q(this,"combobox.show",{dir:this.localize.dir()});await K(this.popup.popup,r,o),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 W(this);let{keyframes:t,options:e}=q(this,"combobox.hide",{dir:this.localize.dir()});await K(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([J(this,"sd-after-show"),J(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,J(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 Fa(Jr(this.defaultSlot)).flat()}getSlottedOptGroups(){return Ba(Jr(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((o,n)=>{this.multiple&&(o.checkbox=!0),o.id=o.id||`sd-combobox-option-${n}`}),e.forEach((o,n)=>{o.id=o.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"),o=this.label?!0:!!e,n=this.helpText?!0:!!r,d=this.clearable&&!this.disabled&&!this.visuallyDisabled,c=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",m=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",f={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],y={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],b={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return u`<div part="form-control" class="${h("relative text-left",p,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${o&&"inline-block mb-2"}" aria-hidden="${!o}" @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="${h("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"}[c],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="${h("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="
|
|
137
|
+
" 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"),o=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!==o&&(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(),o=e.indexOf(r),n=Math.max(0,o);if(t){let d=o+1;n=d>e.length-1?0:d}else{let d=o-1;n=d<0?e.length-1:d}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),ee(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(o=>{o.current=!1,o.setAttribute("aria-selected","false"),o.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 o=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());o&&(o.selected=e!=null?e:!o.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,o;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=((o=this.selectedOptions[0])==null?void 0:o.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 f,y,b;let o=r.cloneNode(!0);if(o.current=o.value===((f=this.lastOption)==null?void 0:f.value),o.selected=r.selected,o.checkbox=r.checkbox,o.size=r.size,!(((y=r.parentElement)==null?void 0:y.tagName.toLowerCase())==="sd-optgroup"))return o;let d=r.parentElement,c=(b=d.querySelector('[slot="label"]'))==null?void 0:b.cloneNode(!0),p=e.find(k=>k.id===d.id);if(p){p==null||p.appendChild(o),c&&(p==null||p.appendChild(c));return}let m=d.cloneNode();return m.appendChild(o),c&&m.appendChild(c),e.push(m),m}).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 W(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:r,options:o}=q(this,"combobox.show",{dir:this.localize.dir()});await K(this.popup.popup,r,o),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 W(this);let{keyframes:t,options:e}=q(this,"combobox.hide",{dir:this.localize.dir()});await K(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([J(this,"sd-after-show"),J(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,J(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 Ba(Jr(this.defaultSlot)).flat()}getSlottedOptGroups(){return Ra(Jr(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((o,n)=>{this.multiple&&(o.checkbox=!0),o.id=o.id||`sd-combobox-option-${n}`}),e.forEach((o,n)=>{o.id=o.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"),o=this.label?!0:!!e,n=this.helpText?!0:!!r,d=this.clearable&&!this.disabled&&!this.visuallyDisabled,c=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",m=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",f={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],y={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],b={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return u`<div part="form-control" class="${h("relative text-left",p,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${o&&"inline-block mb-2"}" aria-hidden="${!o}" @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="${h("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"}[c],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="${h("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="
|
|
136
138
|
popup:popup__content,
|
|
137
|
-
"><div part="combobox" class="${h("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="${h("inline-flex",y,m,b)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?u`<div part="tags" class="${h("flex items-center gap-1",y)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${h("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(k=>k==null?void 0:k.getTextLabel()).join(", ")}</div><input class="${h("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="${h("flex justify-center",f,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="${h("text-neutral-700",b)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${h(f,b,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon part="valid-icon" class="${h("flex-shrink-0 text-success",f,b)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="right" part="right" class="${h("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",b)}">${this.type!=="search"?u`<sd-icon class="${h("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?u`<button class="${h("flex items-center sd-interactive",f)}" type="button"><sd-icon class="${h(m,b)}" library="_internal" 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="${E(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${h("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-1" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};z.styles=[...g.styles,x`: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}`],a([v("sd-popup")],z.prototype,"popup",2),a([v('[part="combobox"]')],z.prototype,"combobox",2),a([v('[part="display-input"]')],z.prototype,"displayInput",2),a([v(".value-input")],z.prototype,"valueInput",2),a([v('[part="listbox"]')],z.prototype,"listbox",2),a([v('[part="tags"]')],z.prototype,"tagWrapper",2),a([v('[part="filtered-listbox"]')],z.prototype,"filteredWrapper",2),a([v("slot:not([name])")],z.prototype,"defaultSlot",2),a([v("#invalid-message")],z.prototype,"invalidMessage",2),a([L()],z.prototype,"hasFocus",2),a([L()],z.prototype,"displayInputValue",2),a([L()],z.prototype,"selectedTextLabel",2),a([L()],z.prototype,"selectedOptions",2),a([L()],z.prototype,"filteredOptions",2),a([L()],z.prototype,"allOptions",2),a([L()],z.prototype,"lastOption",2),a([L()],z.prototype,"showValidStyle",2),a([L()],z.prototype,"showInvalidStyle",2),a([L()],z.prototype,"deletedTagLabel",2),a([l({reflect:!0})],z.prototype,"name",2),a([l({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],z.prototype,"value",2),a([Bt()],z.prototype,"defaultValue",2),a([l({type:String,reflect:!0})],z.prototype,"size",2),a([l({type:String,reflect:!0})],z.prototype,"placeholder",2),a([l({type:String,attribute:"max-options-tag-label",reflect:!0})],z.prototype,"maxOptionsTagLabel",2),a([l({type:Boolean,reflect:!0})],z.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],z.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],z.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],z.prototype,"open",2),a([l({type:Boolean,reflect:!0})],z.prototype,"hoist",2),a([l({type:String,reflect:!0})],z.prototype,"label",2),a([l({type:String,reflect:!0})],z.prototype,"placement",2),a([l({type:String,attribute:"help-text",reflect:!0})],z.prototype,"helpText",2),a([l({type:String,reflect:!0})],z.prototype,"form",2),a([l({type:Boolean,reflect:!0})],z.prototype,"required",2),a([l({type:String,reflect:!0})],z.prototype,"type",2),a([L()],z.prototype,"currentPlacement",2),a([l()],z.prototype,"getOption",2),a([l({type:Boolean,reflect:!0})],z.prototype,"multiple",2),a([l({type:Boolean,reflect:!0})],z.prototype,"useTags",2),a([l({type:Number,reflect:!0,attribute:"max-options-visible"})],z.prototype,"maxOptionsVisible",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],z.prototype,"styleOnValid",2),a([l()],z.prototype,"filter",2),a([l()],z.prototype,"getTag",2),a([C("filter",{waitUntilFirstUpdate:!0})],z.prototype,"handleFilterChange",1),a([C("useTags",{waitUntilFirstUpdate:!0})],z.prototype,"handleUseTagsChange",1),a([C("size",{waitUntilFirstUpdate:!0})],z.prototype,"applySizeToOptions",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],z.prototype,"handleDisabledChange",1),a([C("value",{waitUntilFirstUpdate:!0})],z.prototype,"handleValueChange",1),a([C("displayInputValue",{waitUntilFirstUpdate:!0})],z.prototype,"handleDisplayInputValueChange",1),a([C("open",{waitUntilFirstUpdate:!0})],z.prototype,"handleOpenChange",1),z=a([w("sd-combobox")],z);B("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var me=class extends g{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="${h(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};me.styles=[...g.styles,x`:host{margin:var(--sd-spacing-0,0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],a([l({type:String,reflect:!0})],me.prototype,"orientation",2),a([l({type:Boolean,reflect:!0})],me.prototype,"inverted",2),me=a([w("sd-divider")],me);var $={startOfDayLocal:s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()),isSameDay:(s,i)=>!s||!i?!1:s.getFullYear()===i.getFullYear()&&s.getMonth()===i.getMonth()&&s.getDate()===i.getDate(),clampDateToMonth:(s,i)=>{let t=new Date(i.getFullYear(),i.getMonth(),1),e=new Date(i.getFullYear(),i.getMonth()+1,0);return s<t?t:s>e?e:s},toLocalISODate:s=>{let i=s.getFullYear(),t=(s.getMonth()+1).toString().padStart(2,"0"),e=s.getDate().toString().padStart(2,"0");return`${i}.${t}.${e}`},parseLocalISO:s=>{if(!s)return null;let i=/^(\d{4})\.(\d{2})\.(\d{2})$/.exec(s);if(!i)return null;let t=Number(i[1]),e=Number(i[2])-1,r=Number(i[3]),o=new Date(t,e,r);return Number.isNaN(o.getTime())?null:o},compareDates:(s,i)=>{let t=$.startOfDayLocal(s).getTime(),e=$.startOfDayLocal(i).getTime();return t-e},isBetweenInclusive:(s,i,t)=>{let e=$.compareDates(i,t)<=0?i:t,r=$.compareDates(i,t)<=0?t:i;return $.compareDates(s,e)>=0&&$.compareDates(s,r)<=0}};var _=class extends g{constructor(){super();this.localize=new A(this);this.hasSlotController=new P(this,"label","help-text","tooltip");this.formControlController=new pt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.disabled=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=$.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(o=>{var n,d;return o instanceof HTMLElement&&(((n=o.classList)==null?void 0:n.contains("nav"))||((d=o.classList)==null?void 0:d.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var d,c,p,m,f;if(this.disabled||this.visuallyDisabled){(d=t.preventDefault)==null||d.call(t),(c=t.stopPropagation)==null||c.call(t);return}let e=t.target,r=e.value,o=(p=e.selectionStart)!=null?p:r.length,n=(m=t.inputType)==null?void 0:m.startsWith("delete");if(this.range){let y=r.replace(/\D/g,""),b=y.slice(0,8),k=y.slice(8,16),T=this.buildDmyFromDigits(b),M=this.buildDmyFromDigits(k),S;b.length===0?S="":b.length<8?S=T:k.length>0?S=`${T} - ${M}`:S=n?T:`${T} -`;let O=this.countDigitsBeforeCaret(r,o),I;if(O<=8){let D=this.digitIndexToDmyCaretPos(Math.min(O,8));I=Math.min(D,T.length)}else{let D=b.length<8?T.length:T.length+3,Y=Math.min(O-8,8),X=this.digitIndexToDmyCaretPos(Y);I=D+Math.min(X,M.length)}this.inputValue=S;let F=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(T)){let D=this.dmyToIso(T),Y=D?$.parseLocalISO(D):null;!!Y&&!this.isDisabled(Y)&&this.inMinMax(Y)&&this.rangeStart!==D&&(this.rangeStart=D,this.previewEnd=null,this.viewMonth=new Date(Y.getFullYear(),Y.getMonth(),1),this.focusedDate=$.startOfDayLocal(Y),F=!0)}else this.rangeStart&&(this.rangeStart=null,F=!0),this.rangeEnd&&(this.rangeEnd=null,F=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(M)&&this.rangeStart){let D=$.parseLocalISO(this.rangeStart),Y=this.dmyToIso(M),X=Y?$.parseLocalISO(Y):null;if(!!X&&!this.isDisabled(X)&&this.inMinMax(X)){let[xt,st]=$.compareDates(D,X)<=0?[D,X]:[X,D],It=$.isSameDay(xt,st);if((this.allowSameDayRange||!It)&&!this.wouldRangeContainDisabled(xt,st)){let $t=$.toLocalISODate($.startOfDayLocal(xt)),ut=$.toLocalISODate($.startOfDayLocal(st));(this.rangeStart!==$t||this.rangeEnd!==ut)&&(this.rangeStart=$t,this.rangeEnd=ut,this.viewMonth=new Date(st.getFullYear(),st.getMonth(),1),this.focusedDate=$.startOfDayLocal(st),F=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,F=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),F&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var Y;let D=(Y=this.input)!=null?Y:e;D&&(D.value=this.inputValue,D.setSelectionRange(I,I))})})}else{let y=e,b=y.value,k=(f=y.selectionStart)!=null?f:b.length,T=b.replace(/\D/g,"").slice(0,8),M=T.slice(0,2),S=T.slice(2,4),O=T.slice(4,8),I="";M.length>0&&(I+=M,M.length===2&&(I+=".")),S.length>0&&M.length===2&&(I+=S,S.length===2&&(I+=".")),O.length>0&&M.length===2&&S.length===2&&(I+=O),I=I.replace(/\.\.+/g,".");let F=this.inputValue||"";this.inputValue=I;let D=k,Y=tt=>{let $t=[];for(let ut=0;ut<tt.length;ut++)tt[ut]==="."&&$t.push(ut);return $t},X=Y(F),Et=Y(I),xt=X.filter(tt=>tt<k).length,It=Et.filter(tt=>tt<k).length-xt;if(It>0?D+=It:!X.includes(k)&&Et.includes(k)&&(D+=1),D=Math.min(Math.max(0,D),I.length),requestAnimationFrame(()=>{var $t;let tt=($t=this.input)!=null?$t:y;tt&&(tt.value=this.inputValue,tt.setSelectionRange(D,D))}),/^\d{2}\.\d{2}\.\d{4}$/.test(I)){let tt=this.parseInputText(I);this.applyParsedInput(tt)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let y=this.rangeStart?$.parseLocalISO(this.rangeStart):null,b=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;y&&!b?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(y)}`):y&&b&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(y)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(b)}`)}else if(this.value){let y=$.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(y)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{this.currentPlacement=t.detail.placement};this.handleHeaderKeyDown=(t,e,r,o)=>{if(t.key==="Tab"&&!t.shiftKey){o&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(r):this.setYear(r))};this.onKeyDown=t=>{if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let e=t.key,r=!0,o=new Date(this.focusedDate);switch(e){case"ArrowLeft":o.setDate(o.getDate()-1);break;case"ArrowRight":o.setDate(o.getDate()+1);break;case"ArrowUp":o.setDate(o.getDate()-7);break;case"ArrowDown":o.setDate(o.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:r=!1}if(r){if(t.preventDefault(),o.getMonth()!==this.viewMonth.getMonth()||o.getFullYear()!==this.viewMonth.getFullYear()){this.viewMonth=new Date(o.getFullYear(),o.getMonth(),1);let p=this.formatMonthYear(this.viewMonth);this.setNavStatus(p)}let d=$.startOfDayLocal(o);(!this.focusedDate||d.getTime()!==this.focusedDate.getTime())&&(this.focusedDate=d);let c=d.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(c),this.requestUpdate(),requestAnimationFrame(()=>{let p=this.shadowRoot,m=p==null?void 0:p.querySelector("button.day.focused");m==null||m.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?$.parseLocalISO(this.value):null,e=this.rangeStart?$.parseLocalISO(this.rangeStart):null,r=this.range&&e?e:t!=null?t:$.startOfDayLocal(new Date);this.viewMonth=new Date(r.getFullYear(),r.getMonth(),1),this.focusedDate=$.clampDateToMonth(r,this.viewMonth),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?$.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=$.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var r;let e=this.input;if(e){e.value=(r=this.inputValue)!=null?r:"";let o=e.value.length;e.setSelectionRange(o,o)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?$.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null,r=t!=null?t:e;r&&(this.viewMonth=new Date(r.getFullYear(),r.getMonth(),1),this.focusedDate=$.startOfDayLocal(r)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let o=this.input;if(o){o.value=(n=this.inputValue)!=null?n:"";let d=o.value.length;o.setSelectionRange(d,d)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return $.parseLocalISO(t)}inMinMax(t){let e=this.parseISO(this.min!==null?String(this.min):null),r=this.parseISO(this.max!==null?String(this.max):null);return!(e&&t<e||r&&t>r)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=$.toLocalISODate($.startOfDayLocal(t));return this.disabledDatesSet.has(e)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let r="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+r},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),r=this.ordinal(e),o=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${r} of ${o} ${n}`}ordinal(t){let e=["th","st","nd","rd"],r=t%100,o=e[(r-20)%10]||e[r]||e[0];return t+o}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let r=JSON.parse(e);Array.isArray(r)&&(t=r)}catch(r){t=[]}else e.length>0&&(t=e.split(",").map(r=>r.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let r=$.compareDates(t,e)<=0?$.startOfDayLocal(t):$.startOfDayLocal(e),o=$.compareDates(t,e)<=0?$.startOfDayLocal(e):$.startOfDayLocal(t),n=new Date(r);for(;$.compareDates(n,o)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=$.parseLocalISO(t);if(!e)return"";let r=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${r}.${o}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let r=Number(e[1]),o=Number(e[2]),n=Number(e[3]),d=new Date(n,o-1,r);if(d.getFullYear()!==n||d.getMonth()!==o-1||d.getDate()!==r)return null;let c=$.startOfDayLocal(d);return $.toLocalISODate(c)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),o=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),d=this.isoToDmy(this.rangeEnd);return n&&d?`${n} ${o} ${d}`:n&&!d?`${n} ${o}`:""}parseInputText(t){var o,n;let e=t.trim();if(this.range){let d=e.split(/\s*-\s*/);if(d.length===1){let c=d[0];if(!c)return{start:null,end:null,valid:!0};let p=this.dmyToIso(c);return p?{start:p,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(d.length>=2){let c=(o=d[0])!=null?o:"",p=(n=d[1])!=null?n:"",m=c?this.dmyToIso(c):null,f=p?this.dmyToIso(p):null;return c&&!m?{start:null,end:null,valid:!1}:p&&!f?{start:null,end:null,valid:!1}:{start:m,end:f,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let r=this.dmyToIso(e);return r?{single:r,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var c,p,m,f;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=y=>{if(!y)return!0;let b=$.parseLocalISO(y);return!(!this.inMinMax(b)||this.isDisabled(b))},r=!1;if(this.range){let y=(c=t.start)!=null?c:null,b=(p=t.end)!=null?p:null;if(!e(y)||b&&!e(b))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let k=y?$.parseLocalISO(y):null,T=b?$.parseLocalISO(b):null;if(k&&T){if($.compareDates(k,T)>0){let O=k;k=T,T=O}if(!this.allowSameDayRange&&$.isSameDay(k,T))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(k,T))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let M=k?$.toLocalISODate($.startOfDayLocal(k)):null,S=T?$.toLocalISODate($.startOfDayLocal(T)):null;if(this.rangeStart!==M||this.rangeEnd!==S){this.rangeStart=M,this.rangeEnd=S,this.previewEnd=null,r=!0;let O=(m=k!=null?k:T)!=null?m:this.today;this.viewMonth=new Date(O.getFullYear(),O.getMonth(),1),this.focusedDate=$.startOfDayLocal(O),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let o=(f=t.single)!=null?f:null;if(!e(o))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=o?$.parseLocalISO(o):null,d=n?$.toLocalISODate($.startOfDayLocal(n)):null;return this.value!==d&&(this.value=d,r=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=$.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),r}buildDmyFromDigits(t){let e=t.slice(0,8),r=e.slice(0,2),o=e.slice(2,4),n=e.slice(4,8),d=r;return o.length&&(d+="."+o),n.length&&(d+="."+n),d}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var r,o;((o=(r=t.composedPath)==null?void 0:r.call(t))!=null?o:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.emit("sd-focus")}setMonth(t){let e=new Date(this.viewMonth.getFullYear(),this.viewMonth.getMonth()+t,1);if(e.getMonth()===this.viewMonth.getMonth()&&e.getFullYear()===this.viewMonth.getFullYear())return;this.viewMonth=e;let r=this.formatMonthYear(this.viewMonth);this.setNavStatus(r),this.emit("sd-month-change",{detail:{month:this.viewMonth}})}setYear(t){let e=new Date(this.viewMonth.getFullYear()+t,this.viewMonth.getMonth(),1);if(e.getFullYear()===this.viewMonth.getFullYear()&&e.getMonth()===this.viewMonth.getMonth())return;this.viewMonth=e;let r=this.formatMonthYear(this.viewMonth);this.setNavStatus(r),this.emit("sd-month-year",{detail:{month:this.viewMonth}})}focusInitialGridDay(){let t=null;if(!this.range&&this.value){let r=$.parseLocalISO(this.value);r&&(t=$.startOfDayLocal(r))}if(this.range){let r=this.rangeStart?$.parseLocalISO(this.rangeStart):null,o=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;o?t=$.startOfDayLocal(o):r&&(t=$.startOfDayLocal(r))}if(!(r=>r?r.getFullYear()===this.viewMonth.getFullYear()&&r.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(r):!1)(t)){let{weeks:r}=this.getMonthMatrix(this.viewMonth),o=r.flat().find(n=>n.getMonth()===this.viewMonth.getMonth()&&$.isSameDay(n,this.today)&&!this.isDisabled(n));if(o)t=$.startOfDayLocal(o);else{let n=r.flat().find(d=>d.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(d));t=n?$.startOfDayLocal(n):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let r=this.shadowRoot,o=(r==null?void 0:r.querySelector("button.day.selected"))||(r==null?void 0:r.querySelector("button.day.focused"))||(r==null?void 0:r.querySelector('button.day[tabindex="0"]'))||(r==null?void 0:r.querySelector("button.day"));o==null||o.focus({preventScroll:!0})})}selectSingleDate(t){if(this.isDisabled(t))return;let e=$.startOfDayLocal(t),r=$.toLocalISODate(e);if(this.value===r)return;this.value=r;let o=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(o),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let n=this.input;n&&(n.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let c=n.value.length;n.setSelectionRange(c,c)})}))})}selectRangeDate(t){let e=$.startOfDayLocal(t),r=this.rangeStart?$.parseLocalISO(this.rangeStart):null,o=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;if(!r&&!o){if(this.isDisabled(e))return;this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let d=this.input;d&&(d.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=d.value.length;d.setSelectionRange(p,p)})}))});return}if(r&&!o){if(this.isDisabled(e))return;if($.isSameDay(r,e)){if(!this.allowSameDayRange){this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let y=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${y}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var k;let b=this.input;b&&(b.value=(k=this.inputValue)!=null?k:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let T=b.value.length;b.setSelectionRange(T,T)})}))});return}this.rangeStart=$.toLocalISODate(e),this.rangeEnd=$.toLocalISODate(e),this.previewEnd=null;let f=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${f}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var b;let y=this.input;y&&(y.value=(b=this.inputValue)!=null?b:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let k=y.value.length;y.setSelectionRange(k,k)})}))});return}let n=$.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[d,c]=$.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=$.toLocalISODate(d),this.rangeEnd=$.toLocalISODate(c),this.previewEnd=null;let p=this.formatSelectionLabel(d),m=this.formatSelectionLabel(c);this.announceSelect(`${this.termStartSelected()}: ${p}`,40),this.announceSelect(`${this.termEndSelected()}: ${m}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var y;let f=this.input;f&&(f.value=(y=this.inputValue)!=null?y:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let b=f.value.length;f.setSelectionRange(b,b)})}))});return}if(r&&o){if(this.isDisabled(e))return;this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let d=this.input;d&&(d.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=d.value.length;d.setSelectionRange(p,p)})}))})}}selectDate(t){this.range?this.selectRangeDate(t):this.selectSingleDate(t)}getMonthMatrix(t){var m;let e=(m=this.firstDayOfWeek)!=null?m:1,r=new Date(t.getFullYear(),t.getMonth(),1),o=new Date(r),n=(r.getDay()-e+7)%7;o.setDate(r.getDate()-n);let d=[],c=o;for(let f=0;f<6;f++){let y=[];for(let b=0;b<7;b++)y.push(new Date(c)),c.setDate(c.getDate()+1);d.push(y)}let p=f=>f.every(y=>y.getMonth()!==t.getMonth());for(;d.length>0&&p(d[d.length-1]);)d.pop();return{weeks:d}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var o;let t=(o=this.firstDayOfWeek)!=null?o:1,e=new Date(2021,7,1),r=[];for(let n=0;n<7;n++){let d=new Date(e);d.setDate(e.getDate()+(t+n)%7);try{r.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(d))}catch(c){r.push(d.toLocaleDateString(void 0,{weekday:"short"}))}}return r}getTabTargetDayForCurrentView(t){let e=t.flat().find(o=>o.getMonth()===this.viewMonth.getMonth()&&$.isSameDay(o,this.today)&&!this.isDisabled(o));if(e)return $.startOfDayLocal(e);let r=t.flat().find(o=>o.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(o));return r?$.startOfDayLocal(r):null}onDayMouseEnter(t){if(!this.range)return;let e=this.rangeStart?$.parseLocalISO(this.rangeStart):null,r=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;if(e&&!r){let o=$.startOfDayLocal(t);this.previewEnd=this.isDisabled(o)?null:o,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){let{weeks:t}=this.getMonthMatrix(this.viewMonth),e=this.formatMonthYear(this.viewMonth),r=this.weekdayLabels(),o=this.value?this.parseISO(this.value):null,n=this.rangeStart?this.parseISO(this.rangeStart):null,d=this.rangeEnd?this.parseISO(this.rangeEnd):null,c=this.previewEnd,p=f=>!this.range||!n||d||!c?!1:$.isBetweenInclusive(f,n,c),m=this.getTabTargetDayForCurrentView(t);return u`<div part="datepicker" class="w-[284px] z-50 absolute top-full bg-white border-2 border-t-0 border-primary py-3 px-4 ${this.open?"block rounded-bl-default rounded-br-default":"hidden"} ${this.alignment==="left"?"left-0":"right-0"}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${f=>this.handleHeaderKeyDown(f,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${f=>this.handleHeaderKeyDown(f,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base !text-primary" part="month-label" aria-live="polite">${e}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${f=>this.handleHeaderKeyDown(f,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${f=>this.handleHeaderKeyDown(f,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-icon></button></div></div><sd-divider></sd-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${e}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${r.map((f,y)=>u`<div role="columnheader" aria-colindex="${y+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${f}" title="${f}" id="${"col-"+(y+1)}">${f}</div>`)}</div>${t.map((f,y)=>u`<div class="grid-row grid grid-cols-7 ${y===0?"mt-2":""}" role="row" aria-rowindex="${y+2}">${f.map((b,k)=>{let T=b.getMonth()===this.viewMonth.getMonth(),M=this.isDisabled(b),S=$.isSameDay(b,this.focusedDate),O=$.isSameDay(b,this.today),I=!this.range&&o?$.isSameDay(b,o):!1,F=this.range&&n?$.isSameDay(b,n):!1,D=this.range&&d?$.isSameDay(b,d):!1,Y=this.range&&n&&d?$.isBetweenInclusive(b,n,d):!1,X=p(b)&&!M,Et=-1,xt=m&&$.isSameDay(b,m);(this.tabbingIntoGrid&&xt||!this.tabbingIntoGrid&&S)&&(Et=0);let st=this.isWeekend(b),It=b.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),tt=F?this.localize.term("startDateSelected"):D?this.localize.term("endDateSelected"):void 0;return u`<button type="button" part="day" class="${h("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",F||D?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",T?this.isInDisabledDates(b)?"out-month text-neutral-500":this.disabledWeekends&&st?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&st?"out-month weekend-day text-neutral-500":st?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",I?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",F?"bg-primary text-white rounded-l-md rounded-r-none":"",D?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",Y&&!F&&!D?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!Y&&X&&!F&&!D?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",O&&!I&&!F&&!D&&S?"today border-[1px] border-primary font-bold":"",M?"disabled cursor-not-allowed hover:bg-transparent":"",S&&!O?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${k+1}" aria-labelledby="${"col-"+(k+1)}" .tabIndex="${Et}" ?disabled="${M||this.disabled}" aria-disabled="${M||this.visuallyDisabled||this.disabled?"true":"false"}" aria-selected="${I||Y||F||D?"true":"false"}" aria-current="${O?"date":j}" aria-label="${It}" aria-roledescription="${tt!=null?tt:j}" @focus="${()=>this.focusedDate=$.startOfDayLocal(b)}" @mouseenter="${()=>this.onDayMouseEnter(b)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=$.startOfDayLocal(b),this.selectDate(b)}}">${b.getDate()}</button>`})}</div>`)}</div></div>`}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,o=!!t.tooltip,n=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",d={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],p=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||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",m={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"}[p],f=this.size==="sm"?"text-sm":"text-base";return u`<div part="form-control" class="${h("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e||o?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${h(e?"inline-block":"hidden",f)}" 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="${h("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${h("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",m,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"")}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${h("inline-flex relative w-full")}" sync="width" auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${h("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",p==="disabled"||p==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${r?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${h("min-w-0 flex-grow focus:outline-none bg-transparent hover:cursor-pointer",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],f)}" autocomplete="off" spellcheck="false" placeholder="${this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder")}" ?disabled="${this.disabled}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${h("text-error",d,c)}" library="_internal" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?u`<sd-icon class="${h("text-success flex-shrink-0",d,c)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""}<sd-icon class="${h(n,d,c,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-icon>${this.renderCalendar()}</div></sd-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};_.styles=[...g.styles,x`:host{display:inline-block;outline:2px solid transparent;outline-offset:2px;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}`],a([l({type:String,reflect:!0})],_.prototype,"locale",2),a([l({type:String})],_.prototype,"value",2),a([l({type:Boolean,reflect:!0})],_.prototype,"range",2),a([l({type:String})],_.prototype,"rangeStart",2),a([l({type:String})],_.prototype,"rangeEnd",2),a([l({type:Boolean})],_.prototype,"allowSameDayRange",2),a([l({type:String})],_.prototype,"min",2),a([l({type:String})],_.prototype,"max",2),a([l({type:Number})],_.prototype,"firstDayOfWeek",2),a([l({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],_.prototype,"disabledWeekends",2),a([l({attribute:"disabled-dates"})],_.prototype,"disabledDates",2),a([l({attribute:!1})],_.prototype,"isDateDisabled",2),a([l({type:String,reflect:!0})],_.prototype,"size",2),a([l({type:String})],_.prototype,"alignment",2),a([l({type:String,reflect:!0})],_.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],_.prototype,"helpText",2),a([l({type:Boolean,reflect:!0})],_.prototype,"disabled",2),a([l({type:Boolean,attribute:"visually-disabled"})],_.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],_.prototype,"styleOnValid",2),a([l({type:Boolean,reflect:!0})],_.prototype,"readonly",2),a([l({type:String,reflect:!0})],_.prototype,"placement",2),a([l({type:String,reflect:!0})],_.prototype,"placeholder",2),a([l({reflect:!0})],_.prototype,"name",2),a([l({type:String,reflect:!0})],_.prototype,"form",2),a([L()],_.prototype,"open",2),a([L()],_.prototype,"viewMonth",2),a([L()],_.prototype,"focusedDate",2),a([L()],_.prototype,"today",2),a([L()],_.prototype,"disabledDatesSet",2),a([L()],_.prototype,"previewEnd",2),a([L()],_.prototype,"statusNavText",2),a([L()],_.prototype,"statusSelectText",2),a([L()],_.prototype,"hasFocus",2),a([L()],_.prototype,"showValidStyle",2),a([L()],_.prototype,"showInvalidStyle",2),a([L()],_.prototype,"currentPlacement",2),a([L()],_.prototype,"inputValue",2),a([v("#invalid-message")],_.prototype,"invalidMessage",2),a([v("#input")],_.prototype,"input",2),a([C("locale")],_.prototype,"handleLocaleChange",1),a([C("disabledDates")],_.prototype,"handleDisabledDatesChange",1),a([C("value")],_.prototype,"handleValueChange",1),a([C("rangeStart"),C("rangeEnd")],_.prototype,"handleRangeChange",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],_.prototype,"handleDisabledChange",1),_=a([w("sd-datepicker")],_);var Ht=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"footer");this.localize=new A(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Ze(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),We(this))}disconnectedCallback(){super.disconnectedCallback(),Xe(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=q(this,"dialog.denyClose",{dir:this.localize.dir()});K(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=je(),this.modal.activate(),We(this);let t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([W(this.dialog),W(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?q(this,"dialog.showReducedMotion",{dir:this.localize.dir()}):q(this,"dialog.show",{dir:this.localize.dir()}),r=q(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([K(this.panel,e.keyframes,e.options),K(this.overlay,r.keyframes,r.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([W(this.dialog),W(this.overlay)]);let t=this.prefersReducedMotion?q(this,"dialog.hideReducedMotion",{dir:this.localize.dir()}):q(this,"dialog.hide",{dir:this.localize.dir()}),e=q(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([K(this.overlay,e.keyframes,e.options).then(()=>{this.overlay.hidden=!0}),K(this.panel,t.keyframes,t.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Xe(this);let r=this.originalTrigger;typeof(r==null?void 0:r.focus)=="function"&&r.isConnected&&setTimeout(()=>{try{r.focus({preventScroll:!0})}catch(o){r.focus()}this.originalTrigger=null}),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,J(this,"sd-after-hide")}render(){return u`<div part="base" class="${h("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="${h("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="${E(this.headline?this.headline:void 0)}" aria-labelledby="${E(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="${h("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="_internal" 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>`}};Ht.styles=[...g.styles,x`: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%}}`],a([v('[part="base"]')],Ht.prototype,"dialog",2),a([v('[part="panel"]')],Ht.prototype,"panel",2),a([v('[part="overlay"]')],Ht.prototype,"overlay",2),a([l({type:Boolean,reflect:!0})],Ht.prototype,"open",2),a([l({type:String,reflect:!0})],Ht.prototype,"headline",2),a([l({attribute:"no-close-button",type:Boolean,reflect:!0})],Ht.prototype,"noCloseButton",2),a([C("open",{waitUntilFirstUpdate:!0})],Ht.prototype,"handleOpenChange",1),Ht=a([w("sd-dialog")],Ht);B("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"}});B("dialog.showReducedMotion",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});B("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"}});B("dialog.hideReducedMotion",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});B("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});B("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});B("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});function Ra(s,i){let t=s;for(;t;){if(t.matches(i))return t;if(t.parentElement)t=t.parentElement;else if(t.parentNode instanceof ShadowRoot)t=t.parentNode.host;else break}return null}var dt=class extends g{constructor(){super(...arguments);this.localize=new A(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(o=>ar(o).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(()=>{let r=je();(!r||!this.containingElement||Ra(r,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;ee(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}),o=r.find(d=>!d.disabled)||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(o),o.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,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,J(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 W(this),this.panel.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=q(this,"dropdown.show",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await W(this);let{keyframes:t,options:e}=q(this,"dropdown.hide",{dir:this.localize.dir()});await K(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" exportparts="
|
|
138
|
-
popup:base__popup,
|
|
139
|
-
" 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="${h("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>`}};dt.styles=[...g.styles,x`: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}`],a([v("#dropdown")],dt.prototype,"popup",2),a([v("[part=trigger]")],dt.prototype,"trigger",2),a([v("[part=panel]")],dt.prototype,"panel",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"open",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"rounded",2),a([l({type:String,reflect:!0})],dt.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"disabled",2),a([l({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],dt.prototype,"stayOpenOnSelect",2),a([l({type:Object})],dt.prototype,"containingElement",2),a([l({type:Number,reflect:!0})],dt.prototype,"distance",2),a([l({type:Number,reflect:!0})],dt.prototype,"skidding",2),a([l({type:Boolean,reflect:!0,attribute:"no-auto-size"})],dt.prototype,"noAutoSize",2),a([l({type:Boolean,reflect:!0,attribute:"no-flip"})],dt.prototype,"noFlip",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"hoist",2),a([C("open",{waitUntilFirstUpdate:!0})],dt.prototype,"handleOpenChange",1),dt=a([w("sd-dropdown")],dt);B("dropdown.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("dropdown.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Nt=class extends g{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new A(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}async onOpenChange(){if(this.body.classList.add("transitioning"),this.open){this.emit("sd-show"),await W(this.body);let{keyframes:t,options:e}=q(this,"expandable.show",{dir:this.localize.dir()});await K(this.body,ye(t,this.body.scrollHeight),e),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-show")})}else{this.emit("sd-hide"),await W(this.body);let{keyframes:t,options:e}=q(this,"expandable.hide",{dir:this.localize.dir()});await K(this.body,ye(t,this.body.scrollHeight),e),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-hide")})}this.details.setAttribute("open",this.open.toString()),this.body.classList.remove("transitioning")}async show(){if(!this.open)return this.onToggleClick(),J(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),J(this,"sd-after-hide")}render(){return u`<div part="base" class="flex flex-col-reverse gap-4"><button part="toggle" class="${h("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="${h("h-full justify-center w-full text-base flex items-center toggle")}"><span part="toggle-icon" class="${h("flex items-center mr-2 transition-transform duration-medium ease-in-out",this.open&&"rotate-180")}"><slot name="expand-icon" class="${h(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="text-xl"></sd-icon></slot><slot name="collapse-icon" class="${h(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="text-xl"></sd-icon></slot></span><slot name="toggle-closed" class="${h(this.open&&"hidden")}">${this.localize.term("showMore")}</slot><slot name="toggle-open" class="${h(!this.open&&"hidden")}">${this.localize.term("showLess")}</slot></div></button><details part="details" ?inert="${E(!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 o=r.cloneNode(!0);t.appendChild(o)}),this.appendChild(t)}};Nt.styles=[...g.styles,x`:host{--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(--gradient-color-start,hsla(0,0%,100%,0)) 0%,var(--gradient-color-end,#fff) 80%,var(--gradient-color-end,#fff) 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,:host:has(.transitioning) .content{max-block-size:var(--max-height-pixel,1000vh)}.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);opacity:var(--sd-opacity-0,0);position:absolute;transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%}:host([inverted]){--color-primary-rgb:0,53,142;--gradient-color-start:rgba(var(--color-primary-rgb),0);--gradient-color-end:rgba(var(--color-primary-rgb),1)}:host([inverted]) .content:after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,var(--gradient)))}:host(:not([open])) .content:after{opacity:var(--sd-opacity-100,1)}`],a([v(".content-preview")],Nt.prototype,"contentPreview",2),a([v("details")],Nt.prototype,"details",2),a([v('[part="content"]')],Nt.prototype,"body",2),a([l({type:Boolean,reflect:!0})],Nt.prototype,"open",2),a([l({type:Boolean,reflect:!0})],Nt.prototype,"inverted",2),a([C("open",{waitUntilFirstUpdate:!0})],Nt.prototype,"onOpenChange",1),Nt=a([w("sd-expandable")],Nt);B("expandable.show",{keyframes:[{height:"var(--component-expandable-max-block-size, 90px)"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("expandable.hide",{keyframes:[{height:"auto"},{height:"var(--component-expandable-max-block-size, 90px)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Vt=class extends g{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="${h("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${E(this.activeSide==="back"||void 0)}" class="${h("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="${h("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="${h("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="${h("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="${h("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-icon library="_internal" name="reload" label="Flip to Back"></sd-icon></sd-button></div><div part="back" tabindex="0" aria-hidden="${this.activeSide==="front"}" inert="${E(this.activeSide==="front"||void 0)}" class="${h("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="${h("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="${h("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="${h("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="${h("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-icon library="_internal" name="reload" label="Flip to Front"></sd-icon></sd-button></div></div>`}};Vt.styles=[...g.styles,x`: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}`],a([v('[part="front"]')],Vt.prototype,"front",2),a([v('[part="back"]')],Vt.prototype,"back",2),a([l({reflect:!0,attribute:"flip-direction"})],Vt.prototype,"flipDirection",2),a([l({reflect:!0})],Vt.prototype,"placement",2),a([l({type:String,reflect:!0,attribute:"front-variant"})],Vt.prototype,"frontVariant",2),a([l({type:String,reflect:!0,attribute:"back-variant"})],Vt.prototype,"backVariant",2),a([L()],Vt.prototype,"activeSide",2),Vt=a([w("sd-flipcard")],Vt);var oe=class extends g{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.updateCalculatedHeight=this.updateCalculatedHeight.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this),window.addEventListener("resize",this.updateCalculatedHeight)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.updateCalculatedHeight)}firstUpdated(){this.updateCalculatedHeight(),this.addResizeObserver()}updated(t){super.updated(t),t.has("fixed")&&this.updateCalculatedHeight()}addResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateCalculatedHeight),this.header&&this.resizeObserver.observe(this.header)}updateCalculatedHeight(){let t=parseFloat(getComputedStyle(document.documentElement).fontSize),e=window.innerHeight/t;this.header&&this.fixed&&e>=32?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.header.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return u`<header class="w-full bg-white relative" role="banner"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}};oe.styles=[...g.styles,x`:host{display:block;position:relative;z-index:var(--sd-z-index-header,600)}@media (min-height:32rem){:host([fixed]){padding-bottom:var(--sd-header-calculated-height)!important}:host([fixed]) header{left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%;--tw-content:"";background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:var(--tw-content)}}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],a([l({reflect:!0,type:Boolean})],oe.prototype,"fixed",2),a([v("header")],oe.prototype,"header",2),a([di(100)],oe.prototype,"updateCalculatedHeight",1),oe=a([w("sd-header")],oe);var Zt=class extends g{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 Ji(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>`}};Zt.styles=[...g.styles,x`:host{display:block}`],a([l({reflect:!0})],Zt.prototype,"src",2),a([l({type:String,reflect:!0})],Zt.prototype,"mode",2),a([l({attribute:"allow-scripts",type:Boolean,reflect:!0})],Zt.prototype,"allowScripts",2),a([C("src")],Zt.prototype,"handleSrcChange",1),Zt=a([w("sd-include")],Zt);var Pi=(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),Pi(r,i);return!0},wr=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)},Ua=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),Xl(i)}};function jl(s){this._$AN!==void 0?(wr(this),this._$AM=s,Ua(this)):this._$AM=s}function Wl(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 o=t;o<e.length;o++)Pi(e[o],!1),wr(e[o]);else e!=null&&(Pi(e,!1),wr(e));else Pi(this,s)}var Xl=s=>{var i,t;s.type==Kt.CHILD&&((i=s._$AP)!=null||(s._$AP=Wl),(t=s._$AQ)!=null||(s._$AQ=jl))},ui=class extends Ie{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),Ua(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&&(Pi(this,i),wr(this))}setValue(i){if(lr(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 ts=class extends ui{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!==Kt.ELEMENT||!(t.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(t){return j}update(t,[e]){return this.callbacks===void 0&&this.host===void 0&&(this.host=t.element,this.callbacks=N({},e),this.host.addEventListener("pointerdown",this.handlePointerDown)),Dt}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(o=>{o.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()}},es=te(ts);var Na,Zl=(Na=navigator.userAgentData)==null?void 0:Na.brands.some(s=>s.brand.includes("Chromium")),Ql=Zl?!1:navigator.userAgent.includes("Firefox"),H=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this);this.hasSlotController=new P(this,"help-text","label","left","right","message","placeholder");this.localize=new A(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.floatingLabel=!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,o){this.input.setRangeText(t,e,r,o),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,o=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),n=!!t.tooltip,d=t.left,c=this.value!==null&&String(this.value).length>0,p=this.floatingLabel&&e&&(this.hasFocus||c||this.placeholder),m=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",f=this.size==="sm"?"text-sm":"text-base",y={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"}[m],b=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",k={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],T={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],M=this.size==="lg"?this.floatingLabel?p?"py-3":"py-4":"py-2":this.floatingLabel?p?"py-2":"py-3":"py-1",S={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return u`<div part="form-control" class="${h((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${(e||n)&&!this.floatingLabel?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${h(e?"inline-block":"hidden",f)}" 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="${h("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${h("absolute w-full h-full pointer-events-none border rounded-default transition-[border] ease-in-out duration-medium hover:duration-fast",y)}"></div><div part="base" class="${h("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",m==="disabled"||m==="visuallyDisabled"?"text-neutral-500":"text-black",M)}">${t.left?u`<slot name="left" part="left" class="${h("inline-flex",this.size==="sm"?"mr-1":"mr-2",b,T)}"></slot>`:""} <input part="input" id="input" class="${h("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"?p?"h-4":"h-6":p?"h-6":"h-8",f,p&&"leading-none mt-4")}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${E(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${E(this.placeholder)}" minlength="${E(this.minlength)}" maxlength="${E(this.maxlength)}" min="${E(this.min)}" max="${E(this.max)}" step="${E(this.step)}" .value="${xe(this.value)}" autocapitalize="${E(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${E(this.autocomplete)}" autocorrect="${E(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${E(this.pattern)}" enterkeyhint="${E(this.enterkeyhint)}" inputmode="${E(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}"> ${e&&this.floatingLabel?u`<label part="form-control-floating-label" class="${h("pointer-events-none absolute",d?S:"left-4",!this.readonly&&"transition-all duration-medium ease-out",!p||!c&&(this.readonly||this.visuallyDisabled)?"top-1/2 -translate-y-1/2":this.size==="lg"?"top-2":"top-1")}" for="input" aria-hidden="${e?"false":"true"}"><span id="floating-label" class="${h("pointer-events-none leading-none",!this.readonly&&"transition-all duration-medium ease-out",!p||!c&&(this.readonly||this.visuallyDisabled)?"text-base":"text-xs",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",p&&!this.visuallyDisabled&&!this.disabled&&"text-neutral-700")}">${this.label}</span></label>`:null} ${o?u`<button part="clear-button" class="${h("flex justify-center",k)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${h(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-neutral-700",T)}" library="_internal" 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="${h("flex items-center sd-interactive",k)}" type="button" @click="${this.handlePasswordToggle}">${this.passwordVisible?u`<slot name="show-password-icon"><sd-icon class="${h(b,T)}" library="_internal" name="eye"></sd-icon></slot>`:u`<slot name="hide-password-icon"><sd-icon class="${h(b,T)}" library="_internal" name="eye-crossed-out"></sd-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!Ql?u`<sd-icon class="${h(b,k,T)}" library="_internal" name="calendar"></sd-icon>`:""} ${this.type==="time"?u`<sd-icon class="${h(b,k,T)}" library="_internal" name="clock"></sd-icon>`:""} ${this.type==="search"?u`<button class="${h("flex items-center sd-interactive",k)}" type="button" @click="${this.handleSearchClick}"><sd-icon class="${h(b,T)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${h("text-error",k,T)}" library="_internal" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?u`<sd-icon class="${h("text-success flex-shrink-0",k,T)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""} ${t.right?u`<slot name="right" part="right" class="${h("inline-flex",b,k,T)}"></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" ${es({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-icon name="system/minus-circle" label="Decrease value" class="${h(b,k,T)}"></sd-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${es({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-icon name="system/plus-circle" label="Decrease value" class="${h(b,k,T)}"></sd-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};H.styles=[...g.styles,x`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) :is(#label,#floating-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))}`],a([v("#input")],H.prototype,"input",2),a([v("#invalid-message")],H.prototype,"invalidMessage",2),a([L()],H.prototype,"hasFocus",2),a([L()],H.prototype,"showValidStyle",2),a([L()],H.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],H.prototype,"type",2),a([l({type:String,reflect:!0})],H.prototype,"size",2),a([l({type:String,reflect:!0})],H.prototype,"inputmode",2),a([l()],H.prototype,"value",2),a([Bt()],H.prototype,"defaultValue",2),a([l({type:String,reflect:!0})],H.prototype,"placeholder",2),a([l({type:String,reflect:!0})],H.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],H.prototype,"helpText",2),a([l({type:Boolean,reflect:!0})],H.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],H.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],H.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],H.prototype,"readonly",2),a([l({attribute:"password-toggle",type:Boolean,reflect:!0})],H.prototype,"passwordToggle",2),a([l({attribute:"password-visible",type:Boolean,reflect:!0})],H.prototype,"passwordVisible",2),a([l({attribute:"spin-buttons",type:Boolean,reflect:!0})],H.prototype,"spinButtons",2),a([l({type:Number,reflect:!0})],H.prototype,"minlength",2),a([l({type:Number,reflect:!0})],H.prototype,"maxlength",2),a([l({reflect:!0})],H.prototype,"min",2),a([l({reflect:!0})],H.prototype,"max",2),a([l({type:String,reflect:!0})],H.prototype,"form",2),a([l({type:String,reflect:!0})],H.prototype,"name",2),a([l({type:String,reflect:!0})],H.prototype,"title",2),a([l({type:Boolean,reflect:!0})],H.prototype,"required",2),a([l({attribute:"floating-label",type:Boolean,reflect:!0})],H.prototype,"floatingLabel",2),a([l()],H.prototype,"pattern",2),a([l({reflect:!0})],H.prototype,"step",2),a([l({type:String,reflect:!0})],H.prototype,"autocapitalize",2),a([l({type:String,reflect:!0})],H.prototype,"autocorrect",2),a([l({reflect:!0})],H.prototype,"autocomplete",2),a([l({type:Boolean,reflect:!0})],H.prototype,"autofocus",2),a([l({type:String,reflect:!0})],H.prototype,"enterkeyhint",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],H.prototype,"styleOnValid",2),a([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],H.prototype,"spellcheck",2),a([C("disabled",{waitUntilFirstUpdate:!0})],H.prototype,"handleDisabledChange",1),a([C("step",{waitUntilFirstUpdate:!0})],H.prototype,"handleStepChange",1),a([C("value",{waitUntilFirstUpdate:!0})],H.prototype,"handleValueChange",1),H=a([w("sd-input")],H);var Ot=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(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="${h("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="${E(this.href||void 0)}" target="${E(this.target||void 0)}" download="${E(this.download)}" rel="${E(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="${h("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="${h("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};Ot.styles=[...g.styles,x`::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)}`],a([v("a")],Ot.prototype,"button",2),a([l({type:Boolean,reflect:!0})],Ot.prototype,"standalone",2),a([l({type:String,reflect:!0})],Ot.prototype,"size",2),a([l({type:Boolean,reflect:!0})],Ot.prototype,"inverted",2),a([l({type:String,reflect:!0})],Ot.prototype,"href",2),a([l({type:Boolean,attribute:"visually-disabled",reflect:!0})],Ot.prototype,"visuallyDisabled",2),a([l({type:String,reflect:!0})],Ot.prototype,"target",2),a([l({reflect:!0})],Ot.prototype,"download",2),Ot=a([w("sd-link")],Ot);var Ft=class extends g{constructor(){super(...arguments);this.variant="main";this.state="default";this.animated=!1;this.notInteractive=!1;this.href="";this.label="";this.marker={cluster:`
|
|
139
|
+
"><div part="combobox" class="${h("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="${h("inline-flex",y,m,b)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?u`<div part="tags" class="${h("flex items-center gap-1",y)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${h("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(k=>k==null?void 0:k.getTextLabel()).join(", ")}</div><input class="${h("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="${h("flex justify-center",f,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="${h("text-neutral-700",b)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${h(f,b,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon part="valid-icon" class="${h("flex-shrink-0 text-success",f,b)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="right" part="right" class="${h("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",b)}">${this.type!=="search"?u`<sd-icon class="${h("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?u`<button class="${h("flex items-center sd-interactive",f)}" type="button"><sd-icon class="${h(m,b)}" library="_internal" 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="${E(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${h("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-1" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};z.styles=[...g.styles,x`: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}`],a([v("sd-popup")],z.prototype,"popup",2),a([v('[part="combobox"]')],z.prototype,"combobox",2),a([v('[part="display-input"]')],z.prototype,"displayInput",2),a([v(".value-input")],z.prototype,"valueInput",2),a([v('[part="listbox"]')],z.prototype,"listbox",2),a([v('[part="tags"]')],z.prototype,"tagWrapper",2),a([v('[part="filtered-listbox"]')],z.prototype,"filteredWrapper",2),a([v("slot:not([name])")],z.prototype,"defaultSlot",2),a([v("#invalid-message")],z.prototype,"invalidMessage",2),a([L()],z.prototype,"hasFocus",2),a([L()],z.prototype,"displayInputValue",2),a([L()],z.prototype,"selectedTextLabel",2),a([L()],z.prototype,"selectedOptions",2),a([L()],z.prototype,"filteredOptions",2),a([L()],z.prototype,"allOptions",2),a([L()],z.prototype,"lastOption",2),a([L()],z.prototype,"showValidStyle",2),a([L()],z.prototype,"showInvalidStyle",2),a([L()],z.prototype,"deletedTagLabel",2),a([l({reflect:!0})],z.prototype,"name",2),a([l({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],z.prototype,"value",2),a([Rt()],z.prototype,"defaultValue",2),a([l({type:String,reflect:!0})],z.prototype,"size",2),a([l({type:String,reflect:!0})],z.prototype,"placeholder",2),a([l({type:String,attribute:"max-options-tag-label",reflect:!0})],z.prototype,"maxOptionsTagLabel",2),a([l({type:Boolean,reflect:!0})],z.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],z.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],z.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],z.prototype,"open",2),a([l({type:Boolean,reflect:!0})],z.prototype,"hoist",2),a([l({type:String,reflect:!0})],z.prototype,"label",2),a([l({type:String,reflect:!0})],z.prototype,"placement",2),a([l({type:String,attribute:"help-text",reflect:!0})],z.prototype,"helpText",2),a([l({type:String,reflect:!0})],z.prototype,"form",2),a([l({type:Boolean,reflect:!0})],z.prototype,"required",2),a([l({type:String,reflect:!0})],z.prototype,"type",2),a([L()],z.prototype,"currentPlacement",2),a([l()],z.prototype,"getOption",2),a([l({type:Boolean,reflect:!0})],z.prototype,"multiple",2),a([l({type:Boolean,reflect:!0})],z.prototype,"useTags",2),a([l({type:Number,reflect:!0,attribute:"max-options-visible"})],z.prototype,"maxOptionsVisible",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],z.prototype,"styleOnValid",2),a([l()],z.prototype,"filter",2),a([l()],z.prototype,"getTag",2),a([C("filter",{waitUntilFirstUpdate:!0})],z.prototype,"handleFilterChange",1),a([C("useTags",{waitUntilFirstUpdate:!0})],z.prototype,"handleUseTagsChange",1),a([C("size",{waitUntilFirstUpdate:!0})],z.prototype,"applySizeToOptions",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],z.prototype,"handleDisabledChange",1),a([C("value",{waitUntilFirstUpdate:!0})],z.prototype,"handleValueChange",1),a([C("displayInputValue",{waitUntilFirstUpdate:!0})],z.prototype,"handleDisplayInputValueChange",1),a([C("open",{waitUntilFirstUpdate:!0})],z.prototype,"handleOpenChange",1),z=a([w("sd-combobox")],z);B("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var me=class extends g{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="${h(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};me.styles=[...g.styles,x`:host{margin:var(--sd-spacing-0,0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],a([l({type:String,reflect:!0})],me.prototype,"orientation",2),a([l({type:Boolean,reflect:!0})],me.prototype,"inverted",2),me=a([w("sd-divider")],me);var $={startOfDayLocal:s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()),isSameDay:(s,i)=>!s||!i?!1:s.getFullYear()===i.getFullYear()&&s.getMonth()===i.getMonth()&&s.getDate()===i.getDate(),clampDateToMonth:(s,i)=>{let t=new Date(i.getFullYear(),i.getMonth(),1),e=new Date(i.getFullYear(),i.getMonth()+1,0);return s<t?t:s>e?e:s},toLocalISODate:s=>{let i=s.getFullYear(),t=(s.getMonth()+1).toString().padStart(2,"0"),e=s.getDate().toString().padStart(2,"0");return`${i}.${t}.${e}`},parseLocalISO:s=>{if(!s)return null;let i=/^(\d{4})\.(\d{2})\.(\d{2})$/.exec(s);if(!i)return null;let t=Number(i[1]),e=Number(i[2])-1,r=Number(i[3]),o=new Date(t,e,r);return Number.isNaN(o.getTime())?null:o},compareDates:(s,i)=>{let t=$.startOfDayLocal(s).getTime(),e=$.startOfDayLocal(i).getTime();return t-e},isBetweenInclusive:(s,i,t)=>{let e=$.compareDates(i,t)<=0?i:t,r=$.compareDates(i,t)<=0?t:i;return $.compareDates(s,e)>=0&&$.compareDates(s,r)<=0}};var _=class extends g{constructor(){super();this.localize=new A(this);this.hasSlotController=new P(this,"label","help-text","tooltip");this.formControlController=new pt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.disabled=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=$.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(o=>{var n,d;return o instanceof HTMLElement&&(((n=o.classList)==null?void 0:n.contains("nav"))||((d=o.classList)==null?void 0:d.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var d,c,p,m,f;if(this.disabled||this.visuallyDisabled){(d=t.preventDefault)==null||d.call(t),(c=t.stopPropagation)==null||c.call(t);return}let e=t.target,r=e.value,o=(p=e.selectionStart)!=null?p:r.length,n=(m=t.inputType)==null?void 0:m.startsWith("delete");if(this.range){let y=r.replace(/\D/g,""),b=y.slice(0,8),k=y.slice(8,16),T=this.buildDmyFromDigits(b),M=this.buildDmyFromDigits(k),S;b.length===0?S="":b.length<8?S=T:k.length>0?S=`${T} - ${M}`:S=n?T:`${T} -`;let O=this.countDigitsBeforeCaret(r,o),I;if(O<=8){let D=this.digitIndexToDmyCaretPos(Math.min(O,8));I=Math.min(D,T.length)}else{let D=b.length<8?T.length:T.length+3,Y=Math.min(O-8,8),X=this.digitIndexToDmyCaretPos(Y);I=D+Math.min(X,M.length)}this.inputValue=S;let F=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(T)){let D=this.dmyToIso(T),Y=D?$.parseLocalISO(D):null;!!Y&&!this.isDisabled(Y)&&this.inMinMax(Y)&&this.rangeStart!==D&&(this.rangeStart=D,this.previewEnd=null,this.viewMonth=new Date(Y.getFullYear(),Y.getMonth(),1),this.focusedDate=$.startOfDayLocal(Y),F=!0)}else this.rangeStart&&(this.rangeStart=null,F=!0),this.rangeEnd&&(this.rangeEnd=null,F=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(M)&&this.rangeStart){let D=$.parseLocalISO(this.rangeStart),Y=this.dmyToIso(M),X=Y?$.parseLocalISO(Y):null;if(!!X&&!this.isDisabled(X)&&this.inMinMax(X)){let[xt,st]=$.compareDates(D,X)<=0?[D,X]:[X,D],It=$.isSameDay(xt,st);if((this.allowSameDayRange||!It)&&!this.wouldRangeContainDisabled(xt,st)){let $t=$.toLocalISODate($.startOfDayLocal(xt)),ut=$.toLocalISODate($.startOfDayLocal(st));(this.rangeStart!==$t||this.rangeEnd!==ut)&&(this.rangeStart=$t,this.rangeEnd=ut,this.viewMonth=new Date(st.getFullYear(),st.getMonth(),1),this.focusedDate=$.startOfDayLocal(st),F=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,F=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),F&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var Y;let D=(Y=this.input)!=null?Y:e;D&&(D.value=this.inputValue,D.setSelectionRange(I,I))})})}else{let y=e,b=y.value,k=(f=y.selectionStart)!=null?f:b.length,T=b.replace(/\D/g,"").slice(0,8),M=T.slice(0,2),S=T.slice(2,4),O=T.slice(4,8),I="";M.length>0&&(I+=M,M.length===2&&(I+=".")),S.length>0&&M.length===2&&(I+=S,S.length===2&&(I+=".")),O.length>0&&M.length===2&&S.length===2&&(I+=O),I=I.replace(/\.\.+/g,".");let F=this.inputValue||"";this.inputValue=I;let D=k,Y=tt=>{let $t=[];for(let ut=0;ut<tt.length;ut++)tt[ut]==="."&&$t.push(ut);return $t},X=Y(F),Et=Y(I),xt=X.filter(tt=>tt<k).length,It=Et.filter(tt=>tt<k).length-xt;if(It>0?D+=It:!X.includes(k)&&Et.includes(k)&&(D+=1),D=Math.min(Math.max(0,D),I.length),requestAnimationFrame(()=>{var $t;let tt=($t=this.input)!=null?$t:y;tt&&(tt.value=this.inputValue,tt.setSelectionRange(D,D))}),/^\d{2}\.\d{2}\.\d{4}$/.test(I)){let tt=this.parseInputText(I);this.applyParsedInput(tt)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let y=this.rangeStart?$.parseLocalISO(this.rangeStart):null,b=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;y&&!b?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(y)}`):y&&b&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(y)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(b)}`)}else if(this.value){let y=$.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(y)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{this.currentPlacement=t.detail.placement};this.handleHeaderKeyDown=(t,e,r,o)=>{if(t.key==="Tab"&&!t.shiftKey){o&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(r):this.setYear(r))};this.onKeyDown=t=>{if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let e=t.key,r=!0,o=new Date(this.focusedDate);switch(e){case"ArrowLeft":o.setDate(o.getDate()-1);break;case"ArrowRight":o.setDate(o.getDate()+1);break;case"ArrowUp":o.setDate(o.getDate()-7);break;case"ArrowDown":o.setDate(o.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:r=!1}if(r){if(t.preventDefault(),o.getMonth()!==this.viewMonth.getMonth()||o.getFullYear()!==this.viewMonth.getFullYear()){this.viewMonth=new Date(o.getFullYear(),o.getMonth(),1);let p=this.formatMonthYear(this.viewMonth);this.setNavStatus(p)}let d=$.startOfDayLocal(o);(!this.focusedDate||d.getTime()!==this.focusedDate.getTime())&&(this.focusedDate=d);let c=d.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(c),this.requestUpdate(),requestAnimationFrame(()=>{let p=this.shadowRoot,m=p==null?void 0:p.querySelector("button.day.focused");m==null||m.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?$.parseLocalISO(this.value):null,e=this.rangeStart?$.parseLocalISO(this.rangeStart):null,r=this.range&&e?e:t!=null?t:$.startOfDayLocal(new Date);this.viewMonth=new Date(r.getFullYear(),r.getMonth(),1),this.focusedDate=$.clampDateToMonth(r,this.viewMonth),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?$.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=$.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var r;let e=this.input;if(e){e.value=(r=this.inputValue)!=null?r:"";let o=e.value.length;e.setSelectionRange(o,o)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?$.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null,r=t!=null?t:e;r&&(this.viewMonth=new Date(r.getFullYear(),r.getMonth(),1),this.focusedDate=$.startOfDayLocal(r)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let o=this.input;if(o){o.value=(n=this.inputValue)!=null?n:"";let d=o.value.length;o.setSelectionRange(d,d)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return $.parseLocalISO(t)}inMinMax(t){let e=this.parseISO(this.min!==null?String(this.min):null),r=this.parseISO(this.max!==null?String(this.max):null);return!(e&&t<e||r&&t>r)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=$.toLocalISODate($.startOfDayLocal(t));return this.disabledDatesSet.has(e)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let r="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+r},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),r=this.ordinal(e),o=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${r} of ${o} ${n}`}ordinal(t){let e=["th","st","nd","rd"],r=t%100,o=e[(r-20)%10]||e[r]||e[0];return t+o}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let r=JSON.parse(e);Array.isArray(r)&&(t=r)}catch(r){t=[]}else e.length>0&&(t=e.split(",").map(r=>r.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let r=$.compareDates(t,e)<=0?$.startOfDayLocal(t):$.startOfDayLocal(e),o=$.compareDates(t,e)<=0?$.startOfDayLocal(e):$.startOfDayLocal(t),n=new Date(r);for(;$.compareDates(n,o)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=$.parseLocalISO(t);if(!e)return"";let r=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${r}.${o}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let r=Number(e[1]),o=Number(e[2]),n=Number(e[3]),d=new Date(n,o-1,r);if(d.getFullYear()!==n||d.getMonth()!==o-1||d.getDate()!==r)return null;let c=$.startOfDayLocal(d);return $.toLocalISODate(c)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),o=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),d=this.isoToDmy(this.rangeEnd);return n&&d?`${n} ${o} ${d}`:n&&!d?`${n} ${o}`:""}parseInputText(t){var o,n;let e=t.trim();if(this.range){let d=e.split(/\s*-\s*/);if(d.length===1){let c=d[0];if(!c)return{start:null,end:null,valid:!0};let p=this.dmyToIso(c);return p?{start:p,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(d.length>=2){let c=(o=d[0])!=null?o:"",p=(n=d[1])!=null?n:"",m=c?this.dmyToIso(c):null,f=p?this.dmyToIso(p):null;return c&&!m?{start:null,end:null,valid:!1}:p&&!f?{start:null,end:null,valid:!1}:{start:m,end:f,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let r=this.dmyToIso(e);return r?{single:r,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var c,p,m,f;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=y=>{if(!y)return!0;let b=$.parseLocalISO(y);return!(!this.inMinMax(b)||this.isDisabled(b))},r=!1;if(this.range){let y=(c=t.start)!=null?c:null,b=(p=t.end)!=null?p:null;if(!e(y)||b&&!e(b))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let k=y?$.parseLocalISO(y):null,T=b?$.parseLocalISO(b):null;if(k&&T){if($.compareDates(k,T)>0){let O=k;k=T,T=O}if(!this.allowSameDayRange&&$.isSameDay(k,T))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(k,T))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let M=k?$.toLocalISODate($.startOfDayLocal(k)):null,S=T?$.toLocalISODate($.startOfDayLocal(T)):null;if(this.rangeStart!==M||this.rangeEnd!==S){this.rangeStart=M,this.rangeEnd=S,this.previewEnd=null,r=!0;let O=(m=k!=null?k:T)!=null?m:this.today;this.viewMonth=new Date(O.getFullYear(),O.getMonth(),1),this.focusedDate=$.startOfDayLocal(O),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let o=(f=t.single)!=null?f:null;if(!e(o))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=o?$.parseLocalISO(o):null,d=n?$.toLocalISODate($.startOfDayLocal(n)):null;return this.value!==d&&(this.value=d,r=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=$.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),r}buildDmyFromDigits(t){let e=t.slice(0,8),r=e.slice(0,2),o=e.slice(2,4),n=e.slice(4,8),d=r;return o.length&&(d+="."+o),n.length&&(d+="."+n),d}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var r,o;((o=(r=t.composedPath)==null?void 0:r.call(t))!=null?o:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.emit("sd-focus")}setMonth(t){let e=new Date(this.viewMonth.getFullYear(),this.viewMonth.getMonth()+t,1);if(e.getMonth()===this.viewMonth.getMonth()&&e.getFullYear()===this.viewMonth.getFullYear())return;this.viewMonth=e;let r=this.formatMonthYear(this.viewMonth);this.setNavStatus(r),this.emit("sd-month-change",{detail:{month:this.viewMonth}})}setYear(t){let e=new Date(this.viewMonth.getFullYear()+t,this.viewMonth.getMonth(),1);if(e.getFullYear()===this.viewMonth.getFullYear()&&e.getMonth()===this.viewMonth.getMonth())return;this.viewMonth=e;let r=this.formatMonthYear(this.viewMonth);this.setNavStatus(r),this.emit("sd-month-year",{detail:{month:this.viewMonth}})}focusInitialGridDay(){let t=null;if(!this.range&&this.value){let r=$.parseLocalISO(this.value);r&&(t=$.startOfDayLocal(r))}if(this.range){let r=this.rangeStart?$.parseLocalISO(this.rangeStart):null,o=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;o?t=$.startOfDayLocal(o):r&&(t=$.startOfDayLocal(r))}if(!(r=>r?r.getFullYear()===this.viewMonth.getFullYear()&&r.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(r):!1)(t)){let{weeks:r}=this.getMonthMatrix(this.viewMonth),o=r.flat().find(n=>n.getMonth()===this.viewMonth.getMonth()&&$.isSameDay(n,this.today)&&!this.isDisabled(n));if(o)t=$.startOfDayLocal(o);else{let n=r.flat().find(d=>d.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(d));t=n?$.startOfDayLocal(n):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let r=this.shadowRoot,o=(r==null?void 0:r.querySelector("button.day.selected"))||(r==null?void 0:r.querySelector("button.day.focused"))||(r==null?void 0:r.querySelector('button.day[tabindex="0"]'))||(r==null?void 0:r.querySelector("button.day"));o==null||o.focus({preventScroll:!0})})}selectSingleDate(t){if(this.isDisabled(t))return;let e=$.startOfDayLocal(t),r=$.toLocalISODate(e);if(this.value===r)return;this.value=r;let o=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(o),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let n=this.input;n&&(n.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let c=n.value.length;n.setSelectionRange(c,c)})}))})}selectRangeDate(t){let e=$.startOfDayLocal(t),r=this.rangeStart?$.parseLocalISO(this.rangeStart):null,o=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;if(!r&&!o){if(this.isDisabled(e))return;this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let d=this.input;d&&(d.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=d.value.length;d.setSelectionRange(p,p)})}))});return}if(r&&!o){if(this.isDisabled(e))return;if($.isSameDay(r,e)){if(!this.allowSameDayRange){this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let y=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${y}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var k;let b=this.input;b&&(b.value=(k=this.inputValue)!=null?k:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let T=b.value.length;b.setSelectionRange(T,T)})}))});return}this.rangeStart=$.toLocalISODate(e),this.rangeEnd=$.toLocalISODate(e),this.previewEnd=null;let f=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${f}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var b;let y=this.input;y&&(y.value=(b=this.inputValue)!=null?b:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let k=y.value.length;y.setSelectionRange(k,k)})}))});return}let n=$.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[d,c]=$.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=$.toLocalISODate(d),this.rangeEnd=$.toLocalISODate(c),this.previewEnd=null;let p=this.formatSelectionLabel(d),m=this.formatSelectionLabel(c);this.announceSelect(`${this.termStartSelected()}: ${p}`,40),this.announceSelect(`${this.termEndSelected()}: ${m}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var y;let f=this.input;f&&(f.value=(y=this.inputValue)!=null?y:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let b=f.value.length;f.setSelectionRange(b,b)})}))});return}if(r&&o){if(this.isDisabled(e))return;this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let d=this.input;d&&(d.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=d.value.length;d.setSelectionRange(p,p)})}))})}}selectDate(t){this.range?this.selectRangeDate(t):this.selectSingleDate(t)}getMonthMatrix(t){var m;let e=(m=this.firstDayOfWeek)!=null?m:1,r=new Date(t.getFullYear(),t.getMonth(),1),o=new Date(r),n=(r.getDay()-e+7)%7;o.setDate(r.getDate()-n);let d=[],c=o;for(let f=0;f<6;f++){let y=[];for(let b=0;b<7;b++)y.push(new Date(c)),c.setDate(c.getDate()+1);d.push(y)}let p=f=>f.every(y=>y.getMonth()!==t.getMonth());for(;d.length>0&&p(d[d.length-1]);)d.pop();return{weeks:d}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var o;let t=(o=this.firstDayOfWeek)!=null?o:1,e=new Date(2021,7,1),r=[];for(let n=0;n<7;n++){let d=new Date(e);d.setDate(e.getDate()+(t+n)%7);try{r.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(d))}catch(c){r.push(d.toLocaleDateString(void 0,{weekday:"short"}))}}return r}getTabTargetDayForCurrentView(t){let e=t.flat().find(o=>o.getMonth()===this.viewMonth.getMonth()&&$.isSameDay(o,this.today)&&!this.isDisabled(o));if(e)return $.startOfDayLocal(e);let r=t.flat().find(o=>o.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(o));return r?$.startOfDayLocal(r):null}onDayMouseEnter(t){if(!this.range)return;let e=this.rangeStart?$.parseLocalISO(this.rangeStart):null,r=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;if(e&&!r){let o=$.startOfDayLocal(t);this.previewEnd=this.isDisabled(o)?null:o,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){let{weeks:t}=this.getMonthMatrix(this.viewMonth),e=this.formatMonthYear(this.viewMonth),r=this.weekdayLabels(),o=this.value?this.parseISO(this.value):null,n=this.rangeStart?this.parseISO(this.rangeStart):null,d=this.rangeEnd?this.parseISO(this.rangeEnd):null,c=this.previewEnd,p=f=>!this.range||!n||d||!c?!1:$.isBetweenInclusive(f,n,c),m=this.getTabTargetDayForCurrentView(t);return u`<div part="datepicker" class="w-[284px] z-50 absolute top-full bg-white border-2 border-t-0 border-primary py-3 px-4 ${this.open?"block rounded-bl-default rounded-br-default":"hidden"} ${this.alignment==="left"?"left-0":"right-0"}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${f=>this.handleHeaderKeyDown(f,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${f=>this.handleHeaderKeyDown(f,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base !text-primary" part="month-label" aria-live="polite">${e}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${f=>this.handleHeaderKeyDown(f,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${f=>this.handleHeaderKeyDown(f,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-icon></button></div></div><sd-divider></sd-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${e}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${r.map((f,y)=>u`<div role="columnheader" aria-colindex="${y+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${f}" title="${f}" id="${"col-"+(y+1)}">${f}</div>`)}</div>${t.map((f,y)=>u`<div class="grid-row grid grid-cols-7 ${y===0?"mt-2":""}" role="row" aria-rowindex="${y+2}">${f.map((b,k)=>{let T=b.getMonth()===this.viewMonth.getMonth(),M=this.isDisabled(b),S=$.isSameDay(b,this.focusedDate),O=$.isSameDay(b,this.today),I=!this.range&&o?$.isSameDay(b,o):!1,F=this.range&&n?$.isSameDay(b,n):!1,D=this.range&&d?$.isSameDay(b,d):!1,Y=this.range&&n&&d?$.isBetweenInclusive(b,n,d):!1,X=p(b)&&!M,Et=-1,xt=m&&$.isSameDay(b,m);(this.tabbingIntoGrid&&xt||!this.tabbingIntoGrid&&S)&&(Et=0);let st=this.isWeekend(b),It=b.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),tt=F?this.localize.term("startDateSelected"):D?this.localize.term("endDateSelected"):void 0;return u`<button type="button" part="day" class="${h("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",F||D?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",T?this.isInDisabledDates(b)?"out-month text-neutral-500":this.disabledWeekends&&st?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&st?"out-month weekend-day text-neutral-500":st?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",I?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",F?"bg-primary text-white rounded-l-md rounded-r-none":"",D?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",Y&&!F&&!D?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!Y&&X&&!F&&!D?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",O&&!I&&!F&&!D&&S?"today border-[1px] border-primary font-bold":"",M?"disabled cursor-not-allowed hover:bg-transparent":"",S&&!O?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${k+1}" aria-labelledby="${"col-"+(k+1)}" .tabIndex="${Et}" ?disabled="${M||this.disabled}" aria-disabled="${M||this.visuallyDisabled||this.disabled?"true":"false"}" aria-selected="${I||Y||F||D?"true":"false"}" aria-current="${O?"date":j}" aria-label="${It}" aria-roledescription="${tt!=null?tt:j}" @focus="${()=>this.focusedDate=$.startOfDayLocal(b)}" @mouseenter="${()=>this.onDayMouseEnter(b)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=$.startOfDayLocal(b),this.selectDate(b)}}">${b.getDate()}</button>`})}</div>`)}</div></div>`}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,o=!!t.tooltip,n=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",d={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],p=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||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",m={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"}[p],f=this.size==="sm"?"text-sm":"text-base";return u`<div part="form-control" class="${h("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e||o?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${h(e?"inline-block":"hidden",f)}" 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="${h("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${h("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",m,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"")}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${h("inline-flex relative w-full")}" sync="width" auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${h("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",p==="disabled"||p==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${r?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${h("min-w-0 flex-grow focus:outline-none bg-transparent hover:cursor-pointer",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],f)}" autocomplete="off" spellcheck="false" placeholder="${this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder")}" ?disabled="${this.disabled}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${h("text-error",d,c)}" library="_internal" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?u`<sd-icon class="${h("text-success flex-shrink-0",d,c)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""}<sd-icon class="${h(n,d,c,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-icon>${this.renderCalendar()}</div></sd-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};_.styles=[...g.styles,x`:host{display:inline-block;outline:2px solid transparent;outline-offset:2px;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}`],a([l({type:String,reflect:!0})],_.prototype,"locale",2),a([l({type:String})],_.prototype,"value",2),a([l({type:Boolean,reflect:!0})],_.prototype,"range",2),a([l({type:String})],_.prototype,"rangeStart",2),a([l({type:String})],_.prototype,"rangeEnd",2),a([l({type:Boolean})],_.prototype,"allowSameDayRange",2),a([l({type:String})],_.prototype,"min",2),a([l({type:String})],_.prototype,"max",2),a([l({type:Number})],_.prototype,"firstDayOfWeek",2),a([l({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],_.prototype,"disabledWeekends",2),a([l({attribute:"disabled-dates"})],_.prototype,"disabledDates",2),a([l({attribute:!1})],_.prototype,"isDateDisabled",2),a([l({type:String,reflect:!0})],_.prototype,"size",2),a([l({type:String})],_.prototype,"alignment",2),a([l({type:String,reflect:!0})],_.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],_.prototype,"helpText",2),a([l({type:Boolean,reflect:!0})],_.prototype,"disabled",2),a([l({type:Boolean,attribute:"visually-disabled"})],_.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],_.prototype,"styleOnValid",2),a([l({type:Boolean,reflect:!0})],_.prototype,"readonly",2),a([l({type:String,reflect:!0})],_.prototype,"placement",2),a([l({type:String,reflect:!0})],_.prototype,"placeholder",2),a([l({reflect:!0})],_.prototype,"name",2),a([l({type:String,reflect:!0})],_.prototype,"form",2),a([L()],_.prototype,"open",2),a([L()],_.prototype,"viewMonth",2),a([L()],_.prototype,"focusedDate",2),a([L()],_.prototype,"today",2),a([L()],_.prototype,"disabledDatesSet",2),a([L()],_.prototype,"previewEnd",2),a([L()],_.prototype,"statusNavText",2),a([L()],_.prototype,"statusSelectText",2),a([L()],_.prototype,"hasFocus",2),a([L()],_.prototype,"showValidStyle",2),a([L()],_.prototype,"showInvalidStyle",2),a([L()],_.prototype,"currentPlacement",2),a([L()],_.prototype,"inputValue",2),a([v("#invalid-message")],_.prototype,"invalidMessage",2),a([v("#input")],_.prototype,"input",2),a([C("locale")],_.prototype,"handleLocaleChange",1),a([C("disabledDates")],_.prototype,"handleDisabledDatesChange",1),a([C("value")],_.prototype,"handleValueChange",1),a([C("rangeStart"),C("rangeEnd")],_.prototype,"handleRangeChange",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],_.prototype,"handleDisabledChange",1),_=a([w("sd-datepicker")],_);var Ht=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"footer");this.localize=new A(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Ze(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),We(this))}disconnectedCallback(){super.disconnectedCallback(),Xe(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=q(this,"dialog.denyClose",{dir:this.localize.dir()});K(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=je(),this.modal.activate(),We(this);let t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([W(this.dialog),W(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?q(this,"dialog.showReducedMotion",{dir:this.localize.dir()}):q(this,"dialog.show",{dir:this.localize.dir()}),r=q(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([K(this.panel,e.keyframes,e.options),K(this.overlay,r.keyframes,r.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([W(this.dialog),W(this.overlay)]);let t=this.prefersReducedMotion?q(this,"dialog.hideReducedMotion",{dir:this.localize.dir()}):q(this,"dialog.hide",{dir:this.localize.dir()}),e=q(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([K(this.overlay,e.keyframes,e.options).then(()=>{this.overlay.hidden=!0}),K(this.panel,t.keyframes,t.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Xe(this);let r=this.originalTrigger;typeof(r==null?void 0:r.focus)=="function"&&r.isConnected&&setTimeout(()=>{try{r.focus({preventScroll:!0})}catch(o){r.focus()}this.originalTrigger=null}),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,J(this,"sd-after-hide")}render(){return u`<div part="base" class="${h("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="${h("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="${E(this.headline?this.headline:void 0)}" aria-labelledby="${E(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="${h("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="_internal" 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>`}};Ht.styles=[...g.styles,x`: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%}}`],a([v('[part="base"]')],Ht.prototype,"dialog",2),a([v('[part="panel"]')],Ht.prototype,"panel",2),a([v('[part="overlay"]')],Ht.prototype,"overlay",2),a([l({type:Boolean,reflect:!0})],Ht.prototype,"open",2),a([l({type:String,reflect:!0})],Ht.prototype,"headline",2),a([l({attribute:"no-close-button",type:Boolean,reflect:!0})],Ht.prototype,"noCloseButton",2),a([C("open",{waitUntilFirstUpdate:!0})],Ht.prototype,"handleOpenChange",1),Ht=a([w("sd-dialog")],Ht);B("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"}});B("dialog.showReducedMotion",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});B("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"}});B("dialog.hideReducedMotion",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});B("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});B("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});B("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});var Nt=class extends g{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new A(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}async onOpenChange(){if(this.body.classList.add("transitioning"),this.open){this.emit("sd-show"),await W(this.body);let{keyframes:t,options:e}=q(this,"expandable.show",{dir:this.localize.dir()});await K(this.body,ye(t,this.body.scrollHeight),e),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-show")})}else{this.emit("sd-hide"),await W(this.body);let{keyframes:t,options:e}=q(this,"expandable.hide",{dir:this.localize.dir()});await K(this.body,ye(t,this.body.scrollHeight),e),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-hide")})}this.details.setAttribute("open",this.open.toString()),this.body.classList.remove("transitioning")}async show(){if(!this.open)return this.onToggleClick(),J(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),J(this,"sd-after-hide")}render(){return u`<div part="base" class="flex flex-col-reverse gap-4"><button part="toggle" class="${h("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="${h("h-full justify-center w-full text-base flex items-center toggle")}"><span part="toggle-icon" class="${h("flex items-center mr-2 transition-transform duration-medium ease-in-out",this.open&&"rotate-180")}"><slot name="expand-icon" class="${h(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="text-xl"></sd-icon></slot><slot name="collapse-icon" class="${h(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="text-xl"></sd-icon></slot></span><slot name="toggle-closed" class="${h(this.open&&"hidden")}">${this.localize.term("showMore")}</slot><slot name="toggle-open" class="${h(!this.open&&"hidden")}">${this.localize.term("showLess")}</slot></div></button><details part="details" ?inert="${E(!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 o=r.cloneNode(!0);t.appendChild(o)}),this.appendChild(t)}};Nt.styles=[...g.styles,x`:host{--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(--gradient-color-start,hsla(0,0%,100%,0)) 0%,var(--gradient-color-end,#fff) 80%,var(--gradient-color-end,#fff) 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,:host:has(.transitioning) .content{max-block-size:var(--max-height-pixel,1000vh)}.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);opacity:var(--sd-opacity-0,0);position:absolute;transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%}:host([inverted]){--color-primary-rgb:0,53,142;--gradient-color-start:rgba(var(--color-primary-rgb),0);--gradient-color-end:rgba(var(--color-primary-rgb),1)}:host([inverted]) .content:after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,var(--gradient)))}:host(:not([open])) .content:after{opacity:var(--sd-opacity-100,1)}`],a([v(".content-preview")],Nt.prototype,"contentPreview",2),a([v("details")],Nt.prototype,"details",2),a([v('[part="content"]')],Nt.prototype,"body",2),a([l({type:Boolean,reflect:!0})],Nt.prototype,"open",2),a([l({type:Boolean,reflect:!0})],Nt.prototype,"inverted",2),a([C("open",{waitUntilFirstUpdate:!0})],Nt.prototype,"onOpenChange",1),Nt=a([w("sd-expandable")],Nt);B("expandable.show",{keyframes:[{height:"var(--component-expandable-max-block-size, 90px)"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("expandable.hide",{keyframes:[{height:"auto"},{height:"var(--component-expandable-max-block-size, 90px)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Vt=class extends g{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="${h("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${E(this.activeSide==="back"||void 0)}" class="${h("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="${h("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="${h("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="${h("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="${h("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-icon library="_internal" name="reload" label="Flip to Back"></sd-icon></sd-button></div><div part="back" tabindex="0" aria-hidden="${this.activeSide==="front"}" inert="${E(this.activeSide==="front"||void 0)}" class="${h("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="${h("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="${h("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="${h("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="${h("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-icon library="_internal" name="reload" label="Flip to Front"></sd-icon></sd-button></div></div>`}};Vt.styles=[...g.styles,x`: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}`],a([v('[part="front"]')],Vt.prototype,"front",2),a([v('[part="back"]')],Vt.prototype,"back",2),a([l({reflect:!0,attribute:"flip-direction"})],Vt.prototype,"flipDirection",2),a([l({reflect:!0})],Vt.prototype,"placement",2),a([l({type:String,reflect:!0,attribute:"front-variant"})],Vt.prototype,"frontVariant",2),a([l({type:String,reflect:!0,attribute:"back-variant"})],Vt.prototype,"backVariant",2),a([L()],Vt.prototype,"activeSide",2),Vt=a([w("sd-flipcard")],Vt);var oe=class extends g{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.updateCalculatedHeight=this.updateCalculatedHeight.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this),window.addEventListener("resize",this.updateCalculatedHeight)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.updateCalculatedHeight)}firstUpdated(){this.updateCalculatedHeight(),this.addResizeObserver()}updated(t){super.updated(t),t.has("fixed")&&this.updateCalculatedHeight()}addResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateCalculatedHeight),this.header&&this.resizeObserver.observe(this.header)}updateCalculatedHeight(){let t=parseFloat(getComputedStyle(document.documentElement).fontSize),e=window.innerHeight/t;this.header&&this.fixed&&e>=32?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.header.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return u`<header class="w-full bg-white relative" role="banner"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}};oe.styles=[...g.styles,x`:host{display:block;position:relative;z-index:var(--sd-z-index-header,600)}@media (min-height:32rem){:host([fixed]){padding-bottom:var(--sd-header-calculated-height)!important}:host([fixed]) header{left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%;--tw-content:"";background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:var(--tw-content)}}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],a([l({reflect:!0,type:Boolean})],oe.prototype,"fixed",2),a([v("header")],oe.prototype,"header",2),a([pi(100)],oe.prototype,"updateCalculatedHeight",1),oe=a([w("sd-header")],oe);var Zt=class extends g{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 Ji(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>`}};Zt.styles=[...g.styles,x`:host{display:block}`],a([l({reflect:!0})],Zt.prototype,"src",2),a([l({type:String,reflect:!0})],Zt.prototype,"mode",2),a([l({attribute:"allow-scripts",type:Boolean,reflect:!0})],Zt.prototype,"allowScripts",2),a([C("src")],Zt.prototype,"handleSrcChange",1),Zt=a([w("sd-include")],Zt);var Pi=(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),Pi(r,i);return!0},wr=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)},Ua=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),Xl(i)}};function jl(s){this._$AN!==void 0?(wr(this),this._$AM=s,Ua(this)):this._$AM=s}function Wl(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 o=t;o<e.length;o++)Pi(e[o],!1),wr(e[o]);else e!=null&&(Pi(e,!1),wr(e));else Pi(this,s)}var Xl=s=>{var i,t;s.type==Kt.CHILD&&((i=s._$AP)!=null||(s._$AP=Wl),(t=s._$AQ)!=null||(s._$AQ=jl))},ui=class extends Ie{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),Ua(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&&(Pi(this,i),wr(this))}setValue(i){if(vr(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 ts=class extends ui{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!==Kt.ELEMENT||!(t.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(t){return j}update(t,[e]){return this.callbacks===void 0&&this.host===void 0&&(this.host=t.element,this.callbacks=N({},e),this.host.addEventListener("pointerdown",this.handlePointerDown)),Dt}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(o=>{o.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()}},es=te(ts);var Na,Zl=(Na=navigator.userAgentData)==null?void 0:Na.brands.some(s=>s.brand.includes("Chromium")),Ql=Zl?!1:navigator.userAgent.includes("Firefox"),H=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this);this.hasSlotController=new P(this,"help-text","label","left","right","message","placeholder");this.localize=new A(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.floatingLabel=!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,o){this.input.setRangeText(t,e,r,o),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,o=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),n=!!t.tooltip,d=t.left,c=this.value!==null&&String(this.value).length>0,p=this.floatingLabel&&e&&(this.hasFocus||c||this.placeholder),m=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",f=this.size==="sm"?"text-sm":"text-base",y={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"}[m],b=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",k={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],T={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],M=this.size==="lg"?this.floatingLabel?p?"py-3":"py-4":"py-2":this.floatingLabel?p?"py-2":"py-3":"py-1",S={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return u`<div part="form-control" class="${h((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${(e||n)&&!this.floatingLabel?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${h(e?"inline-block":"hidden",f)}" 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="${h("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${h("absolute w-full h-full pointer-events-none border rounded-default transition-[border] ease-in-out duration-medium hover:duration-fast",y)}"></div><div part="base" class="${h("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",m==="disabled"||m==="visuallyDisabled"?"text-neutral-500":"text-black",M)}">${t.left?u`<slot name="left" part="left" class="${h("inline-flex",this.size==="sm"?"mr-1":"mr-2",b,T)}"></slot>`:""} <input part="input" id="input" class="${h("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"?p?"h-4":"h-6":p?"h-6":"h-8",f,p&&"leading-none mt-4")}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${E(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${E(this.placeholder)}" minlength="${E(this.minlength)}" maxlength="${E(this.maxlength)}" min="${E(this.min)}" max="${E(this.max)}" step="${E(this.step)}" .value="${Ce(this.value)}" autocapitalize="${E(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${E(this.autocomplete)}" autocorrect="${E(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${E(this.pattern)}" enterkeyhint="${E(this.enterkeyhint)}" inputmode="${E(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}"> ${e&&this.floatingLabel?u`<label part="form-control-floating-label" class="${h("pointer-events-none absolute",d?S:"left-4",!this.readonly&&"transition-all duration-medium ease-out",!p||!c&&(this.readonly||this.visuallyDisabled)?"top-1/2 -translate-y-1/2":this.size==="lg"?"top-2":"top-1")}" for="input" aria-hidden="${e?"false":"true"}"><span id="floating-label" class="${h("pointer-events-none leading-none",!this.readonly&&"transition-all duration-medium ease-out",!p||!c&&(this.readonly||this.visuallyDisabled)?"text-base":"text-xs",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",p&&!this.visuallyDisabled&&!this.disabled&&"text-neutral-700")}">${this.label}</span></label>`:null} ${o?u`<button part="clear-button" class="${h("flex justify-center",k)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${h(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-neutral-700",T)}" library="_internal" 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="${h("flex items-center sd-interactive",k)}" type="button" @click="${this.handlePasswordToggle}">${this.passwordVisible?u`<slot name="show-password-icon"><sd-icon class="${h(b,T)}" library="_internal" name="eye"></sd-icon></slot>`:u`<slot name="hide-password-icon"><sd-icon class="${h(b,T)}" library="_internal" name="eye-crossed-out"></sd-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!Ql?u`<sd-icon class="${h(b,k,T)}" library="_internal" name="calendar"></sd-icon>`:""} ${this.type==="time"?u`<sd-icon class="${h(b,k,T)}" library="_internal" name="clock"></sd-icon>`:""} ${this.type==="search"?u`<button class="${h("flex items-center sd-interactive",k)}" type="button" @click="${this.handleSearchClick}"><sd-icon class="${h(b,T)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${h("text-error",k,T)}" library="_internal" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?u`<sd-icon class="${h("text-success flex-shrink-0",k,T)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""} ${t.right?u`<slot name="right" part="right" class="${h("inline-flex",b,k,T)}"></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" ${es({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-icon name="system/minus-circle" label="Decrease value" class="${h(b,k,T)}"></sd-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${es({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-icon name="system/plus-circle" label="Decrease value" class="${h(b,k,T)}"></sd-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};H.styles=[...g.styles,x`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) :is(#label,#floating-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))}`],a([v("#input")],H.prototype,"input",2),a([v("#invalid-message")],H.prototype,"invalidMessage",2),a([L()],H.prototype,"hasFocus",2),a([L()],H.prototype,"showValidStyle",2),a([L()],H.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],H.prototype,"type",2),a([l({type:String,reflect:!0})],H.prototype,"size",2),a([l({type:String,reflect:!0})],H.prototype,"inputmode",2),a([l()],H.prototype,"value",2),a([Rt()],H.prototype,"defaultValue",2),a([l({type:String,reflect:!0})],H.prototype,"placeholder",2),a([l({type:String,reflect:!0})],H.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],H.prototype,"helpText",2),a([l({type:Boolean,reflect:!0})],H.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],H.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],H.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],H.prototype,"readonly",2),a([l({attribute:"password-toggle",type:Boolean,reflect:!0})],H.prototype,"passwordToggle",2),a([l({attribute:"password-visible",type:Boolean,reflect:!0})],H.prototype,"passwordVisible",2),a([l({attribute:"spin-buttons",type:Boolean,reflect:!0})],H.prototype,"spinButtons",2),a([l({type:Number,reflect:!0})],H.prototype,"minlength",2),a([l({type:Number,reflect:!0})],H.prototype,"maxlength",2),a([l({reflect:!0})],H.prototype,"min",2),a([l({reflect:!0})],H.prototype,"max",2),a([l({type:String,reflect:!0})],H.prototype,"form",2),a([l({type:String,reflect:!0})],H.prototype,"name",2),a([l({type:String,reflect:!0})],H.prototype,"title",2),a([l({type:Boolean,reflect:!0})],H.prototype,"required",2),a([l({attribute:"floating-label",type:Boolean,reflect:!0})],H.prototype,"floatingLabel",2),a([l()],H.prototype,"pattern",2),a([l({reflect:!0})],H.prototype,"step",2),a([l({type:String,reflect:!0})],H.prototype,"autocapitalize",2),a([l({type:String,reflect:!0})],H.prototype,"autocorrect",2),a([l({reflect:!0})],H.prototype,"autocomplete",2),a([l({type:Boolean,reflect:!0})],H.prototype,"autofocus",2),a([l({type:String,reflect:!0})],H.prototype,"enterkeyhint",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],H.prototype,"styleOnValid",2),a([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],H.prototype,"spellcheck",2),a([C("disabled",{waitUntilFirstUpdate:!0})],H.prototype,"handleDisabledChange",1),a([C("step",{waitUntilFirstUpdate:!0})],H.prototype,"handleStepChange",1),a([C("value",{waitUntilFirstUpdate:!0})],H.prototype,"handleValueChange",1),H=a([w("sd-input")],H);var Ft=class extends g{constructor(){super(...arguments);this.variant="main";this.state="default";this.animated=!1;this.notInteractive=!1;this.href="";this.label="";this.marker={cluster:`
|
|
140
140
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
|
|
141
141
|
<circle cx="25" cy="25" opacity="1" r="20" />
|
|
142
142
|
</svg>`,main:`
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
</svg> `,place:`
|
|
146
146
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75">
|
|
147
147
|
<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" />
|
|
148
|
-
</svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let t=this.isLink(),e=this.notInteractive?it`div`:t?it`a`:it`button`,r=tr(this.marker[this.variant]),o=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return U`<${e} part="base" class="${h("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${E(t?this.href:void 0)}" target="${E(t?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${E(this.notInteractive||t?void 0:"button")}" aria-label="${E(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${E(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${h("relative 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-transform duration-fast ease-in-out hover:scale-110",{cluster:"fill-primary",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${o};-webkit-mask-image:${o}"><div class="${h("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${h("min-w-full min-h-full skew-y-[-11deg]",{cluster:"bg-primary-500",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?U`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${r} ${this.variant==="cluster"?U`<div id="cluster-border" class="${h("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${h("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${e}>`}};Ft.styles=[...g.styles,x`:host{display:block}#motion-wrapper{mask-position:center;-webkit-mask-position:center;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:contain;-webkit-mask-size:contain}: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)}:host([variant=main]) #marker-circle{height:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));width:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1))}`],a([l({type:String,reflect:!0})],Ft.prototype,"variant",2),a([l({type:String,reflect:!0})],Ft.prototype,"state",2),a([l({type:Boolean,reflect:!0})],Ft.prototype,"animated",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],Ft.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],Ft.prototype,"href",2),a([l({type:String,reflect:!0})],Ft.prototype,"target",2),a([l({reflect:!0})],Ft.prototype,"label",2),Ft=a([w("sd-map-marker")],Ft);var Ee=class extends g{constructor(){super(...arguments);this.localize=new A(this)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}handleClick(t){let e=["menuitem","menuitemcheckbox"],r=t.composedPath(),o=r.find(p=>{var m;return e.includes(((m=p==null?void 0:p.getAttribute)==null?void 0:m.call(p,"role"))||"")});if(!o||r.find(p=>{var m;return((m=p==null?void 0:p.getAttribute)==null?void 0:m.call(p,"role"))==="menu"})!==this)return;let c=o;c.type==="checkbox"&&(c.checked=!c.checked),this.emit("sd-select",{detail:{item:c}})}handleKeyDown(t){if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),r=this.getCurrentItem(),o=r?e.indexOf(r):0;if(e.length>0){t.preventDefault(),t.stopPropagation();let n=(d,c)=>{let p=d;for(let m of e)if(p=(p+c+e.length)%e.length,!e[p].disabled)return p;return d};if(t.key==="ArrowDown")o=n(o,1);else if(t.key==="ArrowUp")o=n(o,-1);else if(t.key==="Home")o=e.findIndex(d=>!d.disabled),o===-1&&(o=0);else if(t.key==="End"){o=e.length-1;for(let d=e.length-1;d>=0;d--)if(!e[d].disabled){o=d;break}}this.setCurrentItem(e[o]),e[o].focus()}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((e=t.getAttribute("role"))!=null?e:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!!this.isMenuItem(t))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(r=>{r.setAttribute("tabindex",r===t?"0":"-1")})}render(){return u`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};Ee.styles=[...g.styles,x`:host{border-radius:var(--sd-border-radius-md,.375rem);display:block;overflow:auto;overscroll-behavior:auto;padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-2,.5rem);position:relative;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75))!important;--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}::slotted(sd-divider){padding-bottom:var(--sd-spacing-3,.75rem);padding-top:var(--sd-spacing-3,.75rem)}`],a([v("slot")],Ee.prototype,"defaultSlot",2),Ee=a([w("sd-menu")],Ee);var qa=()=>new rs,rs=class{},is=new WeakMap,Ka=te(class extends ui{render(s){return j}update(s,[i]){var e;let t=i!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=i,this.ht=(e=s.options)==null?void 0:e.host,this.rt(this.ct=s.element)),j}rt(s){var i;if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=(i=this.ht)!=null?i:globalThis,e=is.get(t);e===void 0&&(e=new WeakMap,is.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){var s,i,t;return typeof this.G=="function"?(i=is.get((s=this.ht)!=null?s:globalThis))==null?void 0:i.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var xr=class{constructor(i,t){this.popupRef=qa();this.enableSubmenuTimer=-1;this.isConnected=!1;this.isPopupConnected=!1;this.skidding=0;this.submenuOpenDelay=100;this.handleMouseMove=i=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${i.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${i.clientY}px`)};this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()};this.handleKeyDown=i=>{switch(i.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":i.target!==this.host&&(i.preventDefault(),i.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(i);break;default:break}};this.handleClick=i=>{var t;i.target===this.host?(i.preventDefault(),i.stopPropagation()):i.target instanceof Element&&(i.target.tagName==="sd-menu-item"||(t=i.target.role)!=null&&t.startsWith("menuitem"))&&i.target.getAttribute("type")!=="checkbox"&&this.disableSubmenu()};this.handleFocusOut=i=>{i.relatedTarget&&i.relatedTarget instanceof Element&&this.host.contains(i.relatedTarget)||this.disableSubmenu()};this.handlePopupMouseover=i=>{i.stopPropagation()};this.handlePopupReposition=()=>{let i=this.host.renderRoot.querySelector("slot[name='submenu']"),t=i==null?void 0:i.assignedElements({flatten:!0}).filter(c=>c.localName==="sd-menu")[0],e=getComputedStyle(this.host).direction==="rtl";if(!t)return;let{left:r,top:o,width:n,height:d}=t.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${e?r+n:r}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${o}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${e?r+n:r}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${o+d}px`)};(this.host=i).addController(this),this.hasSlotController=t}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(i){let t=this.host.renderRoot.querySelector("slot[name='submenu']");if(!t){console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);return}let e=null;for(let r of t.assignedElements())if(e=r.querySelectorAll("sd-menu-item, [role^='menuitem']"),e.length!==0)break;if(!(!e||e.length===0)){e[0].setAttribute("tabindex","0");for(let r=1;r!==e.length;++r)e[r].setAttribute("tabindex","-1");this.popupRef.value&&(i.preventDefault(),i.stopPropagation(),this.popupRef.value.active?e[0]instanceof HTMLElement&&e[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then(()=>{e[0]instanceof HTMLElement&&e[0].focus()}),this.host.requestUpdate()))}}setSubmenuState(i){this.popupRef.value&&this.popupRef.value.active!==i&&(this.popupRef.value.active=i,this.host.requestUpdate())}enableSubmenu(i=!0){i?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout(()=>{this.setSubmenuState(!0)},this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var r;if(!((r=this.host.parentElement)!=null&&r.computedStyleMap))return;let i=this.host.parentElement.computedStyleMap(),e=["padding-top","border-top-width","margin-top"].reduce((o,n)=>{var m;let d=(m=i.get(n))!=null?m:new CSSUnitValue(0,"px"),p=(d instanceof CSSUnitValue?d:new CSSUnitValue(0,"px")).to("px");return o-p.value},0);this.skidding=e}isExpanded(){return this.popupRef.value?this.popupRef.value.active:!1}renderSubmenu(){let i=getComputedStyle(this.host).direction==="rtl";return this.isConnected?u`<sd-popup ${Ka(this.popupRef)} placement="${i?"left-start":"right-start"}" anchor="anchor" flip flip-fallback-strategy="best-fit" skidding="${this.skidding}" strategy="fixed" auto-size="vertical" auto-size-padding="10"><slot name="submenu"></slot></sd-popup>`:u`<slot name="submenu" hidden></slot>`}};var kt=class extends g{constructor(){super(...arguments);this.type="normal";this.checked=!1;this.disabled=!1;this.value="";this.chevron=!1;this.hasSlotController=new P(this,"submenu");this.submenuController=new xr(this,this.hasSlotController);this.handleHostClick=t=>{this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())};this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}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}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("tabindex",this.disabled?"-1":"0")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return Gs(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){let t=this.submenuController.isExpanded(),e={label:this.hasSlotController.test("[default]"),iconIndent:this.hasSlotController.test("icon-indent")};return u`<div id="anchor" part="base" class="${h("relative flex items-stretch whitespace-nowrap py-3 px-4 no-wrap",this.disabled?"outline-none cursor-not-allowed text-neutral-500 hover:bg-transparent":"cursor-pointer text-primary hover:bg-neutral-200",this.isSubmenu()&&t&&"submenu-expanded")}" .disabled="${this.disabled}" ?aria-haspopup="${this.isSubmenu()}" ?aria-expanded="${!!t}">${this.type==="checkbox"?u`<span part="checked-icon" class="${h("flex items-center justify-center grow-0 shrink-0 basis-auto",this.checked?"visible":"invisible")}"><sd-icon name="status-check" library="sd-status-assets" aria-hidden="true"></sd-icon></span>`:""} ${e.iconIndent?u`<slot name="icon-indent" part="icon-indent" class="flex items-center grow-0 shrink-0 basis-auto mr-2"></slot>`:""}<slot part="label" class="inline-flex grow shrink basis-auto text-ellipsis overflow-hidden" @slotchange="${this.handleDefaultSlotChange}"></slot>${this.chevron||this.isSubmenu()?u`<span part="submenu-icon" class="flex items-center justify-center grow-0 shrink-0 basis-auto ml-3"><sd-icon name="chevron-right" library="_internal" aria-hidden="true" class="h-6 w-6"></sd-icon></span>`:""} ${this.submenuController.renderSubmenu()}</div>`}};kt.styles=[...g.styles,x`:host{--submenu-offset:-6px;display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}::slotted(sd-icon){height:var(--sd-spacing-6,1.5rem);width:var(--sd-spacing-6,1.5rem)}[part=checked-icon]{margin-right:var(--sd-spacing-3,.75rem)}.submenu-expanded:after{bottom:var(--sd-spacing-0,0);left:var(--sd-spacing-0,0);position:fixed;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);z-index:calc(var(z-dropdown) - 1);--tw-content:"";clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0));content:var(--tw-content)}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:-2px;outline-style:solid;outline-width:2px}:host(:hover) [part=base]{outline:2px solid transparent;outline-offset:2px}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));margin-left:var(--submenu-offset)}::slotted(sd-menu){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important}`],a([v("slot:not([name])")],kt.prototype,"defaultSlot",2),a([v('part="base"')],kt.prototype,"menuItem",2),a([l()],kt.prototype,"type",2),a([l({type:Boolean,reflect:!0})],kt.prototype,"checked",2),a([l({type:Boolean,reflect:!0})],kt.prototype,"disabled",2),a([l()],kt.prototype,"value",2),a([l({type:Boolean,reflect:!0})],kt.prototype,"chevron",2),a([C("checked")],kt.prototype,"handleCheckedChange",1),a([C("disabled")],kt.prototype,"handleDisabledChange",1),a([C("type")],kt.prototype,"handleTypeChange",1),kt=a([w("sd-menu-item")],kt);var ct=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","description","children");this.localize=new A(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.separated&&!this.href&&this.hasSlotController.test("children")}get isIconOnly(){if(!this.defaultSlot)return!1;let t=this.defaultSlot.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>{var r;return e.nodeType===Node.TEXT_NODE?!((r=e.textContent)!=null&&r.trim()):e.nodeType===Node.ELEMENT_NODE?e.tagName.toLowerCase()==="sd-icon":!1})}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.separated&&!this.isLink?it`div`:this.isAccordion&&!this.isLink?it`summary`:this.isLink?it`a`:it`button`}focus(){var t;this.disabled||(t=this.button)==null||t.focus()}blur(){var t;(t=this.button)==null||t.blur()}render(){let t=this.tag,e=this.isLink,r=this.isButton,o=this.isAccordion,n=this.isIconOnly,d={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},c=this.vertical?"py-3":"py-2",p=U`<${t} part="base" class="${h("flex items-center cursor-pointer relative focus-visible:focus-outline group hover:bg-neutral-200 transition-colors duration-fast ease-in-out min-h-[48px]",{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",!o&&"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]",n?"justify-center aspect-square p-3":"px-4")}" aria-current="${E(this.current?"page":void 0)}" aria-disabled="${this.disabled}" aria-labelledby="content" aria-describedby="description" ?disabled="${E(r?this.disabled:void 0)}" href="${E(e?this.href:void 0)}" target="${E(e?this.target:void 0)}" download="${E(e?this.download:void 0)}" rel="${E(e&&this.target?"noreferrer noopener":void 0)}" tabindex="${this.disabled?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:r?this.handleClickButton:void 0}"><div part="current-indicator" class="${h("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><div class="inline-flex flex-col justify-center gap-1 w-full h-full"><span part="content-area" class="${h("relative inline-flex justify-between items-center",o?"grow":"w-full",d.description&&"pt-3",!d.description&&!this.separated&&c,this.calculatePaddingX)}">${this.divider&&this.vertical?U`<sd-divider part="divider" class="${h("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-divider>`:""} <span id="content" part="content-container" class="inline-flex items-center flex-auto"><slot part="content" class="inline-flex text-start"></slot></span>${this.chevron||d.children&&this.vertical&&!this.separated?U`<sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${h("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${d.description&&this.vertical?U`<slot id="description" name="description" part="description" class="${h("inline-block text-sm text-left font-normal text-black pb-3",o||this.separated?"grow":"w-full",this.calculatePaddingX)}"></slot>`:""}</div></${t}>`;return this.separated?U`<div part="details" id="navigation-item-details" class="relative flex flex-col"><div class="flex items-start">${p} ${d.children&&this.vertical?U`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset -mt-1" @click="${this.handleClickSummary}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${h("m-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon></button>`:""}</div>${this.open?U`<slot name="children"></slot>`:""}</div>`:o?U`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${p}<slot name="children"></slot></details>`:U`${p}`}};ct.styles=[...g.styles,x`: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}`],a([v('[part="base"]')],ct.prototype,"button",2),a([v("slot:not([name])")],ct.prototype,"defaultSlot",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"vertical",2),a([l({type:String,reflect:!0})],ct.prototype,"size",2),a([l({reflect:!0})],ct.prototype,"href",2),a([l({type:String,reflect:!0})],ct.prototype,"target",2),a([l({reflect:!0})],ct.prototype,"download",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"current",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"chevron",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"relaxed",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"divider",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"indented",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"open",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"separated",2),ct=a([w("sd-navigation-item")],ct);var kr={"top-right":null,"bottom-center":null},Gl=()=>{Object.entries(kr).forEach(([s])=>{let i=document.querySelector(`#sd-toast-stack--${s}`);if(i){i.setAttribute("role","region"),kr[s]=i;return}kr[s]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${s}`,className:`sd-toast-stack sd-toast-stack--${s}`})})};Gl();var yt=class extends g{constructor(){super(...arguments);this.localize=new A(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 kr[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.wrapper.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 Promise.all([W(this.base),W(this.wrapper)]),this.wrapper.hidden=!1;let t=q(this,"notification.show",{dir:this.localize.dir()}),e=q(this,`notification.wrapper.show${li(jr(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([K(this.base,ye(t.keyframes,this.base.scrollHeight),t.options),K(this.wrapper,e.keyframes,e.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([W(this.base),W(this.wrapper)]);let t=q(this,"notification.hide",{dir:this.localize.dir()}),e=q(this,`notification.wrapper.hide${li(jr(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([K(this.base,ye(t.keyframes,this.base.scrollHeight),t.options),K(this.wrapper,e.keyframes,e.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,J(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="${h("w-full flex items-stretch 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}"><div part="wrapper" class="${h("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${h("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="_internal" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${h("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="_internal" 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="${h("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></div>`}};yt.styles=[...g.styles,x`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],a([v('[part~="base"]')],yt.prototype,"base",2),a([v('[part~="wrapper"]')],yt.prototype,"wrapper",2),a([v('[part~="close-button"]')],yt.prototype,"close",2),a([l({type:String,reflect:!0})],yt.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"open",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"closable",2),a([l({type:Number,reflect:!0})],yt.prototype,"duration",2),a([l({type:Boolean,reflect:!0,attribute:"duration-indicator"})],yt.prototype,"durationIndicator",2),a([l({type:String,reflect:!0,attribute:"toast-stack"})],yt.prototype,"toastStack",2),a([C("open",{waitUntilFirstUpdate:!0})],yt.prototype,"handleOpenChange",1),a([C("duration")],yt.prototype,"handleDurationChange",1),yt=a([w("sd-notification")],yt);B("notification.show",{keyframes:[{opacity:0,height:0},{opacity:1,height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("notification.hide",{keyframes:[{opacity:1,height:"auto"},{opacity:0,height:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});B("notification.wrapper.showTopRight",{keyframes:[{bottom:"32px"},{bottom:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("notification.wrapper.hideTopRight",{keyframes:[{bottom:"0"},{bottom:"32px"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Qt=class extends g{constructor(){super(...arguments);this.localize=new A(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 U`<div role="${t?"presentation":"group"}" class="${h(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="${h(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>`}};Qt.styles=[...g.styles,x`:host{--display-divider:block}#divider{display:var(--display-divider)}`],a([v("slot:not([name])")],Qt.prototype,"defaultSlot",2),a([l({reflect:!0,type:Boolean})],Qt.prototype,"disabled",2),a([l({type:String,reflect:!0})],Qt.prototype,"label",2),a([C("disabled",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleDisabledChange",1),Qt=a([w("sd-optgroup")],Qt);var gt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(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="${h("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="${h("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="${h("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":"bg-white border-neutral-800")}">${this.selected?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" 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>`}};gt.styles=[...g.styles,x`:host{display:block;outline:2px solid transparent!important;outline-offset:2px!important;position:relative;width:100%}.focus-outline-offset{outline-offset:-2px}`],a([v('[part="base"]')],gt.prototype,"defaultSlot",2),a([L()],gt.prototype,"current",2),a([L()],gt.prototype,"selected",2),a([L()],gt.prototype,"hasHover",2),a([L()],gt.prototype,"isKeyboardFocus",2),a([l({type:String,reflect:!0})],gt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"checkbox",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"disabled",2),a([l({type:String,reflect:!0})],gt.prototype,"value",2),a([C("disabled")],gt.prototype,"handleDisabledChange",1),a([C("selected")],gt.prototype,"handleSelectedChange",1),a([C("value")],gt.prototype,"handleValueChange",1),gt=a([w("sd-option")],gt);var $e=class extends Tt{constructor(){super(...arguments);this.expandable=!1}render(){let t=this.expandable?it`details`:it`div`,e=this.expandable?it`summary`:it`div`;return U`<${t} part="base" class="sm:p-6"><${e} part="header" id="header" class="${h("text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",this.expandable&&"cursor-pointer select-none")}" role="${E(this.expandable?"button":void 0)}" aria-expanded="${E(this.expandable?this.open?"true":"false":void 0)}" aria-controls="${E(this.expandable?"content":void 0)}" tabindex="${this.expandable?"0":"-1"}" @click="${this.expandable?this.handleSummaryClick:null}" @keydown="${this.expandable?this.handleSummaryKeyDown:null}"><div part="icon" class="${h("flex flex-grow-0 flex-shrink-0 flex-auto items-center",!this.expandable&&"cursor-default")}"><slot name="icon"></slot></div><slot name="summary" part="summary" class="${h("flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",this.expandable?"text-primary":"text-black cursor-default")}">${this.summary}</slot><span part="summary-icon" class="${h("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-transform ease-in-out duration-medium text-xl sm:text-4xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}"><slot name="expand-icon" class="${h(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot><slot name="collapse-icon" class="${h(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot></span></${e}><div part="content" id="content" class="${h("overflow-hidden",!this.expandable&&"hidden")}"><slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot></div></${t}>`}};$e.styles=[...Tt.styles,x`:host{display:block}@media (min-width:640px){[part=summary-icon]{font-size:var(--sd-spacing-12,3rem)}}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],a([l({type:Boolean,reflect:!0})],$e.prototype,"expandable",2),$e=a([w("sd-quickfact")],$e);B("quickfact.show",{keyframes:[{height:"0"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});B("quickfact.hide",{keyframes:[{height:"auto"},{height:"0"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});var wt=class extends g{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return u`<span part="base" class="${h("sd-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${h("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${h("rounded-full inline-flex text-white bg-accent h-2.5 w-2.5 transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"bg-neutral-500":this.visuallyDisabled?"bg-white":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span></span><slot part="label" class="${h("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};wt.styles=[...g.styles,x`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],a([L()],wt.prototype,"checked",2),a([L()],wt.prototype,"hasFocus",2),a([l({type:String,reflect:!0})],wt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],wt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],wt.prototype,"visuallyDisabled",2),a([l()],wt.prototype,"value",2),a([l({type:Boolean,reflect:!0})],wt.prototype,"invalid",2),a([C("checked")],wt.prototype,"handleCheckedChange",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],wt.prototype,"handleDisabledChange",1),wt=a([w("sd-radio")],wt);var Mt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(t){if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){let t=this.hasSlotController.test("[default]"),e=this.hasSlotController.test("icon"),r=`${this.size}-${t?"label":"no-label"}`;return u`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${h("relative text-center rounded-full transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled&&!this.visuallyDisabled?"bg-primary text-white hover:bg-primary-500":!this.checked&&(this.disabled||this.visuallyDisabled)?"text-neutral-500 hover:cursor-not-allowed":this.checked&&(this.disabled||this.visuallyDisabled)?"bg-neutral-400 text-white hover:cursor-not-allowed ":"bg-transparent text-primary border-primary hover:text-primary-500 cursor-pointer",t&&{sm:"px-3",md:"px-4",lg:"px-5"}[this.size],this.hasFocus&&"focused-class",t&&"button--has-label",e&&"button--has-icon flex gap-2",r)}" aria-disabled="${this.disabled||this.visuallyDisabled}" type="button" value="${E(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${h(e&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!e}"></slot>${t?u`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};Mt.styles=[...g.styles,x`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{padding-left:var(--sd-spacing-5,1.25rem);padding-right:var(--sd-spacing-5,1.25rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{padding-left:var(--sd-spacing-4,1rem);padding-right:var(--sd-spacing-4,1rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{padding-left:var(--sd-spacing-3,.75rem);padding-right:var(--sd-spacing-3,.75rem)}:host([size=lg].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-3,.75rem)*-1)}:host([size=md].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-2,.5rem)*-1)}:host([size=sm].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-1,.25rem)*-1)}:host(.sd-button-group__button--hover){z-index:20}:host(.sd-button-group__button--focus),:host(.sd-button-group__button[checked]){z-index:10}`],a([v(".button")],Mt.prototype,"input",2),a([v(".hidden-input")],Mt.prototype,"hiddenInput",2),a([L()],Mt.prototype,"hasFocus",2),a([l({type:String,reflect:!0})],Mt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],Mt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],Mt.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],Mt.prototype,"checked",2),a([l()],Mt.prototype,"value",2),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],Mt.prototype,"handleDisabledChange",1),Mt=a([w("sd-radio-button")],Mt);var Te=class extends g{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(t){let e=Hi(t.target);e==null||e.classList.add("sd-button-group__button--focus")}handleBlur(t){let e=Hi(t.target);e==null||e.classList.remove("sd-button-group__button--focus")}handleMouseOver(t){let e=Hi(t.target);e==null||e.classList.add("sd-button-group__button--hover")}handleMouseOut(t){let e=Hi(t.target);e==null||e.classList.remove("sd-button-group__button--hover")}handleSlotChange(){let t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach(e=>{let r=t.indexOf(e),o=Hi(e);o!==null&&(o.classList.add("sd-button-group__button"),o.classList.toggle("sd-button-group__button--first",r===0),o.classList.toggle("sd-button-group__button--inner",r>0&&r<t.length-1),o.classList.toggle("sd-button-group__button--last",r===t.length-1),o.classList.toggle("sd-button-group__button--radio",o.tagName.toLowerCase()==="sd-radio-button"))})}render(){return u`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};Te.styles=[...g.styles,x`:host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],a([v("slot")],Te.prototype,"defaultSlot",2),a([L()],Te.prototype,"disableRole",2),a([l({type:String,reflect:!0})],Te.prototype,"label",2),Te=a([w("sd-button-group")],Te);function Hi(s){var t;let i="sd-button, sd-radio-button";return(t=s.closest(i))!=null?t:s.querySelector(i)}var et=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this);this.hasSlotController=new P(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.helpText="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?Qs:t?Zs:ni}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-radio, sd-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-radio, sd-radio-button"),r=this.getAllRadios(),o=this.value;e.disabled||(this.value=e.value,r.forEach(n=>n.checked=n===e),this.value!==o&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){var c;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(p=>!p.disabled),r=(c=e.find(p=>p.checked))!=null?c:e[0],o=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,n=this.value,d=e.indexOf(r)+o;d<0&&(d=e.length-1),d>e.length-1&&(d=0),this.getAllRadios().forEach(p=>{p.checked=!1,this.hasButtonGroup||(p.tabIndex=-1)}),this.value=e[d].value,e[d].checked=!0,this.hasButtonGroup?e[d].shadowRoot.querySelector("button").focus():(e[d].tabIndex=0,e[d].focus()),this.value!==n&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios(),r=t.find(o=>o.checked)||t[0];r&&r.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,r;let t=this.getAllRadios();if(await Promise.all(t.map(async o=>{await o.updateComplete,o.checked=o.value===this.value,o.size=this.size,o instanceof wt&&(o.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(o=>o.tagName.toLowerCase()==="sd-radio-button"),!t.some(o=>o.checked))if(this.hasButtonGroup){let o=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");o&&(o.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let o=(r=this.shadowRoot)==null?void 0:r.querySelector("sd-button-group");o&&(o.disableRole=!0)}}syncRadios(){if(customElements.get("sd-radio")&&customElements.get("sd-radio-button")){this.syncRadioElements();return}customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then(()=>this.syncRadios()),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,r=this.hasSlotController.test("help-text"),o=this.helpText?!0:!!r,n=this.hasSlotController.test("tooltip"),d=u`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return u`<fieldset part="form-control" class="${h("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message" aria-labelledby="label">${e||n?u`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${h("p-0 leading-normal text-black text-left",e?"inline-block":"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend>${n?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${h("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?u`<sd-button-group class="border border-primary rounded-full" part="button-group" exportparts="base:button-group__base" role="presentation">${d}</sd-button-group>`:d}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>${this.formControlController.renderInvalidMessage()}`}};et.styles=[...g.styles,x`:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}:host:has(sd-button-group){display:inline-flex}`],a([v("slot:not([name])")],et.prototype,"defaultSlot",2),a([v("#validation-input")],et.prototype,"validationInput",2),a([v("#invalid-message")],et.prototype,"invalidMessage",2),a([L()],et.prototype,"hasButtonGroup",2),a([L()],et.prototype,"defaultValue",2),a([L()],et.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],et.prototype,"size",2),a([l({type:Boolean,reflect:!0})],et.prototype,"required",2),a([l({type:String,reflect:!0})],et.prototype,"orientation",2),a([l({type:String,reflect:!0})],et.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],et.prototype,"helpText",2),a([l({type:Boolean,reflect:!0})],et.prototype,"boldLabel",2),a([l({type:String,reflect:!0})],et.prototype,"name",2),a([l()],et.prototype,"value",2),a([l({type:String,reflect:!0})],et.prototype,"form",2),a([C("size",{waitUntilFirstUpdate:!0})],et.prototype,"handleSizeChange",1),a([C("showInvalidStyle",{waitUntilFirstUpdate:!0})],et.prototype,"handleInvalidChange",1),a([C("value")],et.prototype,"handleValueChange",1),et=a([w("sd-radio-group")],et);var Pe=(s,i)=>s-i,mi=(s,i)=>{if(s.length!==i.length)return!0;let t=s.slice().sort(Pe),e=i.slice().sort(Pe);for(let r=0;r<t.length;r+=1)if(t[r]!==e[r])return!0;return!1},ss=(s,i)=>{let t=s.getBoundingClientRect(),e=t.width;if(e<=0)return 0;let r=i;return r-=t.left,r<=0?0:r>=e?1:(r/=e,r)};var rt=class extends g{constructor(){super();this.formControlController=new pt(this);this.hasSlotController=new P(this,"label","help-text");this.localize=new A(this);this.name="";this.label="";this.helpText="";this.min=0;this.max=100;this.step=1;this.disabled=!1;this.visuallyDisabled=!1;this.noTrackBar=!1;this.noTooltip=!1;this.defaultValue="";this._value=[0];this._rangeValues=new Map;this._lastChangeValue=[];this._hasFocus=!1;this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(t){this._value=t?t.split(" ").map(Number).sort(Pe):[]}get value(){return this._value.slice().sort(Pe).join(" ")}set valueAsArray(t){let e=this._value;this._value=Array.isArray(t)?t.slice().sort(Pe):t||[],mi(e,this._value)&&this.requestUpdate("value",e.join(" "))}get valueAsArray(){return[...this._value].sort(Pe)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value)}willUpdate(t){super.willUpdate(t),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let e=this._value.map(r=>{if(r<=this.min)return this.min;if(r>=this.max)return this.max;let o=this.min+this.step*Math.round((r-this.min)/this.step);return o>this.max?this.max:o});mi(this._value,e)&&(this._value=e)}updated(t){super.updated(t);for(let e of this.thumbs){let r=+e.dataset.rangeId;this._rangeValues.has(r)&&this.moveThumb(e,this._rangeValues.get(r))}this.updateActiveTrack()}focus(t){let e=this.thumbs.item(0);e?e.focus(t):super.focus(t)}get validity(){return this.input.validity}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()}updateTooltip(t){let e=+t.dataset.rangeId;if(!this._rangeValues.has(e))return;let r=this._rangeValues.get(e),o=t.parentElement;o.content=this.tooltipFormatter(r)}updateActiveTrack(){let{activeTrack:t}=this;if(!t)return;if(this.min===this.max){t.style.insetInlineStart="0%",t.style.insetInlineEnd="0%";return}if(this._value.length===1){let n=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",d=100*(this._value[0]-this.min)/(this.max-this.min);t.style.insetInlineStart=`min(${n}, ${d}%)`,t.style.insetInlineEnd=`min(calc(100% - ${n}), calc(100% - ${d}%))`;return}let e=this._value.slice().sort(Pe),r=100*(e[0]-this.min)/(this.max-this.min),o=100*(e[e.length-1]-this.min)/(this.max-this.min);t.style.insetInlineStart=`${r}%`,t.style.insetInlineEnd=`calc(100% - ${o}%)`}moveThumb(t,e){t.setAttribute("aria-valuenow",e.toString()),t.setAttribute("aria-valuetext",this.tooltipFormatter(e));let r=(e-this.min)/(this.max-this.min);t.style.insetInlineStart=`calc(${100*r}% - 8px)`,this.updateTooltip(t)}movementBoundariesForThumb(t,e){let r=this.valueAsArray,n=Array.from(this.thumbs).indexOf(t),d=r[n-1]||this.min,c=r[n+1]||this.max,p=e<d||e>c;return{finalValue:Math.max(d,Math.min(c,e)),isRestricted:p,nextValue:c,prevValue:d}}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}onClickTrack(t,e=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:r}=t,o=Array.from(this.thumbs),n=ss(this.inputWrapper,r),d=this.step/(this.max-this.min),c=this.min+this.step*Math.round(n/d),p=o.reduce((b,k)=>{let T=this._rangeValues.get(+k.dataset.rangeId),M=this._rangeValues.get(+b.dataset.rangeId),S=Math.abs(T-c),O=Math.abs(M-c);return S===O?T<c?k:b:S<O?k:b}),m=+p.dataset.rangeId;if(!m)return;this._rangeValues.set(m,c),this.moveThumb(p,c);let f=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),mi(f,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let y=new PointerEvent("pointerdown",t);e&&p.dispatchEvent(y)&&this.updateTooltip(p)}onClickTrackItem(t){this.onClickTrack(t,!1)}async onClickThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target;this.updateTooltip(e),e.dataset.pointerId&&e.releasePointerCapture(+e.dataset.pointerId),e.dataset.pointerId=t.pointerId.toString(),e.setPointerCapture(t.pointerId),e.classList.add("grabbed"),await e.parentElement.show()}onDragThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target,r=+e.dataset.rangeId;if(!this._rangeValues.has(r)||(e.dataset.pointerId?+e.dataset.pointerId:null)!==t.pointerId)return;let n=ss(this.inputWrapper,t.clientX),d=this.step/(this.max-this.min),c=this.min+this.step*Math.round(n/d);if(this.emit("sd-move",{cancelable:!0,detail:{element:e,value:c}}).defaultPrevented)return;let m=this.movementBoundariesForThumb(e,c);m.isRestricted?(c=m.finalValue,e.style.zIndex=(3+this.thumbs.length).toFixed(0)):e.style.zIndex="3",this._rangeValues.set(r,c),this.moveThumb(e,c);let f=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),mi(f,this._value)&&this.emit("sd-input")}async onReleaseThumb(t){let e=t.target;!e.dataset.pointerId||t.pointerId!==+e.dataset.pointerId||(e.classList.remove("grabbed"),e.releasePointerCapture(t.pointerId),delete e.dataset.pointerId,mi(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),await e.parentElement.hide())}onKeyPress(t){let e=t.target,r=+e.dataset.rangeId,o=this._rangeValues.get(r);if(o===void 0)return;let n=o;switch(t.key){case"ArrowUp":case"Up":n=Math.min(o+this.step,this.max);break;case"ArrowDown":case"Down":n=Math.max(o-this.step,this.min);break;case"ArrowLeft":case"Left":n=this.rtl?Math.min(o+this.step,this.max):Math.max(o-this.step,this.min);break;case"ArrowRight":case"Right":n=this.rtl?Math.max(o-this.step,this.min):Math.min(o+this.step,this.max);break;case"PageUp":n=Math.min(o+(this.max-this.min)/5,this.max);break;case"PageDown":n=Math.max(o-(this.max-this.min)/5,this.min);break;case"Home":n=this.min;break;case"End":n=this.max;break;default:return}if(n!==o){if(this.emit("sd-move",{cancelable:!0,detail:{element:e,value:n}}).defaultPrevented)return;let c=this.movementBoundariesForThumb(e,n);c.isRestricted&&(n=c.finalValue),this.moveThumb(e,n),this._rangeValues.set(r,n),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(e),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}t.preventDefault()}onBlur(t){var e;t.relatedTarget&&((e=this.shadowRoot)!=null&&e.contains(t.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(t){var r;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let e=t.target;(r=e==null?void 0:e.dataset)!=null&&r.rangeId&&this.updateTooltip(e)}renderThumbs(t){let e=this._value.length>1;return this._rangeValues.clear(),this._value.map((r,o)=>{let n=o+1;this._rangeValues.set(n,r);let d=`thumb-${n}`,c="",p="";return e?(p=t?`label aria-label-hidden ${d}`:`aria-label-hidden ${d}`,o===0?c=`${this.localize.term("minimum")} (${this.tooltipFormatter(r)})`:o===this._value.length-1?c=`${this.localize.term("maximum")} (${this.tooltipFormatter(r)})`:c=this.tooltipFormatter(r)):p=t?"label aria-label-hidden":"",u`<sd-tooltip hoist trigger="focus" disabled="${E(this.disabled||this.visuallyDisabled||this.noTooltip?!0:void 0)}"><div id="${d}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${E(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${p}" aria-label="${c}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${r}" aria-valuetext="${this.tooltipFormatter(r)}" data-range-id="${n}" @pointerdown="${this.onClickThumb}" @pointermove="${this.onDragThumb}" @pointerup="${this.onReleaseThumb}" @pointercancel="${this.onReleaseThumb}" @pointerleave="${this.onReleaseThumb}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${h("rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",this.disabled||this.visuallyDisabled?"bg-neutral-500 outline-none":"bg-primary hover:bg-primary-500 cursor-pointer focus-visible:focus-outline")}"></div></sd-tooltip>`})}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},e=!!(this.label||t.label),r=!!(this.helpText||t.helpText);return u`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${e?u`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${e?"false":"true"}" class="${h("w-full",e?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${h("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${E(this.visuallyDisabled?"0":void 0)}"><div part="input-wrapper" class="relative flex-1 mx-2 mb-[10px]"><input id="input" tabindex="-1" hidden @invalid="${this.handleInvalid}"><div part="track-wrapper" role="presentation" @pointerdown="${this.onClickTrack}" class="relative cursor-pointer -mx-2"><div part="track-click-helper" class="absolute -inset-y-2 inset-x-0"></div><div part="track" class="${h("h-1 my-[6px]",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-neutral-400")}"></div><div part="active-track" hidden="${E(this.noTrackBar?!0:void 0)}" class="${h("absolute top-0 h-1",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-primary")}"></div></div>${this.renderThumbs(e)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>`}};rt.styles=[...g.styles,x`[part=base]{touch-action:none;-webkit-touch-callout:none}[part=thumb].grabbed{--tw-bg-opacity:1!important;background-color:rgb(var(--sd-color-primary-800,5 21 48)/var(--tw-bg-opacity,1))!important}`],a([v("#input")],rt.prototype,"input",2),a([v('[part="active-track"]')],rt.prototype,"activeTrack",2),a([v('[part="input-wrapper"]')],rt.prototype,"inputWrapper",2),a([Gi('[part="thumb"]')],rt.prototype,"thumbs",2),a([l({attribute:!1})],rt.prototype,"tooltipFormatter",2),a([l({type:String,reflect:!0})],rt.prototype,"name",2),a([l({type:String,reflect:!0})],rt.prototype,"label",2),a([l({attribute:"help-text",reflect:!0})],rt.prototype,"helpText",2),a([l({type:Number,reflect:!0})],rt.prototype,"min",2),a([l({type:Number,reflect:!0})],rt.prototype,"max",2),a([l({type:Number,reflect:!0})],rt.prototype,"step",2),a([l({type:Boolean,reflect:!0})],rt.prototype,"disabled",2),a([l({attribute:"visually-disabled",type:Boolean,reflect:!0})],rt.prototype,"visuallyDisabled",2),a([l({attribute:"no-track-bar",type:Boolean,reflect:!0})],rt.prototype,"noTrackBar",2),a([l({attribute:"no-tooltip",type:Boolean,reflect:!0})],rt.prototype,"noTooltip",2),a([Bt()],rt.prototype,"defaultValue",2),a([l({type:String})],rt.prototype,"value",1),rt=a([w("sd-range")],rt);var Le=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.subtick=!1}render(){return u`<div part="base" class="${h(this.subtick?"w-0.25":"w-0.5")}"><div part="line" class="${h("bg-neutral-500",this.subtick?"h-2":"h-[10px]")}"></div><div part="label" class="flex items-center justify-center text-center text-nowrap text-sm"><slot></slot></div></div>`}};Le.styles=g.styles,a([l({type:Boolean,reflect:!0})],Le.prototype,"subtick",2),Le=a([w("sd-range-tick")],Le);var ht=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.handleContainerScroll()}),this.updateComplete.then(()=>{this.container&&this.resizeObserver.observe(this.container)})}disconnectedCallback(){super.disconnectedCallback(),this.container&&this.resizeObserver.unobserve(this.container)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.handleContainerScroll())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get scrollButtons(){return{left:this.leftButton,right:this.rightButton,up:this.upButton,down:this.downButton}}handleContainerScroll(){if(!this.container)return;let t=this.container.scrollLeft>0,e=this.container.scrollLeft+this.container.clientWidth<this.container.scrollWidth-1,r=this.container.scrollTop>0,o=this.container.scrollTop+this.container.clientHeight<this.container.scrollHeight-1,n=this.canScroll,d={left:this.isScrollHorizontalEnabled&&t,right:this.isScrollHorizontalEnabled&&e,up:this.isScrollVerticalEnabled&&r,down:this.isScrollVerticalEnabled&&o},c=n.left&&!d.left,p=n.up&&!d.up,m=n.right&&!d.right,f=n.down&&!d.down;(c||p)&&this.dispatchEvent(new CustomEvent("start")),(m||f)&&this.dispatchEvent(new CustomEvent("end")),this.canScroll=d}handleScroll(t,e){var O,I,F;let r=["left","up"].includes(t)?-this.step:this.step,o=["left","right"].includes(t)?"horizontal":"vertical",n=["left","up"].includes(t)?"start":"end",d=!["mouse","touch"].includes((O=e==null?void 0:e.pointerType)!=null?O:""),c=o==="horizontal"?"left":"top";(I=this.container)==null||I.scrollBy({behavior:"smooth",[c]:r});let p=`button-${t}`;this.dispatchEvent(new CustomEvent(p,{bubbles:!0,composed:!0}));let f=(o==="horizontal"?this.container.scrollLeft:this.container.scrollTop)+r,y=o==="horizontal"?this.container.scrollWidth-this.container.clientWidth:this.container.scrollHeight-this.container.clientHeight,b=n==="start"&&f<=0,k=n==="end"&&f>=y-1;if(!(b||k)){let D=this.localize.term("scrolled");this.announcementContainer.textContent=this.announcementContainer.textContent===D?`${D}\u200B`:D;return}let T=this.scrollButtons[t],M={left:this.rightButton,right:this.leftButton,up:this.downButton,down:this.upButton}[t],S=b?`${this.localize.term("scrolled")}. ${this.localize.term("scrollToEnd")}`:`${this.localize.term("scrolled")}. ${this.localize.term("scrollToStart")}`;(F=M==null?void 0:M.querySelector("sd-icon"))==null||F.setAttribute("label",S),d?M==null||M.focus():T==null||T.blur()}handleButtonBlur(t,e){var d;let o=(["left","up"].includes(t)?"start":"end")==="start"?this.localize.term("scrollToStart"):this.localize.term("scrollToEnd");(d=e.target.querySelector("sd-icon"))==null||d.setAttribute("label",o)}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",e="scroll-shadow absolute z-10 pointer-events-none transition-opacity duration-medium ease-in-out";return u`<div part="base" class="${h("scroll-container flex overflow-hidden flex-1",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset&&"p-4",{horizontal:"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",vertical:"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",auto:"scroll-auto overflow-auto"}[this.orientation])}" @scroll="${this.handleContainerScroll}" tabindex="0"><div id="announcement-container" role="status" class="sr-only"></div><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?u`${this.isScrollHorizontalEnabled?u`<div part="button-left" class="${h("absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.left&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${h(t)}" aria-hidden="${E(!this.canScroll.left||void 0)}" tabindex="${E(this.canScroll.left?void 0:-1)}" @click="${r=>this.handleScroll("left",r)}" @blur="${r=>this.handleButtonBlur("left",r)}"><slot name="icon-start"><sd-icon library="_internal" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-icon></slot></button></div><div part="button-right" class="${h("absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.right&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${h(t)}" aria-hidden="${E(!this.canScroll.right||void 0)}" tabindex="${E(this.canScroll.right?void 0:-1)}" @click="${r=>this.handleScroll("right",r)}" @blur="${r=>this.handleButtonBlur("right",r)}"><slot name="icon-end"><sd-icon library="_internal" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-icon></slot></button></div>`:null} ${this.isScrollVerticalEnabled?u`<div part="button-top" class="${h("absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.up&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${h(t)}" aria-hidden="${E(!this.canScroll.up||void 0)}" tabindex="${E(this.canScroll.up?void 0:-1)}" @click="${r=>this.handleScroll("up",r)}" @blur="${r=>this.handleButtonBlur("up",r)}"><slot name="icon-start"><sd-icon library="_internal" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-icon></slot></button></div><div part="button-bottom" class="${h("absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.down&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${h(t)}" aria-hidden="${E(!this.canScroll.down||void 0)}" tabindex="${E(this.canScroll.down?void 0:-1)}" @click="${r=>this.handleScroll("down",r)}" @blur="${r=>this.handleButtonBlur("down",r)}"><slot name="icon-end"><sd-icon library="_internal" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-icon></slot></button></div>`:null}`:null} ${this.shadows?u`${this.isScrollHorizontalEnabled?u`<div part="shadow-left" class="${h("left top-0 left-0 w-[6px] h-full",e,this.canScroll.left?"opacity-100":"opacity-0")}"></div><div part="shadow-right" class="${h("right top-0 right-0 w-[6px] h-full",e,this.canScroll.right?"opacity-100":"opacity-0")}"></div>`:null} ${this.isScrollVerticalEnabled?u`<div part="shadow-top" class="${h("top top-0 left-0 w-full h-[6px]",e,this.canScroll.up?"opacity-100":"opacity-0")}"></div><div part="shadow-bottom" class="${h("bottom bottom-0 left-0 w-full h-[6px]",e,this.canScroll.down?"opacity-100":"opacity-0")}"></div>`:null}`:null}`}};ht.styles=[...g.styles,x`:host{--gradient-color:hsla(0,0%,100%,0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;display:flex;overflow:hidden;position:relative}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-right]{background:linear-gradient(90deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-top]{background:linear-gradient(0deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-bottom]{background:linear-gradient(180deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}.sd-icon--top{align-self:flex-start}.sd-icon--down{align-self:flex-end}`],a([v('[part="button-right"] button')],ht.prototype,"rightButton",2),a([v('[part="button-left"] button')],ht.prototype,"leftButton",2),a([v('[part="button-bottom"] button')],ht.prototype,"downButton",2),a([v('[part="button-top"] button')],ht.prototype,"upButton",2),a([v(".scroll-container")],ht.prototype,"container",2),a([v("#announcement-container")],ht.prototype,"announcementContainer",2),a([l({type:String,reflect:!0})],ht.prototype,"orientation",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"scrollbars",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"buttons",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"shadows",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"inset",2),a([l({type:Number,reflect:!0})],ht.prototype,"step",2),a([L()],ht.prototype,"canScroll",2),a([L()],ht.prototype,"isScrollHorizontalEnabled",2),a([L()],ht.prototype,"isScrollVerticalEnabled",2),ht=a([w("sd-scrollable")],ht);var V=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new P(this,"help-text","label");this.localize=new A(this);this.typeToSelectString="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=t=>u`<sd-tag class="relative z-10" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
148
|
+
</svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let t=this.isLink(),e=this.notInteractive?it`div`:t?it`a`:it`button`,r=tr(this.marker[this.variant]),o=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return U`<${e} part="base" class="${h("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${E(t?this.href:void 0)}" target="${E(t?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${E(this.notInteractive||t?void 0:"button")}" aria-label="${E(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${E(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${h("relative 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-transform duration-fast ease-in-out hover:scale-110",{cluster:"fill-primary",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${o};-webkit-mask-image:${o}"><div class="${h("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${h("min-w-full min-h-full skew-y-[-11deg]",{cluster:"bg-primary-500",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?U`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${r} ${this.variant==="cluster"?U`<div id="cluster-border" class="${h("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${h("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${e}>`}};Ft.styles=[...g.styles,x`:host{display:block}#motion-wrapper{mask-position:center;-webkit-mask-position:center;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:contain;-webkit-mask-size:contain}: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)}:host([variant=main]) #marker-circle{height:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));width:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1))}`],a([l({type:String,reflect:!0})],Ft.prototype,"variant",2),a([l({type:String,reflect:!0})],Ft.prototype,"state",2),a([l({type:Boolean,reflect:!0})],Ft.prototype,"animated",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],Ft.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],Ft.prototype,"href",2),a([l({type:String,reflect:!0})],Ft.prototype,"target",2),a([l({reflect:!0})],Ft.prototype,"label",2),Ft=a([w("sd-map-marker")],Ft);var Ee=class extends g{constructor(){super(...arguments);this.localize=new A(this)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}handleClick(t){let e=["menuitem","menuitemcheckbox"],r=t.composedPath(),o=r.find(p=>{var m;return e.includes(((m=p==null?void 0:p.getAttribute)==null?void 0:m.call(p,"role"))||"")});if(!o||r.find(p=>{var m;return((m=p==null?void 0:p.getAttribute)==null?void 0:m.call(p,"role"))==="menu"})!==this)return;let c=o;c.type==="checkbox"&&(c.checked=!c.checked),this.emit("sd-select",{detail:{item:c}})}handleKeyDown(t){if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),r=this.getCurrentItem(),o=r?e.indexOf(r):0;if(e.length>0){t.preventDefault(),t.stopPropagation();let n=(d,c)=>{let p=d;for(let m of e)if(p=(p+c+e.length)%e.length,!e[p].disabled)return p;return d};if(t.key==="ArrowDown")o=n(o,1);else if(t.key==="ArrowUp")o=n(o,-1);else if(t.key==="Home")o=e.findIndex(d=>!d.disabled),o===-1&&(o=0);else if(t.key==="End"){o=e.length-1;for(let d=e.length-1;d>=0;d--)if(!e[d].disabled){o=d;break}}this.setCurrentItem(e[o]),e[o].focus()}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((e=t.getAttribute("role"))!=null?e:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!!this.isMenuItem(t))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(r=>{r.setAttribute("tabindex",r===t?"0":"-1")})}render(){return u`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};Ee.styles=[...g.styles,x`:host{border-radius:var(--sd-border-radius-md,.375rem);display:block;overflow:auto;overscroll-behavior:auto;padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-2,.5rem);position:relative;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75))!important;--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}::slotted(sd-divider){padding-bottom:var(--sd-spacing-3,.75rem);padding-top:var(--sd-spacing-3,.75rem)}`],a([v("slot")],Ee.prototype,"defaultSlot",2),Ee=a([w("sd-menu")],Ee);var qa=()=>new rs,rs=class{},is=new WeakMap,Ka=te(class extends ui{render(s){return j}update(s,[i]){var e;let t=i!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=i,this.ht=(e=s.options)==null?void 0:e.host,this.rt(this.ct=s.element)),j}rt(s){var i;if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=(i=this.ht)!=null?i:globalThis,e=is.get(t);e===void 0&&(e=new WeakMap,is.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){var s,i,t;return typeof this.G=="function"?(i=is.get((s=this.ht)!=null?s:globalThis))==null?void 0:i.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var xr=class{constructor(i,t){this.popupRef=qa();this.enableSubmenuTimer=-1;this.isConnected=!1;this.isPopupConnected=!1;this.skidding=0;this.submenuOpenDelay=100;this.handleMouseMove=i=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${i.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${i.clientY}px`)};this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()};this.handleKeyDown=i=>{switch(i.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":i.target!==this.host&&(i.preventDefault(),i.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(i);break;default:break}};this.handleClick=i=>{var t;i.target===this.host?(i.preventDefault(),i.stopPropagation()):i.target instanceof Element&&(i.target.tagName==="sd-menu-item"||(t=i.target.role)!=null&&t.startsWith("menuitem"))&&i.target.getAttribute("type")!=="checkbox"&&this.disableSubmenu()};this.handleFocusOut=i=>{i.relatedTarget&&i.relatedTarget instanceof Element&&this.host.contains(i.relatedTarget)||this.disableSubmenu()};this.handlePopupMouseover=i=>{i.stopPropagation()};this.handlePopupReposition=()=>{let i=this.host.renderRoot.querySelector("slot[name='submenu']"),t=i==null?void 0:i.assignedElements({flatten:!0}).filter(c=>c.localName==="sd-menu")[0],e=getComputedStyle(this.host).direction==="rtl";if(!t)return;let{left:r,top:o,width:n,height:d}=t.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${e?r+n:r}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${o}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${e?r+n:r}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${o+d}px`)};(this.host=i).addController(this),this.hasSlotController=t}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(i){let t=this.host.renderRoot.querySelector("slot[name='submenu']");if(!t){console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);return}let e=null;for(let r of t.assignedElements())if(e=r.querySelectorAll("sd-menu-item, [role^='menuitem']"),e.length!==0)break;if(!(!e||e.length===0)){e[0].setAttribute("tabindex","0");for(let r=1;r!==e.length;++r)e[r].setAttribute("tabindex","-1");this.popupRef.value&&(i.preventDefault(),i.stopPropagation(),this.popupRef.value.active?e[0]instanceof HTMLElement&&e[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then(()=>{e[0]instanceof HTMLElement&&e[0].focus()}),this.host.requestUpdate()))}}setSubmenuState(i){this.popupRef.value&&this.popupRef.value.active!==i&&(this.popupRef.value.active=i,this.host.requestUpdate())}enableSubmenu(i=!0){i?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout(()=>{this.setSubmenuState(!0)},this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var r;if(!((r=this.host.parentElement)!=null&&r.computedStyleMap))return;let i=this.host.parentElement.computedStyleMap(),e=["padding-top","border-top-width","margin-top"].reduce((o,n)=>{var m;let d=(m=i.get(n))!=null?m:new CSSUnitValue(0,"px"),p=(d instanceof CSSUnitValue?d:new CSSUnitValue(0,"px")).to("px");return o-p.value},0);this.skidding=e}isExpanded(){return this.popupRef.value?this.popupRef.value.active:!1}renderSubmenu(){let i=getComputedStyle(this.host).direction==="rtl";return this.isConnected?u`<sd-popup ${Ka(this.popupRef)} placement="${i?"left-start":"right-start"}" anchor="anchor" flip flip-fallback-strategy="best-fit" skidding="${this.skidding}" strategy="fixed" auto-size="vertical" auto-size-padding="10"><slot name="submenu"></slot></sd-popup>`:u`<slot name="submenu" hidden></slot>`}};var kt=class extends g{constructor(){super(...arguments);this.type="normal";this.checked=!1;this.disabled=!1;this.value="";this.chevron=!1;this.hasSlotController=new P(this,"submenu");this.submenuController=new xr(this,this.hasSlotController);this.handleHostClick=t=>{this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())};this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}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}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("tabindex",this.disabled?"-1":"0")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return Gs(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){let t=this.submenuController.isExpanded(),e={label:this.hasSlotController.test("[default]"),iconIndent:this.hasSlotController.test("icon-indent")};return u`<div id="anchor" part="base" class="${h("relative flex items-stretch whitespace-nowrap py-3 px-4 no-wrap",this.disabled?"outline-none cursor-not-allowed text-neutral-500 hover:bg-transparent":"cursor-pointer text-primary hover:bg-neutral-200",this.isSubmenu()&&t&&"submenu-expanded")}" .disabled="${this.disabled}" ?aria-haspopup="${this.isSubmenu()}" ?aria-expanded="${!!t}">${this.type==="checkbox"?u`<span part="checked-icon" class="${h("flex items-center justify-center grow-0 shrink-0 basis-auto",this.checked?"visible":"invisible")}"><sd-icon name="status-check" library="sd-status-assets" aria-hidden="true"></sd-icon></span>`:""} ${e.iconIndent?u`<slot name="icon-indent" part="icon-indent" class="flex items-center grow-0 shrink-0 basis-auto mr-2"></slot>`:""}<slot part="label" class="inline-flex grow shrink basis-auto text-ellipsis overflow-hidden" @slotchange="${this.handleDefaultSlotChange}"></slot>${this.chevron||this.isSubmenu()?u`<span part="submenu-icon" class="flex items-center justify-center grow-0 shrink-0 basis-auto ml-3"><sd-icon name="chevron-right" library="_internal" aria-hidden="true" class="h-6 w-6"></sd-icon></span>`:""} ${this.submenuController.renderSubmenu()}</div>`}};kt.styles=[...g.styles,x`:host{--submenu-offset:-6px;display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}::slotted(sd-icon){height:var(--sd-spacing-6,1.5rem);width:var(--sd-spacing-6,1.5rem)}[part=checked-icon]{margin-right:var(--sd-spacing-3,.75rem)}.submenu-expanded:after{bottom:var(--sd-spacing-0,0);left:var(--sd-spacing-0,0);position:fixed;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);z-index:calc(var(z-dropdown) - 1);--tw-content:"";clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0));content:var(--tw-content)}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:-2px;outline-style:solid;outline-width:2px}:host(:hover) [part=base]{outline:2px solid transparent;outline-offset:2px}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));margin-left:var(--submenu-offset)}::slotted(sd-menu){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important}`],a([v("slot:not([name])")],kt.prototype,"defaultSlot",2),a([v('part="base"')],kt.prototype,"menuItem",2),a([l()],kt.prototype,"type",2),a([l({type:Boolean,reflect:!0})],kt.prototype,"checked",2),a([l({type:Boolean,reflect:!0})],kt.prototype,"disabled",2),a([l()],kt.prototype,"value",2),a([l({type:Boolean,reflect:!0})],kt.prototype,"chevron",2),a([C("checked")],kt.prototype,"handleCheckedChange",1),a([C("disabled")],kt.prototype,"handleDisabledChange",1),a([C("type")],kt.prototype,"handleTypeChange",1),kt=a([w("sd-menu-item")],kt);var ct=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","description","children");this.localize=new A(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.separated&&!this.href&&this.hasSlotController.test("children")}get isIconOnly(){if(!this.defaultSlot)return!1;let t=this.defaultSlot.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>{var r;return e.nodeType===Node.TEXT_NODE?!((r=e.textContent)!=null&&r.trim()):e.nodeType===Node.ELEMENT_NODE?e.tagName.toLowerCase()==="sd-icon":!1})}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.separated&&!this.isLink?it`div`:this.isAccordion&&!this.isLink?it`summary`:this.isLink?it`a`:it`button`}focus(){var t;this.disabled||(t=this.button)==null||t.focus()}blur(){var t;(t=this.button)==null||t.blur()}render(){let t=this.tag,e=this.isLink,r=this.isButton,o=this.isAccordion,n=this.isIconOnly,d={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},c=this.vertical?"py-3":"py-2",p=U`<${t} part="base" class="${h("flex items-center cursor-pointer relative focus-visible:focus-outline group hover:bg-neutral-200 transition-colors duration-fast ease-in-out min-h-[48px]",{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",!o&&"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]",n?"justify-center aspect-square p-3":"px-4")}" aria-current="${E(this.current?"page":void 0)}" aria-disabled="${this.disabled}" aria-labelledby="content" aria-describedby="description" ?disabled="${E(r?this.disabled:void 0)}" href="${E(e?this.href:void 0)}" target="${E(e?this.target:void 0)}" download="${E(e?this.download:void 0)}" rel="${E(e&&this.target?"noreferrer noopener":void 0)}" tabindex="${this.disabled?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:r?this.handleClickButton:void 0}"><div part="current-indicator" class="${h("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><div class="inline-flex flex-col justify-center gap-1 w-full h-full"><span part="content-area" class="${h("relative inline-flex justify-between items-center",o?"grow":"w-full",d.description&&"pt-3",!d.description&&!this.separated&&c,this.calculatePaddingX)}">${this.divider&&this.vertical?U`<sd-divider part="divider" class="${h("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-divider>`:""} <span id="content" part="content-container" class="inline-flex items-center flex-auto"><slot part="content" class="inline-flex text-start"></slot></span>${this.chevron||d.children&&this.vertical&&!this.separated?U`<sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${h("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${d.description&&this.vertical?U`<slot id="description" name="description" part="description" class="${h("inline-block text-sm text-left font-normal text-black pb-3",o||this.separated?"grow":"w-full",this.calculatePaddingX)}"></slot>`:""}</div></${t}>`;return this.separated?U`<div part="details" id="navigation-item-details" class="relative flex flex-col"><div class="flex items-start">${p} ${d.children&&this.vertical?U`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset -mt-1" @click="${this.handleClickSummary}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${h("m-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon></button>`:""}</div>${this.open?U`<slot name="children"></slot>`:""}</div>`:o?U`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${p}<slot name="children"></slot></details>`:U`${p}`}};ct.styles=[...g.styles,x`: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}`],a([v('[part="base"]')],ct.prototype,"button",2),a([v("slot:not([name])")],ct.prototype,"defaultSlot",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"vertical",2),a([l({type:String,reflect:!0})],ct.prototype,"size",2),a([l({reflect:!0})],ct.prototype,"href",2),a([l({type:String,reflect:!0})],ct.prototype,"target",2),a([l({reflect:!0})],ct.prototype,"download",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"current",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"chevron",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"relaxed",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"divider",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"indented",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"open",2),a([l({type:Boolean,reflect:!0})],ct.prototype,"separated",2),ct=a([w("sd-navigation-item")],ct);var kr={"top-right":null,"bottom-center":null},Gl=()=>{Object.entries(kr).forEach(([s])=>{let i=document.querySelector(`#sd-toast-stack--${s}`);if(i){i.setAttribute("role","region"),kr[s]=i;return}kr[s]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${s}`,className:`sd-toast-stack sd-toast-stack--${s}`})})};Gl();var yt=class extends g{constructor(){super(...arguments);this.localize=new A(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 kr[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.wrapper.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 Promise.all([W(this.base),W(this.wrapper)]),this.wrapper.hidden=!1;let t=q(this,"notification.show",{dir:this.localize.dir()}),e=q(this,`notification.wrapper.show${li(jr(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([K(this.base,ye(t.keyframes,this.base.scrollHeight),t.options),K(this.wrapper,e.keyframes,e.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([W(this.base),W(this.wrapper)]);let t=q(this,"notification.hide",{dir:this.localize.dir()}),e=q(this,`notification.wrapper.hide${li(jr(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([K(this.base,ye(t.keyframes,this.base.scrollHeight),t.options),K(this.wrapper,e.keyframes,e.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,J(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="${h("w-full flex items-stretch 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}"><div part="wrapper" class="${h("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${h("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="_internal" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${h("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="_internal" 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="${h("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></div>`}};yt.styles=[...g.styles,x`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],a([v('[part~="base"]')],yt.prototype,"base",2),a([v('[part~="wrapper"]')],yt.prototype,"wrapper",2),a([v('[part~="close-button"]')],yt.prototype,"close",2),a([l({type:String,reflect:!0})],yt.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"open",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"closable",2),a([l({type:Number,reflect:!0})],yt.prototype,"duration",2),a([l({type:Boolean,reflect:!0,attribute:"duration-indicator"})],yt.prototype,"durationIndicator",2),a([l({type:String,reflect:!0,attribute:"toast-stack"})],yt.prototype,"toastStack",2),a([C("open",{waitUntilFirstUpdate:!0})],yt.prototype,"handleOpenChange",1),a([C("duration")],yt.prototype,"handleDurationChange",1),yt=a([w("sd-notification")],yt);B("notification.show",{keyframes:[{opacity:0,height:0},{opacity:1,height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("notification.hide",{keyframes:[{opacity:1,height:"auto"},{opacity:0,height:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});B("notification.wrapper.showTopRight",{keyframes:[{bottom:"32px"},{bottom:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("notification.wrapper.hideTopRight",{keyframes:[{bottom:"0"},{bottom:"32px"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Qt=class extends g{constructor(){super(...arguments);this.localize=new A(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 U`<div role="${t?"presentation":"group"}" class="${h(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="${h(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>`}};Qt.styles=[...g.styles,x`:host{--display-divider:block}#divider{display:var(--display-divider)}`],a([v("slot:not([name])")],Qt.prototype,"defaultSlot",2),a([l({reflect:!0,type:Boolean})],Qt.prototype,"disabled",2),a([l({type:String,reflect:!0})],Qt.prototype,"label",2),a([C("disabled",{waitUntilFirstUpdate:!0})],Qt.prototype,"handleDisabledChange",1),Qt=a([w("sd-optgroup")],Qt);var gt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(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="${h("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="${h("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="${h("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":"bg-white border-neutral-800")}">${this.selected?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" 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>`}};gt.styles=[...g.styles,x`:host{display:block;outline:2px solid transparent!important;outline-offset:2px!important;position:relative;width:100%}.focus-outline-offset{outline-offset:-2px}`],a([v('[part="base"]')],gt.prototype,"defaultSlot",2),a([L()],gt.prototype,"current",2),a([L()],gt.prototype,"selected",2),a([L()],gt.prototype,"hasHover",2),a([L()],gt.prototype,"isKeyboardFocus",2),a([l({type:String,reflect:!0})],gt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"checkbox",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"disabled",2),a([l({type:String,reflect:!0})],gt.prototype,"value",2),a([C("disabled")],gt.prototype,"handleDisabledChange",1),a([C("selected")],gt.prototype,"handleSelectedChange",1),a([C("value")],gt.prototype,"handleValueChange",1),gt=a([w("sd-option")],gt);var $e=class extends Tt{constructor(){super(...arguments);this.expandable=!1}render(){let t=this.expandable?it`details`:it`div`,e=this.expandable?it`summary`:it`div`;return U`<${t} part="base" class="sm:p-6"><${e} part="header" id="header" class="${h("text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",this.expandable&&"cursor-pointer select-none")}" role="${E(this.expandable?"button":void 0)}" aria-expanded="${E(this.expandable?this.open?"true":"false":void 0)}" aria-controls="${E(this.expandable?"content":void 0)}" tabindex="${this.expandable?"0":"-1"}" @click="${this.expandable?this.handleSummaryClick:null}" @keydown="${this.expandable?this.handleSummaryKeyDown:null}"><div part="icon" class="${h("flex flex-grow-0 flex-shrink-0 flex-auto items-center",!this.expandable&&"cursor-default")}"><slot name="icon"></slot></div><slot name="summary" part="summary" class="${h("flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",this.expandable?"text-primary":"text-black cursor-default")}">${this.summary}</slot><span part="summary-icon" class="${h("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-transform ease-in-out duration-medium text-xl sm:text-4xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}"><slot name="expand-icon" class="${h(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot><slot name="collapse-icon" class="${h(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot></span></${e}><div part="content" id="content" class="${h("overflow-hidden",!this.expandable&&"hidden")}"><slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot></div></${t}>`}};$e.styles=[...Tt.styles,x`:host{display:block}@media (min-width:640px){[part=summary-icon]{font-size:var(--sd-spacing-12,3rem)}}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],a([l({type:Boolean,reflect:!0})],$e.prototype,"expandable",2),$e=a([w("sd-quickfact")],$e);B("quickfact.show",{keyframes:[{height:"0"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});B("quickfact.hide",{keyframes:[{height:"auto"},{height:"0"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});var wt=class extends g{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return u`<span part="base" class="${h("sd-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${h("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${h("rounded-full inline-flex text-white bg-accent h-2.5 w-2.5 transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"bg-neutral-500":this.visuallyDisabled?"bg-white":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span></span><slot part="label" class="${h("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};wt.styles=[...g.styles,x`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],a([L()],wt.prototype,"checked",2),a([L()],wt.prototype,"hasFocus",2),a([l({type:String,reflect:!0})],wt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],wt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],wt.prototype,"visuallyDisabled",2),a([l()],wt.prototype,"value",2),a([l({type:Boolean,reflect:!0})],wt.prototype,"invalid",2),a([C("checked")],wt.prototype,"handleCheckedChange",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],wt.prototype,"handleDisabledChange",1),wt=a([w("sd-radio")],wt);var Mt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(t){if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){let t=this.hasSlotController.test("[default]"),e=this.hasSlotController.test("icon"),r=`${this.size}-${t?"label":"no-label"}`;return u`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${h("relative text-center rounded-full transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled&&!this.visuallyDisabled?"bg-primary text-white hover:bg-primary-500":!this.checked&&(this.disabled||this.visuallyDisabled)?"text-neutral-500 hover:cursor-not-allowed":this.checked&&(this.disabled||this.visuallyDisabled)?"bg-neutral-400 text-white hover:cursor-not-allowed ":"bg-transparent text-primary border-primary hover:text-primary-500 cursor-pointer",t&&{sm:"px-3",md:"px-4",lg:"px-5"}[this.size],this.hasFocus&&"focused-class",t&&"button--has-label",e&&"button--has-icon flex gap-2",r)}" aria-disabled="${this.disabled||this.visuallyDisabled}" type="button" value="${E(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${h(e&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!e}"></slot>${t?u`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};Mt.styles=[...g.styles,x`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{padding-left:var(--sd-spacing-5,1.25rem);padding-right:var(--sd-spacing-5,1.25rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{padding-left:var(--sd-spacing-4,1rem);padding-right:var(--sd-spacing-4,1rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{padding-left:var(--sd-spacing-3,.75rem);padding-right:var(--sd-spacing-3,.75rem)}:host([size=lg].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-3,.75rem)*-1)}:host([size=md].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-2,.5rem)*-1)}:host([size=sm].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-1,.25rem)*-1)}:host(.sd-button-group__button--hover){z-index:20}:host(.sd-button-group__button--focus),:host(.sd-button-group__button[checked]){z-index:10}`],a([v(".button")],Mt.prototype,"input",2),a([v(".hidden-input")],Mt.prototype,"hiddenInput",2),a([L()],Mt.prototype,"hasFocus",2),a([l({type:String,reflect:!0})],Mt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],Mt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],Mt.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],Mt.prototype,"checked",2),a([l()],Mt.prototype,"value",2),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],Mt.prototype,"handleDisabledChange",1),Mt=a([w("sd-radio-button")],Mt);var Te=class extends g{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(t){let e=Hi(t.target);e==null||e.classList.add("sd-button-group__button--focus")}handleBlur(t){let e=Hi(t.target);e==null||e.classList.remove("sd-button-group__button--focus")}handleMouseOver(t){let e=Hi(t.target);e==null||e.classList.add("sd-button-group__button--hover")}handleMouseOut(t){let e=Hi(t.target);e==null||e.classList.remove("sd-button-group__button--hover")}handleSlotChange(){let t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach(e=>{let r=t.indexOf(e),o=Hi(e);o!==null&&(o.classList.add("sd-button-group__button"),o.classList.toggle("sd-button-group__button--first",r===0),o.classList.toggle("sd-button-group__button--inner",r>0&&r<t.length-1),o.classList.toggle("sd-button-group__button--last",r===t.length-1),o.classList.toggle("sd-button-group__button--radio",o.tagName.toLowerCase()==="sd-radio-button"))})}render(){return u`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};Te.styles=[...g.styles,x`:host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],a([v("slot")],Te.prototype,"defaultSlot",2),a([L()],Te.prototype,"disableRole",2),a([l({type:String,reflect:!0})],Te.prototype,"label",2),Te=a([w("sd-button-group")],Te);function Hi(s){var t;let i="sd-button, sd-radio-button";return(t=s.closest(i))!=null?t:s.querySelector(i)}var et=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this);this.hasSlotController=new P(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.helpText="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?Qs:t?Zs:ni}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-radio, sd-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-radio, sd-radio-button"),r=this.getAllRadios(),o=this.value;e.disabled||(this.value=e.value,r.forEach(n=>n.checked=n===e),this.value!==o&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){var c;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(p=>!p.disabled),r=(c=e.find(p=>p.checked))!=null?c:e[0],o=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,n=this.value,d=e.indexOf(r)+o;d<0&&(d=e.length-1),d>e.length-1&&(d=0),this.getAllRadios().forEach(p=>{p.checked=!1,this.hasButtonGroup||(p.tabIndex=-1)}),this.value=e[d].value,e[d].checked=!0,this.hasButtonGroup?e[d].shadowRoot.querySelector("button").focus():(e[d].tabIndex=0,e[d].focus()),this.value!==n&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios(),r=t.find(o=>o.checked)||t[0];r&&r.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,r;let t=this.getAllRadios();if(await Promise.all(t.map(async o=>{await o.updateComplete,o.checked=o.value===this.value,o.size=this.size,o instanceof wt&&(o.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(o=>o.tagName.toLowerCase()==="sd-radio-button"),!t.some(o=>o.checked))if(this.hasButtonGroup){let o=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");o&&(o.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let o=(r=this.shadowRoot)==null?void 0:r.querySelector("sd-button-group");o&&(o.disableRole=!0)}}syncRadios(){if(customElements.get("sd-radio")&&customElements.get("sd-radio-button")){this.syncRadioElements();return}customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then(()=>this.syncRadios()),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,r=this.hasSlotController.test("help-text"),o=this.helpText?!0:!!r,n=this.hasSlotController.test("tooltip"),d=u`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return u`<fieldset part="form-control" class="${h("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message" aria-labelledby="label">${e||n?u`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${h("p-0 leading-normal text-black text-left",e?"inline-block":"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend>${n?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${h("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?u`<sd-button-group class="border border-primary rounded-full" part="button-group" exportparts="base:button-group__base" role="presentation">${d}</sd-button-group>`:d}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>${this.formControlController.renderInvalidMessage()}`}};et.styles=[...g.styles,x`:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}:host:has(sd-button-group){display:inline-flex}`],a([v("slot:not([name])")],et.prototype,"defaultSlot",2),a([v("#validation-input")],et.prototype,"validationInput",2),a([v("#invalid-message")],et.prototype,"invalidMessage",2),a([L()],et.prototype,"hasButtonGroup",2),a([L()],et.prototype,"defaultValue",2),a([L()],et.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],et.prototype,"size",2),a([l({type:Boolean,reflect:!0})],et.prototype,"required",2),a([l({type:String,reflect:!0})],et.prototype,"orientation",2),a([l({type:String,reflect:!0})],et.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],et.prototype,"helpText",2),a([l({type:Boolean,reflect:!0})],et.prototype,"boldLabel",2),a([l({type:String,reflect:!0})],et.prototype,"name",2),a([l()],et.prototype,"value",2),a([l({type:String,reflect:!0})],et.prototype,"form",2),a([C("size",{waitUntilFirstUpdate:!0})],et.prototype,"handleSizeChange",1),a([C("showInvalidStyle",{waitUntilFirstUpdate:!0})],et.prototype,"handleInvalidChange",1),a([C("value")],et.prototype,"handleValueChange",1),et=a([w("sd-radio-group")],et);var Pe=(s,i)=>s-i,mi=(s,i)=>{if(s.length!==i.length)return!0;let t=s.slice().sort(Pe),e=i.slice().sort(Pe);for(let r=0;r<t.length;r+=1)if(t[r]!==e[r])return!0;return!1},ss=(s,i)=>{let t=s.getBoundingClientRect(),e=t.width;if(e<=0)return 0;let r=i;return r-=t.left,r<=0?0:r>=e?1:(r/=e,r)};var rt=class extends g{constructor(){super();this.formControlController=new pt(this);this.hasSlotController=new P(this,"label","help-text");this.localize=new A(this);this.name="";this.label="";this.helpText="";this.min=0;this.max=100;this.step=1;this.disabled=!1;this.visuallyDisabled=!1;this.noTrackBar=!1;this.noTooltip=!1;this.defaultValue="";this._value=[0];this._rangeValues=new Map;this._lastChangeValue=[];this._hasFocus=!1;this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(t){this._value=t?t.split(" ").map(Number).sort(Pe):[]}get value(){return this._value.slice().sort(Pe).join(" ")}set valueAsArray(t){let e=this._value;this._value=Array.isArray(t)?t.slice().sort(Pe):t||[],mi(e,this._value)&&this.requestUpdate("value",e.join(" "))}get valueAsArray(){return[...this._value].sort(Pe)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value)}willUpdate(t){super.willUpdate(t),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let e=this._value.map(r=>{if(r<=this.min)return this.min;if(r>=this.max)return this.max;let o=this.min+this.step*Math.round((r-this.min)/this.step);return o>this.max?this.max:o});mi(this._value,e)&&(this._value=e)}updated(t){super.updated(t);for(let e of this.thumbs){let r=+e.dataset.rangeId;this._rangeValues.has(r)&&this.moveThumb(e,this._rangeValues.get(r))}this.updateActiveTrack()}focus(t){let e=this.thumbs.item(0);e?e.focus(t):super.focus(t)}get validity(){return this.input.validity}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()}updateTooltip(t){let e=+t.dataset.rangeId;if(!this._rangeValues.has(e))return;let r=this._rangeValues.get(e),o=t.parentElement;o.content=this.tooltipFormatter(r)}updateActiveTrack(){let{activeTrack:t}=this;if(!t)return;if(this.min===this.max){t.style.insetInlineStart="0%",t.style.insetInlineEnd="0%";return}if(this._value.length===1){let n=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",d=100*(this._value[0]-this.min)/(this.max-this.min);t.style.insetInlineStart=`min(${n}, ${d}%)`,t.style.insetInlineEnd=`min(calc(100% - ${n}), calc(100% - ${d}%))`;return}let e=this._value.slice().sort(Pe),r=100*(e[0]-this.min)/(this.max-this.min),o=100*(e[e.length-1]-this.min)/(this.max-this.min);t.style.insetInlineStart=`${r}%`,t.style.insetInlineEnd=`calc(100% - ${o}%)`}moveThumb(t,e){t.setAttribute("aria-valuenow",e.toString()),t.setAttribute("aria-valuetext",this.tooltipFormatter(e));let r=(e-this.min)/(this.max-this.min);t.style.insetInlineStart=`calc(${100*r}% - 8px)`,this.updateTooltip(t)}movementBoundariesForThumb(t,e){let r=this.valueAsArray,n=Array.from(this.thumbs).indexOf(t),d=r[n-1]||this.min,c=r[n+1]||this.max,p=e<d||e>c;return{finalValue:Math.max(d,Math.min(c,e)),isRestricted:p,nextValue:c,prevValue:d}}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}onClickTrack(t,e=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:r}=t,o=Array.from(this.thumbs),n=ss(this.inputWrapper,r),d=this.step/(this.max-this.min),c=this.min+this.step*Math.round(n/d),p=o.reduce((b,k)=>{let T=this._rangeValues.get(+k.dataset.rangeId),M=this._rangeValues.get(+b.dataset.rangeId),S=Math.abs(T-c),O=Math.abs(M-c);return S===O?T<c?k:b:S<O?k:b}),m=+p.dataset.rangeId;if(!m)return;this._rangeValues.set(m,c),this.moveThumb(p,c);let f=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),mi(f,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let y=new PointerEvent("pointerdown",t);e&&p.dispatchEvent(y)&&this.updateTooltip(p)}onClickTrackItem(t){this.onClickTrack(t,!1)}async onClickThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target;this.updateTooltip(e),e.dataset.pointerId&&e.releasePointerCapture(+e.dataset.pointerId),e.dataset.pointerId=t.pointerId.toString(),e.setPointerCapture(t.pointerId),e.classList.add("grabbed"),await e.parentElement.show()}onDragThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target,r=+e.dataset.rangeId;if(!this._rangeValues.has(r)||(e.dataset.pointerId?+e.dataset.pointerId:null)!==t.pointerId)return;let n=ss(this.inputWrapper,t.clientX),d=this.step/(this.max-this.min),c=this.min+this.step*Math.round(n/d);if(this.emit("sd-move",{cancelable:!0,detail:{element:e,value:c}}).defaultPrevented)return;let m=this.movementBoundariesForThumb(e,c);m.isRestricted?(c=m.finalValue,e.style.zIndex=(3+this.thumbs.length).toFixed(0)):e.style.zIndex="3",this._rangeValues.set(r,c),this.moveThumb(e,c);let f=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),mi(f,this._value)&&this.emit("sd-input")}async onReleaseThumb(t){let e=t.target;!e.dataset.pointerId||t.pointerId!==+e.dataset.pointerId||(e.classList.remove("grabbed"),e.releasePointerCapture(t.pointerId),delete e.dataset.pointerId,mi(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),await e.parentElement.hide())}onKeyPress(t){let e=t.target,r=+e.dataset.rangeId,o=this._rangeValues.get(r);if(o===void 0)return;let n=o;switch(t.key){case"ArrowUp":case"Up":n=Math.min(o+this.step,this.max);break;case"ArrowDown":case"Down":n=Math.max(o-this.step,this.min);break;case"ArrowLeft":case"Left":n=this.rtl?Math.min(o+this.step,this.max):Math.max(o-this.step,this.min);break;case"ArrowRight":case"Right":n=this.rtl?Math.max(o-this.step,this.min):Math.min(o+this.step,this.max);break;case"PageUp":n=Math.min(o+(this.max-this.min)/5,this.max);break;case"PageDown":n=Math.max(o-(this.max-this.min)/5,this.min);break;case"Home":n=this.min;break;case"End":n=this.max;break;default:return}if(n!==o){if(this.emit("sd-move",{cancelable:!0,detail:{element:e,value:n}}).defaultPrevented)return;let c=this.movementBoundariesForThumb(e,n);c.isRestricted&&(n=c.finalValue),this.moveThumb(e,n),this._rangeValues.set(r,n),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(e),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}t.preventDefault()}onBlur(t){var e;t.relatedTarget&&((e=this.shadowRoot)!=null&&e.contains(t.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(t){var r;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let e=t.target;(r=e==null?void 0:e.dataset)!=null&&r.rangeId&&this.updateTooltip(e)}renderThumbs(t){let e=this._value.length>1;return this._rangeValues.clear(),this._value.map((r,o)=>{let n=o+1;this._rangeValues.set(n,r);let d=`thumb-${n}`,c="",p="";return e?(p=t?`label aria-label-hidden ${d}`:`aria-label-hidden ${d}`,o===0?c=`${this.localize.term("minimum")} (${this.tooltipFormatter(r)})`:o===this._value.length-1?c=`${this.localize.term("maximum")} (${this.tooltipFormatter(r)})`:c=this.tooltipFormatter(r)):p=t?"label aria-label-hidden":"",u`<sd-tooltip hoist trigger="focus" disabled="${E(this.disabled||this.visuallyDisabled||this.noTooltip?!0:void 0)}"><div id="${d}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${E(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${p}" aria-label="${c}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${r}" aria-valuetext="${this.tooltipFormatter(r)}" data-range-id="${n}" @pointerdown="${this.onClickThumb}" @pointermove="${this.onDragThumb}" @pointerup="${this.onReleaseThumb}" @pointercancel="${this.onReleaseThumb}" @pointerleave="${this.onReleaseThumb}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${h("rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",this.disabled||this.visuallyDisabled?"bg-neutral-500 outline-none":"bg-primary hover:bg-primary-500 cursor-pointer focus-visible:focus-outline")}"></div></sd-tooltip>`})}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},e=!!(this.label||t.label),r=!!(this.helpText||t.helpText);return u`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${e?u`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${e?"false":"true"}" class="${h("w-full",e?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${h("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${E(this.visuallyDisabled?"0":void 0)}"><div part="input-wrapper" class="relative flex-1 mx-2 mb-[10px]"><input id="input" tabindex="-1" hidden @invalid="${this.handleInvalid}"><div part="track-wrapper" role="presentation" @pointerdown="${this.onClickTrack}" class="relative cursor-pointer -mx-2"><div part="track-click-helper" class="absolute -inset-y-2 inset-x-0"></div><div part="track" class="${h("h-1 my-[6px]",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-neutral-400")}"></div><div part="active-track" hidden="${E(this.noTrackBar?!0:void 0)}" class="${h("absolute top-0 h-1",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-primary")}"></div></div>${this.renderThumbs(e)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>`}};rt.styles=[...g.styles,x`[part=base]{touch-action:none;-webkit-touch-callout:none}[part=thumb].grabbed{--tw-bg-opacity:1!important;background-color:rgb(var(--sd-color-primary-800,5 21 48)/var(--tw-bg-opacity,1))!important}`],a([v("#input")],rt.prototype,"input",2),a([v('[part="active-track"]')],rt.prototype,"activeTrack",2),a([v('[part="input-wrapper"]')],rt.prototype,"inputWrapper",2),a([Gi('[part="thumb"]')],rt.prototype,"thumbs",2),a([l({attribute:!1})],rt.prototype,"tooltipFormatter",2),a([l({type:String,reflect:!0})],rt.prototype,"name",2),a([l({type:String,reflect:!0})],rt.prototype,"label",2),a([l({attribute:"help-text",reflect:!0})],rt.prototype,"helpText",2),a([l({type:Number,reflect:!0})],rt.prototype,"min",2),a([l({type:Number,reflect:!0})],rt.prototype,"max",2),a([l({type:Number,reflect:!0})],rt.prototype,"step",2),a([l({type:Boolean,reflect:!0})],rt.prototype,"disabled",2),a([l({attribute:"visually-disabled",type:Boolean,reflect:!0})],rt.prototype,"visuallyDisabled",2),a([l({attribute:"no-track-bar",type:Boolean,reflect:!0})],rt.prototype,"noTrackBar",2),a([l({attribute:"no-tooltip",type:Boolean,reflect:!0})],rt.prototype,"noTooltip",2),a([Rt()],rt.prototype,"defaultValue",2),a([l({type:String})],rt.prototype,"value",1),rt=a([w("sd-range")],rt);var Le=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.subtick=!1}render(){return u`<div part="base" class="${h(this.subtick?"w-0.25":"w-0.5")}"><div part="line" class="${h("bg-neutral-500",this.subtick?"h-2":"h-[10px]")}"></div><div part="label" class="flex items-center justify-center text-center text-nowrap text-sm"><slot></slot></div></div>`}};Le.styles=g.styles,a([l({type:Boolean,reflect:!0})],Le.prototype,"subtick",2),Le=a([w("sd-range-tick")],Le);var ht=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.handleContainerScroll()}),this.updateComplete.then(()=>{this.container&&this.resizeObserver.observe(this.container)})}disconnectedCallback(){super.disconnectedCallback(),this.container&&this.resizeObserver.unobserve(this.container)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.handleContainerScroll())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get scrollButtons(){return{left:this.leftButton,right:this.rightButton,up:this.upButton,down:this.downButton}}handleContainerScroll(){if(!this.container)return;let t=this.container.scrollLeft>0,e=this.container.scrollLeft+this.container.clientWidth<this.container.scrollWidth-1,r=this.container.scrollTop>0,o=this.container.scrollTop+this.container.clientHeight<this.container.scrollHeight-1,n=this.canScroll,d={left:this.isScrollHorizontalEnabled&&t,right:this.isScrollHorizontalEnabled&&e,up:this.isScrollVerticalEnabled&&r,down:this.isScrollVerticalEnabled&&o},c=n.left&&!d.left,p=n.up&&!d.up,m=n.right&&!d.right,f=n.down&&!d.down;(c||p)&&this.dispatchEvent(new CustomEvent("start")),(m||f)&&this.dispatchEvent(new CustomEvent("end")),this.canScroll=d}handleScroll(t,e){var O,I,F;let r=["left","up"].includes(t)?-this.step:this.step,o=["left","right"].includes(t)?"horizontal":"vertical",n=["left","up"].includes(t)?"start":"end",d=!["mouse","touch"].includes((O=e==null?void 0:e.pointerType)!=null?O:""),c=o==="horizontal"?"left":"top";(I=this.container)==null||I.scrollBy({behavior:"smooth",[c]:r});let p=`button-${t}`;this.dispatchEvent(new CustomEvent(p,{bubbles:!0,composed:!0}));let f=(o==="horizontal"?this.container.scrollLeft:this.container.scrollTop)+r,y=o==="horizontal"?this.container.scrollWidth-this.container.clientWidth:this.container.scrollHeight-this.container.clientHeight,b=n==="start"&&f<=0,k=n==="end"&&f>=y-1;if(!(b||k)){let D=this.localize.term("scrolled");this.announcementContainer.textContent=this.announcementContainer.textContent===D?`${D}\u200B`:D;return}let T=this.scrollButtons[t],M={left:this.rightButton,right:this.leftButton,up:this.downButton,down:this.upButton}[t],S=b?`${this.localize.term("scrolled")}. ${this.localize.term("scrollToEnd")}`:`${this.localize.term("scrolled")}. ${this.localize.term("scrollToStart")}`;(F=M==null?void 0:M.querySelector("sd-icon"))==null||F.setAttribute("label",S),d?M==null||M.focus():T==null||T.blur()}handleButtonBlur(t,e){var d;let o=(["left","up"].includes(t)?"start":"end")==="start"?this.localize.term("scrollToStart"):this.localize.term("scrollToEnd");(d=e.target.querySelector("sd-icon"))==null||d.setAttribute("label",o)}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",e="scroll-shadow absolute z-10 pointer-events-none transition-opacity duration-medium ease-in-out";return u`<div part="base" class="${h("scroll-container flex overflow-hidden flex-1",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset&&"p-4",{horizontal:"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",vertical:"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",auto:"scroll-auto overflow-auto"}[this.orientation])}" @scroll="${this.handleContainerScroll}" tabindex="0"><div id="announcement-container" role="status" class="sr-only"></div><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?u`${this.isScrollHorizontalEnabled?u`<div part="button-left" class="${h("absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.left&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${h(t)}" aria-hidden="${E(!this.canScroll.left||void 0)}" tabindex="${E(this.canScroll.left?void 0:-1)}" @click="${r=>this.handleScroll("left",r)}" @blur="${r=>this.handleButtonBlur("left",r)}"><slot name="icon-start"><sd-icon library="_internal" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-icon></slot></button></div><div part="button-right" class="${h("absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.right&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${h(t)}" aria-hidden="${E(!this.canScroll.right||void 0)}" tabindex="${E(this.canScroll.right?void 0:-1)}" @click="${r=>this.handleScroll("right",r)}" @blur="${r=>this.handleButtonBlur("right",r)}"><slot name="icon-end"><sd-icon library="_internal" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-icon></slot></button></div>`:null} ${this.isScrollVerticalEnabled?u`<div part="button-top" class="${h("absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.up&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${h(t)}" aria-hidden="${E(!this.canScroll.up||void 0)}" tabindex="${E(this.canScroll.up?void 0:-1)}" @click="${r=>this.handleScroll("up",r)}" @blur="${r=>this.handleButtonBlur("up",r)}"><slot name="icon-start"><sd-icon library="_internal" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-icon></slot></button></div><div part="button-bottom" class="${h("absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.down&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${h(t)}" aria-hidden="${E(!this.canScroll.down||void 0)}" tabindex="${E(this.canScroll.down?void 0:-1)}" @click="${r=>this.handleScroll("down",r)}" @blur="${r=>this.handleButtonBlur("down",r)}"><slot name="icon-end"><sd-icon library="_internal" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-icon></slot></button></div>`:null}`:null} ${this.shadows?u`${this.isScrollHorizontalEnabled?u`<div part="shadow-left" class="${h("left top-0 left-0 w-[6px] h-full",e,this.canScroll.left?"opacity-100":"opacity-0")}"></div><div part="shadow-right" class="${h("right top-0 right-0 w-[6px] h-full",e,this.canScroll.right?"opacity-100":"opacity-0")}"></div>`:null} ${this.isScrollVerticalEnabled?u`<div part="shadow-top" class="${h("top top-0 left-0 w-full h-[6px]",e,this.canScroll.up?"opacity-100":"opacity-0")}"></div><div part="shadow-bottom" class="${h("bottom bottom-0 left-0 w-full h-[6px]",e,this.canScroll.down?"opacity-100":"opacity-0")}"></div>`:null}`:null}`}};ht.styles=[...g.styles,x`:host{--gradient-color:hsla(0,0%,100%,0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;display:flex;overflow:hidden;position:relative}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-right]{background:linear-gradient(90deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-top]{background:linear-gradient(0deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-bottom]{background:linear-gradient(180deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}.sd-icon--top{align-self:flex-start}.sd-icon--down{align-self:flex-end}`],a([v('[part="button-right"] button')],ht.prototype,"rightButton",2),a([v('[part="button-left"] button')],ht.prototype,"leftButton",2),a([v('[part="button-bottom"] button')],ht.prototype,"downButton",2),a([v('[part="button-top"] button')],ht.prototype,"upButton",2),a([v(".scroll-container")],ht.prototype,"container",2),a([v("#announcement-container")],ht.prototype,"announcementContainer",2),a([l({type:String,reflect:!0})],ht.prototype,"orientation",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"scrollbars",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"buttons",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"shadows",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"inset",2),a([l({type:Number,reflect:!0})],ht.prototype,"step",2),a([L()],ht.prototype,"canScroll",2),a([L()],ht.prototype,"isScrollHorizontalEnabled",2),a([L()],ht.prototype,"isScrollVerticalEnabled",2),ht=a([w("sd-scrollable")],ht);var V=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new P(this,"help-text","label");this.localize=new A(this);this.typeToSelectString="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=t=>u`<sd-tag class="relative z-10" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
149
149
|
base:tag__base,
|
|
150
150
|
content:tag__content,
|
|
151
151
|
removable-indicator:tag__removable-indicator,
|
|
@@ -155,9 +155,9 @@
|
|
|
155
155
|
removable-indicator:tag__removable-indicator,
|
|
156
156
|
" 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>`]}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)}handleUseTagsChange(){let t=this.getAllOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}handleDisabledChange(){(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await W(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:t,options:e}=q(this,"select.show",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.currentOption&&ee(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await W(this);let{keyframes:t,options:e}=q(this,"select.hide",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(t=>{t.size=this.size})}handleValueChange(){if(this.selectedOptions.length===(Array.isArray(this.value)?this.value.length:1))return;let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter(r=>e.includes(r.value)))}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,J(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,J(this,"sd-after-hide")}checkValidity(){var t;return(t=this.valueInput)==null?void 0:t.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.combobox.focus(t)}blur(){this.combobox.blur()}render(){let t={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,o=this.clearable&&!this.disabled,n=!!t.tooltip,d=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",c=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",p={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return u`<div part="form-control" class="${h("relative text-left",c,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" aria-live="polite">${this.deletedTagLabel}</span> ${e||n?u`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${e&&"inline-block"}" aria-hidden="${e?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> ${t.tooltip?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${h("relative w-full bg-white",d==="disabled"?"text-neutral-500":"text-black")}"><div part="border" class="${h("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"}[d],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="${h("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
157
157
|
popup:popup__content,
|
|
158
|
-
"><div class="${h("relative w-full h-full grid 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="${h("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="${h("top-0 left-0 appearance-none outline-none flex-grow bg-transparent flex-1 placeholder-neutral-700",c,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(f=>f==null?void 0:f.getTextLabel()).join(", ")}</div><input class="${h("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",c)}" 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}"> ${o?u`<button part="clear-button" class="${h("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="${h("text-neutral-700 z-10",m)}" library="_internal" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${h(p,m,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon part="valid-icon" class="${h("flex-shrink-0 text-success",p,m)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${h("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",m)}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-icon></slot></div><button part="combobox" class="${h("relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",c,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="${h("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-1" 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()}`}};V.styles=[...g.styles,x`:host{display:block;position:relative;width:var(--sd-spacing-auto,auto)}: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))}`],a([si({selector:"sd-option"})],V.prototype,"_optionsInDefaultSlot",2),a([v("sd-popup")],V.prototype,"popup",2),a([v('[part="combobox"]')],V.prototype,"combobox",2),a([v('[part="display-input"]')],V.prototype,"displayInput",2),a([v(".value-input")],V.prototype,"valueInput",2),a([v('[part="listbox"]')],V.prototype,"listbox",2),a([v("#invalid-message")],V.prototype,"invalidMessage",2),a([L()],V.prototype,"deletedTagLabel",2),a([L()],V.prototype,"hasFocus",2),a([L()],V.prototype,"currentOption",2),a([L()],V.prototype,"selectedOptions",2),a([L()],V.prototype,"showValidStyle",2),a([L()],V.prototype,"showInvalidStyle",2),a([Bt()],V.prototype,"defaultValue",2),a([l({type:Boolean,reflect:!0})],V.prototype,"open",2),a([l({type:String,reflect:!0})],V.prototype,"size",2),a([l({type:String,reflect:!0})],V.prototype,"placement",2),a([l({type:String,reflect:!0})],V.prototype,"label",2),a([l({type:String,reflect:!0})],V.prototype,"placeholder",2),a([l({type:String,attribute:"max-options-tag-label",reflect:!0})],V.prototype,"maxOptionsTagLabel",2),a([l({type:Boolean,reflect:!0})],V.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],V.prototype,"visuallyDisabled",2),a([l({type:String,attribute:"help-text",reflect:!0})],V.prototype,"helpText",2),a([L()],V.prototype,"currentPlacement",2),a([l({type:Boolean,reflect:!0})],V.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],V.prototype,"multiple",2),a([l({type:Boolean,reflect:!0})],V.prototype,"useTags",2),a([l({attribute:"max-options-visible",type:Number,reflect:!0})],V.prototype,"maxOptionsVisible",2),a([l({reflect:!0})],V.prototype,"form",2),a([l({reflect:!0})],V.prototype,"name",2),a([l({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],V.prototype,"value",2),a([l({type:Boolean,reflect:!0})],V.prototype,"required",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],V.prototype,"styleOnValid",2),a([l({type:Boolean,reflect:!0})],V.prototype,"hoist",2),a([l()],V.prototype,"getTag",2),a([C("useTags",{waitUntilFirstUpdate:!0})],V.prototype,"handleUseTagsChange",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],V.prototype,"handleDisabledChange",1),a([C("open",{waitUntilFirstUpdate:!0})],V.prototype,"handleOpenChange",1),a([C("size",{waitUntilFirstUpdate:!0})],V.prototype,"applySizeToOptions",1),a([C("value",{waitUntilFirstUpdate:!0})],V.prototype,"handleValueChange",1),V=a([w("sd-select")],V);B("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Me=class extends g{constructor(){super(...arguments);this.variant="rectangular"}render(){return u`<div part="base" aria-hidden="true" class="${h("bg-neutral-200 w-full h-full animate-pulse",{rectangular:"rounded-sm",circular:"rounded-full inline-block"}[this.variant])}"><slot></slot></div>`}};Me.styles=[...g.styles,x`:host{display:block}::slotted(*){visibility:hidden}`],a([l({type:String,reflect:!0})],Me.prototype,"variant",2),Me=a([w("sd-skeleton")],Me);var Se=class extends g{constructor(){super(...arguments);this.color="currentColor";this.localize=new A(this)}render(){return u`<svg role="progressbar" viewBox="0 0 24 24" class="${h("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};Se.styles=[...g.styles,x`:host{display:inline-block;height:1em;width:1em}`],a([l({type:String,reflect:!0})],Se.prototype,"color",2),Se=a([w("sd-spinner")],Se);var nt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"label","[default]");this.size="lg";this.orientation="horizontal";this.horizontalInline=!1;this.waiting=!1;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,this.waiting=!1)}handleDisabledChange(){this.disabled&&(this.current=!1,this.waiting=!1)}handleWaitingChange(){this.waiting&&(this.current=!1,this.disabled=!1)}handleInteractivityChange(){this.notInteractive&&(this.current=!1,this.disabled=!1,this.waiting=!1)}render(){let t=this.isLink(),e=this.notInteractive||this.waiting?it`div`:t?it`a`:it`button`,r=this.hasSlotController.test("label"),o=this.label?!0:r,n=this.hasSlotController.test("[default]"),d=this.description?!0:n,c=this.horizontalInline&&this.orientation==="horizontal",p=h("flex shrink-0 gap-2",this.noTail&&!c&&"w-max",this.orientation==="horizontal"?"flex-row":"flex-col items-stretch",c&&"items-start",this.orientation==="horizontal"&&!this.horizontalInline?this.size==="lg"?"translateLg":"translateSm":this.size==="lg"?"mt-1":"mt-3"),m=h("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":!this.notInteractive&&!this.waiting?"focus-visible:focus-outline hover:cursor-pointer":"",this.notInteractive?this.size==="lg"?"not-interactive-lg":"w-12":this.size==="lg"?"w-12":"w-8",this.disabled&&"border-neutral-500 text-neutral-500",this.waiting&&"border-neutral-400 text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"border-primary hover:bg-primary-100 hover:border-primary-500",this.notInteractive&&"border-neutral-400",this.current&&"bg-accent border-none text-white");return U`<div role="listitem" part="base" class="${h("flex pt-1",this.orientation==="horizontal"?"flex-col w-full":"flex-row gap-4 items-stretch h-full w-full overflow-hidden",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"group")}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><div part="circle-and-tail-container" class="${p}"><${e} part="circle" href="${E(t?this.href:void 0)}" aria-disabled="${E(this.disabled||this.waiting||void 0)}" aria-current="${this.current?"step":void 0}" aria-labelledby="${E(this.notInteractive||this.waiting||!o?void 0:"label")}" aria-describedby="${E(this.notInteractive||this.waiting||!d?void 0:"description")}" class="${m}"><slot name="circle-content" class="${h("text-lg",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"text-primary hover:text-primary-500 hover:fill-primary-500",this.notInteractive&&"text-primary")}">${!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?U`<sd-icon name="status-check" library="_internal" class="${h(this.size==="sm"&&"text-sm")}"></sd-icon>`:U`${this.index}`}</slot></${e}>${c?U`<div class="${h(!this.noTail&&"flex-1","flex flex-col gap-1")}"><div class="${h("flex w-full",o&&"gap-2",this.size==="sm"&&!d?"mt-1":"mt-3")}">${o&&U`<div part="label" id="label" class="${h("font-bold sd-paragraph whitespace-nowrap",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"text-primary":"text-black")}"><slot name="label">${this.label}</slot></div>`} ${this.noTail?"":U`<div part="tail" class="${h("border-t flex-1 mr-2 mt-3",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"border-primary":"border-neutral-500")}"></div>`}</div>${d?U`<div part="description" id="description" class="${h("sd-paragraph sd-paragraph--size-sm break-words",d?"flex-1":"w-0 h-0 overflow-hidden",d&&!this.noTail&&"pr-4",(this.disabled||this.waiting)&&"!text-neutral-700")}">${this.description||U`<slot></slot>`}</div>`:""}</div>`:this.noTail?"":U`<div part="tail" class="${h(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&&!this.waiting?"border-primary":"border-neutral-400")}"></div>`}</div>${c?"":U`<div part="text-container" class="${h("mt-4 break-words flex flex-col gap-2",this.orientation==="horizontal"?"text-center w-40":"text-left",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",this.notInteractive?"ml-2":"mr-4")}"><div part="label" id="label" class="${h("!font-bold sd-paragraph",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"text-primary":"text-black")}"><slot name="label">${this.label}</slot></div><div part="description" id="description" class="${h("sd-paragraph sd-paragraph--size-sm",(this.disabled||this.waiting)&&"text-neutral-700")}">${this.description||U`<slot></slot>`}</div></div>`}</div>`}};nt.styles=[...g.styles,x`:host{flex:1 1 0%}:host([no-tail]){flex-grow:0}:host([horizontal-inline]):has([part=description]){flex:1 1 0%;min-width:var(--sd-spacing-0,0)}.translateLg{transform:translateX(3.438rem)}.translateSm{transform:translateX(4rem)}.not-interactive-lg{width:4.5rem}`],a([l({type:String,reflect:!0})],nt.prototype,"size",2),a([l({type:String,reflect:!0})],nt.prototype,"orientation",2),a([l({type:Boolean,reflect:!0,attribute:"horizontal-inline"})],nt.prototype,"horizontalInline",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"waiting",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"current",2),a([l({reflect:!0,type:Boolean,attribute:"no-tail"})],nt.prototype,"noTail",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],nt.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],nt.prototype,"label",2),a([l({type:String,reflect:!0})],nt.prototype,"description",2),a([l({type:Number,reflect:!0,attribute:"index"})],nt.prototype,"index",2),a([l({type:String,reflect:!0})],nt.prototype,"href",2),a([C("current")],nt.prototype,"handleCurrentChange",1),a([C("disabled")],nt.prototype,"handleDisabledChange",1),a([C("waiting")],nt.prototype,"handleWaitingChange",1),a([C("notInteractive")],nt.prototype,"handleInteractivityChange",1),nt=a([w("sd-step")],nt);var St=class extends g{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.waiting=!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="${h("flex",this.orientation==="vertical"&&"flex-col h-full")}"><slot part="body"></slot></div></div>`}};St.styles=[...g.styles,x`:host{width:-moz-max-content;width:max-content}`],a([v("[part=body]")],St.prototype,"body",2),a([l({type:String,reflect:!0})],St.prototype,"size",2),a([l({type:String,reflect:!0})],St.prototype,"orientation",2),a([l({type:Number,reflect:!0,attribute:"active-step"})],St.prototype,"activeStep",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],St.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],St.prototype,"label",2),a([C("size",{waitUntilFirstUpdate:!0})],St.prototype,"updateSize",1),a([C("orientation",{waitUntilFirstUpdate:!0})],St.prototype,"updateOrientation",1),a([C("notInteractive")],St.prototype,"handleInteractivityChange",1),St=a([w("sd-step-group")],St);var mt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"tooltip");this.formControlController=new pt(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`<div class="flex flex-row items-center gap-2"><label part="base" class="${h("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="${E(this.value)}" .checked="${xe(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="${h(`relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100
|
|
158
|
+
"><div class="${h("relative w-full h-full grid 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="${h("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="${h("top-0 left-0 appearance-none outline-none flex-grow bg-transparent flex-1 placeholder-neutral-700",c,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(f=>f==null?void 0:f.getTextLabel()).join(", ")}</div><input class="${h("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",c)}" 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}"> ${o?u`<button part="clear-button" class="${h("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="${h("text-neutral-700 z-10",m)}" library="_internal" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${h(p,m,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon part="valid-icon" class="${h("flex-shrink-0 text-success",p,m)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${h("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",m)}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-icon></slot></div><button part="combobox" class="${h("relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",c,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="${h("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-1" 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()}`}};V.styles=[...g.styles,x`:host{display:block;position:relative;width:var(--sd-spacing-auto,auto)}: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))}`],a([si({selector:"sd-option"})],V.prototype,"_optionsInDefaultSlot",2),a([v("sd-popup")],V.prototype,"popup",2),a([v('[part="combobox"]')],V.prototype,"combobox",2),a([v('[part="display-input"]')],V.prototype,"displayInput",2),a([v(".value-input")],V.prototype,"valueInput",2),a([v('[part="listbox"]')],V.prototype,"listbox",2),a([v("#invalid-message")],V.prototype,"invalidMessage",2),a([L()],V.prototype,"deletedTagLabel",2),a([L()],V.prototype,"hasFocus",2),a([L()],V.prototype,"currentOption",2),a([L()],V.prototype,"selectedOptions",2),a([L()],V.prototype,"showValidStyle",2),a([L()],V.prototype,"showInvalidStyle",2),a([Rt()],V.prototype,"defaultValue",2),a([l({type:Boolean,reflect:!0})],V.prototype,"open",2),a([l({type:String,reflect:!0})],V.prototype,"size",2),a([l({type:String,reflect:!0})],V.prototype,"placement",2),a([l({type:String,reflect:!0})],V.prototype,"label",2),a([l({type:String,reflect:!0})],V.prototype,"placeholder",2),a([l({type:String,attribute:"max-options-tag-label",reflect:!0})],V.prototype,"maxOptionsTagLabel",2),a([l({type:Boolean,reflect:!0})],V.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],V.prototype,"visuallyDisabled",2),a([l({type:String,attribute:"help-text",reflect:!0})],V.prototype,"helpText",2),a([L()],V.prototype,"currentPlacement",2),a([l({type:Boolean,reflect:!0})],V.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],V.prototype,"multiple",2),a([l({type:Boolean,reflect:!0})],V.prototype,"useTags",2),a([l({attribute:"max-options-visible",type:Number,reflect:!0})],V.prototype,"maxOptionsVisible",2),a([l({reflect:!0})],V.prototype,"form",2),a([l({reflect:!0})],V.prototype,"name",2),a([l({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],V.prototype,"value",2),a([l({type:Boolean,reflect:!0})],V.prototype,"required",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],V.prototype,"styleOnValid",2),a([l({type:Boolean,reflect:!0})],V.prototype,"hoist",2),a([l()],V.prototype,"getTag",2),a([C("useTags",{waitUntilFirstUpdate:!0})],V.prototype,"handleUseTagsChange",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],V.prototype,"handleDisabledChange",1),a([C("open",{waitUntilFirstUpdate:!0})],V.prototype,"handleOpenChange",1),a([C("size",{waitUntilFirstUpdate:!0})],V.prototype,"applySizeToOptions",1),a([C("value",{waitUntilFirstUpdate:!0})],V.prototype,"handleValueChange",1),V=a([w("sd-select")],V);B("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});B("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Me=class extends g{constructor(){super(...arguments);this.variant="rectangular"}render(){return u`<div part="base" aria-hidden="true" class="${h("bg-neutral-200 w-full h-full animate-pulse",{rectangular:"rounded-sm",circular:"rounded-full inline-block"}[this.variant])}"><slot></slot></div>`}};Me.styles=[...g.styles,x`:host{display:block}::slotted(*){visibility:hidden}`],a([l({type:String,reflect:!0})],Me.prototype,"variant",2),Me=a([w("sd-skeleton")],Me);var Se=class extends g{constructor(){super(...arguments);this.color="currentColor";this.localize=new A(this)}render(){return u`<svg role="progressbar" viewBox="0 0 24 24" class="${h("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};Se.styles=[...g.styles,x`:host{display:inline-block;height:1em;width:1em}`],a([l({type:String,reflect:!0})],Se.prototype,"color",2),Se=a([w("sd-spinner")],Se);var nt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"label","[default]");this.size="lg";this.orientation="horizontal";this.horizontalInline=!1;this.waiting=!1;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,this.waiting=!1)}handleDisabledChange(){this.disabled&&(this.current=!1,this.waiting=!1)}handleWaitingChange(){this.waiting&&(this.current=!1,this.disabled=!1)}handleInteractivityChange(){this.notInteractive&&(this.current=!1,this.disabled=!1,this.waiting=!1)}render(){let t=this.isLink(),e=this.notInteractive||this.waiting?it`div`:t?it`a`:it`button`,r=this.hasSlotController.test("label"),o=this.label?!0:r,n=this.hasSlotController.test("[default]"),d=this.description?!0:n,c=this.horizontalInline&&this.orientation==="horizontal",p=h("flex shrink-0 gap-2",this.noTail&&!c&&"w-max",this.orientation==="horizontal"?"flex-row":"flex-col items-stretch",c&&"items-start",this.orientation==="horizontal"&&!this.horizontalInline?this.size==="lg"?"translateLg":"translateSm":this.size==="lg"?"mt-1":"mt-3"),m=h("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":!this.notInteractive&&!this.waiting?"focus-visible:focus-outline hover:cursor-pointer":"",this.notInteractive?this.size==="lg"?"not-interactive-lg":"w-12":this.size==="lg"?"w-12":"w-8",this.disabled&&"border-neutral-500 text-neutral-500",this.waiting&&"border-neutral-400 text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"border-primary hover:bg-primary-100 hover:border-primary-500",this.notInteractive&&"border-neutral-400",this.current&&"bg-accent border-none text-white");return U`<div role="listitem" part="base" class="${h("flex pt-1",this.orientation==="horizontal"?"flex-col w-full":"flex-row gap-4 items-stretch h-full w-full overflow-hidden",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"group")}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><div part="circle-and-tail-container" class="${p}"><${e} part="circle" href="${E(t?this.href:void 0)}" aria-disabled="${E(this.disabled||this.waiting||void 0)}" aria-current="${this.current?"step":void 0}" aria-labelledby="${E(this.notInteractive||this.waiting||!o?void 0:"label")}" aria-describedby="${E(this.notInteractive||this.waiting||!d?void 0:"description")}" class="${m}"><slot name="circle-content" class="${h("text-lg",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"text-primary hover:text-primary-500 hover:fill-primary-500",this.notInteractive&&"text-primary")}">${!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?U`<sd-icon name="status-check" library="_internal" class="${h(this.size==="sm"&&"text-sm")}"></sd-icon>`:U`${this.index}`}</slot></${e}>${c?U`<div class="${h(!this.noTail&&"flex-1","flex flex-col gap-1")}"><div class="${h("flex w-full",o&&"gap-2",this.size==="sm"&&!d?"mt-1":"mt-3")}">${o&&U`<div part="label" id="label" class="${h("font-bold sd-paragraph whitespace-nowrap",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"text-primary":"text-black")}"><slot name="label">${this.label}</slot></div>`} ${this.noTail?"":U`<div part="tail" class="${h("border-t flex-1 mr-2 mt-3",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"border-primary":"border-neutral-500")}"></div>`}</div>${d?U`<div part="description" id="description" class="${h("sd-paragraph sd-paragraph--size-sm break-words",d?"flex-1":"w-0 h-0 overflow-hidden",d&&!this.noTail&&"pr-4",(this.disabled||this.waiting)&&"!text-neutral-700")}">${this.description||U`<slot></slot>`}</div>`:""}</div>`:this.noTail?"":U`<div part="tail" class="${h(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&&!this.waiting?"border-primary":"border-neutral-400")}"></div>`}</div>${c?"":U`<div part="text-container" class="${h("mt-4 break-words flex flex-col gap-2",this.orientation==="horizontal"?"text-center w-40":"text-left",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",this.notInteractive?"ml-2":"mr-4")}"><div part="label" id="label" class="${h("!font-bold sd-paragraph",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"text-primary":"text-black")}"><slot name="label">${this.label}</slot></div><div part="description" id="description" class="${h("sd-paragraph sd-paragraph--size-sm",(this.disabled||this.waiting)&&"text-neutral-700")}">${this.description||U`<slot></slot>`}</div></div>`}</div>`}};nt.styles=[...g.styles,x`:host{flex:1 1 0%}:host([no-tail]){flex-grow:0}:host([horizontal-inline]):has([part=description]){flex:1 1 0%;min-width:var(--sd-spacing-0,0)}.translateLg{transform:translateX(3.438rem)}.translateSm{transform:translateX(4rem)}.not-interactive-lg{width:4.5rem}`],a([l({type:String,reflect:!0})],nt.prototype,"size",2),a([l({type:String,reflect:!0})],nt.prototype,"orientation",2),a([l({type:Boolean,reflect:!0,attribute:"horizontal-inline"})],nt.prototype,"horizontalInline",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"waiting",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"current",2),a([l({reflect:!0,type:Boolean,attribute:"no-tail"})],nt.prototype,"noTail",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],nt.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],nt.prototype,"label",2),a([l({type:String,reflect:!0})],nt.prototype,"description",2),a([l({type:Number,reflect:!0,attribute:"index"})],nt.prototype,"index",2),a([l({type:String,reflect:!0})],nt.prototype,"href",2),a([C("current")],nt.prototype,"handleCurrentChange",1),a([C("disabled")],nt.prototype,"handleDisabledChange",1),a([C("waiting")],nt.prototype,"handleWaitingChange",1),a([C("notInteractive")],nt.prototype,"handleInteractivityChange",1),nt=a([w("sd-step")],nt);var St=class extends g{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.waiting=!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="${h("flex",this.orientation==="vertical"&&"flex-col h-full")}"><slot part="body"></slot></div></div>`}};St.styles=[...g.styles,x`:host{width:-moz-max-content;width:max-content}`],a([v("[part=body]")],St.prototype,"body",2),a([l({type:String,reflect:!0})],St.prototype,"size",2),a([l({type:String,reflect:!0})],St.prototype,"orientation",2),a([l({type:Number,reflect:!0,attribute:"active-step"})],St.prototype,"activeStep",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],St.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],St.prototype,"label",2),a([C("size",{waitUntilFirstUpdate:!0})],St.prototype,"updateSize",1),a([C("orientation",{waitUntilFirstUpdate:!0})],St.prototype,"updateOrientation",1),a([C("notInteractive")],St.prototype,"handleInteractivityChange",1),St=a([w("sd-step-group")],St);var mt=class extends g{constructor(){super(...arguments);this.hasSlotController=new P(this,"tooltip");this.formControlController=new pt(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`<div class="flex flex-row items-center gap-2"><label part="base" class="${h("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="${E(this.value)}" .checked="${Ce(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="${h(`relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100
|
|
159
159
|
peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2
|
|
160
|
-
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?this.checked?"border-error bg-error hover:bg-error-400 hover:border-error-400 group-hover:bg-error-400":"border-error bg-white hover:border-error-400 hover:bg-white group-hover:border-error-400 group-hover:bg-white":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="${h("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?this.checked?"bg-white translate-x-2":"bg-error -translate-x-2 hover:bg-error-400 hover:border-error-400 group-hover:border-error-400 group-hover:bg-error-400":this.checked?"bg-white translate-x-2":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${h("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.hasSlotController.test("tooltip")?u`<slot name="tooltip"></slot>`:null}</div>${this.formControlController.renderInvalidMessage()}`}};mt.styles=[...g.styles,x`: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:" *"}`],a([v("input")],mt.prototype,"input",2),a([v("#invalid-message")],mt.prototype,"invalidMessage",2),a([L()],mt.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],mt.prototype,"title",2),a([l({type:String,reflect:!0})],mt.prototype,"name",2),a([l()],mt.prototype,"value",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"checked",2),a([Bt("checked")],mt.prototype,"defaultChecked",2),a([l({reflect:!0})],mt.prototype,"form",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"required",2),a([C("disabled",{waitUntilFirstUpdate:!0})],mt.prototype,"handleDisabledChange",1),a([C(["checked"],{waitUntilFirstUpdate:!0})],mt.prototype,"handleStateChange",1),mt=a([w("sd-switch")],mt);var Jl=0,zt=class extends g{constructor(){super(...arguments);this.attrId=++Jl;this.componentId=`sd-tab-${this.attrId}`;this.hasSlotController=new P(this,"left");this.localize=new A(this);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="${h("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 transition-all duration-fast ease-in-out",this.variant==="container"&&"tab-container-border bg-white 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",this.active&&"z-20")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${h("flex h-full items-center justify-center whitespace-nowrap",this.disabled||this.visuallyDisabled&&"opacity-50 ")}"><slot name="left" class="${h(t.left&&"block pr-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><slot class="${h(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot>${this.variant==="container"?u`<div part="active-tab-indicator" class="${h("absolute bottom-0 h-1 bg-accent w-3/4 bottom-0 group-hover:w-full")}"></div>`:""}<div part="hover-bottom-border" class="${h(!this.active&&!this.disabled&&"absolute bottom-0 left-0 w-full h-0.25 border-b border-transparent group-hover:border-b-neutral-400 transition-[border] duration-fast ease-in-out")}"></div></div></div>`}};zt.styles=[...g.styles,x`:host{box-sizing:border-box;display:inline-block}:host(:hover)::part(hover-bottom-border){--tw-border-opacity:1;border-bottom-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1))}.tab-container-border:after{border-color:transparent;border-width:1px;--tw-content:""}.tab--active-container-border:after,.tab-container-border:after{content:var(--tw-content);height:100%;position:absolute;width:100%}.tab--active-container-border:after{border-width:1px;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:border;transition-timing-function:cubic-bezier(.4,0,.2,1);--tw-content:"";border-bottom:none;border-radius:4px 4px 0 0}[part=active-tab-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,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([active]) [part=active-tab-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,transform var(--sd-duration-fast) ease-in-out}`],a([v("[part=base]")],zt.prototype,"tab",2),a([v("[part=active-tab-indicator]")],zt.prototype,"currentIndicator",2),a([l({type:String,reflect:!0})],zt.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],zt.prototype,"active",2),a([l({type:Boolean,reflect:!0})],zt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],zt.prototype,"visuallyDisabled",2),a([l({type:String,reflect:!0})],zt.prototype,"panel",2),a([C("active")],zt.prototype,"handleActiveChange",1),a([C(["disabled","visually-disabled"])],zt.prototype,"handleDisabledChange",1),zt=a([w("sd-tab")],zt);var Ct=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.tabs=[];this.panels=[];this.hasScrollControls=!1;this.variant="default";this.canScroll={left:!1,right:!1};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.repositionIndicator()}),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),this.nav.addEventListener("scroll",()=>this.handleScroll()),t.then(()=>{new IntersectionObserver((r,o)=>{var n;r[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((n=this.activeTab)!=null?n:this.tabs[0],{emitEvents:!1}),o.unobserve(r[0].target))}).observe(this.tabGroup)})})}updated(t){!t.get("canScroll")&&this.canScroll&&this.handleScroll()}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()),d=this.tabs[n+1];r!==null&&d&&ee(d,this.nav,"horizontal")}if(["Shift","Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab()),d=this.tabs[n-1];r!==null&&d&&ee(d,this.nav,"horizontal")}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let n=this.tabs.find(c=>c.matches(":focus")),d=this.localize.dir()==="rtl";if((n==null?void 0:n.tagName.toLowerCase())==="sd-tab"){let c=this.tabs.indexOf(n);t.key==="Home"?c=0:t.key==="End"?c=this.tabs.length-1:t.key===(d?"ArrowRight":"ArrowLeft")||t.key==="ArrowUp"?c--:(t.key===(d?"ArrowLeft":"ArrowRight")||t.key==="ArrowDown")&&c++,c<0&&(c=this.tabs.length-1),c>this.tabs.length-1&&(c=0),this.tabs[c].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[c],{scrollBehavior:"smooth"}),ee(this.tabs[c],this.nav,"horizontal"),t.preventDefault()}}}}handleScroll(){this.canScroll={left:this.nav.scrollLeft>0,right:this.nav.scrollLeft+this.nav.clientWidth<this.nav.scrollWidth-1}}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=N({emitEvents:!0,scrollBehavior:"auto"},e),t!==this.activeTab&&!t.disabled&&!t.visuallyDisabled){let r=this.activeTab;this.activeTab=t,this.tabs.map(o=>o.active=o===this.activeTab),this.panels.map(o=>{var n;return o.active=o.name===((n=this.activeTab)==null?void 0:n.panel)}),this.repositionIndicator(),ee(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.repositionIndicator(),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}async repositionIndicator(){await this.updateComplete;let t=this.activeTab,e=this.indicator,r=this.tabsContainer;if(!t||!e||!r||t.variant==="container")return;let o=t.getBoundingClientRect(),n=r.getBoundingClientRect(),d=getComputedStyle(r).justifyContent==="center",c=n.left+n.width/2,p=o.left+o.width/2,m=t.offsetWidth,f=d?p-c:o.left-n.left;e.style.width=`${m}px`,e.style.transform=`translateX(${f}px)`}show(t){let e=this.tabs.find(r=>r.panel===t);e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}render(){var e;let t=this.localize.dir()==="rtl";return u`<div part="base" class="${h("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${h(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" disabled="${E(!this.canScroll.left||void 0)}" class="${h("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="_internal" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${h("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="${h("flex flex-auto relative flex-row")}" role="tablist">${((e=this.activeTab)==null?void 0:e.variant)!=="container"?u`<div part="active-tab-indicator" id="indicator" class="absolute h-1 bg-accent bottom-0 transition-[transform,width] duration-medium ease-in-out z-30"></div>`:""}<div part="separation" class="border-neutral-400 absolute w-full h-0.25 bottom-0 border-b z-10"></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" disabled="${E(!this.canScroll.right||void 0)}" class="${h("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="_internal" name="${t?"chevron-down":"chevron-up"}" label="next" class="${h("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}</div><slot part="body" class="${h("block auto py-8 px-6",this.variant==="container"&&"border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`}};Ct.styles=[...g.styles,x`: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)}::slotted(sd-tab-panel){--padding:1rem 0}::slotted(sd-tab-panel:focus-visible){outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],a([v("[part=base]")],Ct.prototype,"tabGroup",2),a([v("[part=body]")],Ct.prototype,"body",2),a([v("[part=scroll-container]")],Ct.prototype,"nav",2),a([v("[part=active-tab-indicator]")],Ct.prototype,"indicator",2),a([v('[part="tabs"]')],Ct.prototype,"tabsContainer",2),a([L()],Ct.prototype,"hasScrollControls",2),a([L()],Ct.prototype,"variant",2),a([L()],Ct.prototype,"canScroll",2),a([l({type:String,reflect:!0})],Ct.prototype,"activation",2),a([di(20)],Ct.prototype,"handleScroll",1),Ct=a([w("sd-tab-group")],Ct);var td=0,ne=class extends g{constructor(){super(...arguments);this.attrId=++td;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="${h("block",this.active&&"tab-panel--active")}"></slot>`}};ne.styles=[...g.styles,x`:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],a([l({type:String,reflect:!0})],ne.prototype,"name",2),a([l({type:Boolean,reflect:!0})],ne.prototype,"active",2),a([C("active")],ne.prototype,"handleActiveChange",1),ne=a([w("sd-tab-panel")],ne);var qt=class extends g{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new P(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="${h("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="${h("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="${h("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. <h2>)</slot></div><div part="meta" class="${h("gap-2 mb-4",!e["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${h(!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="${h("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]",this._orientation!=="vertical"&&this.reversedLayout&&"order-2")}"><slot name="media"></slot></div></div>`}};qt.styles=[...g.styles,x`: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}`],a([l({type:String,reflect:!0})],qt.prototype,"variant",2),a([l({reflect:!0,type:Number})],qt.prototype,"breakpoint",2),a([l({type:Boolean,reflect:!0})],qt.prototype,"inset",2),a([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],qt.prototype,"reversedLayout",2),a([v('[part="base"]')],qt.prototype,"teaser",2),a([L()],qt.prototype,"_orientation",2),qt=a([w("sd-teaser")],qt);var fe=class extends g{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new P(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="${h("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="${h({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. <h2>)</slot></div><div part="meta" class="${h("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${h("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="${h(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${h("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};fe.styles=[...g.styles,x`: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))}`],a([l({type:String,reflect:!0})],fe.prototype,"variant",2),a([v('[part="base"]')],fe.prototype,"teaserMedia",2),fe=a([w("sd-teaser-media")],fe);var R=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this);this.hasSlotController=new P(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,o){this.textarea.setRangeText(t,e,r,o),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,o=!!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",c={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||o?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${h(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="${h("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${h("absolute w-full h-full pointer-events-none border rounded-default 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"}[n])}"></div><div part="base" class="${h("textarea h-full flex items-top rounded-default group transition-colors duration-medium hover:duration-fast ease-in-out",{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="${h("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="${E(this.name)}" .value="${xe(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${E(this.placeholder)}" minlength="${E(this.minlength)}" maxlength="${E(this.maxlength)}" rows="${E(this.rows)}" autocapitalize="${E(this.autocapitalize)}" autocorrect="${E(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${E(this.spellcheck)}" enterkeyhint="${E(this.enterkeyhint)}" inputmode="${E(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="${h("text-error absolute right-4 pointer-events-none",c)}" library="_internal" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon class="${h("text-success absolute right-4 pointer-events-none",c)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${r?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};R.styles=[...g.styles,x`: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}`],a([v("#input")],R.prototype,"textarea",2),a([v("#invalid-message")],R.prototype,"invalidMessage",2),a([L()],R.prototype,"hasFocus",2),a([L()],R.prototype,"showValidStyle",2),a([L()],R.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],R.prototype,"title",2),a([l({type:String,reflect:!0})],R.prototype,"name",2),a([l()],R.prototype,"value",2),a([l({type:String,reflect:!0})],R.prototype,"size",2),a([l({type:String,reflect:!0})],R.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],R.prototype,"helpText",2),a([l({type:String,reflect:!0})],R.prototype,"placeholder",2),a([l({type:Number,reflect:!0})],R.prototype,"rows",2),a([l({type:Boolean,reflect:!0})],R.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],R.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],R.prototype,"readonly",2),a([l({type:String,reflect:!0})],R.prototype,"form",2),a([l({type:Boolean,reflect:!0})],R.prototype,"required",2),a([l({type:Number,reflect:!0})],R.prototype,"minlength",2),a([l({type:Number,reflect:!0})],R.prototype,"maxlength",2),a([l({type:String,reflect:!0})],R.prototype,"autocapitalize",2),a([l({type:String,reflect:!0})],R.prototype,"autocorrect",2),a([l({reflect:!0})],R.prototype,"autocomplete",2),a([l({type:Boolean,reflect:!0})],R.prototype,"autofocus",2),a([l({type:String,reflect:!0})],R.prototype,"enterkeyhint",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],R.prototype,"styleOnValid",2),a([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],R.prototype,"spellcheck",2),a([l({type:String,reflect:!0})],R.prototype,"inputmode",2),a([Bt()],R.prototype,"defaultValue",2),a([C("disabled",{waitUntilFirstUpdate:!0})],R.prototype,"handleDisabledChange",1),a([C("rows",{waitUntilFirstUpdate:!0})],R.prototype,"handleRowsChange",1),a([C("value",{waitUntilFirstUpdate:!0})],R.prototype,"handleValueChange",1),R=a([w("sd-textarea")],R);var ft=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.hasSlotController=new P(this,"[default]","content");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.hasSlotController.test("[default]")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(r=>{var o,n;r.nodeType===Node.TEXT_NODE&&!((o=r==null?void 0:r.textContent)!=null&&o.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=ai(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasTrigger("hover")){let t=ai(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 W(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=q(this,"tooltip.show",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await W(this.body);let{keyframes:t,options:e}=q(this,"tooltip.hide",{dir:this.localize.dir()});await K(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,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),J(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return u`<sd-popup part="base" exportparts="
|
|
160
|
+
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?this.checked?"border-error bg-error hover:bg-error-400 hover:border-error-400 group-hover:bg-error-400":"border-error bg-white hover:border-error-400 hover:bg-white group-hover:border-error-400 group-hover:bg-white":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="${h("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?this.checked?"bg-white translate-x-2":"bg-error -translate-x-2 hover:bg-error-400 hover:border-error-400 group-hover:border-error-400 group-hover:bg-error-400":this.checked?"bg-white translate-x-2":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${h("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.hasSlotController.test("tooltip")?u`<slot name="tooltip"></slot>`:null}</div>${this.formControlController.renderInvalidMessage()}`}};mt.styles=[...g.styles,x`: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:" *"}`],a([v("input")],mt.prototype,"input",2),a([v("#invalid-message")],mt.prototype,"invalidMessage",2),a([L()],mt.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],mt.prototype,"title",2),a([l({type:String,reflect:!0})],mt.prototype,"name",2),a([l()],mt.prototype,"value",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"checked",2),a([Rt("checked")],mt.prototype,"defaultChecked",2),a([l({reflect:!0})],mt.prototype,"form",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"required",2),a([C("disabled",{waitUntilFirstUpdate:!0})],mt.prototype,"handleDisabledChange",1),a([C(["checked"],{waitUntilFirstUpdate:!0})],mt.prototype,"handleStateChange",1),mt=a([w("sd-switch")],mt);var Jl=0,zt=class extends g{constructor(){super(...arguments);this.attrId=++Jl;this.componentId=`sd-tab-${this.attrId}`;this.hasSlotController=new P(this,"left");this.localize=new A(this);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="${h("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 transition-all duration-fast ease-in-out",this.variant==="container"&&"tab-container-border bg-white 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",this.active&&"z-20")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${h("flex h-full items-center justify-center whitespace-nowrap",this.disabled||this.visuallyDisabled&&"opacity-50 ")}"><slot name="left" class="${h(t.left&&"block pr-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><slot class="${h(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot>${this.variant==="container"?u`<div part="active-tab-indicator" class="${h("absolute bottom-0 h-1 bg-accent w-3/4 bottom-0 group-hover:w-full")}"></div>`:""}<div part="hover-bottom-border" class="${h(!this.active&&!this.disabled&&"absolute bottom-0 left-0 w-full h-0.25 border-b border-transparent group-hover:border-b-neutral-400 transition-[border] duration-fast ease-in-out")}"></div></div></div>`}};zt.styles=[...g.styles,x`:host{box-sizing:border-box;display:inline-block}:host(:hover)::part(hover-bottom-border){--tw-border-opacity:1;border-bottom-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1))}.tab-container-border:after{border-color:transparent;border-width:1px;--tw-content:""}.tab--active-container-border:after,.tab-container-border:after{content:var(--tw-content);height:100%;position:absolute;width:100%}.tab--active-container-border:after{border-width:1px;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:border;transition-timing-function:cubic-bezier(.4,0,.2,1);--tw-content:"";border-bottom:none;border-radius:4px 4px 0 0}[part=active-tab-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,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([active]) [part=active-tab-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,transform var(--sd-duration-fast) ease-in-out}`],a([v("[part=base]")],zt.prototype,"tab",2),a([v("[part=active-tab-indicator]")],zt.prototype,"currentIndicator",2),a([l({type:String,reflect:!0})],zt.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],zt.prototype,"active",2),a([l({type:Boolean,reflect:!0})],zt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],zt.prototype,"visuallyDisabled",2),a([l({type:String,reflect:!0})],zt.prototype,"panel",2),a([C("active")],zt.prototype,"handleActiveChange",1),a([C(["disabled","visually-disabled"])],zt.prototype,"handleDisabledChange",1),zt=a([w("sd-tab")],zt);var Ct=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.tabs=[];this.panels=[];this.hasScrollControls=!1;this.variant="default";this.canScroll={left:!1,right:!1};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.repositionIndicator()}),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),this.nav.addEventListener("scroll",()=>this.handleScroll()),t.then(()=>{new IntersectionObserver((r,o)=>{var n;r[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((n=this.activeTab)!=null?n:this.tabs[0],{emitEvents:!1}),o.unobserve(r[0].target))}).observe(this.tabGroup)})})}updated(t){!t.get("canScroll")&&this.canScroll&&this.handleScroll()}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()),d=this.tabs[n+1];r!==null&&d&&ee(d,this.nav,"horizontal")}if(["Shift","Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab()),d=this.tabs[n-1];r!==null&&d&&ee(d,this.nav,"horizontal")}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let n=this.tabs.find(c=>c.matches(":focus")),d=this.localize.dir()==="rtl";if((n==null?void 0:n.tagName.toLowerCase())==="sd-tab"){let c=this.tabs.indexOf(n);t.key==="Home"?c=0:t.key==="End"?c=this.tabs.length-1:t.key===(d?"ArrowRight":"ArrowLeft")||t.key==="ArrowUp"?c--:(t.key===(d?"ArrowLeft":"ArrowRight")||t.key==="ArrowDown")&&c++,c<0&&(c=this.tabs.length-1),c>this.tabs.length-1&&(c=0),this.tabs[c].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[c],{scrollBehavior:"smooth"}),ee(this.tabs[c],this.nav,"horizontal"),t.preventDefault()}}}}handleScroll(){this.canScroll={left:this.nav.scrollLeft>0,right:this.nav.scrollLeft+this.nav.clientWidth<this.nav.scrollWidth-1}}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=N({emitEvents:!0,scrollBehavior:"auto"},e),t!==this.activeTab&&!t.disabled&&!t.visuallyDisabled){let r=this.activeTab;this.activeTab=t,this.tabs.map(o=>o.active=o===this.activeTab),this.panels.map(o=>{var n;return o.active=o.name===((n=this.activeTab)==null?void 0:n.panel)}),this.repositionIndicator(),ee(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.repositionIndicator(),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}async repositionIndicator(){await this.updateComplete;let t=this.activeTab,e=this.indicator,r=this.tabsContainer;if(!t||!e||!r||t.variant==="container")return;let o=t.getBoundingClientRect(),n=r.getBoundingClientRect(),d=getComputedStyle(r).justifyContent==="center",c=n.left+n.width/2,p=o.left+o.width/2,m=t.offsetWidth,f=d?p-c:o.left-n.left;e.style.width=`${m}px`,e.style.transform=`translateX(${f}px)`}show(t){let e=this.tabs.find(r=>r.panel===t);e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}render(){var e;let t=this.localize.dir()==="rtl";return u`<div part="base" class="${h("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${h(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" disabled="${E(!this.canScroll.left||void 0)}" class="${h("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="_internal" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${h("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="${h("flex flex-auto relative flex-row")}" role="tablist">${((e=this.activeTab)==null?void 0:e.variant)!=="container"?u`<div part="active-tab-indicator" id="indicator" class="absolute h-1 bg-accent bottom-0 transition-[transform,width] duration-medium ease-in-out z-30"></div>`:""}<div part="separation" class="border-neutral-400 absolute w-full h-0.25 bottom-0 border-b z-10"></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" disabled="${E(!this.canScroll.right||void 0)}" class="${h("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="_internal" name="${t?"chevron-down":"chevron-up"}" label="next" class="${h("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}</div><slot part="body" class="${h("block auto py-8 px-6",this.variant==="container"&&"border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`}};Ct.styles=[...g.styles,x`: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)}::slotted(sd-tab-panel){--padding:1rem 0}::slotted(sd-tab-panel:focus-visible){outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],a([v("[part=base]")],Ct.prototype,"tabGroup",2),a([v("[part=body]")],Ct.prototype,"body",2),a([v("[part=scroll-container]")],Ct.prototype,"nav",2),a([v("[part=active-tab-indicator]")],Ct.prototype,"indicator",2),a([v('[part="tabs"]')],Ct.prototype,"tabsContainer",2),a([L()],Ct.prototype,"hasScrollControls",2),a([L()],Ct.prototype,"variant",2),a([L()],Ct.prototype,"canScroll",2),a([l({type:String,reflect:!0})],Ct.prototype,"activation",2),a([pi(20)],Ct.prototype,"handleScroll",1),Ct=a([w("sd-tab-group")],Ct);var td=0,ne=class extends g{constructor(){super(...arguments);this.attrId=++td;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="${h("block",this.active&&"tab-panel--active")}"></slot>`}};ne.styles=[...g.styles,x`:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],a([l({type:String,reflect:!0})],ne.prototype,"name",2),a([l({type:Boolean,reflect:!0})],ne.prototype,"active",2),a([C("active")],ne.prototype,"handleActiveChange",1),ne=a([w("sd-tab-panel")],ne);var qt=class extends g{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new P(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="${h("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="${h("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="${h("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. <h2>)</slot></div><div part="meta" class="${h("gap-2 mb-4",!e["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${h(!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="${h("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]",this._orientation!=="vertical"&&this.reversedLayout&&"order-2")}"><slot name="media"></slot></div></div>`}};qt.styles=[...g.styles,x`: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}`],a([l({type:String,reflect:!0})],qt.prototype,"variant",2),a([l({reflect:!0,type:Number})],qt.prototype,"breakpoint",2),a([l({type:Boolean,reflect:!0})],qt.prototype,"inset",2),a([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],qt.prototype,"reversedLayout",2),a([v('[part="base"]')],qt.prototype,"teaser",2),a([L()],qt.prototype,"_orientation",2),qt=a([w("sd-teaser")],qt);var fe=class extends g{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new P(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="${h("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="${h({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. <h2>)</slot></div><div part="meta" class="${h("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${h("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="${h(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${h("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};fe.styles=[...g.styles,x`: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))}`],a([l({type:String,reflect:!0})],fe.prototype,"variant",2),a([v('[part="base"]')],fe.prototype,"teaserMedia",2),fe=a([w("sd-teaser-media")],fe);var R=class extends g{constructor(){super(...arguments);this.formControlController=new pt(this);this.hasSlotController=new P(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,o){this.textarea.setRangeText(t,e,r,o),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,o=!!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",c={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||o?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${h(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="${h("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${h("absolute w-full h-full pointer-events-none border rounded-default 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"}[n])}"></div><div part="base" class="${h("textarea h-full flex items-top rounded-default group transition-colors duration-medium hover:duration-fast ease-in-out",{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="${h("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="${E(this.name)}" .value="${Ce(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${E(this.placeholder)}" minlength="${E(this.minlength)}" maxlength="${E(this.maxlength)}" rows="${E(this.rows)}" autocapitalize="${E(this.autocapitalize)}" autocorrect="${E(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${E(this.spellcheck)}" enterkeyhint="${E(this.enterkeyhint)}" inputmode="${E(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="${h("text-error absolute right-4 pointer-events-none",c)}" library="_internal" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon class="${h("text-success absolute right-4 pointer-events-none",c)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${r?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};R.styles=[...g.styles,x`: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}`],a([v("#input")],R.prototype,"textarea",2),a([v("#invalid-message")],R.prototype,"invalidMessage",2),a([L()],R.prototype,"hasFocus",2),a([L()],R.prototype,"showValidStyle",2),a([L()],R.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],R.prototype,"title",2),a([l({type:String,reflect:!0})],R.prototype,"name",2),a([l()],R.prototype,"value",2),a([l({type:String,reflect:!0})],R.prototype,"size",2),a([l({type:String,reflect:!0})],R.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],R.prototype,"helpText",2),a([l({type:String,reflect:!0})],R.prototype,"placeholder",2),a([l({type:Number,reflect:!0})],R.prototype,"rows",2),a([l({type:Boolean,reflect:!0})],R.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],R.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],R.prototype,"readonly",2),a([l({type:String,reflect:!0})],R.prototype,"form",2),a([l({type:Boolean,reflect:!0})],R.prototype,"required",2),a([l({type:Number,reflect:!0})],R.prototype,"minlength",2),a([l({type:Number,reflect:!0})],R.prototype,"maxlength",2),a([l({type:String,reflect:!0})],R.prototype,"autocapitalize",2),a([l({type:String,reflect:!0})],R.prototype,"autocorrect",2),a([l({reflect:!0})],R.prototype,"autocomplete",2),a([l({type:Boolean,reflect:!0})],R.prototype,"autofocus",2),a([l({type:String,reflect:!0})],R.prototype,"enterkeyhint",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],R.prototype,"styleOnValid",2),a([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],R.prototype,"spellcheck",2),a([l({type:String,reflect:!0})],R.prototype,"inputmode",2),a([Rt()],R.prototype,"defaultValue",2),a([C("disabled",{waitUntilFirstUpdate:!0})],R.prototype,"handleDisabledChange",1),a([C("rows",{waitUntilFirstUpdate:!0})],R.prototype,"handleRowsChange",1),a([C("value",{waitUntilFirstUpdate:!0})],R.prototype,"handleValueChange",1),R=a([w("sd-textarea")],R);var ft=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.hasSlotController=new P(this,"[default]","content");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.hasSlotController.test("[default]")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(r=>{var o,n;r.nodeType===Node.TEXT_NODE&&!((o=r==null?void 0:r.textContent)!=null&&o.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=ai(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasTrigger("hover")){let t=ai(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 W(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=q(this,"tooltip.show",{dir:this.localize.dir()});await K(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await W(this.body);let{keyframes:t,options:e}=q(this,"tooltip.hide",{dir:this.localize.dir()});await K(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,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),J(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return u`<sd-popup part="base" exportparts="
|
|
161
161
|
popup:base__popup,
|
|
162
162
|
arrow:base__arrow
|
|
163
163
|
" class="${h(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="${h("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="_internal" name="info-circle" label="Tooltip" class="${h(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>`}};ft.styles=[...g.styles,x`: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}`],a([v("slot:not([name])")],ft.prototype,"defaultSlot",2),a([v("#tooltip")],ft.prototype,"body",2),a([v("sd-popup")],ft.prototype,"popup",2),a([l({type:String,reflect:!0})],ft.prototype,"size",2),a([l({type:String,reflect:!0})],ft.prototype,"content",2),a([l({type:String,reflect:!0})],ft.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],ft.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],ft.prototype,"open",2),a([l({type:String,reflect:!0})],ft.prototype,"trigger",2),a([l({type:Boolean,reflect:!0})],ft.prototype,"hoist",2),a([C("open",{waitUntilFirstUpdate:!0})],ft.prototype,"handleOpenChange",1),a([C(["content","hoist","placement"])],ft.prototype,"handleOptionsChange",1),a([C("disabled")],ft.prototype,"handleDisabledChange",1),ft=a([w("sd-tooltip")],ft);B("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});B("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var le=class extends g{constructor(){super(...arguments);this.localize=new A(this);this.playing=!1;this.isBelowBreakpoint=!1;this.hasSlotController=new P(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="${h(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="${h(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="${h(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-icon id="default-play-icon" library="_internal" 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>`}};le.styles=[...g.styles,x`: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}`],a([v("[part=base]")],le.prototype,"hostEl",2),a([l({type:Boolean,reflect:!0})],le.prototype,"playing",2),a([l({type:Boolean})],le.prototype,"isBelowBreakpoint",2),le=a([w("sd-video")],le);function ed(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"),o=n=>n[0];return r.addEventListener("init",()=>{var m,f;let n=(m=e.shadowRoot)==null?void 0:m.querySelector("ul");n==null||n.setAttribute("part","listbox");let d=document.createElement("sd-popup");d.appendChild(n),(f=e.shadowRoot)==null||f.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 c=o`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(c),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,c,p,m,f;(d=(n=e.shadowRoot)==null?void 0:n.querySelector("sd-popup"))==null||d.setAttribute("active","true"),(p=(c=e.shadowRoot)==null?void 0:c.querySelector('[part="border"]'))==null||p.classList.add("rounded-b-none"),(f=(m=e.shadowRoot)==null?void 0:m.querySelector('[part="form-control"]'))==null||f.classList.add("z-50")}),r.addEventListener("close",()=>{var n,d,c,p,m,f;(d=(n=e.shadowRoot)==null?void 0:n.querySelector("sd-popup"))==null||d.removeAttribute("active"),(p=(c=e.shadowRoot)==null?void 0:c.querySelector('[part="border"]'))==null||p.classList.remove("rounded-b-none"),(f=(m=e.shadowRoot)==null?void 0:m.querySelector('[part="form-control"]'))==null||f.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 Qa(id);})();
|