@swisspost/design-system-components 1.6.3 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{check-non-empty-ae713942.js → check-non-empty-eeaa8f77.js} +4 -4
- package/dist/cjs/check-non-empty-eeaa8f77.js.map +1 -0
- package/dist/cjs/index-8c288b1a.js +45 -0
- package/dist/cjs/index-8c288b1a.js.map +1 -0
- package/dist/cjs/{index-b619e205.js → index-c07c0cdb.js} +144 -65
- package/dist/cjs/index-c07c0cdb.js.map +1 -0
- package/dist/cjs/index.cjs.js +17 -12
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/package-989e0b36.js +7 -0
- package/dist/cjs/package-989e0b36.js.map +1 -0
- package/dist/cjs/post-accordion-bc0c6f31.js +87 -0
- package/dist/cjs/post-accordion-bc0c6f31.js.map +1 -0
- package/dist/cjs/post-accordion.cjs.entry.js +4 -80
- package/dist/cjs/post-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/post-alert-39ac30a4.js +101 -0
- package/dist/cjs/{post-alert-b46943e0.js.map → post-alert-39ac30a4.js.map} +1 -1
- package/dist/cjs/post-alert.cjs.entry.js +5 -6
- package/dist/cjs/post-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/{post-collapsible-04364cda.js → post-collapsible-85f8ace5.js} +69 -69
- package/dist/cjs/{post-collapsible-04364cda.js.map → post-collapsible-85f8ace5.js.map} +1 -1
- package/dist/cjs/post-collapsible.cjs.entry.js +4 -5
- package/dist/cjs/post-collapsible.cjs.entry.js.map +1 -1
- package/dist/cjs/post-components.cjs.js +3 -3
- package/dist/cjs/post-components.cjs.js.map +1 -1
- package/dist/cjs/post-icon-53e50c15.js +105 -0
- package/dist/cjs/post-icon-53e50c15.js.map +1 -0
- package/dist/cjs/post-icon.cjs.entry.js +5 -6
- package/dist/cjs/post-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/post-popover-5a75c1b2.js +118 -0
- package/dist/cjs/post-popover-5a75c1b2.js.map +1 -0
- package/dist/cjs/post-popover.cjs.entry.js +13 -0
- package/dist/cjs/post-popover.cjs.entry.js.map +1 -0
- package/dist/cjs/post-popovercontainer-84378594.js +1878 -0
- package/dist/cjs/post-popovercontainer-84378594.js.map +1 -0
- package/dist/cjs/post-popovercontainer.cjs.entry.js +13 -0
- package/dist/cjs/post-popovercontainer.cjs.entry.js.map +1 -0
- package/dist/cjs/post-tab-header-02c6e31e.js +33 -0
- package/dist/cjs/{post-tab-header-805c0a52.js.map → post-tab-header-02c6e31e.js.map} +1 -1
- package/dist/cjs/post-tab-header.cjs.entry.js +4 -4
- package/dist/cjs/post-tab-panel-3973b707.js +27 -0
- package/dist/cjs/{post-tab-panel-caa44a77.js.map → post-tab-panel-3973b707.js.map} +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/post-tabs-7a4fead7.js +153 -0
- package/dist/cjs/post-tabs-7a4fead7.js.map +1 -0
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{post-tooltip-32a9c549.js → post-tooltip-79a9c96d.js} +78 -1754
- package/dist/cjs/post-tooltip-79a9c96d.js.map +1 -0
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -4
- package/dist/cjs/post-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/animations/collapse.js +5 -5
- package/dist/collection/animations/collapse.js.map +1 -1
- package/dist/collection/collection-manifest.json +5 -3
- package/dist/collection/components/post-accordion/post-accordion.js +167 -166
- package/dist/collection/components/post-accordion/post-accordion.js.map +1 -1
- package/dist/collection/components/post-alert/post-alert.css +2 -2
- package/dist/collection/components/post-alert/post-alert.js +246 -246
- package/dist/collection/components/post-alert/post-alert.js.map +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +169 -168
- package/dist/collection/components/post-collapsible/post-collapsible.js.map +1 -1
- package/dist/collection/components/post-icon/post-icon.css +1 -1
- package/dist/collection/components/post-icon/post-icon.js +250 -250
- package/dist/collection/components/post-icon/post-icon.js.map +1 -1
- package/dist/collection/components/post-popover/post-popover.css +3 -0
- package/dist/collection/components/post-popover/post-popover.js +267 -0
- package/dist/collection/components/post-popover/post-popover.js.map +1 -0
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -0
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +288 -0
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js.map +1 -0
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +62 -62
- package/dist/collection/components/post-tab-header/post-tab-header.js.map +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +50 -50
- package/dist/collection/components/post-tab-panel/post-tab-panel.js.map +1 -1
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +224 -223
- package/dist/collection/components/post-tabs/post-tabs.js.map +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +192 -325
- package/dist/collection/components/post-tooltip/post-tooltip.js.map +1 -1
- package/dist/collection/index.js +3 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/is-motion-reduced.js +1 -1
- package/dist/collection/utils/is-motion-reduced.js.map +1 -1
- package/dist/collection/utils/property-checkers/check-non-empty.js +3 -3
- package/dist/collection/utils/property-checkers/check-non-empty.js.map +1 -1
- package/dist/collection/utils/property-checkers/check-one-of.js +2 -2
- package/dist/collection/utils/property-checkers/check-one-of.js.map +1 -1
- package/dist/collection/utils/property-checkers/check-pattern.js +2 -2
- package/dist/collection/utils/property-checkers/check-pattern.js.map +1 -1
- package/dist/collection/utils/property-checkers/check-type.js +10 -10
- package/dist/collection/utils/property-checkers/check-type.js.map +1 -1
- package/dist/collection/utils/property-checkers/empty-or.js +5 -5
- package/dist/collection/utils/property-checkers/empty-or.js.map +1 -1
- package/dist/components/check-non-empty.js +3 -3
- package/dist/components/check-non-empty.js.map +1 -1
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +22 -18
- package/dist/components/index2.js.map +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion.d.ts +2 -2
- package/dist/components/post-accordion.js +1 -101
- package/dist/components/post-accordion.js.map +1 -1
- package/dist/components/post-accordion2.js +105 -0
- package/dist/components/post-accordion2.js.map +1 -0
- package/dist/components/post-alert.d.ts +2 -2
- package/dist/components/post-alert2.js +119 -119
- package/dist/components/post-alert2.js.map +1 -1
- package/dist/components/post-collapsible.d.ts +2 -2
- package/dist/components/post-collapsible2.js +90 -90
- package/dist/components/post-collapsible2.js.map +1 -1
- package/dist/components/post-icon.d.ts +2 -2
- package/dist/components/post-icon2.js +118 -118
- package/dist/components/post-icon2.js.map +1 -1
- package/dist/components/post-popover.d.ts +11 -0
- package/dist/components/post-popover.js +8 -0
- package/dist/components/post-popover.js.map +1 -0
- package/dist/components/post-popover2.js +144 -0
- package/dist/components/post-popover2.js.map +1 -0
- package/dist/components/post-popovercontainer.d.ts +11 -0
- package/dist/components/post-popovercontainer.js +8 -0
- package/dist/components/post-popovercontainer.js.map +1 -0
- package/dist/components/post-popovercontainer2.js +1897 -0
- package/dist/components/post-popovercontainer2.js.map +1 -0
- package/dist/components/post-tab-header.d.ts +2 -2
- package/dist/components/post-tab-header2.js +38 -38
- package/dist/components/post-tab-header2.js.map +1 -1
- package/dist/components/post-tab-panel.d.ts +2 -2
- package/dist/components/post-tab-panel2.js +30 -30
- package/dist/components/post-tab-panel2.js.map +1 -1
- package/dist/components/post-tabs.d.ts +2 -2
- package/dist/components/post-tabs2.js +147 -147
- package/dist/components/post-tabs2.js.map +1 -1
- package/dist/components/post-tooltip.d.ts +2 -2
- package/dist/components/post-tooltip2.js +100 -1774
- package/dist/components/post-tooltip2.js.map +1 -1
- package/dist/docs.d.ts +1 -21
- package/dist/docs.json +604 -77
- package/dist/esm/check-non-empty-58bd6b17.js +11 -0
- package/dist/esm/{check-non-empty-09c39561.js.map → check-non-empty-58bd6b17.js.map} +1 -1
- package/dist/esm/index-1427953c.js +40 -0
- package/dist/esm/index-1427953c.js.map +1 -0
- package/dist/esm/{index-4eff5fc5.js → index-35998e08.js} +144 -65
- package/dist/esm/index-35998e08.js.map +1 -0
- package/dist/esm/index.js +14 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-e13ef9ad.js +5 -0
- package/dist/esm/package-e13ef9ad.js.map +1 -0
- package/dist/esm/post-accordion-8e96598a.js +85 -0
- package/dist/esm/post-accordion-8e96598a.js.map +1 -0
- package/dist/esm/post-accordion.entry.js +3 -83
- package/dist/esm/post-accordion.entry.js.map +1 -1
- package/dist/esm/post-alert-5e352303.js +99 -0
- package/dist/esm/{post-alert-e457e249.js.map → post-alert-5e352303.js.map} +1 -1
- package/dist/esm/post-alert.entry.js +5 -6
- package/dist/esm/post-alert.entry.js.map +1 -1
- package/dist/esm/{post-collapsible-c0a826b2.js → post-collapsible-3cc5dd87.js} +69 -69
- package/dist/esm/{post-collapsible-c0a826b2.js.map → post-collapsible-3cc5dd87.js.map} +1 -1
- package/dist/esm/post-collapsible.entry.js +4 -5
- package/dist/esm/post-collapsible.entry.js.map +1 -1
- package/dist/esm/post-components.js +4 -4
- package/dist/esm/post-components.js.map +1 -1
- package/dist/esm/post-icon-fdda3f99.js +103 -0
- package/dist/esm/post-icon-fdda3f99.js.map +1 -0
- package/dist/esm/post-icon.entry.js +5 -6
- package/dist/esm/post-icon.entry.js.map +1 -1
- package/dist/esm/post-popover-ff2c259f.js +116 -0
- package/dist/esm/post-popover-ff2c259f.js.map +1 -0
- package/dist/esm/post-popover.entry.js +5 -0
- package/dist/esm/post-popover.entry.js.map +1 -0
- package/dist/esm/post-popovercontainer-f4cd18cd.js +1876 -0
- package/dist/esm/post-popovercontainer-f4cd18cd.js.map +1 -0
- package/dist/esm/post-popovercontainer.entry.js +5 -0
- package/dist/esm/post-popovercontainer.entry.js.map +1 -0
- package/dist/esm/post-tab-header-486b267b.js +31 -0
- package/dist/esm/{post-tab-header-f0c355d6.js.map → post-tab-header-486b267b.js.map} +1 -1
- package/dist/esm/post-tab-header.entry.js +4 -4
- package/dist/esm/post-tab-panel-13940300.js +25 -0
- package/dist/esm/{post-tab-panel-46f02247.js.map → post-tab-panel-13940300.js.map} +1 -1
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/post-tabs-6f44ed1d.js +151 -0
- package/dist/esm/post-tabs-6f44ed1d.js.map +1 -0
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/{post-tooltip-fa7b4a0a.js → post-tooltip-1d99cd0c.js} +78 -1754
- package/dist/esm/post-tooltip-1d99cd0c.js.map +1 -0
- package/dist/esm/post-tooltip.entry.js +3 -4
- package/dist/esm/post-tooltip.entry.js.map +1 -1
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-169b8ef7.entry.js +2 -0
- package/dist/post-components/p-28be44d7.js +2 -0
- package/dist/post-components/{p-8b6fe20d.js.map → p-28be44d7.js.map} +1 -1
- package/dist/post-components/p-3ef3a1d2.js +2 -0
- package/dist/post-components/p-3ef3a1d2.js.map +1 -0
- package/dist/post-components/p-4b94c2a1.entry.js +2 -0
- package/dist/post-components/p-4cbb5212.entry.js +2 -0
- package/dist/post-components/p-51ae6f46.entry.js +2 -0
- package/dist/post-components/p-668bf58c.entry.js +2 -0
- package/dist/post-components/p-67d0a4fa.entry.js +2 -0
- package/dist/post-components/p-6b3a5063.entry.js +2 -0
- package/dist/post-components/{p-3604be27.js → p-6cdc82c6.js} +2 -2
- package/dist/post-components/p-723336f2.js +2 -0
- package/dist/post-components/{p-ca1e407c.js.map → p-723336f2.js.map} +1 -1
- package/dist/post-components/p-7d08e4f1.js +2 -0
- package/dist/post-components/p-7d08e4f1.js.map +1 -0
- package/dist/post-components/p-81591ad0.js +3 -0
- package/dist/post-components/p-81591ad0.js.map +1 -0
- package/dist/post-components/p-96f4ebc4.js +2 -0
- package/dist/post-components/p-96f4ebc4.js.map +1 -0
- package/dist/post-components/p-9b1b6e06.entry.js +2 -0
- package/dist/post-components/{p-9f71d450.js → p-a5a23448.js} +2 -2
- package/dist/post-components/p-aca6e9c1.js +2 -0
- package/dist/post-components/{p-fffce1d7.js.map → p-aca6e9c1.js.map} +1 -1
- package/dist/post-components/{p-b531475e.js → p-b095519d.js} +1 -1
- package/dist/post-components/p-bc27f061.js +9 -0
- package/dist/post-components/p-bc27f061.js.map +1 -0
- package/dist/post-components/p-bd1d0117.js +2 -0
- package/dist/post-components/p-bd1d0117.js.map +1 -0
- package/dist/post-components/p-d3ed113e.js +2 -0
- package/dist/post-components/p-d3ed113e.js.map +1 -0
- package/dist/post-components/p-d8365401.entry.js +2 -0
- package/dist/post-components/p-d8365401.entry.js.map +1 -0
- package/dist/post-components/p-e78d158d.entry.js +2 -0
- package/dist/post-components/p-e78d158d.entry.js.map +1 -0
- package/dist/post-components/{p-7b8797c6.entry.js → p-f695aab4.js} +2 -2
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/post-components/post-components.esm.js.map +1 -1
- package/dist/types/components/post-accordion/post-accordion.d.ts +26 -26
- package/dist/types/components/post-alert/post-alert.d.ts +45 -45
- package/dist/types/components/post-collapsible/post-collapsible.d.ts +31 -31
- package/dist/types/components/post-icon/post-icon.d.ts +43 -43
- package/dist/types/components/post-popover/post-popover.d.ts +53 -0
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +62 -0
- package/dist/types/components/post-tab-header/post-tab-header.d.ts +9 -9
- package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +8 -8
- package/dist/types/components/post-tabs/post-tabs.d.ts +32 -32
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +35 -62
- package/dist/types/components.d.ts +115 -10
- package/dist/types/index.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +8 -0
- package/package.json +15 -13
- package/dist/cjs/check-non-empty-ae713942.js.map +0 -1
- package/dist/cjs/check-one-of-27ad3154.js +0 -10
- package/dist/cjs/check-one-of-27ad3154.js.map +0 -1
- package/dist/cjs/index-b38a23e0.js +0 -41
- package/dist/cjs/index-b38a23e0.js.map +0 -1
- package/dist/cjs/index-b619e205.js.map +0 -1
- package/dist/cjs/package-4e9ab85c.js +0 -7
- package/dist/cjs/package-4e9ab85c.js.map +0 -1
- package/dist/cjs/post-alert-b46943e0.js +0 -101
- package/dist/cjs/post-icon-5b36814e.js +0 -105
- package/dist/cjs/post-icon-5b36814e.js.map +0 -1
- package/dist/cjs/post-tab-header-805c0a52.js +0 -33
- package/dist/cjs/post-tab-panel-caa44a77.js +0 -27
- package/dist/cjs/post-tabs-29d4dc70.js +0 -153
- package/dist/cjs/post-tabs-29d4dc70.js.map +0 -1
- package/dist/cjs/post-tooltip-32a9c549.js.map +0 -1
- package/dist/components/check-one-of.js +0 -8
- package/dist/components/check-one-of.js.map +0 -1
- package/dist/esm/check-non-empty-09c39561.js +0 -11
- package/dist/esm/check-one-of-74750af9.js +0 -8
- package/dist/esm/check-one-of-74750af9.js.map +0 -1
- package/dist/esm/index-35921354.js +0 -36
- package/dist/esm/index-35921354.js.map +0 -1
- package/dist/esm/index-4eff5fc5.js.map +0 -1
- package/dist/esm/package-b9b10dd3.js +0 -5
- package/dist/esm/package-b9b10dd3.js.map +0 -1
- package/dist/esm/post-alert-e457e249.js +0 -99
- package/dist/esm/post-icon-b34da686.js +0 -103
- package/dist/esm/post-icon-b34da686.js.map +0 -1
- package/dist/esm/post-tab-header-f0c355d6.js +0 -31
- package/dist/esm/post-tab-panel-46f02247.js +0 -25
- package/dist/esm/post-tabs-5dd55290.js +0 -151
- package/dist/esm/post-tabs-5dd55290.js.map +0 -1
- package/dist/esm/post-tooltip-fa7b4a0a.js.map +0 -1
- package/dist/post-components/p-1339f8cd.js +0 -2
- package/dist/post-components/p-1339f8cd.js.map +0 -1
- package/dist/post-components/p-195b8c88.entry.js +0 -2
- package/dist/post-components/p-3225e008.entry.js +0 -2
- package/dist/post-components/p-61ffffa9.entry.js +0 -2
- package/dist/post-components/p-88262544.js +0 -2
- package/dist/post-components/p-8b6fe20d.js +0 -2
- package/dist/post-components/p-a7649277.js +0 -3
- package/dist/post-components/p-a7649277.js.map +0 -1
- package/dist/post-components/p-a7c78dea.entry.js +0 -2
- package/dist/post-components/p-b2c3ed97.entry.js +0 -2
- package/dist/post-components/p-ba9aba3a.entry.js +0 -2
- package/dist/post-components/p-bd293ff3.entry.js +0 -2
- package/dist/post-components/p-ca1e407c.js +0 -2
- package/dist/post-components/p-d407b1c3.js +0 -2
- package/dist/post-components/p-d407b1c3.js.map +0 -1
- package/dist/post-components/p-dfe29f7f.js +0 -2
- package/dist/post-components/p-dfe29f7f.js.map +0 -1
- package/dist/post-components/p-fd7015ae.js +0 -9
- package/dist/post-components/p-fd7015ae.js.map +0 -1
- package/dist/post-components/p-fffce1d7.js +0 -2
- /package/dist/post-components/{p-195b8c88.entry.js.map → p-169b8ef7.entry.js.map} +0 -0
- /package/dist/post-components/{p-3225e008.entry.js.map → p-4b94c2a1.entry.js.map} +0 -0
- /package/dist/post-components/{p-61ffffa9.entry.js.map → p-4cbb5212.entry.js.map} +0 -0
- /package/dist/post-components/{p-88262544.js.map → p-51ae6f46.entry.js.map} +0 -0
- /package/dist/post-components/{p-a7c78dea.entry.js.map → p-668bf58c.entry.js.map} +0 -0
- /package/dist/post-components/{p-b2c3ed97.entry.js.map → p-67d0a4fa.entry.js.map} +0 -0
- /package/dist/post-components/{p-ba9aba3a.entry.js.map → p-6b3a5063.entry.js.map} +0 -0
- /package/dist/post-components/{p-3604be27.js.map → p-6cdc82c6.js.map} +0 -0
- /package/dist/post-components/{p-bd293ff3.entry.js.map → p-9b1b6e06.entry.js.map} +0 -0
- /package/dist/post-components/{p-9f71d450.js.map → p-a5a23448.js.map} +0 -0
- /package/dist/post-components/{p-b531475e.js.map → p-b095519d.js.map} +0 -0
- /package/dist/post-components/{p-7b8797c6.entry.js.map → p-f695aab4.js.map} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export { P as post_tooltip } from './post-tooltip-
|
|
2
|
-
import './index-
|
|
3
|
-
import './package-
|
|
4
|
-
import './check-one-of-74750af9.js';
|
|
1
|
+
export { P as post_tooltip } from './post-tooltip-1d99cd0c.js';
|
|
2
|
+
import './index-35998e08.js';
|
|
3
|
+
import './package-e13ef9ad.js';
|
|
5
4
|
|
|
6
5
|
//# sourceMappingURL=post-tooltip.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"post-tooltip.entry.js","mappings":"
|
|
1
|
+
{"file":"post-tooltip.entry.js","mappings":";;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{P as PostAlert}from"./p-
|
|
1
|
+
export{P as PostAccordion}from"./p-f695aab4.js";export{P as PostAlert}from"./p-28be44d7.js";export{P as PostCollapsible}from"./p-6cdc82c6.js";export{P as PostIcon}from"./p-d3ed113e.js";export{P as PostPopover}from"./p-3ef3a1d2.js";export{P as PostPopovercontainer}from"./p-7d08e4f1.js";export{P as PostTabs}from"./p-aca6e9c1.js";export{P as PostTabHeader}from"./p-723336f2.js";export{P as PostTabPanel}from"./p-a5a23448.js";export{P as PostTooltip}from"./p-bc27f061.js";import"./p-81591ad0.js";import"./p-bd1d0117.js";import"./p-2737eaf5.js";import"./p-96f4ebc4.js";import"./p-440193f4.js";import"./p-b095519d.js";
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as o,h as e,H as r,g as i}from"./p-81591ad0.js";import{v as a}from"./p-bd1d0117.js";import{f as s}from"./p-2737eaf5.js";import{c as n,a as l,b as c}from"./p-96f4ebc4.js";import{c as g}from"./p-b095519d.js";const p=["primary","success","danger","warning","info","gray"];const h="/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */.alert-primary,.alert-success,.alert-danger,.alert-warning,.alert-info,.alert-gray,.alert-notification,.alert-error{background-color:rgb(var(--post-bg-rgb)) !important;color:var(--post-contrast-color) !important}.alert-warning,.alert-info,.alert-gray{--post-contrast-color:#000;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-primary:hsl(0, 0%, 20%);--post-white:#fff;--post-black:#000;--post-info:#cce4ee;--post-success:#2c911c;--post-warning:#f49e00;--post-danger:#a51728;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-success-green:#2c871d;--post-error-red:#a51728;--post-warning-orange:#f49e00;--post-success-background:#c0debb;--post-error-background:#ffdade;--post-warning-background:#fce2b2;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-yellow-rgb:255, 204, 0;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-primary-rgb:51, 51, 51;--post-white-rgb:255, 255, 255;--post-black-rgb:0, 0, 0;--post-info-rgb:204, 228, 238;--post-success-rgb:44, 145, 28;--post-warning-rgb:244, 158, 0;--post-danger-rgb:165, 23, 40;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160;--post-success-green-rgb:44, 135, 29;--post-error-red-rgb:165, 23, 40;--post-warning-orange-rgb:244, 158, 0;--post-success-background-rgb:192, 222, 187;--post-error-background-rgb:255, 218, 222;--post-warning-background-rgb:252, 226, 178}.alert-primary,.alert-success,.alert-danger,.alert-notification,.alert-error{--post-contrast-color:#fff;--post-contrast-color-inverted:#000;--post-dark:#faf9f8;--post-light:hsl(0, 0%, 20%);--post-gray-80:hsl(0, 0%, 90%);--post-gray-60:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-20:hsl(0, 0%, 40%);--post-gray-10:hsl(0, 0%, 20%);--post-contrast-color-rgb:255, 255, 255;--post-contrast-color-inverted-rgb:0, 0, 0;--post-dark-rgb:250, 249, 248;--post-light-rgb:51, 51, 51;--post-gray-80-rgb:230, 230, 230;--post-gray-60-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-20-rgb:102, 102, 102;--post-gray-10-rgb:51, 51, 51}.alert{position:relative;box-sizing:border-box;min-height:5rem;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);border-radius:4px;padding:1rem 1.25rem;padding-inline-start:5.5rem;margin-block-end:1rem;font-size:1rem;font-weight:300}.alert.no-icon{min-height:3.5rem;padding-inline-start:1.25rem}.alert[class^=pi-],.alert[class*=\" pi-\"]{background-size:3rem;background-position:1.25rem 1rem;background-repeat:no-repeat}.alert[class^=pi-].no-icon,.alert[class*=\" pi-\"].no-icon{background-image:none}.alert::before{content:\"\";display:block}.alert::before,.alert>post-icon{position:absolute;height:3rem;width:3rem;left:1.25rem;top:1rem}.alert.no-icon::before,.alert[class^=pi-]::before,.alert[class*=\" pi-\"]::before{content:unset}.alert.no-icon>post-icon,.alert[class^=pi-]>post-icon,.alert[class*=\" pi-\"]>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.alert{filter:none !important;background-color:rgba(0,0,0,0) !important;border:2px solid WindowText}}.alert:not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert:not(.alert-action) a{font-weight:400}.alert:not(.alert-action) hr{margin-block:.5rem .75rem !important}.alert:not(.alert-action)>:only-child,.alert:not(.alert-action)>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert:not(.alert-action)>*{margin:0}.alert-heading{font-size:1.0625rem;font-weight:700}.alert-dismissible{pointer-events:auto;position:relative;padding-inline-end:4rem}.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:1.25rem}.alert-dismissible>.btn-close:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action{display:flex;flex-direction:row;align-items:center;gap:1.25rem}.alert-action>.alert-content{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert-action>.alert-content a{font-weight:400}.alert-action>.alert-content hr{margin-block:.5rem .75rem !important}.alert-action>.alert-content>:only-child,.alert-action>.alert-content>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action>.alert-content>*{margin:0}.alert-action>.alert-buttons{flex:0 0 auto;display:flex;align-items:center;gap:.5rem}@media (min-width: 780px){.alert-action.alert-dismissible>.btn-close{inset-block-start:calc(50% - 0.75rem)}}@media (max-width: 779.98px){.alert-action{flex-direction:column;align-items:stretch;padding-inline:1.25rem}.alert-action>.alert-content{padding-inline-start:4.25rem;padding-inline-end:2.75rem}.alert-action>.alert-buttons{display:flex}.alert-action>.alert-buttons>.btn{flex:1 0 0;width:100%}.alert-action>.alert-buttons>.btn:first-child{margin-inline-start:0}}.alert-fixed-bottom{position:fixed;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;margin-bottom:0;border-radius:0;z-index:1030}@media (min-width: 1441px){.alert-fixed-bottom{padding-inline-end:calc((100% - 1440px) / 2 + 120px + 1.25rem);padding-inline-start:calc(\n (100% - 1440px) / 2 + 120px + 1.25rem + 3rem + 1.25rem\n );background-position-x:calc((100% - 1440px) / 2 + 120px + 1.25rem + 1.5rem)}.alert-fixed-bottom::before{left:calc((100% - 1440px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.no-icon{padding-inline-start:calc((100% - 1440px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.alert-dismissible{padding-inline-end:calc(\n (100% - 1440px) / 2 + 120px + 1.25rem + 1.25rem + 1.5rem\n )}.alert-fixed-bottom.alert-dismissible>.btn-close{inset-inline-end:calc((100% - 1440px) / 2 + 120px + 1.25rem)}}.alert-primary{--post-bg-rgb:51, 51, 51}.alert-primary:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-primary:has(>post-icon)::before{content:none}.alert-primary>post-icon{background-color:#333}.alert-success{--post-bg-rgb:44, 145, 28}.alert-success:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-success:has(>post-icon)::before{content:none}.alert-success>post-icon{background-color:#2c911c}.alert-danger{--post-bg-rgb:165, 23, 40}.alert-danger:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-danger:has(>post-icon)::before{content:none}.alert-danger>post-icon{background-color:#a51728}.alert-warning{--post-bg-rgb:244, 158, 0}.alert-warning:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-warning:has(>post-icon)::before{content:none}.alert-warning>post-icon{background-color:#f49e00}.alert-info{--post-bg-rgb:204, 228, 238}.alert-info:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-info:has(>post-icon)::before{content:none}.alert-info>post-icon{background-color:#cce4ee}.alert-gray{--post-bg-rgb:244, 243, 241}.alert-gray:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.241 5.241 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.241 5.241 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.325 6.325 0 0 0-.325 1.997 6.598 6.598 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0c0-.735.599-1.333 1.334-1.333s1.333.598 1.333 1.333-.598 1.334-1.333 1.334-1.334-.598-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.19 13.19 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.647 11.647 0 0 0 2.359-.888.668.668 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.798 11.798 0 0 0 4 15.92'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.241 5.241 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.241 5.241 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.325 6.325 0 0 0-.325 1.997 6.598 6.598 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0c0-.735.599-1.333 1.334-1.333s1.333.598 1.333 1.333-.598 1.334-1.333 1.334-1.334-.598-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.19 13.19 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.647 11.647 0 0 0 2.359-.888.668.668 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.798 11.798 0 0 0 4 15.92'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-gray:has(>post-icon)::before{content:none}.alert-gray>post-icon{background-color:#f4f3f1}.alert-notification{--post-bg-rgb:51, 51, 51}.alert-notification:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-notification:has(>post-icon)::before{content:none}.alert-notification>post-icon{background-color:#333}.alert-error{--post-bg-rgb:165, 23, 40}.alert-error:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-error:has(>post-icon)::before{content:none}.alert-error>post-icon{background-color:#a51728}.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;outline:none;outline-offset:2px;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.btn-close::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor;content:\"\";display:block;height:1.5rem;width:1.5rem}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}.alert-heading>::slotted(h1){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h2){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h3){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h4){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h5){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h6){font-size:inherit !important;font-weight:inherit !important}";const d=class{constructor(e){t(this,e);this.dismissed=o(this,"dismissed",7);this.alertId=crypto.randomUUID();this.classes=undefined;this.hasActions=undefined;this.hasHeading=undefined;this.onDismissButtonClick=()=>this.dismiss();this.dismissible=false;this.dismissLabel=undefined;this.fixed=false;this.icon=undefined;this.type="primary"}validateDismissible(t=this.dismissible){n(t,"boolean",'The post-alert "dismissible" prop should be a boolean.');setTimeout((()=>this.validateDismissLabel()))}validateDismissLabel(t=this.dismissLabel){if(this.dismissible){g(t,'Dismissible post-alert\'s require a "dismiss-label" prop.')}}validateFixed(t=this.fixed){n(t,"boolean",'The post-alert "fixed" prop should be a boolean.')}validateIcon(t=this.icon){l(t,/\d{4}|none/,'The post-alert "icon" prop should be a 4-digits string.')}validateType(t=this.type){c(t,p,`The post-alert requires a type form: ${p.join(", ")}`)}connectedCallback(){this.validateDismissible();this.validateFixed();this.validateIcon();this.validateType()}componentWillRender(){var t;this.hasHeading=this.host.querySelectorAll("[slot=heading]").length>0;this.hasActions=this.host.querySelectorAll("[slot=actions]").length>0;this.classes=`alert alert-${(t=this.type)!==null&&t!==void 0?t:"primary"}`;if(this.dismissible)this.classes+=" alert-dismissible";if(this.hasActions)this.classes+=" alert-action";if(this.fixed)this.classes+=" alert-fixed-bottom";if(this.icon==="none")this.classes+=" no-icon"}async dismiss(){const t=s(this.host);await t.finished;this.host.remove();this.dismissed.emit()}render(){const t=[this.hasHeading&&e("div",{key:`${this.alertId}-heading`,class:"alert-heading"},e("slot",{name:"heading"})),e("slot",{key:`${this.alertId}-message`})];const o=[e("div",{key:`${this.alertId}-content`,class:"alert-content"},t),e("div",{key:`${this.alertId}-buttons`,class:"alert-buttons"},e("slot",{name:"actions"}))];return e(r,{"data-version":a},e("div",{role:"alert",class:this.classes},this.dismissible&&e("button",{class:"btn-close",onClick:this.onDismissButtonClick},e("span",{class:"visually-hidden"},this.dismissLabel)),this.icon&&this.icon!=="none"&&e("post-icon",{key:`${this.alertId}-icon`,name:this.icon}),this.hasActions?o:t))}get host(){return i(this)}static get watchers(){return{dismissible:["validateDismissible"],dismissLabel:["validateDismissLabel"],fixed:["validateFixed"],icon:["validateIcon"],type:["validateType"]}}};d.style=h;export{d as P};
|
|
2
|
+
//# sourceMappingURL=p-28be44d7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ALERT_TYPES","postAlertCss","PostAlert","crypto","randomUUID","this","dismiss","validateDismissible","isDismissible","dismissible","checkType","setTimeout","validateDismissLabel","dismissLabel","checkNonEmpty","validateFixed","isFixed","fixed","validateIcon","icon","checkEmptyOrPattern","validateType","type","checkEmptyOrOneOf","join","connectedCallback","componentWillRender","hasHeading","host","querySelectorAll","length","hasActions","classes","_a","dismissal","fadeOut","finished","remove","dismissed","emit","render","defaultAlertContent","h","key","alertId","class","name","actionAlertContent","Host","version","role","onClick","onDismissButtonClick"],"sources":["src/components/post-alert/alert-types.ts","src/components/post-alert/post-alert.scss?tag=post-alert&encapsulation=shadow","src/components/post-alert/post-alert.tsx"],"sourcesContent":["export const ALERT_TYPES = ['primary', 'success', 'danger', 'warning', 'info', 'gray'] as const;\n\nexport type AlertType = typeof ALERT_TYPES[number];\n","@use '@swisspost/design-system-styles/components/alert';\n@use '@swisspost/design-system-styles/components/close';\n@use '@swisspost/design-system-styles/core' as post;\n\n:host {\n display: block;\n\n ::slotted(*) {\n margin: 0 !important;\n }\n}\n\n.visually-hidden {\n @include post.visually-hidden();\n}\n\n@for $i from 1 through 6 {\n .alert-heading > ::slotted(h#{$i}) {\n font-size: inherit !important;\n font-weight: inherit !important;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { fadeOut } from '../../animations';\nimport { checkEmptyOrOneOf, checkEmptyOrPattern, checkNonEmpty, checkType } from '../../utils';\nimport { ALERT_TYPES, AlertType } from './alert-types';\n\n@Component({\n tag: 'post-alert',\n styleUrl: 'post-alert.scss',\n shadow: true,\n})\nexport class PostAlert {\n @Element() host: HTMLPostAlertElement;\n\n @State() alertId = crypto.randomUUID();\n @State() classes: string;\n @State() hasActions: boolean;\n @State() hasHeading: boolean;\n @State() onDismissButtonClick = () => this.dismiss();\n\n /**\n * If `true`, a close button (×) is displayed and the alert can be dismissed by the user.\n */\n @Prop() readonly dismissible: boolean = false;\n\n @Watch('dismissible')\n validateDismissible(isDismissible = this.dismissible) {\n checkType(isDismissible, 'boolean', 'The post-alert \"dismissible\" prop should be a boolean.');\n setTimeout(() => this.validateDismissLabel());\n }\n\n /**\n * The label to use for the close button of a dismissible alert.\n */\n @Prop() readonly dismissLabel: string;\n\n @Watch('dismissLabel')\n validateDismissLabel(dismissLabel = this.dismissLabel) {\n if (this.dismissible) {\n checkNonEmpty(dismissLabel, 'Dismissible post-alert\\'s require a \"dismiss-label\" prop.');\n }\n }\n\n /**\n * If `true`, the alert is positioned at the bottom of the window, from edge to edge.\n */\n @Prop() readonly fixed: boolean = false;\n\n @Watch('fixed')\n validateFixed(isFixed = this.fixed) {\n checkType(isFixed, 'boolean', 'The post-alert \"fixed\" prop should be a boolean.');\n }\n\n /**\n * The icon to display in the alert. By default, the icon depends on the alert type.\n *\n * If `none`, no icon is displayed.\n */\n @Prop() readonly icon: string;\n\n @Watch('icon')\n validateIcon(icon = this.icon) {\n checkEmptyOrPattern(icon, /\\d{4}|none/, 'The post-alert \"icon\" prop should be a 4-digits string.');\n }\n\n /**\n * The type of the alert.\n */\n @Prop() readonly type: AlertType = 'primary';\n\n @Watch('type')\n validateType(type = this.type) {\n checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);\n }\n\n /**\n * An event emitted when the alert element is dismissed, after the transition.\n * It has no payload and only relevant for dismissible alerts.\n */\n @Event() dismissed: EventEmitter<void>;\n\n connectedCallback() {\n this.validateDismissible();\n this.validateFixed();\n this.validateIcon();\n this.validateType();\n }\n\n componentWillRender() {\n this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;\n this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;\n\n this.classes = `alert alert-${this.type ?? 'primary'}`;\n if (this.dismissible) this.classes += ' alert-dismissible';\n if (this.hasActions) this.classes += ' alert-action';\n if (this.fixed) this.classes += ' alert-fixed-bottom';\n if (this.icon === 'none') this.classes += ' no-icon';\n }\n\n /**\n * Triggers alert dismissal programmatically (same as clicking on the close button (×)).\n */\n @Method()\n async dismiss() {\n const dismissal = fadeOut(this.host);\n\n await dismissal.finished;\n\n this.host.remove();\n this.dismissed.emit();\n }\n\n render() {\n const defaultAlertContent = [\n this.hasHeading && (\n <div key={`${this.alertId}-heading`} class=\"alert-heading\">\n <slot name=\"heading\"/>\n </div>\n ),\n <slot key={`${this.alertId}-message`}/>\n ];\n\n const actionAlertContent = [\n <div key={`${this.alertId}-content`} class=\"alert-content\">\n {defaultAlertContent}\n </div>,\n <div key={`${this.alertId}-buttons`} class=\"alert-buttons\">\n <slot name=\"actions\"/>\n </div>,\n ];\n\n return (\n <Host data-version={version}>\n <div role=\"alert\" class={this.classes}>\n {this.dismissible && (\n <button class=\"btn-close\" onClick={this.onDismissButtonClick}>\n <span class=\"visually-hidden\">{this.dismissLabel}</span>\n </button>\n )}\n\n {this.icon && this.icon !== 'none' && (\n <post-icon key={`${this.alertId}-icon`} name={this.icon} />\n )}\n\n {this.hasActions\n ? actionAlertContent\n : defaultAlertContent\n }\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"8NAAO,MAAMA,EAAc,CAAC,UAAW,UAAW,SAAU,UAAW,OAAQ,QCA/E,MAAMC,EAAe,
|
|
1
|
+
{"version":3,"names":["ALERT_TYPES","postAlertCss","PostAlert","crypto","randomUUID","this","dismiss","validateDismissible","isDismissible","dismissible","checkType","setTimeout","validateDismissLabel","dismissLabel","checkNonEmpty","validateFixed","isFixed","fixed","validateIcon","icon","checkEmptyOrPattern","validateType","type","checkEmptyOrOneOf","join","connectedCallback","componentWillRender","hasHeading","host","querySelectorAll","length","hasActions","classes","_a","dismissal","fadeOut","finished","remove","dismissed","emit","render","defaultAlertContent","h","key","alertId","class","name","actionAlertContent","Host","version","role","onClick","onDismissButtonClick"],"sources":["src/components/post-alert/alert-types.ts","src/components/post-alert/post-alert.scss?tag=post-alert&encapsulation=shadow","src/components/post-alert/post-alert.tsx"],"sourcesContent":["export const ALERT_TYPES = ['primary', 'success', 'danger', 'warning', 'info', 'gray'] as const;\n\nexport type AlertType = typeof ALERT_TYPES[number];\n","@use '@swisspost/design-system-styles/components/alert';\n@use '@swisspost/design-system-styles/components/close';\n@use '@swisspost/design-system-styles/core' as post;\n\n:host {\n display: block;\n\n ::slotted(*) {\n margin: 0 !important;\n }\n}\n\n.visually-hidden {\n @include post.visually-hidden();\n}\n\n@for $i from 1 through 6 {\n .alert-heading > ::slotted(h#{$i}) {\n font-size: inherit !important;\n font-weight: inherit !important;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { fadeOut } from '../../animations';\nimport { checkEmptyOrOneOf, checkEmptyOrPattern, checkNonEmpty, checkType } from '../../utils';\nimport { ALERT_TYPES, AlertType } from './alert-types';\n\n@Component({\n tag: 'post-alert',\n styleUrl: 'post-alert.scss',\n shadow: true,\n})\nexport class PostAlert {\n @Element() host: HTMLPostAlertElement;\n\n @State() alertId = crypto.randomUUID();\n @State() classes: string;\n @State() hasActions: boolean;\n @State() hasHeading: boolean;\n @State() onDismissButtonClick = () => this.dismiss();\n\n /**\n * If `true`, a close button (×) is displayed and the alert can be dismissed by the user.\n */\n @Prop() readonly dismissible: boolean = false;\n\n @Watch('dismissible')\n validateDismissible(isDismissible = this.dismissible) {\n checkType(isDismissible, 'boolean', 'The post-alert \"dismissible\" prop should be a boolean.');\n setTimeout(() => this.validateDismissLabel());\n }\n\n /**\n * The label to use for the close button of a dismissible alert.\n */\n @Prop() readonly dismissLabel: string;\n\n @Watch('dismissLabel')\n validateDismissLabel(dismissLabel = this.dismissLabel) {\n if (this.dismissible) {\n checkNonEmpty(dismissLabel, 'Dismissible post-alert\\'s require a \"dismiss-label\" prop.');\n }\n }\n\n /**\n * If `true`, the alert is positioned at the bottom of the window, from edge to edge.\n */\n @Prop() readonly fixed: boolean = false;\n\n @Watch('fixed')\n validateFixed(isFixed = this.fixed) {\n checkType(isFixed, 'boolean', 'The post-alert \"fixed\" prop should be a boolean.');\n }\n\n /**\n * The icon to display in the alert. By default, the icon depends on the alert type.\n *\n * If `none`, no icon is displayed.\n */\n @Prop() readonly icon: string;\n\n @Watch('icon')\n validateIcon(icon = this.icon) {\n checkEmptyOrPattern(icon, /\\d{4}|none/, 'The post-alert \"icon\" prop should be a 4-digits string.');\n }\n\n /**\n * The type of the alert.\n */\n @Prop() readonly type: AlertType = 'primary';\n\n @Watch('type')\n validateType(type = this.type) {\n checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);\n }\n\n /**\n * An event emitted when the alert element is dismissed, after the transition.\n * It has no payload and only relevant for dismissible alerts.\n */\n @Event() dismissed: EventEmitter<void>;\n\n connectedCallback() {\n this.validateDismissible();\n this.validateFixed();\n this.validateIcon();\n this.validateType();\n }\n\n componentWillRender() {\n this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;\n this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;\n\n this.classes = `alert alert-${this.type ?? 'primary'}`;\n if (this.dismissible) this.classes += ' alert-dismissible';\n if (this.hasActions) this.classes += ' alert-action';\n if (this.fixed) this.classes += ' alert-fixed-bottom';\n if (this.icon === 'none') this.classes += ' no-icon';\n }\n\n /**\n * Triggers alert dismissal programmatically (same as clicking on the close button (×)).\n */\n @Method()\n async dismiss() {\n const dismissal = fadeOut(this.host);\n\n await dismissal.finished;\n\n this.host.remove();\n this.dismissed.emit();\n }\n\n render() {\n const defaultAlertContent = [\n this.hasHeading && (\n <div key={`${this.alertId}-heading`} class=\"alert-heading\">\n <slot name=\"heading\"/>\n </div>\n ),\n <slot key={`${this.alertId}-message`}/>\n ];\n\n const actionAlertContent = [\n <div key={`${this.alertId}-content`} class=\"alert-content\">\n {defaultAlertContent}\n </div>,\n <div key={`${this.alertId}-buttons`} class=\"alert-buttons\">\n <slot name=\"actions\"/>\n </div>,\n ];\n\n return (\n <Host data-version={version}>\n <div role=\"alert\" class={this.classes}>\n {this.dismissible && (\n <button class=\"btn-close\" onClick={this.onDismissButtonClick}>\n <span class=\"visually-hidden\">{this.dismissLabel}</span>\n </button>\n )}\n\n {this.icon && this.icon !== 'none' && (\n <post-icon key={`${this.alertId}-icon`} name={this.icon} />\n )}\n\n {this.hasActions\n ? actionAlertContent\n : defaultAlertContent\n }\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"8NAAO,MAAMA,EAAc,CAAC,UAAW,UAAW,SAAU,UAAW,OAAQ,QCA/E,MAAMC,EAAe,k2nB,MCWRC,EAAS,M,2EAGDC,OAAOC,a,qGAIM,IAAMC,KAAKC,U,iBAKH,M,uCAuBN,M,8BAsBC,S,CA1CnC,mBAAAC,CAAoBC,EAAgBH,KAAKI,aACvCC,EAAUF,EAAe,UAAW,0DACpCG,YAAW,IAAMN,KAAKO,wB,CASxB,oBAAAA,CAAqBC,EAAeR,KAAKQ,cACvC,GAAIR,KAAKI,YAAa,CACpBK,EAAcD,EAAc,4D,EAUhC,aAAAE,CAAcC,EAAUX,KAAKY,OAC3BP,EAAUM,EAAS,UAAW,mD,CAWhC,YAAAE,CAAaC,EAAOd,KAAKc,MACvBC,EAAoBD,EAAM,aAAc,0D,CAS1C,YAAAE,CAAaC,EAAOjB,KAAKiB,MACvBC,EAAkBD,EAAMtB,EAAa,wCAAwCA,EAAYwB,KAAK,Q,CAShG,iBAAAC,GACEpB,KAAKE,sBACLF,KAAKU,gBACLV,KAAKa,eACLb,KAAKgB,c,CAGP,mBAAAK,G,MACErB,KAAKsB,WAAatB,KAAKuB,KAAKC,iBAAiB,kBAAkBC,OAAS,EACxEzB,KAAK0B,WAAa1B,KAAKuB,KAAKC,iBAAiB,kBAAkBC,OAAS,EAExEzB,KAAK2B,QAAU,gBAAeC,EAAA5B,KAAKiB,QAAI,MAAAW,SAAA,EAAAA,EAAI,YAC3C,GAAI5B,KAAKI,YAAaJ,KAAK2B,SAAW,qBACtC,GAAI3B,KAAK0B,WAAY1B,KAAK2B,SAAW,gBACrC,GAAI3B,KAAKY,MAAOZ,KAAK2B,SAAW,sBAChC,GAAI3B,KAAKc,OAAS,OAAQd,KAAK2B,SAAW,U,CAO5C,aAAM1B,GACJ,MAAM4B,EAAYC,EAAQ9B,KAAKuB,YAEzBM,EAAUE,SAEhB/B,KAAKuB,KAAKS,SACVhC,KAAKiC,UAAUC,M,CAGjB,MAAAC,GACE,MAAMC,EAAsB,CAC1BpC,KAAKsB,YACHe,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACzCH,EAAA,QAAMI,KAAK,aAGfJ,EAAA,QAAMC,IAAK,GAAGtC,KAAKuC,qBAGrB,MAAMG,EAAqB,CACzBL,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACxCJ,GAEHC,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACzCH,EAAA,QAAMI,KAAK,cAIf,OACEJ,EAACM,EAAI,gBAAeC,GAClBP,EAAA,OAAKQ,KAAK,QAAQL,MAAOxC,KAAK2B,SAC3B3B,KAAKI,aACJiC,EAAA,UAAQG,MAAM,YAAYM,QAAS9C,KAAK+C,sBACtCV,EAAA,QAAMG,MAAM,mBAAmBxC,KAAKQ,eAIvCR,KAAKc,MAAQd,KAAKc,OAAS,QAC1BuB,EAAA,aAAWC,IAAK,GAAGtC,KAAKuC,eAAgBE,KAAMzC,KAAKc,OAGpDd,KAAK0B,WACFgB,EACAN,G"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as t,H as e,g as s}from"./p-81591ad0.js";import{v as i}from"./p-bd1d0117.js";const r="/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;outline:none;outline-offset:2px;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.btn-close::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor;content:\"\";display:block;height:1.5rem;width:1.5rem}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;max-width:min(66vw,60rem)}@media (max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em}";const n=class{constructor(t){o(this,t);this.placement="top";this.closeButtonCaption=undefined;this.arrow=true;this.localTogglePopover=o=>this.toggle(o.target);this.localEnterTogglePopover=o=>{if(o.key==="Enter")this.toggle(o.target)};this.localTouchTogglePopover=o=>{o.preventDefault();this.toggle(o.target)}}connectedCallback(){if(!this.triggers){throw new Error(`No trigger found for <post-popover popover-id="${this.host.id}`)}this.triggers.forEach((o=>{o.addEventListener("mouseup",this.localTogglePopover,{once:true});o.addEventListener("keypress",this.localEnterTogglePopover);o.addEventListener("touch",this.localTouchTogglePopover,{once:true});o.setAttribute("aria-expanded","false")}))}disconnectedCallback(){this.triggers.forEach((o=>{o.removeEventListener("mouseup",this.localTogglePopover);o.removeEventListener("keypress",this.localEnterTogglePopover);o.removeEventListener("touch",this.localTouchTogglePopover);o.removeAttribute("aria-expanded")}))}async show(o){this.currentTarget=o;this.popoverRef.show(o);o.setAttribute("aria-expanded","true")}async hide(){this.popoverRef.hide();this.triggers.forEach((o=>o.setAttribute("aria-expanded","false")))}async toggle(o,t){this.currentTarget=o;const e=await this.popoverRef.toggle(o,t);o.setAttribute("aria-expanded",`${e}`)}get triggers(){return document.querySelectorAll(`[data-popover-target="${this.host.id}"]`)}onToggle(o){if(this.currentTarget){this.currentTarget.setAttribute("aria-expanded",`${o.detail}`)}if(!o.detail){window.requestAnimationFrame((()=>{this.triggers.forEach((o=>{o.addEventListener("mouseup",this.localTogglePopover,{once:true});o.addEventListener("touch",this.localTouchTogglePopover,{once:true})}))}));if(this.currentTarget){this.currentTarget.focus();this.currentTarget=null}}}stopImmediatePropagation(o){o.stopImmediatePropagation()}render(){return t(e,{"data-version":i},t("post-popovercontainer",{arrow:this.arrow,placement:this.placement,ref:o=>this.popoverRef=o,onPostPopoverToggled:o=>this.onToggle(o)},t("div",{class:"popover-container",onPointerDown:o=>this.stopImmediatePropagation(o),onPointerUp:o=>this.stopImmediatePropagation(o)},t("div",{class:"popover-content"},t("slot",null)),t("button",{class:"btn-close",onClick:()=>this.hide()},t("span",{class:"visually-hidden"},this.closeButtonCaption)))))}get host(){return s(this)}};n.style=r;export{n as P};
|
|
2
|
+
//# sourceMappingURL=p-3ef3a1d2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["postPopoverCss","PostPopover","constructor","hostRef","this","localTogglePopover","e","toggle","target","localEnterTogglePopover","key","localTouchTogglePopover","preventDefault","connectedCallback","triggers","Error","host","id","forEach","trigger","addEventListener","once","setAttribute","disconnectedCallback","removeEventListener","removeAttribute","show","currentTarget","popoverRef","hide","force","newState","document","querySelectorAll","onToggle","detail","window","requestAnimationFrame","focus","stopImmediatePropagation","render","h","Host","version","arrow","placement","ref","onPostPopoverToggled","class","onPointerDown","onPointerUp","onClick","closeButtonCaption"],"sources":["src/components/post-popover/post-popover.scss?tag=post-popover&encapsulation=shadow","src/components/post-popover/post-popover.tsx"],"sourcesContent":["@use '@swisspost/design-system-styles/core' as post;\n@use '@swisspost/design-system-styles/components/close';\n\n* {\n box-sizing: border-box;\n}\n\n:host {\n --post-contrast-color: #{post.$white};\n --post-bg-rgb: #{post.rgb-values(post.$gray-80)};\n\n display: block;\n}\n\n.visually-hidden {\n @include post.visuallyhidden();\n}\n\n.popover-container {\n display: flex;\n align-items: self-start;\n padding: 0.5em;\n\n // Max 2/3 of the column width\n max-width: min(66vw, 60rem);\n\n // Max available width on mobile, popovercontainer will handle offsets\n @include post.media-breakpoint-down(rg) {\n max-width: 100%;\n }\n}\n\n.popover-content {\n padding: 0.5em;\n}\n","import { Component, Element, h, Host, Method, Prop } from '@stencil/core';\nimport { Placement } from '@floating-ui/dom';\n\nimport { version } from '../../../package.json';\n@Component({\n tag: 'post-popover',\n styleUrl: 'post-popover.scss',\n shadow: true,\n})\nexport class PostPopover {\n private popoverRef: HTMLPostPopovercontainerElement;\n private localTogglePopover: (e: Event) => Promise<void>;\n private localEnterTogglePopover: (e: KeyboardEvent) => void;\n private localTouchTogglePopover: (e: TouchEvent) => void;\n private currentTarget: HTMLElement;\n\n @Element() host: HTMLPostPopoverElement;\n\n /**\n * Defines the placement of the popover according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.\n * Popoverss are automatically flipped to the opposite side if there is not enough available space and are shifted\n * towards the viewport if they would overlap edge boundaries.\n */\n @Prop() readonly placement?: Placement = 'top';\n\n /**\n * Define the caption of the close button for assistive technology\n */\n @Prop() readonly closeButtonCaption!: string;\n /**\n * Show a little indicator arrow\n */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() readonly arrow?: boolean = true;\n\n constructor() {\n this.localTogglePopover = e => this.toggle(e.target as HTMLElement);\n this.localEnterTogglePopover = e => {\n if (e.key === 'Enter') this.toggle(e.target as HTMLElement);\n };\n this.localTouchTogglePopover = e => {\n e.preventDefault();\n this.toggle(e.target as HTMLElement);\n };\n }\n\n connectedCallback() {\n if (!this.triggers) {\n throw new Error(`No trigger found for <post-popover popover-id=\"${this.host.id}`);\n }\n\n // As long as cross-shadow-boundary [popovertarget] and button.popoverTargetElement are not working\n // we're left with listening to trigger events ourselves\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/popoverTargetElement\n // https://github.com/whatwg/html/issues/9109#issuecomment-1494030465 (does not seem to work for now)\n // https://stackoverflow.com/questions/77324143/popovertargetelement-does-not-cross-shadow-boundaries?noredirect=1#comment136318281_77324143\n this.triggers.forEach(trigger => {\n // See this.onToggle for one time mouse event listener\n trigger.addEventListener('mouseup', this.localTogglePopover, { once: true });\n trigger.addEventListener('keypress', this.localEnterTogglePopover);\n trigger.addEventListener('touch', this.localTouchTogglePopover, { once: true });\n trigger.setAttribute('aria-expanded', 'false');\n });\n }\n\n disconnectedCallback() {\n this.triggers.forEach(trigger => {\n trigger.removeEventListener('mouseup', this.localTogglePopover);\n trigger.removeEventListener('keypress', this.localEnterTogglePopover);\n trigger.removeEventListener('touch', this.localTouchTogglePopover);\n trigger.removeAttribute('aria-expanded');\n });\n }\n\n /**\n * Programmatically display the popover\n * @param target An element with [data-popover-target=\"id\"] where the popover should be shown\n */\n @Method()\n async show(target: HTMLElement) {\n this.currentTarget = target;\n this.popoverRef.show(target);\n target.setAttribute('aria-expanded', 'true');\n }\n\n /**\n * Programmatically hide this popover\n */\n @Method()\n async hide() {\n this.popoverRef.hide();\n this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));\n }\n\n /**\n * Toggle popover display\n * @param target An element with [data-popover-target=\"id\"] where the popover should be anchored to\n * @param force Pass true to always show or false to always hide\n */\n @Method()\n async toggle(target: HTMLElement, force?: boolean) {\n this.currentTarget = target;\n const newState = await this.popoverRef.toggle(target, force);\n target.setAttribute('aria-expanded', `${newState}`);\n }\n\n private get triggers() {\n return document.querySelectorAll(`[data-popover-target=\"${this.host.id}\"]`);\n }\n\n /**\n * One time event handler for click events\n * A permanent event listener would prevent a toggle button from working properly:\n * A click opens the popover, a second click first closes it (due to light dismiss), then directly\n * opens it again because of the click listener on the button. Registering a new\n * one time listener after a small timeout solves this issue.\n * @param e toggle event from post-popovercontainer\n */\n private onToggle(e: CustomEvent<boolean>) {\n if (this.currentTarget) {\n this.currentTarget.setAttribute('aria-expanded', `${e.detail}`);\n }\n if (!e.detail) {\n window.requestAnimationFrame(() => {\n this.triggers.forEach(trigger => {\n trigger.addEventListener('mouseup', this.localTogglePopover, { once: true });\n trigger.addEventListener('touch', this.localTouchTogglePopover, { once: true });\n });\n });\n\n // Handle missing re-focusing logic after close. Can be removed as soon as popovertarget works correctly\n if (this.currentTarget) {\n this.currentTarget.focus();\n this.currentTarget = null;\n }\n }\n }\n\n // Fix for firefox to prevent the following lines from triggering\n // https://github.com/oddbird/popover-polyfill/blob/main/src/popover.ts#L338\n private stopImmediatePropagation(e: PointerEvent) {\n e.stopImmediatePropagation();\n }\n\n render() {\n return (\n <Host data-version={version}>\n <post-popovercontainer\n arrow={this.arrow}\n placement={this.placement}\n ref={e => (this.popoverRef = e)}\n onPostPopoverToggled={e => this.onToggle(e)}\n >\n <div\n class=\"popover-container\"\n onPointerDown={e => this.stopImmediatePropagation(e)}\n onPointerUp={e => this.stopImmediatePropagation(e)}\n >\n <div class=\"popover-content\">\n <slot></slot>\n </div>\n <button class=\"btn-close\" onClick={() => this.hide()}>\n <span class=\"visually-hidden\">{this.closeButtonCaption}</span>\n </button>\n </div>\n </post-popovercontainer>\n </Host>\n );\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAiB,ojE,MCSVC,EAAW,MA0BtB,WAAAC,CAAAC,G,yBAZyC,M,6CAUN,KAGjCC,KAAKC,mBAAqBC,GAAKF,KAAKG,OAAOD,EAAEE,QAC7CJ,KAAKK,wBAA0BH,IAC7B,GAAIA,EAAEI,MAAQ,QAASN,KAAKG,OAAOD,EAAEE,OAAsB,EAE7DJ,KAAKO,wBAA0BL,IAC7BA,EAAEM,iBACFR,KAAKG,OAAOD,EAAEE,OAAsB,C,CAIxC,iBAAAK,GACE,IAAKT,KAAKU,SAAU,CAClB,MAAM,IAAIC,MAAM,kDAAkDX,KAAKY,KAAKC,K,CAQ9Eb,KAAKU,SAASI,SAAQC,IAEpBA,EAAQC,iBAAiB,UAAWhB,KAAKC,mBAAoB,CAAEgB,KAAM,OACrEF,EAAQC,iBAAiB,WAAYhB,KAAKK,yBAC1CU,EAAQC,iBAAiB,QAAShB,KAAKO,wBAAyB,CAAEU,KAAM,OACxEF,EAAQG,aAAa,gBAAiB,QAAQ,G,CAIlD,oBAAAC,GACEnB,KAAKU,SAASI,SAAQC,IACpBA,EAAQK,oBAAoB,UAAWpB,KAAKC,oBAC5Cc,EAAQK,oBAAoB,WAAYpB,KAAKK,yBAC7CU,EAAQK,oBAAoB,QAASpB,KAAKO,yBAC1CQ,EAAQM,gBAAgB,gBAAgB,G,CAS5C,UAAMC,CAAKlB,GACTJ,KAAKuB,cAAgBnB,EACrBJ,KAAKwB,WAAWF,KAAKlB,GACrBA,EAAOc,aAAa,gBAAiB,O,CAOvC,UAAMO,GACJzB,KAAKwB,WAAWC,OAChBzB,KAAKU,SAASI,SAAQC,GAAWA,EAAQG,aAAa,gBAAiB,U,CASzE,YAAMf,CAAOC,EAAqBsB,GAChC1B,KAAKuB,cAAgBnB,EACrB,MAAMuB,QAAiB3B,KAAKwB,WAAWrB,OAAOC,EAAQsB,GACtDtB,EAAOc,aAAa,gBAAiB,GAAGS,I,CAG1C,YAAYjB,GACV,OAAOkB,SAASC,iBAAiB,yBAAyB7B,KAAKY,KAAKC,O,CAW9D,QAAAiB,CAAS5B,GACf,GAAIF,KAAKuB,cAAe,CACtBvB,KAAKuB,cAAcL,aAAa,gBAAiB,GAAGhB,EAAE6B,S,CAExD,IAAK7B,EAAE6B,OAAQ,CACbC,OAAOC,uBAAsB,KAC3BjC,KAAKU,SAASI,SAAQC,IACpBA,EAAQC,iBAAiB,UAAWhB,KAAKC,mBAAoB,CAAEgB,KAAM,OACrEF,EAAQC,iBAAiB,QAAShB,KAAKO,wBAAyB,CAAEU,KAAM,MAAO,GAC/E,IAIJ,GAAIjB,KAAKuB,cAAe,CACtBvB,KAAKuB,cAAcW,QACnBlC,KAAKuB,cAAgB,I,GAOnB,wBAAAY,CAAyBjC,GAC/BA,EAAEiC,0B,CAGJ,MAAAC,GACE,OACEC,EAACC,EAAI,gBAAeC,GAClBF,EAAA,yBACEG,MAAOxC,KAAKwC,MACZC,UAAWzC,KAAKyC,UAChBC,IAAKxC,GAAMF,KAAKwB,WAAatB,EAC7ByC,qBAAsBzC,GAAKF,KAAK8B,SAAS5B,IAEzCmC,EAAA,OACEO,MAAM,oBACNC,cAAe3C,GAAKF,KAAKmC,yBAAyBjC,GAClD4C,YAAa5C,GAAKF,KAAKmC,yBAAyBjC,IAEhDmC,EAAA,OAAKO,MAAM,mBACTP,EAAA,cAEFA,EAAA,UAAQO,MAAM,YAAYG,QAAS,IAAM/C,KAAKyB,QAC5CY,EAAA,QAAMO,MAAM,mBAAmB5C,KAAKgD,uB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as o,c as t,h as r,H as s,g as e}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as o,c as t,h as r,H as s,g as e}from"./p-81591ad0.js";import{v as i}from"./p-bd1d0117.js";import{d as a,b as n}from"./p-96f4ebc4.js";function c(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}const l=350;const d="ease";const p={height:"0",overflow:"hidden"};const g=o=>{const{height:t}=window.getComputedStyle(o);const r={height:t};return o.animate([r,p],{duration:l,easing:d,fill:"forwards"})};const b=o=>{const t={height:`${o.scrollHeight}px`};return o.animate([p,t],{duration:l,easing:d,fill:"forwards"})};const h=[1,2,3,4,5,6];const u=".accordion-item,.bg-light .accordion-item,.bg-gray .accordion-item{--post-bg-opacity:1;background-color:rgba(var(--post-bg-rgb), var(--post-bg-opacity)) !important;color:var(--post-contrast-color) !important}.accordion-item,.bg-light .accordion-item,.bg-gray .accordion-item{--post-contrast-color:#000;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-primary:hsl(0, 0%, 20%);--post-white:#fff;--post-black:#000;--post-info:#cce4ee;--post-success:#2c911c;--post-warning:#f49e00;--post-danger:#a51728;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-success-green:#2c871d;--post-error-red:#a51728;--post-warning-orange:#f49e00;--post-success-background:#c0debb;--post-error-background:#ffdade;--post-warning-background:#fce2b2;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-yellow-rgb:255, 204, 0;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-primary-rgb:51, 51, 51;--post-white-rgb:255, 255, 255;--post-black-rgb:0, 0, 0;--post-info-rgb:204, 228, 238;--post-success-rgb:44, 145, 28;--post-warning-rgb:244, 158, 0;--post-danger-rgb:165, 23, 40;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160;--post-success-green-rgb:44, 135, 29;--post-error-red-rgb:165, 23, 40;--post-warning-orange-rgb:244, 158, 0;--post-success-background-rgb:192, 222, 187;--post-error-background-rgb:255, 218, 222;--post-warning-background-rgb:252, 226, 178}.accordion-item{border-block:2px solid #666;--post-bg-rgb:244, 243, 241}.accordion-item+.accordion-item{border-block-start:0}.bg-light .accordion-item{--post-bg-rgb:255, 255, 255}.bg-gray .accordion-item{--post-bg-rgb:255, 255, 255}.accordion-header{color:#333;font-size:1rem;font-weight:700;line-height:1.5;margin:0}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;outline:none;width:100%;position:relative;padding-block:1rem;padding-inline-start:1rem;padding-inline-end:3rem;text-align:start;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}.accordion-button:focus-visible{outline:2px solid #1976c8}.accordion-button:hover{color:#000;background-color:#e6e6e6}.accordion-button:disabled{opacity:.4;pointer-events:none}.accordion-button::after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor;content:\"\";display:block;height:1.5rem;width:1.5rem;position:absolute;inset-inline-end:1rem;inset-block-start:50%;transform:translateY(-50%);transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed::after{transform:translateY(-50%) rotate(-180deg)}.accordion-button>.text-truncate{display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover:not(:disabled),.accordion-button:focus-visible:not(:disabled){outline:2px solid Highlight}.accordion-button:disabled{opacity:1 !important}}.accordion-body{padding:.5rem 1rem 1rem;font-weight:300}.accordion-button>*,.accordion-body>:first-child{margin-block-start:0 !important}.accordion-button>*,.accordion-body>:last-child{margin-block-end:0 !important}:host{display:block}.accordion-button{cursor:pointer}.accordion-button>::slotted(.text-truncate){display:block}post-collapsible+post-collapsible::part(accordion-item){border-block-start:0 !important}";const m=class{constructor(r){o(this,r);this.collapseChange=t(this,"collapseChange",7);this.isLoaded=false;this.id=undefined;this.isOpen=true;this.hasHeader=undefined;this.headingTag=undefined;this.collapsed=false;this.headingLevel=2}validateCollapsed(o=this.collapsed){a(o,"boolean","The `collapsed` property of the `post-collapsible` must be a boolean.")}validateHeadingLevel(o=this.headingLevel){n(o,h,"The `headingLevel` property of the `post-collapsible` must be a number between 1 and 6.")}connectedCallback(){this.validateCollapsed();this.validateHeadingLevel()}componentWillRender(){var o;this.id=this.host.id||`c${crypto.randomUUID()}`;this.hasHeader=this.host.querySelectorAll('[slot="header"]').length>0;this.headingTag=`h${(o=this.headingLevel)!==null&&o!==void 0?o:2}`}componentDidLoad(){if(this.collapsed)void this.toggle(false);this.isLoaded=true}async toggle(o=!this.isOpen){if(o===this.isOpen)return o;this.isOpen=!this.isOpen;if(this.isLoaded)this.collapseChange.emit();const t=o?b(this.collapsible):g(this.collapsible);if(!this.isLoaded||c())t.finish();await t.finished;t.commitStyles();return this.isOpen}render(){const o=r("div",{"aria-labelledby":this.hasHeader?`${this.id}--header`:undefined,class:`collapse${this.hasHeader?" accordion-collapse":""}`,id:`${this.id}--collapse`,ref:o=>this.collapsible=o},this.hasHeader?r("div",{class:"accordion-body"},r("slot",null)):r("slot",null));return r(s,{id:this.id,"data-version":i},this.hasHeader?r("div",{part:"accordion-item",class:"accordion-item"},r(this.headingTag,{class:"accordion-header",id:`${this.id}--header`},r("button",{"aria-controls":`${this.id}--collapse`,"aria-expanded":`${this.isOpen}`,class:`accordion-button${this.isOpen?"":" collapsed"}`,onClick:()=>this.toggle(),type:"button"},r("slot",{name:"header"}))),o):o)}get host(){return e(this)}static get watchers(){return{collapsed:["validateCollapsed"],headingLevel:["validateHeadingLevel"]}}};m.style=u;export{m as P};
|
|
2
|
+
//# sourceMappingURL=p-6cdc82c6.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as t,H as r,g as a}from"./p-81591ad0.js";import{v as b}from"./p-bd1d0117.js";import{c as e}from"./p-b095519d.js";const c='.tab-title[role=tab]{display:inline-block;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:var(--post-contrast-color);text-decoration:none}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:#fff;color:var(--post-contrast-color)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:#fff;color:var(--post-contrast-color);box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:"";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:var(--post-contrast-color);font-weight:700}.tab-title[role=tab].active::before{content:"";display:block;position:absolute;top:0;right:-1px;left:-1px;height:.25rem;background-color:#fc0}:is(.bg-dark,.bg-primary,.bg-black,.bg-success,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.bg-error-red) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:is(.bg-dark,.bg-primary,.bg-black,.bg-success,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.bg-error-red) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:2px solid Highlight;outline-offset:-0.25rem}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}.bg-yellow .tab-title{background-color:#fc0}.bg-yellow .tab-title.active{background-color:#fc0}.bg-yellow .nav-item{background-color:#fc0}.bg-light .tab-title{background-color:#faf9f8}.bg-light .tab-title.active{background-color:#faf9f8}.bg-light .nav-item{background-color:#faf9f8}.bg-gray .tab-title{background-color:#f4f3f1}.bg-gray .tab-title.active{background-color:#f4f3f1}.bg-gray .nav-item{background-color:#f4f3f1}.bg-dark .tab-title{background-color:#333}.bg-dark .tab-title.active{background-color:#333}.bg-dark .nav-item{background-color:#333}.bg-primary .tab-title{background-color:#333}.bg-primary .tab-title.active{background-color:#333}.bg-primary .nav-item{background-color:#333}.bg-white .tab-title{background-color:#fff}.bg-white .tab-title.active{background-color:#fff}.bg-white .nav-item{background-color:#fff}.bg-black .tab-title{background-color:#000}.bg-black .tab-title.active{background-color:#000}.bg-black .nav-item{background-color:#000}.bg-info .tab-title{background-color:#cce4ee}.bg-info .tab-title.active{background-color:#cce4ee}.bg-info .nav-item{background-color:#cce4ee}.bg-success .tab-title{background-color:#2c911c}.bg-success .tab-title.active{background-color:#2c911c}.bg-success .nav-item{background-color:#2c911c}.bg-warning .tab-title{background-color:#f49e00}.bg-warning .tab-title.active{background-color:#f49e00}.bg-warning .nav-item{background-color:#f49e00}.bg-danger .tab-title{background-color:#a51728}.bg-danger .tab-title.active{background-color:#a51728}.bg-danger .nav-item{background-color:#a51728}.bg-nightblue .tab-title{background-color:#004976}.bg-nightblue .tab-title.active{background-color:#004976}.bg-nightblue .nav-item{background-color:#004976}.bg-nightblue-bright .tab-title{background-color:#0076a8}.bg-nightblue-bright .tab-title.active{background-color:#0076a8}.bg-nightblue-bright .nav-item{background-color:#0076a8}.bg-petrol .tab-title{background-color:#006d68}.bg-petrol .tab-title.active{background-color:#006d68}.bg-petrol .nav-item{background-color:#006d68}.bg-petrol-bright .tab-title{background-color:#00968f}.bg-petrol-bright .tab-title.active{background-color:#00968f}.bg-petrol-bright .nav-item{background-color:#00968f}.bg-coral .tab-title{background-color:#9e2a2f}.bg-coral .tab-title.active{background-color:#9e2a2f}.bg-coral .nav-item{background-color:#9e2a2f}.bg-coral-bright .tab-title{background-color:#e03c31}.bg-coral-bright .tab-title.active{background-color:#e03c31}.bg-coral-bright .nav-item{background-color:#e03c31}.bg-olive .tab-title{background-color:#716135}.bg-olive .tab-title.active{background-color:#716135}.bg-olive .nav-item{background-color:#716135}.bg-olive-bright .tab-title{background-color:#aa9d2e}.bg-olive-bright .tab-title.active{background-color:#aa9d2e}.bg-olive-bright .nav-item{background-color:#aa9d2e}.bg-purple .tab-title{background-color:#80276c}.bg-purple .tab-title.active{background-color:#80276c}.bg-purple .nav-item{background-color:#80276c}.bg-purple-bright .tab-title{background-color:#c5299b}.bg-purple-bright .tab-title.active{background-color:#c5299b}.bg-purple-bright .nav-item{background-color:#c5299b}.bg-aubergine .tab-title{background-color:#523178}.bg-aubergine .tab-title.active{background-color:#523178}.bg-aubergine .nav-item{background-color:#523178}.bg-aubergine-bright .tab-title{background-color:#7566a0}.bg-aubergine-bright .tab-title.active{background-color:#7566a0}.bg-aubergine-bright .nav-item{background-color:#7566a0}.bg-success-green .tab-title{background-color:#2c871d}.bg-success-green .tab-title.active{background-color:#2c871d}.bg-success-green .nav-item{background-color:#2c871d}.bg-error-red .tab-title{background-color:#a51728}.bg-error-red .tab-title.active{background-color:#a51728}.bg-error-red .nav-item{background-color:#a51728}.bg-warning-orange .tab-title{background-color:#f49e00}.bg-warning-orange .tab-title.active{background-color:#f49e00}.bg-warning-orange .nav-item{background-color:#f49e00}.bg-success-background .tab-title{background-color:#c0debb}.bg-success-background .tab-title.active{background-color:#c0debb}.bg-success-background .nav-item{background-color:#c0debb}.bg-error-background .tab-title{background-color:#ffdade}.bg-error-background .tab-title.active{background-color:#ffdade}.bg-error-background .nav-item{background-color:#ffdade}.bg-warning-background .tab-title{background-color:#fce2b2}.bg-warning-background .tab-title.active{background-color:#fce2b2}.bg-warning-background .nav-item{background-color:#fce2b2}[class*=bg-] .tab-title.active:focus::after{background-color:rgba(255,255,255,.2)}@supports selector(*:focus-visible){[class*=bg-] .tab-title.active:focus::after{background-color:unset}[class*=bg-] .tab-title.active:focus-visible::after{background-color:rgba(255,255,255,.2)}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button}';const l=class{constructor(t){o(this,t);this.tabId=undefined;this.panel=undefined}validateFor(o){e(o,'The "panel" prop is required for the post-tab-header.')}componentWillLoad(){this.tabId=`tab-${this.host.id||crypto.randomUUID()}`}render(){return t(r,{"data-version":b},t("button",{"aria-selected":"false",class:"tab-title",id:this.tabId,role:"tab",tabindex:"-1",type:"button"},t("slot",null)))}get host(){return a(this)}static get watchers(){return{panel:["validateFor"]}}};l.style=c;export{l as P};
|
|
2
|
+
//# sourceMappingURL=p-723336f2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["postTabHeaderCss","PostTabHeader","validateFor","newValue","checkNonEmpty","componentWillLoad","this","tabId","host","id","crypto","randomUUID","render","h","Host","version","class","role","tabindex","type"],"sources":["src/components/post-tab-header/post-tab-header.scss?tag=post-tab-header&encapsulation=shadow","src/components/post-tab-header/post-tab-header.tsx"],"sourcesContent":["@use '@swisspost/design-system-styles/components/tabs/tab-title';\n@use '@swisspost/design-system-styles/core' as post;\n\n:host {\n display: block;\n}\n\n.tab-title {\n @include post.reset-button;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { checkNonEmpty } from '../../utils';\n\n@Component({\n tag: 'post-tab-header',\n styleUrl: 'post-tab-header.scss',\n shadow: true,\n})\nexport class PostTabHeader {\n @Element() host: HTMLPostTabHeaderElement;\n\n @State() tabId: string;\n\n /**\n * The name of the panel controlled by the tab header.\n */\n @Prop() readonly panel: HTMLPostTabPanelElement['name'];\n\n @Watch('panel')\n validateFor(newValue: HTMLPostTabPanelElement['name']) {\n checkNonEmpty(newValue, 'The \"panel\" prop is required for the post-tab-header.');\n }\n\n componentWillLoad() {\n this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;\n }\n\n render() {\n return (\n <Host data-version={version}>\n <button aria-selected=\"false\" class=\"tab-title\" id={this.tabId} role=\"tab\" tabindex=\"-1\" type=\"button\">\n <slot />\n </button>\n </Host>\n );\n }\n}\n"],"mappings":"iIAAA,MAAMA,EAAmB,
|
|
1
|
+
{"version":3,"names":["postTabHeaderCss","PostTabHeader","validateFor","newValue","checkNonEmpty","componentWillLoad","this","tabId","host","id","crypto","randomUUID","render","h","Host","version","class","role","tabindex","type"],"sources":["src/components/post-tab-header/post-tab-header.scss?tag=post-tab-header&encapsulation=shadow","src/components/post-tab-header/post-tab-header.tsx"],"sourcesContent":["@use '@swisspost/design-system-styles/components/tabs/tab-title';\n@use '@swisspost/design-system-styles/core' as post;\n\n:host {\n display: block;\n}\n\n.tab-title {\n @include post.reset-button;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { checkNonEmpty } from '../../utils';\n\n@Component({\n tag: 'post-tab-header',\n styleUrl: 'post-tab-header.scss',\n shadow: true,\n})\nexport class PostTabHeader {\n @Element() host: HTMLPostTabHeaderElement;\n\n @State() tabId: string;\n\n /**\n * The name of the panel controlled by the tab header.\n */\n @Prop() readonly panel: HTMLPostTabPanelElement['name'];\n\n @Watch('panel')\n validateFor(newValue: HTMLPostTabPanelElement['name']) {\n checkNonEmpty(newValue, 'The \"panel\" prop is required for the post-tab-header.');\n }\n\n componentWillLoad() {\n this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;\n }\n\n render() {\n return (\n <Host data-version={version}>\n <button aria-selected=\"false\" class=\"tab-title\" id={this.tabId} role=\"tab\" tabindex=\"-1\" type=\"button\">\n <slot />\n </button>\n </Host>\n );\n }\n}\n"],"mappings":"iIAAA,MAAMA,EAAmB,iiO,MCSZC,EAAa,M,mEAWxB,WAAAC,CAAYC,GACVC,EAAcD,EAAU,wD,CAG1B,iBAAAE,GACEC,KAAKC,MAAQ,OAAOD,KAAKE,KAAKC,IAAMC,OAAOC,c,CAG7C,MAAAC,GACE,OACEC,EAACC,EAAI,gBAAeC,GAClBF,EAAA,0BAAsB,QAAQG,MAAM,YAAYP,GAAIH,KAAKC,MAAOU,KAAK,MAAMC,SAAS,KAAKC,KAAK,UAC5FN,EAAA,c"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as n,h as e,H as o,g as i}from"./p-81591ad0.js";import{v as r}from"./p-bd1d0117.js";const s=Math.min;const c=Math.max;const l=Math.round;const a=Math.floor;const f=t=>({x:t,y:t});const u={left:"right",right:"left",bottom:"top",top:"bottom"};const p={start:"end",end:"start"};function d(t,n,e){return c(t,s(n,e))}function h(t,n){return typeof t==="function"?t(n):t}function m(t){return t.split("-")[0]}function g(t){return t.split("-")[1]}function v(t){return t==="x"?"y":"x"}function y(t){return t==="y"?"height":"width"}function w(t){return["top","bottom"].includes(m(t))?"y":"x"}function b(t){return v(w(t))}function x(t,n,e){if(e===void 0){e=false}const o=g(t);const i=b(t);const r=y(i);let s=i==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";if(n.reference[r]>n.floating[r]){s=M(s)}return[s,M(s)]}function A(t){const n=M(t);return[S(t),n,S(n)]}function S(t){return t.replace(/start|end/g,(t=>p[t]))}function T(t,n,e){const o=["left","right"];const i=["right","left"];const r=["top","bottom"];const s=["bottom","top"];switch(t){case"top":case"bottom":if(e)return n?i:o;return n?o:i;case"left":case"right":return n?r:s;default:return[]}}function E(t,n,e,o){const i=g(t);let r=T(m(t),e==="start",o);if(i){r=r.map((t=>t+"-"+i));if(n){r=r.concat(r.map(S))}}return r}function M(t){return t.replace(/left|right|bottom|top/g,(t=>u[t]))}function k(t){return{top:0,right:0,bottom:0,left:0,...t}}function L(t){return typeof t!=="number"?k(t):{top:t,right:t,bottom:t,left:t}}function D(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function H(t,n,e){let{reference:o,floating:i}=t;const r=w(n);const s=b(n);const c=y(s);const l=m(n);const a=r==="y";const f=o.x+o.width/2-i.width/2;const u=o.y+o.height/2-i.height/2;const p=o[c]/2-i[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}switch(g(n)){case"start":d[s]-=p*(e&&a?-1:1);break;case"end":d[s]+=p*(e&&a?-1:1);break}return d}const O=async(t,n,e)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=e;const c=r.filter(Boolean);const l=await(s.isRTL==null?void 0:s.isRTL(n));let a=await s.getElementRects({reference:t,floating:n,strategy:i});let{x:f,y:u}=H(a,o,l);let p=o;let d={};let h=0;for(let e=0;e<c.length;e++){const{name:r,fn:m}=c[e];const{x:g,y:v,data:y,reset:w}=await m({x:f,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:n}});f=g!=null?g:f;u=v!=null?v:u;d={...d,[r]:{...d[r],...y}};if(w&&h<=50){h++;if(typeof w==="object"){if(w.placement){p=w.placement}if(w.rects){a=w.rects===true?await s.getElementRects({reference:t,floating:n,strategy:i}):w.rects}({x:f,y:u}=H(a,p,l))}e=-1;continue}}return{x:f,y:u,placement:p,strategy:i,middlewareData:d}};async function F(t,n){var e;if(n===void 0){n={}}const{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t;const{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=false,padding:d=0}=h(n,t);const m=L(d);const g=u==="floating"?"reference":"floating";const v=c[p?g:u];const y=D(await r.getClippingRect({element:((e=await(r.isElement==null?void 0:r.isElement(v)))!=null?e:true)?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l}));const w=u==="floating"?{...s.floating,x:o,y:i}:s.reference;const b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating));const x=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1};const A=D(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:b,strategy:l}):w);return{top:(y.top-A.top+m.top)/x.y,bottom:(A.bottom-y.bottom+m.bottom)/x.y,left:(y.left-A.left+m.left)/x.x,right:(A.right-y.right+m.right)/x.x}}const R=t=>({name:"arrow",options:t,async fn(n){const{x:e,y:o,placement:i,rects:r,platform:c,elements:l,middlewareData:a}=n;const{element:f,padding:u=0}=h(t,n)||{};if(f==null){return{}}const p=L(u);const m={x:e,y:o};const v=b(i);const w=y(v);const x=await c.getDimensions(f);const A=v==="y";const S=A?"top":"left";const T=A?"bottom":"right";const E=A?"clientHeight":"clientWidth";const M=r.reference[w]+r.reference[v]-m[v]-r.floating[w];const k=m[v]-r.reference[v];const D=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f));let H=D?D[E]:0;if(!H||!await(c.isElement==null?void 0:c.isElement(D))){H=l.floating[E]||r.floating[w]}const O=M/2-k/2;const F=H/2-x[w]/2-1;const R=s(p[S],F);const z=s(p[T],F);const P=R;const W=H-x[w]-z;const j=H/2-x[w]/2+O;const $=d(P,j,W);const q=!a.arrow&&g(i)!=null&&j!=$&&r.reference[w]/2-(j<P?R:z)-x[w]/2<0;const B=q?j<P?j-P:j-W:0;return{[v]:m[v]+B,data:{[v]:$,centerOffset:j-$-B,...q&&{alignmentOffset:B}},reset:q}}});const z=function(t){if(t===void 0){t={}}return{name:"flip",options:t,async fn(n){var e,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=n;const{mainAxis:f=true,crossAxis:u=true,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=true,...y}=h(t,n);if((e=r.arrow)!=null&&e.alignmentOffset){return{}}const w=m(i);const b=m(c)===c;const S=await(l.isRTL==null?void 0:l.isRTL(a.floating));const T=p||(b||!v?[M(c)]:A(c));if(!p&&g!=="none"){T.push(...E(c,v,g,S))}const k=[c,...T];const L=await F(n,y);const D=[];let H=((o=r.flip)==null?void 0:o.overflows)||[];if(f){D.push(L[w])}if(u){const t=x(i,s,S);D.push(L[t[0]],L[t[1]])}H=[...H,{placement:i,overflows:D}];if(!D.every((t=>t<=0))){var O,R;const t=(((O=r.flip)==null?void 0:O.index)||0)+1;const n=k[t];if(n){return{data:{index:t,overflows:H},reset:{placement:n}}}let e=(R=H.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])==null?void 0:R.placement;if(!e){switch(d){case"bestFit":{var z;const t=(z=H.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])==null?void 0:z[0];if(t){e=t}break}case"initialPlacement":e=c;break}}if(i!==e){return{reset:{placement:e}}}}return{}}}};function P(t){const n=s(...t.map((t=>t.left)));const e=s(...t.map((t=>t.top)));const o=c(...t.map((t=>t.right)));const i=c(...t.map((t=>t.bottom)));return{x:n,y:e,width:o-n,height:i-e}}function W(t){const n=t.slice().sort(((t,n)=>t.y-n.y));const e=[];let o=null;for(let t=0;t<n.length;t++){const i=n[t];if(!o||i.y-o.y>o.height/2){e.push([i])}else{e[e.length-1].push(i)}o=i}return e.map((t=>D(P(t))))}const j=function(t){if(t===void 0){t={}}return{name:"inline",options:t,async fn(n){const{placement:e,elements:o,rects:i,platform:r,strategy:l}=n;const{padding:a=2,x:f,y:u}=h(t,n);const p=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(o.reference))||[]);const d=W(p);const g=D(P(p));const v=L(a);function y(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&u!=null){return d.find((t=>f>t.left-v.left&&f<t.right+v.right&&u>t.top-v.top&&u<t.bottom+v.bottom))||g}if(d.length>=2){if(w(e)==="y"){const t=d[0];const n=d[d.length-1];const o=m(e)==="top";const i=t.top;const r=n.bottom;const s=o?t.left:n.left;const c=o?t.right:n.right;const l=c-s;const a=r-i;return{top:i,bottom:r,left:s,right:c,width:l,height:a,x:s,y:i}}const t=m(e)==="left";const n=c(...d.map((t=>t.right)));const o=s(...d.map((t=>t.left)));const i=d.filter((e=>t?e.left===o:e.right===n));const r=i[0].top;const l=i[i.length-1].bottom;const a=o;const f=n;const u=f-a;const p=l-r;return{top:r,bottom:l,left:a,right:f,width:u,height:p,x:a,y:r}}return g}const b=await r.getElementRects({reference:{getBoundingClientRect:y},floating:o.floating,strategy:l});if(i.reference.x!==b.reference.x||i.reference.y!==b.reference.y||i.reference.width!==b.reference.width||i.reference.height!==b.reference.height){return{reset:{rects:b}}}return{}}}};async function $(t,n){const{placement:e,platform:o,elements:i}=t;const r=await(o.isRTL==null?void 0:o.isRTL(i.floating));const s=m(e);const c=g(e);const l=w(e)==="y";const a=["left","top"].includes(s)?-1:1;const f=r&&l?-1:1;const u=h(n,t);let{mainAxis:p,crossAxis:d,alignmentAxis:v}=typeof u==="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};if(c&&typeof v==="number"){d=c==="end"?v*-1:v}return l?{x:d*f,y:p*a}:{x:p*a,y:d*f}}const q=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(n){var e,o;const{x:i,y:r,placement:s,middlewareData:c}=n;const l=await $(n,t);if(s===((e=c.offset)==null?void 0:e.placement)&&(o=c.arrow)!=null&&o.alignmentOffset){return{}}return{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}};const B=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:i}=n;const{mainAxis:r=true,crossAxis:s=false,limiter:c={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...l}=h(t,n);const a={x:e,y:o};const f=await F(n,l);const u=w(m(i));const p=v(u);let g=a[p];let y=a[u];if(r){const t=p==="y"?"top":"left";const n=p==="y"?"bottom":"right";const e=g+f[t];const o=g-f[n];g=d(e,g,o)}if(s){const t=u==="y"?"top":"left";const n=u==="y"?"bottom":"right";const e=y+f[t];const o=y-f[n];y=d(e,y,o)}const b=c.fn({...n,[p]:g,[u]:y});return{...b,data:{x:b.x-e,y:b.y-o}}}}};const C=function(t){if(t===void 0){t={}}return{options:t,fn(n){const{x:e,y:o,placement:i,rects:r,middlewareData:s}=n;const{offset:c=0,mainAxis:l=true,crossAxis:a=true}=h(t,n);const f={x:e,y:o};const u=w(i);const p=v(u);let d=f[p];let g=f[u];const y=h(c,n);const b=typeof y==="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const t=p==="y"?"height":"width";const n=r.reference[p]-r.floating[t]+b.mainAxis;const e=r.reference[p]+r.reference[t]-b.mainAxis;if(d<n){d=n}else if(d>e){d=e}}if(a){var x,A;const t=p==="y"?"width":"height";const n=["top","left"].includes(m(i));const e=r.reference[u]-r.floating[t]+(n?((x=s.offset)==null?void 0:x[u])||0:0)+(n?0:b.crossAxis);const o=r.reference[u]+r.reference[t]+(n?0:((A=s.offset)==null?void 0:A[u])||0)-(n?b.crossAxis:0);if(g<e){g=e}else if(g>o){g=o}}return{[p]:d,[u]:g}}}};const I=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(n){const{placement:e,rects:o,platform:i,elements:r}=n;const{apply:l=(()=>{}),...a}=h(t,n);const f=await F(n,a);const u=m(e);const p=g(e);const d=w(e)==="y";const{width:v,height:y}=o.floating;let b;let x;if(u==="top"||u==="bottom"){b=u;x=p===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"}else{x=u;b=p==="end"?"top":"bottom"}const A=y-f[b];const S=v-f[x];const T=!n.middlewareData.shift;let E=A;let M=S;if(d){const t=v-f.left-f.right;M=p||T?s(S,t):t}else{const t=y-f.top-f.bottom;E=p||T?s(A,t):t}if(T&&!p){const t=c(f.left,0);const n=c(f.right,0);const e=c(f.top,0);const o=c(f.bottom,0);if(d){M=v-2*(t!==0||n!==0?t+n:c(f.left,f.right))}else{E=y-2*(e!==0||o!==0?e+o:c(f.top,f.bottom))}}await l({...n,availableWidth:M,availableHeight:E});const k=await i.getDimensions(r.floating);if(v!==k.width||y!==k.height){return{reset:{rects:true}}}return{}}}};function N(t){if(X(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function G(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function V(t){var n;return(n=(X(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function X(t){return t instanceof Node||t instanceof G(t).Node}function Y(t){return t instanceof Element||t instanceof G(t).Element}function _(t){return t instanceof HTMLElement||t instanceof G(t).HTMLElement}function J(t){if(typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof G(t).ShadowRoot}function K(t){const{overflow:n,overflowX:e,overflowY:o,display:i}=et(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(i)}function Q(t){return["table","td","th"].includes(N(t))}function U(t){const n=tt();const e=et(t);return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":false)||!n&&(e.backdropFilter?e.backdropFilter!=="none":false)||!n&&(e.filter?e.filter!=="none":false)||["transform","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function Z(t){let n=it(t);while(_(n)&&!nt(n)){if(U(n)){return n}else{n=it(n)}}return null}function tt(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function nt(t){return["html","body","#document"].includes(N(t))}function et(t){return G(t).getComputedStyle(t)}function ot(t){if(Y(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function it(t){if(N(t)==="html"){return t}const n=t.assignedSlot||t.parentNode||J(t)&&t.host||V(t);return J(n)?n.host:n}function rt(t){const n=it(t);if(nt(n)){return t.ownerDocument?t.ownerDocument.body:t.body}if(_(n)&&K(n)){return n}return rt(n)}function st(t,n,e){var o;if(n===void 0){n=[]}if(e===void 0){e=true}const i=rt(t);const r=i===((o=t.ownerDocument)==null?void 0:o.body);const s=G(i);if(r){return n.concat(s,s.visualViewport||[],K(i)?i:[],s.frameElement&&e?st(s.frameElement):[])}return n.concat(i,st(i,[],e))}function ct(t){const n=et(t);let e=parseFloat(n.width)||0;let o=parseFloat(n.height)||0;const i=_(t);const r=i?t.offsetWidth:e;const s=i?t.offsetHeight:o;const c=l(e)!==r||l(o)!==s;if(c){e=r;o=s}return{width:e,height:o,$:c}}function lt(t){return!Y(t)?t.contextElement:t}function at(t){const n=lt(t);if(!_(n)){return f(1)}const e=n.getBoundingClientRect();const{width:o,height:i,$:r}=ct(n);let s=(r?l(e.width):e.width)/o;let c=(r?l(e.height):e.height)/i;if(!s||!Number.isFinite(s)){s=1}if(!c||!Number.isFinite(c)){c=1}return{x:s,y:c}}const ft=f(0);function ut(t){const n=G(t);if(!tt()||!n.visualViewport){return ft}return{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function pt(t,n,e){if(n===void 0){n=false}if(!e||n&&e!==G(t)){return false}return n}function dt(t,n,e,o){if(n===void 0){n=false}if(e===void 0){e=false}const i=t.getBoundingClientRect();const r=lt(t);let s=f(1);if(n){if(o){if(Y(o)){s=at(o)}}else{s=at(t)}}const c=pt(r,e,o)?ut(r):f(0);let l=(i.left+c.x)/s.x;let a=(i.top+c.y)/s.y;let u=i.width/s.x;let p=i.height/s.y;if(r){const t=G(r);const n=o&&Y(o)?G(o):o;let e=t.frameElement;while(e&&o&&n!==t){const t=at(e);const n=e.getBoundingClientRect();const o=et(e);const i=n.left+(e.clientLeft+parseFloat(o.paddingLeft))*t.x;const r=n.top+(e.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x;a*=t.y;u*=t.x;p*=t.y;l+=i;a+=r;e=G(e).frameElement}}return D({width:u,height:p,x:l,y:a})}function ht(t){let{rect:n,offsetParent:e,strategy:o}=t;const i=_(e);const r=V(e);if(e===r){return n}let s={scrollLeft:0,scrollTop:0};let c=f(1);const l=f(0);if(i||!i&&o!=="fixed"){if(N(e)!=="body"||K(r)){s=ot(e)}if(_(e)){const t=dt(e);c=at(e);l.x=t.x+e.clientLeft;l.y=t.y+e.clientTop}}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+l.x,y:n.y*c.y-s.scrollTop*c.y+l.y}}function mt(t){return Array.from(t.getClientRects())}function gt(t){return dt(V(t)).left+ot(t).scrollLeft}function vt(t){const n=V(t);const e=ot(t);const o=t.ownerDocument.body;const i=c(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth);const r=c(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let s=-e.scrollLeft+gt(t);const l=-e.scrollTop;if(et(o).direction==="rtl"){s+=c(n.clientWidth,o.clientWidth)-i}return{width:i,height:r,x:s,y:l}}function yt(t,n){const e=G(t);const o=V(t);const i=e.visualViewport;let r=o.clientWidth;let s=o.clientHeight;let c=0;let l=0;if(i){r=i.width;s=i.height;const t=tt();if(!t||t&&n==="fixed"){c=i.offsetLeft;l=i.offsetTop}}return{width:r,height:s,x:c,y:l}}function wt(t,n){const e=dt(t,true,n==="fixed");const o=e.top+t.clientTop;const i=e.left+t.clientLeft;const r=_(t)?at(t):f(1);const s=t.clientWidth*r.x;const c=t.clientHeight*r.y;const l=i*r.x;const a=o*r.y;return{width:s,height:c,x:l,y:a}}function bt(t,n,e){let o;if(n==="viewport"){o=yt(t,e)}else if(n==="document"){o=vt(V(t))}else if(Y(n)){o=wt(n,e)}else{const e=ut(t);o={...n,x:n.x-e.x,y:n.y-e.y}}return D(o)}function xt(t,n){const e=it(t);if(e===n||!Y(e)||nt(e)){return false}return et(e).position==="fixed"||xt(e,n)}function At(t,n){const e=n.get(t);if(e){return e}let o=st(t,[],false).filter((t=>Y(t)&&N(t)!=="body"));let i=null;const r=et(t).position==="fixed";let s=r?it(t):t;while(Y(s)&&!nt(s)){const n=et(s);const e=U(s);if(!e&&n.position==="fixed"){i=null}const c=r?!e&&!i:!e&&n.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||K(s)&&!e&&xt(t,s);if(c){o=o.filter((t=>t!==s))}else{i=n}s=it(s)}n.set(t,o);return o}function St(t){let{element:n,boundary:e,rootBoundary:o,strategy:i}=t;const r=e==="clippingAncestors"?At(n,this._c):[].concat(e);const l=[...r,o];const a=l[0];const f=l.reduce(((t,e)=>{const o=bt(n,e,i);t.top=c(o.top,t.top);t.right=s(o.right,t.right);t.bottom=s(o.bottom,t.bottom);t.left=c(o.left,t.left);return t}),bt(n,a,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Tt(t){const{width:n,height:e}=ct(t);return{width:n,height:e}}function Et(t,n,e){const o=_(n);const i=V(n);const r=e==="fixed";const s=dt(t,true,r,n);let c={scrollLeft:0,scrollTop:0};const l=f(0);if(o||!o&&!r){if(N(n)!=="body"||K(i)){c=ot(n)}if(o){const t=dt(n,true,r,n);l.x=t.x+n.clientLeft;l.y=t.y+n.clientTop}else if(i){l.x=gt(i)}}return{x:s.left+c.scrollLeft-l.x,y:s.top+c.scrollTop-l.y,width:s.width,height:s.height}}function Mt(t,n){if(!_(t)||et(t).position==="fixed"){return null}if(n){return n(t)}return t.offsetParent}function kt(t,n){const e=G(t);if(!_(t)){return e}let o=Mt(t,n);while(o&&Q(o)&&et(o).position==="static"){o=Mt(o,n)}if(o&&(N(o)==="html"||N(o)==="body"&&et(o).position==="static"&&!U(o))){return e}return o||Z(t)||e}const Lt=async function(t){let{reference:n,floating:e,strategy:o}=t;const i=this.getOffsetParent||kt;const r=this.getDimensions;return{reference:Et(n,await i(e),o),floating:{x:0,y:0,...await r(e)}}};function Dt(t){return et(t).direction==="rtl"}const Ht={convertOffsetParentRelativeRectToViewportRelativeRect:ht,getDocumentElement:V,getClippingRect:St,getOffsetParent:kt,getElementRects:Lt,getClientRects:mt,getDimensions:Tt,getScale:at,isElement:Y,isRTL:Dt};function Ot(t,n){let e=null;let o;const i=V(t);function r(){clearTimeout(o);e&&e.disconnect();e=null}function l(f,u){if(f===void 0){f=false}if(u===void 0){u=1}r();const{left:p,top:d,width:h,height:m}=t.getBoundingClientRect();if(!f){n()}if(!h||!m){return}const g=a(d);const v=a(i.clientWidth-(p+h));const y=a(i.clientHeight-(d+m));const w=a(p);const b=-g+"px "+-v+"px "+-y+"px "+-w+"px";const x={rootMargin:b,threshold:c(0,s(1,u))||1};let A=true;function S(t){const n=t[0].intersectionRatio;if(n!==u){if(!A){return l()}if(!n){o=setTimeout((()=>{l(false,1e-7)}),100)}else{l(false,n)}}A=false}try{e=new IntersectionObserver(S,{...x,root:i.ownerDocument})}catch(t){e=new IntersectionObserver(S,x)}e.observe(t)}l(true);return r}function Ft(t,n,e,o){if(o===void 0){o={}}const{ancestorScroll:i=true,ancestorResize:r=true,elementResize:s=typeof ResizeObserver==="function",layoutShift:c=typeof IntersectionObserver==="function",animationFrame:l=false}=o;const a=lt(t);const f=i||r?[...a?st(a):[],...st(n)]:[];f.forEach((t=>{i&&t.addEventListener("scroll",e,{passive:true});r&&t.addEventListener("resize",e)}));const u=a&&c?Ot(a,e):null;let p=-1;let d=null;if(s){d=new ResizeObserver((t=>{let[o]=t;if(o&&o.target===a&&d){d.unobserve(n);cancelAnimationFrame(p);p=requestAnimationFrame((()=>{d&&d.observe(n)}))}e()}));if(a&&!l){d.observe(a)}d.observe(n)}let h;let m=l?dt(t):null;if(l){g()}function g(){const n=dt(t);if(m&&(n.x!==m.x||n.y!==m.y||n.width!==m.width||n.height!==m.height)){e()}m=n;h=requestAnimationFrame(g)}e();return()=>{f.forEach((t=>{i&&t.removeEventListener("scroll",e);r&&t.removeEventListener("resize",e)}));u&&u();d&&d.disconnect();d=null;if(l){cancelAnimationFrame(h)}}}const Rt=B;const zt=z;const Pt=I;const Wt=R;const jt=j;const $t=C;const qt=(t,n,e)=>{const o=new Map;const i={platform:Ht,...e};const r={...i.platform,_c:o};return O(t,n,{...i,platform:r})};(()=>{var t=class extends Event{oldState;newState;constructor(t,{oldState:n="",newState:e="",...o}={}){super(t,o),this.oldState=String(n||""),this.newState=String(e||"")}},n=new WeakMap;function e(e,o,i){n.set(e,setTimeout((()=>{n.has(e)&&e.dispatchEvent(new t("toggle",{cancelable:!1,oldState:o,newState:i}))}),0))}var o=globalThis.ShadowRoot||function(){},i=globalThis.HTMLDialogElement||function(){},r=new WeakMap,s=new WeakMap,c=new WeakMap;function l(t){return c.get(t)||"hidden"}var a=new WeakMap;function f(t){let n=t.popoverTargetElement;if(!n)return;let e=l(n);t.popoverTargetAction==="show"&&e==="showing"||t.popoverTargetAction==="hide"&&e==="hidden"||(e==="showing"?T(n,!0,!0):u(n,!1)&&(a.set(n,t),S(n)))}function u(t,n){return!(t.popover!=="auto"&&t.popover!=="manual"||!t.isConnected||n&&l(t)!=="showing"||!n&&l(t)!=="hidden"||t instanceof i&&t.hasAttribute("open")||document.fullscreenElement===t)}function p(t){return t?Array.from(s.get(t.ownerDocument)||[]).indexOf(t)+1:0}function d(t){let n=g(t),e=v(t);return p(n)>p(e)?n:e}function h(t){let n=s.get(t);for(let t of n||[])if(!t.isConnected)n.delete(t);else return t;return null}function m(t){return typeof t.getRootNode=="function"?t.getRootNode():t.parentNode?m(t.parentNode):t}function g(t){for(;t;){if(t instanceof HTMLElement&&t.popover==="auto"&&c.get(t)==="showing")return t;if(t=t.parentElement||m(t),t instanceof o&&(t=t.host),t instanceof Document)return}}function v(t){for(;t;){let n=t.popoverTargetElement;if(n)return n;if(t=t.parentElement||m(t),t instanceof o&&(t=t.host),t instanceof Document)return}}function y(t){let n=new Map,e=0,o=t.ownerDocument;for(let t of s.get(o)||[])n.set(t,e),e+=1;n.set(t,e),e+=1;let i=null;function r(t){let e=g(t);if(e===null)return null;let o=n.get(e);(i===null||n.get(i)<o)&&(i=e)}return r(t?.parentElement),i}function w(t){return t.hidden||(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)&&t.disabled||t instanceof HTMLInputElement&&t.type==="hidden"||t instanceof HTMLAnchorElement&&t.href===""?!1:t.tabIndex!==-1}function b(t){if(t.shadowRoot&&t.shadowRoot.delegatesFocus!==!0)return null;let n=t;n.shadowRoot&&(n=n.shadowRoot);let e=n.querySelector("[autofocus]");if(e)return e;let o=t.ownerDocument.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),i=o.currentNode;for(;i;){if(w(i))return i;i=o.nextNode()}}function x(t){b(t)?.focus()}var A=new WeakMap;function S(n){if(!u(n,!1))return;let o=n.ownerDocument;if(!n.dispatchEvent(new t("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!u(n,!1))return;let i=!1;if(n.popover==="auto"){let t=n.getAttribute("popover"),e=y(n)||o;if(M(e,!1,!0),t!==n.getAttribute("popover")||!u(n,!1))return}h(o)||(i=!0),A.delete(n);let l=o.activeElement;n.classList.add(":popover-open"),c.set(n,"showing"),r.has(o)||r.set(o,new Set),r.get(o).add(n),x(n),n.popover==="auto"&&(s.has(o)||s.set(o,new Set),s.get(o).add(n),H(a.get(n),!0)),i&&l&&n.popover==="auto"&&A.set(n,l),e(n,"closed","open")}function T(n,o=!1,i=!1){if(!u(n,!0))return;let l=n.ownerDocument;if(n.popover==="auto"&&(M(n,o,i),!u(n,!0))||(H(a.get(n),!1),a.delete(n),i&&(n.dispatchEvent(new t("beforetoggle",{oldState:"open",newState:"closed"})),!u(n,!0))))return;r.get(l)?.delete(n),s.get(l)?.delete(n),n.classList.remove(":popover-open"),c.set(n,"hidden"),i&&e(n,"open","closed");let f=A.get(n);f&&(A.delete(n),o&&f.focus())}function E(t,n=!1,e=!1){let o=h(t);for(;o;)T(o,n,e),o=h(t)}function M(t,n,e){let o=t.ownerDocument||t;if(t instanceof Document)return E(o,n,e);let i=null,r=!1;for(let n of s.get(o)||[])if(n===t)r=!0;else if(r){i=n;break}if(!r)return E(o,n,e);for(;i&&l(i)==="showing"&&s.get(o)?.size;)T(i,n,e)}var k=new WeakMap;function L(t){if(!t.isTrusted)return;let n=t.composedPath()[0];if(!n)return;let e=n.ownerDocument;if(!h(e))return;let o=d(n);if(o&&t.type==="pointerdown")k.set(e,o);else if(t.type==="pointerup"){let t=k.get(e)===o;k.delete(e),t&&M(o||e,!1,!0)}}var D=new WeakMap;function H(t,n=!1){if(!t)return;D.has(t)||D.set(t,t.getAttribute("aria-expanded"));let e=t.popoverTargetElement;if(e&&e.popover==="auto")t.setAttribute("aria-expanded",String(n));else{let n=D.get(t);n?t.setAttribute("aria-expanded",n):t.removeAttribute("aria-expanded")}}var O=globalThis.ShadowRoot||function(){};function F(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function R(t,n,e){let o=t[n];Object.defineProperty(t,n,{value(t){return o.call(this,e(t))}})}var z=/(^|[^\\]):popover-open\b/g;function P(){window.ToggleEvent=window.ToggleEvent||t;function n(t){return t?.includes(":popover-open")&&(t=t.replace(z,"$1.\\:popover-open")),t}R(Document.prototype,"querySelector",n),R(Document.prototype,"querySelectorAll",n),R(Element.prototype,"querySelector",n),R(Element.prototype,"querySelectorAll",n),R(Element.prototype,"matches",n),R(Element.prototype,"closest",n),R(DocumentFragment.prototype,"querySelectorAll",n),R(DocumentFragment.prototype,"querySelectorAll",n),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let t=(this.getAttribute("popover")||"").toLowerCase();return t===""||t=="auto"?"auto":"manual"},set(t){this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){S(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){T(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){c.get(this)==="showing"&&t===void 0||t===!1?T(this,!0,!0):(t===void 0||t===!0)&&S(this)}}});let e=new WeakMap;function o(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(t===null)this.removeAttribute("popovertarget"),e.delete(this);else if(t instanceof Element)this.setAttribute("popovertarget",""),e.set(this,t);else throw new TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let t=e.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return e.delete(this),null;let n=m(this),o=this.getAttribute("popovertarget");return(n instanceof Document||n instanceof O)&&o&&n.getElementById(o)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return t==="show"||t==="hide"?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}o(HTMLButtonElement),o(HTMLInputElement);let i=t=>{if(!t.isTrusted)return;let n=t.composedPath()[0];if(!(n instanceof Element)||n?.shadowRoot)return;let e=m(n);if(!(e instanceof O||e instanceof Document))return;let o=n.closest("[popovertargetaction],[popovertarget]");if(o){f(o);return}},r=t=>{let n=t.key,e=t.target;e&&(n==="Escape"||n==="Esc")&&M(e.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",i),t.addEventListener("keydown",r),t.addEventListener("pointerdown",L),t.addEventListener("pointerup",L)})(document)}F()||P()})();const Bt="@layer polyfill{[popover]{position:fixed;z-index:2147483647;inset:0;padding:.25em;width:fit-content;height:fit-content;border-width:initial;border-color:initial;border-image:initial;border-style:solid;background-color:canvas;color:canvastext;overflow:auto;margin:auto}[popover]:not(.\\:popover-open){display:none}[popover]:is(dialog[open]){display:revert}[anchor].\\:popover-open{inset:auto}@supports selector([popover]:popover-open){[popover]:not(.\\:popover-open,dialog[open]){display:revert}[anchor]:is(:popover-open){inset:auto}}@supports not (background-color: canvas){[popover]{background-color:white;color:black}}@supports(width: -moz-fit-content){[popover]{width:-moz-fit-content;height:-moz-fit-content}}@supports not (inset: 0){[popover]{top:0;left:0;right:0;bottom:0}}}.popover{box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);position:fixed;z-index:1060;width:max-content;margin:0;padding:0;box-sizing:border-box;color:var(--post-contrast-color);background-color:rgb(var(--post-bg-rgb));border:1px solid rgba(0,0,0,0);border-radius:4px;overflow:visible}.arrow{position:absolute;width:.7071067812rem;height:.7071067812rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1;border-right:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}";const Ct={top:"bottom",right:"left",bottom:"top",left:"right"};const It=class{constructor(e){t(this,e);this.postPopoverToggled=n(this,"postPopoverToggled",7);this.placement="top";this.arrow=false}componentDidLoad(){this.popoverRef.setAttribute("popover","");this.popoverRef.addEventListener("beforetoggle",this.handleToggle.bind(this))}disconnectedCallback(){if(this.popoverRef)this.popoverRef.removeEventListener("beforetoggle",(t=>this.toggle(t.target)));if(typeof this.clearAutoUpdate==="function")this.clearAutoUpdate()}async show(t){this.eventTarget=t;this.popoverRef.showPopover()}async hide(){this.eventTarget=null;this.popoverRef.hidePopover()}async toggle(t,n){this.eventTarget=t;this.popoverRef.togglePopover(n);return this.popoverRef.matches(":popover-open")}handleToggle(t){const n=t.newState==="open";if(n){this.startAutoupdates()}else{if(typeof this.clearAutoUpdate==="function")this.clearAutoUpdate()}this.postPopoverToggled.emit(n)}startAutoupdates(){this.clearAutoUpdate=Ft(this.eventTarget,this.popoverRef,this.calculatePosition.bind(this))}async calculatePosition(){const t=[zt(),jt(),Rt({padding:8,limiter:$t({offset:32})}),Pt({apply({availableWidth:t,elements:n}){Object.assign(n.floating.style,{maxWidth:`${t-16}px`})}}),q(this.arrow?12:8)];if(this.arrow){t.push(Wt({element:this.arrowRef,padding:8}))}const{x:n,y:e,middlewareData:o,placement:i}=await qt(this.eventTarget,this.popoverRef,{placement:this.placement||"top",strategy:"fixed",middleware:t});this.popoverRef.style.left=`${n}px`;this.popoverRef.style.top=`${e}px`;if(this.arrow){const t=i.split("-")[0];const{x:n,y:e}=o.arrow;const r=Ct[t];Object.assign(this.arrowRef.style,{top:e?`${e}px`:"",left:n?`${n}px`:"",[r]:`${-this.arrowRef.offsetWidth/2}px`})}}render(){return e(o,{"data-version":r},e("div",{class:"popover",part:"popover",ref:t=>this.popoverRef=t},this.arrow&&e("span",{class:"arrow",ref:t=>{this.arrowRef=t}}),e("slot",null)))}get host(){return i(this)}};It.style=Bt;export{It as P};
|
|
2
|
+
//# sourceMappingURL=p-7d08e4f1.js.map
|