@swisspost/design-system-components 1.6.1 → 1.6.2
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/{index-b619e205.js → index-e7618bb3.js} +16 -6
- package/dist/cjs/index-e7618bb3.js.map +1 -0
- package/dist/cjs/index.cjs.js +26 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/package-041a8597.js +7 -0
- package/dist/cjs/package-041a8597.js.map +1 -0
- package/dist/cjs/post-accordion.cjs.entry.js +2 -2
- package/dist/cjs/post-alert-1fb90f2d.js +101 -0
- package/dist/cjs/post-alert-1fb90f2d.js.map +1 -0
- package/dist/cjs/post-alert.cjs.entry.js +7 -94
- package/dist/cjs/post-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/post-collapsible-e46002bb.js +93 -0
- package/dist/cjs/post-collapsible-e46002bb.js.map +1 -0
- package/dist/cjs/post-collapsible.cjs.entry.js +5 -86
- package/dist/cjs/post-collapsible.cjs.entry.js.map +1 -1
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-components.cjs.js.map +1 -1
- package/dist/cjs/post-icon-91f6603a.js +105 -0
- package/dist/cjs/post-icon-91f6603a.js.map +1 -0
- package/dist/cjs/post-icon.cjs.entry.js +6 -98
- package/dist/cjs/post-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tab-header-a3845fe5.js +33 -0
- package/dist/cjs/post-tab-header-a3845fe5.js.map +1 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +5 -26
- package/dist/cjs/post-tab-header.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tab-panel-b7326ff8.js +27 -0
- package/dist/cjs/post-tab-panel-b7326ff8.js.map +1 -0
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -20
- package/dist/cjs/post-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tabs-384a1fab.js +153 -0
- package/dist/cjs/post-tabs-384a1fab.js.map +1 -0
- package/dist/cjs/post-tabs.cjs.entry.js +5 -146
- package/dist/cjs/post-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tooltip-2becc97a.js +5167 -0
- package/dist/cjs/post-tooltip-2becc97a.js.map +1 -0
- package/dist/cjs/post-tooltip.cjs.entry.js +5 -5088
- package/dist/cjs/post-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/collection-manifest.json +4 -4
- package/dist/collection/components/post-alert/post-alert.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/index.js +8 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-alert.js +1 -134
- package/dist/components/post-alert.js.map +1 -1
- package/dist/components/post-alert2.js +138 -0
- package/dist/components/post-alert2.js.map +1 -0
- package/dist/components/post-collapsible.js +1 -113
- package/dist/components/post-collapsible.js.map +1 -1
- package/dist/components/post-collapsible2.js +117 -0
- package/dist/components/post-collapsible2.js.map +1 -0
- package/dist/components/post-tab-header.js +1 -47
- package/dist/components/post-tab-header.js.map +1 -1
- package/dist/components/post-tab-header2.js +51 -0
- package/dist/components/post-tab-header2.js.map +1 -0
- package/dist/components/post-tab-panel.js +1 -39
- package/dist/components/post-tab-panel.js.map +1 -1
- package/dist/components/post-tab-panel2.js +43 -0
- package/dist/components/post-tab-panel2.js.map +1 -0
- package/dist/components/post-tabs.js +1 -165
- package/dist/components/post-tabs.js.map +1 -1
- package/dist/components/post-tabs2.js +169 -0
- package/dist/components/post-tabs2.js.map +1 -0
- package/dist/components/post-tooltip.js +1 -5113
- package/dist/components/post-tooltip.js.map +1 -1
- package/dist/components/post-tooltip2.js +5189 -0
- package/dist/components/post-tooltip2.js.map +1 -0
- package/dist/docs.json +5 -5
- package/dist/esm/{index-4eff5fc5.js → index-08d62a75.js} +16 -6
- package/dist/esm/index-08d62a75.js.map +1 -0
- package/dist/esm/index.js +14 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/package-a962a93d.js +5 -0
- package/dist/esm/package-a962a93d.js.map +1 -0
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/{post-components/p-10c47e0a.entry.js → esm/post-alert-46926902.js} +99 -2
- package/dist/esm/post-alert-46926902.js.map +1 -0
- package/dist/esm/post-alert.entry.js +6 -97
- package/dist/esm/post-alert.entry.js.map +1 -1
- package/dist/esm/post-collapsible-f1b6592d.js +91 -0
- package/dist/esm/post-collapsible-f1b6592d.js.map +1 -0
- package/dist/esm/post-collapsible.entry.js +4 -89
- package/dist/esm/post-collapsible.entry.js.map +1 -1
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-components.js.map +1 -1
- package/dist/esm/post-icon-fb627697.js +103 -0
- package/dist/esm/post-icon-fb627697.js.map +1 -0
- package/dist/esm/post-icon.entry.js +5 -101
- package/dist/esm/post-icon.entry.js.map +1 -1
- package/dist/esm/post-tab-header-84b12382.js +31 -0
- package/dist/esm/post-tab-header-84b12382.js.map +1 -0
- package/dist/esm/post-tab-header.entry.js +4 -29
- package/dist/esm/post-tab-header.entry.js.map +1 -1
- package/dist/esm/post-tab-panel-216c0b6e.js +25 -0
- package/dist/esm/post-tab-panel-216c0b6e.js.map +1 -0
- package/dist/esm/post-tab-panel.entry.js +3 -23
- package/dist/esm/post-tab-panel.entry.js.map +1 -1
- package/dist/esm/post-tabs-e235d663.js +151 -0
- package/dist/esm/post-tabs-e235d663.js.map +1 -0
- package/dist/esm/post-tabs.entry.js +4 -149
- package/dist/esm/post-tabs.entry.js.map +1 -1
- package/dist/esm/post-tooltip-47f2146d.js +5165 -0
- package/dist/esm/post-tooltip-47f2146d.js.map +1 -0
- package/dist/esm/post-tooltip.entry.js +4 -5091
- package/dist/esm/post-tooltip.entry.js.map +1 -1
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-03fe58da.js +2 -0
- package/dist/post-components/{p-08d942a0.entry.js.map → p-03fe58da.js.map} +1 -1
- package/dist/post-components/p-151b55c0.entry.js +2 -0
- package/dist/post-components/p-21549a50.js +2 -0
- package/dist/post-components/{p-871ade93.entry.js.map → p-21549a50.js.map} +1 -1
- package/dist/post-components/p-4cb18ddf.js +9 -0
- package/dist/post-components/p-4cb18ddf.js.map +1 -0
- package/dist/post-components/p-4e24f13b.entry.js +2 -0
- package/dist/post-components/p-4e24f13b.entry.js.map +1 -0
- package/dist/post-components/{p-2755ba2e.entry.js → p-57b48dff.js} +2 -2
- package/dist/post-components/p-57fdeeab.js +2 -0
- package/dist/post-components/{p-10c47e0a.entry.js.map → p-57fdeeab.js.map} +1 -1
- package/dist/post-components/p-58cc7b5a.entry.js +2 -0
- package/dist/post-components/p-58cc7b5a.entry.js.map +1 -0
- package/dist/post-components/p-6cafa644.entry.js +2 -0
- package/dist/post-components/p-6cafa644.entry.js.map +1 -0
- package/dist/post-components/p-7f370d77.entry.js +2 -0
- package/dist/post-components/p-7f370d77.entry.js.map +1 -0
- package/dist/post-components/p-7f4eba57.js +2 -0
- package/dist/post-components/p-8c006e7d.js +3 -0
- package/dist/post-components/p-8c006e7d.js.map +1 -0
- package/dist/post-components/p-aee47e1a.entry.js +2 -0
- package/dist/post-components/p-aee47e1a.entry.js.map +1 -0
- package/dist/post-components/p-b5e1fd89.js +2 -0
- package/dist/post-components/{p-a18e1d1c.entry.js.map → p-b5e1fd89.js.map} +1 -1
- package/dist/post-components/{p-6a0a1ce4.entry.js → p-ce907090.entry.js} +2 -2
- package/dist/post-components/p-d13111f2.js +2 -0
- package/dist/post-components/p-d13111f2.js.map +1 -0
- package/dist/post-components/p-f35c2075.entry.js +2 -0
- package/dist/post-components/p-f35c2075.entry.js.map +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/post-components/post-components.esm.js.map +1 -1
- package/dist/types/index.d.ts +7 -0
- package/package.json +12 -12
- package/dist/cjs/index-b619e205.js.map +0 -1
- package/dist/cjs/package-bd70f73c.js +0 -7
- package/dist/cjs/package-bd70f73c.js.map +0 -1
- package/dist/esm/index-4eff5fc5.js.map +0 -1
- package/dist/esm/package-f3f12016.js +0 -5
- package/dist/esm/package-f3f12016.js.map +0 -1
- package/dist/post-components/p-08d942a0.entry.js +0 -2
- package/dist/post-components/p-4aae941f.js +0 -2
- package/dist/post-components/p-7d91397a.entry.js +0 -2
- package/dist/post-components/p-871ade93.entry.js +0 -2
- package/dist/post-components/p-a18e1d1c.entry.js +0 -2
- package/dist/post-components/p-a7649277.js +0 -3
- package/dist/post-components/p-a7649277.js.map +0 -1
- package/dist/post-components/p-b4b7e30c.entry.js +0 -9
- package/dist/post-components/p-b4b7e30c.entry.js.map +0 -1
- /package/dist/post-components/{p-4aae941f.js.map → p-151b55c0.entry.js.map} +0 -0
- /package/dist/post-components/{p-2755ba2e.entry.js.map → p-57b48dff.js.map} +0 -0
- /package/dist/post-components/{p-7d91397a.entry.js.map → p-7f4eba57.js.map} +0 -0
- /package/dist/post-components/{p-6a0a1ce4.entry.js.map → p-ce907090.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export{P as PostAlert}from"./p-57fdeeab.js";export{P as PostCollapsible}from"./p-03fe58da.js";export{P as PostIcon}from"./p-b5e1fd89.js";export{P as PostTabs}from"./p-57b48dff.js";export{P as PostTabHeader}from"./p-21549a50.js";export{P as PostTabPanel}from"./p-7f4eba57.js";export{P as PostTooltip}from"./p-4cb18ddf.js";import"./p-8c006e7d.js";import"./p-d13111f2.js";import"./p-2737eaf5.js";import"./p-dfe29f7f.js";import"./p-440193f4.js";import"./p-1339f8cd.js";import"./p-b531475e.js";
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,c as i,h as t,H as e,g as n}from"./p-8c006e7d.js";import{v as a}from"./p-d13111f2.js";import{d as r,b as d}from"./p-dfe29f7f.js";function s(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}const c=350;const h="ease";const l={height:"0",overflow:"hidden"};const b=o=>{const{height:i}=window.getComputedStyle(o);const t={height:i};return o.animate([t,l],{duration:c,easing:h,fill:"forwards"})};const m=o=>{const i={height:`${o.scrollHeight}px`};return o.animate([l,i],{duration:c,easing:h,fill:"forwards"})};const p=[1,2,3,4,5,6];const g=".accordion-item{border-block-start:2px solid #e6e6e6}.accordion-header{font-size:1.0625rem;font-weight:700;line-height:1.5;margin:0}@media (min-width: 1024px){.accordion-header{font-size:1.25rem}}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;width:100%;position:relative;padding-block:1rem;padding-inline-start:1rem;padding-inline-end:2.5rem;text-align:start}.accordion-button:not(:disabled){cursor:pointer}.accordion-button:disabled{opacity:.4}.accordion-button:focus{outline:none;box-shadow:0 0 0 .125rem rgba(51,51,51,.25)}.accordion-button::after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6 7.6 7.6z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6 7.6 7.6z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor;content:\"\";display:block;height:1.5rem;width:1.5rem;position:absolute;inset-inline-end:1rem;inset-block-start:50%;transform:translateY(-50%);transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1);border:1px solid rgb(var(--post-bg-rgb, 255, 255, 255))}.accordion-button.collapsed::after{transform:translateY(-50%) rotate(-180deg)}.accordion-button>.text-truncate{display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover:not(:disabled),.accordion-button:focus-visible:not(:disabled){outline:2px solid Highlight}.accordion-button:disabled{opacity:1 !important}}.accordion-body{padding:.75rem 1rem 2.5rem;border-block-start:2px solid #e6e6e6}.accordion-body h1,.accordion-body .h1{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h1,.accordion-body .h1{font-size:1.25rem}}.accordion-body h2,.accordion-body .h2{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h2,.accordion-body .h2{font-size:1.25rem}}.accordion-body h3,.accordion-body .h3{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h3,.accordion-body .h3{font-size:1.25rem}}.accordion-body h4,.accordion-body .h4{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h4,.accordion-body .h4{font-size:1.25rem}}.accordion-body h5,.accordion-body .h5{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h5,.accordion-body .h5{font-size:1.25rem}}.accordion-body h6,.accordion-body .h6{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h6,.accordion-body .h6{font-size:1.25rem}}.accordion-button>:first-child,.accordion-body>:first-child{margin-block-start:0 !important}.accordion-button>:last-child,.accordion-body>:last-child{margin-block-end:0 !important}:host{display:block}:host .accordion-button>::slotted(.text-truncate){display:block}";const f=class{constructor(t){o(this,t);this.collapseChange=i(this,"collapseChange",7);this.isLoaded=false;this.id=undefined;this.isOpen=true;this.hasHeader=undefined;this.headingTag=undefined;this.collapsed=false;this.headingLevel=2}validateCollapsed(o=this.collapsed){r(o,"boolean","The `collapsed` property of the `post-collapsible` must be a boolean.")}validateHeadingLevel(o=this.headingLevel){d(o,p,"The `headingLevel` property of the `post-collapsible` must be a number between 1 and 6.")}connectedCallback(){this.validateCollapsed();this.validateHeadingLevel()}componentWillRender(){var o;this.id=this.host.id||`c${crypto.randomUUID()}`;this.hasHeader=this.host.querySelectorAll('[slot="header"]').length>0;this.headingTag=`h${(o=this.headingLevel)!==null&&o!==void 0?o:2}`}componentDidLoad(){if(this.collapsed)void this.toggle(false);this.isLoaded=true}async toggle(o=!this.isOpen){if(o===this.isOpen)return o;this.isOpen=!this.isOpen;if(this.isLoaded)this.collapseChange.emit();const i=o?m(this.collapsible):b(this.collapsible);if(!this.isLoaded||s())i.finish();await i.finished;i.commitStyles();return this.isOpen}render(){const o=t("div",{"aria-labelledby":this.hasHeader?`${this.id}--header`:undefined,class:`collapse${this.hasHeader?" accordion-collapse":""}`,id:`${this.id}--collapse`,ref:o=>this.collapsible=o},this.hasHeader?t("div",{class:"accordion-body"},t("slot",null)):t("slot",null));return t(e,{id:this.id,"data-version":a},this.hasHeader?t("div",{class:"accordion-item"},t(this.headingTag,{class:"accordion-header",id:`${this.id}--header`},t("button",{"aria-controls":`${this.id}--collapse`,"aria-expanded":`${this.isOpen}`,class:`accordion-button${this.isOpen?"":" collapsed"}`,onClick:()=>this.toggle(),type:"button"},t("slot",{name:"header"}))),o):o)}get host(){return n(this)}static get watchers(){return{collapsed:["validateCollapsed"],headingLevel:["validateHeadingLevel"]}}};f.style=g;export{f as P};
|
|
2
|
+
//# sourceMappingURL=p-03fe58da.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isMotionReduced","window","matchMedia","matches","collapseDuration","collapseEasing","collapsedKeyframe","height","overflow","collapse","el","getComputedStyle","expandedKeyframe","animate","duration","easing","fill","expand","scrollHeight","HEADING_LEVELS","postCollapsibleCss","PostCollapsible","this","isLoaded","validateCollapsed","newValue","collapsed","checkEmptyOrType","validateHeadingLevel","headingLevel","checkEmptyOrOneOf","connectedCallback","componentWillRender","id","host","crypto","randomUUID","hasHeader","querySelectorAll","length","headingTag","_a","componentDidLoad","toggle","open","isOpen","collapseChange","emit","animation","collapsible","finish","finished","commitStyles","render","h","undefined","class","ref","Host","version","onClick","type","name"],"sources":["src/utils/is-motion-reduced.ts","src/animations/collapse.ts","src/components/post-collapsible/heading-levels.ts","src/components/post-collapsible/post-collapsible.scss?tag=post-collapsible&encapsulation=shadow","src/components/post-collapsible/post-collapsible.tsx"],"sourcesContent":["export function isMotionReduced(): boolean {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n","const collapseDuration = 350;\nconst collapseEasing = 'ease';\nconst collapsedKeyframe: Keyframe = { height: '0', overflow: 'hidden' };\n\nexport const collapse = (el: HTMLElement): Animation => {\n const { height } = window.getComputedStyle(el);\n const expandedKeyframe: Keyframe = { height };\n\n return el.animate(\n [expandedKeyframe, collapsedKeyframe],\n { duration: collapseDuration, easing: collapseEasing, fill: 'forwards' },\n );\n};\n\nexport const expand = (el: HTMLElement): Animation => {\n const expandedKeyframe: Keyframe = { height: `${el.scrollHeight}px` };\n\n return el.animate(\n [collapsedKeyframe, expandedKeyframe],\n { duration: collapseDuration, easing: collapseEasing, fill: 'forwards' },\n );\n};\n","export const HEADING_LEVELS = [1, 2, 3, 4, 5, 6] as const;\n\nexport type HeadingLevel = typeof HEADING_LEVELS[number];\n","@use '@swisspost/design-system-styles/components/accordion';\n\n:host {\n display: block;\n\n .accordion-button > ::slotted(.text-truncate) {\n display: block;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { collapse, expand } from '../../animations/collapse';\nimport { checkEmptyOrOneOf, checkEmptyOrType, isMotionReduced } from '../../utils';\nimport { HEADING_LEVELS, HeadingLevel } from './heading-levels';\n\n@Component({\n tag: 'post-collapsible',\n styleUrl: 'post-collapsible.scss',\n shadow: true,\n})\nexport class PostCollapsible {\n private isLoaded = false;\n private collapsible: HTMLElement;\n\n @Element() host: HTMLPostCollapsibleElement;\n\n @State() id: string;\n @State() isOpen = true;\n @State() hasHeader: boolean;\n @State() headingTag: string;\n\n /**\n * If `true`, the element is initially collapsed otherwise it is displayed.\n */\n @Prop() readonly collapsed?: boolean = false;\n\n @Watch('collapsed')\n validateCollapsed(newValue = this.collapsed) {\n checkEmptyOrType(newValue, 'boolean', 'The `collapsed` property of the `post-collapsible` must be a boolean.');\n }\n\n /**\n * Defines the hierarchical level of the collapsible header within the headings structure.\n */\n @Prop() readonly headingLevel?: HeadingLevel = 2;\n\n @Watch('headingLevel')\n validateHeadingLevel(newValue = this.headingLevel) {\n checkEmptyOrOneOf(newValue, HEADING_LEVELS, 'The `headingLevel` property of the `post-collapsible` must be a number between 1 and 6.');\n }\n\n /**\n * An event emitted when the collapse element is shown or hidden, before the transition. It has no payload.\n */\n @Event() collapseChange: EventEmitter<void>;\n\n connectedCallback() {\n this.validateCollapsed();\n this.validateHeadingLevel();\n }\n\n componentWillRender() {\n this.id = this.host.id || `c${crypto.randomUUID()}`;\n this.hasHeader = this.host.querySelectorAll('[slot=\"header\"]').length > 0;\n this.headingTag = `h${this.headingLevel ?? 2}`;\n }\n\n componentDidLoad() {\n if (this.collapsed) void this.toggle(false);\n this.isLoaded = true;\n }\n\n /**\n * Triggers the collapse programmatically.\n *\n * If there is a collapsing transition running already, it will be reversed.\n */\n @Method()\n async toggle(open = !this.isOpen): Promise<boolean> {\n if (open === this.isOpen) return open;\n\n this.isOpen = !this.isOpen;\n if (this.isLoaded) this.collapseChange.emit();\n\n const animation = open ? expand(this.collapsible): collapse(this.collapsible);\n\n if (!this.isLoaded || isMotionReduced()) animation.finish();\n\n await animation.finished;\n\n animation.commitStyles();\n\n return this.isOpen;\n }\n\n render() {\n const collapse = (\n <div\n aria-labelledby={this.hasHeader ? `${this.id}--header` : undefined}\n class={`collapse${this.hasHeader ? ' accordion-collapse' : ''}`}\n id={`${this.id}--collapse`}\n ref={el => this.collapsible = el}\n >\n {this.hasHeader ? (\n <div class=\"accordion-body\">\n <slot/>\n </div>\n ) : (\n <slot/>\n )}\n </div>\n );\n\n return (\n <Host id={this.id} data-version={version}>\n {this.hasHeader ? (\n <div class=\"accordion-item\">\n <this.headingTag class=\"accordion-header\" id={`${this.id}--header`}>\n <button\n aria-controls={`${this.id}--collapse`}\n aria-expanded={`${this.isOpen}`}\n class={`accordion-button${this.isOpen ? '' : ' collapsed'}`}\n onClick={() => this.toggle()}\n type=\"button\"\n >\n <slot name=\"header\"/>\n </button>\n </this.headingTag>\n\n {collapse}\n </div>\n ) : collapse}\n </Host>\n );\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["isMotionReduced","window","matchMedia","matches","collapseDuration","collapseEasing","collapsedKeyframe","height","overflow","collapse","el","getComputedStyle","expandedKeyframe","animate","duration","easing","fill","expand","scrollHeight","HEADING_LEVELS","postCollapsibleCss","PostCollapsible","this","isLoaded","validateCollapsed","newValue","collapsed","checkEmptyOrType","validateHeadingLevel","headingLevel","checkEmptyOrOneOf","connectedCallback","componentWillRender","id","host","crypto","randomUUID","hasHeader","querySelectorAll","length","headingTag","_a","componentDidLoad","toggle","open","isOpen","collapseChange","emit","animation","collapsible","finish","finished","commitStyles","render","h","undefined","class","ref","Host","version","onClick","type","name"],"sources":["src/utils/is-motion-reduced.ts","src/animations/collapse.ts","src/components/post-collapsible/heading-levels.ts","src/components/post-collapsible/post-collapsible.scss?tag=post-collapsible&encapsulation=shadow","src/components/post-collapsible/post-collapsible.tsx"],"sourcesContent":["export function isMotionReduced(): boolean {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n","const collapseDuration = 350;\nconst collapseEasing = 'ease';\nconst collapsedKeyframe: Keyframe = { height: '0', overflow: 'hidden' };\n\nexport const collapse = (el: HTMLElement): Animation => {\n const { height } = window.getComputedStyle(el);\n const expandedKeyframe: Keyframe = { height };\n\n return el.animate(\n [expandedKeyframe, collapsedKeyframe],\n { duration: collapseDuration, easing: collapseEasing, fill: 'forwards' },\n );\n};\n\nexport const expand = (el: HTMLElement): Animation => {\n const expandedKeyframe: Keyframe = { height: `${el.scrollHeight}px` };\n\n return el.animate(\n [collapsedKeyframe, expandedKeyframe],\n { duration: collapseDuration, easing: collapseEasing, fill: 'forwards' },\n );\n};\n","export const HEADING_LEVELS = [1, 2, 3, 4, 5, 6] as const;\n\nexport type HeadingLevel = typeof HEADING_LEVELS[number];\n","@use '@swisspost/design-system-styles/components/accordion';\n\n:host {\n display: block;\n\n .accordion-button > ::slotted(.text-truncate) {\n display: block;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { collapse, expand } from '../../animations/collapse';\nimport { checkEmptyOrOneOf, checkEmptyOrType, isMotionReduced } from '../../utils';\nimport { HEADING_LEVELS, HeadingLevel } from './heading-levels';\n\n@Component({\n tag: 'post-collapsible',\n styleUrl: 'post-collapsible.scss',\n shadow: true,\n})\nexport class PostCollapsible {\n private isLoaded = false;\n private collapsible: HTMLElement;\n\n @Element() host: HTMLPostCollapsibleElement;\n\n @State() id: string;\n @State() isOpen = true;\n @State() hasHeader: boolean;\n @State() headingTag: string;\n\n /**\n * If `true`, the element is initially collapsed otherwise it is displayed.\n */\n @Prop() readonly collapsed?: boolean = false;\n\n @Watch('collapsed')\n validateCollapsed(newValue = this.collapsed) {\n checkEmptyOrType(newValue, 'boolean', 'The `collapsed` property of the `post-collapsible` must be a boolean.');\n }\n\n /**\n * Defines the hierarchical level of the collapsible header within the headings structure.\n */\n @Prop() readonly headingLevel?: HeadingLevel = 2;\n\n @Watch('headingLevel')\n validateHeadingLevel(newValue = this.headingLevel) {\n checkEmptyOrOneOf(newValue, HEADING_LEVELS, 'The `headingLevel` property of the `post-collapsible` must be a number between 1 and 6.');\n }\n\n /**\n * An event emitted when the collapse element is shown or hidden, before the transition. It has no payload.\n */\n @Event() collapseChange: EventEmitter<void>;\n\n connectedCallback() {\n this.validateCollapsed();\n this.validateHeadingLevel();\n }\n\n componentWillRender() {\n this.id = this.host.id || `c${crypto.randomUUID()}`;\n this.hasHeader = this.host.querySelectorAll('[slot=\"header\"]').length > 0;\n this.headingTag = `h${this.headingLevel ?? 2}`;\n }\n\n componentDidLoad() {\n if (this.collapsed) void this.toggle(false);\n this.isLoaded = true;\n }\n\n /**\n * Triggers the collapse programmatically.\n *\n * If there is a collapsing transition running already, it will be reversed.\n */\n @Method()\n async toggle(open = !this.isOpen): Promise<boolean> {\n if (open === this.isOpen) return open;\n\n this.isOpen = !this.isOpen;\n if (this.isLoaded) this.collapseChange.emit();\n\n const animation = open ? expand(this.collapsible): collapse(this.collapsible);\n\n if (!this.isLoaded || isMotionReduced()) animation.finish();\n\n await animation.finished;\n\n animation.commitStyles();\n\n return this.isOpen;\n }\n\n render() {\n const collapse = (\n <div\n aria-labelledby={this.hasHeader ? `${this.id}--header` : undefined}\n class={`collapse${this.hasHeader ? ' accordion-collapse' : ''}`}\n id={`${this.id}--collapse`}\n ref={el => this.collapsible = el}\n >\n {this.hasHeader ? (\n <div class=\"accordion-body\">\n <slot/>\n </div>\n ) : (\n <slot/>\n )}\n </div>\n );\n\n return (\n <Host id={this.id} data-version={version}>\n {this.hasHeader ? (\n <div class=\"accordion-item\">\n <this.headingTag class=\"accordion-header\" id={`${this.id}--header`}>\n <button\n aria-controls={`${this.id}--collapse`}\n aria-expanded={`${this.isOpen}`}\n class={`accordion-button${this.isOpen ? '' : ' collapsed'}`}\n onClick={() => this.toggle()}\n type=\"button\"\n >\n <slot name=\"header\"/>\n </button>\n </this.headingTag>\n\n {collapse}\n </div>\n ) : collapse}\n </Host>\n );\n }\n}\n"],"mappings":"wJAAgBA,IACd,OAAOC,OAAOC,WAAW,oCAAoCC,OAC/D,CCFA,MAAMC,EAAmB,IACzB,MAAMC,EAAiB,OACvB,MAAMC,EAA8B,CAAEC,OAAQ,IAAKC,SAAU,UAEtD,MAAMC,EAAYC,IACvB,MAAMH,OAAEA,GAAWN,OAAOU,iBAAiBD,GAC3C,MAAME,EAA6B,CAAEL,UAErC,OAAOG,EAAGG,QACR,CAACD,EAAkBN,GACnB,CAAEQ,SAAUV,EAAkBW,OAAQV,EAAgBW,KAAM,YAC7D,EAGI,MAAMC,EAAUP,IACrB,MAAME,EAA6B,CAAEL,OAAQ,GAAGG,EAAGQ,kBAEnD,OAAOR,EAAGG,QACR,CAACP,EAAmBM,GACpB,CAAEE,SAAUV,EAAkBW,OAAQV,EAAgBW,KAAM,YAC7D,ECpBI,MAAMG,EAAiB,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GCA9C,MAAMC,EAAqB,uqG,MCWdC,EAAe,M,wEAClBC,KAAAC,SAAW,M,8BAMD,K,kEAOqB,M,kBAUQ,C,CAP/C,iBAAAC,CAAkBC,EAAWH,KAAKI,WAChCC,EAAiBF,EAAU,UAAW,wE,CASxC,oBAAAG,CAAqBH,EAAWH,KAAKO,cACnCC,EAAkBL,EAAUN,EAAgB,0F,CAQ9C,iBAAAY,GACET,KAAKE,oBACLF,KAAKM,sB,CAGP,mBAAAI,G,MACEV,KAAKW,GAAKX,KAAKY,KAAKD,IAAM,IAAIE,OAAOC,eACrCd,KAAKe,UAAYf,KAAKY,KAAKI,iBAAiB,mBAAmBC,OAAS,EACxEjB,KAAKkB,WAAa,KAAIC,EAAAnB,KAAKO,gBAAY,MAAAY,SAAA,EAAAA,EAAI,G,CAG7C,gBAAAC,GACE,GAAIpB,KAAKI,eAAgBJ,KAAKqB,OAAO,OACrCrB,KAAKC,SAAW,I,CASlB,YAAMoB,CAAOC,GAAQtB,KAAKuB,QACxB,GAAID,IAAStB,KAAKuB,OAAQ,OAAOD,EAEjCtB,KAAKuB,QAAUvB,KAAKuB,OACpB,GAAIvB,KAAKC,SAAUD,KAAKwB,eAAeC,OAEvC,MAAMC,EAAYJ,EAAO3B,EAAOK,KAAK2B,aAAcxC,EAASa,KAAK2B,aAEjE,IAAK3B,KAAKC,UAAYvB,IAAmBgD,EAAUE,eAE7CF,EAAUG,SAEhBH,EAAUI,eAEV,OAAO9B,KAAKuB,M,CAGd,MAAAQ,GACE,MAAM5C,EACJ6C,EAAA,yBACmBhC,KAAKe,UAAY,GAAGf,KAAKW,aAAesB,UACzDC,MAAO,WAAWlC,KAAKe,UAAY,sBAAwB,KAC3DJ,GAAI,GAAGX,KAAKW,eACZwB,IAAK/C,GAAMY,KAAK2B,YAAcvC,GAE7BY,KAAKe,UACJiB,EAAA,OAAKE,MAAM,kBACTF,EAAA,cAGFA,EAAA,cAKN,OACEA,EAACI,EAAI,CAACzB,GAAIX,KAAKW,GAAE,eAAgB0B,GAC9BrC,KAAKe,UACJiB,EAAA,OAAKE,MAAM,kBACTF,EAAChC,KAAKkB,WAAU,CAACgB,MAAM,mBAAmBvB,GAAI,GAAGX,KAAKW,cACpDqB,EAAA,0BACiB,GAAGhC,KAAKW,eAAc,gBACtB,GAAGX,KAAKuB,SACvBW,MAAO,mBAAmBlC,KAAKuB,OAAS,GAAK,eAC7Ce,QAAS,IAAMtC,KAAKqB,SACpBkB,KAAK,UAELP,EAAA,QAAMQ,KAAK,aAIdrD,GAEDA,E"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as t,H as r,g as a}from"./p-8c006e7d.js";import{v as b}from"./p-d13111f2.js";import{c as e}from"./p-b531475e.js";const c='.tab-title[role=tab]{display:inline-block;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:var(--post-contrast-color);text-decoration:none}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:#fff;color:var(--post-contrast-color)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:#fff;color:var(--post-contrast-color);box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:"";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:var(--post-contrast-color);font-weight:700}.tab-title[role=tab].active::before{content:"";display:block;position:absolute;top:0;right:-1px;left:-1px;height:.25rem;background-color:#fc0}:is(.bg-dark,.bg-primary,.bg-black,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:is(.bg-dark,.bg-primary,.bg-black,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:2px solid Highlight;outline-offset:-0.25rem}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}.bg-yellow .tab-title{background-color:#fc0}.bg-yellow .tab-title.active{background-color:#fc0}.bg-yellow .nav-item{background-color:#fc0}.bg-light .tab-title{background-color:#faf9f8}.bg-light .tab-title.active{background-color:#faf9f8}.bg-light .nav-item{background-color:#faf9f8}.bg-gray .tab-title{background-color:#f4f3f1}.bg-gray .tab-title.active{background-color:#f4f3f1}.bg-gray .nav-item{background-color:#f4f3f1}.bg-dark .tab-title{background-color:#333}.bg-dark .tab-title.active{background-color:#333}.bg-dark .nav-item{background-color:#333}.bg-primary .tab-title{background-color:#333}.bg-primary .tab-title.active{background-color:#333}.bg-primary .nav-item{background-color:#333}.bg-white .tab-title{background-color:#fff}.bg-white .tab-title.active{background-color:#fff}.bg-white .nav-item{background-color:#fff}.bg-black .tab-title{background-color:#000}.bg-black .tab-title.active{background-color:#000}.bg-black .nav-item{background-color:#000}.bg-success .tab-title{background-color:#2c911c}.bg-success .tab-title.active{background-color:#2c911c}.bg-success .nav-item{background-color:#2c911c}.bg-info .tab-title{background-color:#cce4ee}.bg-info .tab-title.active{background-color:#cce4ee}.bg-info .nav-item{background-color:#cce4ee}.bg-warning .tab-title{background-color:#f49e00}.bg-warning .tab-title.active{background-color:#f49e00}.bg-warning .nav-item{background-color:#f49e00}.bg-danger .tab-title{background-color:#a51728}.bg-danger .tab-title.active{background-color:#a51728}.bg-danger .nav-item{background-color:#a51728}.bg-nightblue .tab-title{background-color:#004976}.bg-nightblue .tab-title.active{background-color:#004976}.bg-nightblue .nav-item{background-color:#004976}.bg-nightblue-bright .tab-title{background-color:#0076a8}.bg-nightblue-bright .tab-title.active{background-color:#0076a8}.bg-nightblue-bright .nav-item{background-color:#0076a8}.bg-petrol .tab-title{background-color:#006d68}.bg-petrol .tab-title.active{background-color:#006d68}.bg-petrol .nav-item{background-color:#006d68}.bg-petrol-bright .tab-title{background-color:#00968f}.bg-petrol-bright .tab-title.active{background-color:#00968f}.bg-petrol-bright .nav-item{background-color:#00968f}.bg-coral .tab-title{background-color:#9e2a2f}.bg-coral .tab-title.active{background-color:#9e2a2f}.bg-coral .nav-item{background-color:#9e2a2f}.bg-coral-bright .tab-title{background-color:#e03c31}.bg-coral-bright .tab-title.active{background-color:#e03c31}.bg-coral-bright .nav-item{background-color:#e03c31}.bg-olive .tab-title{background-color:#716135}.bg-olive .tab-title.active{background-color:#716135}.bg-olive .nav-item{background-color:#716135}.bg-olive-bright .tab-title{background-color:#aa9d2e}.bg-olive-bright .tab-title.active{background-color:#aa9d2e}.bg-olive-bright .nav-item{background-color:#aa9d2e}.bg-purple .tab-title{background-color:#80276c}.bg-purple .tab-title.active{background-color:#80276c}.bg-purple .nav-item{background-color:#80276c}.bg-purple-bright .tab-title{background-color:#c5299b}.bg-purple-bright .tab-title.active{background-color:#c5299b}.bg-purple-bright .nav-item{background-color:#c5299b}.bg-aubergine .tab-title{background-color:#523178}.bg-aubergine .tab-title.active{background-color:#523178}.bg-aubergine .nav-item{background-color:#523178}.bg-aubergine-bright .tab-title{background-color:#7566a0}.bg-aubergine-bright .tab-title.active{background-color:#7566a0}.bg-aubergine-bright .nav-item{background-color:#7566a0}[class*=bg-] .tab-title.active:focus::after{background-color:rgba(255,255,255,.2)}@supports selector(*:focus-visible){[class*=bg-] .tab-title.active:focus::after{background-color:unset}[class*=bg-] .tab-title.active:focus-visible::after{background-color:rgba(255,255,255,.2)}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button}';const l=class{constructor(t){o(this,t);this.tabId=undefined;this.panel=undefined}validateFor(o){e(o,'The "panel" prop is required for the post-tab-header.')}componentWillLoad(){this.tabId=`tab-${this.host.id||crypto.randomUUID()}`}render(){return t(r,{"data-version":b},t("button",{"aria-selected":"false",class:"tab-title",id:this.tabId,role:"tab",tabindex:"-1",type:"button"},t("slot",null)))}get host(){return a(this)}static get watchers(){return{panel:["validateFor"]}}};l.style=c;export{l as P};
|
|
2
|
+
//# sourceMappingURL=p-21549a50.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["postTabHeaderCss","PostTabHeader","validateFor","newValue","checkNonEmpty","componentWillLoad","this","tabId","host","id","crypto","randomUUID","render","h","Host","version","class","role","tabindex","type"],"sources":["src/components/post-tab-header/post-tab-header.scss?tag=post-tab-header&encapsulation=shadow","src/components/post-tab-header/post-tab-header.tsx"],"sourcesContent":["@use '@swisspost/design-system-styles/components/tabs/tab-title';\n@use '@swisspost/design-system-styles/core' as post;\n\n:host {\n display: block;\n}\n\n.tab-title {\n @include post.reset-button;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { checkNonEmpty } from '../../utils';\n\n@Component({\n tag: 'post-tab-header',\n styleUrl: 'post-tab-header.scss',\n shadow: true,\n})\nexport class PostTabHeader {\n @Element() host: HTMLPostTabHeaderElement;\n\n @State() tabId: string;\n\n /**\n * The name of the panel controlled by the tab header.\n */\n @Prop() readonly panel: HTMLPostTabPanelElement['name'];\n\n @Watch('panel')\n validateFor(newValue: HTMLPostTabPanelElement['name']) {\n checkNonEmpty(newValue, 'The \"panel\" prop is required for the post-tab-header.');\n }\n\n componentWillLoad() {\n this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;\n }\n\n render() {\n return (\n <Host data-version={version}>\n <button aria-selected=\"false\" class=\"tab-title\" id={this.tabId} role=\"tab\" tabindex=\"-1\" type=\"button\">\n <slot />\n </button>\n </Host>\n );\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["postTabHeaderCss","PostTabHeader","validateFor","newValue","checkNonEmpty","componentWillLoad","this","tabId","host","id","crypto","randomUUID","render","h","Host","version","class","role","tabindex","type"],"sources":["src/components/post-tab-header/post-tab-header.scss?tag=post-tab-header&encapsulation=shadow","src/components/post-tab-header/post-tab-header.tsx"],"sourcesContent":["@use '@swisspost/design-system-styles/components/tabs/tab-title';\n@use '@swisspost/design-system-styles/core' as post;\n\n:host {\n display: block;\n}\n\n.tab-title {\n @include post.reset-button;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { checkNonEmpty } from '../../utils';\n\n@Component({\n tag: 'post-tab-header',\n styleUrl: 'post-tab-header.scss',\n shadow: true,\n})\nexport class PostTabHeader {\n @Element() host: HTMLPostTabHeaderElement;\n\n @State() tabId: string;\n\n /**\n * The name of the panel controlled by the tab header.\n */\n @Prop() readonly panel: HTMLPostTabPanelElement['name'];\n\n @Watch('panel')\n validateFor(newValue: HTMLPostTabPanelElement['name']) {\n checkNonEmpty(newValue, 'The \"panel\" prop is required for the post-tab-header.');\n }\n\n componentWillLoad() {\n this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;\n }\n\n render() {\n return (\n <Host data-version={version}>\n <button aria-selected=\"false\" class=\"tab-title\" id={this.tabId} role=\"tab\" tabindex=\"-1\" type=\"button\">\n <slot />\n </button>\n </Host>\n );\n }\n}\n"],"mappings":"iIAAA,MAAMA,EAAmB,+9L,MCSZC,EAAa,M,mEAWxB,WAAAC,CAAYC,GACVC,EAAcD,EAAU,wD,CAG1B,iBAAAE,GACEC,KAAKC,MAAQ,OAAOD,KAAKE,KAAKC,IAAMC,OAAOC,c,CAG7C,MAAAC,GACE,OACEC,EAACC,EAAI,gBAAeC,GAClBF,EAAA,0BAAsB,QAAQG,MAAM,YAAYP,GAAIH,KAAKC,MAAOU,KAAK,MAAMC,SAAS,KAAKC,KAAK,UAC5FN,EAAA,c"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as t,h as e,H as n,g as r}from"./p-8c006e7d.js";import{v as o}from"./p-d13111f2.js";import{c as i}from"./p-1339f8cd.js";const a=Math.min;const l=Math.max;const s=Math.round;const u=Math.floor;const c=t=>({x:t,y:t});const f={left:"right",right:"left",bottom:"top",top:"bottom"};const d={start:"end",end:"start"};function p(t,e,n){return l(t,a(e,n))}function b(t,e){return typeof t==="function"?t(e):t}function v(t){return t.split("-")[0]}function m(t){return t.split("-")[1]}function g(t){return t==="x"?"y":"x"}function h(t){return t==="y"?"height":"width"}function x(t){return["top","bottom"].includes(v(t))?"y":"x"}function y(t){return g(x(t))}function w(t,e,n){if(n===void 0){n=false}const r=m(t);const o=y(t);const i=h(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";if(e.reference[i]>e.floating[i]){a=k(a)}return[a,k(a)]}function S(t){const e=k(t);return[A(t),e,A(e)]}function A(t){return t.replace(/start|end/g,(t=>d[t]))}function O(t,e,n){const r=["left","right"];const o=["right","left"];const i=["top","bottom"];const a=["bottom","top"];switch(t){case"top":case"bottom":if(n)return e?o:r;return e?r:o;case"left":case"right":return e?i:a;default:return[]}}function E(t,e,n,r){const o=m(t);let i=O(v(t),n==="start",r);if(o){i=i.map((t=>t+"-"+o));if(e){i=i.concat(i.map(A))}}return i}function k(t){return t.replace(/left|right|bottom|top/g,(t=>f[t]))}function M(t){return{top:0,right:0,bottom:0,left:0,...t}}function T(t){return typeof t!=="number"?M(t):{top:t,right:t,bottom:t,left:t}}function P(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function I(t,e,n){let{reference:r,floating:o}=t;const i=x(e);const a=y(e);const l=h(a);const s=v(e);const u=i==="y";const c=r.x+r.width/2-o.width/2;const f=r.y+r.height/2-o.height/2;const d=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(m(e)){case"start":p[a]-=d*(n&&u?-1:1);break;case"end":p[a]+=d*(n&&u?-1:1);break}return p}const B=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n;const l=i.filter(Boolean);const s=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:o});let{x:c,y:f}=I(u,r,s);let d=r;let p={};let b=0;for(let n=0;n<l.length;n++){const{name:i,fn:v}=l[n];const{x:m,y:g,data:h,reset:x}=await v({x:c,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:t,floating:e}});c=m!=null?m:c;f=g!=null?g:f;p={...p,[i]:{...p[i],...h}};if(x&&b<=50){b++;if(typeof x==="object"){if(x.placement){d=x.placement}if(x.rects){u=x.rects===true?await a.getElementRects({reference:t,floating:e,strategy:o}):x.rects}({x:c,y:f}=I(u,d,s))}n=-1;continue}}return{x:c,y:f,placement:d,strategy:o,middlewareData:p}};async function C(t,e){var n;if(e===void 0){e={}}const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=t;const{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=false,padding:p=0}=b(e,t);const v=T(p);const m=f==="floating"?"reference":"floating";const g=l[d?m:f];const h=P(await i.getClippingRect({element:((n=await(i.isElement==null?void 0:i.isElement(g)))!=null?n:true)?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:s}));const x=f==="floating"?{...a.floating,x:r,y:o}:a.reference;const y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating));const w=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1};const S=P(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:x,offsetParent:y,strategy:s}):x);return{top:(h.top-S.top+v.top)/w.y,bottom:(S.bottom-h.bottom+v.bottom)/w.y,left:(h.left-S.left+v.left)/w.x,right:(S.right-h.right+v.right)/w.x}}const W=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:l,elements:s,middlewareData:u}=e;const{element:c,padding:f=0}=b(t,e)||{};if(c==null){return{}}const d=T(f);const v={x:n,y:r};const g=y(o);const x=h(g);const w=await l.getDimensions(c);const S=g==="y";const A=S?"top":"left";const O=S?"bottom":"right";const E=S?"clientHeight":"clientWidth";const k=i.reference[x]+i.reference[g]-v[g]-i.floating[x];const M=v[g]-i.reference[g];const P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let I=P?P[E]:0;if(!I||!await(l.isElement==null?void 0:l.isElement(P))){I=s.floating[E]||i.floating[x]}const B=k/2-M/2;const C=I/2-w[x]/2-1;const W=a(d[A],C);const R=a(d[O],C);const F=W;const j=I-w[x]-R;const L=I/2-w[x]/2+B;const D=p(F,L,j);const $=!u.arrow&&m(o)!=null&&L!=D&&i.reference[x]/2-(L<F?W:R)-w[x]/2<0;const Z=$?L<F?L-F:L-j:0;return{[g]:v[g]+Z,data:{[g]:D,centerOffset:L-D-Z,...$&&{alignmentOffset:Z}},reset:$}}});const R=function(t){if(t===void 0){t={}}return{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:u}=e;const{mainAxis:c=true,crossAxis:f=true,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=true,...h}=b(t,e);if((n=i.arrow)!=null&&n.alignmentOffset){return{}}const x=v(o);const y=v(l)===l;const A=await(s.isRTL==null?void 0:s.isRTL(u.floating));const O=d||(y||!g?[k(l)]:S(l));if(!d&&m!=="none"){O.push(...E(l,g,m,A))}const M=[l,...O];const T=await C(e,h);const P=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(c){P.push(T[x])}if(f){const t=w(o,a,A);P.push(T[t[0]],T[t[1]])}I=[...I,{placement:o,overflows:P}];if(!P.every((t=>t<=0))){var B,W;const t=(((B=i.flip)==null?void 0:B.index)||0)+1;const e=M[t];if(e){return{data:{index:t,overflows:I},reset:{placement:e}}}let n=(W=I.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])==null?void 0:W.placement;if(!n){switch(p){case"bestFit":{var R;const t=(R=I.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])==null?void 0:R[0];if(t){n=t}break}case"initialPlacement":n=l;break}}if(o!==n){return{reset:{placement:n}}}}return{}}}};function F(t){const e=a(...t.map((t=>t.left)));const n=a(...t.map((t=>t.top)));const r=l(...t.map((t=>t.right)));const o=l(...t.map((t=>t.bottom)));return{x:e,y:n,width:r-e,height:o-n}}function j(t){const e=t.slice().sort(((t,e)=>t.y-e.y));const n=[];let r=null;for(let t=0;t<e.length;t++){const o=e[t];if(!r||o.y-r.y>r.height/2){n.push([o])}else{n[n.length-1].push(o)}r=o}return n.map((t=>P(F(t))))}const L=function(t){if(t===void 0){t={}}return{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:o,platform:i,strategy:s}=e;const{padding:u=2,x:c,y:f}=b(t,e);const d=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]);const p=j(d);const m=P(F(d));const g=T(u);function h(){if(p.length===2&&p[0].left>p[1].right&&c!=null&&f!=null){return p.find((t=>c>t.left-g.left&&c<t.right+g.right&&f>t.top-g.top&&f<t.bottom+g.bottom))||m}if(p.length>=2){if(x(n)==="y"){const t=p[0];const e=p[p.length-1];const r=v(n)==="top";const o=t.top;const i=e.bottom;const a=r?t.left:e.left;const l=r?t.right:e.right;const s=l-a;const u=i-o;return{top:o,bottom:i,left:a,right:l,width:s,height:u,x:a,y:o}}const t=v(n)==="left";const e=l(...p.map((t=>t.right)));const r=a(...p.map((t=>t.left)));const o=p.filter((n=>t?n.left===r:n.right===e));const i=o[0].top;const s=o[o.length-1].bottom;const u=r;const c=e;const f=c-u;const d=s-i;return{top:i,bottom:s,left:u,right:c,width:f,height:d,x:u,y:i}}return m}const y=await i.getElementRects({reference:{getBoundingClientRect:h},floating:r.floating,strategy:s});if(o.reference.x!==y.reference.x||o.reference.y!==y.reference.y||o.reference.width!==y.reference.width||o.reference.height!==y.reference.height){return{reset:{rects:y}}}return{}}}};async function D(t,e){const{placement:n,platform:r,elements:o}=t;const i=await(r.isRTL==null?void 0:r.isRTL(o.floating));const a=v(n);const l=m(n);const s=x(n)==="y";const u=["left","top"].includes(a)?-1:1;const c=i&&s?-1:1;const f=b(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:g}=typeof f==="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};if(l&&typeof g==="number"){p=l==="end"?g*-1:g}return s?{x:p*c,y:d*u}:{x:d*u,y:p*c}}const $=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(e){const{x:n,y:r}=e;const o=await D(e,t);return{x:n+o.x,y:r+o.y,data:o}}}};const Z=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e;const{mainAxis:i=true,crossAxis:a=false,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...s}=b(t,e);const u={x:n,y:r};const c=await C(e,s);const f=x(v(o));const d=g(f);let m=u[d];let h=u[f];if(i){const t=d==="y"?"top":"left";const e=d==="y"?"bottom":"right";const n=m+c[t];const r=m-c[e];m=p(n,m,r)}if(a){const t=f==="y"?"top":"left";const e=f==="y"?"bottom":"right";const n=h+c[t];const r=h-c[e];h=p(n,h,r)}const y=l.fn({...e,[d]:m,[f]:h});return{...y,data:{x:y.x-n,y:y.y-r}}}}};function N(t){if(X(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function H(t){var e;return(t==null?void 0:(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function G(t){var e;return(e=(X(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function X(t){return t instanceof Node||t instanceof H(t).Node}function z(t){return t instanceof Element||t instanceof H(t).Element}function K(t){return t instanceof HTMLElement||t instanceof H(t).HTMLElement}function q(t){if(typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof H(t).ShadowRoot}function V(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=tt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function _(t){return["table","td","th"].includes(N(t))}function J(t){const e=Y();const n=tt(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":false)||!e&&(n.backdropFilter?n.backdropFilter!=="none":false)||!e&&(n.filter?n.filter!=="none":false)||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function U(t){let e=nt(t);while(K(e)&&!Q(e)){if(J(e)){return e}else{e=nt(e)}}return null}function Y(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function Q(t){return["html","body","#document"].includes(N(t))}function tt(t){return H(t).getComputedStyle(t)}function et(t){if(z(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nt(t){if(N(t)==="html"){return t}const e=t.assignedSlot||t.parentNode||q(t)&&t.host||G(t);return q(e)?e.host:e}function rt(t){const e=nt(t);if(Q(e)){return t.ownerDocument?t.ownerDocument.body:t.body}if(K(e)&&V(e)){return e}return rt(e)}function ot(t,e,n){var r;if(e===void 0){e=[]}if(n===void 0){n=true}const o=rt(t);const i=o===((r=t.ownerDocument)==null?void 0:r.body);const a=H(o);if(i){return e.concat(a,a.visualViewport||[],V(o)?o:[],a.frameElement&&n?ot(a.frameElement):[])}return e.concat(o,ot(o,[],n))}function it(t){const e=tt(t);let n=parseFloat(e.width)||0;let r=parseFloat(e.height)||0;const o=K(t);const i=o?t.offsetWidth:n;const a=o?t.offsetHeight:r;const l=s(n)!==i||s(r)!==a;if(l){n=i;r=a}return{width:n,height:r,$:l}}function at(t){return!z(t)?t.contextElement:t}function lt(t){const e=at(t);if(!K(e)){return c(1)}const n=e.getBoundingClientRect();const{width:r,height:o,$:i}=it(e);let a=(i?s(n.width):n.width)/r;let l=(i?s(n.height):n.height)/o;if(!a||!Number.isFinite(a)){a=1}if(!l||!Number.isFinite(l)){l=1}return{x:a,y:l}}const st=c(0);function ut(t){const e=H(t);if(!Y()||!e.visualViewport){return st}return{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ct(t,e,n){if(e===void 0){e=false}if(!n||e&&n!==H(t)){return false}return e}function ft(t,e,n,r){if(e===void 0){e=false}if(n===void 0){n=false}const o=t.getBoundingClientRect();const i=at(t);let a=c(1);if(e){if(r){if(z(r)){a=lt(r)}}else{a=lt(t)}}const l=ct(i,n,r)?ut(i):c(0);let s=(o.left+l.x)/a.x;let u=(o.top+l.y)/a.y;let f=o.width/a.x;let d=o.height/a.y;if(i){const t=H(i);const e=r&&z(r)?H(r):r;let n=t.frameElement;while(n&&r&&e!==t){const t=lt(n);const e=n.getBoundingClientRect();const r=tt(n);const o=e.left+(n.clientLeft+parseFloat(r.paddingLeft))*t.x;const i=e.top+(n.clientTop+parseFloat(r.paddingTop))*t.y;s*=t.x;u*=t.y;f*=t.x;d*=t.y;s+=o;u+=i;n=H(n).frameElement}}return P({width:f,height:d,x:s,y:u})}function dt(t){let{rect:e,offsetParent:n,strategy:r}=t;const o=K(n);const i=G(n);if(n===i){return e}let a={scrollLeft:0,scrollTop:0};let l=c(1);const s=c(0);if(o||!o&&r!=="fixed"){if(N(n)!=="body"||V(i)){a=et(n)}if(K(n)){const t=ft(n);l=lt(n);s.x=t.x+n.clientLeft;s.y=t.y+n.clientTop}}return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-a.scrollLeft*l.x+s.x,y:e.y*l.y-a.scrollTop*l.y+s.y}}function pt(t){return Array.from(t.getClientRects())}function bt(t){return ft(G(t)).left+et(t).scrollLeft}function vt(t){const e=G(t);const n=et(t);const r=t.ownerDocument.body;const o=l(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth);const i=l(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+bt(t);const s=-n.scrollTop;if(tt(r).direction==="rtl"){a+=l(e.clientWidth,r.clientWidth)-o}return{width:o,height:i,x:a,y:s}}function mt(t,e){const n=H(t);const r=G(t);const o=n.visualViewport;let i=r.clientWidth;let a=r.clientHeight;let l=0;let s=0;if(o){i=o.width;a=o.height;const t=Y();if(!t||t&&e==="fixed"){l=o.offsetLeft;s=o.offsetTop}}return{width:i,height:a,x:l,y:s}}function gt(t,e){const n=ft(t,true,e==="fixed");const r=n.top+t.clientTop;const o=n.left+t.clientLeft;const i=K(t)?lt(t):c(1);const a=t.clientWidth*i.x;const l=t.clientHeight*i.y;const s=o*i.x;const u=r*i.y;return{width:a,height:l,x:s,y:u}}function ht(t,e,n){let r;if(e==="viewport"){r=mt(t,n)}else if(e==="document"){r=vt(G(t))}else if(z(e)){r=gt(e,n)}else{const n=ut(t);r={...e,x:e.x-n.x,y:e.y-n.y}}return P(r)}function xt(t,e){const n=nt(t);if(n===e||!z(n)||Q(n)){return false}return tt(n).position==="fixed"||xt(n,e)}function yt(t,e){const n=e.get(t);if(n){return n}let r=ot(t,[],false).filter((t=>z(t)&&N(t)!=="body"));let o=null;const i=tt(t).position==="fixed";let a=i?nt(t):t;while(z(a)&&!Q(a)){const e=tt(a);const n=J(a);if(!n&&e.position==="fixed"){o=null}const l=i?!n&&!o:!n&&e.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||V(a)&&!n&&xt(t,a);if(l){r=r.filter((t=>t!==a))}else{o=e}a=nt(a)}e.set(t,r);return r}function wt(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=n==="clippingAncestors"?yt(e,this._c):[].concat(n);const s=[...i,r];const u=s[0];const c=s.reduce(((t,n)=>{const r=ht(e,n,o);t.top=l(r.top,t.top);t.right=a(r.right,t.right);t.bottom=a(r.bottom,t.bottom);t.left=l(r.left,t.left);return t}),ht(e,u,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function St(t){return it(t)}function At(t,e,n){const r=K(e);const o=G(e);const i=n==="fixed";const a=ft(t,true,i,e);let l={scrollLeft:0,scrollTop:0};const s=c(0);if(r||!r&&!i){if(N(e)!=="body"||V(o)){l=et(e)}if(r){const t=ft(e,true,i,e);s.x=t.x+e.clientLeft;s.y=t.y+e.clientTop}else if(o){s.x=bt(o)}}return{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function Ot(t,e){if(!K(t)||tt(t).position==="fixed"){return null}if(e){return e(t)}return t.offsetParent}function Et(t,e){const n=H(t);if(!K(t)){return n}let r=Ot(t,e);while(r&&_(r)&&tt(r).position==="static"){r=Ot(r,e)}if(r&&(N(r)==="html"||N(r)==="body"&&tt(r).position==="static"&&!J(r))){return n}return r||U(t)||n}const kt=async function(t){let{reference:e,floating:n,strategy:r}=t;const o=this.getOffsetParent||Et;const i=this.getDimensions;return{reference:At(e,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Mt(t){return tt(t).direction==="rtl"}const Tt={convertOffsetParentRelativeRectToViewportRelativeRect:dt,getDocumentElement:G,getClippingRect:wt,getOffsetParent:Et,getElementRects:kt,getClientRects:pt,getDimensions:St,getScale:lt,isElement:z,isRTL:Mt};function Pt(t,e){let n=null;let r;const o=G(t);function i(){clearTimeout(r);n&&n.disconnect();n=null}function s(c,f){if(c===void 0){c=false}if(f===void 0){f=1}i();const{left:d,top:p,width:b,height:v}=t.getBoundingClientRect();if(!c){e()}if(!b||!v){return}const m=u(p);const g=u(o.clientWidth-(d+b));const h=u(o.clientHeight-(p+v));const x=u(d);const y=-m+"px "+-g+"px "+-h+"px "+-x+"px";const w={rootMargin:y,threshold:l(0,a(1,f))||1};let S=true;function A(t){const e=t[0].intersectionRatio;if(e!==f){if(!S){return s()}if(!e){r=setTimeout((()=>{s(false,1e-7)}),100)}else{s(false,e)}}S=false}try{n=new IntersectionObserver(A,{...w,root:o.ownerDocument})}catch(t){n=new IntersectionObserver(A,w)}n.observe(t)}s(true);return i}function It(t,e,n,r){if(r===void 0){r={}}const{ancestorScroll:o=true,ancestorResize:i=true,elementResize:a=typeof ResizeObserver==="function",layoutShift:l=typeof IntersectionObserver==="function",animationFrame:s=false}=r;const u=at(t);const c=o||i?[...u?ot(u):[],...ot(e)]:[];c.forEach((t=>{o&&t.addEventListener("scroll",n,{passive:true});i&&t.addEventListener("resize",n)}));const f=u&&l?Pt(u,n):null;let d=-1;let p=null;if(a){p=new ResizeObserver((t=>{let[r]=t;if(r&&r.target===u&&p){p.unobserve(e);cancelAnimationFrame(d);d=requestAnimationFrame((()=>{p&&p.observe(e)}))}n()}));if(u&&!s){p.observe(u)}p.observe(e)}let b;let v=s?ft(t):null;if(s){m()}function m(){const e=ft(t);if(v&&(e.x!==v.x||e.y!==v.y||e.width!==v.width||e.height!==v.height)){n()}v=e;b=requestAnimationFrame(m)}n();return()=>{c.forEach((t=>{o&&t.removeEventListener("scroll",n);i&&t.removeEventListener("resize",n)}));f&&f();p&&p.disconnect();p=null;if(s){cancelAnimationFrame(b)}}}const Bt=(t,e,n)=>{const r=new Map;const o={platform:Tt,...n};const i={...o.platform,_c:r};return B(t,e,{...o,platform:i})};function Ct(t){if(!t){return[]}if(Array.isArray(t)){return t}if(t.nodeType!==undefined){return[t]}if(typeof t==="string"){t=document.querySelectorAll(t)}if(t.length!==undefined){return[].slice.call(t,0)}throw new TypeError("unexpected input "+String(t))}function Wt(t){var e=t.context,n=t.label,r=n===undefined?"context-to-element":n,o=t.resolveDocument,i=t.defaultToDocument;var a=Ct(e)[0];if(o&&a&&a.nodeType===Node.DOCUMENT_NODE){a=a.documentElement}if(!a&&i){return document.documentElement}if(!a){throw new TypeError(r+" requires valid options.context")}if(a.nodeType!==Node.ELEMENT_NODE&&a.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){throw new TypeError(r+" requires options.context to be an Element")}return a}function Rt(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=t.context;var n=[];var r=Wt({label:"get/parents",context:e});while(r){n.push(r);r=r.parentNode;if(r&&r.nodeType!==Node.ELEMENT_NODE){r=null}}return n}var Ft=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector"];var jt=null;function Lt(t){Ft.some((function(e){if(!t[e]){return false}jt=e;return true}))}function Dt(t,e){if(!jt){Lt(t)}return t[jt](e)}var $t=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function Zt(t,e,n){return n={path:e,exports:{},require:function(t,e){return Nt()}},t(n,n.exports),n.exports}function Nt(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Ht=Zt((function(t,e){(function(){var n={function:true,object:true};var r=n[typeof window]&&window||this;var o=r;var i=n["object"]&&e;var a=n["object"]&&t&&!t.nodeType&&t;var l=i&&a&&typeof $t=="object"&&$t;if(l&&(l.global===l||l.window===l||l.self===l)){r=l}var s=Math.pow(2,53)-1;var u=/\bOpera/;var c=this;var f=Object.prototype;var d=f.hasOwnProperty;var p=f.toString;function b(t){t=String(t);return t.charAt(0).toUpperCase()+t.slice(1)}function v(t,e,n){var r={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};if(e&&n&&/^Win/i.test(t)&&!/^Windows Phone /i.test(t)&&(r=r[/[\d.]+$/.exec(t)])){t="Windows "+r}t=String(t);if(e&&n){t=t.replace(RegExp(e,"i"),n)}t=g(t.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]);return t}function m(t,e){var n=-1,r=t?t.length:0;if(typeof r=="number"&&r>-1&&r<=s){while(++n<r){e(t[n],n,t)}}else{h(t,e)}}function g(t){t=A(t);return/^(?:webOS|i(?:OS|P))/.test(t)?t:b(t)}function h(t,e){for(var n in t){if(d.call(t,n)){e(t[n],n,t)}}}function x(t){return t==null?b(t):p.call(t).slice(8,-1)}function y(t,e){var n=t!=null?typeof t[e]:"number";return!/^(?:boolean|number|string|undefined)$/.test(n)&&(n=="object"?!!t[e]:true)}function w(t){return String(t).replace(/([ -])(?!$)/g,"$1?")}function S(t,e){var n=null;m(t,(function(r,o){n=e(n,r,o,t)}));return n}function A(t){return String(t).replace(/^ +| +$/g,"")}function O(t){var e=r;var n=t&&typeof t=="object"&&x(t)!="String";if(n){e=t;t=null}var i=e.navigator||{};var a=i.userAgent||"";t||(t=a);var l=n||c==o;var s=n?!!i.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(p.toString());var f="Object",d=n?f:"ScriptBridgingProxyObject",b=n?f:"Environment",m=n&&e.java?"JavaPackage":x(e.java),E=n?f:"RuntimeObject";var k=/\bJava/.test(m)&&e.java;var M=k&&x(e.environment)==b;var T=k?"a":"α";var P=k?"b":"β";var I=e.document||{};var B=e.operamini||e.opera;var C=u.test(C=n&&B?B["[[Class]]"]:x(B))?C:B=null;var W;var R=t;var F=[];var j=null;var L=t==a;var D=L&&B&&typeof B.version=="function"&&B.version();var $;var Z=z([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]);var N=q(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt","SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]);var H=_([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation 3","PlayStation 4","PlayStation Vita","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]);var G=K({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{"PlayStation 4":1,"PlayStation 3":1,"PlayStation Vita":1}});var X=V(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function z(e){return S(e,(function(e,n){return e||RegExp("\\b"+(n.pattern||w(n))+"\\b","i").exec(t)&&(n.label||n)}))}function K(e){return S(e,(function(e,n,r){return e||(n[H]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(H)]||RegExp("\\b"+w(r)+"(?:\\b|\\w*\\d)","i").exec(t))&&r}))}function q(e){return S(e,(function(e,n){return e||RegExp("\\b"+(n.pattern||w(n))+"\\b","i").exec(t)&&(n.label||n)}))}function V(e){return S(e,(function(e,n){var r=n.pattern||w(n);if(!e&&(e=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))){e=v(e,r,n.label||n)}return e}))}function _(e){return S(e,(function(e,n){var r=n.pattern||w(n);if(!e&&(e=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))){if((e=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])){e[0]+=" "+e[1]}n=n.label||n;e=g(e[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))}return e}))}function J(e){return S(e,(function(e,n){return e||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null}))}function U(){return this.description||""}Z&&(Z=[Z]);if(G&&!H){H=_([G])}if(W=/\bGoogle TV\b/.exec(H)){H=W[0]}if(/\bSimulator\b/i.test(t)){H=(H?H+" ":"")+"Simulator"}if(N=="Opera Mini"&&/\bOPiOS\b/.test(t)){F.push("running in Turbo/Uncompressed mode")}if(N=="IE"&&/\blike iPhone OS\b/.test(t)){W=O(t.replace(/like iPhone OS/,""));G=W.manufacturer;H=W.product}else if(/^iP/.test(H)){N||(N="Safari");X="iOS"+((W=/ OS ([\d_]+)/i.exec(t))?" "+W[1].replace(/_/g,"."):"")}else if(N=="Konqueror"&&!/buntu/i.test(X)){X="Kubuntu"}else if(G&&G!="Google"&&(/Chrome/.test(N)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(H))||/\bAndroid\b/.test(X)&&/^Chrome/.test(N)&&/\bVersion\//i.test(t)){N="Android Browser";X=/\bAndroid\b/.test(X)?X:"Android"}else if(N=="Silk"){if(!/\bMobi/i.test(t)){X="Android";F.unshift("desktop mode")}if(/Accelerated *= *true/i.test(t)){F.unshift("accelerated")}}else if(N=="PaleMoon"&&(W=/\bFirefox\/([\d.]+)\b/.exec(t))){F.push("identifying as Firefox "+W[1])}else if(N=="Firefox"&&(W=/\b(Mobile|Tablet|TV)\b/i.exec(t))){X||(X="Firefox OS");H||(H=W[1])}else if(!N||(W=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(N))){if(N&&!H&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(W+"/")+8))){N=null}if((W=H||G||X)&&(H||G||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(X))){N=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(X)?X:W)+" Browser"}}if(!D){D=J(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|Silk(?!/[\\d.]+$))","Version",w(N),"(?:Firefox|Minefield|NetFront)"])}if(W=Z=="iCab"&&parseFloat(D)>3&&"WebKit"||/\bOpera\b/.test(N)&&(/\bOPR\b/.test(t)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test(Z)&&"WebKit"||!Z&&/\bMSIE\b/i.test(t)&&(X=="Mac OS"?"Tasman":"Trident")||Z=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(N)&&"NetFront"){Z=[W]}if(N=="IE"&&(W=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])){N+=" Mobile";X="Windows Phone "+(/\+$/.test(W)?W:W+".x");F.unshift("desktop mode")}else if(/\bWPDesktop\b/i.test(t)){N="IE Mobile";X="Windows Phone 8.x";F.unshift("desktop mode");D||(D=(/\brv:([\d.]+)/.exec(t)||0)[1])}else if(N!="IE"&&Z=="Trident"&&(W=/\brv:([\d.]+)/.exec(t))){if(N){F.push("identifying as "+N+(D?" "+D:""))}N="IE";D=W[1]}if(L){if(y(e,"global")){if(k){W=k.lang.System;R=W.getProperty("os.arch");X=X||W.getProperty("os.name")+" "+W.getProperty("os.version")}if(l&&y(e,"system")&&(W=[e.system])[0]){X||(X=W[0].os||null);try{W[1]=e.require("ringo/engine").version;D=W[1].join(".");N="RingoJS"}catch(t){if(W[0].global.system==e.system){N="Narwhal"}}}else if(typeof e.process=="object"&&!e.process.browser&&(W=e.process)){N="Node.js";R=W.arch;X=W.platform;D=/[\d.]+/.exec(W.version)[0]}else if(M){N="Rhino"}}else if(x(W=e.runtime)==d){N="Adobe AIR";X=W.flash.system.Capabilities.os}else if(x(W=e.phantom)==E){N="PhantomJS";D=(W=W.version||null)&&W.major+"."+W.minor+"."+W.patch}else if(typeof I.documentMode=="number"&&(W=/\bTrident\/(\d+)/i.exec(t))){D=[D,I.documentMode];if((W=+W[1]+4)!=D[1]){F.push("IE "+D[1]+" mode");Z&&(Z[1]="");D[1]=W}D=N=="IE"?String(D[1].toFixed(1)):D[0]}X=X&&g(X)}if(D&&(W=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(D)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(L&&i.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")){j=/b/i.test(W)?"beta":"alpha";D=D.replace(RegExp(W+"\\+?$"),"")+(j=="beta"?P:T)+(/\d+\+?/.exec(W)||"")}if(N=="Fennec"||N=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(X)){N="Firefox Mobile"}else if(N=="Maxthon"&&D){D=D.replace(/\.[\d.]+/,".x")}else if(/\bXbox\b/i.test(H)){X=null;if(H=="Xbox 360"&&/\bIEMobile\b/.test(t)){F.unshift("mobile mode")}}else if((/^(?:Chrome|IE|Opera)$/.test(N)||N&&!H&&!/Browser|Mobi/.test(N))&&(X=="Windows CE"||/Mobi/i.test(t))){N+=" Mobile"}else if(N=="IE"&&L&&e.external===null){F.unshift("platform preview")}else if((/\bBlackBerry\b/.test(H)||/\bBB10\b/.test(t))&&(W=(RegExp(H.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||D)){W=[W,/BB10/.test(t)];X=(W[1]?(H=null,G="BlackBerry"):"Device Software")+" "+W[0];D=null}else if(this!=h&&H!="Wii"&&(L&&B||/Opera/.test(N)&&/\b(?:MSIE|Firefox)\b/i.test(t)||N=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(X)||N=="IE"&&(X&&!/^Win/.test(X)&&D>5.5||/\bWindows XP\b/.test(X)&&D>8||D==8&&!/\bTrident\b/.test(t)))&&!u.test(W=O.call(h,t.replace(u,"")+";"))&&W.name){W="ing as "+W.name+((W=W.version)?" "+W:"");if(u.test(N)){if(/\bIE\b/.test(W)&&X=="Mac OS"){X=null}W="identify"+W}else{W="mask"+W;if(C){N=g(C.replace(/([a-z])([A-Z])/g,"$1 $2"))}else{N="Opera"}if(/\bIE\b/.test(W)){X=null}if(!L){D=null}}Z=["Presto"];F.push(W)}if(W=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1]){W=[parseFloat(W.replace(/\.(\d)$/,".0$1")),W];if(N=="Safari"&&W[1].slice(-1)=="+"){N="WebKit Nightly";j="alpha";D=W[1].slice(0,-1)}else if(D==W[1]||D==(W[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])){D=null}W[1]=(/\bChrome\/([\d.]+)/i.exec(t)||0)[1];if(W[0]==537.36&&W[2]==537.36&&parseFloat(W[1])>=28&&Z=="WebKit"){Z=["Blink"]}if(!L||!s&&!W[1]){Z&&(Z[1]="like Safari");W=(W=W[0],W<400?1:W<500?2:W<526?3:W<533?4:W<534?"4+":W<535?5:W<537?6:W<538?7:W<601?8:"8")}else{Z&&(Z[1]="like Chrome");W=W[1]||(W=W[0],W<530?1:W<532?2:W<532.05?3:W<533?4:W<534.03?5:W<534.07?6:W<534.1?7:W<534.13?8:W<534.16?9:W<534.24?10:W<534.3?11:W<535.01?12:W<535.02?"13+":W<535.07?15:W<535.11?16:W<535.19?17:W<536.05?18:W<536.1?19:W<537.01?20:W<537.11?"21+":W<537.13?23:W<537.18?24:W<537.24?25:W<537.36?26:Z!="Blink"?"27":"28")}Z&&(Z[1]+=" "+(W+=typeof W=="number"?".x":/[.+]/.test(W)?"":"+"));if(N=="Safari"&&(!D||parseInt(D)>45)){D=W}}if(N=="Opera"&&(W=/\bzbov|zvav$/.exec(X))){N+=" ";F.unshift("desktop mode");if(W=="zvav"){N+="Mini";D=null}else{N+="Mobile"}X=X.replace(RegExp(" *"+W+"$"),"")}else if(N=="Safari"&&/\bChrome\b/.exec(Z&&Z[1])){F.unshift("desktop mode");N="Chrome Mobile";D=null;if(/\bOS X\b/.test(X)){G="Apple";X="iOS 4.3+"}else{X=null}}if(D&&D.indexOf(W=/[\d.]+$/.exec(X))==0&&t.indexOf("/"+W+"-")>-1){X=A(X.replace(W,""))}if(Z&&!/\b(?:Avant|Nook)\b/.test(N)&&(/Browser|Lunascape|Maxthon/.test(N)||N!="Safari"&&/^iOS/.test(X)&&/\bSafari\b/.test(Z[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Sleipnir|Web)/.test(N)&&Z[1])){(W=Z[Z.length-1])&&F.push(W)}if(F.length){F=["("+F.join("; ")+")"]}if(G&&H&&H.indexOf(G)<0){F.push("on "+G)}if(H){F.push((/^on /.test(F[F.length-1])?"":"on ")+H)}if(X){W=/ ([\d.+]+)$/.exec(X);$=W&&X.charAt(X.length-W[0].length-1)=="/";X={architecture:32,family:W&&!$?X.replace(W[0],""):X,version:W?W[1]:null,toString:function(){var t=this.version;return this.family+(t&&!$?" "+t:"")+(this.architecture==64?" 64-bit":"")}}}if((W=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(R))&&!/\bi686\b/i.test(R)){if(X){X.architecture=64;X.family=X.family.replace(RegExp(" *"+W),"")}if(N&&(/\bWOW64\b/i.test(t)||L&&/\w(?:86|32)$/.test(i.cpuClass||i.platform)&&!/\bWin64; x64\b/i.test(t))){F.unshift("32-bit")}}else if(X&&/^OS X/.test(X.family)&&N=="Chrome"&&parseFloat(D)>=39){X.architecture=64}t||(t=null);var Y={};Y.description=t;Y.layout=Z&&Z[0];Y.manufacturer=G;Y.name=N;Y.prerelease=j;Y.product=H;Y.ua=t;Y.version=N&&D;Y.os=X||{architecture:null,family:null,version:null,toString:function(){return"null"}};Y.parse=O;Y.toString=U;if(Y.version){F.unshift(D)}if(Y.name){F.unshift(N)}if(X&&N&&!(X==String(X).split(" ")[0]&&(X==N.split(" ")[0]||H))){F.push(H?"("+X+")":"on "+X)}if(F.length){Y.description=F.join(" ")}return Y}var E=O();if(i&&a){h(E,(function(t,e){i[e]=t}))}else{r.platform=E}}).call($t)}));var Gt=JSON.parse(JSON.stringify(Ht));var Xt=Gt.os.family||"";var zt=Xt==="Android";var Kt=Xt.slice(0,7)==="Windows";var qt=Xt==="OS X";var Vt=Xt==="iOS";var _t=Gt.layout==="Blink";var Jt=Gt.layout==="Gecko";var Ut=Gt.layout==="Trident";var Yt=Gt.layout==="EdgeHTML";var Qt=Gt.layout==="WebKit";var te=parseFloat(Gt.version);var ee=Math.floor(te);Gt.majorVersion=ee;Gt.is={ANDROID:zt,WINDOWS:Kt,OSX:qt,IOS:Vt,BLINK:_t,GECKO:Jt,TRIDENT:Ut,EDGE:Yt,WEBKIT:Qt,IE9:Ut&&ee===9,IE10:Ut&&ee===10,IE11:Ut&&ee===11};function ne(){var t={activeElement:document.activeElement,windowScrollTop:window.scrollTop,windowScrollLeft:window.scrollLeft,bodyScrollTop:document.body.scrollTop,bodyScrollLeft:document.body.scrollLeft};var e=document.createElement("iframe");e.setAttribute("style","position:absolute; position:fixed; top:0; left:-2px; width:1px; height:1px; overflow:hidden;");e.setAttribute("aria-live","off");e.setAttribute("aria-busy","true");e.setAttribute("aria-hidden","true");document.body.appendChild(e);var n=e.contentWindow;var r=n.document;r.open();r.close();var o=r.createElement("div");r.body.appendChild(o);t.iframe=e;t.wrapper=o;t.window=n;t.document=r;return t}function re(t,e){t.wrapper.innerHTML="";var n=typeof e.element==="string"?t.document.createElement(e.element):e.element(t.wrapper,t.document);var r=e.mutate&&e.mutate(n,t.wrapper,t.document);if(!r&&r!==false){r=n}!n.parentNode&&t.wrapper.appendChild(n);r&&r.focus&&r.focus();return e.validate?e.validate(n,r,t.document):t.document.activeElement===r}function oe(t){if(t.activeElement===document.body){document.activeElement&&document.activeElement.blur&&document.activeElement.blur();if(Gt.is.IE10){document.body.focus()}}else{t.activeElement&&t.activeElement.focus&&t.activeElement.focus()}document.body.removeChild(t.iframe);window.scrollTop=t.windowScrollTop;window.scrollLeft=t.windowScrollLeft;document.body.scrollTop=t.bodyScrollTop;document.body.scrollLeft=t.bodyScrollLeft}function ie(t){var e=ne();var n={};Object.keys(t).map((function(r){n[r]=re(e,t[r])}));oe(e);return n}var ae="1.4.1";function le(t){var e=void 0;try{e=window.localStorage&&window.localStorage.getItem(t);e=e?JSON.parse(e):{}}catch(t){e={}}return e}function se(t,e){if(!document.hasFocus()){try{window.localStorage&&window.localStorage.removeItem(t)}catch(t){}return}try{window.localStorage&&window.localStorage.setItem(t,JSON.stringify(e))}catch(t){}}var ue=typeof window!=="undefined"&&window.navigator.userAgent||"";var ce="ally-supports-cache";var fe=le(ce);if(fe.userAgent!==ue||fe.version!==ae){fe={}}fe.userAgent=ue;fe.version=ae;const de={get:function t(){return fe},set:function t(e){Object.keys(e).forEach((function(t){fe[t]=e[t]}));fe.time=(new Date).toISOString();se(ce,fe)}};function pe(){var t=void 0;try{document.querySelector("html >>> :first-child");t=">>>"}catch(e){try{document.querySelector("html /deep/ :first-child");t="/deep/"}catch(e){t=""}}return t}const be="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";const ve={element:"div",mutate:function t(e){e.innerHTML='<map name="image-map-tabindex-test">'+'<area shape="rect" coords="63,19,144,45"></map>'+'<img usemap="#image-map-tabindex-test" tabindex="-1" alt="" src="'+be+'">';return e.querySelector("area")}};const me={element:"div",mutate:function t(e){e.innerHTML='<map name="image-map-tabindex-test">'+'<area href="#void" tabindex="-1" shape="rect" coords="63,19,144,45"></map>'+'<img usemap="#image-map-tabindex-test" alt="" src="'+be+'">';return false},validate:function t(e,n,r){if(Gt.is.GECKO){return true}var o=e.querySelector("area");o.focus();return r.activeElement===o}};const ge={element:"div",mutate:function t(e){e.innerHTML='<map name="image-map-area-href-test">'+'<area shape="rect" coords="63,19,144,45"></map>'+'<img usemap="#image-map-area-href-test" alt="" src="'+be+'">';return e.querySelector("area")},validate:function t(e,n,r){if(Gt.is.GECKO){return true}return r.activeElement===n}};const he={name:"can-focus-audio-without-controls",element:"audio",mutate:function t(e){try{e.setAttribute("src",be)}catch(t){}}};const xe="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ";const ye={element:"div",mutate:function t(e){e.innerHTML='<map name="broken-image-map-test"><area href="#void" shape="rect" coords="63,19,144,45"></map>'+'<img usemap="#broken-image-map-test" alt="" src="'+xe+'">';return e.querySelector("area")}};const we={element:"div",mutate:function t(e){e.setAttribute("tabindex","-1");e.setAttribute("style","display: -webkit-flex; display: -ms-flexbox; display: flex;");e.innerHTML='<span style="display: block;">hello</span>';return e.querySelector("span")}};const Se={element:"fieldset",mutate:function t(e){e.setAttribute("tabindex",0);e.setAttribute("disabled","disabled")}};const Ae={element:"fieldset",mutate:function t(e){e.innerHTML="<legend>legend</legend><p>content</p>"}};const Oe={element:"span",mutate:function t(e){e.setAttribute("style","display: -webkit-flex; display: -ms-flexbox; display: flex;");e.innerHTML='<span style="display: block;">hello</span>'}};const Ee={element:"form",mutate:function t(e){e.setAttribute("tabindex",0);e.setAttribute("disabled","disabled")}};const ke={element:"a",mutate:function t(e){e.href="#void";e.innerHTML='<img ismap src="'+be+'" alt="">';return e.querySelector("img")}};const Me={element:"div",mutate:function t(e){e.innerHTML='<map name="image-map-tabindex-test"><area href="#void" shape="rect" coords="63,19,144,45"></map>'+'<img usemap="#image-map-tabindex-test" tabindex="-1" alt="" '+'src="'+be+'">';return e.querySelector("img")}};const Te={element:function t(e,n){var r=n.createElement("iframe");e.appendChild(r);var o=r.contentWindow.document;o.open();o.close();return r},mutate:function t(e){e.style.visibility="hidden";var n=e.contentWindow.document;var r=n.createElement("input");n.body.appendChild(r);return r},validate:function t(e){var n=e.contentWindow.document;var r=n.querySelector("input");return n.activeElement===r}};var Pe=!Gt.is.WEBKIT;function Ie(){return Pe}const Be={element:"div",mutate:function t(e){e.setAttribute("tabindex","invalid-value")}};const Ce={element:"label",mutate:function t(e){e.setAttribute("tabindex","-1")},validate:function t(e,n,r){e.focus();return r.activeElement===e}};const We="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtb"+"G5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBpZD0ic3ZnIj48dGV4dCB4PSIxMCIgeT0iMjAiIGlkPSJ"+"zdmctbGluay10ZXh0Ij50ZXh0PC90ZXh0Pjwvc3ZnPg==";const Re={element:"object",mutate:function t(e){e.setAttribute("type","image/svg+xml");e.setAttribute("data",We);e.setAttribute("width","200");e.setAttribute("height","50");e.style.visibility="hidden"}};const Fe={name:"can-focus-object-svg",element:"object",mutate:function t(e){e.setAttribute("type","image/svg+xml");e.setAttribute("data",We);e.setAttribute("width","200");e.setAttribute("height","50")},validate:function t(e,n,r){if(Gt.is.GECKO){return true}return r.activeElement===e}};var je=!Gt.is.IE9;function Le(){return je}const De={element:"div",mutate:function t(e){e.innerHTML='<map name="focus-redirect-img-usemap"><area href="#void" shape="rect" coords="63,19,144,45"></map>'+'<img usemap="#focus-redirect-img-usemap" alt="" '+'src="'+be+'">';return e.querySelector("img")},validate:function t(e,n,r){var o=e.querySelector("area");return r.activeElement===o}};const $e={element:"fieldset",mutate:function t(e){e.innerHTML='<legend>legend</legend><input tabindex="-1"><input tabindex="0">';return false},validate:function t(e,n,r){var o=e.querySelector('input[tabindex="-1"]');var i=e.querySelector('input[tabindex="0"]');e.focus();e.querySelector("legend").focus();return r.activeElement===o&&"focusable"||r.activeElement===i&&"tabbable"||""}};const Ze={element:"div",mutate:function t(e){e.setAttribute("style","width: 100px; height: 50px; overflow: auto;");e.innerHTML='<div style="width: 500px; height: 40px;">scrollable content</div>';return e.querySelector("div")}};const Ne={element:"div",mutate:function t(e){e.setAttribute("style","width: 100px; height: 50px;");e.innerHTML='<div style="width: 500px; height: 40px;">scrollable content</div>'}};const He={element:"div",mutate:function t(e){e.setAttribute("style","width: 100px; height: 50px; overflow: auto;");e.innerHTML='<div style="width: 500px; height: 40px;">scrollable content</div>'}};const Ge={element:"details",mutate:function t(e){e.innerHTML="<summary>foo</summary><p>content</p>";return e.firstElementChild}};function Xe(){var t=document.createElement("div");t.innerHTML='<svg><foreignObject width="30" height="30">\n <input type="text"/>\n </foreignObject></svg>';return t.firstChild.firstChild}function ze(t){var e=t.ownerSVGElement||t.nodeName.toLowerCase()==="svg";if(!e){return false}var n=Xe();t.appendChild(n);var r=n.querySelector("input");r.focus();r.disabled=true;t.removeChild(n);return true}function Ke(t){return'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+t+"</svg>"}function qe(t){if(t.focus){return}try{HTMLElement.prototype.focus.call(t)}catch(e){ze(t)}}function Ve(t,e,n){qe(e);return n.activeElement===e}const _e={element:"div",mutate:function t(e){e.innerHTML=Ke('<text focusable="true">a</text>');return e.querySelector("text")},validate:Ve};const Je={element:"div",mutate:function t(e){e.innerHTML=Ke('<text tabindex="0">a</text>');return e.querySelector("text")},validate:Ve};const Ue={element:"div",mutate:function t(e){e.innerHTML=Ke('<text tabindex="-1">a</text>');return e.querySelector("text")},validate:Ve};const Ye={element:"div",mutate:function t(e){e.innerHTML=Ke(['<g id="ally-test-target"><a xlink:href="#void"><text>link</text></a></g>','<use xlink:href="#ally-test-target" x="0" y="0" tabindex="-1" />'].join(""));return e.querySelector("use")},validate:Ve};const Qe={element:"div",mutate:function t(e){e.innerHTML=Ke('<foreignObject tabindex="-1"><input type="text" /></foreignObject>');return e.querySelector("foreignObject")||e.getElementsByTagName("foreignObject")[0]},validate:Ve};var tn=Boolean(Gt.is.GECKO&&typeof SVGElement!=="undefined"&&SVGElement.prototype.focus);function en(){return tn}const nn={element:"div",mutate:function t(e){e.innerHTML=Ke("");return e.firstChild},validate:Ve};const rn={element:"div",mutate:function t(e){e.setAttribute("tabindex","3x")}};const on={element:"table",mutate:function t(e,n,r){var o=r.createDocumentFragment();o.innerHTML="<tr><td>cell</td></tr>";e.appendChild(o)}};const an={element:"video",mutate:function t(e){try{e.setAttribute("src",be)}catch(t){}}};var ln=Gt.is.GECKO||Gt.is.TRIDENT||Gt.is.EDGE;function sn(){return ln}var un={cssShadowPiercingDeepCombinator:pe,focusInZeroDimensionObject:Ie,focusObjectSwf:Le,focusSvgInIframe:en,tabsequenceAreaAtImgPosition:sn};var cn={focusAreaImgTabindex:ve,focusAreaTabindex:me,focusAreaWithoutHref:ge,focusAudioWithoutControls:he,focusBrokenImageMap:ye,focusChildrenOfFocusableFlexbox:we,focusFieldsetDisabled:Se,focusFieldset:Ae,focusFlexboxContainer:Oe,focusFormDisabled:Ee,focusImgIsmap:ke,focusImgUsemapTabindex:Me,focusInHiddenIframe:Te,focusInvalidTabindex:Be,focusLabelTabindex:Ce,focusObjectSvg:Fe,focusObjectSvgHidden:Re,focusRedirectImgUsemap:De,focusRedirectLegend:$e,focusScrollBody:Ze,focusScrollContainerWithoutOverflow:Ne,focusScrollContainer:He,focusSummary:Ge,focusSvgFocusableAttribute:_e,focusSvgTabindexAttribute:Je,focusSvgNegativeTabindexAttribute:Ue,focusSvgUseTabindex:Ye,focusSvgForeignobjectTabindex:Qe,focusSvg:nn,focusTabindexTrailingCharacters:rn,focusTable:on,focusVideoWithoutControls:an};function fn(){var t=ie(cn);Object.keys(un).forEach((function(e){t[e]=un[e]()}));return t}var dn=null;function pn(){if(dn){return dn}dn=de.get();if(!dn.time){de.set(fn());dn=de.get()}return dn}var bn=void 0;var vn=/^\s*(-|\+)?[0-9]+\s*$/;var mn=/^\s*(-|\+)?[0-9]+.*$/;function gn(t){if(!bn){bn=pn()}var e=bn.focusTabindexTrailingCharacters?mn:vn;var n=Wt({label:"is/valid-tabindex",resolveDocument:true,context:t});var r=n.hasAttribute("tabindex");var o=n.hasAttribute("tabIndex");if(!r&&!o){return false}var i=n.ownerSVGElement||n.nodeName.toLowerCase()==="svg";if(i&&!bn.focusSvgTabindexAttribute){return false}if(bn.focusInvalidTabindex){return true}var a=n.getAttribute(r?"tabindex":"tabIndex");if(a==="-32768"){return false}return Boolean(a&&e.test(a))}function hn(t){if(!gn(t)){return null}var e=t.hasAttribute("tabindex");var n=e?"tabindex":"tabIndex";var r=parseInt(t.getAttribute(n),10);return isNaN(r)?-1:r}function xn(t){var e=t.webkitUserModify||"";return Boolean(e&&e.indexOf("write")!==-1)}function yn(t){return[t.getPropertyValue("overflow"),t.getPropertyValue("overflow-x"),t.getPropertyValue("overflow-y")].some((function(t){return t==="auto"||t==="scroll"}))}function wn(t){return t.display.indexOf("flex")>-1}function Sn(t,e,n,r){if(e!=="div"&&e!=="span"){return false}if(n&&n!=="div"&&n!=="span"&&!yn(r)){return false}return t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth}var An=void 0;function On(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=t.context,n=t.except,r=n===undefined?{flexbox:false,scrollable:false,shadow:false}:n;if(!An){An=pn()}var o=Wt({label:"is/focus-relevant",resolveDocument:true,context:e});if(!r.shadow&&o.shadowRoot){return true}var i=o.nodeName.toLowerCase();if(i==="input"&&o.type==="hidden"){return false}if(i==="input"||i==="select"||i==="button"||i==="textarea"){return true}if(i==="legend"&&An.focusRedirectLegend){return true}if(i==="label"){return true}if(i==="area"){return true}if(i==="a"&&o.hasAttribute("href")){return true}if(i==="object"&&o.hasAttribute("usemap")){return false}if(i==="object"){var a=o.getAttribute("type");if(!An.focusObjectSvg&&a==="image/svg+xml"){return false}else if(!An.focusObjectSwf&&a==="application/x-shockwave-flash"){return false}}if(i==="iframe"||i==="object"){return true}if(i==="embed"||i==="keygen"){return true}if(o.hasAttribute("contenteditable")){return true}if(i==="audio"&&(An.focusAudioWithoutControls||o.hasAttribute("controls"))){return true}if(i==="video"&&(An.focusVideoWithoutControls||o.hasAttribute("controls"))){return true}if(An.focusSummary&&i==="summary"){return true}var l=gn(o);if(i==="img"&&o.hasAttribute("usemap")){return l&&An.focusImgUsemapTabindex||An.focusRedirectImgUsemap}if(An.focusTable&&(i==="table"||i==="td")){return true}if(An.focusFieldset&&i==="fieldset"){return true}var s=i==="svg";var u=o.ownerSVGElement;var c=o.getAttribute("focusable");var f=hn(o);if(i==="use"&&f!==null&&!An.focusSvgUseTabindex){return false}if(i==="foreignobject"){return f!==null&&An.focusSvgForeignobjectTabindex}if(Dt(o,"svg a")&&o.hasAttribute("xlink:href")){return true}if((s||u)&&o.focus&&!An.focusSvgNegativeTabindexAttribute&&f<0){return false}if(s){return l||An.focusSvg||An.focusSvgInIframe||Boolean(An.focusSvgFocusableAttribute&&c&&c==="true")}if(u){if(An.focusSvgTabindexAttribute&&l){return true}if(An.focusSvgFocusableAttribute){return c==="true"}}if(l){return true}var d=window.getComputedStyle(o,null);if(xn(d)){return true}if(An.focusImgIsmap&&i==="img"&&o.hasAttribute("ismap")){var p=Rt({context:o}).some((function(t){return t.nodeName.toLowerCase()==="a"&&t.hasAttribute("href")}));if(p){return true}}if(!r.scrollable&&An.focusScrollContainer){if(An.focusScrollContainerWithoutOverflow){if(Sn(o,i)){return true}}else if(yn(d)){return true}}if(!r.flexbox&&An.focusFlexboxContainer&&wn(d)){return true}var b=o.parentElement;if(!r.scrollable&&b){var v=b.nodeName.toLowerCase();var m=window.getComputedStyle(b,null);if(An.focusScrollBody&&Sn(b,i,v,m)){return true}if(An.focusChildrenOfFocusableFlexbox){if(wn(m)){return true}}}return false}On.except=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var e=function e(n){return On({context:n,except:t})};e.rules=On;return e};var En=On.except({});function kn(t,e){if(t.findIndex){return t.findIndex(e)}var n=t.length;if(n===0){return-1}for(var r=0;r<n;r++){if(e(t[r],r,t)){return r}}return-1}function Mn(t){try{return t.contentDocument||t.contentWindow&&t.contentWindow.document||t.getSVGDocument&&t.getSVGDocument()||null}catch(t){return null}}function Tn(t){if(!t){return document}if(t.nodeType===Node.DOCUMENT_NODE){return t}return t.ownerDocument||document}function Pn(t){var e=Tn(t);return e.defaultView||window}var In=void 0;function Bn(t){if(typeof In!=="string"){var e=pe();if(e){In=", html "+e+" "}}if(!In){return t}return t+In+t.replace(/\s*,\s*/g,",").split(",").join(In)}var Cn=void 0;function Wn(t){if(!Cn){Cn=Bn("object, iframe")}if(t._frameElement!==undefined){return t._frameElement}t._frameElement=null;var e=t.parent.document.querySelectorAll(Cn);[].some.call(e,(function(e){var n=Mn(e);if(n!==t.document){return false}t._frameElement=e;return true}));return t._frameElement}function Rn(t){var e=Pn(t);if(!e.parent||e.parent===e){return null}try{return e.frameElement||Wn(e)}catch(t){return null}}var Fn=/^(area)$/;function jn(t,e){return window.getComputedStyle(t,null).getPropertyValue(e)}function Ln(t){return t.some((function(t){return jn(t,"display")==="none"}))}function Dn(t){var e=kn(t,(function(t){var e=jn(t,"visibility");return e==="hidden"||e==="collapse"}));if(e===-1){return false}var n=kn(t,(function(t){return jn(t,"visibility")==="visible"}));if(n===-1){return true}if(e<n){return true}return false}function $n(t){var e=1;if(t[0].nodeName.toLowerCase()==="summary"){e=2}return t.slice(e).some((function(t){return t.nodeName.toLowerCase()==="details"&&t.open===false}))}function Zn(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=t.context,n=t.except,r=n===undefined?{notRendered:false,cssDisplay:false,cssVisibility:false,detailsElement:false,browsingContext:false}:n;var o=Wt({label:"is/visible",resolveDocument:true,context:e});var i=o.nodeName.toLowerCase();if(!r.notRendered&&Fn.test(i)){return true}var a=Rt({context:o});var l=i==="audio"&&!o.hasAttribute("controls");if(!r.cssDisplay&&Ln(l?a.slice(1):a)){return false}if(!r.cssVisibility&&Dn(a)){return false}if(!r.detailsElement&&$n(a)){return false}if(!r.browsingContext){var s=Rn(o);var u=Zn.except(r);if(s&&!u(s)){return false}}return true}Zn.except=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var e=function e(n){return Zn({context:n,except:t})};e.rules=Zn;return e};var Nn=Zn.except({});var Hn=Zt((function(t,e){(function(e,n){{t.exports=n(e)}})(typeof $t!="undefined"?$t:$t,(function(t){if(t.CSS&&t.CSS.escape){return t.CSS.escape}var e=function(t){if(arguments.length==0){throw new TypeError("`CSS.escape` requires an argument.")}var e=String(t);var n=e.length;var r=-1;var o;var i="";var a=e.charCodeAt(0);while(++r<n){o=e.charCodeAt(r);if(o==0){i+="�";continue}if(o>=1&&o<=31||o==127||r==0&&o>=48&&o<=57||r==1&&o>=48&&o<=57&&a==45){i+="\\"+o.toString(16)+" ";continue}if(r==0&&n==1&&o==45){i+="\\"+e.charAt(r);continue}if(o>=128||o==45||o==95||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122){i+=e.charAt(r);continue}i+="\\"+e.charAt(r)}return i};if(!t.CSS){t.CSS={}}t.CSS.escape=e;return e}))}));function Gn(t){var e=t.parentElement;if(!e.name||e.nodeName.toLowerCase()!=="map"){return null}var n=Tn(t);return n.querySelector('img[usemap="#'+Hn(e.name)+'"]')||null}var Xn=void 0;function zn(t){if(!Xn){Xn=pn()}var e=Wt({label:"is/valid-area",context:t});var n=e.nodeName.toLowerCase();if(n!=="area"){return false}var r=e.hasAttribute("tabindex");if(!Xn.focusAreaTabindex&&r){return false}var o=Gn(e);if(!o||!Nn(o)){return false}if(!Xn.focusBrokenImageMap&&(!o.complete||!o.naturalHeight||o.offsetWidth<=0||o.offsetHeight<=0)){return false}if(!Xn.focusAreaWithoutHref&&!e.href){return Xn.focusAreaTabindex&&r||Xn.focusAreaImgTabindex&&o.hasAttribute("tabindex")}var i=Rt({context:o}).slice(1).some((function(t){var e=t.nodeName.toLowerCase();return e==="button"||e==="a"}));if(i){return false}return true}var Kn=void 0;var qn=void 0;var Vn={input:true,select:true,textarea:true,button:true,fieldset:true,form:true};function _n(t){if(!Kn){Kn=pn();if(Kn.focusFieldsetDisabled){delete Vn.fieldset}if(Kn.focusFormDisabled){delete Vn.form}qn=new RegExp("^("+Object.keys(Vn).join("|")+")$")}var e=Wt({label:"is/native-disabled-supported",context:t});var n=e.nodeName.toLowerCase();return Boolean(qn.test(n))}var Jn=void 0;function Un(t){var e=t.nodeName.toLowerCase();return e==="fieldset"&&t.disabled}function Yn(t){var e=t.nodeName.toLowerCase();return e==="form"&&t.disabled}function Qn(t){if(!Jn){Jn=pn()}var e=Wt({label:"is/disabled",context:t});if(e.hasAttribute("data-ally-disabled")){return true}if(!_n(e)){return false}if(e.disabled){return true}var n=Rt({context:e});if(n.some(Un)){return true}if(!Jn.focusFormDisabled&&n.some(Yn)){return true}return false}function tr(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=t.context,n=t.except,r=n===undefined?{onlyFocusableBrowsingContext:false,visible:false}:n;var o=Wt({label:"is/only-tabbable",resolveDocument:true,context:e});if(!r.visible&&!Nn(o)){return false}if(!r.onlyFocusableBrowsingContext&&(Gt.is.GECKO||Gt.is.TRIDENT||Gt.is.EDGE)){var i=Rn(o);if(i){if(hn(i)<0){return false}}}var a=o.nodeName.toLowerCase();var l=hn(o);if(a==="label"&&Gt.is.GECKO){return l!==null&&l>=0}if(Gt.is.GECKO&&o.ownerSVGElement&&!o.focus){if(a==="a"&&o.hasAttribute("xlink:href")){if(Gt.is.GECKO){return true}}}return false}tr.except=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var e=function e(n){return tr({context:n,except:t})};e.rules=tr;return e};var er=tr.except({});var nr=void 0;function rr(t){var e=t.nodeName.toLowerCase();if(e==="embed"||e==="keygen"){return true}var n=hn(t);if(t.shadowRoot&&n===null){return true}if(e==="label"){return!nr.focusLabelTabindex||n===null}if(e==="legend"){return n===null}if(nr.focusSvgFocusableAttribute&&(t.ownerSVGElement||e==="svg")){var r=t.getAttribute("focusable");return r&&r==="false"}if(e==="img"&&t.hasAttribute("usemap")){return n===null||!nr.focusImgUsemapTabindex}if(e==="area"){return!zn(t)}return false}function or(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=t.context,n=t.except,r=n===undefined?{disabled:false,visible:false,onlyTabbable:false}:n;if(!nr){nr=pn()}var o=er.rules.except({onlyFocusableBrowsingContext:true,visible:r.visible});var i=Wt({label:"is/focusable",resolveDocument:true,context:e});var a=En.rules({context:i,except:r});if(!a||rr(i)){return false}if(!r.disabled&&Qn(i)){return false}if(!r.onlyTabbable&&o(i)){return false}if(!r.visible){var l={context:i,except:{}};if(nr.focusInHiddenIframe){l.except.browsingContext=true}if(nr.focusObjectSvgHidden){var s=i.nodeName.toLowerCase();if(s==="object"){l.except.cssVisibility=true}}if(!Nn.rules(l)){return false}}var u=Rn(i);if(u){var c=u.nodeName.toLowerCase();if(c==="object"&&!nr.focusInZeroDimensionObject){if(!u.offsetWidth||!u.offsetHeight){return false}}}var f=i.nodeName.toLowerCase();if(f==="svg"&&nr.focusSvgInIframe&&!u&&i.getAttribute("tabindex")===null){return false}return true}or.except=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var e=function e(n){return or({context:n,except:t})};e.rules=or;return e};var ir=or.except({});(()=>{var t=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...r}={}){super(t,r),this.oldState=String(e||""),this.newState=String(n||"")}},e=new WeakMap;function n(n,r,o){e.set(n,setTimeout((()=>{e.has(n)&&n.dispatchEvent(new t("toggle",{cancelable:!1,oldState:r,newState:o}))}),0))}var r=globalThis.ShadowRoot||function(){},o=globalThis.HTMLDialogElement||function(){},i=new WeakMap,a=new WeakMap,l=new WeakMap;function s(t){return l.get(t)||"hidden"}var u=new WeakMap;function c(t){let e=t.popoverTargetElement;if(!e)return;let n=s(e);t.popoverTargetAction==="show"&&n==="showing"||t.popoverTargetAction==="hide"&&n==="hidden"||(n==="showing"?O(e,!0,!0):f(e,!1)&&(u.set(e,t),A(e)))}function f(t,e){return!(t.popover!=="auto"&&t.popover!=="manual"||!t.isConnected||e&&s(t)!=="showing"||!e&&s(t)!=="hidden"||t instanceof o&&t.hasAttribute("open")||document.fullscreenElement===t)}function d(t){return t?Array.from(a.get(t.ownerDocument)||[]).indexOf(t)+1:0}function p(t){let e=m(t),n=g(t);return d(e)>d(n)?e:n}function b(t){let e=a.get(t);for(let t of e||[])if(!t.isConnected)e.delete(t);else return t;return null}function v(t){return typeof t.getRootNode=="function"?t.getRootNode():t.parentNode?v(t.parentNode):t}function m(t){for(;t;){if(t instanceof HTMLElement&&t.popover==="auto"&&l.get(t)==="showing")return t;if(t=t.parentElement||v(t),t instanceof r&&(t=t.host),t instanceof Document)return}}function g(t){for(;t;){let e=t.popoverTargetElement;if(e)return e;if(t=t.parentElement||v(t),t instanceof r&&(t=t.host),t instanceof Document)return}}function h(t){let e=new Map,n=0,r=t.ownerDocument;for(let t of a.get(r)||[])e.set(t,n),n+=1;e.set(t,n),n+=1;let o=null;function i(t){let n=m(t);if(n===null)return null;let r=e.get(n);(o===null||e.get(o)<r)&&(o=n)}return i(t?.parentElement),o}function x(t){return t.hidden||(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)&&t.disabled||t instanceof HTMLInputElement&&t.type==="hidden"||t instanceof HTMLAnchorElement&&t.href===""?!1:t.tabIndex!==-1}function y(t){if(t.shadowRoot&&t.shadowRoot.delegatesFocus!==!0)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;let r=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),o=r.currentNode;for(;o;){if(x(o))return o;o=r.nextNode()}}function w(t){y(t)?.focus()}var S=new WeakMap;function A(e){if(!f(e,!1))return;let r=e.ownerDocument;if(!e.dispatchEvent(new t("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!f(e,!1))return;let o=!1;if(e.popover==="auto"){let t=e.getAttribute("popover"),n=h(e)||r;if(k(n,!1,!0),t!==e.getAttribute("popover")||!f(e,!1))return}b(r)||(o=!0),S.delete(e);let s=r.activeElement;e.classList.add(":popover-open"),l.set(e,"showing"),i.has(r)||i.set(r,new Set),i.get(r).add(e),w(e),e.popover==="auto"&&(a.has(r)||a.set(r,new Set),a.get(r).add(e),I(u.get(e),!0)),o&&s&&e.popover==="auto"&&S.set(e,s),n(e,"closed","open")}function O(e,r=!1,o=!1){if(!f(e,!0))return;let s=e.ownerDocument;if(e.popover==="auto"&&(k(e,r,o),!f(e,!0))||(I(u.get(e),!1),u.delete(e),o&&(e.dispatchEvent(new t("beforetoggle",{oldState:"open",newState:"closed"})),!f(e,!0))))return;i.get(s)?.delete(e),a.get(s)?.delete(e),e.classList.remove(":popover-open"),l.set(e,"hidden"),o&&n(e,"open","closed");let c=S.get(e);c&&(S.delete(e),r&&c.focus())}function E(t,e=!1,n=!1){let r=b(t);for(;r;)O(r,e,n),r=b(t)}function k(t,e,n){let r=t.ownerDocument||t;if(t instanceof Document)return E(r,e,n);let o=null,i=!1;for(let e of a.get(r)||[])if(e===t)i=!0;else if(i){o=e;break}if(!i)return E(r,e,n);for(;o&&s(o)==="showing"&&a.get(r)?.size;)O(o,e,n)}var M=new WeakMap;function T(t){if(!t.isTrusted)return;let e=t.composedPath()[0];if(!e)return;let n=e.ownerDocument;if(!b(n))return;let r=p(e);if(r&&t.type==="pointerdown")M.set(n,r);else if(t.type==="pointerup"){let t=M.get(n)===r;M.delete(n),t&&k(r||n,!1,!0)}}var P=new WeakMap;function I(t,e=!1){if(!t)return;P.has(t)||P.set(t,t.getAttribute("aria-expanded"));let n=t.popoverTargetElement;if(n&&n.popover==="auto")t.setAttribute("aria-expanded",String(e));else{let e=P.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var B=globalThis.ShadowRoot||function(){};function C(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function W(t,e,n){let r=t[e];Object.defineProperty(t,e,{value(t){return r.call(this,n(t))}})}var R=/(^|[^\\]):popover-open\b/g,F=`\n [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 [popover]:is(dialog[open]) {\n display: revert;\n }\n\n [anchor].\\:popover-open {\n inset: auto;\n }\n\n [anchor]:is(:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n [popover] {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n [popover] {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n [popover] {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n\n [popover]:not(.\\:popover-open) {\n display: none;\n }\n`,j=null;function L(t){if(j===null)try{j=new CSSStyleSheet,j.replaceSync(F)}catch{j=!1}if(j===!1){let e=document.createElement("style");e.textContent=F,t instanceof Document?t.head.append(e):t.append(e)}else t.adoptedStyleSheets=[...t.adoptedStyleSheets,j]}function D(){window.ToggleEvent=window.ToggleEvent||t;function e(t){return t?.includes(":popover-open")&&(t=t.replace(R,"$1.\\:popover-open")),t}W(Document.prototype,"querySelector",e),W(Document.prototype,"querySelectorAll",e),W(Element.prototype,"querySelector",e),W(Element.prototype,"querySelectorAll",e),W(Element.prototype,"matches",e),W(Element.prototype,"closest",e),W(DocumentFragment.prototype,"querySelectorAll",e),W(DocumentFragment.prototype,"querySelectorAll",e),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let t=(this.getAttribute("popover")||"").toLowerCase();return t===""||t=="auto"?"auto":"manual"},set(t){this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){A(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){O(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){l.get(this)==="showing"&&t===void 0||t===!1?O(this,!0,!0):(t===void 0||t===!0)&&A(this)}}});let n=Element.prototype.attachShadow;n&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){let e=n.call(this,t);return L(e),e}}});let r=HTMLElement.prototype.attachInternals;r&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let t=r.call(this);return t.shadowRoot&&L(t.shadowRoot),t}}});let o=new WeakMap;function i(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(t===null)this.removeAttribute("popovertarget"),o.delete(this);else if(t instanceof Element)this.setAttribute("popovertarget",""),o.set(this,t);else throw new TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let t=o.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return o.delete(this),null;let e=v(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof B)&&n&&e.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return t==="show"||t==="hide"?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}i(HTMLButtonElement),i(HTMLInputElement);let a=t=>{if(!t.isTrusted)return;let e=t.composedPath()[0];if(!(e instanceof Element)||e?.shadowRoot)return;let n=v(e);if(!(n instanceof B||n instanceof Document))return;let r=e.closest("[popovertargetaction],[popovertarget]");if(r){c(r);return}},s=t=>{let e=t.key,n=t.target;n&&(e==="Escape"||e==="Esc")&&k(n.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",a),t.addEventListener("keydown",s),t.addEventListener("pointerdown",T),t.addEventListener("pointerup",T)})(document),L(document)}C()||D()})();
|
|
2
|
+
/*!
|
|
3
|
+
* long-press-event - v@version@
|
|
4
|
+
* Pure JavaScript long-press-event
|
|
5
|
+
* https://github.com/john-doherty/long-press-event
|
|
6
|
+
* @author John Doherty <www.johndoherty.info>
|
|
7
|
+
* @license MIT
|
|
8
|
+
*/(function(t,e){var n=null;var r="PointerEvent"in t||t.navigator&&"msPointerEnabled"in t.navigator;var o="ontouchstart"in t||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0;var i=r?"pointerdown":o?"touchstart":"mousedown";var a=r?"pointerup":o?"touchend":"mouseup";var l=r?"pointermove":o?"touchmove":"mousemove";var s=r?"pointerleave":o?"touchleave":"mouseleave";var u=0;var c=0;var f=10;var d=10;if(typeof t.CustomEvent!=="function"){t.CustomEvent=function(t,n){n=n||{bubbles:false,cancelable:false,detail:undefined};var r=e.createEvent("CustomEvent");r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail);return r};t.CustomEvent.prototype=t.Event.prototype}t.requestAnimFrame=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){t.setTimeout(e,1e3/60)}}();function p(e,n){if(!t.requestAnimationFrame&&!t.webkitRequestAnimationFrame&&!(t.mozRequestAnimationFrame&&t.mozCancelRequestAnimationFrame)&&!t.oRequestAnimationFrame&&!t.msRequestAnimationFrame)return t.setTimeout(e,n);var r=(new Date).getTime();var o={};var i=function(){var t=(new Date).getTime();var a=t-r;if(a>=n){e.call()}else{o.value=requestAnimFrame(i)}};o.value=requestAnimFrame(i);return o}function b(e){if(e){t.cancelAnimationFrame?t.cancelAnimationFrame(e.value):t.webkitCancelAnimationFrame?t.webkitCancelAnimationFrame(e.value):t.webkitCancelRequestAnimationFrame?t.webkitCancelRequestAnimationFrame(e.value):t.mozCancelRequestAnimationFrame?t.mozCancelRequestAnimationFrame(e.value):t.oCancelRequestAnimationFrame?t.oCancelRequestAnimationFrame(e.value):t.msCancelRequestAnimationFrame?t.msCancelRequestAnimationFrame(e.value):clearTimeout(e)}}function v(t){h();t=m(t);var n=this.dispatchEvent(new CustomEvent("long-press",{bubbles:true,cancelable:true,detail:{clientX:t.clientX,clientY:t.clientY,offsetX:t.offsetX,offsetY:t.offsetY,pageX:t.pageX,pageY:t.pageY},clientX:t.clientX,clientY:t.clientY,offsetX:t.offsetX,offsetY:t.offsetY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY}));if(!n){e.addEventListener("click",(function t(n){e.removeEventListener("click",t,true);x(n)}),true)}}function m(t){if(t.changedTouches!==undefined){return t.changedTouches[0]}return t}function g(t){h();var e=t.target;var r=parseInt(S(e,"data-long-press-delay","1500"),10);n=p(v.bind(e,t),r)}function h(t){b(n);n=null}function x(t){t.stopImmediatePropagation();t.preventDefault();t.stopPropagation()}function y(t){u=t.clientX;c=t.clientY;g(t)}function w(t){var e=Math.abs(u-t.clientX);var n=Math.abs(c-t.clientY);if(e>=f||n>=d){h()}}function S(t,n,r){while(t&&t!==e.documentElement){var o=t.getAttribute(n);if(o){return o}t=t.parentNode}return r}e.addEventListener(a,h,true);e.addEventListener(s,h,true);e.addEventListener(l,w,true);e.addEventListener("wheel",h,true);e.addEventListener("scroll",h,true);e.addEventListener(i,y,true)})(window,document);const ar=["primary","yellow"];const lr=":host,.bg-yellow{--post-bg-opacity:1;background-color:rgba(var(--post-bg-rgb), var(--post-bg-opacity)) !important;color:var(--post-contrast-color) !important}.bg-yellow{--post-contrast-color:#000;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-primary:hsl(0, 0%, 20%);--post-white:#fff;--post-black:#000;--post-success:#2c911c;--post-info:#cce4ee;--post-warning:#f49e00;--post-danger:#a51728;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-yellow-rgb:255, 204, 0;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-primary-rgb:51, 51, 51;--post-white-rgb:255, 255, 255;--post-black-rgb:0, 0, 0;--post-success-rgb:44, 145, 28;--post-info-rgb:204, 228, 238;--post-warning-rgb:244, 158, 0;--post-danger-rgb:165, 23, 40;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160}:host{--post-contrast-color:#fff;--post-contrast-color-inverted:#000;--post-dark:#faf9f8;--post-light:hsl(0, 0%, 20%);--post-gray-80:hsl(0, 0%, 90%);--post-gray-60:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-20:hsl(0, 0%, 40%);--post-gray-10:hsl(0, 0%, 20%);--post-contrast-color-rgb:255, 255, 255;--post-contrast-color-inverted-rgb:0, 0, 0;--post-dark-rgb:250, 249, 248;--post-light-rgb:51, 51, 51;--post-gray-80-rgb:230, 230, 230;--post-gray-60-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-20-rgb:102, 102, 102;--post-gray-10-rgb:51, 51, 51}:host{--post-bg-rgb:51, 51, 51}div{position:absolute;z-index:1070;width:max-content;max-width:30ch;margin:0;padding:.25rem .5rem;color:inherit;background-color:inherit;border-color:rgba(0,0,0,0);border-radius:4px;overflow:visible;pointer-events:none}.arrow{position:absolute;width:.7071067812rem;aspect-ratio:1/1;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1;border-right:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}.bg-yellow{--post-bg-rgb:255, 204, 0}";const sr={top:"bottom",right:"left",bottom:"top",left:"right"};const ur=class{validateBackgroundColor(t=this.backgroundColor){i(t,ar,`The post-tooltip "background-color" prop should contain one of those values: ${ar.join(", ")}`);if(t==="yellow"){this.tooltipClasses="bg-yellow"}else{this.tooltipClasses="bg-primary"}}constructor(e){t(this,e);this.tooltipClasses=undefined;this.backgroundColor="primary";this.placement="top";this.localShowTooltip=t=>this.show(t.target);this.localHideTooltip=this.hide.bind(this);this.localToggleTooltip=this.toggle.bind(this)}componentWillLoad(){this.validateBackgroundColor();document.body.appendChild(this.host)}connectedCallback(){if(!this.host.id){throw new Error("No id set: <post-tooltip> must have an id, linking it to it's target element using the data-tooltip-target attribute.")}if(!this.triggers){throw new Error(`No trigger found for <post-tooltip id="${this.host.id}">, please add the 'data-tooltip-target="${this.host.id}" attribute to the trigger element.`)}this.triggers.forEach((t=>this.patchPopoverTargetActionInterest(t)))}disconnectedCallback(){this.triggers.forEach((t=>{t.removeEventListener("mouseenter",this.localShowTooltip);t.removeEventListener("mouseleave",this.localHideTooltip);t.removeEventListener("focus",this.localShowTooltip);t.removeEventListener("blur",this.localHideTooltip);t.removeEventListener("long-press",this.localShowTooltip)}));if(this.tooltipRef)this.tooltipRef.removeEventListener("beforetoggle",this.localToggleTooltip);if(typeof this.clearAutoUpdate==="function")this.clearAutoUpdate()}componentDidLoad(){if(!this.host.id||!this.triggers)return false;this.tooltipRef.setAttribute("popover","");this.tooltipRef.addEventListener("beforetoggle",this.handleToggle.bind(this))}async show(t){this.eventTarget=t;this.tooltipRef.showPopover()}async hide(){this.eventTarget=null;this.tooltipRef.hidePopover()}async toggle(t,e){this.eventTarget=t;this.tooltipRef.togglePopover(e)}get triggers(){return document.querySelectorAll(`[data-tooltip-target="${this.host.id}"]`)}patchPopoverTargetActionInterest(t){t.addEventListener("mouseenter",this.localShowTooltip);t.addEventListener("mouseleave",this.localHideTooltip);t.addEventListener("focus",this.localShowTooltip);t.addEventListener("blur",this.localHideTooltip);t.addEventListener("long-press",this.localShowTooltip);const e=t.getAttribute("aria-describedby");if(!(e===null||e===void 0?void 0:e.includes(this.host.id))){const n=e?`${e} ${this.host.id}`:this.host.id;t.setAttribute("aria-describedby",n)}if(!ir(t)){t.setAttribute("tabindex","0")}}handleToggle(t){const e=t.newState==="open";if(e){this.startAutoupdates()}else{if(typeof this.clearAutoUpdate==="function")this.clearAutoUpdate()}}startAutoupdates(){this.clearAutoUpdate=It(this.eventTarget,this.tooltipRef,this.positionTooltip.bind(this))}async positionTooltip(){const{x:t,y:e,middlewareData:n,placement:r}=await Bt(this.eventTarget,this.tooltipRef,{placement:this.placement||"top",middleware:[R(),L(),Z({padding:8}),$(12),W({element:this.arrowRef,padding:8})]});this.tooltipRef.style.left=`${t}px`;this.tooltipRef.style.top=`${e}px`;const o=r.split("-")[0];const{x:i,y:a}=n.arrow;const l=sr[o];Object.assign(this.arrowRef.style,{top:a?`${a}px`:"",left:i?`${i}px`:"",[l]:`${-this.arrowRef.offsetWidth/2}px`})}render(){return e(n,{"data-version":o},e("div",{role:"tooltip",tabindex:"-1",class:this.tooltipClasses,ref:t=>this.tooltipRef=t},e("span",{class:"arrow",ref:t=>{this.arrowRef=t}}),e("slot",null)))}get host(){return r(this)}static get watchers(){return{backgroundColor:["validateBackgroundColor"]}}};ur.style=lr;export{ur as P};
|
|
9
|
+
//# sourceMappingURL=p-4cb18ddf.js.map
|