@swisspost/design-system-components 10.6.0 → 10.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{create-validator-decorator-Cy5yN6u9.js → create-validator-decorator-DVm_SDrR.js} +1 -1
- package/dist/cjs/{index-B3PXzvDk.js → index-DY4QxKNv.js} +5 -5
- package/dist/cjs/is-focus-visible-B3CqVQsX.js +19 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{one-of-CRFrfihj.js → one-of-qu7_EPxf.js} +1 -1
- package/dist/cjs/{package-pKyFPwiA.js → package-DAEQGHsE.js} +1 -1
- package/dist/cjs/{pattern-D329DFcf.js → pattern-EpwCKMyC.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +6 -6
- package/dist/cjs/post-autocomplete.cjs.entry.js +5 -5
- package/dist/cjs/post-avatar.cjs.entry.js +85 -61
- package/dist/cjs/post-back-to-top.cjs.entry.js +6 -6
- package/dist/cjs/post-banner.cjs.entry.js +5 -5
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +8 -8
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +7 -7
- package/dist/cjs/post-closebutton_14.cjs.entry.js +477 -593
- package/dist/cjs/post-collapsible_2.cjs.entry.js +13 -7
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-date-picker.cjs.entry.js +43 -27
- package/dist/cjs/post-footer.cjs.entry.js +6 -6
- package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
- package/dist/cjs/post-listbox-option.cjs.entry.js +2 -2
- package/dist/cjs/post-listbox.cjs.entry.js +2 -2
- package/dist/cjs/post-number-input.cjs.entry.js +3 -3
- package/dist/cjs/post-pagination.cjs.entry.js +6 -6
- package/dist/cjs/post-popover-trigger.cjs.entry.js +4 -4
- package/dist/cjs/post-popover.cjs.entry.js +9 -9
- package/dist/cjs/post-progressbar.cjs.entry.js +3 -3
- package/dist/cjs/post-rating.cjs.entry.js +5 -5
- package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +5 -5
- package/dist/cjs/post-side-navigation.cjs.entry.js +14 -9
- package/dist/cjs/post-stepper-item.cjs.entry.js +2 -2
- package/dist/cjs/post-stepper.cjs.entry.js +6 -6
- package/dist/cjs/post-tab-item.cjs.entry.js +5 -5
- package/dist/cjs/post-tab-panel.cjs.entry.js +5 -5
- package/dist/cjs/post-tabs.cjs.entry.js +8 -8
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +6 -6
- package/dist/cjs/post-tooltip.cjs.entry.js +8 -6
- package/dist/cjs/{required-DhAEd0c7.js → required-Dgzo-rb5.js} +1 -1
- package/dist/cjs/{type-2Ma9dvHs.js → type-DBRxpBZI.js} +1 -1
- package/dist/cjs/{url-DePscsTj.js → url-Dl1JABeP.js} +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-avatar/avatar-utils.js +1 -2
- package/dist/collection/components/post-avatar/post-avatar.js +77 -59
- package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
- package/dist/collection/components/post-banner/post-banner.css +1 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +9 -3
- package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
- package/dist/collection/components/post-date-picker/post-date-picker.js +36 -22
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +38 -13
- package/dist/collection/components/post-language-menu/post-language-menu.css +1 -1
- package/dist/collection/components/post-language-menu/post-language-menu.js +1 -1
- package/dist/collection/components/post-logo/post-logo.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +34 -16
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +3 -14
- package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
- package/dist/collection/components/post-number-input/post-number-input.css +2 -2
- package/dist/collection/components/post-pagination/post-pagination.css +1 -1
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +2 -2
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +211 -323
- package/dist/collection/components/post-side-navigation/post-side-navigation.css +1 -1
- package/dist/collection/components/post-side-navigation/post-side-navigation.js +7 -3
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +2 -2
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +3 -1
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/collection/utils/floating-ui/middleware/flip.js +77 -0
- package/dist/collection/utils/floating-ui/middleware/safe-space.js +52 -0
- package/dist/collection/utils/floating-ui/util.js +10 -0
- package/dist/collection/utils/index.js +1 -0
- package/dist/collection/utils/is-focus-visible.js +15 -0
- package/dist/components/is-focus-visible.js +1 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +1 -1
- package/dist/components/post-avatar.js +1 -1
- package/dist/components/post-back-to-top.js +1 -1
- package/dist/components/post-banner.js +1 -1
- package/dist/components/post-breadcrumb-item.js +1 -1
- package/dist/components/post-breadcrumbs.js +1 -1
- package/dist/components/post-closebutton2.js +1 -1
- package/dist/components/post-collapsible2.js +1 -1
- package/dist/components/post-date-picker.js +1 -1
- package/dist/components/post-footer.js +1 -1
- package/dist/components/post-header.js +1 -1
- package/dist/components/post-language-menu.js +1 -1
- package/dist/components/post-logo.js +1 -1
- package/dist/components/post-megadropdown-trigger.js +1 -1
- package/dist/components/post-megadropdown.js +1 -1
- package/dist/components/post-menu-item2.js +1 -1
- package/dist/components/post-menu2.js +1 -1
- package/dist/components/post-number-input.js +1 -1
- package/dist/components/post-pagination.js +1 -1
- package/dist/components/post-popover.js +1 -1
- package/dist/components/post-popovercontainer2.js +1 -1
- package/dist/components/post-side-navigation.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-tooltip-trigger.js +1 -1
- package/dist/components/post-tooltip.js +1 -1
- package/dist/components/react/index.js +1 -1
- package/dist/components/react/p-5kW0ZF_f.js +1 -0
- package/dist/components/react/p-BMCit4BU.js +1 -0
- package/dist/components/react/p-BWwWKRO5.js +1 -0
- package/dist/components/react/p-BdiQsTQm.js +1 -0
- package/dist/components/react/p-BeRGbt65.js +1 -0
- package/dist/components/react/{p-DffT6evQ.js → p-C8i672qm.js} +1 -1
- package/dist/components/react/{p-m1-sOx5T.js → p-C_JY6ipN.js} +1 -1
- package/dist/components/react/p-DRJ9K8sv.js +1 -0
- package/dist/components/react/{p-CcDLIogT.js → p-DygUkCKz.js} +1 -1
- package/dist/components/react/p-DzYMQFK2.js +1 -0
- package/dist/components/react/{p-CzsG0uCA.js → p-E-8qAn1z.js} +1 -1
- package/dist/components/react/p-Q5LQWL2X.js +1 -0
- package/dist/components/react/{p-CdggfEzz.js → p-UXyZDQt4.js} +1 -1
- package/dist/components/react/post-accordion-item.js +1 -1
- package/dist/components/react/post-accordion.js +1 -1
- package/dist/components/react/post-autocomplete.js +1 -1
- package/dist/components/react/post-avatar.js +1 -1
- package/dist/components/react/post-back-to-top.js +1 -1
- package/dist/components/react/post-banner.js +1 -1
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +1 -1
- package/dist/components/react/post-closebutton.js +1 -1
- package/dist/components/react/post-collapsible-trigger.js +1 -1
- package/dist/components/react/post-collapsible.js +1 -1
- package/dist/components/react/post-date-picker.js +1 -1
- package/dist/components/react/post-footer.js +1 -1
- package/dist/components/react/post-header.js +1 -1
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-menu-item.js +1 -1
- package/dist/components/react/post-language-menu.js +1 -1
- package/dist/components/react/post-linkarea.js +1 -1
- package/dist/components/react/post-listbox-option.js +1 -1
- package/dist/components/react/post-listbox.js +1 -1
- package/dist/components/react/post-logo.js +1 -1
- package/dist/components/react/post-mainnavigation.js +1 -1
- package/dist/components/react/post-megadropdown-trigger.js +1 -1
- package/dist/components/react/post-megadropdown.js +1 -1
- package/dist/components/react/post-menu-item.js +1 -1
- package/dist/components/react/post-menu-trigger.js +1 -1
- package/dist/components/react/post-menu.js +1 -1
- package/dist/components/react/post-number-input.js +1 -1
- package/dist/components/react/post-pagination.js +1 -1
- package/dist/components/react/post-popover-trigger.js +1 -1
- package/dist/components/react/post-popover.js +1 -1
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-rating.js +1 -1
- package/dist/components/react/post-side-navigation-trigger.js +1 -1
- package/dist/components/react/post-side-navigation.js +1 -1
- package/dist/components/react/post-stepper-item.js +1 -1
- package/dist/components/react/post-stepper.js +1 -1
- package/dist/components/react/post-tab-item.js +1 -1
- package/dist/components/react/post-tab-panel.js +1 -1
- package/dist/components/react/post-tabs.js +1 -1
- package/dist/components/react/post-togglebutton.js +1 -1
- package/dist/components/react/post-tooltip-trigger.js +1 -1
- package/dist/components/react/post-tooltip.js +1 -1
- package/dist/docs.json +67 -45
- package/dist/esm/{create-validator-decorator-C2XlYkNB.js → create-validator-decorator-Cp_NUmrr.js} +1 -1
- package/dist/esm/{index-BjziJWh2.js → index-D0jX3Fts.js} +5 -5
- package/dist/esm/is-focus-visible-BWwWKRO5.js +17 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{one-of-Do1iao-k.js → one-of-B9locHPx.js} +1 -1
- package/dist/esm/{package-T8T3po4z.js → package-BdiQsTQm.js} +1 -1
- package/dist/esm/{pattern-BZDucOTq.js → pattern-BL3OBU8C.js} +1 -1
- package/dist/esm/post-accordion_2.entry.js +6 -6
- package/dist/esm/post-autocomplete.entry.js +5 -5
- package/dist/esm/post-avatar.entry.js +85 -61
- package/dist/esm/post-back-to-top.entry.js +6 -6
- package/dist/esm/post-banner.entry.js +5 -5
- package/dist/esm/post-breadcrumb-item.entry.js +8 -8
- package/dist/esm/post-breadcrumbs.entry.js +7 -7
- package/dist/esm/post-closebutton_14.entry.js +477 -593
- package/dist/esm/post-collapsible_2.entry.js +13 -7
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-date-picker.entry.js +43 -27
- package/dist/esm/post-footer.entry.js +6 -6
- package/dist/esm/post-linkarea.entry.js +2 -2
- package/dist/esm/post-listbox-option.entry.js +2 -2
- package/dist/esm/post-listbox.entry.js +2 -2
- package/dist/esm/post-number-input.entry.js +3 -3
- package/dist/esm/post-pagination.entry.js +6 -6
- package/dist/esm/post-popover-trigger.entry.js +4 -4
- package/dist/esm/post-popover.entry.js +9 -9
- package/dist/esm/post-progressbar.entry.js +3 -3
- package/dist/esm/post-rating.entry.js +5 -5
- package/dist/esm/post-side-navigation-trigger.entry.js +5 -5
- package/dist/esm/post-side-navigation.entry.js +14 -9
- package/dist/esm/post-stepper-item.entry.js +2 -2
- package/dist/esm/post-stepper.entry.js +6 -6
- package/dist/esm/post-tab-item.entry.js +5 -5
- package/dist/esm/post-tab-panel.entry.js +5 -5
- package/dist/esm/post-tabs.entry.js +8 -8
- package/dist/esm/post-tooltip-trigger.entry.js +6 -6
- package/dist/esm/post-tooltip.entry.js +8 -6
- package/dist/esm/{required-B0X7uy13.js → required-CDaQB1gC.js} +1 -1
- package/dist/esm/{type-CF1dOg6D.js → type-CQ7XuPCZ.js} +1 -1
- package/dist/esm/{url-BL7d6iWZ.js → url-B-86gtTK.js} +1 -1
- package/dist/post-components/p-0688d296.entry.js +1 -0
- package/dist/post-components/p-0b0b2f02.entry.js +1 -0
- package/dist/post-components/{p-c9dcdebb.entry.js → p-0d25c033.entry.js} +1 -1
- package/dist/post-components/{p-655ded00.entry.js → p-229d324e.entry.js} +1 -1
- package/dist/post-components/{p-88f754e9.entry.js → p-2a5312a7.entry.js} +1 -1
- package/dist/post-components/{p-ba1b4ba0.entry.js → p-330fd6cd.entry.js} +1 -1
- package/dist/post-components/p-3712133b.entry.js +1 -0
- package/dist/post-components/{p-87b1034f.entry.js → p-379780a3.entry.js} +1 -1
- package/dist/post-components/{p-dc285087.entry.js → p-3fdb8ebc.entry.js} +1 -1
- package/dist/post-components/{p-2005eb98.entry.js → p-456b0786.entry.js} +1 -1
- package/dist/post-components/p-4d30c65d.entry.js +1 -0
- package/dist/post-components/{p-de6f1816.entry.js → p-534ca27e.entry.js} +1 -1
- package/dist/post-components/p-5369b9c2.entry.js +1 -0
- package/dist/post-components/p-6833be12.entry.js +1 -0
- package/dist/post-components/p-6ad44691.entry.js +1 -0
- package/dist/post-components/{p-1ec27142.entry.js → p-82c62e90.entry.js} +1 -1
- package/dist/post-components/{p-8012cc3b.entry.js → p-91a2ef3c.entry.js} +1 -1
- package/dist/post-components/p-95f5d5ea.entry.js +1 -0
- package/dist/post-components/p-9dd286bf.entry.js +1 -0
- package/dist/post-components/p-9fedcfba.entry.js +1 -0
- package/dist/post-components/p-BCPv4bcY.js +1 -0
- package/dist/post-components/p-BWwWKRO5.js +1 -0
- package/dist/post-components/p-BdiQsTQm.js +1 -0
- package/dist/post-components/p-CP3LjuFR.js +1 -0
- package/dist/post-components/p-D0jX3Fts.js +2 -0
- package/dist/post-components/p-D6mVqZLg.js +1 -0
- package/dist/post-components/{p-DgnQe03V.js → p-DSaWK_q-.js} +1 -1
- package/dist/post-components/p-VPHnF9fB.js +1 -0
- package/dist/post-components/{p-f9a8ee94.entry.js → p-ab0500b7.entry.js} +1 -1
- package/dist/post-components/p-c123ecde.entry.js +1 -0
- package/dist/post-components/{p-cdc7b8d3.entry.js → p-d2de31b7.entry.js} +1 -1
- package/dist/post-components/p-dffeb751.entry.js +1 -0
- package/dist/post-components/{p-60550edb.entry.js → p-e11ccdbe.entry.js} +1 -1
- package/dist/post-components/{p-a32d3050.entry.js → p-e560767b.entry.js} +1 -1
- package/dist/post-components/p-ee7fade4.entry.js +1 -0
- package/dist/post-components/{p-2cff5b3a.entry.js → p-f2629077.entry.js} +1 -1
- package/dist/post-components/{p-d7c9a969.entry.js → p-f2b24bbd.entry.js} +1 -1
- package/dist/post-components/p-gv9b-Z15.js +1 -0
- package/dist/post-components/post-components.css +2 -2
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-avatar/avatar-utils.d.ts +0 -2
- package/dist/types/components/post-avatar/post-avatar.d.ts +11 -9
- package/dist/types/components/post-date-picker/post-date-picker.d.ts +4 -1
- package/dist/types/components/post-header/post-header.d.ts +5 -1
- package/dist/types/components/post-language-menu/post-language-menu.d.ts +3 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +1 -1
- package/dist/types/components/post-menu/post-menu.d.ts +0 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +74 -69
- package/dist/types/components.d.ts +39 -26
- package/dist/types/utils/floating-ui/middleware/flip.d.ts +14 -0
- package/dist/types/utils/floating-ui/middleware/safe-space.d.ts +10 -0
- package/dist/types/utils/floating-ui/util.d.ts +4 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/is-focus-visible.d.ts +5 -0
- package/dist/vrt/helpers/header-test-config.js +2 -1
- package/hydrate/index.js +564 -623
- package/hydrate/index.mjs +564 -623
- package/package.json +11 -10
- package/dist/components/react/p-3RU9XwVO.js +0 -1
- package/dist/components/react/p-B1TcktiB.js +0 -1
- package/dist/components/react/p-BN2dfUQ0.js +0 -1
- package/dist/components/react/p-BPUhha1U.js +0 -1
- package/dist/components/react/p-Bnb_TyDh.js +0 -1
- package/dist/components/react/p-T8T3po4z.js +0 -1
- package/dist/components/react/p-WXzzOdnl.js +0 -1
- package/dist/post-components/p-0e922531.entry.js +0 -1
- package/dist/post-components/p-53bd2128.entry.js +0 -1
- package/dist/post-components/p-59b30e90.entry.js +0 -1
- package/dist/post-components/p-76cc3c9a.entry.js +0 -1
- package/dist/post-components/p-819c93de.entry.js +0 -1
- package/dist/post-components/p-840acd3c.entry.js +0 -1
- package/dist/post-components/p-9S_5_Zh8.js +0 -1
- package/dist/post-components/p-BYfu3J2D.js +0 -1
- package/dist/post-components/p-BjziJWh2.js +0 -2
- package/dist/post-components/p-BoYe-VVx.js +0 -1
- package/dist/post-components/p-CbbADNiv.js +0 -1
- package/dist/post-components/p-DlKbBdcP.js +0 -1
- package/dist/post-components/p-T8T3po4z.js +0 -1
- package/dist/post-components/p-b4229624.entry.js +0 -1
- package/dist/post-components/p-b9faa76b.entry.js +0 -1
- package/dist/post-components/p-c0ae13b7.entry.js +0 -1
- package/dist/post-components/p-ccf8020b.entry.js +0 -1
- package/dist/post-components/p-cd68d3a2.entry.js +0 -1
- package/dist/post-components/p-db11f781.entry.js +0 -1
- package/dist/post-components/p-dec8bd99.entry.js +0 -1
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/vrt/helpers/header-variants.config.d.ts +0 -23
- package/dist/vrt/helpers/header-variants.config.js +0 -157
- /package/dist/collection/utils/{floating-ui.js → floating-ui/platform/safe-area.js} +0 -0
- /package/dist/types/utils/{floating-ui.d.ts → floating-ui/platform/safe-area.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as o,Host as n,transformTag as r}from"@stencil/core/internal/client";import"./breakpoints.js";import{d as a}from"./debounce.js";import{n as s}from"./nanoid.js";import{v as c}from"./package.js";import{d as l}from"./post-icon2.js";import{T as d}from"./type.js";import{R as h}from"./required.js";var p=function(t,e,i,o){var n,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(n=t[s])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const b=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=i(this,"postChange",7),this.maxVisiblePages=3,this.items=[],this.page=1,this.lastWindowWidth=window.innerWidth,this.loaded=!1,this.debouncedResize=a(this.handleResizeInternal.bind(this),150),this.measurementTimeoutId=null}handlePropsChange(){this.updatePagesWithValidation()}componentWillLoad(){this.paginationId="pagination-"+(this.host.id||s(6)),this.updatePagesWithValidation()}connectedCallback(){window.addEventListener("resize",this.debouncedResize)}componentDidLoad(){this.loaded=!0,this.scheduleMeasurement()}disconnectedCallback(){this.loaded=!1,window.removeEventListener("resize",this.debouncedResize),null!==this.measurementTimeoutId&&(clearTimeout(this.measurementTimeoutId),this.measurementTimeoutId=null)}scheduleMeasurement(){this.loaded&&(this.measurementTimeoutId=globalThis.setTimeout((()=>{this.navRef?.clientWidth>0&&this.hiddenItemsRef?this.measureAndCalculateVisiblePages():this.scheduleMeasurement()}),50))}handleResizeInternal(){this.loaded&&window.innerWidth!==this.lastWindowWidth&&(this.lastWindowWidth=window.innerWidth,this.measureAndCalculateVisiblePages())}calculateGap(t,e){const i=t.getBoundingClientRect();return e.getBoundingClientRect().left-i.right}measureAndCalculateVisiblePages(){if(!this.navRef||!this.hiddenItemsRef||!this.loaded)return;const t=this.getTotalPages();if(t<=1)return;const e=this.getPaginationPadding(),i=this.getAvailableWidth()-e,o=this.hiddenItemsRef.querySelector(".hidden-page-button"),n=this.hiddenItemsRef.querySelector(".hidden-ellipsis");if(!o)return;const r=o.getBoundingClientRect().width,a=o&&n?this.calculateGap(o,n):0,s=this.getControlButtonsWidth(a);this.maxVisiblePages=Math.max(3,Math.min(Math.floor((i-s+a)/(r+a)),t)),this.updatePagesWithValidation()}getControlButtonsWidth(t){return this.hiddenItemsRef?Array.from(this.hiddenItemsRef.querySelectorAll(".hidden-control-button")).reduce(((e,i)=>{const o=Number.parseFloat(globalThis.getComputedStyle(i).marginInlineStart),n=Number.parseFloat(globalThis.getComputedStyle(i).marginInlineEnd);return e+i.getBoundingClientRect().width+o+n+t}),0):0}getPaginationPadding(){if(!this.navRef)return 0;const t=globalThis.getComputedStyle(this.navRef);return(Number.parseFloat(t.paddingLeft)||0)+(Number.parseFloat(t.paddingRight)||0)}getAvailableWidth(){return this.navRef?this.host.parentElement?.clientWidth??window.innerWidth:0}get invalidSize(){return 0===this.collectionSize||0===this.pageSize}clampPageToValidRange(t){return 0===t||this.invalidSize||Number.isNaN(t)||!this.page||this.page<1||Number.isNaN(this.page)?1:this.page>t?t:this.page}updatePagesWithValidation(){const t=this.getTotalPages();this.page=this.clampPageToValidRange(t),this.generateItems(t)}getTotalPages(){return this.invalidSize?1:Math.ceil(this.collectionSize/this.pageSize)}sectionForGap(t){return t<=1?"none":2===t?"page":"ellipsis"}getSections(t,e,i){const o=t-1,n=i-e;return{leftSection:this.sectionForGap(o),rightSection:this.sectionForGap(n),leftGap:o,rightGap:n}}computeTotalItems(t,e,i){const{leftSection:o,rightSection:n}=this.getSections(t,e,i);return 2+("none"===o?0:1)+("none"===n?0:1)+Math.max(0,e-t+1)}buildAllPages(t){const e=[];for(let i=1;i<=t;i++)e.push({type:"page",page:i});return e}adjustForGapTwo(t,e,i,o){const n={startPage:t,endPage:e};return 2==i-e&&(n.endPage=i-1,n.startPage=Math.max(2,n.endPage-o+1)),2==n.startPage-1&&(n.startPage=2,n.endPage=Math.min(i-1,n.startPage+o-1)),n}ensureMiddleSlots(t,e,i,o){const n={startPage:t,endPage:e},r=e-t+1;return r<o&&e<i-1&&(n.endPage=Math.min(i-1,t+o-1)),r<o&&t>2&&(n.startPage=Math.max(2,e-o+1)),n}trimExcessItems(t,e,i,o,n){const r={startPage:t,endPage:e};let a=this.computeTotalItems(r.startPage,r.endPage,i);for(;a>o;){if(r.endPage-n>=n-r.startPage&&r.endPage>r.startPage)r.endPage=Math.max(r.startPage-1,r.endPage-1);else{if(!(r.startPage<r.endPage))break;r.startPage=Math.min(r.endPage+1,r.startPage+1)}const t=this.computeTotalItems(r.startPage,r.endPage,i);if(t===a)break;a=t}return r}expandToFillSlots(t,e,i,o){const n={startPage:t,endPage:e};let r=this.computeTotalItems(n.startPage,n.endPage,i);for(;r<o;){const t=n.endPage<i-1;if(n.startPage>2)n.startPage=Math.max(2,n.startPage-1);else{if(!t)break;n.endPage=Math.min(i-1,n.endPage+1)}const e=this.computeTotalItems(n.startPage,n.endPage,i);if(e===r)break;r=e}return n}balanceTotalItems(t,e,i,o,n){const r=this.trimExcessItems(t,e,i,o,n);return this.expandToFillSlots(r.startPage,r.endPage,i,o)}calculatePageRange(t,e,i){const o=Math.max(0,i-2-2);if(o<=0)return{startPage:2,endPage:1};let n=t-Math.floor(o/2),r=n+o-1;n<2&&(n=2,r=n+o-1),r>e-1&&(r=e-1,n=r-o+1),n=Math.max(2,n),r=Math.min(e-1,r);const a=this.adjustForGapTwo(n,r,e,o),s=this.ensureMiddleSlots(a.startPage,a.endPage,e,o);return this.balanceTotalItems(s.startPage,s.endPage,e,i,t)}buildPaginationItems(t,e,i){const o=[],n=t<=e;if(o.push({type:"page",page:1}),n){const{leftSection:n,rightSection:r}=this.getSections(t,e,i);"page"===n?o.push({type:"page",page:2}):"ellipsis"===n&&o.push({type:"ellipsis"});for(let i=t;i<=e;i++)o.push({type:"page",page:i});return"page"===r?o.push({type:"page",page:i-1}):"ellipsis"===r&&o.push({type:"ellipsis"}),o.push({type:"page",page:i}),o}}generateSmallPagination(t,e){return 1===t||t===e?[{type:"page",page:1},{type:"ellipsis"},{type:"page",page:e}]:[{type:"ellipsis"},{type:"page",page:t},{type:"ellipsis"}]}generatePages(t,e,i){if(t<=e)return this.buildAllPages(t);if(e<=4)return this.generateSmallPagination(i,t);const{startPage:o,endPage:n}=this.calculatePageRange(i,t,e);return this.buildPaginationItems(o,n,t)}generateItems(t){const e=this.page;this.items=[{type:"control",action:"previous",disabled:e<=1},...this.generatePages(t,this.maxVisiblePages,e),{type:"control",action:"next",disabled:e>=t}]}emitPageChange(t){this.page=t,requestAnimationFrame((()=>this.measureAndCalculateVisiblePages())),this.postChange.emit(t)}handlePageClick(t){t!==this.page&&this.emitPageChange(t)}handlePrevious(){this.page<=1||this.emitPageChange(this.page-1)}handleNext(){const t=this.getTotalPages();this.page>=t||this.emitPageChange(this.page+1)}handleKeyDown(t,e){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e())}buildPageLabel(t){const e=this.getTotalPages();return 1===t?`${this.textFirst}, ${this.textPage} ${t}`:t===e?`${this.textLast}, ${this.textPage} ${t}`:`${this.textPage} ${t}`}buildControlAttributes(t){switch(t){case"previous":return{key:"prev",icon:"chevronleftwide",label:this.textPrevious,className:"prev-button",onClick:()=>this.handlePrevious()};case"next":return{key:"next",icon:"chevronrightwide",label:this.textNext,className:"next-button",onClick:()=>this.handleNext()}}}renderEllipsis(t){return o("li",{class:"pagination-item pagination-ellipsis",key:"ellipsis-"+t,"aria-hidden":"true"},o("span",{class:"pagination-ellipsis-content"},"..."))}renderPageButton(t){const e=t===this.page;return o("li",{class:"pagination-item",key:"page-"+t},o("button",{type:"button",class:{"pagination-link":!0,"pagination-link-active":e},"aria-label":this.buildPageLabel(t),"aria-current":e?"page":void 0,onClick:()=>this.handlePageClick(t),onKeyDown:e=>this.handleKeyDown(e,(()=>this.handlePageClick(t))),tabIndex:0},o("span",{"aria-hidden":"true"},t)))}renderControlButton(t,e){const i=this.buildControlAttributes(t);return o("li",{class:"pagination-item pagination-control",key:i.key},o("button",{type:"button",class:"pagination-control-button btn btn-icon btn-secondary "+i.className,"aria-label":i.label,onClick:i.onClick,onKeyDown:t=>this.handleKeyDown(t,i.onClick),tabIndex:e?-1:0,disabled:e},o("post-icon",{name:i.icon,"aria-hidden":"true"}),o("span",{class:"visually-hidden"},i.label)))}renderItem(t,e){switch(t.type){case"page":return this.renderPageButton(t.page);case"control":return this.renderControlButton(t.action,t.disabled);case"ellipsis":return this.renderEllipsis(e)}}renderHiddenControlButton(t){const e=this.buildControlAttributes(t);return o("button",{key:"hidden-"+e.key,class:"pagination-link pagination-control-button hidden-control-button",disabled:!0},o("post-icon",{name:e.icon,"aria-hidden":"true"}))}renderHiddenItems(t){const e=this.items.at(0),i=this.items.at(-1);return["control"===e?.type&&this.renderHiddenControlButton(e.action),o("button",{key:"hidden-page",class:"pagination-link pagination-control-button hidden-page-button","aria-label":this.buildPageLabel(t),disabled:!0},o("span",{"aria-hidden":"true"},t)),o("span",{key:"hidden-ellipsis",class:"pagination-ellipsis-content hidden-ellipsis","aria-hidden":"true"},"..."),"control"===i?.type&&this.renderHiddenControlButton(i.action)]}render(){const t=this.getTotalPages();return t<=1?null:o(n,{slot:"post-pagination","data-version":c},o("nav",{class:"pagination","aria-label":this.label,id:this.paginationId,ref:t=>this.navRef=t},o("ul",{class:"pagination-list",role:"list"},this.items.map(((t,e)=>this.renderItem(t,e)))),o("div",{class:"hidden-items","aria-hidden":"true",ref:t=>this.hiddenItemsRef=t},this.renderHiddenItems(t))))}get host(){return this}static get watchers(){return{page:[{handlePropsChange:0}],pageSize:[{handlePropsChange:0}],collectionSize:[{handlePropsChange:0}]}}static get style(){return".btn{display:inline-flex;position:relative;align-items:center;justify-content:center;max-width:100%;overflow:hidden;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;border-width:var(--post-device-border-width-default);border-style:solid;border-color:rgba(0,0,0,0);border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-size:var(--post-device-font-size-6);font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;min-height:var(--post-device-sizing-interactive-button-height-1);gap:var(--post-device-spacing-gap-inline-10);padding:0 var(--post-device-spacing-padding-inline-6)}.btn:not(:disabled):hover{text-decoration:none}.btn:disabled{border-style:var(--post-core-border-style-dash);cursor:unset}.btn{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn{border-width:1px !important;transition:none}.btn:is(button){background-color:ButtonFace !important;border-color:ButtonBorder !important}}.btn>post-icon{width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4)}.btn-primary{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-primary-enabled-stroke);color:var(--post-scheme-color-interactive-button-primary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-primary-enabled-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-primary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover{background-color:Highlight !important}.btn-primary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover>post-icon{color:HighlightText !important}}.btn-primary:disabled{border-color:var(--post-scheme-color-interactive-button-primary-disabled-stroke);color:var(--post-scheme-color-interactive-button-primary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-primary-disabled-bg)}.btn-primary:not(:disabled):hover,.btn-primary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-primary-hover-stroke);color:var(--post-scheme-color-interactive-button-primary-hover-fg);background-color:var(--post-scheme-color-interactive-button-primary-hover-bg)}.btn-default{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-default:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover{background-color:Highlight !important}.btn-default:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover>post-icon{color:HighlightText !important}}.btn-default:disabled{border-color:var(--post-scheme-color-interactive-button-secondary-disabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-disabled-bg)}.btn-default:not(:disabled):hover,.btn-default.pretend-hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}.btn-secondary{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-secondary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover{background-color:Highlight !important}.btn-secondary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover>post-icon{color:HighlightText !important}}.btn-secondary:disabled{border-color:var(--post-scheme-color-interactive-button-secondary-disabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-disabled-bg)}.btn-secondary:not(:disabled):hover,.btn-secondary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}.btn-tertiary{border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-tertiary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover{background-color:Highlight !important}.btn-tertiary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover>post-icon{color:HighlightText !important}}.btn-tertiary:disabled{border-color:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-tertiary-disabled-bg)}.btn-tertiary:not(:disabled):hover,.btn-tertiary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg)}.btn-link{border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-link:disabled,.btn-link.disabled{text-decoration:none}}.btn-link:disabled{border-color:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-disabled-fg)}.btn-link:not(:disabled):hover,.btn-link.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.btn-sm{min-height:var(--post-device-sizing-interactive-button-height-4);gap:var(--post-device-spacing-gap-inline-11);padding:0 var(--post-device-spacing-padding-inline-7)}.btn-sm>post-icon{width:var(--post-device-sizing-interactive-button-icon-5);height:var(--post-device-sizing-interactive-button-icon-5)}.btn-lg{min-height:var(--post-device-sizing-interactive-button-height-2);gap:var(--post-device-spacing-gap-inline-1);padding:0 var(--post-device-spacing-padding-inline-5)}.btn-lg>post-icon{width:var(--post-device-sizing-interactive-button-icon-3);height:var(--post-device-sizing-interactive-button-icon-3)}.btn-link{-webkit-text-decoration:var(--post-core-text-decoration-underline);text-decoration:var(--post-core-text-decoration-underline);border:0 none;border-radius:0;min-height:0;font-size:inherit;font-weight:inherit;padding:0}.btn-link{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-link:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-link:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-link:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-link:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-link:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.btn-icon{padding:0;width:var(--post-device-sizing-interactive-button-height-1);height:var(--post-device-sizing-interactive-button-height-1);min-height:0;vertical-align:text-bottom}.btn-icon.btn-link{width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4)}.btn-icon>post-icon{display:block;width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4)}.btn-icon.btn-sm{padding:0;width:var(--post-device-sizing-interactive-button-height-4);height:var(--post-device-sizing-interactive-button-height-4);min-height:0;vertical-align:text-bottom}.btn-icon.btn-sm.btn-link{width:var(--post-device-sizing-interactive-button-icon-5);height:var(--post-device-sizing-interactive-button-icon-5)}.btn-icon.btn-sm>post-icon{display:block;width:var(--post-device-sizing-interactive-button-icon-5);height:var(--post-device-sizing-interactive-button-icon-5)}.btn-icon.btn-lg{padding:0;width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);min-height:0;vertical-align:text-bottom}.btn-icon.btn-lg.btn-link{width:var(--post-device-sizing-interactive-button-icon-3);height:var(--post-device-sizing-interactive-button-icon-3)}.btn-icon.btn-lg>post-icon{display:block;width:var(--post-device-sizing-interactive-button-icon-3);height:var(--post-device-sizing-interactive-button-icon-3)}.pagination{position:relative;display:flex;align-items:center;justify-content:center;width:100%;max-width:100%;padding:var(--post-device-spacing-padding-15);overflow:hidden;box-sizing:border-box}.pagination-list{display:flex;align-items:center;gap:var(--post-device-spacing-gap-inline-4);min-width:0;max-width:100%;margin:0;padding:0;list-style:none;flex-wrap:nowrap}.pagination-list .pagination-control:first-child{margin-inline-end:calc(var(--post-device-spacing-gap-11) - var(--post-device-spacing-gap-inline-4))}.pagination-list .pagination-control:last-child{margin-inline-start:calc(var(--post-device-spacing-gap-11) - var(--post-device-spacing-gap-inline-4))}.pagination-item{display:flex;align-items:center;margin:0;padding:0;flex-shrink:0;flex-grow:0}.pagination-ellipsis,.pagination-link,.pagination-ellipsis-content{display:flex;align-items:center;justify-content:center}.pagination-link,.pagination-ellipsis-content{width:var(--post-device-sizing-interactive-button-height-1);height:var(--post-device-sizing-interactive-button-height-1);min-width:var(--post-device-sizing-interactive-button-height-1);font-size:var(--post-device-font-size-6);color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-weight:var(--post-device-font-weight-bold)}.pagination-link{box-sizing:border-box;padding:0;margin:0;font-weight:var(--post-device-font-weight-bold);text-decoration:none;background-color:var(--post-scheme-color-interactive-primary-enabled-bg4);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke5);border-radius:var(--post-device-border-radius-round);cursor:pointer;appearance:none;outline:none;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}.pagination-link{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.pagination-link:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.pagination-link:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.pagination-link:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.pagination-link:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.pagination-link:active:not(.pagination-link-active),.pagination-link:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);background-color:var(--post-scheme-color-interactive-primary-hover-bg5);border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}.pagination-link.pagination-link-active{color:var(--post-scheme-color-interactive-primary-selected-fg3);background-color:var(--post-scheme-color-interactive-primary-selected-bg4);border-color:var(--post-scheme-color-interactive-primary-selected-stroke1);cursor:default}.pagination-ellipsis{flex-shrink:0;flex-grow:0}.pagination-ellipsis-content{user-select:none}.hidden-items{position:absolute;display:flex;gap:var(--post-device-spacing-gap-inline-4);height:0;overflow:hidden;white-space:nowrap;visibility:hidden;pointer-events:none}.hidden-items .pagination-control-button:not(.hidden-page-button):first-child{margin-inline-end:calc(var(--post-device-spacing-gap-11) - var(--post-device-spacing-gap-inline-4))}.hidden-items .pagination-control-button:not(.hidden-page-button):last-child{margin-inline-start:calc(var(--post-device-spacing-gap-11) - var(--post-device-spacing-gap-inline-4))}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}"}},[1,"post-pagination",{page:[1026],pageSize:[514,"page-size"],collectionSize:[514,"collection-size"],label:[513],textPrevious:[513,"text-previous"],textNext:[513,"text-next"],textPage:[513,"text-page"],textFirst:[513,"text-first"],textLast:[513,"text-last"],paginationId:[32],maxVisiblePages:[32],items:[32]},void 0,{page:[{handlePropsChange:0}],pageSize:[{handlePropsChange:0}],collectionSize:[{handlePropsChange:0}]}]);p([d("number")],b.prototype,"page",void 0),p([h(),d("number")],b.prototype,"pageSize",void 0),p([h(),d("number")],b.prototype,"collectionSize",void 0),p([h(),d("string")],b.prototype,"label",void 0),p([h(),d("string")],b.prototype,"textPrevious",void 0),p([h(),d("string")],b.prototype,"textNext",void 0),p([h(),d("string")],b.prototype,"textPage",void 0),p([h(),d("string")],b.prototype,"textFirst",void 0),p([h(),d("string")],b.prototype,"textLast",void 0);const g=b,v=function(){"undefined"!=typeof customElements&&["post-pagination","post-icon"].forEach((t=>{switch(t){case"post-pagination":customElements.get(r(t))||customElements.define(r(t),b);break;case"post-icon":customElements.get(r(t))||l()}}))};export{g as PostPagination,v as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as o,Host as n,transformTag as r}from"@stencil/core/internal/client";import"./breakpoints.js";import{d as a}from"./debounce.js";import{n as s}from"./nanoid.js";import{v as c}from"./package.js";import{d as l}from"./post-icon2.js";import{T as d}from"./type.js";import{R as h}from"./required.js";var p=function(t,e,i,o){var n,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(n=t[s])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const b=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=i(this,"postChange",7),this.maxVisiblePages=3,this.items=[],this.page=1,this.lastWindowWidth=window.innerWidth,this.loaded=!1,this.debouncedResize=a(this.handleResizeInternal.bind(this),150),this.measurementTimeoutId=null}handlePropsChange(){this.updatePagesWithValidation()}componentWillLoad(){this.paginationId="pagination-"+(this.host.id||s(6)),this.updatePagesWithValidation()}connectedCallback(){window.addEventListener("resize",this.debouncedResize)}componentDidLoad(){this.loaded=!0,this.scheduleMeasurement()}disconnectedCallback(){this.loaded=!1,window.removeEventListener("resize",this.debouncedResize),null!==this.measurementTimeoutId&&(clearTimeout(this.measurementTimeoutId),this.measurementTimeoutId=null)}scheduleMeasurement(){this.loaded&&(this.measurementTimeoutId=globalThis.setTimeout((()=>{this.navRef?.clientWidth>0&&this.hiddenItemsRef?this.measureAndCalculateVisiblePages():this.scheduleMeasurement()}),50))}handleResizeInternal(){this.loaded&&window.innerWidth!==this.lastWindowWidth&&(this.lastWindowWidth=window.innerWidth,this.measureAndCalculateVisiblePages())}calculateGap(t,e){const i=t.getBoundingClientRect();return e.getBoundingClientRect().left-i.right}measureAndCalculateVisiblePages(){if(!this.navRef||!this.hiddenItemsRef||!this.loaded)return;const t=this.getTotalPages();if(t<=1)return;const e=this.getPaginationPadding(),i=this.getAvailableWidth()-e,o=this.hiddenItemsRef.querySelector(".hidden-page-button"),n=this.hiddenItemsRef.querySelector(".hidden-ellipsis");if(!o)return;const r=o.getBoundingClientRect().width,a=o&&n?this.calculateGap(o,n):0,s=this.getControlButtonsWidth(a);this.maxVisiblePages=Math.max(3,Math.min(Math.floor((i-s+a)/(r+a)),t)),this.updatePagesWithValidation()}getControlButtonsWidth(t){return this.hiddenItemsRef?Array.from(this.hiddenItemsRef.querySelectorAll(".hidden-control-button")).reduce(((e,i)=>{const o=Number.parseFloat(globalThis.getComputedStyle(i).marginInlineStart),n=Number.parseFloat(globalThis.getComputedStyle(i).marginInlineEnd);return e+i.getBoundingClientRect().width+o+n+t}),0):0}getPaginationPadding(){if(!this.navRef)return 0;const t=globalThis.getComputedStyle(this.navRef);return(Number.parseFloat(t.paddingLeft)||0)+(Number.parseFloat(t.paddingRight)||0)}getAvailableWidth(){return this.navRef?this.host.parentElement?.clientWidth??window.innerWidth:0}get invalidSize(){return 0===this.collectionSize||0===this.pageSize}clampPageToValidRange(t){return 0===t||this.invalidSize||Number.isNaN(t)||!this.page||this.page<1||Number.isNaN(this.page)?1:this.page>t?t:this.page}updatePagesWithValidation(){const t=this.getTotalPages();this.page=this.clampPageToValidRange(t),this.generateItems(t)}getTotalPages(){return this.invalidSize?1:Math.ceil(this.collectionSize/this.pageSize)}sectionForGap(t){return t<=1?"none":2===t?"page":"ellipsis"}getSections(t,e,i){const o=t-1,n=i-e;return{leftSection:this.sectionForGap(o),rightSection:this.sectionForGap(n),leftGap:o,rightGap:n}}computeTotalItems(t,e,i){const{leftSection:o,rightSection:n}=this.getSections(t,e,i);return 2+("none"===o?0:1)+("none"===n?0:1)+Math.max(0,e-t+1)}buildAllPages(t){const e=[];for(let i=1;i<=t;i++)e.push({type:"page",page:i});return e}adjustForGapTwo(t,e,i,o){const n={startPage:t,endPage:e};return 2==i-e&&(n.endPage=i-1,n.startPage=Math.max(2,n.endPage-o+1)),2==n.startPage-1&&(n.startPage=2,n.endPage=Math.min(i-1,n.startPage+o-1)),n}ensureMiddleSlots(t,e,i,o){const n={startPage:t,endPage:e},r=e-t+1;return r<o&&e<i-1&&(n.endPage=Math.min(i-1,t+o-1)),r<o&&t>2&&(n.startPage=Math.max(2,e-o+1)),n}trimExcessItems(t,e,i,o,n){const r={startPage:t,endPage:e};let a=this.computeTotalItems(r.startPage,r.endPage,i);for(;a>o;){if(r.endPage-n>=n-r.startPage&&r.endPage>r.startPage)r.endPage=Math.max(r.startPage-1,r.endPage-1);else{if(!(r.startPage<r.endPage))break;r.startPage=Math.min(r.endPage+1,r.startPage+1)}const t=this.computeTotalItems(r.startPage,r.endPage,i);if(t===a)break;a=t}return r}expandToFillSlots(t,e,i,o){const n={startPage:t,endPage:e};let r=this.computeTotalItems(n.startPage,n.endPage,i);for(;r<o;){const t=n.endPage<i-1;if(n.startPage>2)n.startPage=Math.max(2,n.startPage-1);else{if(!t)break;n.endPage=Math.min(i-1,n.endPage+1)}const e=this.computeTotalItems(n.startPage,n.endPage,i);if(e===r)break;r=e}return n}balanceTotalItems(t,e,i,o,n){const r=this.trimExcessItems(t,e,i,o,n);return this.expandToFillSlots(r.startPage,r.endPage,i,o)}calculatePageRange(t,e,i){const o=Math.max(0,i-2-2);if(o<=0)return{startPage:2,endPage:1};let n=t-Math.floor(o/2),r=n+o-1;n<2&&(n=2,r=n+o-1),r>e-1&&(r=e-1,n=r-o+1),n=Math.max(2,n),r=Math.min(e-1,r);const a=this.adjustForGapTwo(n,r,e,o),s=this.ensureMiddleSlots(a.startPage,a.endPage,e,o);return this.balanceTotalItems(s.startPage,s.endPage,e,i,t)}buildPaginationItems(t,e,i){const o=[],n=t<=e;if(o.push({type:"page",page:1}),n){const{leftSection:n,rightSection:r}=this.getSections(t,e,i);"page"===n?o.push({type:"page",page:2}):"ellipsis"===n&&o.push({type:"ellipsis"});for(let i=t;i<=e;i++)o.push({type:"page",page:i});return"page"===r?o.push({type:"page",page:i-1}):"ellipsis"===r&&o.push({type:"ellipsis"}),o.push({type:"page",page:i}),o}}generateSmallPagination(t,e){return 1===t||t===e?[{type:"page",page:1},{type:"ellipsis"},{type:"page",page:e}]:[{type:"ellipsis"},{type:"page",page:t},{type:"ellipsis"}]}generatePages(t,e,i){if(t<=e)return this.buildAllPages(t);if(e<=4)return this.generateSmallPagination(i,t);const{startPage:o,endPage:n}=this.calculatePageRange(i,t,e);return this.buildPaginationItems(o,n,t)}generateItems(t){const e=this.page;this.items=[{type:"control",action:"previous",disabled:e<=1},...this.generatePages(t,this.maxVisiblePages,e),{type:"control",action:"next",disabled:e>=t}]}emitPageChange(t){this.page=t,requestAnimationFrame((()=>this.measureAndCalculateVisiblePages())),this.postChange.emit(t)}handlePageClick(t){t!==this.page&&this.emitPageChange(t)}handlePrevious(){this.page<=1||this.emitPageChange(this.page-1)}handleNext(){const t=this.getTotalPages();this.page>=t||this.emitPageChange(this.page+1)}handleKeyDown(t,e){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e())}buildPageLabel(t){const e=this.getTotalPages();return 1===t?`${this.textFirst}, ${this.textPage} ${t}`:t===e?`${this.textLast}, ${this.textPage} ${t}`:`${this.textPage} ${t}`}buildControlAttributes(t){switch(t){case"previous":return{key:"prev",icon:"chevronleftwide",label:this.textPrevious,className:"prev-button",onClick:()=>this.handlePrevious()};case"next":return{key:"next",icon:"chevronrightwide",label:this.textNext,className:"next-button",onClick:()=>this.handleNext()}}}renderEllipsis(t){return o("li",{class:"pagination-item pagination-ellipsis",key:"ellipsis-"+t,"aria-hidden":"true"},o("span",{class:"pagination-ellipsis-content"},"..."))}renderPageButton(t){const e=t===this.page;return o("li",{class:"pagination-item",key:"page-"+t},o("button",{type:"button",class:{"pagination-link":!0,"pagination-link-active":e},"aria-label":this.buildPageLabel(t),"aria-current":e?"page":void 0,onClick:()=>this.handlePageClick(t),onKeyDown:e=>this.handleKeyDown(e,(()=>this.handlePageClick(t))),tabIndex:0},o("span",{"aria-hidden":"true"},t)))}renderControlButton(t,e){const i=this.buildControlAttributes(t);return o("li",{class:"pagination-item pagination-control",key:i.key},o("button",{type:"button",class:"pagination-control-button btn btn-icon btn-secondary "+i.className,"aria-label":i.label,onClick:i.onClick,onKeyDown:t=>this.handleKeyDown(t,i.onClick),tabIndex:e?-1:0,disabled:e},o("post-icon",{name:i.icon,"aria-hidden":"true"}),o("span",{class:"visually-hidden"},i.label)))}renderItem(t,e){switch(t.type){case"page":return this.renderPageButton(t.page);case"control":return this.renderControlButton(t.action,t.disabled);case"ellipsis":return this.renderEllipsis(e)}}renderHiddenControlButton(t){const e=this.buildControlAttributes(t);return o("button",{key:"hidden-"+e.key,class:"pagination-link pagination-control-button hidden-control-button",disabled:!0},o("post-icon",{name:e.icon,"aria-hidden":"true"}))}renderHiddenItems(t){const e=this.items.at(0),i=this.items.at(-1);return["control"===e?.type&&this.renderHiddenControlButton(e.action),o("button",{key:"hidden-page",class:"pagination-link pagination-control-button hidden-page-button","aria-label":this.buildPageLabel(t),disabled:!0},o("span",{"aria-hidden":"true"},t)),o("span",{key:"hidden-ellipsis",class:"pagination-ellipsis-content hidden-ellipsis","aria-hidden":"true"},"..."),"control"===i?.type&&this.renderHiddenControlButton(i.action)]}render(){const t=this.getTotalPages();return t<=1?null:o(n,{slot:"post-pagination","data-version":c},o("nav",{class:"pagination","aria-label":this.label,id:this.paginationId,ref:t=>this.navRef=t},o("ul",{class:"pagination-list",role:"list"},this.items.map(((t,e)=>this.renderItem(t,e)))),o("div",{class:"hidden-items","aria-hidden":"true",ref:t=>this.hiddenItemsRef=t},this.renderHiddenItems(t))))}get host(){return this}static get watchers(){return{page:[{handlePropsChange:0}],pageSize:[{handlePropsChange:0}],collectionSize:[{handlePropsChange:0}]}}static get style(){return".btn{display:inline-flex;position:relative;align-items:center;justify-content:center;max-width:100%;overflow:hidden;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;border-width:var(--post-device-border-width-default);border-style:solid;border-color:rgba(0,0,0,0);border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-size:var(--post-device-font-size-6);font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;white-space:normal;overflow-wrap:anywhere;text-wrap:pretty;text-align:center;min-height:var(--post-device-sizing-interactive-button-height-1);gap:var(--post-device-spacing-gap-inline-10);padding:0 var(--post-device-spacing-padding-inline-6);border-radius:calc(var(--post-device-sizing-interactive-button-height-1) / 2)}.btn:not(:disabled):hover{text-decoration:none}.btn:disabled{border-style:var(--post-core-border-style-dash);cursor:unset}.btn{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn:focus-visible{outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn:focus-visible{outline-color:Highlight !important}}.pretend-focus.btn{outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.pretend-focus.btn{outline-color:Highlight !important}}.btn:has(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn:has(:focus-visible){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn{border-width:1px !important;transition:none}.btn:is(button){background-color:ButtonFace !important;border-color:ButtonBorder !important}}.btn>post-icon{width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4);flex-shrink:0}.btn-primary{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-primary-enabled-stroke);color:var(--post-scheme-color-interactive-button-primary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-primary-enabled-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-primary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover{background-color:Highlight !important}.btn-primary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover>post-icon{color:HighlightText !important}}.btn-primary:disabled{border-color:var(--post-scheme-color-interactive-button-primary-disabled-stroke);color:var(--post-scheme-color-interactive-button-primary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-primary-disabled-bg)}.btn-primary:not(:disabled):hover,.btn-primary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-primary-hover-stroke);color:var(--post-scheme-color-interactive-button-primary-hover-fg);background-color:var(--post-scheme-color-interactive-button-primary-hover-bg)}.btn-default{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-default:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover{background-color:Highlight !important}.btn-default:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover>post-icon{color:HighlightText !important}}.btn-default:disabled{border-color:var(--post-scheme-color-interactive-button-secondary-disabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-disabled-bg)}.btn-default:not(:disabled):hover,.btn-default.pretend-hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}.btn-secondary{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-secondary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover{background-color:Highlight !important}.btn-secondary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover>post-icon{color:HighlightText !important}}.btn-secondary:disabled{border-color:var(--post-scheme-color-interactive-button-secondary-disabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-disabled-bg)}.btn-secondary:not(:disabled):hover,.btn-secondary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}.btn-tertiary{border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-tertiary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover{background-color:Highlight !important}.btn-tertiary:not(:disabled,.disabled):not(a.btn-tertiary.px-0):hover>post-icon{color:HighlightText !important}}.btn-tertiary:disabled{border-color:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-tertiary-disabled-bg)}.btn-tertiary:not(:disabled):hover,.btn-tertiary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg)}.btn-link{border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-link:disabled,.btn-link.disabled{text-decoration:none}}.btn-link:disabled{border-color:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-disabled-fg)}.btn-link:not(:disabled):hover,.btn-link.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.btn-sm{min-height:var(--post-device-sizing-interactive-button-height-4);gap:var(--post-device-spacing-gap-inline-11);padding:0 var(--post-device-spacing-padding-inline-7);border-radius:calc(var(--post-device-sizing-interactive-button-height-4) / 2)}.btn-sm>post-icon{width:var(--post-device-sizing-interactive-button-icon-5);height:var(--post-device-sizing-interactive-button-icon-5);flex-shrink:0}.btn-lg{min-height:var(--post-device-sizing-interactive-button-height-2);gap:var(--post-device-spacing-gap-inline-1);padding:0 var(--post-device-spacing-padding-inline-5);border-radius:calc(var(--post-device-sizing-interactive-button-height-2) / 2)}.btn-lg>post-icon{width:var(--post-device-sizing-interactive-button-icon-3);height:var(--post-device-sizing-interactive-button-icon-3);flex-shrink:0}.btn-link{-webkit-text-decoration:var(--post-core-text-decoration-underline);text-decoration:var(--post-core-text-decoration-underline);border:0 none;border-radius:0;min-height:0;font-size:inherit;font-weight:inherit;padding:0}.btn-link{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-link:focus-visible{outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-link:focus-visible{outline-color:Highlight !important}}.btn-link.pretend-focus{outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-link.pretend-focus{outline-color:Highlight !important}}.btn-link:has(:focus-visible){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-link:has(:focus-visible){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-link:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-link:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-link:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.btn-link:disabled{color:var(--post-scheme-color-interactive-primary-disabled-fg1);text-decoration-style:var(--post-core-border-style-dash)}.btn-icon{padding:0;width:var(--post-device-sizing-interactive-button-height-1);height:var(--post-device-sizing-interactive-button-height-1);min-height:0;vertical-align:text-bottom}.btn-icon.btn-link{width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4)}.btn-icon>post-icon{display:block;width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4)}.btn-icon.btn-sm{padding:0;width:var(--post-device-sizing-interactive-button-height-4);height:var(--post-device-sizing-interactive-button-height-4);min-height:0;vertical-align:text-bottom}.btn-icon.btn-sm.btn-link{width:var(--post-device-sizing-interactive-button-icon-5);height:var(--post-device-sizing-interactive-button-icon-5)}.btn-icon.btn-sm>post-icon{display:block;width:var(--post-device-sizing-interactive-button-icon-5);height:var(--post-device-sizing-interactive-button-icon-5)}.btn-icon.btn-lg{padding:0;width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);min-height:0;vertical-align:text-bottom}.btn-icon.btn-lg.btn-link{width:var(--post-device-sizing-interactive-button-icon-3);height:var(--post-device-sizing-interactive-button-icon-3)}.btn-icon.btn-lg>post-icon{display:block;width:var(--post-device-sizing-interactive-button-icon-3);height:var(--post-device-sizing-interactive-button-icon-3)}.pagination{position:relative;display:flex;align-items:center;justify-content:center;width:100%;max-width:100%;padding:var(--post-device-spacing-padding-15);overflow:hidden;box-sizing:border-box}.pagination-list{display:flex;align-items:center;gap:var(--post-device-spacing-gap-inline-4);min-width:0;max-width:100%;margin:0;padding:0;list-style:none;flex-wrap:nowrap}.pagination-list .pagination-control:first-child{margin-inline-end:calc(var(--post-device-spacing-gap-11) - var(--post-device-spacing-gap-inline-4))}.pagination-list .pagination-control:last-child{margin-inline-start:calc(var(--post-device-spacing-gap-11) - var(--post-device-spacing-gap-inline-4))}.pagination-item{display:flex;align-items:center;margin:0;padding:0;flex-shrink:0;flex-grow:0}.pagination-ellipsis,.pagination-link,.pagination-ellipsis-content{display:flex;align-items:center;justify-content:center}.pagination-link,.pagination-ellipsis-content{width:var(--post-device-sizing-interactive-button-height-1);height:var(--post-device-sizing-interactive-button-height-1);min-width:var(--post-device-sizing-interactive-button-height-1);font-size:var(--post-device-font-size-6);color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-weight:var(--post-device-font-weight-bold)}.pagination-link{box-sizing:border-box;padding:0;margin:0;font-weight:var(--post-device-font-weight-bold);text-decoration:none;background-color:var(--post-scheme-color-interactive-primary-enabled-bg4);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke5);border-radius:var(--post-device-border-radius-round);cursor:pointer;appearance:none;outline:none;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}.pagination-link{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.pagination-link:focus-visible{outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.pagination-link:focus-visible{outline-color:Highlight !important}}.pagination-link.pretend-focus{outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.pagination-link.pretend-focus{outline-color:Highlight !important}}.pagination-link:has(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.pagination-link:has(:focus-visible){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.pagination-link:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.pagination-link:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.pagination-link:active:not(.pagination-link-active),.pagination-link:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);background-color:var(--post-scheme-color-interactive-primary-hover-bg5);border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}.pagination-link.pagination-link-active{color:var(--post-scheme-color-interactive-primary-selected-fg3);background-color:var(--post-scheme-color-interactive-primary-selected-bg4);border-color:var(--post-scheme-color-interactive-primary-selected-stroke1);cursor:default}.pagination-ellipsis{flex-shrink:0;flex-grow:0}.pagination-ellipsis-content{user-select:none}.hidden-items{position:absolute;display:flex;gap:var(--post-device-spacing-gap-inline-4);height:0;overflow:hidden;white-space:nowrap;visibility:hidden;pointer-events:none}.hidden-items .pagination-control-button:not(.hidden-page-button):first-child{margin-inline-end:calc(var(--post-device-spacing-gap-11) - var(--post-device-spacing-gap-inline-4))}.hidden-items .pagination-control-button:not(.hidden-page-button):last-child{margin-inline-start:calc(var(--post-device-spacing-gap-11) - var(--post-device-spacing-gap-inline-4))}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}"}},[1,"post-pagination",{page:[1026],pageSize:[514,"page-size"],collectionSize:[514,"collection-size"],label:[513],textPrevious:[513,"text-previous"],textNext:[513,"text-next"],textPage:[513,"text-page"],textFirst:[513,"text-first"],textLast:[513,"text-last"],paginationId:[32],maxVisiblePages:[32],items:[32]},void 0,{page:[{handlePropsChange:0}],pageSize:[{handlePropsChange:0}],collectionSize:[{handlePropsChange:0}]}]);p([d("number")],b.prototype,"page",void 0),p([h(),d("number")],b.prototype,"pageSize",void 0),p([h(),d("number")],b.prototype,"collectionSize",void 0),p([h(),d("string")],b.prototype,"label",void 0),p([h(),d("string")],b.prototype,"textPrevious",void 0),p([h(),d("string")],b.prototype,"textNext",void 0),p([h(),d("string")],b.prototype,"textPage",void 0),p([h(),d("string")],b.prototype,"textFirst",void 0),p([h(),d("string")],b.prototype,"textLast",void 0);const g=b,v=function(){"undefined"!=typeof customElements&&["post-pagination","post-icon"].forEach((t=>{switch(t){case"post-pagination":customElements.get(r(t))||customElements.define(r(t),b);break;case"post-icon":customElements.get(r(t))||l()}}))};export{g as PostPagination,v as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,h as o,Host as s,transformTag as i}from"@stencil/core/internal/client";import{d as r,a}from"./post-popovercontainer2.js";import"./breakpoints.js";import{a as n}from"./get-focusable-children.js";import{v as c}from"./package.js";import{d as p}from"./post-closebutton2.js";import{d as l}from"./post-icon2.js";import{O as d}from"./one-of.js";import{R as f}from"./required.js";import{T as h}from"./type.js";var m=function(t,e,o,s){var i,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,s);else for(var n=t.length-1;n>=0;n--)(i=t[n])&&(a=(r<3?i(a):r>3?i(e,o,a):i(e,o))||a);return r>3&&a&&Object.defineProperty(e,o,a),a};const b=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.placement="top",this.arrow=!0,this.breakpointChange=()=>{requestAnimationFrame((()=>this.updateEdgeGap()))}}async show(t){await this.popoverRef.show(t),this.focusFirstEl(),this.updateEdgeGap()}async hide(){this.popoverRef.hide()}async toggle(t,e){await this.popoverRef.toggle(t,e)&&(this.updateEdgeGap(),this.focusFirstEl())}connectedCallback(){globalThis.addEventListener("postBreakpoint:device",this.breakpointChange)}disconnectedCallback(){globalThis.removeEventListener("postBreakpoint:device",this.breakpointChange)}updateEdgeGap(){const t=this.host.shadowRoot?.querySelector("post-closebutton");if(!t)return;const e=t.getBoundingClientRect().width;e&&!Number.isNaN(e)&&(this.edgeGap=e/2)}focusFirstEl(){const t=n(this.host)[0];t&&t.focus()}render(){return o(s,{key:"0e57981004d99d528a4652598739afbf1208376c","data-version":c},o("post-popovercontainer",{key:"380838970ed2c62f9e21e95da6957e9ff36db31a",arrow:this.arrow,placement:this.placement,edgeGap:this.edgeGap,autoHide:!0,ref:t=>{t&&(this.popoverRef=t)}},o("div",{key:"77465a8e943f61492869a3e05cf03f90b9fd553c",class:"popover-container"},o("div",{key:"0ab4e621ecc58a9775c4a9b8dfba3d26eb577878",class:"popover-content"},o("slot",{key:"1b2d37d50ef23edad118abc5949686e59e15b931"})),o("post-closebutton",{key:"8c2138b22f49681d37d2f38f6fb6331c730849f3"},this.textClose))))}get host(){return this}static get style(){return"*{box-sizing:border-box}:host{display:contents}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{color:var(--post-current-fg);background-color:var(--post-current-bg);display:flex;align-items:self-start;padding:8px;min-width:160px;max-width:var(--post-popover-max-width, 280px)}.popover-content{padding:8px;flex-grow:1}post-closebutton{color-scheme:light}"}},[257,"post-popover",{placement:[1],textClose:[513,"text-close"],arrow:[4],edgeGap:[32],show:[64],hide:[64],toggle:[64]}]);m([d(a)],b.prototype,"placement",void 0),m([f(),h("string")],b.prototype,"textClose",void 0);const u=b,v=function(){"undefined"!=typeof customElements&&["post-popover","post-closebutton","post-icon","post-popovercontainer"].forEach((t=>{switch(t){case"post-popover":customElements.get(i(t))||customElements.define(i(t),b);break;case"post-closebutton":customElements.get(i(t))||p();break;case"post-icon":customElements.get(i(t))||l();break;case"post-popovercontainer":customElements.get(i(t))||r()}}))};export{u as PostPopover,v as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as r,HTMLElement as e,h as o,Host as t,transformTag as c}from"@stencil/core/internal/client";import{d as a,a as s}from"./post-popovercontainer2.js";import"./breakpoints.js";import{a as i}from"./get-focusable-children.js";import{v as l}from"./package.js";import{d as n}from"./post-closebutton2.js";import{d as p}from"./post-icon2.js";import{O as h}from"./one-of.js";import{R as v}from"./required.js";import{T as g}from"./type.js";var b=function(r,e,o,t){var c,a=arguments.length,s=a<3?e:null===t?t=Object.getOwnPropertyDescriptor(e,o):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(r,e,o,t);else for(var i=r.length-1;i>=0;i--)(c=r[i])&&(s=(a<3?c(s):a>3?c(e,o,s):c(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};const d=r(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.placement="top",this.arrow=!0,this.breakpointChange=()=>{requestAnimationFrame((()=>this.updateEdgeGap()))}}async show(r){await this.popoverRef.show(r),this.focusFirstEl(),this.updateEdgeGap()}async hide(){this.popoverRef.hide()}async toggle(r,e){await this.popoverRef.toggle(r,e)&&(this.updateEdgeGap(),this.focusFirstEl())}connectedCallback(){globalThis.addEventListener("postBreakpoint:device",this.breakpointChange)}disconnectedCallback(){globalThis.removeEventListener("postBreakpoint:device",this.breakpointChange)}updateEdgeGap(){const r=this.host.shadowRoot?.querySelector("post-closebutton");if(!r)return;const e=r.getBoundingClientRect().width;e&&!Number.isNaN(e)&&(this.edgeGap=e/2)}focusFirstEl(){const r=i(this.host)[0];r&&r.focus()}render(){return o(t,{key:"0e57981004d99d528a4652598739afbf1208376c","data-version":l},o("post-popovercontainer",{key:"cfa3e03284033c19317fab6a565cbcef0d4aa458",arrow:this.arrow,placement:this.placement,edgeGap:this.edgeGap,autoHide:!0,autoResize:!0,ref:r=>{r&&(this.popoverRef=r)}},o("div",{key:"758a7d16666581674c48043aaaf4b266c3d754b8",class:"popover-container"},o("div",{key:"60ab881499fa6cc016dc285f962f2dbee884adee",class:"popover-content"},o("slot",{key:"78b457120894b4117a7f4008f313e9a346f539ab"})),o("post-closebutton",{key:"5cc2cc1e36e8840f2e2729dcf8c15a211c95ec12"},this.textClose))))}get host(){return this}static get style(){return"@supports not (color: light-dark(black, white)){post-closebutton{--post-scheme-color-body-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-002);--post-scheme-color-body-bg:var(--post-scheme-color-body-bg-light, var(--post-core-color-sandgrey-080));--post-scheme-color-body-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-body-fg:var(--post-scheme-color-body-fg-light, var(--post-core-color-brand-white));--post-scheme-color-signal-success-dark-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-green);--post-scheme-color-signal-success-dark:var(--post-scheme-color-signal-success-dark-light, var(--post-core-color-notification-green));--post-scheme-color-signal-success-light-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-green-light);--post-scheme-color-signal-success-light:var(--post-scheme-color-signal-success-light-light, var(--post-core-color-notification-green-light));--post-scheme-color-signal-error-dark-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-red);--post-scheme-color-signal-error-dark:var(--post-scheme-color-signal-error-dark-light, var(--post-core-color-notification-red));--post-scheme-color-signal-error-light-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-red-light);--post-scheme-color-signal-error-light:var(--post-scheme-color-signal-error-light-light, var(--post-core-color-notification-red-light));--post-scheme-color-signal-warning-dark-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-orange);--post-scheme-color-signal-warning-dark:var(--post-scheme-color-signal-warning-dark-light, var(--post-core-color-notification-orange));--post-scheme-color-signal-warning-light-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-orange-light);--post-scheme-color-signal-warning-light:var(--post-scheme-color-signal-warning-light-light, var(--post-core-color-notification-orange-light));--post-scheme-color-signal-information-dark-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-blue);--post-scheme-color-signal-information-dark:var(--post-scheme-color-signal-information-dark-light, var(--post-core-color-notification-blue));--post-scheme-color-signal-information-light-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-blue-light);--post-scheme-color-signal-information-light:var(--post-scheme-color-signal-information-light-light, var(--post-core-color-notification-blue-light));--post-scheme-color-signal-success-solo-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-green);--post-scheme-color-signal-success-solo:var(--post-scheme-color-signal-success-solo-light, var(--post-core-color-notification-green-night));--post-scheme-color-signal-error-solo-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-red);--post-scheme-color-signal-error-solo:var(--post-scheme-color-signal-error-solo-light, var(--post-core-color-notification-red-night));--post-scheme-color-signal-info-solo-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-blue);--post-scheme-color-signal-info-solo:var(--post-scheme-color-signal-info-solo-light, var(--post-core-color-notification-blue-night));--post-scheme-color-signal-warning-solo-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-orange);--post-scheme-color-signal-warning-solo:var(--post-scheme-color-signal-warning-solo-light, var(--post-core-color-notification-orange-night));--post-scheme-color-interactive-button-primary-enabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-enabled-fg:var(--post-scheme-color-interactive-button-primary-enabled-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-primary-enabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-button-primary-enabled-bg:var(--post-scheme-color-interactive-button-primary-enabled-bg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-enabled-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-interactive-button-primary-enabled-bg);--post-scheme-color-interactive-button-primary-enabled-stroke:var(--post-scheme-color-interactive-button-primary-enabled-stroke-light, var(--post-scheme-color-interactive-button-primary-enabled-bg));--post-scheme-color-interactive-button-primary-enabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-button-primary-enabled-fg-inverted:var(--post-scheme-color-interactive-button-primary-enabled-fg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-enabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-enabled-bg-inverted:var(--post-scheme-color-interactive-button-primary-enabled-bg-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-primary-enabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-enabled-stroke-inverted:var(--post-scheme-color-interactive-button-primary-enabled-stroke-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-primary-hover-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-hover-fg:var(--post-scheme-color-interactive-button-primary-hover-fg-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-primary-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-button-primary-hover-bg:var(--post-scheme-color-interactive-button-primary-hover-bg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-hover-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-interactive-button-primary-hover-bg);--post-scheme-color-interactive-button-primary-hover-stroke:var(--post-scheme-color-interactive-button-primary-hover-stroke-light, var(--post-scheme-color-interactive-button-primary-hover-bg));--post-scheme-color-interactive-button-primary-hover-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-button-primary-hover-fg-inverted:var(--post-scheme-color-interactive-button-primary-hover-fg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-hover-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-hover-bg-inverted:var(--post-scheme-color-interactive-button-primary-hover-bg-inverted-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-primary-hover-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-hover-stroke-inverted:var(--post-scheme-color-interactive-button-primary-hover-stroke-inverted-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-primary-disabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-primary-disabled-fg:var(--post-scheme-color-interactive-button-primary-disabled-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-disabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-disabled-bg:var(--post-scheme-color-interactive-button-primary-disabled-bg-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-primary-disabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-primary-disabled-stroke:var(--post-scheme-color-interactive-button-primary-disabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-disabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-disabled-fg-inverted:var(--post-scheme-color-interactive-button-primary-disabled-fg-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-primary-disabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-primary-disabled-bg-inverted:var(--post-scheme-color-interactive-button-primary-disabled-bg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-disabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-disabled-stroke-inverted:var(--post-scheme-color-interactive-button-primary-disabled-stroke-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-secondary-enabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-button-secondary-enabled-fg:var(--post-scheme-color-interactive-button-secondary-enabled-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-enabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-enabled-bg:var(--post-scheme-color-interactive-button-secondary-enabled-bg-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-secondary-enabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-button-secondary-enabled-stroke:var(--post-scheme-color-interactive-button-secondary-enabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-enabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-enabled-fg-inverted:var(--post-scheme-color-interactive-button-secondary-enabled-fg-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-secondary-enabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-secondary-enabled-bg-inverted:var(--post-scheme-color-interactive-button-secondary-enabled-bg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-enabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-enabled-stroke-inverted:var(--post-scheme-color-interactive-button-secondary-enabled-stroke-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-secondary-hover-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-button-secondary-hover-fg:var(--post-scheme-color-interactive-button-secondary-hover-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-hover-bg:var(--post-scheme-color-interactive-button-secondary-hover-bg-light, var(--post-core-color-sandgrey-alpha-lightsand-10));--post-scheme-color-interactive-button-secondary-hover-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-button-secondary-hover-stroke:var(--post-scheme-color-interactive-button-secondary-hover-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-hover-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-hover-fg-inverted:var(--post-scheme-color-interactive-button-secondary-hover-fg-inverted-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-secondary-hover-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-alpha-lightsand-10);--post-scheme-color-interactive-button-secondary-hover-bg-inverted:var(--post-scheme-color-interactive-button-secondary-hover-bg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-hover-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-hover-stroke-inverted:var(--post-scheme-color-interactive-button-secondary-hover-stroke-inverted-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-secondary-disabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-secondary-disabled-fg:var(--post-scheme-color-interactive-button-secondary-disabled-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-disabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-disabled-bg:var(--post-scheme-color-interactive-button-secondary-disabled-bg-light, var(--post-core-color-sandgrey-alpha-lightsand-30));--post-scheme-color-interactive-button-secondary-disabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-secondary-disabled-stroke:var(--post-scheme-color-interactive-button-secondary-disabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-disabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-disabled-fg-inverted:var(--post-scheme-color-interactive-button-secondary-disabled-fg-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-secondary-disabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-alpha-lightsand-30);--post-scheme-color-interactive-button-secondary-disabled-bg-inverted:var(--post-scheme-color-interactive-button-secondary-disabled-bg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-disabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-disabled-stroke-inverted:var(--post-scheme-color-interactive-button-secondary-disabled-stroke-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-tertiary-enabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-button-tertiary-enabled-fg:var(--post-scheme-color-interactive-button-tertiary-enabled-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-tertiary-enabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-enabled-bg:var(--post-scheme-color-interactive-button-tertiary-enabled-bg-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-enabled-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-interactive-button-tertiary-enabled-bg);--post-scheme-color-interactive-button-tertiary-enabled-stroke:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke-light, var(--post-scheme-color-interactive-button-tertiary-enabled-bg));--post-scheme-color-interactive-button-tertiary-enabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-tertiary-enabled-fg-inverted:var(--post-scheme-color-interactive-button-tertiary-enabled-fg-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-tertiary-enabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-enabled-bg-inverted:var(--post-scheme-color-interactive-button-tertiary-enabled-bg-inverted-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-enabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-enabled-stroke-inverted:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke-inverted-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-hover-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-button-tertiary-hover-fg:var(--post-scheme-color-interactive-button-tertiary-hover-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-tertiary-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-hover-bg:var(--post-scheme-color-interactive-button-tertiary-hover-bg-light, var(--post-core-color-sandgrey-alpha-lightsand-10));--post-scheme-color-interactive-button-tertiary-hover-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-interactive-button-tertiary-hover-bg);--post-scheme-color-interactive-button-tertiary-hover-stroke:var(--post-scheme-color-interactive-button-tertiary-hover-stroke-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-hover-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-tertiary-hover-fg-inverted:var(--post-scheme-color-interactive-button-tertiary-hover-fg-inverted-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-tertiary-hover-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-alpha-lightsand-10);--post-scheme-color-interactive-button-tertiary-hover-bg-inverted:var(--post-scheme-color-interactive-button-tertiary-hover-bg-inverted-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-hover-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-hover-stroke-inverted:var(--post-scheme-color-interactive-button-tertiary-hover-stroke-inverted-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-disabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-tertiary-disabled-fg:var(--post-scheme-color-interactive-button-tertiary-disabled-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-tertiary-disabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-disabled-bg:var(--post-scheme-color-interactive-button-tertiary-disabled-bg-light, var(--post-core-color-sandgrey-alpha-lightsand-30));--post-scheme-color-interactive-button-tertiary-disabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-tertiary-disabled-stroke:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-tertiary-disabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-tertiary-disabled-fg-inverted:var(--post-scheme-color-interactive-button-tertiary-disabled-fg-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-tertiary-disabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-alpha-lightsand-30);--post-scheme-color-interactive-button-tertiary-disabled-bg-inverted:var(--post-scheme-color-interactive-button-tertiary-disabled-bg-inverted-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-disabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-tertiary-disabled-stroke-inverted:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-focus-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-focus-stroke:var(--post-scheme-color-interactive-focus-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-focus-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-focus-stroke-inverted:var(--post-scheme-color-interactive-focus-stroke-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-enabled-bg1-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-bg1:var(--post-scheme-color-interactive-primary-enabled-bg1-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-enabled-fg1-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-enabled-fg1:var(--post-scheme-color-interactive-primary-enabled-fg1-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-enabled-fg2-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-enabled-fg2:var(--post-scheme-color-interactive-primary-enabled-fg2-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-primary-enabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-enabled-stroke:var(--post-scheme-color-interactive-primary-enabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-enabled-fg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-fg3:var(--post-scheme-color-interactive-primary-enabled-fg3-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-enabled-bg2-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-enabled-bg2:var(--post-scheme-color-interactive-primary-enabled-bg2-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-enabled-stroke3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-stroke3:var(--post-scheme-color-interactive-primary-enabled-stroke3-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-enabled-bg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-bg3:var(--post-scheme-color-interactive-primary-enabled-bg3-light, var(--post-core-color-colorless));--post-scheme-color-interactive-primary-enabled-stroke4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-030);--post-scheme-color-interactive-primary-enabled-stroke4:var(--post-scheme-color-interactive-primary-enabled-stroke4-light, var(--post-core-color-sandgrey-030));--post-scheme-color-interactive-primary-enabled-bg4-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-primary-enabled-bg4:var(--post-scheme-color-interactive-primary-enabled-bg4-light, var(--post-core-color-colorless));--post-scheme-color-interactive-primary-enabled-stroke5-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-primary-enabled-stroke5:var(--post-scheme-color-interactive-primary-enabled-stroke5-light, var(--post-core-color-colorless));--post-scheme-color-interactive-primary-enabled-bg5-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-bg5:var(--post-scheme-color-interactive-primary-enabled-bg5-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-enabled-fg5-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-enabled-fg5:var(--post-scheme-color-interactive-primary-enabled-fg5-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-enabled-fg6-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-fg6:var(--post-scheme-color-interactive-primary-enabled-fg6-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-enabled-bg6-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-enabled-bg6:var(--post-scheme-color-interactive-primary-enabled-bg6-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-hover-bg:var(--post-scheme-color-interactive-primary-hover-bg-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-primary-hover-fg1-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-primary-hover-fg1:var(--post-scheme-color-interactive-primary-hover-fg1-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-hover-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-primary-hover-stroke:var(--post-scheme-color-interactive-primary-hover-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-hover-fg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-hover-fg3:var(--post-scheme-color-interactive-primary-hover-fg3-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-primary-hover-bg2-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-primary-hover-bg2:var(--post-scheme-color-interactive-primary-hover-bg2-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-hover-stroke3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-hover-stroke3:var(--post-scheme-color-interactive-primary-hover-stroke3-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-primary-hover-bg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-hover-bg3:var(--post-scheme-color-interactive-primary-hover-bg3-light, var(--post-core-color-sandgrey-alpha-lightsand-20));--post-scheme-color-interactive-primary-hover-bg4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-006);--post-scheme-color-interactive-primary-hover-bg4:var(--post-scheme-color-interactive-primary-hover-bg4-light, var(--post-core-color-sandgrey-006));--post-scheme-color-interactive-primary-hover-bg5-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-primary-hover-bg5:var(--post-scheme-color-interactive-primary-hover-bg5-light, var(--post-core-color-colorless));--post-scheme-color-interactive-primary-hover-bg7-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-006);--post-scheme-color-interactive-primary-hover-bg7:var(--post-scheme-color-interactive-primary-hover-bg7-light, var(--post-core-color-sandgrey-alpha-lightsand-10));--post-scheme-color-interactive-primary-hover-bg8-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-hover-bg8:var(--post-scheme-color-interactive-primary-hover-bg8-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-hover-fg4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-primary-hover-fg4:var(--post-scheme-color-interactive-primary-hover-fg4-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-primary-disabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-disabled-bg:var(--post-scheme-color-interactive-primary-disabled-bg-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-primary-disabled-fg1-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-fg1:var(--post-scheme-color-interactive-primary-disabled-fg1-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-disabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-stroke:var(--post-scheme-color-interactive-primary-disabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-disabled-fg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-disabled-fg3:var(--post-scheme-color-interactive-primary-disabled-fg3-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-primary-disabled-stroke2-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-stroke2:var(--post-scheme-color-interactive-primary-disabled-stroke2-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-disabled-bg4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-bg4:var(--post-scheme-color-interactive-primary-disabled-bg4-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-disabled-stroke3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-disabled-stroke3:var(--post-scheme-color-interactive-primary-disabled-stroke3-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-primary-disabled-bg5-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-012);--post-scheme-color-interactive-primary-disabled-bg5:var(--post-scheme-color-interactive-primary-disabled-bg5-light, var(--post-core-color-sandgrey-alpha-lightsand-10));--post-scheme-color-interactive-primary-disabled-fg4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-fg4:var(--post-scheme-color-interactive-primary-disabled-fg4-light, var(--post-core-color-sandgrey-alpha-lightsand-60));--post-scheme-color-interactive-primary-disabled-stroke4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-stroke4:var(--post-scheme-color-interactive-primary-disabled-stroke4-light, var(--post-core-color-sandgrey-alpha-lightsand-60));--post-scheme-color-interactive-primary-disabled-bg6-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-disabled-bg6:var(--post-scheme-color-interactive-primary-disabled-bg6-light, var(--post-core-color-colorless));--post-scheme-color-interactive-primary-selected-bg1-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-selected-bg1:var(--post-scheme-color-interactive-primary-selected-bg1-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-selected-fg1-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-selected-fg1:var(--post-scheme-color-interactive-primary-selected-fg1-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-selected-stroke1-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-selected-stroke1:var(--post-scheme-color-interactive-primary-selected-stroke1-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-selected-fg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-selected-fg3:var(--post-scheme-color-interactive-primary-selected-fg3-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-selected-bg2-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-green);--post-scheme-color-interactive-primary-selected-bg2:var(--post-scheme-color-interactive-primary-selected-bg2-light, var(--post-core-color-notification-green-light));--post-scheme-color-interactive-primary-selected-stroke4-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-green);--post-scheme-color-interactive-primary-selected-stroke4:var(--post-scheme-color-interactive-primary-selected-stroke4-light, var(--post-core-color-notification-green-light));--post-scheme-color-interactive-primary-selected-stroke3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-selected-stroke3:var(--post-scheme-color-interactive-primary-selected-stroke3-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-selected-bg4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-selected-bg4:var(--post-scheme-color-interactive-primary-selected-bg4-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-selected-bg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-postyellow);--post-scheme-color-interactive-primary-selected-bg3:var(--post-scheme-color-interactive-primary-selected-bg3-light, var(--post-core-color-brand-postyellow));--post-scheme-color-interactive-notification-info-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-notification-info-fg:var(--post-scheme-color-interactive-notification-info-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-notification-info-bg-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-information-light);--post-scheme-color-interactive-notification-info-bg:var(--post-scheme-color-interactive-notification-info-bg-light, var(--post-scheme-color-signal-information-light));--post-scheme-color-interactive-notification-info-icon-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-information-dark);--post-scheme-color-interactive-notification-info-icon:var(--post-scheme-color-interactive-notification-info-icon-light, var(--post-scheme-color-signal-information-dark));--post-scheme-color-interactive-notification-info-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-information-dark);--post-scheme-color-interactive-notification-info-stroke:var(--post-scheme-color-interactive-notification-info-stroke-light, var(--post-scheme-color-signal-information-dark));--post-scheme-color-interactive-notification-success-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-notification-success-fg:var(--post-scheme-color-interactive-notification-success-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-notification-success-bg-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-success-light);--post-scheme-color-interactive-notification-success-bg:var(--post-scheme-color-interactive-notification-success-bg-light, var(--post-scheme-color-signal-success-light));--post-scheme-color-interactive-notification-success-icon-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-success-dark);--post-scheme-color-interactive-notification-success-icon:var(--post-scheme-color-interactive-notification-success-icon-light, var(--post-scheme-color-signal-success-dark));--post-scheme-color-interactive-notification-success-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-success-dark);--post-scheme-color-interactive-notification-success-stroke:var(--post-scheme-color-interactive-notification-success-stroke-light, var(--post-scheme-color-signal-success-dark));--post-scheme-color-interactive-notification-warning-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-notification-warning-fg:var(--post-scheme-color-interactive-notification-warning-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-notification-warning-bg-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-warning-light);--post-scheme-color-interactive-notification-warning-bg:var(--post-scheme-color-interactive-notification-warning-bg-light, var(--post-scheme-color-signal-warning-light));--post-scheme-color-interactive-notification-warning-icon-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-warning-dark);--post-scheme-color-interactive-notification-warning-icon:var(--post-scheme-color-interactive-notification-warning-icon-light, var(--post-scheme-color-signal-warning-dark));--post-scheme-color-interactive-notification-warning-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-warning-dark);--post-scheme-color-interactive-notification-warning-stroke:var(--post-scheme-color-interactive-notification-warning-stroke-light, var(--post-scheme-color-signal-warning-dark));--post-scheme-color-interactive-notification-error-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-notification-error-fg:var(--post-scheme-color-interactive-notification-error-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-notification-error-bg-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-error-light);--post-scheme-color-interactive-notification-error-bg:var(--post-scheme-color-interactive-notification-error-bg-light, var(--post-scheme-color-signal-error-light));--post-scheme-color-interactive-notification-error-icon-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-error-dark);--post-scheme-color-interactive-notification-error-icon:var(--post-scheme-color-interactive-notification-error-icon-light, var(--post-scheme-color-signal-error-dark));--post-scheme-color-interactive-notification-error-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-error-dark);--post-scheme-color-interactive-notification-error-stroke:var(--post-scheme-color-interactive-notification-error-stroke-light, var(--post-scheme-color-signal-error-dark));--post-scheme-color-interactive-input-enabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-input-enabled-bg:var(--post-scheme-color-interactive-input-enabled-bg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-input-enabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-input-enabled-fg:var(--post-scheme-color-interactive-input-enabled-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-input-enabled-border-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-input-enabled-border:var(--post-scheme-color-interactive-input-enabled-border-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-input-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-input-hover-bg:var(--post-scheme-color-interactive-input-hover-bg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-input-hover-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-input-hover-fg:var(--post-scheme-color-interactive-input-hover-fg-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-input-hover-border-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-input-hover-border:var(--post-scheme-color-interactive-input-hover-border-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-input-disabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-input-disabled-bg:var(--post-scheme-color-interactive-input-disabled-bg-light, var(--post-core-color-colorless));--post-scheme-color-interactive-input-disabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-input-disabled-fg:var(--post-scheme-color-interactive-input-disabled-fg-light, var(--post-core-color-sandgrey-alpha-lightsand-60));--post-scheme-color-interactive-input-disabled-border-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-input-disabled-border:var(--post-scheme-color-interactive-input-disabled-border-light, var(--post-core-color-sandgrey-alpha-lightsand-60));--post-scheme-color-interactive-card-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-020);--post-scheme-color-interactive-card-hover-bg:var(--post-scheme-color-interactive-card-hover-bg-light, var(--post-core-color-sandgrey-020));--post-scheme-color-interactive-card-hover-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-card-hover-fg:var(--post-scheme-color-interactive-card-hover-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-tabs-selected-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-tabs-selected-fg:var(--post-scheme-color-interactive-tabs-selected-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-tabs-disabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-tabs-disabled-fg:var(--post-scheme-color-interactive-tabs-disabled-fg-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-tabs-disabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-tabs-disabled-stroke:var(--post-scheme-color-interactive-tabs-disabled-stroke-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-tabs-selected-hovered-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-tabs-selected-hovered-fg:var(--post-scheme-color-interactive-tabs-selected-hovered-fg-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-tabs-selected-hovered-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-tabs-selected-hovered-stroke:var(--post-scheme-color-interactive-tabs-selected-hovered-stroke-light, var(--post-core-color-sandgrey-002));--post-scheme-color-surface-default-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-002);--post-scheme-color-surface-default-bg:var(--post-scheme-color-surface-default-bg-light, var(--post-core-color-sandgrey-080));--post-scheme-color-surface-default-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-default-fg:var(--post-scheme-color-surface-default-fg-light, var(--post-core-color-brand-white));--post-scheme-color-surface-default-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-default-stroke:var(--post-scheme-color-surface-default-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-surface-accent1-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-surface-accent1-bg:var(--post-scheme-color-surface-accent1-bg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-surface-accent1-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-accent1-fg:var(--post-scheme-color-surface-accent1-fg-light, var(--post-core-color-brand-white));--post-scheme-color-surface-alternate-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-006);--post-scheme-color-surface-alternate-bg:var(--post-scheme-color-surface-alternate-bg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-surface-alternate-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-alternate-fg:var(--post-scheme-color-surface-alternate-fg-light, var(--post-core-color-brand-white));--post-scheme-color-surface-alternate-secondary-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-surface-alternate-secondary-bg:var(--post-scheme-color-surface-alternate-secondary-bg-light, var(--post-core-color-brand-white));--post-scheme-color-surface-brand-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-postyellow);--post-scheme-color-surface-brand-bg:var(--post-scheme-color-surface-brand-bg-light, var(--post-core-color-brand-postyellow));--post-scheme-color-surface-brand-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-brand-fg:var(--post-scheme-color-surface-brand-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-surface-brand-fg-accent-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-brand-fg-accent:var(--post-scheme-color-surface-brand-fg-accent-light, var(--post-core-color-sandgrey-100));--post-scheme-color-surface-brand-secondary-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-surface-brand-secondary-bg:var(--post-scheme-color-surface-brand-secondary-bg-light, var(--post-core-color-brand-white));--post-scheme-color-surface-accent-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-080);--post-scheme-color-surface-accent-bg:var(--post-scheme-color-surface-accent-bg-light, var(--post-core-color-sandgrey-002));--post-scheme-color-surface-accent-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-surface-accent-fg:var(--post-scheme-color-surface-accent-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-surface-accent-fg-accent-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-postyellow);--post-scheme-color-surface-accent-fg-accent:var(--post-scheme-color-surface-accent-fg-accent-light, var(--post-core-color-sandgrey-100));--post-scheme-color-badge-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-red);--post-scheme-color-badge-bg:var(--post-scheme-color-badge-bg-light, var(--post-core-color-notification-red));--post-scheme-color-badge-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-badge-fg:var(--post-scheme-color-badge-fg-light, var(--post-core-color-brand-white));--post-scheme-color-badge-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-badge-stroke:var(--post-scheme-color-badge-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-popover-hover-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-020);--post-scheme-color-popover-hover:var(--post-scheme-color-popover-hover-light, var(--post-core-color-sandgrey-020));--post-scheme-color-divider-border-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-divider-border:var(--post-scheme-color-divider-border-light, var(--post-core-color-sandgrey-050));--post-scheme-color-backdrop-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-alpha-darksand-80);--post-scheme-color-backdrop-bg:var(--post-scheme-color-backdrop-bg-light, var(--post-core-color-sandgrey-alpha-darksand-80));--post-scheme-color-datepicker-header-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-012);--post-scheme-color-datepicker-header-bg:var(--post-scheme-color-datepicker-header-bg-light, var(--post-core-color-sandgrey-070));--post-cargo-scheme-color-surface-default-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-002);--post-cargo-scheme-color-surface-default-bg:var(--post-cargo-scheme-color-surface-default-bg-light, var(--post-core-color-sandgrey-080));--post-cargo-scheme-color-surface-default-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-cargo-scheme-color-surface-default-fg:var(--post-cargo-scheme-color-surface-default-fg-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-default-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-cargo-scheme-color-surface-default-stroke:var(--post-cargo-scheme-color-surface-default-stroke-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-accent1-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-cargo-scheme-color-surface-accent1-bg:var(--post-cargo-scheme-color-surface-accent1-bg-light, var(--post-core-color-sandgrey-100));--post-cargo-scheme-color-surface-accent1-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-cargo-scheme-color-surface-accent1-fg:var(--post-cargo-scheme-color-surface-accent1-fg-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-alternate-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-006);--post-cargo-scheme-color-surface-alternate-bg:var(--post-cargo-scheme-color-surface-alternate-bg-light, var(--post-core-color-sandgrey-100));--post-cargo-scheme-color-surface-alternate-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-cargo-scheme-color-surface-alternate-fg:var(--post-cargo-scheme-color-surface-alternate-fg-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-brand-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-cargo-green);--post-cargo-scheme-color-surface-brand-bg:var(--post-cargo-scheme-color-surface-brand-bg-light, var(--post-core-color-cargo-green));--post-cargo-scheme-color-surface-brand-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-cargo-scheme-color-surface-brand-fg:var(--post-cargo-scheme-color-surface-brand-fg-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-brand-fg-accent-light:var(--post-fallback-prefers-light) var(--post-core-color-cargo-blue);--post-cargo-scheme-color-surface-brand-fg-accent:var(--post-cargo-scheme-color-surface-brand-fg-accent-light, var(--post-core-color-cargo-blue));--post-cargo-scheme-color-surface-brand-secondary-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-cargo-scheme-color-surface-brand-secondary-bg:var(--post-cargo-scheme-color-surface-brand-secondary-bg-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-accent-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-cargo-blue);--post-cargo-scheme-color-surface-accent-bg:var(--post-cargo-scheme-color-surface-accent-bg-light, var(--post-core-color-cargo-blue));--post-cargo-scheme-color-surface-accent-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-cargo-scheme-color-surface-accent-fg:var(--post-cargo-scheme-color-surface-accent-fg-light, var(--post-core-color-sandgrey-100));--post-cargo-scheme-color-surface-accent-fg-accent-light:var(--post-fallback-prefers-light) var(--post-core-color-cargo-green);--post-cargo-scheme-color-surface-accent-fg-accent:var(--post-cargo-scheme-color-surface-accent-fg-accent-light, var(--post-core-color-cargo-green));--post-cargo-scheme-color-surface-accent-secondary-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-cargo-scheme-color-surface-accent-secondary-bg:var(--post-cargo-scheme-color-surface-accent-secondary-bg-light, var(--post-core-color-brand-white))}}*{box-sizing:border-box}:host{display:contents}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{color:var(--post-current-fg);background-color:var(--post-current-bg);display:flex;align-items:self-start;padding:8px;max-width:var(--post-popover-max-width, 280px);max-height:100%;overflow-y:auto;overscroll-behavior:contain}.popover-content{padding:8px;flex-grow:1}@supports (color: light-dark(black, white)){post-closebutton{color-scheme:light}}@supports not (color: light-dark(black, white)){post-closebutton{}}post-popovercontainer::part(post-popovercontainer-content){min-width:160px}"}},[257,"post-popover",{placement:[1],textClose:[513,"text-close"],arrow:[4],edgeGap:[32],show:[64],hide:[64],toggle:[64]}]);b([h(s)],d.prototype,"placement",void 0),b([v(),g("string")],d.prototype,"textClose",void 0);const m=d,f=function(){"undefined"!=typeof customElements&&["post-popover","post-closebutton","post-icon","post-popovercontainer"].forEach((r=>{switch(r){case"post-popover":customElements.get(c(r))||customElements.define(c(r),d);break;case"post-closebutton":customElements.get(c(r))||n();break;case"post-icon":customElements.get(c(r))||p();break;case"post-popovercontainer":customElements.get(c(r))||a()}}))};export{m as PostPopover,f as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as n,Build as o,h as r,Host as i,transformTag as s}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as a}from"./package.js";import{O as c}from"./one-of.js";import{T as l}from"./type.js";const p=["top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"],f=["top","right","bottom","left"],u=Math.min,h=Math.max,d=Math.round,m=Math.floor,v=t=>({x:t,y:t}),g={left:"right",right:"left",bottom:"top",top:"bottom"};function w(t,e,n){return h(t,u(e,n))}function y(t,e){return"function"==typeof t?t(e):t}function x(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function S(t){return"x"===t?"y":"x"}function k(t){return"y"===t?"height":"width"}function E(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function T(t){return S(E(t))}function M(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const A=["left","right"],O=["right","left"],H=["top","bottom"],L=["bottom","top"];function $(t){const e=x(t);return g[e]+t.slice(e.length)}function C(t){return"number"!=typeof t?function(t){var e,n,o,r;return{top:null!=(e=t.top)?e:0,right:null!=(n=t.right)?n:0,bottom:null!=(o=t.bottom)?o:0,left:null!=(r=t.left)?r:0}}(t):{top:t,right:t,bottom:t,left:t}}function D(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function R(t,e,n){let{reference:o,floating:r}=t;const i=E(e),s=T(e),a=k(s),c=x(e),l="y"===i,p=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,u=o[a]/2-r[a]/2;let h;switch(c){case"top":h={x:p,y:o.y-r.height};break;case"bottom":h={x:p,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}const d=b(e);return d&&(h[s]+=u*("end"===d?1:-1)*(n&&l?-1:1)),h}async function j(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:u=!1,padding:h=0}=y(e,t),d=C(h),m=a[u?"floating"===f?"reference":"floating":f],v=D(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:p,strategy:c})),g="floating"===f?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},b=D(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:c}):g);return{top:(v.top-b.top+d.top)/x.y,bottom:(b.bottom-v.bottom+d.bottom)/x.y,left:(v.left-b.left+d.left)/x.x,right:(b.right-v.right+d.right)/x.x}}function z(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function F(t){return f.some((e=>t[e]>=0))}function P(t){const e=u(...t.map((t=>t.left))),n=u(...t.map((t=>t.top)));return{x:e,y:n,width:h(...t.map((t=>t.right)))-e,height:h(...t.map((t=>t.bottom)))-n}}const W=new Set(["left","top"]);function B(){return"undefined"!=typeof window}function q(t){return G(t)?(t.nodeName||"").toLowerCase():"#document"}function I(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function N(t){var e;return null==(e=(G(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function G(t){return!!B()&&(t instanceof Node||t instanceof I(t).Node)}function V(t){return!!B()&&(t instanceof Element||t instanceof I(t).Element)}function X(t){return!!B()&&(t instanceof HTMLElement||t instanceof I(t).HTMLElement)}function Y(t){return!(!B()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof I(t).ShadowRoot)}function _(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function J(t){return/^(table|td|th)$/.test(q(t))}function K(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const Q=/transform|translate|scale|rotate|perspective|filter/,U=/paint|layout|strict|content/,Z=t=>!!t&&"none"!==t;let tt;function et(t){const e=V(t)?rt(t):t;return Z(e.transform)||Z(e.translate)||Z(e.scale)||Z(e.rotate)||Z(e.perspective)||!nt()&&(Z(e.backdropFilter)||Z(e.filter))||Q.test(e.willChange||"")||U.test(e.contain||"")}function nt(){return null==tt&&(tt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tt}function ot(t){return/^(html|body|#document)$/.test(q(t))}function rt(t){return I(t).getComputedStyle(t)}function it(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function st(t){if("html"===q(t))return t;const e=t.assignedSlot||t.parentNode||Y(t)&&t.host||N(t);return Y(e)?e.host:e}function at(t){const e=st(t);return ot(e)?(t.ownerDocument||t).body:X(e)&&_(e)?e:at(e)}function ct(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const r=at(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),s=I(r);if(i){const t=lt(s);return e.concat(s,s.visualViewport||[],_(r)?r:[],t&&n?ct(t):[])}return e.concat(r,ct(r,[],n))}function lt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function pt(t){const e=rt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=X(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=d(n)!==i||d(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function ft(t){return V(t)?t:t.contextElement}function ut(t){const e=ft(t);if(!X(e))return v(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=pt(e);let s=(i?d(n.width):n.width)/o,a=(i?d(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const ht=v(0);function dt(t){const e=I(t);return nt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ht}function mt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=ft(t);let s=v(1);e&&(o?V(o)&&(s=ut(o)):s=ut(t));const a=function(t,e,n){return void 0===e&&(e=!1),!!n&&e&&n===I(t)}(i,n,o)?dt(i):v(0);let c=(r.left+a.x)/s.x,l=(r.top+a.y)/s.y,p=r.width/s.x,f=r.height/s.y;if(i&&o){const t=I(i),e=V(o)?I(o):o;let n=t,r=lt(n);for(;r&&e!==n;){const t=ut(r),e=r.getBoundingClientRect(),o=rt(r),i=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,l*=t.y,p*=t.x,f*=t.y,c+=i,l+=s,n=I(r),r=lt(n)}}return D({width:p,height:f,x:c,y:l})}function vt(t,e){const n=it(t).scrollLeft;return e?e.left+n:mt(N(t)).left+n}function gt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-vt(t,n),y:n.top+e.scrollTop}}function wt(t,e,n){let o;if("viewport"===e||"layoutViewport"===e)o=function(t,e,n){void 0===n&&(n="viewport");const o="layoutViewport"===n,r=I(t),i=N(t),s=r.visualViewport;let a=i.clientWidth,c=i.clientHeight,l=0,p=0;if(s){const t=!nt()||"fixed"===e;o?t||(l=-s.offsetLeft,p=-s.offsetTop):(a=s.width,c=s.height,t&&(l=s.offsetLeft,p=s.offsetTop))}if(vt(i)<=0){const t=i.ownerDocument,e=t.body,n=getComputedStyle(e),o="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,r=Math.abs(i.clientWidth-e.clientWidth-o),s="stable both-edges"===getComputedStyle(i).scrollbarGutter?r/2:r;s<=25&&(a-=s)}return{width:a,height:c,x:l,y:p}}(t,n,e);else if("document"===e)o=function(t){const e=it(t),n=t.ownerDocument.body,o=h(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=h(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+vt(t);const s=-e.scrollTop;return"rtl"===rt(n).direction&&(i+=h(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:s}}(N(t));else if(V(e))o=function(t,e){const n=mt(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=ut(t);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=dt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return D(o)}function yt(t,e,n){const o=X(e),r=N(e),i="fixed"===n,s=mt(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=v(0);if((o||!i)&&(("body"!==q(e)||_(r))&&(a=it(e)),o)){const t=mt(e,!0,i,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}!o&&r&&(c.x=vt(r));const l=!r||o||i?v(0):gt(r,a);return{x:s.left+a.scrollLeft-c.x-l.x,y:s.top+a.scrollTop-c.y-l.y,width:s.width,height:s.height}}function xt(t){return"static"===rt(t).position}function bt(t,e){if(!X(t)||"fixed"===rt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function St(t,e){const n=I(t);if(K(t))return n;if(!X(t)){let e=st(t);for(;e&&!ot(e);){if(V(e)&&!xt(e))return e;e=st(e)}return n}let o=bt(t,e);for(;o&&J(o)&&xt(o);)o=bt(o,e);return o&&ot(o)&&xt(o)&&!et(o)?n:o||function(t){let e=st(t);for(;X(e)&&!ot(e);){if(et(e))return e;if(K(e))return null;e=st(e)}return null}(t)||n}const kt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,s=N(o),a=!!e&&K(e.floating);if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=v(1);const p=v(0),f=X(o);if((f||!i)&&(("body"!==q(o)||_(s))&&(c=it(o)),f)){const t=mt(o);l=ut(o),p.x=t.x+o.clientLeft,p.y=t.y+o.clientTop}const u=!s||f||i?v(0):gt(s,c);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+p.x+u.x,y:n.y*l.y-c.scrollTop*l.y+p.y+u.y}},getDocumentElement:N,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?K(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=ct(t,[],!1).filter((t=>V(t)&&"body"!==q(t))),r=null;const i="fixed"===rt(t).position;let s=i?st(t):t;for(;V(s)&&!ot(s);){const t=rt(s),e=et(s),n=r?r.position:i?"fixed":"";e||"fixed"!==n&&("absolute"!==n||"static"!==t.position)?r=t:o=o.filter((t=>t!==s)),s=st(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=wt(e,i[0],r);let a=s.top,c=s.right,l=s.bottom,p=s.left;for(let t=1;t<i.length;t++){const n=wt(e,i[t],r);a=h(n.top,a),c=u(n.right,c),l=u(n.bottom,l),p=h(n.left,p)}return{width:c-p,height:l-a,x:p,y:a}},getOffsetParent:St,getElementRects:async function(t){const e=this.getOffsetParent||St,n=this.getDimensions,o=await n(t.floating);return{reference:yt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){const{width:e,height:n}=pt(t);return{width:e,height:n}},getScale:ut,isElement:V,isRTL:function(t){return"rtl"===rt(t).direction}};function Et(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Tt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=e,c=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=x(n),a=b(n),c="y"===E(n),l=W.has(s)?-1:1,p=i&&c?-1:1,f=y(e,t);let{mainAxis:u,crossAxis:h,alignmentAxis:d}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof d&&(h="end"===a?-1*d:d),c?{x:h*p,y:u*l}:{x:u*l,y:h*p}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:s}}}}},Mt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=e,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:m=!0,...v}=y(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=x(r),w=E(a),S=x(a)===a,C=await(null==c.isRTL?void 0:c.isRTL(l.floating)),D=u||(S||!m?[$(a)]:function(t){const e=$(t);return[M(t),e,M(e)]}(a)),R="none"!==d;!u&&R&&D.push(...function(t,e,n,o){const r=b(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?O:A:e?A:O;case"left":case"right":return e?H:L;default:return[]}}(x(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(M)))),i}(a,m,d,C));const j=[a,...D],z=await c.detectOverflow(e,v),F=[];let P=(null==(o=i.flip)?void 0:o.overflows)||[];if(p&&F.push(z[g]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=b(t),r=T(t),i=k(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=$(s)),[s,$(s)]}(r,s,C);F.push(z[t[0]],z[t[1]])}if(P=[...P,{placement:r,overflows:F}],!F.every((t=>t<=0))){var W,B;const t=((null==(W=i.flip)?void 0:W.index)||0)+1,e=j[t];if(e&&("alignment"!==f||w===E(e)||P.every((t=>E(t.placement)!==w||t.overflows[0]>0))))return{data:{index:t,overflows:P},reset:{placement:e}};let n=null==(B=P.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:B.placement;if(!n)switch(h){case"bestFit":{var q;const t=null==(q=P.filter((t=>{if(R){const e=E(t.placement);return e===w||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:q[0];t&&(n=t);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},At=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:r,elements:i}=e,{apply:s=()=>{},...a}=y(t,e),c=await r.detectOverflow(e,a),l=x(n),p=b(n),f="y"===E(n),{width:d,height:m}=o.floating;let v,g;"top"===l||"bottom"===l?(v=l,g=p===(await(null==r.isRTL?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(g=l,v="end"===p?"top":"bottom");const w=m-c.top-c.bottom,S=d-c.left-c.right,k=u(m-c[v],w),T=u(d-c[g],S),M=e.middlewareData.shift;let A=k,O=T;null!=M&&M.enabled.x&&(O=S),null!=M&&M.enabled.y&&(A=w),!M&&!p&&(f?O=d-2*h(c.left,c.right):A=m-2*h(c.top,c.bottom)),await s({...e,availableWidth:O,availableHeight:A});const H=await r.getDimensions(i.floating);return d!==H.width||m!==H.height?{reset:{rects:!0}}:{}}}},Ot=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:r,platform:i,strategy:s}=e,{padding:a=2,x:c,y:l}=y(t,e),p=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]);if(!p.length)return{};const f=function(t){const e=t.slice().sort(((t,e)=>t.y-e.y)),n=[];let o=null;for(let t=0;t<e.length;t++){const r=e[t];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((t=>D(P(t))))}(p),d=D(P(p)),m=C(a),v=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&(f[0].left>f[1].right||f[1].left>f[0].right)&&null!=c&&null!=l)return f.find((t=>c>t.left-m.left&&c<t.right+m.right&&l>t.top-m.top&&l<t.bottom+m.bottom))||d;if(f.length>=2){if("y"===E(n)){const t=f[0],e=f[f.length-1],o="top"===x(n),r=t.top,i=o?t.left:e.left;return D({x:i,y:r,width:(o?t.right:e.right)-i,height:e.bottom-r})}const t="left"===x(n),e=h(...f.map((t=>t.right))),o=u(...f.map((t=>t.left))),r=f.filter((n=>t?n.left===o:n.right===e)),i=r[0].top;return D({x:o,y:i,width:e-o,height:r[r.length-1].bottom-i})}return d}},floating:o.floating,strategy:s});return r.reference.x!==v.reference.x||r.reference.y!==v.reference.y||r.reference.width!==v.reference.width||r.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},Ht=function(t){return void 0===t&&(t={}),{options:t,fn(e){var n,o;const{x:r,y:i,placement:s,rects:a,middlewareData:c}=e,{offset:l=0,mainAxis:p=!0,crossAxis:f=!0}=y(t,e),u={x:r,y:i},h=E(s),d=S(h);let m=u[d],v=u[h];const g=y(l,e),w="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:null!=(n=g.mainAxis)?n:0,crossAxis:null!=(o=g.crossAxis)?o:0};if(p){const t="y"===d?"height":"width",e=a.reference[d]-a.floating[t]+w.mainAxis,n=a.reference[d]+a.reference[t]-w.mainAxis;m<e?m=e:m>n&&(m=n)}if(f){var b,k;const t="y"===d?"width":"height",e=W.has(x(s)),n=a.reference[h]-a.floating[t]+(e&&(null==(b=c.offset)?void 0:b[h])||0)+(e?0:w.crossAxis),o=a.reference[h]+a.reference[t]+(e?0:(null==(k=c.offset)?void 0:k[h])||0)-(e?w.crossAxis:0);v<n?v=n:v>o&&(v=o)}return{[d]:m,[h]:v}}}};var Lt=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...o}={}){super(t,o),this.oldState=String(e||""),this.newState=String(n||"")}},$t=new WeakMap;function Ct(t,e,n){$t.set(t,setTimeout((()=>{$t.has(t)&&t.dispatchEvent(new Lt("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var Dt=globalThis.ShadowRoot||function(){},Rt=globalThis.HTMLDialogElement||function(){},jt=new WeakMap,zt=new WeakMap,Ft=new WeakMap,Pt=new WeakMap;function Wt(t){return Pt.get(t)||"hidden"}var Bt=new WeakMap;function qt(t){return[...t].pop()}function It(t,e){return!("auto"!==t.popover&&"manual"!==t.popover&&"hint"!==t.popover||!t.isConnected||e&&"showing"!==Wt(t)||!e&&"hidden"!==Wt(t)||t instanceof Rt&&t.hasAttribute("open")||document.fullscreenElement===t)}function Nt(t){if(!t)return 0;const e=zt.get(document)||new Set,n=Ft.get(document)||new Set;return n.has(t)?[...n].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function Gt(t){let e;const n=Ft.get(t)||new Set,o=zt.get(t)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(e=qt(r),e.isConnected?e:(r.delete(e),Gt(t))):null}function Vt(t){for(const e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function Xt(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?Xt(t.parentNode):t}function Yt(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===Pt.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||Xt(t))instanceof Dt&&(t=t.host),t instanceof Document)return}}function _t(t,e){const n=new Map;let o=0;for(const t of e||[])n.set(t,o),o+=1;n.set(t,o),o+=1;let r=null;return function(e){if(!e)return;let o=!1,i=null,s=null;for(;!o;){if(i=Yt(e)||null,null===i)return;if(!n.has(i))return;"hint"!==t.popover&&"auto"!==i.popover||(o=!0),o||(e=i.parentElement)}s=n.get(i),(null===r||n.get(r)<s)&&(r=i)}(t.parentElement||Xt(t)),r}function Jt(t){return!(t.hidden||t instanceof Dt||(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&&"hidden"===t.type||t instanceof HTMLAnchorElement&&""===t.href||"number"!=typeof t.tabIndex||-1===t.tabIndex)}var Kt=new WeakMap;function Qt(t){if(!It(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Lt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!It(t,!1))return;let n=!1;const o=t.popover;let r=null;const i=_t(t,zt.get(e)||new Set),s=_t(t,Ft.get(e)||new Set);if("auto"===o&&(Zt(Ft.get(e)||new Set,n,!0),ee(i||e,n,!0),r="auto"),"hint"===o&&(s?(ee(s,n,!0),r="hint"):(Zt(Ft.get(e)||new Set,n,!0),i?(ee(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!It(t,!1))return;Gt(e)||(n=!0),"auto"===r?(zt.has(e)||zt.set(e,new Set),zt.get(e).add(t)):"hint"===r&&(Ft.has(e)||Ft.set(e,new Set),Ft.get(e).add(t))}Kt.delete(t);const a=e.activeElement;var c;t.classList.add(":popover-open"),Pt.set(t,"showing"),jt.has(e)||jt.set(e,new Set),jt.get(e).add(t),ie(Bt.get(t),!0),c=t,function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(n=e.querySelector("[autofocus]"),n)return n}}}const o=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let r=o.currentNode;for(;r;){if(Jt(r))return r;r=o.nextNode()}}(c)?.focus(),n&&a&&"auto"===t.popover&&Kt.set(t,a),Ct(t,"closed","open")}function Ut(t,e=!1,n=!1){if(!It(t,!0))return;const o=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(ee(t,e,n),!It(t,!0)))return;const r=zt.get(o)||new Set,i=r.has(t)&&qt(r)===t;if(ie(Bt.get(t),!1),Bt.delete(t),n&&(t.dispatchEvent(new Lt("beforetoggle",{oldState:"open",newState:"closed"})),i&&qt(r)!==t&&ee(t,e,n),!It(t,!0)))return;jt.get(o)?.delete(t),r.delete(t),Ft.get(o)?.delete(t),t.classList.remove(":popover-open"),Pt.set(t,"hidden"),n&&Ct(t,"open","closed");const s=Kt.get(t);s&&(Kt.delete(t),e&&s.focus())}function Zt(t,e=!1,n=!1){let o=Vt(t);for(;o;)Ut(o,e,n),o=Vt(t)}function te(t,e,n,o){let r=!1,i=!1;for(;r||!i;){i=!0;let s=null,a=!1;for(const n of e)if(n===t)a=!0;else if(a){s=n;break}if(!s)return;for(;"showing"===Wt(s)&&e.size;)Ut(qt(e),n,o);e.has(t)&&qt(e)!==t&&(r=!0),r&&(o=!1)}}function ee(t,e,n){const o=t.ownerDocument||t;if(t instanceof Document)return function(t,e=!1,n=!1){let o=Gt(t);for(;o;)Ut(o,e,n),o=Gt(t)}(o,e,n);Ft.get(o)?.has(t)?te(t,Ft.get(o),e,n):(Zt(Ft.get(o)||new Set,e,n),zt.get(o)?.has(t)&&te(t,zt.get(o),e,n))}var ne=new WeakMap;function oe(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!Gt(n))return;const o=function(t){const e=Yt(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||Xt(t))instanceof Dt&&(t=t.host),t instanceof Document)return}}(t);return Nt(e)>Nt(n)?e:n}(e);if(o&&"pointerdown"===t.type)ne.set(n,o);else if("pointerup"===t.type){const t=ne.get(n)===o;ne.delete(n),t&&ee(o||n,!1,!0)}}var re=new WeakMap;function ie(t,e=!1){if(!t)return;re.has(t)||re.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=re.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var se=globalThis.ShadowRoot||function(){};function ae(t,e,n){const o=t[e];Object.defineProperty(t,e,{value(t){return o.call(this,n(t))}})}var ce=/(^|[^\\]):popover-open\b/g;var le=null;function pe(t){const e=function(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}();if(null===le)try{(le=new CSSStyleSheet).replaceSync(e)}catch{le=!1}if(!1===le){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[le,...t.adoptedStyleSheets]}const fe=Symbol("Clipping Rect Cache"),ue={...kt,getClippingRect:async function(...t){const e=t[0].element,n=this[fe].get(e);if(n)return n;const o=await kt.getClippingRect.apply(this,t);return function(t,e){const n=e.ownerDocument.querySelector("post-header");if(null===n)return;let o=e;for(;!ot(o);)if(o=st(o),X(o)&&(K(o)||o===n))return;const r=n.getBoundingClientRect(),i=Math.max(t.y,r.bottom);t.height-=i-t.y,t.y=i}(o,e),this[fe].set(e,o),o}};var he=function(t,e,n,o){var r,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,n,s):r(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const de={"pop-in":function(t){if(t)return t.animate([{transform:"scale(0.9)",opacity:0},{transform:"scale(1)",opacity:1}],{duration:250,easing:"ease-out",fill:"forwards"})}},me=t(class t extends e{static{this.STATIC_SIDES={top:"bottom",right:"left",bottom:"top",left:"right"}}static{this.PROPERTIES_TO_CLEAR=["--post-safe-space-popover-x","--post-safe-space-popover-y","--post-safe-space-popover-x-start","--post-safe-space-popover-x-end","--post-safe-space-popover-y-start","--post-safe-space-popover-y-end","--post-safe-space-trigger-x","--post-safe-space-trigger-y","--post-safe-space-trigger-x-start","--post-safe-space-trigger-x-end","--post-safe-space-trigger-y-start","--post-safe-space-trigger-y-end"]}constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postBeforeShow=n(this,"postBeforeShow",7),this.postShow=n(this,"postShow",7),this.postHide=n(this,"postHide",7),this.postBeforeToggle=n(this,"postBeforeToggle",7),this.postToggle=n(this,"postToggle",7),this.toggleTimeoutId=null,this.hasOpenedOnce=!0,this.placement="top",this.edgeGap=8,this.arrow=!1,this.animation="pop-in",this.currentAnimation=null,this.boundMouseTrackingHandler=this.mouseTrackingHandler.bind(this)}mouseTrackingHandler(t){this.host.style.setProperty("--post-safe-space-cursor-x",`${t.clientX}px`),this.host.style.setProperty("--post-safe-space-cursor-y",`${t.clientY}px`)}connectedCallback(){!o.isBrowser||"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(ce,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Lt,ae(Document.prototype,"querySelector",t),ae(Document.prototype,"querySelectorAll",t),ae(Element.prototype,"querySelector",t),ae(Element.prototype,"querySelectorAll",t),ae(Element.prototype,"matches",t),ae(Element.prototype,"closest",t),ae(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"hint"==t?"hint":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(t={}){Qt(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Ut(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t={}){return"boolean"==typeof t&&(t={force:t}),"showing"===Pt.get(this)&&void 0===t.force||!1===t.force?Ut(this,!0,!0):void 0!==t.force&&!0!==t.force||Qt(this),"showing"===Pt.get(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const n=e.call(this,t);return pe(n),n}}});const n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=n.call(this);return t.shadowRoot&&pe(t.shadowRoot),t}}});const o=new WeakMap;function r(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),o.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),o.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=o.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return o.delete(this),null;const e=Xt(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof se)&&n&&e.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}var i;r(HTMLButtonElement),r(HTMLInputElement),(i=document).addEventListener("click",(t=>{const e=t.composedPath(),n=e[0];if(!(n instanceof Element)||n?.shadowRoot)return;const o=Xt(n);if(!(o instanceof se||o instanceof Document))return;const r=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return r?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const n=Wt(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?Ut(e,!0,!0):It(e,!1)&&(Bt.set(e,t),Qt(e)))}(r),void t.preventDefault()):void 0})),i.addEventListener("keydown",(t=>{const e=t.key,n=t.target;t.defaultPrevented||!n||"Escape"!==e&&"Esc"!==e||ee(n.ownerDocument,!0,!0)})),i.addEventListener("pointerdown",oe),i.addEventListener("pointerup",oe),pe(document)}()}componentDidLoad(){this.host.addEventListener("beforetoggle",this.handleToggle.bind(this))}disconnectedCallback(){"function"==typeof this.clearAutoUpdate&&this.clearAutoUpdate(),this.host.removeEventListener("beforetoggle",this.handleToggle.bind(this))}async show(t){!this.toggleTimeoutId&&t&&(this.eventTarget=t,this.updatePosition(),this.host.showPopover())}async hide(){this.toggleTimeoutId||(this.eventTarget=null,this.host.hidePopover(),this.postHide.emit())}async toggle(t,e){const n=this.host.matches(":where(:popover-open, .popover-open)");return!0!==e&&(void 0!==e||n)||t?(this.eventTarget=t,this.toggleTimeoutId||(this.updatePosition(),this.host.togglePopover(e),this.toggleTimeoutId=null),this.host.matches(":where(:popover-open, .popover-open)")):n}open(){const t=this.host.shadowRoot?.querySelector(".popover-content");if(this.startAutoupdates(),t){const e=de[this.animation];"function"==typeof e?this.runOpenAnimation(e,t):(this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!0}),this.postShow.emit({first:this.hasOpenedOnce}),this.hasOpenedOnce&&(this.hasOpenedOnce=!1))}this.safeSpace&&globalThis.addEventListener("mousemove",this.boundMouseTrackingHandler)}close(){"function"==typeof this.clearAutoUpdate&&this.clearAutoUpdate(),this.safeSpace&&globalThis.removeEventListener("mousemove",this.boundMouseTrackingHandler),this.currentAnimation&&(this.currentAnimation.cancel(),this.currentAnimation=null),this.postBeforeToggle.emit({willOpen:!1}),this.postToggle.emit({isOpen:!1}),this.postHide.emit()}async runOpenAnimation(t,e){let n;try{if(n=t(e),!n)return this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!0}),void this.postShow.emit({first:this.hasOpenedOnce});this.currentAnimation=n,"running"===n.playState&&(this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce})),await n.finished,this.postToggle.emit({isOpen:!0}),this.postShow.emit({first:this.hasOpenedOnce}),this.hasOpenedOnce=!0}catch(t){console.warn("Animation failed or was interrupted:",t),this.postBeforeToggle.emit({willOpen:!1}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!1})}finally{this.currentAnimation===n&&(this.currentAnimation=null)}}handleToggle(t){this.toggleTimeoutId=globalThis.setTimeout((()=>this.toggleTimeoutId=null),10),"open"===t.newState?this.open():this.close()}startAutoupdates(){this.eventTarget&&this.host&&(this.clearAutoUpdate=function(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,l=ft(t),p=r||i?[...l?ct(l):[],...e?ct(e):[]]:[];p.forEach((t=>{r&&t.addEventListener("scroll",n),i&&t.addEventListener("resize",n)}));const f=l&&a?function(t,e,n){let o,r=null;const i=N(t);function s(){var t;clearTimeout(o),null==(t=r)||t.disconnect(),r=null}function a(n,c){void 0===n&&(n=!1),void 0===c&&(c=1),s();const l=t.getBoundingClientRect(),{left:p,top:f,width:d,height:v}=l;if(n||e(),!d||!v)return;const g={rootMargin:-m(f)+"px "+-m(i.clientWidth-(p+d))+"px "+-m(i.clientHeight-(f+v))+"px "+-m(p)+"px",threshold:h(0,u(1,c))||1};let w=!0;function y(e){const n=e[0].intersectionRatio;if(!Et(l,t.getBoundingClientRect()))return a();if(n!==c){if(!w)return a();n?a(!1,n):o=setTimeout((()=>{a(!1,1e-7)}),1e3)}w=!1}try{r=new IntersectionObserver(y,{...g,root:i.ownerDocument})}catch(t){r=new IntersectionObserver(y,g)}r.observe(t)}const c=I(t),l=()=>a(n);return c.addEventListener("resize",l),a(!0),()=>{c.removeEventListener("resize",l),s()}}(l,n,i):null;let d,v=-1,g=null;s&&(g=new ResizeObserver((t=>{let[o]=t;o&&o.target===l&&g&&e&&(g.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{var t;null==(t=g)||t.observe(e)}))),n()})),l&&!c&&g.observe(l),e&&g.observe(e));let w=c?mt(t):null;return c&&function e(){const o=mt(t);w&&!Et(w,o)&&n(),w=o,d=requestAnimationFrame(e)}(),n(),()=>{var t;p.forEach((t=>{r&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==f||f(),null==(t=g)||t.disconnect(),g=null,c&&cancelAnimationFrame(d)}}(this.eventTarget,this.host,this.updatePosition.bind(this)))}async updatePosition(){const{x:e,y:n,middlewareData:o,placement:r}=await this.calculatePosition();o.hide?.referenceHidden&&this.host.hidePopover();const i=r.split("-")[0];if(this.dynamicPlacement=i,this.host.style.left=`${e}px`,this.host.style.top=`${n}px`,this.arrow&&o.arrow){const{x:e,y:n}=o.arrow,r=t.STATIC_SIDES[i],s=-.5*this.arrowRef.offsetWidth;r&&Object.assign(this.arrowRef.style,{left:e?`${e}px`:"",top:n?`${n}px`:"",[r]:`${s}px`})}this.safeSpace&&this.eventTarget&&await this.updateSafeSpaceBoundaries(i)}async calculatePosition(){const t=this.edgeGap,e=(this.placement||"top").includes("-"),n=[Mt({elementContext:"reference",crossAxis:!1}),Mt({elementContext:"floating",crossAxis:!1})],o=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=y(t,e),p={x:n,y:o},f=await i.detectOverflow(e,l),u=E(r),h=S(u);let d=p[h],m=p[u];const v=(t,e)=>w(e+f["y"===t?"top":"left"],e,e-f["y"===t?"bottom":"right"]);s&&(d=v(h,d)),a&&(m=v(u,m));const g=c.fn({...e,[h]:d,[u]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:s,[u]:a}}}}}}({padding:t,limiter:Ht({offset:32})}),r=[Tt(this.offset??(this.arrow?t+4:t)),Ot(),...e?[...n,o]:[o,...n],At({apply({availableWidth:e,elements:n}){Object.assign(n.floating.style,{maxWidth:e-2*t+"px"})}})];return this.arrow&&r.push((t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:c}=e,{element:l,padding:p=0}=y(t,e)||{};if(null==l)return{};const f=C(p),h={x:n,y:o},d=T(r),m=k(d),v=await s.getDimensions(l),g="y"===d,x=g?"top":"left",S=g?"bottom":"right",E=g?"clientHeight":"clientWidth",M=i.reference[m]+i.reference[d]-h[d]-i.floating[m],A=h[d]-i.reference[d],O=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let H=O?O[E]:0;H&&await(null==s.isElement?void 0:s.isElement(O))||(H=a.floating[E]||i.floating[m]);const L=M/2-A/2,$=H/2-v[m]/2-1,D=u(f[x],$),R=u(f[S],$),j=H-v[m]-R,z=H/2-v[m]/2+L,F=w(D,z,j),P=!c.arrow&&null!=b(r)&&z!==F&&i.reference[m]/2-(z<D?D:R)-v[m]/2<0,W=P?z<D?z-D:z-j:0;return{[d]:h[d]+W,data:{[d]:F,centerOffset:z-F-W,...P&&{alignmentOffset:W}},reset:P}}}))({element:this.arrowRef,padding:t})),this.autoHide&&r.push(function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...i}=y(t,e);switch(r){case"referenceHidden":{const t=z(await o.detectOverflow(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:F(t)}}}case"escaped":{const t=z(await o.detectOverflow(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:F(t)}}}default:return{}}}}}({strategy:"referenceHidden"})),i=this.eventTarget,s=this.host,a={placement:this.placement||"top",strategy:"fixed",middleware:r},a??={},((t,e,n)=>{const o=new Map,r=null!=n?n:{},i={...kt,...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:j},c=await(null==s.isRTL?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:p,y:f}=R(l,o,c),u=o,h=0;const d={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:v,fn:g}=m,{x:w,y,data:x,reset:b}=await g({x:p,y:f,initialPlacement:o,placement:u,strategy:r,middlewareData:d,rects:l,platform:a,elements:{reference:t,floating:e}});p=null!=w?w:p,f=null!=y?y:f,d[v]={...d[v],...x},b&&h<50&&(h++,"object"==typeof b&&(b.placement&&(u=b.placement),b.rects&&(l=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):b.rects),({x:p,y:f}=R(l,u,c))),n=-1)}return{x:p,y:f,placement:u,strategy:r,middlewareData:d}})(t,e,{...r,platform:i})})(i,s,{...a,platform:{...ue,...a.platform,[fe]:new Map}});var i,s,a}async updateSafeSpaceBoundaries(e){const n=this.eventTarget.getBoundingClientRect(),o="top"===e||"bottom"===e,r=((t,e,n)=>"top"===t||"bottom"===t?{popover:{y:"top"===t?e.bottom:e.top,xStart:e.left,xEnd:e.right},trigger:{y:"top"===t?n.top:n.bottom,xStart:n.left,xEnd:n.right}}:{popover:{x:"left"===t?e.right:e.left,yStart:e.top,yEnd:e.bottom},trigger:{x:"left"===t?n.left:n.right,yStart:n.top,yEnd:n.bottom}})(e,this.host.getBoundingClientRect(),n);t.PROPERTIES_TO_CLEAR.forEach((t=>{this.host.style.removeProperty(t)})),o?(this.host.style.setProperty("--post-safe-space-popover-y",`${r.popover.y}px`),this.host.style.setProperty("--post-safe-space-popover-x-start",`${r.popover.xStart}px`),this.host.style.setProperty("--post-safe-space-popover-x-end",`${r.popover.xEnd}px`),this.host.style.setProperty("--post-safe-space-trigger-y",`${r.trigger.y}px`),this.host.style.setProperty("--post-safe-space-trigger-x-start",`${r.trigger.xStart}px`),this.host.style.setProperty("--post-safe-space-trigger-x-end",`${r.trigger.xEnd}px`)):(this.host.style.setProperty("--post-safe-space-popover-x",`${r.popover.x}px`),this.host.style.setProperty("--post-safe-space-popover-y-start",`${r.popover.yStart}px`),this.host.style.setProperty("--post-safe-space-popover-y-end",`${r.popover.yEnd}px`),this.host.style.setProperty("--post-safe-space-trigger-x",`${r.trigger.x}px`),this.host.style.setProperty("--post-safe-space-trigger-y-start",`${r.trigger.yStart}px`),this.host.style.setProperty("--post-safe-space-trigger-y-end",`${r.trigger.yEnd}px`))}render(){return r(i,{key:"f3ea4bfc9a59faa2fbf1e413a1ec648f598a6779","data-version":a,popover:"auto"},r("div",{key:"a328c73c7e08eca1e423fcbe736798188cca2a87",part:"post-popovercontainer-content",class:"popover-content"},this.arrow&&r("span",{key:"8fad0095fb8d8c903ba84a639b4efc3e321c6aef","dynamic-placement":this.dynamicPlacement,class:"arrow",ref:t=>{this.arrowRef=t}}),r("span",{key:"deadbcc5892ed545a64b4a0e5e0936e0dd1feb70",part:"post-popovercontainer-border-mask"}),r("slot",{key:"48c4db7ab222f3ef18157ce19d8ba15d75441f98"})))}get host(){return this}static get style(){return'@layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host>div{border:2px solid rgba(0,0,0,0)}}:host [part=post-popovercontainer-border-mask]{display:none;position:absolute;inset:0;border-radius:4px;pointer-events:none}:host .arrow{--post-popovercontainer-arrow-border: var(--post-popovercontainer-arrow-border-width, 0px) solid var(--post-popovercontainer-arrow-border-color, transparent);position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:host .arrow[dynamic-placement=top]{border-bottom-right-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=right]{border-bottom-left-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=bottom]{border-top-left-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=left]{border-top-right-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .arrow[dynamic-placement=top]{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:host .arrow[dynamic-placement=left]{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:host .arrow[dynamic-placement=right]{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:host .arrow[dynamic-placement=bottom]{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}:host([tooltip]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host([safe-space])::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:auto}:host([safe-space=triangle])::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:host([safe-space=trapezoid])::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:host(:not(:has(.arrow)))>div{box-shadow:var(--post-device-elevation-300)}:host(:has(.arrow))>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=top]))>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=left]))>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=right]))>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}'}},[257,"post-popovercontainer",{placement:[1],edgeGap:[2,"edge-gap"],offset:[2],arrow:[4],safeSpace:[513,"safe-space"],autoHide:[4,"auto-hide"],dynamicPlacement:[32],show:[64],hide:[64],toggle:[64]}]);function ve(){"undefined"!=typeof customElements&&["post-popovercontainer"].forEach((t=>{"post-popovercontainer"===t&&(customElements.get(s(t))||customElements.define(s(t),me))}))}he([c(p)],me.prototype,"placement",void 0),he([l("number")],me.prototype,"edgeGap",void 0),he([c(["triangle","trapezoid"])],me.prototype,"safeSpace",void 0);export{me as P,p as a,ve as d}
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as n,Build as o,h as r,Host as i,transformTag as a}from"@stencil/core/internal/client";import{v as s}from"./package.js";import"./breakpoints.js";import{O as l}from"./one-of.js";import{T as c}from"./type.js";const u=["top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"],p=["top","right","bottom","left"],f=Math.min,h=Math.max,d=Math.round,m=Math.floor,w=t=>({x:t,y:t}),g={left:"right",right:"left",bottom:"top",top:"bottom"};function v(t,e,n){return h(t,f(e,n))}function b(t,e){return"function"==typeof t?t(e):t}function y(t){return t.split("-")[0]}function x(t){return t.split("-")[1]}function S(t){return"x"===t?"y":"x"}function M(t){return"y"===t?"height":"width"}function T(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function E(t){return S(T(t))}function k(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const H=["left","right"],A=["right","left"],O=["top","bottom"],L=["bottom","top"];function C(t){const e=y(t);return g[e]+t.slice(e.length)}function z(t){return"number"!=typeof t?function(t){var e,n,o,r;return{top:null!=(e=t.top)?e:0,right:null!=(n=t.right)?n:0,bottom:null!=(o=t.bottom)?o:0,left:null!=(r=t.left)?r:0}}(t):{top:t,right:t,bottom:t,left:t}}function R(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function D(t,e,n){let{reference:o,floating:r}=t;const i=T(e),a=E(e),s=M(a),l=y(e),c="y"===i,u=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,f=o[s]/2-r[s]/2;let h;switch(l){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:p};break;case"left":h={x:o.x-r.width,y:p};break;default:h={x:o.x,y:o.y}}const d=x(e);return d&&(h[a]+=f*("end"===d?1:-1)*(n&&c?-1:1)),h}async function $(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:h=0}=b(e,t),d=z(h),m=s[f?"floating"===p?"reference":"floating":p],w=R(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===p?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),y=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=R(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:v,strategy:l}):g);return{top:(w.top-x.top+d.top)/y.y,bottom:(x.bottom-w.bottom+d.bottom)/y.y,left:(w.left-x.left+d.left)/y.x,right:(x.right-w.right+d.right)/y.x}}function j(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function F(t){return p.some((e=>t[e]>=0))}function W(t){const e=f(...t.map((t=>t.left))),n=f(...t.map((t=>t.top)));return{x:e,y:n,width:h(...t.map((t=>t.right)))-e,height:h(...t.map((t=>t.bottom)))-n}}const P=new Set(["left","top"]);function B(){return"undefined"!=typeof window}function q(t){return G(t)?(t.nodeName||"").toLowerCase():"#document"}function I(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function N(t){var e;return null==(e=(G(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function G(t){return!!B()&&(t instanceof Node||t instanceof I(t).Node)}function V(t){return!!B()&&(t instanceof Element||t instanceof I(t).Element)}function U(t){return!!B()&&(t instanceof HTMLElement||t instanceof I(t).HTMLElement)}function X(t){return!(!B()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof I(t).ShadowRoot)}function Y(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function _(t){return/^(table|td|th)$/.test(q(t))}function J(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const K=/transform|translate|scale|rotate|perspective|filter/,Q=/paint|layout|strict|content/,Z=t=>!!t&&"none"!==t;let tt;function et(t){const e=V(t)?rt(t):t;return Z(e.transform)||Z(e.translate)||Z(e.scale)||Z(e.rotate)||Z(e.perspective)||!nt()&&(Z(e.backdropFilter)||Z(e.filter))||K.test(e.willChange||"")||Q.test(e.contain||"")}function nt(){return null==tt&&(tt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tt}function ot(t){return/^(html|body|#document)$/.test(q(t))}function rt(t){return I(t).getComputedStyle(t)}function it(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function at(t){if("html"===q(t))return t;const e=t.assignedSlot||t.parentNode||X(t)&&t.host||N(t);return X(e)?e.host:e}function st(t){const e=at(t);return ot(e)?(t.ownerDocument||t).body:U(e)&&Y(e)?e:st(e)}function lt(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const r=st(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),a=I(r);if(i){const t=ct(a);return e.concat(a,a.visualViewport||[],Y(r)?r:[],t&&n?lt(t):[])}return e.concat(r,lt(r,[],n))}function ct(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ut(t){const e=rt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=U(t),i=r?t.offsetWidth:n,a=r?t.offsetHeight:o,s=d(n)!==i||d(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function pt(t){return V(t)?t:t.contextElement}function ft(t){const e=pt(t);if(!U(e))return w(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=ut(e);let a=(i?d(n.width):n.width)/o,s=(i?d(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ht=w(0);function dt(t){const e=I(t);return nt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ht}function mt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=pt(t);let a=w(1);e&&(o?V(o)&&(a=ft(o)):a=ft(t));const s=function(t,e,n){return void 0===e&&(e=!1),!!n&&e&&n===I(t)}(i,n,o)?dt(i):w(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,u=r.width/a.x,p=r.height/a.y;if(i&&o){const t=I(i),e=V(o)?I(o):o;let n=t,r=ct(n);for(;r&&e!==n;){const t=ft(r),e=r.getBoundingClientRect(),o=rt(r),i=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,a=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,c*=t.y,u*=t.x,p*=t.y,l+=i,c+=a,n=I(r),r=ct(n)}}return R({width:u,height:p,x:l,y:c})}function wt(t,e){const n=it(t).scrollLeft;return e?e.left+n:mt(N(t)).left+n}function gt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-wt(t,n),y:n.top+e.scrollTop}}function vt(t,e,n){let o;if("viewport"===e||"layoutViewport"===e)o=function(t,e,n){void 0===n&&(n="viewport");const o="layoutViewport"===n,r=I(t),i=N(t),a=r.visualViewport;let s=i.clientWidth,l=i.clientHeight,c=0,u=0;if(a){const t=!nt()||"fixed"===e;o?t||(c=-a.offsetLeft,u=-a.offsetTop):(s=a.width,l=a.height,t&&(c=a.offsetLeft,u=a.offsetTop))}if(wt(i)<=0){const t=i.ownerDocument,e=t.body,n=getComputedStyle(e),o="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,r=Math.abs(i.clientWidth-e.clientWidth-o),a="stable both-edges"===getComputedStyle(i).scrollbarGutter?r/2:r;a<=25&&(s-=a)}return{width:s,height:l,x:c,y:u}}(t,n,e);else if("document"===e)o=function(t){const e=it(t),n=t.ownerDocument.body,o=h(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=h(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+wt(t);const a=-e.scrollTop;return"rtl"===rt(n).direction&&(i+=h(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:a}}(N(t));else if(V(e))o=function(t,e){const n=mt(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=ft(t);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=dt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return R(o)}function bt(t,e,n){const o=U(e),r=N(e),i="fixed"===n,a=mt(t,!0,i,e);let s={scrollLeft:0,scrollTop:0};const l=w(0);if((o||!i)&&(("body"!==q(e)||Y(r))&&(s=it(e)),o)){const t=mt(e,!0,i,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}!o&&r&&(l.x=wt(r));const c=!r||o||i?w(0):gt(r,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function yt(t){return"static"===rt(t).position}function xt(t,e){if(!U(t)||"fixed"===rt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function St(t,e){const n=I(t);if(J(t))return n;if(!U(t)){let e=at(t);for(;e&&!ot(e);){if(V(e)&&!yt(e))return e;e=at(e)}return n}let o=xt(t,e);for(;o&&_(o)&&yt(o);)o=xt(o,e);return o&&ot(o)&&yt(o)&&!et(o)?n:o||function(t){let e=at(t);for(;U(e)&&!ot(e);){if(et(e))return e;if(J(e))return null;e=at(e)}return null}(t)||n}const Mt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,a=N(o),s=!!e&&J(e.floating);if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=w(1);const u=w(0),p=U(o);if((p||!i)&&(("body"!==q(o)||Y(a))&&(l=it(o)),p)){const t=mt(o);c=ft(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const f=!a||p||i?w(0):gt(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:N,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?J(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=lt(t,[],!1).filter((t=>V(t)&&"body"!==q(t))),r=null;const i="fixed"===rt(t).position;let a=i?at(t):t;for(;V(a)&&!ot(a);){const t=rt(a),e=et(a),n=r?r.position:i?"fixed":"";e||"fixed"!==n&&("absolute"!==n||"static"!==t.position)?r=t:o=o.filter((t=>t!==a)),a=at(a)}return e.set(t,o),o}(e,this._c):[].concat(n),o],a=vt(e,i[0],r);let s=a.top,l=a.right,c=a.bottom,u=a.left;for(let t=1;t<i.length;t++){const n=vt(e,i[t],r);s=h(n.top,s),l=f(n.right,l),c=f(n.bottom,c),u=h(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:St,getElementRects:async function(t){const e=this.getOffsetParent||St,n=this.getDimensions,o=await n(t.floating);return{reference:bt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){const{width:e,height:n}=ut(t);return{width:e,height:n}},getScale:ft,isElement:V,isRTL:function(t){return"rtl"===rt(t).direction}};function Tt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Et=$,kt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=e,l=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=y(n),s=x(n),l="y"===T(n),c=P.has(a)?-1:1,u=i&&l?-1:1,p=b(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:d}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&"number"==typeof d&&(h="end"===s?-1*d:d),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}(e,t);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}},Ht=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:r,platform:i,strategy:a}=e,{padding:s=2,x:l,y:c}=b(t,e),u=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]);if(!u.length)return{};const p=function(t){const e=t.slice().sort(((t,e)=>t.y-e.y)),n=[];let o=null;for(let t=0;t<e.length;t++){const r=e[t];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((t=>R(W(t))))}(u),d=R(W(u)),m=z(s),w=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&(p[0].left>p[1].right||p[1].left>p[0].right)&&null!=l&&null!=c)return p.find((t=>l>t.left-m.left&&l<t.right+m.right&&c>t.top-m.top&&c<t.bottom+m.bottom))||d;if(p.length>=2){if("y"===T(n)){const t=p[0],e=p[p.length-1],o="top"===y(n),r=t.top,i=o?t.left:e.left;return R({x:i,y:r,width:(o?t.right:e.right)-i,height:e.bottom-r})}const t="left"===y(n),e=h(...p.map((t=>t.right))),o=f(...p.map((t=>t.left))),r=p.filter((n=>t?n.left===o:n.right===e)),i=r[0].top;return R({x:o,y:i,width:e-o,height:r[r.length-1].bottom-i})}return d}},floating:o.floating,strategy:a});return r.reference.x!==w.reference.x||r.reference.y!==w.reference.y||r.reference.width!==w.reference.width||r.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},At=function(t){return void 0===t&&(t={}),{options:t,fn(e){var n,o;const{x:r,y:i,placement:a,rects:s,middlewareData:l}=e,{offset:c=0,mainAxis:u=!0,crossAxis:p=!0}=b(t,e),f={x:r,y:i},h=T(a),d=S(h);let m=f[d],w=f[h];const g=b(c,e),v="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:null!=(n=g.mainAxis)?n:0,crossAxis:null!=(o=g.crossAxis)?o:0};if(u){const t="y"===d?"height":"width",e=s.reference[d]-s.floating[t]+v.mainAxis,n=s.reference[d]+s.reference[t]-v.mainAxis;m<e?m=e:m>n&&(m=n)}if(p){var x,M;const t="y"===d?"width":"height",e=P.has(y(a)),n=s.reference[h]-s.floating[t]+(e&&(null==(x=l.offset)?void 0:x[h])||0)+(e?0:v.crossAxis),o=s.reference[h]+s.reference[t]+(e?0:(null==(M=l.offset)?void 0:M[h])||0)-(e?v.crossAxis:0);w<n?w=n:w>o&&(w=o)}return{[d]:m,[h]:w}}}};function Ot(t,e){return p[(p.indexOf(t)+e)%4]}const Lt=t=>Ot(t,2),Ct="post-flip";function zt(t={}){return{name:Ct,options:t,async fn(e){const{middlewareData:n,placement:o}=e;if(n.arrow?.alignmentOffset)return{};const{minSize:r={},...i}=b(t,e),a=Math.abs(n.offset?.[T(o)]??0),s=y(o),l=await Et(e,{...i,elementContext:"reference"}),c=await Et(e,{...i,elementContext:"floating"});if(Math.max(l[s],c[s])<=0)return{};const u=n[Ct],p={overflow:l,minSize:r,gap:a};let f=u?.deficits??[];const h=u?.placements??await async function(t,e){const{placement:n,platform:o,elements:r}=t,{overflow:i}=e,a=y(n),s=[n,C(n)];if(Math.min(Rt(a,e),Rt(Lt(a),e))<=0)return s;const l=function(t,e,n,o){const r=x(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?A:H:e?H:A;case"left":case"right":return e?O:L;default:return[]}}(y(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),i=i.concat(i.map(k))),i}(n,0,"start",await(o.isRTL?.(r.floating))??!1);return l.sort(((t,e)=>i[y(t)]-i[y(e)])),[...s,...l]}(e,p);f.length<h.length&&(f=[...f,Rt(s,p)]);const d={placements:h,deficits:f};if(f.length<h.length)return{data:d,reset:{placement:h[f.length]}};const m=d.placements[d.deficits.indexOf(Math.min(...d.deficits))];return m===o?{data:d}:{data:d,reset:{placement:m}}}}}function Rt(t,{minSize:e,overflow:n,gap:o}){return o+(e[M(T(t))]??0)+n[t]}const Dt=Symbol("Clipping Rect Cache"),$t={...Mt,getClippingRect:async function(...t){const e=t[0].element,n=this[Dt].get(e);if(n)return n;const o=await Mt.getClippingRect.apply(this,t);return function(t,e){const n=e.ownerDocument.querySelector("post-header");if(null===n)return;let o=e;for(;!ot(o);)if(o=at(o),U(o)&&(J(o)||o===n))return;const r=n.getBoundingClientRect(),i=Math.max(t.y,r.bottom);t.height-=i-t.y,t.y=i}(o,e),this[Dt].set(e,o),o}};const jt="post-safe-space";async function Ft({elements:t,platform:e,strategy:n},o){return R(await(e.convertOffsetParentRelativeRectToViewportRelativeRect?.({offsetParent:await(e.getOffsetParent?.(t.floating)),rect:o,elements:t,strategy:n}))??o)}function Wt(t,e){const n=t[e],o=t[(t=>Ot(t,3))(e)],r=t[(t=>Ot(t,1))(e)];return"x"===T(e)?[n,o,n,r]:[o,n,r,n]}var Pt=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...o}={}){super(t,o),this.oldState=String(e||""),this.newState=String(n||"")}},Bt=new WeakMap;function qt(t,e,n){Bt.set(t,setTimeout((()=>{Bt.has(t)&&t.dispatchEvent(new Pt("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var It=globalThis.ShadowRoot||function(){},Nt=globalThis.HTMLDialogElement||function(){},Gt=new WeakMap,Vt=new WeakMap,Ut=new WeakMap,Xt=new WeakMap;function Yt(t){return Xt.get(t)||"hidden"}var _t=new WeakMap;function Jt(t){return[...t].pop()}function Kt(t,e){return!("auto"!==t.popover&&"manual"!==t.popover&&"hint"!==t.popover||!t.isConnected||e&&"showing"!==Yt(t)||!e&&"hidden"!==Yt(t)||t instanceof Nt&&t.hasAttribute("open")||document.fullscreenElement===t)}function Qt(t){if(!t)return 0;const e=Vt.get(document)||new Set,n=Ut.get(document)||new Set;return n.has(t)?[...n].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function Zt(t){let e;const n=Ut.get(t)||new Set,o=Vt.get(t)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(e=Jt(r),e.isConnected?e:(r.delete(e),Zt(t))):null}function te(t){for(const e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function ee(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?ee(t.parentNode):t}function ne(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===Xt.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||ee(t))instanceof It&&(t=t.host),t instanceof Document)return}}function oe(t,e){const n=new Map;let o=0;for(const t of e||[])n.set(t,o),o+=1;n.set(t,o),o+=1;let r=null;return function(e){if(!e)return;let o=!1,i=null,a=null;for(;!o;){if(i=ne(e)||null,null===i)return;if(!n.has(i))return;"hint"!==t.popover&&"auto"!==i.popover||(o=!0),o||(e=i.parentElement)}a=n.get(i),(null===r||n.get(r)<a)&&(r=i)}(t.parentElement||ee(t)),r}function re(t){return!(t.hidden||t instanceof It||(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&&"hidden"===t.type||t instanceof HTMLAnchorElement&&""===t.href||"number"!=typeof t.tabIndex||-1===t.tabIndex)}var ie=new WeakMap;function ae(t){if(!Kt(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Pt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!Kt(t,!1))return;let n=!1;const o=t.popover;let r=null;const i=oe(t,Vt.get(e)||new Set),a=oe(t,Ut.get(e)||new Set);if("auto"===o&&(le(Ut.get(e)||new Set,n,!0),ue(i||e,n,!0),r="auto"),"hint"===o&&(a?(ue(a,n,!0),r="hint"):(le(Ut.get(e)||new Set,n,!0),i?(ue(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!Kt(t,!1))return;Zt(e)||(n=!0),"auto"===r?(Vt.has(e)||Vt.set(e,new Set),Vt.get(e).add(t)):"hint"===r&&(Ut.has(e)||Ut.set(e,new Set),Ut.get(e).add(t))}ie.delete(t);const s=e.activeElement;var l;t.classList.add(":popover-open"),Xt.set(t,"showing"),Gt.has(e)||Gt.set(e,new Set),Gt.get(e).add(t),de(_t.get(t),!0),l=t,function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(n=e.querySelector("[autofocus]"),n)return n}}}const o=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let r=o.currentNode;for(;r;){if(re(r))return r;r=o.nextNode()}}(l)?.focus(),n&&s&&"auto"===t.popover&&ie.set(t,s),qt(t,"closed","open")}function se(t,e=!1,n=!1){if(!Kt(t,!0))return;const o=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(ue(t,e,n),!Kt(t,!0)))return;const r=Vt.get(o)||new Set,i=r.has(t)&&Jt(r)===t;if(de(_t.get(t),!1),_t.delete(t),n&&(t.dispatchEvent(new Pt("beforetoggle",{oldState:"open",newState:"closed"})),i&&Jt(r)!==t&&ue(t,e,n),!Kt(t,!0)))return;Gt.get(o)?.delete(t),r.delete(t),Ut.get(o)?.delete(t),t.classList.remove(":popover-open"),Xt.set(t,"hidden"),n&&qt(t,"open","closed");const a=ie.get(t);a&&(ie.delete(t),e&&a.focus())}function le(t,e=!1,n=!1){let o=te(t);for(;o;)se(o,e,n),o=te(t)}function ce(t,e,n,o){let r=!1,i=!1;for(;r||!i;){i=!0;let a=null,s=!1;for(const n of e)if(n===t)s=!0;else if(s){a=n;break}if(!a)return;for(;"showing"===Yt(a)&&e.size;)se(Jt(e),n,o);e.has(t)&&Jt(e)!==t&&(r=!0),r&&(o=!1)}}function ue(t,e,n){const o=t.ownerDocument||t;if(t instanceof Document)return function(t,e=!1,n=!1){let o=Zt(t);for(;o;)se(o,e,n),o=Zt(t)}(o,e,n);Ut.get(o)?.has(t)?ce(t,Ut.get(o),e,n):(le(Ut.get(o)||new Set,e,n),Vt.get(o)?.has(t)&&ce(t,Vt.get(o),e,n))}var pe=new WeakMap;function fe(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!Zt(n))return;const o=function(t){const e=ne(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||ee(t))instanceof It&&(t=t.host),t instanceof Document)return}}(t);return Qt(e)>Qt(n)?e:n}(e);if(o&&"pointerdown"===t.type)pe.set(n,o);else if("pointerup"===t.type){const t=pe.get(n)===o;pe.delete(n),t&&ue(o||n,!1,!0)}}var he=new WeakMap;function de(t,e=!1){if(!t)return;he.has(t)||he.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=he.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var me=globalThis.ShadowRoot||function(){};function we(t,e,n){const o=t[e];Object.defineProperty(t,e,{value(t){return o.call(this,n(t))}})}var ge=/(^|[^\\]):popover-open\b/g;var ve=null;function be(t){const e=function(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}();if(null===ve)try{(ve=new CSSStyleSheet).replaceSync(e)}catch{ve=!1}if(!1===ve){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[ve,...t.adoptedStyleSheets]}var ye=function(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};const xe="--post-popovercontainer-available-width",Se="--post-popovercontainer-available-height",Me="--post-popovercontainer-safe-space",Te=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postBeforeShow=n(this,"postBeforeShow",7),this.postShow=n(this,"postShow",7),this.postHide=n(this,"postHide",7),this.postBeforeToggle=n(this,"postBeforeToggle",7),this.postToggle=n(this,"postToggle",7),this.anchorRef=null,this.arrowRef=null,this.hasBeenOpened=!1,this.toggleTimeoutId=null,this.runningAnimation=null,this.stopAutoUpdate=null,this.placement="top",this.edgeGap=8,this.arrow=!1}connectedCallback(){!o.isBrowser||"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(ge,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Pt,we(Document.prototype,"querySelector",t),we(Document.prototype,"querySelectorAll",t),we(Element.prototype,"querySelector",t),we(Element.prototype,"querySelectorAll",t),we(Element.prototype,"matches",t),we(Element.prototype,"closest",t),we(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"hint"==t?"hint":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(t={}){ae(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){se(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t={}){return"boolean"==typeof t&&(t={force:t}),"showing"===Xt.get(this)&&void 0===t.force||!1===t.force?se(this,!0,!0):void 0!==t.force&&!0!==t.force||ae(this),"showing"===Xt.get(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const n=e.call(this,t);return be(n),n}}});const n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=n.call(this);return t.shadowRoot&&be(t.shadowRoot),t}}});const o=new WeakMap;function r(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),o.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),o.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=o.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return o.delete(this),null;const e=ee(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof me)&&n&&e.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}var i;r(HTMLButtonElement),r(HTMLInputElement),(i=document).addEventListener("click",(t=>{const e=t.composedPath(),n=e[0];if(!(n instanceof Element)||n?.shadowRoot)return;const o=ee(n);if(!(o instanceof me||o instanceof Document))return;const r=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return r?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const n=Yt(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?se(e,!0,!0):Kt(e,!1)&&(_t.set(e,t),ae(e)))}(r),void t.preventDefault()):void 0})),i.addEventListener("keydown",(t=>{const e=t.key,n=t.target;t.defaultPrevented||!n||"Escape"!==e&&"Esc"!==e||ue(n.ownerDocument,!0,!0)})),i.addEventListener("pointerdown",fe),i.addEventListener("pointerup",fe),be(document)}()}componentDidLoad(){this.host.addEventListener("beforetoggle",this.handleToggle.bind(this))}disconnectedCallback(){this.cleanup(),this.host.removeEventListener("beforetoggle",this.handleToggle.bind(this))}cleanup(){this.stopAutoUpdate?.(),this.runningAnimation&&(this.runningAnimation.cancel(),this.runningAnimation=null)}isOpen(){return this.host?.matches(":where(:popover-open, .popover-open)")}getContent(){return this.host?.shadowRoot.querySelector('[part="post-popovercontainer-content"]')}getContentMinSize(){const t=this.getContent();if(!t)return{};const{minWidth:e,minHeight:n}=getComputedStyle(t);return{width:Number.parseFloat(e)||0,height:Number.parseFloat(n)||0}}async show(t){this.toggleTimeoutId||!t||this.isOpen()||(this.anchorRef=t,this.host.showPopover())}async hide(){!this.toggleTimeoutId&&this.isOpen()&&(this.anchorRef=null,this.host.hidePopover(),this.postHide.emit())}async toggle(t,e){const n=this.isOpen();if(!this.host||this.toggleTimeoutId)return n;const o=!0===e||void 0===e&&!n;return n===o||o&&!t?n:(this.anchorRef=o?t:null,this.host.togglePopover(e),this.toggleTimeoutId=null,this.isOpen())}async handleToggle(t){this.toggleTimeoutId=globalThis.setTimeout((()=>this.toggleTimeoutId=null),10),"open"===t.newState?await this.handleOpen():await this.handleClose()}async handleOpen(){this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:!this.hasBeenOpened}),await this.updatePosition(!0),this.startAutoUpdate();try{await this.runOpenAnimation()}catch{return}this.postToggle.emit({isOpen:!0}),this.postShow.emit({first:!this.hasBeenOpened}),this.hasBeenOpened=!0}async runOpenAnimation(){const t=this.getContent();t&&(this.runningAnimation=function(t){if(t)return t.animate([{transform:"scale(0.9)",opacity:0},{transform:"scale(1)",opacity:1}],{duration:250,easing:"ease-out",fill:"forwards"})}(t),await this.runningAnimation.finished)}async handleClose(){this.postBeforeToggle.emit({willOpen:!1}),this.cleanup(),this.host.style.removeProperty(xe),this.host.style.removeProperty(Se),this.host.style.removeProperty(Me),this.postToggle.emit({isOpen:!1}),this.postHide.emit()}startAutoUpdate(){this.host&&this.anchorRef&&(this.stopAutoUpdate=function(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=pt(t),u=r||i?[...c?lt(c):[],...e?lt(e):[]]:[];u.forEach((t=>{r&&t.addEventListener("scroll",n),i&&t.addEventListener("resize",n)}));const p=c&&s?function(t,e,n){let o,r=null;const i=N(t);function a(){var t;clearTimeout(o),null==(t=r)||t.disconnect(),r=null}function s(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),a();const c=t.getBoundingClientRect(),{left:u,top:p,width:d,height:w}=c;if(n||e(),!d||!w)return;const g={rootMargin:-m(p)+"px "+-m(i.clientWidth-(u+d))+"px "+-m(i.clientHeight-(p+w))+"px "+-m(u)+"px",threshold:h(0,f(1,l))||1};let v=!0;function b(e){const n=e[0].intersectionRatio;if(!Tt(c,t.getBoundingClientRect()))return s();if(n!==l){if(!v)return s();n?s(!1,n):o=setTimeout((()=>{s(!1,1e-7)}),1e3)}v=!1}try{r=new IntersectionObserver(b,{...g,root:i.ownerDocument})}catch(t){r=new IntersectionObserver(b,g)}r.observe(t)}const l=I(t),c=()=>s(n);return l.addEventListener("resize",c),s(!0),()=>{l.removeEventListener("resize",c),a()}}(c,n,i):null;let d,w=-1,g=null;a&&(g=new ResizeObserver((t=>{let[o]=t;o&&o.target===c&&g&&e&&(g.unobserve(e),cancelAnimationFrame(w),w=requestAnimationFrame((()=>{var t;null==(t=g)||t.observe(e)}))),n()})),c&&!l&&g.observe(c),e&&g.observe(e));let v=l?mt(t):null;return l&&function e(){const o=mt(t);v&&!Tt(v,o)&&n(),v=o,d=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{r&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==p||p(),null==(t=g)||t.disconnect(),g=null,l&&cancelAnimationFrame(d)}}(this.anchorRef,this.host,(()=>this.updatePosition(this.autoResize))))}async updatePosition(t=!1){const{x:e,y:n,middlewareData:o,placement:r}=await this.computePosition(t);o.hide?.referenceHidden?this.host.hidePopover():(this.side=y(r),this.host.style.left=`${e}px`,this.host.style.top=`${n}px`,o.arrow&&(this.arrowRef.style.left=o.arrow.x?`${o.arrow.x}px`:"",this.arrowRef.style.top=o.arrow.y?`${o.arrow.y}px`:"",this.arrowRef.style[Lt(this.side)]=`-${this.arrowRef.offsetWidth/2}px`),o[jt]&&this.host.style.setProperty(Me,o[jt].polygon))}async computePosition(t){const e=this.edgeGap??0,n=[kt(this.offset??(this.arrow?e+4:e)),Ht()],o=zt({padding:e,minSize:this.getContentMinSize()}),r=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=b(t,e),u={x:n,y:o},p=await i.detectOverflow(e,c),f=T(r),h=S(f);let d=u[h],m=u[f];const w=(t,e)=>v(e+p["y"===t?"top":"left"],e,e-p["y"===t?"bottom":"right"]);a&&(d=w(h,d)),s&&(m=w(f,m));const g=l.fn({...e,[h]:d,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:a,[f]:s}}}}}}({limiter:At({offset:32}),padding:e});return this.placement?.includes("-")?n.push(o,r):n.push(r,o),t&&n.push(function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:r,elements:i}=e,{apply:a=()=>{},...s}=b(t,e),l=await r.detectOverflow(e,s),c=y(n),u=x(n),p="y"===T(n),{width:d,height:m}=o.floating;let w,g;"top"===c||"bottom"===c?(w=c,g=u===(await(null==r.isRTL?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,w="end"===u?"top":"bottom");const v=m-l.top-l.bottom,S=d-l.left-l.right,M=f(m-l[w],v),E=f(d-l[g],S),k=e.middlewareData.shift;let H=M,A=E;null!=k&&k.enabled.x&&(A=S),null!=k&&k.enabled.y&&(H=v),!k&&!u&&(p?A=d-2*h(l.left,l.right):H=m-2*h(l.top,l.bottom)),await a({...e,availableWidth:A,availableHeight:H});const O=await r.getDimensions(i.floating);return d!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}}({padding:e,apply({availableWidth:t,availableHeight:e,elements:n}){n.floating.style.setProperty(xe,`${Math.max(0,t)}px`),n.floating.style.setProperty(Se,`${Math.max(0,e)}px`)}})),this.arrow&&n.push((t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s,middlewareData:l}=e,{element:c,padding:u=0}=b(t,e)||{};if(null==c)return{};const p=z(u),h={x:n,y:o},d=E(r),m=M(d),w=await a.getDimensions(c),g="y"===d,y=g?"top":"left",S=g?"bottom":"right",T=g?"clientHeight":"clientWidth",k=i.reference[m]+i.reference[d]-h[d]-i.floating[m],H=h[d]-i.reference[d],A=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let O=A?A[T]:0;O&&await(null==a.isElement?void 0:a.isElement(A))||(O=s.floating[T]||i.floating[m]);const L=k/2-H/2,C=O/2-w[m]/2-1,R=f(p[y],C),D=f(p[S],C),$=O-w[m]-D,j=O/2-w[m]/2+L,F=v(R,j,$),W=!l.arrow&&null!=x(r)&&j!==F&&i.reference[m]/2-(j<R?R:D)-w[m]/2<0,P=W?j<R?j-R:j-$:0;return{[d]:h[d]+P,data:{[d]:F,centerOffset:j-F-P,...W&&{alignmentOffset:P}},reset:W}}}))({element:this.arrowRef,padding:e})),this.safeSpace&&n.push({name:jt,async fn(t){const{placement:e,rects:n,x:o,y:r}=t,i=y(e),a=await Ft(t,n.reference),s=[...Wt(await Ft(t,{...n.floating,x:o,y:r}),Lt(i)),...Wt(a,i)],l=[];for(let t=0;t<s.length;t+=2)l.push(`${s[t]}px ${s[t+1]}px`);return{data:{polygon:`polygon(${l.join(", ")})`}}}}),this.autoHide&&n.push(function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...i}=b(t,e);switch(r){case"referenceHidden":{const t=j(await o.detectOverflow(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:F(t)}}}case"escaped":{const t=j(await o.detectOverflow(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:F(t)}}}default:return{}}}}}({strategy:"referenceHidden"})),i=this.anchorRef,a=this.host,s={placement:this.placement??"top",strategy:"fixed",middleware:n},s??={},((t,e,n)=>{const o=new Map,r=null!=n?n:{},i={...Mt,...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:$},l=await(null==a.isRTL?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:p}=D(c,o,l),f=o,h=0;const d={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:w,fn:g}=m,{x:v,y:b,data:y,reset:x}=await g({x:u,y:p,initialPlacement:o,placement:f,strategy:r,middlewareData:d,rects:c,platform:s,elements:{reference:t,floating:e}});u=null!=v?v:u,p=null!=b?b:p,d[w]={...d[w],...y},x&&h<50&&(h++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):x.rects),({x:u,y:p}=D(c,f,l))),n=-1)}return{x:u,y:p,placement:f,strategy:r,middlewareData:d}})(t,e,{...r,platform:i})})(i,a,{...s,platform:{...$t,...s.platform,[Dt]:new Map}});var i,a,s}render(){return r(i,{key:"d48b21174f74b790f8a72b4294e9f741c3b64d14","data-version":s,popover:"auto"},r("div",{key:"455e84294ecb36e25cc62582eb6c41058f24f6bc",part:"post-popovercontainer-content"},this.arrow&&r("span",{key:"9d11f2596443876123eeaf5a02430d049c1c8b25","data-side":this.side,class:"arrow",ref:t=>this.arrowRef=t}),r("span",{key:"a562460cdfa5539e7d9c23f1d044a2c045df5b9f",part:"post-popovercontainer-border-mask"}),r("slot",{key:"5aa546bbdf6c70e2a0afabf818d421581060f8a7"})))}get host(){return this}static get style(){return'@layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host [part=post-popovercontainer-content]{box-sizing:border-box;box-shadow:var(--post-device-elevation-300);width:max-content;max-width:var(--post-popovercontainer-available-width);max-height:var(--post-popovercontainer-available-height);color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative;display:flex}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host [part=post-popovercontainer-content]{border:2px solid rgba(0,0,0,0)}}:host [part=post-popovercontainer-border-mask]{display:none;position:absolute;inset:0;border-radius:4px;pointer-events:none}:host .arrow{--post-popovercontainer-arrow-border: var(--post-popovercontainer-arrow-border-width, 0px) solid var(--post-popovercontainer-arrow-border-color, transparent);position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:host .arrow[data-side=top]{border-bottom-right-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}:host .arrow[data-side=right]{border-bottom-left-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[data-side=bottom]{border-top-left-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[data-side=left]{border-top-right-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .arrow[data-side=top]{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:host .arrow[data-side=left]{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:host .arrow[data-side=right]{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:host .arrow[data-side=bottom]{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}:host([tooltip]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host([safe-space])::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:auto;clip-path:var(--post-popovercontainer-safe-space, polygon(0 0, 0 0, 0 0))}:host(:not(:has(.arrow)))>div{box-shadow:var(--post-device-elevation-300)}:host(:has(.arrow))>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[data-side=top]))>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[data-side=left]))>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[data-side=right]))>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}'}},[257,"post-popovercontainer",{placement:[1],edgeGap:[2,"edge-gap"],offset:[2],arrow:[4],safeSpace:[516,"safe-space"],autoHide:[4,"auto-hide"],autoResize:[4,"auto-resize"],side:[32],show:[64],hide:[64],toggle:[64]}]);function Ee(){"undefined"!=typeof customElements&&["post-popovercontainer"].forEach((t=>{"post-popovercontainer"===t&&(customElements.get(a(t))||customElements.define(a(t),Te))}))}ye([l(u)],Te.prototype,"placement",void 0),ye([c("number")],Te.prototype,"edgeGap",void 0);export{Te as P,u as a,Ee as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as s,createEvent as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as s,createEvent as o,h as e,Host as i,transformTag as r}from"@stencil/core/internal/client";import{v as n}from"./package.js";import{b as a}from"./breakpoints.js";import{g as l}from"./get-focusable-children.js";import{i as c}from"./is-focus-visible.js";import{d as h}from"./post-closebutton2.js";import{d}from"./post-icon2.js";import{R as p}from"./required.js";import{T as u}from"./type.js";import{O as m}from"./one-of.js";var f=function(t,s,o,e){var i,r=arguments.length,n=r<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,o):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,o,e);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(n=(r<3?i(n):r>3?i(s,o,n):i(s,o))||n);return r>3&&n&&Object.defineProperty(s,o,n),n};const g=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postToggle=o(this,"postToggle",7),this.device=a.get("device"),this.size="large",this.breakpointChange=t=>{this.device=t.detail,"desktop"===this.device&&(this.dialog?.open&&this.dialog.close(),this.postToggle.emit(!1))},this.handleKeyDown=t=>{if("Escape"!==t.key)return;const s=this.collapsible;s&&!s.collapsed&&(t.preventDefault(),t.stopPropagation(),s.toggle(!1),this.collapsibleTrigger?.querySelector("button")?.focus())},this.handleDialogClick=t=>{t.composedPath().some((t=>t instanceof HTMLAnchorElement))&&this.dialog.close()}}connectedCallback(){globalThis.addEventListener("postBreakpoint:device",this.breakpointChange),this.host.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){globalThis.removeEventListener("postBreakpoint:device",this.breakpointChange),this.host.removeEventListener("keydown",this.handleKeyDown)}get dialog(){return this.host.shadowRoot?.querySelector("dialog")}get collapsibleTrigger(){return document.activeElement?.closest("post-collapsible-trigger")??null}get collapsible(){return this.collapsibleTrigger?.querySelector(":scope > post-collapsible")??null}async toggle(){if("desktop"!==this.device)return this.dialog?.open?this.hide():this.show()}async show(){if("desktop"===this.device)return;const t=c(document.activeElement);this.dialog.showModal(),this.postToggle.emit(!0),t&&this.focusNav()}async hide(){"desktop"!==this.device&&this.dialog.close()}focusNav(){const t=this.host.shadowRoot?.querySelector("slot"),s=t?.assignedElements({flatten:!0})[0];if(!s)return;const[o]=l(s);o?.focus()}renderNav(){return e("slot",null)}renderDialog(){return e("dialog",{onClick:this.handleDialogClick,onClose:()=>{this.postToggle.emit(!1)}},e("slot",null),e("post-closebutton",{onClick:()=>this.hide()},this.textClose))}render(){return e(i,{key:"742833fbbbc716630d5fc5cc6289e44e3d05ee17","data-version":n},"desktop"===this.device?this.renderNav():this.renderDialog())}get host(){return this}static get style(){return":host{display:flex}:host,:host dialog{background-color:var(--post-scheme-color-palette-bg-2);border-inline-end:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-interactive-primary-enabled-stroke4)}:host dialog{overflow:visible;width:var(--post-core-dimension-296);bottom:auto;right:auto;border:none;padding:0;max-height:100dvh;transform:translateX(-100%);transition-property:transform,overlay,display;transition-behavior:allow-discrete;transition-duration:350ms;box-shadow:var(--post-device-elevation-300)}:host dialog:focus,:host dialog:focus-visible{outline:none}:host dialog[open]{transform:translateX(0)}@starting-style{:host dialog[open]{transform:translateX(-100%)}}@media (prefers-reduced-motion: reduce){:host dialog{transition:none}}:host post-closebutton{transform:translate(50%, 0)}"}},[257,"post-side-navigation",{textClose:[513,"text-close"],size:[1],device:[32],toggle:[64],show:[64],hide:[64]}]);f([p(),u("string")],g.prototype,"textClose",void 0),f([m(["large","small"])],g.prototype,"size",void 0);const b=g,v=function(){"undefined"!=typeof customElements&&["post-side-navigation","post-closebutton","post-icon"].forEach((t=>{switch(t){case"post-side-navigation":customElements.get(r(t))||customElements.define(r(t),g);break;case"post-closebutton":customElements.get(r(t))||h();break;case"post-icon":customElements.get(r(t))||d()}}))};export{b as PostSideNavigation,v as defineCustomElement}
|