@swisspost/design-system-components 10.0.0-next.69 → 10.0.0-next.70
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/{package-CzSn3NmD.js → package-Ds_LS1pB.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +1 -1
- package/dist/cjs/post-autocomplete.cjs.entry.js +1 -1
- package/dist/cjs/post-avatar.cjs.entry.js +1 -1
- package/dist/cjs/post-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/post-banner.cjs.entry.js +1 -1
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/post-closebutton_14.cjs.entry.js +15 -15
- package/dist/cjs/post-collapsible_2.cjs.entry.js +1 -1
- package/dist/cjs/post-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/post-footer.cjs.entry.js +3 -3
- package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
- package/dist/cjs/post-listbox-option.cjs.entry.js +3 -3
- package/dist/cjs/post-listbox.cjs.entry.js +2 -2
- package/dist/cjs/post-login-widget.cjs.entry.js +2 -2
- package/dist/cjs/post-number-input.cjs.entry.js +3 -3
- package/dist/cjs/post-pagination.cjs.entry.js +1 -1
- package/dist/cjs/post-popover-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/post-stepper-item.cjs.entry.js +2 -2
- package/dist/cjs/post-stepper.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-item.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-footer/post-footer.js +2 -1
- package/dist/collection/components/post-header/post-header.js +4 -4
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-listbox/post-listbox.js +1 -1
- package/dist/collection/components/post-listbox-option/post-listbox-option.js +2 -2
- package/dist/collection/components/post-login-widget/post-login-widget.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
- package/dist/collection/components/post-menu/post-menu.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-number-input/post-number-input.js +2 -2
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +2 -2
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-stepper/post-stepper.js +1 -1
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
- package/dist/collection/components/post-tab-item/post-tab-item.js +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +2 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-footer.js +1 -1
- package/dist/components/post-header.js +1 -1
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-linkarea.js +1 -1
- package/dist/components/post-listbox-option.js +1 -1
- package/dist/components/post-listbox.js +1 -1
- package/dist/components/post-login-widget.js +1 -1
- package/dist/components/post-logo.js +1 -1
- package/dist/components/post-mainnavigation.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-trigger2.js +1 -1
- package/dist/components/post-menu2.js +1 -1
- package/dist/components/post-number-input.js +1 -1
- package/dist/components/post-popover-trigger.js +1 -1
- package/dist/components/post-popover.js +1 -1
- package/dist/components/post-popovercontainer2.js +1 -1
- package/dist/components/post-rating.js +1 -1
- package/dist/components/post-stepper-item.js +1 -1
- package/dist/components/post-stepper.js +1 -1
- package/dist/components/post-tab-item.js +1 -1
- package/dist/components/post-tab-panel.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-togglebutton2.js +1 -1
- package/dist/components/post-tooltip-trigger.js +1 -1
- package/dist/components/post-tooltip.js +1 -1
- package/dist/components/react/{p-B4tq6hiA.js → p-B076QoO3.js} +1 -1
- package/dist/components/react/{p-DwJ5SwpN.js → p-B2iQay0-.js} +1 -1
- package/dist/components/react/{p-HNUXY1z7.js → p-B_RL4AOE.js} +1 -1
- package/dist/components/react/p-BoFDru4R.js +1 -0
- package/dist/components/react/{p-D1KBbwmi.js → p-BuL0WAoF.js} +1 -1
- package/dist/components/react/{p-DRtzK3cr.js → p-C8b6-YQl.js} +1 -1
- package/dist/components/react/{p-BYfHrHCb.js → p-Cu9RsvYK.js} +1 -1
- package/dist/components/react/{p-Bj33xnuq.js → p-D6uA8DbL.js} +1 -1
- package/dist/components/react/{p-DAIxJysJ.js → p-DSSN7xW4.js} +1 -1
- package/dist/components/react/p-DW7sbg9f.js +1 -0
- package/dist/components/react/{p-De_QjSNJ.js → p-DgdnwpId.js} +1 -1
- package/dist/components/react/{p-BbOp03Tv.js → p-Dmnnz3fB.js} +1 -1
- package/dist/components/react/{p-UY924tHr.js → p-tpgRP2Dr.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-login-widget.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-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 +9 -1
- package/dist/esm/package-DW7sbg9f.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +1 -1
- package/dist/esm/post-autocomplete.entry.js +1 -1
- package/dist/esm/post-avatar.entry.js +1 -1
- package/dist/esm/post-back-to-top.entry.js +1 -1
- package/dist/esm/post-banner.entry.js +1 -1
- package/dist/esm/post-breadcrumb-item.entry.js +1 -1
- package/dist/esm/post-breadcrumbs.entry.js +1 -1
- package/dist/esm/post-closebutton_14.entry.js +15 -15
- package/dist/esm/post-collapsible_2.entry.js +1 -1
- package/dist/esm/post-date-picker.entry.js +1 -1
- package/dist/esm/post-footer.entry.js +3 -3
- package/dist/esm/post-linkarea.entry.js +2 -2
- package/dist/esm/post-listbox-option.entry.js +3 -3
- package/dist/esm/post-listbox.entry.js +2 -2
- package/dist/esm/post-login-widget.entry.js +2 -2
- package/dist/esm/post-number-input.entry.js +3 -3
- package/dist/esm/post-pagination.entry.js +1 -1
- package/dist/esm/post-popover-trigger.entry.js +2 -2
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/post-stepper-item.entry.js +2 -2
- package/dist/esm/post-stepper.entry.js +2 -2
- package/dist/esm/post-tab-item.entry.js +2 -2
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/post-tooltip-trigger.entry.js +2 -2
- package/dist/esm/post-tooltip.entry.js +2 -2
- package/dist/post-components/{p-f88a161a.entry.js → p-092f8795.entry.js} +1 -1
- package/dist/post-components/{p-500a3fc7.entry.js → p-17ccebe6.entry.js} +1 -1
- package/dist/post-components/{p-d57462a3.entry.js → p-1d58bec1.entry.js} +1 -1
- package/dist/post-components/{p-8b68164f.entry.js → p-25c28493.entry.js} +1 -1
- package/dist/post-components/p-29ada3d7.entry.js +1 -0
- package/dist/post-components/{p-95df4d4e.entry.js → p-2fcca5ec.entry.js} +1 -1
- package/dist/post-components/{p-0992cba9.entry.js → p-3cefd49e.entry.js} +1 -1
- package/dist/post-components/{p-220d0eab.entry.js → p-3fea238c.entry.js} +1 -1
- package/dist/post-components/{p-0c249c71.entry.js → p-5068ae7e.entry.js} +1 -1
- package/dist/post-components/{p-cca0cf23.entry.js → p-521178f5.entry.js} +1 -1
- package/dist/post-components/p-534fed55.entry.js +1 -0
- package/dist/post-components/{p-5664d5b5.entry.js → p-570d64dd.entry.js} +1 -1
- package/dist/post-components/{p-dfe811cc.entry.js → p-5f52cba3.entry.js} +1 -1
- package/dist/post-components/{p-c95fcb40.entry.js → p-77d5e17b.entry.js} +1 -1
- package/dist/post-components/{p-52f85cba.entry.js → p-86697a58.entry.js} +1 -1
- package/dist/post-components/{p-906b669b.entry.js → p-987bebe8.entry.js} +1 -1
- package/dist/post-components/{p-272de102.entry.js → p-9ca5c297.entry.js} +1 -1
- package/dist/post-components/{p-1e28d279.entry.js → p-9ea3066f.entry.js} +1 -1
- package/dist/post-components/p-DW7sbg9f.js +1 -0
- package/dist/post-components/{p-cd6684e1.entry.js → p-a6fc33fa.entry.js} +1 -1
- package/dist/post-components/{p-30e5bc99.entry.js → p-ac853d6b.entry.js} +1 -1
- package/dist/post-components/p-bd09bc20.entry.js +1 -0
- package/dist/post-components/p-c2e05ba0.entry.js +1 -0
- package/dist/post-components/{p-d99bdef2.entry.js → p-c55b537b.entry.js} +1 -1
- package/dist/post-components/p-dded4f13.entry.js +1 -0
- package/dist/post-components/{p-6644e626.entry.js → p-e6ba44b1.entry.js} +1 -1
- package/dist/post-components/{p-fc2882a8.entry.js → p-ead1094e.entry.js} +1 -1
- package/dist/post-components/{p-9fab1847.entry.js → p-f12e59a0.entry.js} +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-footer/post-footer.d.ts +1 -0
- package/hydrate/index.js +36 -35
- package/hydrate/index.mjs +36 -35
- package/package.json +4 -4
- package/dist/components/react/p-B4l5EAoq.js +0 -1
- package/dist/components/react/p-CfQqdIV2.js +0 -1
- package/dist/esm/package-B4l5EAoq.js +0 -3
- package/dist/post-components/p-5ade4255.entry.js +0 -1
- package/dist/post-components/p-694e76be.entry.js +0 -1
- package/dist/post-components/p-92e4a7f7.entry.js +0 -1
- package/dist/post-components/p-B4l5EAoq.js +0 -1
- package/dist/post-components/p-c70cad6e.entry.js +0 -1
- package/dist/post-components/p-f14ca918.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,h as i,a as e,t as o}from"./index.js";import{v as a}from"./p-
|
|
1
|
+
import{p as t,H as s,h as i,a as e,t as o}from"./index.js";import{v as a}from"./p-DW7sbg9f.js";import{c as r}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{E as l}from"./p-rEfV4v4a.js";import{g as c}from"./p-08F-DB-d.js";const n=t(class extends s{validateAriaAttributes(){r(this,"for","string")}constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.observer=new MutationObserver((()=>this.setTrigger())),this.handlePostToggle=this.handlePostToggle.bind(this)}connectedCallback(){this.root=c(this.host),this.root.addEventListener("postToggle",this.handlePostToggle),this.observer.observe(this.host,{childList:!0,subtree:!0})}componentDidLoad(){this.setTrigger(),this.trigger||console.warn("The post-collapsible-trigger must contain a button."),this.validateAriaAttributes()}disconnectedCallback(){this.observer.disconnect(),this.root?.removeEventListener("postToggle",this.handlePostToggle)}async update(){this.updateAriaAttributes()}handlePostToggle(t){this.trigger&&this.trigger.setAttribute("aria-expanded",`${t.detail}`)}updateAriaAttributes(){if(!this.trigger)return;const t=this.trigger.getAttribute("aria-controls");t?.includes(this.for)||this.trigger.setAttribute("aria-controls",t?`${t} ${this.for}`:this.for);const s=this.collapsible?.collapsed;this.trigger.setAttribute("aria-expanded",`${void 0!==s?!s:void 0}`)}async toggleCollapsible(){await(this.collapsible?.toggle())}get collapsible(){const t=this.root.getElementById(this.for);return t&&"post-collapsible"===t.localName?t:null}setTrigger(){const t=this.host.querySelector("button");!t||this.trigger&&t.isEqualNode(this.trigger)||(this.trigger=t,this.trigger.addEventListener("click",(()=>this.toggleCollapsible())),this.updateAriaAttributes())}render(){return i(e,{key:"a4d1613dc3cbcfa627f920275eb3508939b63609","data-version":a},i("slot",{key:"baa22c46a7a982afcd09253daa95f68f1709d509"}))}get host(){return this}static get watchers(){return{for:[{validateAriaAttributes:0}]}}},[257,"post-collapsible-trigger",{for:[513],update:[64]},void 0,{for:[{validateAriaAttributes:0}]}]);function h(){"undefined"!=typeof customElements&&["post-collapsible-trigger"].forEach((t=>{"post-collapsible-trigger"===t&&(customElements.get(o(t))||customElements.define(o(t),n))}))}(function(t,s,i,e){var o,a=arguments.length,r=a<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,i,e);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(r=(a<3?o(r):a>3?o(s,i,r):o(s,i))||r);a>3&&r&&Object.defineProperty(s,i,r)})([l("post-collapsible")],n.prototype,"handlePostToggle",null),h();export{n as P,h as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as o,H as e,h as t,a as i,t as c}from"./index.js";import{v as a}from"./p-
|
|
1
|
+
import{p as o,H as e,h as t,a as i,t as c}from"./index.js";import{v as a}from"./p-DW7sbg9f.js";import{H as s}from"./p-r4txK0AC.js";import{d as r}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{E as n}from"./p-rEfV4v4a.js";import{n as d}from"./p-nA1BKco0.js";import{d as l}from"./p-BoFDru4R.js";import{d as p}from"./p-C8b6-YQl.js";import{d as b}from"./p-B_RL4AOE.js";const h=o(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.collapsed=!1}validateHeadingLevel(){r(this,"headingLevel",s)}componentWillLoad(){this.id=this.host.id||`p${d(6)}`}componentDidLoad(){this.validateHeadingLevel()}onCollapseToggle(o){this.collapsed=!o.detail}async toggle(o){return this.collapsible.toggle(o)}onSlotLogoChange(){this.slottedLogo=this.host.querySelector('img[slot="logo"]')}componentWillRender(){this.slottedLogo=this.host.querySelector('img[slot="logo"]')}render(){const o=this.host.closest("post-accordion")?.getAttribute("heading-level");return t(i,{key:"cd8271355068aecc392d4bcf588274376fed789f",id:this.id,"data-version":a},t("post-collapsible-trigger",{key:"598a9f0df7f536ffba45c2c634b87840785e244f",for:`${this.id}--collapse`},t(`h${o??this.headingLevel??2}`,{key:"d04482b9310440102fb6ed454bec2247648b57f2",class:"accordion-header",id:`${this.id}--header`},t("button",{key:"3982fe310732d13ac32e09791278f0748eb99477",type:"button",class:"accordion-button"+(this.collapsed?" collapsed":""),part:"post-accordion-button"},t("span",{key:"e2e44601a4a73cac5b665b65f6f93e4836ce4729",class:{"logo-container":!0,"has-image":!!this.slottedLogo}},t("slot",{key:"e716b961b7222d1ef9eeaf19217c72aad5b261be",name:"logo",onSlotchange:this.onSlotLogoChange.bind(this)})),t("slot",{key:"d0c59213d1cbd8d1080bdcbf7fce875a0c02d8bc",name:"header"}),t("post-icon",{key:"a9d06bcfccf25de71a450ffc23081a22ba11d5c7",name:"chevronup"})))),t("post-collapsible",{key:"3fb6fd19baedbbfb6327bb568a203c4c1ecb1bdc",id:`${this.id}--collapse`,collapsed:this.collapsed,ref:o=>this.collapsible=o},t("div",{key:"5f50dc6a48dbc4a74780ff7bd54132f7ddaeeabb",class:"accordion-body",part:"post-accordion-body"},t("slot",{key:"f548651ab3ff5133117cd612964f1426086b5349"}))))}get host(){return this}static get watchers(){return{headingLevel:[{validateHeadingLevel:0}]}}static get style(){return':host{display:block;border-block-end:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}:host:has(.accordion-button:hover){border-block-end-color:var(--post-scheme-color-interactive-primary-hover-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host:has(.accordion-button:hover){border-block-end-color:Highlight}}:host([collapsed]) .accordion-button post-icon{transform:rotate(-180deg)}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-extra-black)}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;display:flex;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding-block:var(--post-device-spacing-padding-19);padding-inline:var(--post-device-spacing-padding-5);border-block-end:var(--post-device-border-width-default) var(--post-core-border-style-solid) rgba(0,0,0,0);cursor:pointer;outline:none !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button{background-color:ButtonFace !important}.accordion-button:hover{background-color:Highlight !important}}.accordion-button::before{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}.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{outline-style:var(--post-core-border-style-solid) !important;display:block;content:"";position:absolute;inset:calc(var(--post-device-border-width-default)*-1) 0 calc(var(--post-device-border-width-default)*-1);border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus)::before{outline-style:var(--post-core-border-style-solid) !important;display:block;content:"";position:absolute;inset:calc(var(--post-device-border-width-default)*-1) 0 calc(var(--post-device-border-width-default)*-1);border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus)::before{outline-color:Highlight !important}}}.accordion-button slot::slotted(span[slot=header]){flex-grow:1}.accordion-button post-icon{flex:none;width:var(--post-core-dimension-24);aspect-ratio:1;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1);transform:var(--post-accordion-icon-initial-transform, none)}.accordion-button.collapsed{padding-block-start:var(--post-device-spacing-padding-19);padding-block-end:var(--post-device-spacing-padding-19)}.accordion-button.collapsed post-icon{transform:rotate(-180deg)}.accordion-button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.accordion-button>::slotted(.text-truncate){display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover,.accordion-button:focus-visible{color:Highlight}}post-collapsible{margin-block-end:calc(var(--post-device-border-width-default)*-1)}.accordion-body{padding-block-start:var(--post-device-spacing-padding-15);padding-block-end:var(--post-device-spacing-padding-block-25);padding-inline:var(--post-device-spacing-padding-5)}.logo-container{display:none;width:var(--post-device-sizing-logo-1);aspect-ratio:1}.logo-container.has-image{display:block}.logo-container slot::slotted(img){display:block;width:100%;height:100%;object-fit:cover}.accordion-button>::slotted(:first-child),.accordion-body>::slotted(:first-child){margin-block-start:0 !important}.accordion-button>::slotted(:last-child),.accordion-body>::slotted(:last-child){margin-block-end:0 !important}'}},[257,"post-accordion-item",{collapsed:[1540],headingLevel:[2,"heading-level"],id:[32],slottedLogo:[32],toggle:[64]},[[2,"postToggle","onCollapseToggle"]],{headingLevel:[{validateHeadingLevel:0}]}]);function g(){"undefined"!=typeof customElements&&["post-accordion-item","post-collapsible","post-collapsible-trigger","post-icon"].forEach((o=>{switch(o){case"post-accordion-item":customElements.get(c(o))||customElements.define(c(o),h);break;case"post-collapsible":customElements.get(c(o))||l();break;case"post-collapsible-trigger":customElements.get(c(o))||p();break;case"post-icon":customElements.get(c(o))||b()}}))}(function(o,e,t,i){var c,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(o,e,t,i);else for(var r=o.length-1;r>=0;r--)(c=o[r])&&(s=(a<3?c(s):a>3?c(e,t,s):c(e,t))||s);a>3&&s&&Object.defineProperty(e,t,s)})([n("post-accordion-item")],h.prototype,"onCollapseToggle",null),g();export{h as P,g as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,t,H as s,h as o,a as i}from"./index.js";import{v as a}from"./p-
|
|
1
|
+
import{p as e,t,H as s,h as o,a as i}from"./index.js";import{v as a}from"./p-DW7sbg9f.js";import{H as r}from"./p-r4txK0AC.js";import{b as l}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{E as c}from"./p-rEfV4v4a.js";const n=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expandedItems=new Set,this.multiple=!1}validateHeadingLevel(){l(this,"headingLevel",r),this.accordionItems.forEach((e=>{e.setAttribute("heading-level",String(this.headingLevel))}))}componentWillLoad(){this.registerAccordionItems()}componentDidLoad(){this.validateHeadingLevel()}collapseToggleHandler(e){const t=e.target,s=this.expandedItems.has(t);s?this.expandedItems.delete(t):this.expandedItems.add(t),this.multiple||s||Array.from(this.expandedItems.values()).filter((e=>e!==t)).forEach((e=>{e.toggle(!1)}))}async toggle(e){const t=this.accordionItems.find((t=>t.id===e));if(!t)throw new Error(`No post-accordion-item found with id #${e}.`);await t.toggle()}async expandAll(){this.multiple?await Promise.all(this.accordionItems.map((e=>e.toggle(!0)))):0===this.expandedItems.size&&await this.accordionItems[0].toggle(!0)}async collapseAll(){await Promise.all(this.accordionItems.map((e=>e.toggle(!1))))}registerAccordionItems(){this.accordionItems=Array.from(this.host.querySelectorAll("post-accordion-item")),this.accordionItems.filter((e=>!e.collapsed||this.expandedItems.has(e))).forEach(((e,t)=>{this.multiple||0===t?this.expandedItems.add(e):e.setAttribute("collapsed","")}))}render(){return o(i,{key:"fa37ee5b4611a84d273229955bcf624e53120022","data-version":a},o("div",{key:"0884dc3582eb768c6dd4959168d7e9a9b4195c3c",class:"accordion"},o("slot",{key:"f6d81d89aca513094ac5c1d531ed9d63f7b93730",onSlotchange:()=>this.registerAccordionItems()})))}get host(){return this}static get watchers(){return{headingLevel:[{validateHeadingLevel:0}]}}static get style(){return":host{display:block;border-block-start:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}"}},[257,"post-accordion",{headingLevel:[514,"heading-level"],multiple:[516],toggle:[64],expandAll:[64],collapseAll:[64]},[[0,"postToggle","collapseToggleHandler"]],{headingLevel:[{validateHeadingLevel:0}]}]);function d(){"undefined"!=typeof customElements&&["post-accordion"].forEach((e=>{"post-accordion"===e&&(customElements.get(t(e))||customElements.define(t(e),n))}))}(function(e,t,s,o){var i,a=arguments.length,r=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,o);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(a<3?i(r):a>3?i(t,s,r):i(t,s))||r);a>3&&r&&Object.defineProperty(t,s,r)})([c("post-accordion-item")],n.prototype,"collapseToggleHandler",null),d();export{n as P,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as o,h as i,a as r}from"./index.js";import{v as n}from"./p-B4l5EAoq.js";import{d as a,b as c}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{d as s}from"./p-HNUXY1z7.js";const d=["button","submit","reset"],b=["manual","auto"],l=["default","small"],v=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.mutationObserver=new MutationObserver(this.checkContent.bind(this)),this.buttonType="button",this.placement="auto",this.size="default"}validateButtonType(){a(this,"buttonType",d)}validatePlacement(){c(this,"placement",b)}validateSize(){c(this,"size",l)}componentDidLoad(){this.checkContent()}connectedCallback(){this.mutationObserver.observe(this.host,{childList:!0,characterData:!0,subtree:!0})}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}checkContent(){this.validateButtonType(),this.validatePlacement(),this.validateSize(),this.host.querySelector(".visually-hidden").textContent||console.error(`The \`${this.host.localName}\` component requires content for accessibility.`)}render(){return i(r,{key:"33c801f2e342363d6361f19e65793a4164d45f81","data-version":n},i("button",{key:"2fa8ae3a3e57cc971a99648d66612e13bc526e92",type:this.buttonType,class:"btn btn-icon btn-secondary btn-sm"},i("post-icon",{key:"5ac2821cdd342115e73b13f692bd7180edab82a8","aria-hidden":"true",name:"closex"}),i("span",{key:"5eb97879647ef8c866bfdf6cd0819477a13907bc",class:"visually-hidden"},i("slot",{key:"80eac1979c78526078d57a8398e04824420b7983"}))))}get host(){return this}static get watchers(){return{buttonType:[{validateButtonType:0}],placement:[{validatePlacement:0}],size:[{validateSize: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-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:hover{text-decoration:none}.btn:disabled{border-style:var(--post-core-border-style-dash)}.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:is(a){color:LinkText;border:unset}.btn:is(button){background-color:ButtonFace !important;border:1px solid ButtonBorder !important}.btn:not(:disabled,.disabled):is(button):hover{background-color:Highlight !important}.btn:not(:disabled,.disabled):is(button):hover>post-icon{color:HighlightText !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);background-color:var(--post-scheme-color-interactive-button-primary-enabled-bg);color:var(--post-scheme-color-interactive-button-primary-enabled-fg)}.btn-primary:disabled{border-color:var(--post-scheme-color-interactive-button-primary-disabled-stroke);background-color:var(--post-scheme-color-interactive-button-primary-disabled-bg);color:var(--post-scheme-color-interactive-button-primary-disabled-fg)}.btn-primary:not(:disabled):hover,.btn-primary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-primary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-primary-hover-bg);color:var(--post-scheme-color-interactive-button-primary-hover-fg)}.btn-default{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-secondary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg)}.btn-default:disabled{border-color:var(--post-scheme-color-interactive-button-secondary-disabled-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-disabled-bg);color:var(--post-scheme-color-interactive-button-secondary-disabled-fg)}.btn-default:not(:disabled):hover,.btn-default.pretend-hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg);color:var(--post-scheme-color-interactive-button-secondary-hover-fg)}.btn-secondary{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-secondary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg)}.btn-secondary:disabled{border-color:var(--post-scheme-color-interactive-button-secondary-disabled-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-disabled-bg);color:var(--post-scheme-color-interactive-button-secondary-disabled-fg)}.btn-secondary:not(:disabled):hover,.btn-secondary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg);color:var(--post-scheme-color-interactive-button-secondary-hover-fg)}.btn-tertiary{border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}.btn-tertiary:disabled{border-color:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-disabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-disabled-fg)}.btn-tertiary:not(:disabled):hover,.btn-tertiary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.btn-link{border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}.btn-link:disabled{border-color:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-disabled-bg);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);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);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:var(--post-device-border-radius-focus);min-height:0;font-size:inherit;font-weight:inherit;padding:0}.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)}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-closebutton[size=small] .btn{height:var(--post-device-sizing-interactive-button-height-7);width:var(--post-device-sizing-interactive-button-height-7)}post-closebutton:not([placement]),post-closebutton[placement=auto]{position:absolute;inset-block-start:0;inset-inline-end:0;transform:translate(50%, -50%)}post-closebutton .btn{background-color:var(--post-scheme-color-interactive-primary-enabled-bg1)}post-closebutton .btn:not(:disabled):hover,post-closebutton .btn.pretend-hover{background-color:var(--post-scheme-color-interactive-primary-hover-bg)}"}},[260,"post-closebutton",{buttonType:[1,"button-type"],placement:[513],size:[513]},void 0,{buttonType:[{validateButtonType:0}],placement:[{validatePlacement:0}],size:[{validateSize:0}]}]);function h(){"undefined"!=typeof customElements&&["post-closebutton","post-icon"].forEach((e=>{switch(e){case"post-closebutton":customElements.get(t(e))||customElements.define(t(e),v);break;case"post-icon":customElements.get(t(e))||s()}}))}h();export{v as P,h as d}
|
|
1
|
+
import{t,p as e,H as o,h as i,a as r}from"./index.js";import{v as n}from"./p-DW7sbg9f.js";import{d as a,b as c}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{d as s}from"./p-B_RL4AOE.js";const d=["button","submit","reset"],b=["manual","auto"],l=["default","small"],v=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.mutationObserver=new MutationObserver(this.checkContent.bind(this)),this.buttonType="button",this.placement="auto",this.size="default"}validateButtonType(){a(this,"buttonType",d)}validatePlacement(){c(this,"placement",b)}validateSize(){c(this,"size",l)}componentDidLoad(){this.checkContent()}connectedCallback(){this.mutationObserver.observe(this.host,{childList:!0,characterData:!0,subtree:!0})}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}checkContent(){this.validateButtonType(),this.validatePlacement(),this.validateSize(),this.host.querySelector(".visually-hidden").textContent||console.error(`The \`${this.host.localName}\` component requires content for accessibility.`)}render(){return i(r,{key:"33c801f2e342363d6361f19e65793a4164d45f81","data-version":n},i("button",{key:"2fa8ae3a3e57cc971a99648d66612e13bc526e92",type:this.buttonType,class:"btn btn-icon btn-secondary btn-sm"},i("post-icon",{key:"5ac2821cdd342115e73b13f692bd7180edab82a8","aria-hidden":"true",name:"closex"}),i("span",{key:"5eb97879647ef8c866bfdf6cd0819477a13907bc",class:"visually-hidden"},i("slot",{key:"80eac1979c78526078d57a8398e04824420b7983"}))))}get host(){return this}static get watchers(){return{buttonType:[{validateButtonType:0}],placement:[{validatePlacement:0}],size:[{validateSize: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-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:hover{text-decoration:none}.btn:disabled{border-style:var(--post-core-border-style-dash)}.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:is(a){color:LinkText;border:unset}.btn:is(button){background-color:ButtonFace !important;border:1px solid ButtonBorder !important}.btn:not(:disabled,.disabled):is(button):hover{background-color:Highlight !important}.btn:not(:disabled,.disabled):is(button):hover>post-icon{color:HighlightText !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);background-color:var(--post-scheme-color-interactive-button-primary-enabled-bg);color:var(--post-scheme-color-interactive-button-primary-enabled-fg)}.btn-primary:disabled{border-color:var(--post-scheme-color-interactive-button-primary-disabled-stroke);background-color:var(--post-scheme-color-interactive-button-primary-disabled-bg);color:var(--post-scheme-color-interactive-button-primary-disabled-fg)}.btn-primary:not(:disabled):hover,.btn-primary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-primary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-primary-hover-bg);color:var(--post-scheme-color-interactive-button-primary-hover-fg)}.btn-default{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-secondary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg)}.btn-default:disabled{border-color:var(--post-scheme-color-interactive-button-secondary-disabled-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-disabled-bg);color:var(--post-scheme-color-interactive-button-secondary-disabled-fg)}.btn-default:not(:disabled):hover,.btn-default.pretend-hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg);color:var(--post-scheme-color-interactive-button-secondary-hover-fg)}.btn-secondary{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-secondary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg)}.btn-secondary:disabled{border-color:var(--post-scheme-color-interactive-button-secondary-disabled-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-disabled-bg);color:var(--post-scheme-color-interactive-button-secondary-disabled-fg)}.btn-secondary:not(:disabled):hover,.btn-secondary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg);color:var(--post-scheme-color-interactive-button-secondary-hover-fg)}.btn-tertiary{border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}.btn-tertiary:disabled{border-color:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-disabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-disabled-fg)}.btn-tertiary:not(:disabled):hover,.btn-tertiary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.btn-link{border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}.btn-link:disabled{border-color:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-disabled-bg);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);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);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:var(--post-device-border-radius-focus);min-height:0;font-size:inherit;font-weight:inherit;padding:0}.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)}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-closebutton[size=small] .btn{height:var(--post-device-sizing-interactive-button-height-7);width:var(--post-device-sizing-interactive-button-height-7)}post-closebutton:not([placement]),post-closebutton[placement=auto]{position:absolute;inset-block-start:0;inset-inline-end:0;transform:translate(50%, -50%)}post-closebutton .btn{background-color:var(--post-scheme-color-interactive-primary-enabled-bg1)}post-closebutton .btn:not(:disabled):hover,post-closebutton .btn.pretend-hover{background-color:var(--post-scheme-color-interactive-primary-hover-bg)}"}},[260,"post-closebutton",{buttonType:[1,"button-type"],placement:[513],size:[513]},void 0,{buttonType:[{validateButtonType:0}],placement:[{validatePlacement:0}],size:[{validateSize:0}]}]);function h(){"undefined"!=typeof customElements&&["post-closebutton","post-icon"].forEach((e=>{switch(e){case"post-closebutton":customElements.get(t(e))||customElements.define(t(e),v);break;case"post-icon":customElements.get(t(e))||s()}}))}h();export{v as P,h as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="10.0.0-next.70";export{t as v}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as s,H as e,h as
|
|
1
|
+
import{t,p as s,H as e,h as i,a as o}from"./index.js";import{v as n}from"./p-DW7sbg9f.js";import{c as a}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{g as r}from"./p-08F-DB-d.js";const h=s(class extends e{validateFor(){a(this,"for","string")}constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.updateAriaExpanded=this.updateAriaExpanded.bind(this)}connectedCallback(){this.root=r(this.host)}componentDidLoad(){this.validateFor(),this.setAriaAttributes(),this.root&&this.root.addEventListener("toggleMenu",this.updateAriaExpanded)}disconnectedCallback(){this.root.removeEventListener("toggleMenu",this.updateAriaExpanded)}updateAriaExpanded(t){const s=t.target;"post-menu"===s.localName&&s.id===this.for&&this.slottedButton.setAttribute("aria-expanded",t.detail.toString())}setAriaAttributes(){const t=this.host.querySelectorAll("button");1===t.length?(this.slottedButton=t.item(0),this.slottedButton.setAttribute("type","button"),this.slottedButton.setAttribute("aria-haspopup","menu"),this.slottedButton.setAttribute("aria-expanded","false"),this.slottedButton.addEventListener("click",this.handleToggle.bind(this)),this.slottedButton.addEventListener("keydown",this.handleKeyDown.bind(this))):console.warn(`The post-menu-trigger should contain exactly one button (${t.length} found).`)}handleKeyDown(t){"ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),this.handleToggle())}handleToggle(){const t=this.getMenu();t&&t.toggle(this.host)}getMenu(){const t=this.root.getElementById(this.for);return t&&"post-menu"===t.localName?t:(console.warn(`No post-menu found with ID: ${this.for}`),null)}render(){return i(o,{key:"b73b99c8a2de05ad60a9f51dfa1b88a1d2cd1d00","data-version":n},i("slot",{key:"b5082151629ba33458cb37a2415a7ed6af77463d"}))}get host(){return this}static get watchers(){return{for:[{validateFor:0}]}}static get style(){return":host{display:inline-block}"}},[257,"post-menu-trigger",{for:[513]},void 0,{for:[{validateFor:0}]}]);function d(){"undefined"!=typeof customElements&&["post-menu-trigger"].forEach((s=>{"post-menu-trigger"===s&&(customElements.get(t(s))||customElements.define(t(s),h))}))}d();export{h as P,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,c as n,h as o,a as r,t as i}from"./index.js";import{d as s,g as a}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{v as c}from"./p-B4l5EAoq.js";const l=["top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"],p=Math.min,f=Math.max,u=Math.round,h=Math.floor,d=t=>({x:t,y:t}),m={left:"right",right:"left",bottom:"top",top:"bottom"};function g(t,e,n){return f(t,p(e,n))}function v(t,e){return"function"==typeof t?t(e):t}function w(t){return t.split("-")[0]}function x(t){return t.split("-")[1]}function y(t){return"x"===t?"y":"x"}function b(t){return"y"===t?"height":"width"}function S(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function E(t){return y(S(t))}function k(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const T=["left","right"],A=["right","left"],M=["top","bottom"],O=["bottom","top"];function H(t){const e=w(t);return m[e]+t.slice(e.length)}function L(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function $(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=S(e),s=E(e),a=b(s),c=w(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}}switch(x(e)){case"start":h[s]-=u*(n&&l?-1:1);break;case"end":h[s]+=u*(n&&l?-1:1)}return h}async function P(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}=v(e,t),d=L(h),m=a[u?"floating"===f?"reference":"floating":f],g=$(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})),w="floating"===f?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},b=$(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:c}):w);return{top:(g.top-b.top+d.top)/y.y,bottom:(b.bottom-g.bottom+d.bottom)/y.y,left:(g.left-b.left+d.left)/y.x,right:(b.right-g.right+d.right)/y.x}}function F(t){const e=p(...t.map((t=>t.left))),n=p(...t.map((t=>t.top)));return{x:e,y:n,width:f(...t.map((t=>t.right)))-e,height:f(...t.map((t=>t.bottom)))-n}}const R=new Set(["left","top"]);function z(){return"undefined"!=typeof window}function C(t){return B(t)?(t.nodeName||"").toLowerCase():"#document"}function j(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function W(t){var e;return null==(e=(B(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function B(t){return!!z()&&(t instanceof Node||t instanceof j(t).Node)}function I(t){return!!z()&&(t instanceof Element||t instanceof j(t).Element)}function q(t){return!!z()&&(t instanceof HTMLElement||t instanceof j(t).HTMLElement)}function G(t){return!(!z()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof j(t).ShadowRoot)}function N(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=tt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function J(t){return/^(table|td|th)$/.test(C(t))}function V(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const X=/transform|translate|scale|rotate|perspective|filter/,Y=/paint|layout|strict|content/,_=t=>!!t&&"none"!==t;let K;function Q(t){const e=I(t)?tt(t):t;return _(e.transform)||_(e.translate)||_(e.scale)||_(e.rotate)||_(e.perspective)||!U()&&(_(e.backdropFilter)||_(e.filter))||X.test(e.willChange||"")||Y.test(e.contain||"")}function U(){return null==K&&(K="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),K}function Z(t){return/^(html|body|#document)$/.test(C(t))}function tt(t){return j(t).getComputedStyle(t)}function et(t){return I(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function nt(t){if("html"===C(t))return t;const e=t.assignedSlot||t.parentNode||G(t)&&t.host||W(t);return G(e)?e.host:e}function ot(t){const e=nt(t);return Z(e)?t.ownerDocument?t.ownerDocument.body:t.body:q(e)&&N(e)?e:ot(e)}function rt(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const r=ot(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),s=j(r);if(i){const t=it(s);return e.concat(s,s.visualViewport||[],N(r)?r:[],t&&n?rt(t):[])}return e.concat(r,rt(r,[],n))}function it(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function st(t){const e=tt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=q(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=u(n)!==i||u(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function at(t){return I(t)?t:t.contextElement}function ct(t){const e=at(t);if(!q(e))return d(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=st(e);let s=(i?u(n.width):n.width)/o,a=(i?u(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const lt=d(0);function pt(t){const e=j(t);return U()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:lt}function ft(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=at(t);let s=d(1);e&&(o?I(o)&&(s=ct(o)):s=ct(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==j(t))&&e}(i,n,o)?pt(i):d(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){const t=j(i),e=o&&I(o)?j(o):o;let n=t,r=it(n);for(;r&&o&&e!==n;){const t=ct(r),e=r.getBoundingClientRect(),o=tt(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=j(r),r=it(n)}}return $({width:p,height:f,x:c,y:l})}function ut(t,e){const n=et(t).scrollLeft;return e?e.left+n:ft(W(t)).left+n}function ht(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-ut(t,n),y:n.top+e.scrollTop}}function dt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=j(t),o=W(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,c=0;if(r){i=r.width,s=r.height;const t=U();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,c=r.offsetTop)}const l=ut(o);if(l<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),r="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(o.clientWidth-e.clientWidth-r);s<=25&&(i-=s)}else l<=25&&(i+=l);return{width:i,height:s,x:a,y:c}}(t,n);else if("document"===e)o=function(t){const e=W(t),n=et(t),o=t.ownerDocument.body,r=f(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=f(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ut(t);const a=-n.scrollTop;return"rtl"===tt(o).direction&&(s+=f(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(W(t));else if(I(e))o=function(t,e){const n=ft(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=q(t)?ct(t):d(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=pt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return $(o)}function mt(t,e){const n=nt(t);return!(n===e||!I(n)||Z(n))&&("fixed"===tt(n).position||mt(n,e))}function gt(t,e,n){const o=q(e),r=W(e),i="fixed"===n,s=ft(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=d(0);function l(){c.x=ut(r)}if(o||!o&&!i)if(("body"!==C(e)||N(r))&&(a=et(e)),o){const t=ft(e,!0,i,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else r&&l();i&&!o&&r&&l();const p=!r||o||i?d(0):ht(r,a);return{x:s.left+a.scrollLeft-c.x-p.x,y:s.top+a.scrollTop-c.y-p.y,width:s.width,height:s.height}}function vt(t){return"static"===tt(t).position}function wt(t,e){if(!q(t)||"fixed"===tt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return W(t)===n&&(n=n.ownerDocument.body),n}function xt(t,e){const n=j(t);if(V(t))return n;if(!q(t)){let e=nt(t);for(;e&&!Z(e);){if(I(e)&&!vt(e))return e;e=nt(e)}return n}let o=wt(t,e);for(;o&&J(o)&&vt(o);)o=wt(o,e);return o&&Z(o)&&vt(o)&&!Q(o)?n:o||function(t){let e=nt(t);for(;q(e)&&!Z(e);){if(Q(e))return e;if(V(e))return null;e=nt(e)}return null}(t)||n}const yt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,s=W(o),a=!!e&&V(e.floating);if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=d(1);const p=d(0),f=q(o);if((f||!f&&!i)&&(("body"!==C(o)||N(s))&&(c=et(o)),f)){const t=ft(o);l=ct(o),p.x=t.x+o.clientLeft,p.y=t.y+o.clientTop}const u=!s||f||i?d(0):ht(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:W,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?V(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter((t=>I(t)&&"body"!==C(t))),r=null;const i="fixed"===tt(t).position;let s=i?nt(t):t;for(;I(s)&&!Z(s);){const e=tt(s),n=Q(s);n||"fixed"!==e.position||(r=null),(i?!n&&!r:!n&&"static"===e.position&&r&&("absolute"===r.position||"fixed"===r.position)||N(s)&&!n&&mt(t,s))?o=o.filter((t=>t!==s)):r=e,s=nt(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=dt(e,i[0],r);let a=s.top,c=s.right,l=s.bottom,u=s.left;for(let t=1;t<i.length;t++){const n=dt(e,i[t],r);a=f(n.top,a),c=p(n.right,c),l=p(n.bottom,l),u=f(n.left,u)}return{width:c-u,height:l-a,x:u,y:a}},getOffsetParent:xt,getElementRects:async function(t){const e=this.getOffsetParent||xt,n=this.getDimensions,o=await n(t.floating);return{reference:gt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=st(t);return{width:e,height:n}},getScale:ct,isElement:I,isRTL:function(t){return"rtl"===tt(t).direction}};function bt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const St=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=w(n),a=x(n),c="y"===S(n),l=R.has(s)?-1:1,p=i&&c?-1:1,f=v(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}}}}},Et=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,...g}=v(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=w(r),L=S(a),$=w(a)===a,D=await(null==c.isRTL?void 0:c.isRTL(l.floating)),P=u||($||!m?[H(a)]:function(t){const e=H(t);return[k(t),e,k(e)]}(a)),F="none"!==d;!u&&F&&P.push(...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:T:e?T:A;case"left":case"right":return e?M:O;default:return[]}}(w(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(k)))),i}(a,m,d,D));const R=[a,...P],z=await c.detectOverflow(e,g),C=[];let j=(null==(o=i.flip)?void 0:o.overflows)||[];if(p&&C.push(z[y]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=x(t),r=E(t),i=b(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=H(s)),[s,H(s)]}(r,s,D);C.push(z[t[0]],z[t[1]])}if(j=[...j,{placement:r,overflows:C}],!C.every((t=>t<=0))){var W,B;const t=((null==(W=i.flip)?void 0:W.index)||0)+1,e=R[t];if(e&&("alignment"!==f||L===S(e)||j.every((t=>S(t.placement)!==L||t.overflows[0]>0))))return{data:{index:t,overflows:j},reset:{placement:e}};let n=null==(B=j.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 I;const t=null==(I=j.filter((t=>{if(F){const e=S(t.placement);return e===L||"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:I[0];t&&(n=t);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},kt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:a}=e,{apply:c=()=>{},...l}=v(t,e),u=await s.detectOverflow(e,l),h=w(r),d=x(r),m="y"===S(r),{width:g,height:y}=i.floating;let b,E;"top"===h||"bottom"===h?(b=h,E=d===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(E=h,b="end"===d?"top":"bottom");const k=y-u.top-u.bottom,T=g-u.left-u.right;let A=p(y-u[b],k),M=p(g-u[E],T);if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(M=T),null!=(o=e.middlewareData.shift)&&o.enabled.y&&(A=k),!e.middlewareData.shift&&!d){const t=f(u.left,0),e=f(u.right,0),n=f(u.top,0),o=f(u.bottom,0);m?M=g-2*(0!==t||0!==e?t+e:f(u.left,u.right)):A=y-2*(0!==n||0!==o?n+o:f(u.top,u.bottom))}await c({...e,availableWidth:M,availableHeight:A});const O=await s.getDimensions(a.floating);return g!==O.width||y!==O.height?{reset:{rects:!0}}:{}}}},Tt=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}=v(t,e),u=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),h=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=>$(F(t))))}(u),d=$(F(u)),m=L(a),g=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=c&&null!=l)return h.find((t=>c>t.left-m.left&&c<t.right+m.right&&l>t.top-m.top&&l<t.bottom+m.bottom))||d;if(h.length>=2){if("y"===S(n)){const t=h[0],e=h[h.length-1],o="top"===w(n),r=t.top,i=e.bottom,s=o?t.left:e.left,a=o?t.right:e.right;return{top:r,bottom:i,left:s,right:a,width:a-s,height:i-r,x:s,y:r}}const t="left"===w(n),e=f(...h.map((t=>t.right))),o=p(...h.map((t=>t.left))),r=h.filter((n=>t?n.left===o:n.right===e)),i=r[0].top,s=r[r.length-1].bottom;return{top:i,bottom:s,left:o,right:e,width:e-o,height:s-i,x:o,y:i}}return d}},floating:o.floating,strategy:s});return r.reference.x!==g.reference.x||r.reference.y!==g.reference.y||r.reference.width!==g.reference.width||r.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}};var At=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...o}={}){super(t,o),this.oldState=String(e||""),this.newState=String(n||"")}},Mt=new WeakMap;function Ot(t,e,n){Mt.set(t,setTimeout((()=>{Mt.has(t)&&t.dispatchEvent(new At("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var Ht=globalThis.ShadowRoot||function(){},Lt=globalThis.HTMLDialogElement||function(){},$t=new WeakMap,Dt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap;function Rt(t){return Ft.get(t)||"hidden"}var zt=new WeakMap;function Ct(t){return[...t].pop()}function jt(t,e){return!("auto"!==t.popover&&"manual"!==t.popover&&"hint"!==t.popover||!t.isConnected||e&&"showing"!==Rt(t)||!e&&"hidden"!==Rt(t)||t instanceof Lt&&t.hasAttribute("open")||document.fullscreenElement===t)}function Wt(t){if(!t)return 0;const e=Dt.get(document)||new Set,n=Pt.get(document)||new Set;return n.has(t)?[...n].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function Bt(t){let e;const n=Pt.get(t)||new Set,o=Dt.get(t)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(e=Ct(r),e.isConnected?e:(r.delete(e),Bt(t))):null}function It(t){for(const e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function qt(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?qt(t.parentNode):t}function Gt(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===Ft.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||qt(t))instanceof Ht&&(t=t.host),t instanceof Document)return}}function Nt(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=Gt(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||qt(t)),r}function Jt(t){return!(t.hidden||t instanceof Ht||(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 Vt=new WeakMap;function Xt(t){if(!jt(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new At("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!jt(t,!1))return;let n=!1;const o=t.popover;let r=null;const i=Nt(t,Dt.get(e)||new Set),s=Nt(t,Pt.get(e)||new Set);if("auto"===o&&(_t(Pt.get(e)||new Set,n,!0),Qt(i||e,n,!0),r="auto"),"hint"===o&&(s?(Qt(s,n,!0),r="hint"):(_t(Pt.get(e)||new Set,n,!0),i?(Qt(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!jt(t,!1))return;Bt(e)||(n=!0),"auto"===r?(Dt.has(e)||Dt.set(e,new Set),Dt.get(e).add(t)):"hint"===r&&(Pt.has(e)||Pt.set(e,new Set),Pt.get(e).add(t))}Vt.delete(t);const a=e.activeElement;var c;t.classList.add(":popover-open"),Ft.set(t,"showing"),$t.has(e)||$t.set(e,new Set),$t.get(e).add(t),ee(zt.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&&Vt.set(t,a),Ot(t,"closed","open")}function Yt(t,e=!1,n=!1){if(!jt(t,!0))return;const o=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(Qt(t,e,n),!jt(t,!0)))return;const r=Dt.get(o)||new Set,i=r.has(t)&&Ct(r)===t;if(ee(zt.get(t),!1),zt.delete(t),n&&(t.dispatchEvent(new At("beforetoggle",{oldState:"open",newState:"closed"})),i&&Ct(r)!==t&&Qt(t,e,n),!jt(t,!0)))return;$t.get(o)?.delete(t),r.delete(t),Pt.get(o)?.delete(t),t.classList.remove(":popover-open"),Ft.set(t,"hidden"),n&&Ot(t,"open","closed");const s=Vt.get(t);s&&(Vt.delete(t),e&&s.focus())}function _t(t,e=!1,n=!1){let o=It(t);for(;o;)Yt(o,e,n),o=It(t)}function Kt(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"===Rt(s)&&e.size;)Yt(Ct(e),n,o);e.has(t)&&Ct(e)!==t&&(r=!0),r&&(o=!1)}}function Qt(t,e,n){const o=t.ownerDocument||t;if(t instanceof Document)return function(t,e=!1,n=!1){let o=Bt(t);for(;o;)Yt(o,e,n),o=Bt(t)}(o,e,n);Pt.get(o)?.has(t)?Kt(t,Pt.get(o),e,n):(_t(Pt.get(o)||new Set,e,n),Dt.get(o)?.has(t)&&Kt(t,Dt.get(o),e,n))}var Ut=new WeakMap;function Zt(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!Bt(n))return;const o=function(t){const e=Gt(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||qt(t))instanceof Ht&&(t=t.host),t instanceof Document)return}}(t);return Wt(e)>Wt(n)?e:n}(e);if(o&&"pointerdown"===t.type)Ut.set(n,o);else if("pointerup"===t.type){const t=Ut.get(n)===o;Ut.delete(n),t&&Qt(o||n,!1,!0)}}var te=new WeakMap;function ee(t,e=!1){if(!t)return;te.has(t)||te.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=te.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var ne=globalThis.ShadowRoot||function(){};function oe(t,e,n){const o=t[e];Object.defineProperty(t,e,{value(t){return o.call(this,n(t))}})}var re=/(^|[^\\]):popover-open\b/g;var ie=null;function se(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===ie)try{(ie=new CSSStyleSheet).replaceSync(e)}catch{ie=!1}if(!1===ie){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[ie,...t.adoptedStyleSheets]}const ae={"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"})}},ce=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postBeforeShow=n(this,"postBeforeShow"),this.postShow=n(this,"postShow"),this.postHide=n(this,"postHide"),this.postBeforeToggle=n(this,"postBeforeToggle"),this.postToggle=n(this,"postToggle"),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)}validatePlacement(){s(this,"placement",l)}validateEdgeGap(){a(this,"edgeGap","number")}validateSafeSpace(){s(this,"safeSpace",["triangle","trapezoid"])}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(){"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(re,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||At,oe(Document.prototype,"querySelector",t),oe(Document.prototype,"querySelectorAll",t),oe(Element.prototype,"querySelector",t),oe(Element.prototype,"querySelectorAll",t),oe(Element.prototype,"matches",t),oe(Element.prototype,"closest",t),oe(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={}){Xt(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Yt(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t={}){return"boolean"==typeof t&&(t={force:t}),"showing"===Ft.get(this)&&void 0===t.force||!1===t.force?Yt(this,!0,!0):void 0!==t.force&&!0!==t.force||Xt(this),"showing"===Ft.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 se(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&&se(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=qt(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof ne)&&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=qt(n);if(!(o instanceof ne||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=Rt(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?Yt(e,!0,!0):jt(e,!1)&&(zt.set(e,t),Xt(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||Qt(n.ownerDocument,!0,!0)})),i.addEventListener("pointerdown",Zt),i.addEventListener("pointerup",Zt),se(document)}()}componentDidLoad(){this.validatePlacement(),this.validateEdgeGap(),this.validateSafeSpace(),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||(this.eventTarget=t,this.calculatePosition(),this.host.showPopover())}async hide(){this.toggleTimeoutId||(this.eventTarget=null,this.host.hidePopover(),this.postHide.emit())}async toggle(t,e){return this.eventTarget=t,this.toggleTimeoutId||(this.calculatePosition(),this.host.togglePopover(e),this.toggleTimeoutId=null),this.host.matches(":where(:popover-open, .popover-open)")}open(){const t=this.host.shadowRoot?.querySelector(".popover-content");if(this.startAutoupdates(),t){const e=ae[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=at(t),u=r||i?[...l?rt(l):[],...e?rt(e):[]]:[];u.forEach((t=>{r&&t.addEventListener("scroll",n,{passive:!0}),i&&t.addEventListener("resize",n)}));const d=l&&a?function(t,e){let n,o=null;const r=W(t);function i(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function s(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),i();const l=t.getBoundingClientRect(),{left:u,top:d,width:m,height:g}=l;if(a||e(),!m||!g)return;const v={rootMargin:-h(d)+"px "+-h(r.clientWidth-(u+m))+"px "+-h(r.clientHeight-(d+g))+"px "+-h(u)+"px",threshold:f(0,p(1,c))||1};let w=!0;function x(e){const o=e[0].intersectionRatio;if(o!==c){if(!w)return s();o?s(!1,o):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==o||bt(l,t.getBoundingClientRect())||s(),w=!1}try{o=new IntersectionObserver(x,{...v,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(x,v)}o.observe(t)}(!0),i}(l,n):null;let m,g=-1,v=null;s&&(v=new ResizeObserver((t=>{let[o]=t;o&&o.target===l&&v&&e&&(v.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame((()=>{var t;null==(t=v)||t.observe(e)}))),n()})),l&&!c&&v.observe(l),e&&v.observe(e));let w=c?ft(t):null;return c&&function e(){const o=ft(t);w&&!bt(w,o)&&n(),w=o,m=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{r&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==d||d(),null==(t=v)||t.disconnect(),v=null,c&&cancelAnimationFrame(m)}}(this.eventTarget,this.host,this.calculatePosition.bind(this)))}getHeaderHeight(){const t=document.querySelector("post-header");return t?Number.parseFloat(getComputedStyle(t).height):0}async calculatePosition(){const{x:e,y:n,middlewareData:o,placement:r}=await this.computeMainPosition(),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 computeMainPosition(){const t=this.edgeGap,e=(this.placement||"top").includes("-"),n=Et({padding:this.getHeaderHeight(),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}=v(t,e),p={x:n,y:o},f=await i.detectOverflow(e,l),u=S(w(r)),h=y(u);let d=p[h],m=p[u];s&&(d=g(d+f["y"===h?"top":"left"],d,d-f["y"===h?"bottom":"right"])),a&&(m=g(m+f["y"===u?"top":"left"],m,m-f["y"===u?"bottom":"right"]));const x=c.fn({...e,[h]:d,[u]:m});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[h]:s,[u]:a}}}}}}({padding:t,limiter:(i={offset:32},void 0===i&&(i={}),{options:i,fn(t){const{x:e,y:n,placement:o,rects:r,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=v(i,t),p={x:e,y:n},f=S(o),u=y(f);let h=p[u],d=p[f];const m=v(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const t="y"===u?"height":"width",e=r.reference[u]-r.floating[t]+g.mainAxis,n=r.reference[u]+r.reference[t]-g.mainAxis;h<e?h=e:h>n&&(h=n)}if(l){var x,b;const t="y"===u?"width":"height",e=R.has(w(o)),n=r.reference[f]-r.floating[t]+(e&&(null==(x=s.offset)?void 0:x[f])||0)+(e?0:g.crossAxis),i=r.reference[f]+r.reference[t]+(e?0:(null==(b=s.offset)?void 0:b[f])||0)-(e?g.crossAxis:0);d<n?d=n:d>i&&(d=i)}return{[u]:h,[f]:d}}})}),r=[St(this.offset??(this.arrow?t+4:t)),Tt(),...e?[n,o]:[o,n],kt({apply({availableWidth:e,elements:n}){Object.assign(n.floating.style,{maxWidth:e-2*t+"px"})}})];var i;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:f=0}=v(t,e)||{};if(null==l)return{};const u=L(f),h={x:n,y:o},d=E(r),m=b(d),w=await s.getDimensions(l),y="y"===d,S=y?"top":"left",k=y?"bottom":"right",T=y?"clientHeight":"clientWidth",A=i.reference[m]+i.reference[d]-h[d]-i.floating[m],M=h[d]-i.reference[d],O=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let H=O?O[T]:0;H&&await(null==s.isElement?void 0:s.isElement(O))||(H=a.floating[T]||i.floating[m]);const $=A/2-M/2,D=H/2-w[m]/2-1,P=p(u[S],D),F=p(u[k],D),R=P,z=H-w[m]-F,C=H/2-w[m]/2+$,j=g(R,C,z),W=!c.arrow&&null!=x(r)&&C!==j&&i.reference[m]/2-(C<R?P:F)-w[m]/2<0,B=W?C<R?C-R:C-z:0;return{[d]:h[d]+B,data:{[d]:j,centerOffset:C-j-B,...W&&{alignmentOffset:B}},reset:W}}}))({element:this.arrowRef,padding:t})),((t,e,n)=>{const o=new Map,r={platform:yt,...n},i={...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:P},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}=D(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:g,fn:v}=m,{x:w,y:x,data:y,reset:b}=await v({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!=x?x:f,d[g]={...d[g],...y},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}=D(l,u,c))),n=-1)}return{x:p,y:f,placement:u,strategy:r,middlewareData:d}})(t,e,{...r,platform:i})})(this.eventTarget,this.host,{placement:this.placement||"top",strategy:"fixed",middleware:r})}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 o(r,{key:"796c61380fcfc0fffb4a135eef8686eb4f0a218f","data-version":c,popover:"auto"},o("div",{key:"f7d4f69a528487406c5969165aea8970e76750c2",part:"post-popovercontainer-content",class:"popover-content"},this.arrow&&o("span",{key:"89b8f6036d958aae6e835f449f04f2c6086ab548","dynamic-placement":this.dynamicPlacement,class:"arrow",ref:t=>{this.arrowRef=t}}),o("span",{key:"3a9804b70a612faaf7d7709a48b16bf9f3cdbf0e",part:"post-popovercontainer-border-mask"}),o("slot",{key:"b7e29480db2d1a8220080981f1b82d6f7994f150"})))}get host(){return this}static get watchers(){return{placement:[{validatePlacement:0}],edgeGap:[{validateEdgeGap:0}],safeSpace:[{validateSafeSpace:0}]}}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"],dynamicPlacement:[32],show:[64],hide:[64],toggle:[64]},void 0,{placement:[{validatePlacement:0}],edgeGap:[{validateEdgeGap:0}],safeSpace:[{validateSafeSpace:0}]}]);function le(){"undefined"!=typeof customElements&&["post-popovercontainer"].forEach((t=>{"post-popovercontainer"===t&&(customElements.get(i(t))||customElements.define(i(t),ce))}))}ce.STATIC_SIDES={top:"bottom",right:"left",bottom:"top",left:"right"},ce.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"],le();export{ce as P,l as a,le as d}
|
|
1
|
+
import{p as t,H as e,c as n,h as o,a as r,t as i}from"./index.js";import{d as s,g as a}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{v as c}from"./p-DW7sbg9f.js";const l=["top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"],p=Math.min,f=Math.max,u=Math.round,h=Math.floor,d=t=>({x:t,y:t}),m={left:"right",right:"left",bottom:"top",top:"bottom"};function g(t,e,n){return f(t,p(e,n))}function v(t,e){return"function"==typeof t?t(e):t}function w(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function x(t){return"x"===t?"y":"x"}function y(t){return"y"===t?"height":"width"}function S(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function E(t){return x(S(t))}function k(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const T=["left","right"],M=["right","left"],A=["top","bottom"],O=["bottom","top"];function H(t){const e=w(t);return m[e]+t.slice(e.length)}function L(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function $(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=S(e),s=E(e),a=y(s),c=w(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}}switch(b(e)){case"start":h[s]-=u*(n&&l?-1:1);break;case"end":h[s]+=u*(n&&l?-1:1)}return h}async function P(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}=v(e,t),d=L(h),m=a[u?"floating"===f?"reference":"floating":f],g=$(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})),w="floating"===f?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},y=$(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:c}):w);return{top:(g.top-y.top+d.top)/x.y,bottom:(y.bottom-g.bottom+d.bottom)/x.y,left:(g.left-y.left+d.left)/x.x,right:(y.right-g.right+d.right)/x.x}}function F(t){const e=p(...t.map((t=>t.left))),n=p(...t.map((t=>t.top)));return{x:e,y:n,width:f(...t.map((t=>t.right)))-e,height:f(...t.map((t=>t.bottom)))-n}}const R=new Set(["left","top"]);function z(){return"undefined"!=typeof window}function C(t){return B(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function j(t){var e;return null==(e=(B(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function B(t){return!!z()&&(t instanceof Node||t instanceof W(t).Node)}function I(t){return!!z()&&(t instanceof Element||t instanceof W(t).Element)}function G(t){return!!z()&&(t instanceof HTMLElement||t instanceof W(t).HTMLElement)}function q(t){return!(!z()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof W(t).ShadowRoot)}function N(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=tt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function J(t){return/^(table|td|th)$/.test(C(t))}function V(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const X=/transform|translate|scale|rotate|perspective|filter/,Y=/paint|layout|strict|content/,_=t=>!!t&&"none"!==t;let K;function Q(t){const e=I(t)?tt(t):t;return _(e.transform)||_(e.translate)||_(e.scale)||_(e.rotate)||_(e.perspective)||!U()&&(_(e.backdropFilter)||_(e.filter))||X.test(e.willChange||"")||Y.test(e.contain||"")}function U(){return null==K&&(K="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),K}function Z(t){return/^(html|body|#document)$/.test(C(t))}function tt(t){return W(t).getComputedStyle(t)}function et(t){return I(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function nt(t){if("html"===C(t))return t;const e=t.assignedSlot||t.parentNode||q(t)&&t.host||j(t);return q(e)?e.host:e}function ot(t){const e=nt(t);return Z(e)?t.ownerDocument?t.ownerDocument.body:t.body:G(e)&&N(e)?e:ot(e)}function rt(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const r=ot(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),s=W(r);if(i){const t=it(s);return e.concat(s,s.visualViewport||[],N(r)?r:[],t&&n?rt(t):[])}return e.concat(r,rt(r,[],n))}function it(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function st(t){const e=tt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=G(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=u(n)!==i||u(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function at(t){return I(t)?t:t.contextElement}function ct(t){const e=at(t);if(!G(e))return d(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=st(e);let s=(i?u(n.width):n.width)/o,a=(i?u(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const lt=d(0);function pt(t){const e=W(t);return U()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:lt}function ft(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=at(t);let s=d(1);e&&(o?I(o)&&(s=ct(o)):s=ct(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==W(t))&&e}(i,n,o)?pt(i):d(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){const t=W(i),e=o&&I(o)?W(o):o;let n=t,r=it(n);for(;r&&o&&e!==n;){const t=ct(r),e=r.getBoundingClientRect(),o=tt(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=W(r),r=it(n)}}return $({width:p,height:f,x:c,y:l})}function ut(t,e){const n=et(t).scrollLeft;return e?e.left+n:ft(j(t)).left+n}function ht(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-ut(t,n),y:n.top+e.scrollTop}}function dt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=W(t),o=j(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,c=0;if(r){i=r.width,s=r.height;const t=U();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,c=r.offsetTop)}const l=ut(o);if(l<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),r="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(o.clientWidth-e.clientWidth-r);s<=25&&(i-=s)}else l<=25&&(i+=l);return{width:i,height:s,x:a,y:c}}(t,n);else if("document"===e)o=function(t){const e=j(t),n=et(t),o=t.ownerDocument.body,r=f(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=f(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ut(t);const a=-n.scrollTop;return"rtl"===tt(o).direction&&(s+=f(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(j(t));else if(I(e))o=function(t,e){const n=ft(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=G(t)?ct(t):d(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=pt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return $(o)}function mt(t,e){const n=nt(t);return!(n===e||!I(n)||Z(n))&&("fixed"===tt(n).position||mt(n,e))}function gt(t,e,n){const o=G(e),r=j(e),i="fixed"===n,s=ft(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=d(0);function l(){c.x=ut(r)}if(o||!o&&!i)if(("body"!==C(e)||N(r))&&(a=et(e)),o){const t=ft(e,!0,i,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else r&&l();i&&!o&&r&&l();const p=!r||o||i?d(0):ht(r,a);return{x:s.left+a.scrollLeft-c.x-p.x,y:s.top+a.scrollTop-c.y-p.y,width:s.width,height:s.height}}function vt(t){return"static"===tt(t).position}function wt(t,e){if(!G(t)||"fixed"===tt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return j(t)===n&&(n=n.ownerDocument.body),n}function bt(t,e){const n=W(t);if(V(t))return n;if(!G(t)){let e=nt(t);for(;e&&!Z(e);){if(I(e)&&!vt(e))return e;e=nt(e)}return n}let o=wt(t,e);for(;o&&J(o)&&vt(o);)o=wt(o,e);return o&&Z(o)&&vt(o)&&!Q(o)?n:o||function(t){let e=nt(t);for(;G(e)&&!Z(e);){if(Q(e))return e;if(V(e))return null;e=nt(e)}return null}(t)||n}const xt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,s=j(o),a=!!e&&V(e.floating);if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=d(1);const p=d(0),f=G(o);if((f||!f&&!i)&&(("body"!==C(o)||N(s))&&(c=et(o)),f)){const t=ft(o);l=ct(o),p.x=t.x+o.clientLeft,p.y=t.y+o.clientTop}const u=!s||f||i?d(0):ht(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:j,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?V(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter((t=>I(t)&&"body"!==C(t))),r=null;const i="fixed"===tt(t).position;let s=i?nt(t):t;for(;I(s)&&!Z(s);){const e=tt(s),n=Q(s);n||"fixed"!==e.position||(r=null),(i?!n&&!r:!n&&"static"===e.position&&r&&("absolute"===r.position||"fixed"===r.position)||N(s)&&!n&&mt(t,s))?o=o.filter((t=>t!==s)):r=e,s=nt(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=dt(e,i[0],r);let a=s.top,c=s.right,l=s.bottom,u=s.left;for(let t=1;t<i.length;t++){const n=dt(e,i[t],r);a=f(n.top,a),c=p(n.right,c),l=p(n.bottom,l),u=f(n.left,u)}return{width:c-u,height:l-a,x:u,y:a}},getOffsetParent:bt,getElementRects:async function(t){const e=this.getOffsetParent||bt,n=this.getDimensions,o=await n(t.floating);return{reference:gt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=st(t);return{width:e,height:n}},getScale:ct,isElement:I,isRTL:function(t){return"rtl"===tt(t).direction}};function yt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const St=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=w(n),a=b(n),c="y"===S(n),l=R.has(s)?-1:1,p=i&&c?-1:1,f=v(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}}}}},Et=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,...g}=v(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const x=w(r),L=S(a),$=w(a)===a,D=await(null==c.isRTL?void 0:c.isRTL(l.floating)),P=u||($||!m?[H(a)]:function(t){const e=H(t);return[k(t),e,k(e)]}(a)),F="none"!==d;!u&&F&&P.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?M:T:e?T:M;case"left":case"right":return e?A:O;default:return[]}}(w(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(k)))),i}(a,m,d,D));const R=[a,...P],z=await c.detectOverflow(e,g),C=[];let W=(null==(o=i.flip)?void 0:o.overflows)||[];if(p&&C.push(z[x]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=b(t),r=E(t),i=y(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=H(s)),[s,H(s)]}(r,s,D);C.push(z[t[0]],z[t[1]])}if(W=[...W,{placement:r,overflows:C}],!C.every((t=>t<=0))){var j,B;const t=((null==(j=i.flip)?void 0:j.index)||0)+1,e=R[t];if(e&&("alignment"!==f||L===S(e)||W.every((t=>S(t.placement)!==L||t.overflows[0]>0))))return{data:{index:t,overflows:W},reset:{placement:e}};let n=null==(B=W.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 I;const t=null==(I=W.filter((t=>{if(F){const e=S(t.placement);return e===L||"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:I[0];t&&(n=t);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},kt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:a}=e,{apply:c=()=>{},...l}=v(t,e),u=await s.detectOverflow(e,l),h=w(r),d=b(r),m="y"===S(r),{width:g,height:x}=i.floating;let y,E;"top"===h||"bottom"===h?(y=h,E=d===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(E=h,y="end"===d?"top":"bottom");const k=x-u.top-u.bottom,T=g-u.left-u.right;let M=p(x-u[y],k),A=p(g-u[E],T);if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(A=T),null!=(o=e.middlewareData.shift)&&o.enabled.y&&(M=k),!e.middlewareData.shift&&!d){const t=f(u.left,0),e=f(u.right,0),n=f(u.top,0),o=f(u.bottom,0);m?A=g-2*(0!==t||0!==e?t+e:f(u.left,u.right)):M=x-2*(0!==n||0!==o?n+o:f(u.top,u.bottom))}await c({...e,availableWidth:A,availableHeight:M});const O=await s.getDimensions(a.floating);return g!==O.width||x!==O.height?{reset:{rects:!0}}:{}}}},Tt=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}=v(t,e),u=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),h=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=>$(F(t))))}(u),d=$(F(u)),m=L(a),g=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=c&&null!=l)return h.find((t=>c>t.left-m.left&&c<t.right+m.right&&l>t.top-m.top&&l<t.bottom+m.bottom))||d;if(h.length>=2){if("y"===S(n)){const t=h[0],e=h[h.length-1],o="top"===w(n),r=t.top,i=e.bottom,s=o?t.left:e.left,a=o?t.right:e.right;return{top:r,bottom:i,left:s,right:a,width:a-s,height:i-r,x:s,y:r}}const t="left"===w(n),e=f(...h.map((t=>t.right))),o=p(...h.map((t=>t.left))),r=h.filter((n=>t?n.left===o:n.right===e)),i=r[0].top,s=r[r.length-1].bottom;return{top:i,bottom:s,left:o,right:e,width:e-o,height:s-i,x:o,y:i}}return d}},floating:o.floating,strategy:s});return r.reference.x!==g.reference.x||r.reference.y!==g.reference.y||r.reference.width!==g.reference.width||r.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}};var Mt=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...o}={}){super(t,o),this.oldState=String(e||""),this.newState=String(n||"")}},At=new WeakMap;function Ot(t,e,n){At.set(t,setTimeout((()=>{At.has(t)&&t.dispatchEvent(new Mt("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var Ht=globalThis.ShadowRoot||function(){},Lt=globalThis.HTMLDialogElement||function(){},$t=new WeakMap,Dt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap;function Rt(t){return Ft.get(t)||"hidden"}var zt=new WeakMap;function Ct(t){return[...t].pop()}function Wt(t,e){return!("auto"!==t.popover&&"manual"!==t.popover&&"hint"!==t.popover||!t.isConnected||e&&"showing"!==Rt(t)||!e&&"hidden"!==Rt(t)||t instanceof Lt&&t.hasAttribute("open")||document.fullscreenElement===t)}function jt(t){if(!t)return 0;const e=Dt.get(document)||new Set,n=Pt.get(document)||new Set;return n.has(t)?[...n].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function Bt(t){let e;const n=Pt.get(t)||new Set,o=Dt.get(t)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(e=Ct(r),e.isConnected?e:(r.delete(e),Bt(t))):null}function It(t){for(const e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function Gt(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?Gt(t.parentNode):t}function qt(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===Ft.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||Gt(t))instanceof Ht&&(t=t.host),t instanceof Document)return}}function Nt(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=qt(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||Gt(t)),r}function Jt(t){return!(t.hidden||t instanceof Ht||(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 Vt=new WeakMap;function Xt(t){if(!Wt(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Mt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!Wt(t,!1))return;let n=!1;const o=t.popover;let r=null;const i=Nt(t,Dt.get(e)||new Set),s=Nt(t,Pt.get(e)||new Set);if("auto"===o&&(_t(Pt.get(e)||new Set,n,!0),Qt(i||e,n,!0),r="auto"),"hint"===o&&(s?(Qt(s,n,!0),r="hint"):(_t(Pt.get(e)||new Set,n,!0),i?(Qt(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!Wt(t,!1))return;Bt(e)||(n=!0),"auto"===r?(Dt.has(e)||Dt.set(e,new Set),Dt.get(e).add(t)):"hint"===r&&(Pt.has(e)||Pt.set(e,new Set),Pt.get(e).add(t))}Vt.delete(t);const a=e.activeElement;var c;t.classList.add(":popover-open"),Ft.set(t,"showing"),$t.has(e)||$t.set(e,new Set),$t.get(e).add(t),ee(zt.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&&Vt.set(t,a),Ot(t,"closed","open")}function Yt(t,e=!1,n=!1){if(!Wt(t,!0))return;const o=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(Qt(t,e,n),!Wt(t,!0)))return;const r=Dt.get(o)||new Set,i=r.has(t)&&Ct(r)===t;if(ee(zt.get(t),!1),zt.delete(t),n&&(t.dispatchEvent(new Mt("beforetoggle",{oldState:"open",newState:"closed"})),i&&Ct(r)!==t&&Qt(t,e,n),!Wt(t,!0)))return;$t.get(o)?.delete(t),r.delete(t),Pt.get(o)?.delete(t),t.classList.remove(":popover-open"),Ft.set(t,"hidden"),n&&Ot(t,"open","closed");const s=Vt.get(t);s&&(Vt.delete(t),e&&s.focus())}function _t(t,e=!1,n=!1){let o=It(t);for(;o;)Yt(o,e,n),o=It(t)}function Kt(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"===Rt(s)&&e.size;)Yt(Ct(e),n,o);e.has(t)&&Ct(e)!==t&&(r=!0),r&&(o=!1)}}function Qt(t,e,n){const o=t.ownerDocument||t;if(t instanceof Document)return function(t,e=!1,n=!1){let o=Bt(t);for(;o;)Yt(o,e,n),o=Bt(t)}(o,e,n);Pt.get(o)?.has(t)?Kt(t,Pt.get(o),e,n):(_t(Pt.get(o)||new Set,e,n),Dt.get(o)?.has(t)&&Kt(t,Dt.get(o),e,n))}var Ut=new WeakMap;function Zt(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!Bt(n))return;const o=function(t){const e=qt(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||Gt(t))instanceof Ht&&(t=t.host),t instanceof Document)return}}(t);return jt(e)>jt(n)?e:n}(e);if(o&&"pointerdown"===t.type)Ut.set(n,o);else if("pointerup"===t.type){const t=Ut.get(n)===o;Ut.delete(n),t&&Qt(o||n,!1,!0)}}var te=new WeakMap;function ee(t,e=!1){if(!t)return;te.has(t)||te.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=te.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var ne=globalThis.ShadowRoot||function(){};function oe(t,e,n){const o=t[e];Object.defineProperty(t,e,{value(t){return o.call(this,n(t))}})}var re=/(^|[^\\]):popover-open\b/g;var ie=null;function se(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===ie)try{(ie=new CSSStyleSheet).replaceSync(e)}catch{ie=!1}if(!1===ie){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[ie,...t.adoptedStyleSheets]}const ae={"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"})}},ce=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postBeforeShow=n(this,"postBeforeShow"),this.postShow=n(this,"postShow"),this.postHide=n(this,"postHide"),this.postBeforeToggle=n(this,"postBeforeToggle"),this.postToggle=n(this,"postToggle"),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)}validatePlacement(){s(this,"placement",l)}validateEdgeGap(){a(this,"edgeGap","number")}validateSafeSpace(){s(this,"safeSpace",["triangle","trapezoid"])}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(){"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(re,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Mt,oe(Document.prototype,"querySelector",t),oe(Document.prototype,"querySelectorAll",t),oe(Element.prototype,"querySelector",t),oe(Element.prototype,"querySelectorAll",t),oe(Element.prototype,"matches",t),oe(Element.prototype,"closest",t),oe(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={}){Xt(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Yt(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t={}){return"boolean"==typeof t&&(t={force:t}),"showing"===Ft.get(this)&&void 0===t.force||!1===t.force?Yt(this,!0,!0):void 0!==t.force&&!0!==t.force||Xt(this),"showing"===Ft.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 se(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&&se(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=Gt(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof ne)&&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=Gt(n);if(!(o instanceof ne||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=Rt(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?Yt(e,!0,!0):Wt(e,!1)&&(zt.set(e,t),Xt(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||Qt(n.ownerDocument,!0,!0)})),i.addEventListener("pointerdown",Zt),i.addEventListener("pointerup",Zt),se(document)}()}componentDidLoad(){this.validatePlacement(),this.validateEdgeGap(),this.validateSafeSpace(),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||(this.eventTarget=t,this.calculatePosition(),this.host.showPopover())}async hide(){this.toggleTimeoutId||(this.eventTarget=null,this.host.hidePopover(),this.postHide.emit())}async toggle(t,e){return this.eventTarget=t,this.toggleTimeoutId||(this.calculatePosition(),this.host.togglePopover(e),this.toggleTimeoutId=null),this.host.matches(":where(:popover-open, .popover-open)")}open(){const t=this.host.shadowRoot?.querySelector(".popover-content");if(this.startAutoupdates(),t){const e=ae[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=at(t),u=r||i?[...l?rt(l):[],...e?rt(e):[]]:[];u.forEach((t=>{r&&t.addEventListener("scroll",n,{passive:!0}),i&&t.addEventListener("resize",n)}));const d=l&&a?function(t,e){let n,o=null;const r=j(t);function i(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function s(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),i();const l=t.getBoundingClientRect(),{left:u,top:d,width:m,height:g}=l;if(a||e(),!m||!g)return;const v={rootMargin:-h(d)+"px "+-h(r.clientWidth-(u+m))+"px "+-h(r.clientHeight-(d+g))+"px "+-h(u)+"px",threshold:f(0,p(1,c))||1};let w=!0;function b(e){const o=e[0].intersectionRatio;if(o!==c){if(!w)return s();o?s(!1,o):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==o||yt(l,t.getBoundingClientRect())||s(),w=!1}try{o=new IntersectionObserver(b,{...v,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(b,v)}o.observe(t)}(!0),i}(l,n):null;let m,g=-1,v=null;s&&(v=new ResizeObserver((t=>{let[o]=t;o&&o.target===l&&v&&e&&(v.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame((()=>{var t;null==(t=v)||t.observe(e)}))),n()})),l&&!c&&v.observe(l),e&&v.observe(e));let w=c?ft(t):null;return c&&function e(){const o=ft(t);w&&!yt(w,o)&&n(),w=o,m=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{r&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==d||d(),null==(t=v)||t.disconnect(),v=null,c&&cancelAnimationFrame(m)}}(this.eventTarget,this.host,this.calculatePosition.bind(this)))}getHeaderHeight(){const t=document.querySelector("post-header");return t?Number.parseFloat(getComputedStyle(t).height):0}async calculatePosition(){const{x:e,y:n,middlewareData:o,placement:r}=await this.computeMainPosition(),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 computeMainPosition(){const t=this.edgeGap,e=(this.placement||"top").includes("-"),n=Et({padding:this.getHeaderHeight(),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}=v(t,e),p={x:n,y:o},f=await i.detectOverflow(e,l),u=S(w(r)),h=x(u);let d=p[h],m=p[u];s&&(d=g(d+f["y"===h?"top":"left"],d,d-f["y"===h?"bottom":"right"])),a&&(m=g(m+f["y"===u?"top":"left"],m,m-f["y"===u?"bottom":"right"]));const b=c.fn({...e,[h]:d,[u]:m});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[h]:s,[u]:a}}}}}}({padding:t,limiter:(i={offset:32},void 0===i&&(i={}),{options:i,fn(t){const{x:e,y:n,placement:o,rects:r,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=v(i,t),p={x:e,y:n},f=S(o),u=x(f);let h=p[u],d=p[f];const m=v(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const t="y"===u?"height":"width",e=r.reference[u]-r.floating[t]+g.mainAxis,n=r.reference[u]+r.reference[t]-g.mainAxis;h<e?h=e:h>n&&(h=n)}if(l){var b,y;const t="y"===u?"width":"height",e=R.has(w(o)),n=r.reference[f]-r.floating[t]+(e&&(null==(b=s.offset)?void 0:b[f])||0)+(e?0:g.crossAxis),i=r.reference[f]+r.reference[t]+(e?0:(null==(y=s.offset)?void 0:y[f])||0)-(e?g.crossAxis:0);d<n?d=n:d>i&&(d=i)}return{[u]:h,[f]:d}}})}),r=[St(this.offset??(this.arrow?t+4:t)),Tt(),...e?[n,o]:[o,n],kt({apply({availableWidth:e,elements:n}){Object.assign(n.floating.style,{maxWidth:e-2*t+"px"})}})];var i;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:f=0}=v(t,e)||{};if(null==l)return{};const u=L(f),h={x:n,y:o},d=E(r),m=y(d),w=await s.getDimensions(l),x="y"===d,S=x?"top":"left",k=x?"bottom":"right",T=x?"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[T]:0;H&&await(null==s.isElement?void 0:s.isElement(O))||(H=a.floating[T]||i.floating[m]);const $=M/2-A/2,D=H/2-w[m]/2-1,P=p(u[S],D),F=p(u[k],D),R=P,z=H-w[m]-F,C=H/2-w[m]/2+$,W=g(R,C,z),j=!c.arrow&&null!=b(r)&&C!==W&&i.reference[m]/2-(C<R?P:F)-w[m]/2<0,B=j?C<R?C-R:C-z:0;return{[d]:h[d]+B,data:{[d]:W,centerOffset:C-W-B,...j&&{alignmentOffset:B}},reset:j}}}))({element:this.arrowRef,padding:t})),((t,e,n)=>{const o=new Map,r={platform:xt,...n},i={...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:P},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}=D(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:g,fn:v}=m,{x:w,y:b,data:x,reset:y}=await v({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!=b?b:f,d[g]={...d[g],...x},y&&h<50&&(h++,"object"==typeof y&&(y.placement&&(u=y.placement),y.rects&&(l=!0===y.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):y.rects),({x:p,y:f}=D(l,u,c))),n=-1)}return{x:p,y:f,placement:u,strategy:r,middlewareData:d}})(t,e,{...r,platform:i})})(this.eventTarget,this.host,{placement:this.placement||"top",strategy:"fixed",middleware:r})}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 o(r,{key:"da51b463f946b73ed581ab510f5eed9ccb13c4db","data-version":c,popover:"auto"},o("div",{key:"51ba8b11b60b502a6fa03c4b808d392129a61c80",part:"post-popovercontainer-content",class:"popover-content"},this.arrow&&o("span",{key:"0c7460ca5005698768972b8c1f3115c621291444","dynamic-placement":this.dynamicPlacement,class:"arrow",ref:t=>{this.arrowRef=t}}),o("span",{key:"d8b7fa2a392ba30b5e830e49b475ca5ee08f7f7a",part:"post-popovercontainer-border-mask"}),o("slot",{key:"d0be7e1cb648d34fc04fc43f0db3e9e44a8ccf2d"})))}get host(){return this}static get watchers(){return{placement:[{validatePlacement:0}],edgeGap:[{validateEdgeGap:0}],safeSpace:[{validateSafeSpace:0}]}}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"],dynamicPlacement:[32],show:[64],hide:[64],toggle:[64]},void 0,{placement:[{validatePlacement:0}],edgeGap:[{validateEdgeGap:0}],safeSpace:[{validateSafeSpace:0}]}]);function le(){"undefined"!=typeof customElements&&["post-popovercontainer"].forEach((t=>{"post-popovercontainer"===t&&(customElements.get(i(t))||customElements.define(i(t),ce))}))}ce.STATIC_SIDES={top:"bottom",right:"left",bottom:"top",left:"right"},ce.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"],le();export{ce as P,l as a,le as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as i,h as o,a as r}from"./index.js";import{v as s}from"./p-
|
|
1
|
+
import{t,p as e,H as i,h as o,a as r}from"./index.js";import{v as s}from"./p-DW7sbg9f.js";import{a}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{d as c}from"./p-B_RL4AOE.js";const n=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}validateUrl(){try{this.validUrl=this.constructUrl(this.url)}catch{this.validUrl=void 0}}constructUrl(t){const e=/^https?:\/\//.test(String(this.url));if("string"==typeof t)return this.fullUrl=e?t:`${globalThis.location.origin}${t}`,a(this,"fullUrl"),this.fullUrl}connectedCallback(){this.validateUrl()}handleKeyDown(t){if("Enter"===t.key||" "===t.key){const e=this.host.shadowRoot?.querySelector("a");e&&(t.preventDefault(),e.click())}}render(){return o(r,{key:"2b4e7426d804073e5974e3e75303e149c48b3f84","data-version":s},o("post-icon",{key:"03f454a41a7f4b28832b05e5d2142aaf1695aa84",name:"chevronright",class:"breadcrumb-item-icon"}),this.validUrl?o("a",{class:"breadcrumb-item",href:this.validUrl,onKeyDown:t=>this.handleKeyDown(t),"aria-label":this.label,"aria-description":this.description},o("slot",null)):o("span",{class:"breadcrumb-item"},o("slot",null)))}get host(){return this}static get watchers(){return{url:[{validateUrl:0}]}}static get style(){return":host{display:flex;align-items:center;justify-content:start;gap:var(--post-device-spacing-gap-inline-5)}:host post-icon{box-sizing:border-box;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24);padding-block:var(--post-core-dimension-4);padding-inline:var(--post-core-dimension-4)}.breadcrumb-item{white-space:nowrap;line-height:150%;padding-block:var(--post-device-spacing-padding-block-7);color:var(--post-scheme-color-interactive-primary-enabled-fg1);text-decoration:var(--post-core-text-decoration-none)}.breadcrumb-item{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}.breadcrumb-item: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){.breadcrumb-item:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item: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){.breadcrumb-item:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.breadcrumb-item:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item:focus-visible{border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item,.breadcrumb-item:focus,.breadcrumb-item:hover{color:LinkText !important}.breadcrumb-item:visited{color:VisitedText !important}}"}},[257,"post-breadcrumb-item",{url:[513],label:[513],description:[513],fullUrl:[32]},void 0,{url:[{validateUrl:0}]}]);function l(){"undefined"!=typeof customElements&&["post-breadcrumb-item","post-icon"].forEach((e=>{switch(e){case"post-breadcrumb-item":customElements.get(t(e))||customElements.define(t(e),n);break;case"post-icon":customElements.get(t(e))||c()}}))}l();export{n as P,l as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as
|
|
1
|
+
import{P as s,d as o}from"./p-Cu9RsvYK.js";const p=s,r=o;export{p as PostAccordionItem,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as o,d as s}from"./p-
|
|
1
|
+
import{P as o,d as s}from"./p-D6uA8DbL.js";const p=o,r=s;export{p as PostAccordion,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as s,H as i,c as e,h as o,a}from"./index.js";import{v as n}from"./p-
|
|
1
|
+
import{t,p as s,H as i,c as e,h as o,a}from"./index.js";import{v as n}from"./p-DW7sbg9f.js";import{c as h}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{d as c}from"./p-C9hMpmsD.js";import{d as r}from"./p-B_RL4AOE.js";const l=s(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postFilteringEvent=e(this,"postFilteringEvent"),this.debouncedHandleInput=c((t=>{this.handleInput(t)}),250),this.filterThreshold=0,this.clearable=!1,this.inputValue="",this.handleOnBlur=()=>{this.inputElement.value=this.inputValue,this.listBoxElement.filter(""),this.hideListBox()},this.handleInput=async t=>{if(!this.listBoxElement)return;const s=t.target.value.trim(),i=s.length>=this.filterThreshold?s:"",{defaultPrevented:e}=this.postFilteringEvent.emit(i&&i.length>=this.filterThreshold?i:"");e||(await this.listBoxElement.filter(i),i?(this.showListBox(),this.announceCount()):(this.inputValue="",this.clearAnnouncement()))},this.handleKeyDown=t=>{const{key:s,altKey:i}=t;switch(s){case"ArrowDown":t.preventDefault(),this.showListBox(),i||this.listBoxElement.navigate("down");break;case"ArrowUp":t.preventDefault(),this.listBoxElement.navigate("up");break;case"Enter":if(this.listBoxElement.hidden)return;t.preventDefault(),this.listBoxElement.selectActive(),this.hideListBox();break;case"Escape":this.hideListBox();break;case"Tab":this.listBoxElement.selectActive(),this.hideListBox();break;case"Home":t.preventDefault(),this.listBoxElement.navigate("first");break;case"End":t.preventDefault(),this.listBoxElement.navigate("last")}},this.handleOptionSelected=t=>{const s=t.detail;this.inputElement.value=s,this.inputValue=s,this.hideListBox()},this.handleOptionActive=t=>{const s=t.detail;s?this.inputElement.setAttribute("aria-activedescendant",s):this.inputElement.removeAttribute("aria-activedescendant")},this.hideListBox=()=>{this.clearAnnouncement(),this.listBoxElement.hide(),this.inputElement.ariaExpanded="false",this.host.removeAttribute("open"),this.inputElement.removeAttribute("aria-activedescendant")},this.showListBox=async()=>{await this.listBoxElement.show(),this.inputElement.ariaExpanded="true",this.host.setAttribute("open",""),this.announceCount()},this.clearInput=()=>{this.inputElement&&(this.inputElement.value="",this.inputValue="",this.listBoxElement.clearSelection(),this.hideListBox())}}validateTextAvailableSuggestions(){h(this,"textAvailableSuggestions","string")}get inputElement(){return this.host.querySelector("input")}get listBoxElement(){return this.listbox?document.getElementById(this.listbox):this.host.querySelector("post-listbox")}componentWillLoad(){this.validateTextAvailableSuggestions(),this.inputElement&&(this.inputElement.role="combobox",this.inputElement.ariaAutoComplete="list",this.listBoxElement&&(this.listBoxElement.id||(this.listBoxElement.id=crypto.randomUUID()),this.inputElement.setAttribute("aria-controls",this.listBoxElement.id),this.inputElement.setAttribute("aria-expanded","false"),this.inputElement.autocomplete="off",this.attachInputListeners(),this.attachListboxListeners()))}disconnectedCallback(){this.detachInputListeners(),this.detachListboxListeners()}attachInputListeners(){this.inputElement&&(this.inputElement.addEventListener("input",this.debouncedHandleInput),this.inputElement.addEventListener("keydown",this.handleKeyDown),this.inputElement.addEventListener("blur",this.handleOnBlur),this.inputElement.addEventListener("click",this.showListBox))}detachInputListeners(){this.inputElement&&(this.inputElement.removeEventListener("input",this.debouncedHandleInput),this.inputElement.removeEventListener("keydown",this.handleKeyDown),this.inputElement.removeEventListener("blur",this.handleOnBlur),this.inputElement.removeEventListener("click",this.showListBox))}attachListboxListeners(){this.listBoxElement&&(this.listBoxElement.addEventListener("postOptionSelected",this.handleOptionSelected),this.listBoxElement.addEventListener("postOptionActive",this.handleOptionActive))}detachListboxListeners(){this.listBoxElement&&(this.listBoxElement.removeEventListener("postOptionSelected",this.handleOptionSelected),this.listBoxElement.removeEventListener("postOptionActive",this.handleOptionActive))}clearAnnouncement(){this.outputElement&&(this.outputElement.textContent="")}announceCount(){if(!this.outputElement||!this.listBoxElement)return;const t=this.listBoxElement.querySelectorAll("post-listbox-option:not([hidden])").length;this.outputElement.textContent=this.textAvailableSuggestions.replace("{count}",t+"")}render(){return o(a,{key:"f384c1ed106ad5764078f166bfc692a0f1360956","data-version":n},o("slot",{key:"f7b2859a994888a93c19274d26b473aeae35d1b6"}),this.clearable&&this.inputValue&&o("button",{key:"d87eb95ec872bc4d1ec29cd04f88334541863cf1",type:"button",class:"autocomplete-clear",onClick:this.clearInput},o("post-icon",{key:"48b4dc91762b8c15af9fc1aeb953e97e6cc81af0","aria-hidden":"true",name:"closex"})),o("post-icon",{key:"0a0330204698338da6ddd48b5cacfb51f80c1497","aria-hidden":"true",class:"autocomplete-icon",name:"chevronDown"}),o("output",{key:"5e98430b55f4cf2f915061540e6e002749dd2501",class:"visually-hidden",ref:t=>this.outputElement=t}))}get host(){return this}static get watchers(){return{textAvailableSuggestions:[{validateTextAvailableSuggestions:0}]}}static get style(){return":host{position:relative;display:block}.autocomplete-icon,.autocomplete-clear{position:absolute;inset-block-start:16px}@media screen and (min-width: 780px){.autocomplete-icon,.autocomplete-clear{inset-block-start:20px}}.autocomplete-icon{inset-inline-end:16px;width:24px;height:24px;pointer-events:none;transition:transform .2s ease-in-out}:host([open]) .autocomplete-icon{transform:rotate(180deg)}.autocomplete-clear{display:flex;align-items:center;justify-content:center;inset-inline-end:42px;background:none;border:none;cursor:pointer}.autocomplete-clear>post-icon{width:20px;height:20px}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}"}},[257,"post-autocomplete",{filterThreshold:[514,"filter-threshold"],clearable:[516],listbox:[513],textAvailableSuggestions:[513,"text-available-suggestions"],inputValue:[32]},void 0,{textAvailableSuggestions:[{validateTextAvailableSuggestions:0}]}]);function p(){"undefined"!=typeof customElements&&["post-autocomplete","post-icon"].forEach((s=>{switch(s){case"post-autocomplete":customElements.get(t(s))||customElements.define(t(s),l);break;case"post-icon":customElements.get(t(s))||r()}}))}p();const d=l,u=p;export{d as PostAutocomplete,u as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as i,h as e,a,t as s}from"./index.js";import{v as r}from"./p-
|
|
1
|
+
import{p as t,H as i,h as e,a,t as s}from"./index.js";import{v as r}from"./p-DW7sbg9f.js";import{c as o,g as n,h as c}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";const d=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;var h;!function(t){t.Slotted="slotted",t.Image="image",t.Initials="initials",t[t.Null=null]="Null"}(h||(h={}));const l=t(class t extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.avatarType=null,this.imageUrl="",this.imageAlt="",this.initials="",this.storageKey=""}validateFirstname(){o(this,"firstname","string")}validateLastname(){n(this,"lastname","string")}updateUserid(){this.validateUserId(),this.getAvatarImage()}updateEmail(){this.validateEmail(),this.getAvatarImage()}validateDescription(){n(this,"description","string")}validateUserId(){n(this,"userid","string")}validateEmail(){this.email&&c(this,"email",d)}async getAvatarImage(){let t=!1;this.slottedImage=this.host.querySelector("img");const i=this.slottedImage?.getAttribute("src");i?await this.getImageByProp(i,this.fetchSlottedImage.bind(this))?this.slottedImage.style.display="block":(this.slottedImage.style.display="none",this.avatarType=h.Initials):(this.userid&&(t=await this.getImageByProp(this.userid,this.fetchImageByUserId.bind(this))),!t&&this.email?.match(d)&&(t=await this.getImageByProp(this.email,this.fetchImageByEmail.bind(this))),t||(this.avatarType=h.Initials))}async getImageByProp(t,i){if(!t)return!1;let e;try{e=await i(t)}catch(t){return console.info("Loading avatar image failed.",t),!1}return!!e?.ok&&(this.imageUrl=e.url,this.imageAlt=`${this.firstname} ${this.lastname} avatar`,this.avatarType=h.Image,!0)}async fetchImageByUserId(){return await fetch(t.INTERNAL_USERID_IMAGE_SRC.replace("{userid}",encodeURIComponent(this.userid)))}async fetchImageByEmail(){const t=await async function(t){return await crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t)).then((t=>Array.from(new Uint8Array(t)).map((t=>t.toString(16).padStart(2,"0"))).join("")))}(this.email),i="https://www.gravatar.com/avatar/{email}?s=80&d=404&r=g".replace("{email}",t);return await fetch(i)}async fetchSlottedImage(t){return await fetch(t,{method:"HEAD"})}slotChanged(){const t=this.host.shadowRoot.querySelector("slot");(t?.assignedNodes({flatten:!0})||[]).forEach((t=>{t.nodeType===Node.ELEMENT_NODE&&"IMG"===t.tagName&&this.observeImageSrcChanges(t)})),this.getAvatarImage()}observeImageSrcChanges(t){this.slottedImageObserver&&this.slottedImageObserver.disconnect(),this.slottedImageObserver=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&"src"===t.attributeName&&this.getAvatarImage()}))})),this.slottedImageObserver.observe(t,{attributes:!0,attributeFilter:["src"]})}connectedCallback(){this.avatarType=h.Initials,this.getAvatarImage()}componentDidLoad(){this.validateFirstname(),this.validateLastname(),this.validateDescription(),this.validateUserId(),this.validateEmail()}render(){const t=[this.firstname,this.lastname].filter(Boolean).map((t=>t.trim())),i=t.map((t=>t.charAt(0))).join("").trim(),s=t.join(" ");return e(a,{key:"27b541f1ac7546a3c56799c1cbf8f4347b2a0942","data-version":r},e("span",{key:"5652c2cec0f4455e44d73d7de22dfe53cc4baf13",class:"slotted"===this.avatarType?"":"d-none"},e("slot",{key:"ed8c5e541ed9ae1b43036a540327e426ef6caac4",onSlotchange:this.slotChanged.bind(this)})),"image"===this.avatarType&&e("img",{key:"c11bc3e761a1ea470547a32bfd74b465382fcf95",src:this.imageUrl,alt:this.imageAlt}),"initials"===this.avatarType&&e("span",{key:"16afcb46c524440b0071d8346d7ddcc80bda0cf4",class:"initials"},i,e("span",{key:"99c190d5d829c0a11385dfc0fe66cbd916961813"},this.description??s)))}get host(){return this}static get watchers(){return{firstname:[{validateFirstname:0}],lastname:[{validateLastname:0}],userid:[{updateUserid:0}],email:[{updateEmail:0}],description:[{validateDescription:0}]}}static get style(){return':host{--post-avatar-bg:var(--post-scheme-color-interactive-primary-enabled-bg2);--post-avatar-fg:var(--post-scheme-color-interactive-primary-enabled-fg3);display:inline-flex;position:relative;width:var(--post-device-sizing-interactive-icon-size3);height:var(--post-device-sizing-interactive-icon-size3);background-color:var(--post-scheme-color-interactive-primary-enabled-stroke3);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3);border-radius:var(--post-device-border-radius-round);font-size:var(--post-device-font-size-8);vertical-align:top;line-height:1}:host::after{display:block;content:"";position:absolute;inset:0;z-index:1;border-radius:inherit}*,*::before,*::after{box-sizing:border-box}slot,img,::slotted(img){display:block;width:100%;height:100%}img,::slotted(img){border-radius:var(--post-device-border-radius-round)}::slotted(:not(img)){display:none !important}.initials{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;background-color:var(--post-avatar-bg);border-radius:var(--post-device-border-radius-round);color:var(--post-avatar-fg);text-transform:uppercase;font-weight:400;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}.initials span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}'}},[257,"post-avatar",{firstname:[513],lastname:[1],userid:[1],email:[1],description:[1],slottedImage:[32],avatarType:[32],imageUrl:[32],imageAlt:[32],initials:[32],storageKey:[32]},void 0,{firstname:[{validateFirstname:0}],lastname:[{validateLastname:0}],userid:[{updateUserid:0}],email:[{updateEmail:0}],description:[{validateDescription:0}]}]);function m(){"undefined"!=typeof customElements&&["post-avatar"].forEach((t=>{"post-avatar"===t&&(customElements.get(s(t))||customElements.define(s(t),l))}))}l.INTERNAL_USERID_IMAGE_SRC="https://web.post.ch/UserProfileImage/{userid}.png",m();const p=l,g=m;export{p as PostAvatar,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as o,H as e,h as i,a as s}from"./index.js";import{f as a}from"./p-BVCjnh6Q.js";import{v as c}from"./p-
|
|
1
|
+
import{t,p as o,H as e,h as i,a as s}from"./index.js";import{f as a}from"./p-BVCjnh6Q.js";import{v as c}from"./p-DW7sbg9f.js";import{c as r}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{d as n}from"./p-B_RL4AOE.js";const p=o(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.belowFold=!1,this.handleScroll=()=>{this.belowFold=this.isBelowFold()}}isBelowFold(){return window.scrollY>window.innerHeight}validateTextBackToTop(){r(this,"textBackToTop","string")}watchBelowFold(t){a(this.host,t?"in":"out",{translate:this.translateY,fill:"forwards"})}scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}getSecondPixelValue(t){for(const o of t){const t=o.match(/\b\d+px\b/g);if(t&&t.length>1)return t[1]}}animateButton(){const t=globalThis.getComputedStyle(this.host).getPropertyValue("top"),o=this.host.shadowRoot.querySelector("button"),e=getComputedStyle(o).getPropertyValue("--post-back-to-top-elevation").split(","),i=this.getSecondPixelValue(e);t&&"auto"!==t&&i&&(this.translateY=-1-Number.parseFloat(t.replace("px",""))-Number.parseFloat(i.replace("px","")),this.belowFold&&a(this.host,"in",{translate:this.translateY,fill:"forwards"}),this.belowFold||(this.host.style.transform=`translateY(${this.translateY})`))}componentWillLoad(){this.belowFold=this.isBelowFold()}componentDidLoad(){window.addEventListener("scroll",this.handleScroll,!1),this.animateButton(),this.validateTextBackToTop()}disconnectedCallback(){window.removeEventListener("scroll",this.handleScroll)}render(){return i(s,{key:"259c07a96b529c9db791b4a8a03e545abade77f1","data-version":c},i("button",{key:"eacc98e29e7070f8486c542fc1be1d994bb14683",class:"back-to-top","aria-hidden":this.belowFold?"false":"true",tabindex:this.belowFold?"0":"-1",onClick:this.scrollToTop},i("post-icon",{key:"94c77371e34e96e4359c0857f69e971bb39e284b","aria-hidden":"true",name:"arrowup"}),i("span",{key:"0c8918689fb6c9329233247bcfe6fb5eeb31f03c",class:"visually-hidden"},this.textBackToTop)))}get host(){return this}static get watchers(){return{textBackToTop:[{validateTextBackToTop:0}],belowFold:[{watchBelowFold:0}]}}static get style(){return":host{opacity:0;--post-floating-button-position-top:var(--post-device-position-4);--post-back-to-top-position-top:calc( var(--post-header-height) + var(--post-floating-button-position-top) );--post-back-to-top-elevation:var(--post-device-elevation-300);position:fixed;z-index:1019;inset-block-start:var(--post-back-to-top-position-top);inset-inline-end:var(--post-device-position-1)}:host .back-to-top{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;box-shadow:var(--post-back-to-top-elevation);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid 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);display:flex;align-items:center;justify-content:center}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top{background-color:ButtonFace !important}:host .back-to-top:hover{background-color:Highlight !important}}:host .back-to-top{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}:host .back-to-top: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){:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top: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){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top: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)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:hover{color:HighlightText !important}}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}"}},[1,"post-back-to-top",{textBackToTop:[513,"text-back-to-top"],belowFold:[32]},void 0,{textBackToTop:[{validateTextBackToTop:0}],belowFold:[{watchBelowFold:0}]}]);function l(){"undefined"!=typeof customElements&&["post-back-to-top","post-icon"].forEach((o=>{switch(o){case"post-back-to-top":customElements.get(t(o))||customElements.define(t(o),p);break;case"post-icon":customElements.get(t(o))||n()}}))}l();const h=p,d=l;export{h as PostBackToTop,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as o,H as t,c as e,h as i,a as s,t as c}from"./index.js";import{v as a}from"./p-
|
|
1
|
+
import{p as o,H as t,c as e,h as i,a as s,t as c}from"./index.js";import{v as a}from"./p-DW7sbg9f.js";import{f as r}from"./p-D5knoiyy.js";import{d as n}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{E as d}from"./p-rEfV4v4a.js";const l=["success","warning","error","info"];const p=o(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.postDismissed=e(this,"postDismissed"),this.mutationObserver=new MutationObserver(this.checkContent.bind(this)),this.hasActions=!1,this.type="info"}validateType(){n(this,"type",l)}connectedCallback(){this.mutationObserver.observe(this.host,{childList:!0})}componentDidLoad(){this.checkContent(),this.validateType()}disconnectedCallback(){this.mutationObserver.disconnect()}async dismiss(){const o=r(this.host,"out");await o.finished,this.postDismissed.emit(),this.host.remove()}onCloseButtonClick(){this.dismiss()}checkContent(){this.hasActions=this.host.querySelectorAll('[slot="actions"]').length>0}render(){return i(s,{key:"a57b0caac1e70b9ebcbfc17f446c7f0258aa9083","data-version":a,role:"alert","data-color-scheme":"light"},i("slot",{key:"f34600d0fa1b6dd91eff4655db906befdc74b840",name:"close-button"}),i("slot",{key:"eee0dd61936ebbcf259df5355f52d85534c4cc92",name:"heading"}),i("slot",{key:"f837c996723531ade1d8c150ef73659e90fa407c"}),this.hasActions&&i("div",{key:"cb3fa9ccf57498fb17d4c45afc93d747f7f727e2",class:"actions"},i("slot",{key:"4e59f64aff2b8d681251a8f997220b3f1efcfed5",name:"actions"})))}get host(){return this}static get watchers(){return{type:[{validateType:0}]}}static get style(){return':host{position:relative;display:grid;grid-template-columns:1fr;grid-auto-rows:auto;grid-auto-flow:row;row-gap:var(--post-device-spacing-gap-block-1);min-height:calc(var(--post-device-sizing-notification-icon-2) + (2 * var(--post-device-spacing-padding-10)));padding:var(--post-device-spacing-padding-10);padding-inline-start:calc( var(--post-device-spacing-padding-10) + var(--post-device-sizing-notification-icon-2) + var(--post-device-spacing-gap-inline-6) );color:var(--post-current-fg);border-style:var(--post-core-border-style-solid);border-width:var(--post-device-border-width-default);border-radius:var(--post-device-border-radius-2);box-shadow:var(--post-device-elevation-100);background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke)}:host::before{content:"";display:block;position:absolute;height:var(--post-device-sizing-notification-icon-2);width:var(--post-device-sizing-notification-icon-2);inset-block-start:var(--post-device-spacing-padding-10);inset-inline-start:var(--post-device-spacing-padding-10);background-image:var(--post-signal-icon-info)}:host([type=info]){background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke)}:host([type=info])::before{background-image:var(--post-signal-icon-info)}:host([type=success]){background-color:var(--post-scheme-color-interactive-notification-success-bg);border-color:var(--post-scheme-color-interactive-notification-success-stroke)}:host([type=success])::before{background-image:var(--post-signal-icon-success)}:host([type=warning]){background-color:var(--post-scheme-color-interactive-notification-warning-bg);border-color:var(--post-scheme-color-interactive-notification-warning-stroke)}:host([type=warning])::before{background-image:var(--post-signal-icon-warning)}:host([type=error]){background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke)}:host([type=error])::before{background-image:var(--post-signal-icon-error)}.actions{display:flex;flex-direction:row-reverse;justify-content:flex-start;align-items:center;margin-block-start:var(--post-device-spacing-padding-block-10);gap:var(--post-device-spacing-gap-1)}@media screen and (min-width: 0)and (max-width: 599.98px){.actions{flex-direction:column;align-items:stretch}}::slotted(*){margin-block:0 !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host{border-color:CanvasText}:host::before{color:CanvasText}}'}},[257,"post-banner",{type:[513],hasActions:[32],dismiss:[64]},[[0,"click","onCloseButtonClick"]],{type:[{validateType:0}]}]);function f(){"undefined"!=typeof customElements&&["post-banner"].forEach((o=>{"post-banner"===o&&(customElements.get(c(o))||customElements.define(c(o),p))}))}(function(o,t,e,i){var s,c=arguments.length,a=c<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(o,t,e,i);else for(var r=o.length-1;r>=0;r--)(s=o[r])&&(a=(c<3?s(a):c>3?s(t,e,a):s(t,e))||a);c>3&&a&&Object.defineProperty(t,e,a)})([d("post-closebutton",{allowDescendants:!0})],p.prototype,"onCloseButtonClick",null),f();const v=p,g=f;export{v as PostBanner,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as o,d as
|
|
1
|
+
import{P as o,d as p}from"./p-tpgRP2Dr.js";const r=o,s=p;export{r as PostBreadcrumbItem,s as defineCustomElement}
|