@vonage/vivid 5.2.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion-item/definition.cjs +2 -1
- package/accordion-item/definition.js +2 -1
- package/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/audio-player/definition.cjs +4 -2
- package/audio-player/definition.js +4 -2
- package/audio-player/index.cjs +5 -3
- package/audio-player/index.js +5 -3
- package/badge/index.cjs +2 -2
- package/badge/index.js +4 -4
- package/banner/index.cjs +3 -3
- package/banner/index.js +6 -6
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/bundled/affix.cjs +7 -7
- package/bundled/affix.js +5 -5
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +15 -13
- package/bundled/base-color-picker.cjs +13 -0
- package/bundled/base-color-picker.js +194 -0
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +2 -2
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +21 -21
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/children.cjs +1 -1
- package/bundled/children.js +28 -20
- package/bundled/definition.cjs +3 -3
- package/bundled/definition.js +38 -38
- package/bundled/definition10.cjs +72 -18
- package/bundled/definition10.js +351 -65
- package/bundled/definition11.cjs +19 -10
- package/bundled/definition11.js +66 -37
- package/bundled/definition12.cjs +10 -1
- package/bundled/definition12.js +38 -14
- package/bundled/definition13.cjs +1 -73
- package/bundled/definition13.js +15 -354
- package/bundled/definition15.cjs +1 -1
- package/bundled/definition15.js +1 -1
- package/bundled/definition16.cjs +2 -2
- package/bundled/definition16.js +8 -8
- package/bundled/definition17.cjs +7 -7
- package/bundled/definition17.js +17 -17
- package/bundled/definition19.cjs +5 -5
- package/bundled/definition19.js +8 -8
- package/bundled/definition2.cjs +9 -5
- package/bundled/definition2.js +21 -17
- package/bundled/definition22.cjs +9 -9
- package/bundled/definition22.js +31 -31
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition6.cjs +1 -1
- package/bundled/definition6.js +10 -10
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +6 -6
- package/bundled/definition8.cjs +2 -2
- package/bundled/definition8.js +4 -4
- package/bundled/definition9.cjs +1 -1
- package/bundled/definition9.js +1 -1
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +59 -46
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +3 -3
- package/bundled/host-semantics.cjs +1 -1
- package/bundled/host-semantics.js +48 -34
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +41 -30
- package/bundled/mixins.cjs +18 -18
- package/bundled/mixins.js +99 -93
- package/bundled/normalize.cjs +1 -0
- package/bundled/normalize.js +7 -0
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +4 -4
- package/bundled/ref.cjs +1 -1
- package/bundled/ref.js +8 -25
- package/bundled/repeat.cjs +1 -1
- package/bundled/repeat.js +459 -233
- package/bundled/slider.template.cjs +1 -1
- package/bundled/slider.template.js +2 -2
- package/bundled/slotted.cjs +1 -1
- package/bundled/slotted.js +62 -45
- package/bundled/time-selection-picker.template.cjs +1 -1
- package/bundled/time-selection-picker.template.js +5 -5
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +2126 -1172
- package/bundled/when.cjs +1 -1
- package/bundled/when.js +8 -7
- package/calendar/definition.cjs +1 -1
- package/calendar/definition.js +2 -2
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +6 -6
- package/calendar-event/index.cjs +1 -1
- package/calendar-event/index.js +1 -1
- package/card/definition.cjs +10 -2
- package/card/definition.js +10 -2
- package/card/index.cjs +19 -11
- package/card/index.js +35 -27
- package/color-picker/definition.cjs +1079 -0
- package/color-picker/definition.js +1073 -0
- package/color-picker/index.cjs +127 -0
- package/color-picker/index.js +726 -0
- package/combobox/definition.cjs +1 -1
- package/combobox/definition.js +2 -2
- package/combobox/index.cjs +4 -4
- package/combobox/index.js +15 -15
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +1365 -161
- package/data-grid/definition.cjs +862 -27
- package/data-grid/definition.js +863 -28
- package/data-grid/index.cjs +25 -25
- package/data-grid/index.js +175 -168
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +4 -0
- package/dial-pad/definition.js +4 -0
- package/dial-pad/index.cjs +3 -3
- package/dial-pad/index.js +42 -39
- package/dialog/definition.cjs +4 -1
- package/dialog/definition.js +4 -1
- package/dialog/index.cjs +21 -18
- package/dialog/index.js +43 -40
- package/empty-state/definition.cjs +7 -2
- package/empty-state/definition.js +7 -2
- package/empty-state/index.cjs +10 -5
- package/empty-state/index.js +18 -13
- package/fab/index.cjs +2 -2
- package/fab/index.js +4 -4
- package/file-picker/definition.cjs +2 -2
- package/file-picker/definition.js +3 -3
- package/file-picker/index.cjs +1 -1
- package/file-picker/index.js +4 -4
- package/icon/definition.cjs +10 -6
- package/icon/definition.js +10 -6
- package/index.cjs +4 -0
- package/index.js +1 -0
- package/lib/accordion-item/accordion-item.d.ts +2 -2
- package/lib/action-group/action-group.d.ts +2 -2
- package/lib/alert/alert.d.ts +4 -4
- package/lib/audio-player/audio-player.d.ts +2 -2
- package/lib/avatar/avatar.d.ts +2 -2
- package/lib/badge/badge.d.ts +2 -2
- package/lib/banner/banner.d.ts +6 -6
- package/lib/breadcrumb/breadcrumb.d.ts +2 -2
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +2 -2
- package/lib/button/button.d.ts +6 -6
- package/lib/button/button.template.d.ts +2 -1
- package/lib/calendar/calendar.d.ts +1 -1
- package/lib/calendar-event/calendar-event.d.ts +2 -2
- package/lib/card/card.d.ts +2 -2
- package/lib/checkbox/checkbox.d.ts +12 -12
- package/lib/color-picker/color-picker.d.ts +2420 -0
- package/lib/color-picker/color-picker.template.d.ts +3 -0
- package/lib/color-picker/definition.d.ts +4 -0
- package/lib/color-picker/locale.d.ts +9 -0
- package/lib/combobox/combobox.d.ts +14 -14
- package/lib/components.d.ts +1 -0
- package/lib/data-grid/data-grid-cell.d.ts +4 -4
- package/lib/data-grid/data-grid-row.d.ts +3 -4
- package/lib/data-grid/data-grid.d.ts +1 -2
- package/lib/date-picker/date-picker.d.ts +54 -54
- package/lib/date-range-picker/date-range-picker.d.ts +28 -28
- package/lib/date-time-picker/date-time-picker.d.ts +56 -56
- package/lib/dial-pad/dial-pad.d.ts +3 -2
- package/lib/dialog/dialog.d.ts +4 -4
- package/lib/divider/divider.d.ts +2 -2
- package/lib/fab/fab.d.ts +2 -2
- package/lib/file-picker/file-picker.d.ts +14 -14
- package/lib/header/header.d.ts +2 -2
- package/lib/menu/menu.d.ts +4 -4
- package/lib/menu-item/menu-item.d.ts +4 -4
- package/lib/nav/nav.d.ts +2 -2
- package/lib/nav-disclosure/nav-disclosure.d.ts +4 -4
- package/lib/nav-item/nav-item.d.ts +4 -4
- package/lib/note/note.d.ts +2 -2
- package/lib/number-field/number-field.d.ts +18 -18
- package/lib/option/option.d.ts +4 -4
- package/lib/pagination/pagination.d.ts +2 -2
- package/lib/progress/progress.d.ts +2 -2
- package/lib/progress-ring/progress-ring.d.ts +2 -2
- package/lib/radio/radio.d.ts +6 -6
- package/lib/radio-group/radio-group.d.ts +2 -2
- package/lib/range-slider/range-slider.d.ts +6 -6
- package/lib/rich-text-editor/menubar/menubar.d.ts +2 -2
- package/lib/rich-text-editor/rich-text-editor.d.ts +2 -2
- package/lib/searchable-select/option-tag.d.ts +2 -2
- package/lib/searchable-select/searchable-select.d.ts +18 -18
- package/lib/select/select.d.ts +16 -16
- package/lib/selectable-box/selectable-box.d.ts +2 -2
- package/lib/simple-color-picker/locale.d.ts +0 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +47 -821
- package/lib/slider/slider.d.ts +6 -6
- package/lib/split-button/split-button.d.ts +6 -6
- package/lib/switch/switch.d.ts +4 -4
- package/lib/tab/tab.d.ts +6 -6
- package/lib/tab-panel/tab-panel.d.ts +2 -2
- package/lib/tag/tag.d.ts +6 -6
- package/lib/tag-group/tag-group.d.ts +2 -2
- package/lib/tag-name-map.d.ts +2 -1
- package/lib/text-area/text-area.d.ts +16 -16
- package/lib/text-field/text-field.d.ts +18 -18
- package/lib/time-picker/time-picker.d.ts +28 -28
- package/lib/toggletip/toggletip.d.ts +4 -4
- package/lib/tooltip/tooltip.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +4 -4
- package/lib/tree-view/tree-view.d.ts +2 -2
- package/lib/video-player/video-player.d.ts +2 -2
- package/locales/de-DE.cjs +13 -2
- package/locales/de-DE.js +13 -2
- package/locales/en-GB.cjs +13 -2
- package/locales/en-GB.js +13 -2
- package/locales/en-US.cjs +13 -2
- package/locales/en-US.js +13 -2
- package/locales/ja-JP.cjs +13 -2
- package/locales/ja-JP.js +13 -2
- package/locales/zh-CN.cjs +13 -2
- package/locales/zh-CN.js +13 -2
- package/menu/definition.cjs +2 -2
- package/menu/definition.js +3 -3
- package/note/index.cjs +2 -2
- package/note/index.js +4 -4
- package/number-field/definition.cjs +1 -1
- package/number-field/definition.js +2 -2
- package/number-field/index.cjs +5 -5
- package/number-field/index.js +21 -21
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +5 -5
- package/pagination/definition.cjs +2 -1
- package/pagination/definition.js +2 -1
- package/pagination/index.cjs +12 -12
- package/pagination/index.js +59 -59
- package/progress/index.cjs +1 -1
- package/progress/index.js +1 -1
- package/radio/definition.cjs +9 -9
- package/radio/definition.js +10 -10
- package/radio-group/definition.cjs +2 -1
- package/radio-group/definition.js +2 -1
- package/radio-group/index.cjs +5 -5
- package/radio-group/index.js +80 -77
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/definition.cjs +1 -1
- package/rich-text-editor/definition.js +2 -2
- package/rich-text-editor/index.cjs +2 -2
- package/rich-text-editor/index.js +3 -3
- package/searchable-select/definition.cjs +3 -3
- package/searchable-select/definition.js +4 -4
- package/searchable-select/index.cjs +4 -4
- package/searchable-select/index.js +8 -8
- package/select/definition.cjs +1 -1
- package/select/definition.js +2 -2
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/selectable-box/index.cjs +3 -3
- package/selectable-box/index.js +20 -20
- package/shared/aria/aria-change-subscription.d.ts +0 -1
- package/shared/aria/aria-mixin.d.ts +2 -2
- package/shared/aria/delegate-aria-behavior.d.ts +5 -10
- package/shared/aria/delegates-aria.d.ts +3 -3
- package/shared/aria/host-semantics-behavior.d.ts +5 -8
- package/shared/aria/host-semantics.d.ts +3 -3
- package/shared/color-picker/base-color-picker.d.ts +436 -0
- package/shared/color-picker/index.d.ts +1 -0
- package/shared/color-picker/locale.d.ts +3 -0
- package/shared/color-picker/utils.d.ts +1 -0
- package/shared/deprecation/replaced-props.d.ts +317 -2
- package/shared/design-system/defineVividComponent.d.ts +2 -2
- package/shared/feedback/feedback-message.d.ts +2 -2
- package/shared/feedback/mixins.d.ts +4 -4
- package/shared/foundation/button/button.d.ts +4 -4
- package/shared/foundation/form-associated/form-associated.d.ts +4 -4
- package/shared/foundation/vivid-element/vivid-element.d.ts +335 -8
- package/shared/localization/Locale.d.ts +4 -0
- package/shared/patterns/affix.d.ts +4 -4
- package/shared/patterns/anchored.d.ts +4 -4
- package/shared/patterns/char-count/char-count.d.ts +2 -2
- package/shared/patterns/form-elements/form-element.d.ts +4 -4
- package/shared/patterns/form-elements/with-contextual-help.d.ts +6 -6
- package/shared/patterns/form-elements/with-error-text.d.ts +6 -6
- package/shared/patterns/form-elements/with-success-text.d.ts +2 -2
- package/shared/patterns/linkable.d.ts +2 -2
- package/shared/patterns/localized.d.ts +2 -2
- package/shared/patterns/trapped-focus.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-picker.d.ts +14 -14
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +14 -14
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +2 -2
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-date-picker.d.ts +40 -40
- package/shared/picker-field/mixins/single-value-picker.d.ts +12 -12
- package/shared/picker-field/mixins/time-selection-picker.d.ts +29 -29
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +28 -28
- package/shared/picker-field/picker-field.d.ts +14 -14
- package/shared/templating/attribute-binding-behaviour.d.ts +3 -4
- package/shared/templating/render-in-light-dom.d.ts +13 -12
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/simple-color-picker/definition.cjs +28 -215
- package/simple-color-picker/definition.js +29 -216
- package/simple-color-picker/index.cjs +9 -21
- package/simple-color-picker/index.js +71 -185
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +2 -2
- package/switch/index.js +4 -4
- package/tabs/definition.cjs +1 -1
- package/tabs/definition.js +2 -2
- package/tabs/index.cjs +2 -2
- package/tabs/index.js +16 -16
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text-area/index.cjs +3 -3
- package/text-area/index.js +8 -8
- package/text-field/definition.cjs +2 -2
- package/text-field/definition.js +3 -3
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +2 -2
- package/toggletip/definition.cjs +1 -1
- package/toggletip/definition.js +2 -2
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +2 -2
- package/tree-view/index.cjs +2 -2
- package/tree-view/index.js +6 -6
- package/unbundled/_commonjsHelpers.cjs +36 -0
- package/unbundled/_commonjsHelpers.js +32 -0
- package/unbundled/affix.cjs +1 -1
- package/unbundled/affix.js +1 -1
- package/unbundled/attribute-binding-behaviour.cjs +11 -10
- package/unbundled/attribute-binding-behaviour.js +11 -10
- package/unbundled/base-color-picker.cjs +278 -0
- package/unbundled/base-color-picker.js +275 -0
- package/unbundled/button.cjs +1 -1
- package/unbundled/button.js +2 -2
- package/unbundled/calendar-picker.template.cjs +3 -3
- package/unbundled/calendar-picker.template.js +4 -4
- package/unbundled/definition2.cjs +1 -1
- package/unbundled/definition2.js +2 -2
- package/unbundled/definition3.cjs +2 -1
- package/unbundled/definition3.js +2 -1
- package/unbundled/delegates-aria.cjs +67 -33
- package/unbundled/delegates-aria.js +69 -35
- package/unbundled/form-associated.cjs +2 -2
- package/unbundled/form-associated.js +3 -3
- package/unbundled/host-semantics.cjs +47 -22
- package/unbundled/host-semantics.js +48 -23
- package/unbundled/mixins.cjs +34 -27
- package/unbundled/mixins.js +35 -28
- package/unbundled/picker-field.template.cjs +2 -2
- package/unbundled/picker-field.template.js +3 -3
- package/unbundled/time-selection-picker.template.cjs +4 -4
- package/unbundled/time-selection-picker.template.js +5 -5
- package/unbundled/vivid-element.cjs +22 -15
- package/unbundled/vivid-element.js +23 -15
- package/video-player/definition.cjs +69007 -1
- package/video-player/definition.js +69007 -1
- package/video-player/index.cjs +35 -35
- package/video-player/index.js +1358 -1384
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +317 -69
package/bundled/definition9.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const Vt=require("./definition3.cjs"),Ht=require("./definition4.cjs"),S=require("./vivid-element.cjs"),ht=require("./ref.cjs"),Jt=require("./class-names.cjs"),Pt=require("./when.cjs"),Mt=["top","right","bottom","left"],At=["start","end"],Et=Mt.reduce((t,e)=>t.concat(e,e+"-"+At[0],e+"-"+At[1]),[]),N=Math.min,C=Math.max,ct=Math.round,lt=Math.floor,Y=t=>({x:t,y:t}),Qt={left:"right",right:"left",bottom:"top",top:"bottom"},Zt={start:"end",end:"start"};function te(t,e,n){return C(t,N(e,n))}function J(t,e){return typeof t=="function"?t(e):t}function _(t){return t.split("-")[0]}function M(t){return t.split("-")[1]}function ee(t){return t==="x"?"y":"x"}function wt(t){return t==="y"?"height":"width"}const ne=new Set(["top","bottom"]);function X(t){return ne.has(_(t))?"y":"x"}function vt(t){return ee(X(t))}function Nt(t,e,n){n===void 0&&(n=!1);const o=M(t),i=vt(t),r=wt(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ft(s)),[s,ft(s)]}function oe(t){const e=ft(t);return[at(t),e,at(e)]}function at(t){return t.replace(/start|end/g,e=>Zt[e])}const Ct=["left","right"],St=["right","left"],ie=["top","bottom"],re=["bottom","top"];function se(t,e,n){switch(t){case"top":case"bottom":return n?e?St:Ct:e?Ct:St;case"left":case"right":return e?ie:re;default:return[]}}function le(t,e,n,o){const i=M(t);let r=se(_(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(at)))),r}function ft(t){return t.replace(/left|right|bottom|top/g,e=>Qt[e])}function ce(t){return{top:0,right:0,bottom:0,left:0,...t}}function yt(t){return typeof t!="number"?ce(t):{top:t,right:t,bottom:t,left:t}}function tt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Tt(t,e,n){let{reference:o,floating:i}=t;const r=X(e),s=vt(e),l=wt(s),c=_(e),a=r==="y",p=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,d=o[l]/2-i[l]/2;let u;switch(c){case"top":u={x:p,y:o.y-i.height};break;case"bottom":u={x:p,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:f};break;case"left":u={x:o.x-i.width,y:f};break;default:u={x:o.x,y:o.y}}switch(M(e)){case"start":u[s]-=d*(n&&a?-1:1);break;case"end":u[s]+=d*(n&&a?-1:1);break}return u}const ae=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:p,y:f}=Tt(a,o,c),d=o,u={},m=0;for(let h=0;h<l.length;h++){const{name:g,fn:w}=l[h],{x:y,y:x,data:R,reset:b}=await w({x:p,y:f,initialPlacement:o,placement:d,strategy:i,middlewareData:u,rects:a,platform:s,elements:{reference:t,floating:e}});p=y??p,f=x??f,u={...u,[g]:{...u[g],...R}},b&&m<=50&&(m++,typeof b=="object"&&(b.placement&&(d=b.placement),b.rects&&(a=b.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):b.rects),{x:p,y:f}=Tt(a,d,c)),h=-1)}return{x:p,y:f,placement:d,strategy:i,middlewareData:u}};async function it(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:l,strategy:c}=t,{boundary:a="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:d=!1,padding:u=0}=J(e,t),m=yt(u),g=l[d?f==="floating"?"reference":"floating":f],w=tt(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:a,rootBoundary:p,strategy:c})),y=f==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),R=await(r.isElement==null?void 0:r.isElement(x))?await(r.getScale==null?void 0:r.getScale(x))||{x:1,y:1}:{x:1,y:1},b=tt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:x,strategy:c}):y);return{top:(w.top-b.top+m.top)/R.y,bottom:(b.bottom-w.bottom+m.bottom)/R.y,left:(w.left-b.left+m.left)/R.x,right:(b.right-w.right+m.right)/R.x}}const fe=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:l,middlewareData:c}=e,{element:a,padding:p=0}=J(t,e)||{};if(a==null)return{};const f=yt(p),d={x:n,y:o},u=vt(i),m=wt(u),h=await s.getDimensions(a),g=u==="y",w=g?"top":"left",y=g?"bottom":"right",x=g?"clientHeight":"clientWidth",R=r.reference[m]+r.reference[u]-d[u]-r.floating[m],b=d[u]-r.reference[u],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let O=P?P[x]:0;(!O||!await(s.isElement==null?void 0:s.isElement(P)))&&(O=l.floating[x]||r.floating[m]);const B=R/2-b/2,T=O/2-h[m]/2-1,v=N(f[w],T),A=N(f[y],T),L=v,D=O-h[m]-A,E=O/2-h[m]/2+B,H=te(L,E,D),V=!c.arrow&&M(i)!=null&&E!==H&&r.reference[m]/2-(E<L?v:A)-h[m]/2<0,k=V?E<L?E-L:E-D:0;return{[u]:d[u]+k,data:{[u]:H,centerOffset:E-H-k,...V&&{alignmentOffset:k}},reset:V}}});function ue(t,e,n){return(t?[...n.filter(i=>M(i)===t),...n.filter(i=>M(i)!==t)]:n.filter(i=>_(i)===i)).filter(i=>t?M(i)===t||(e?at(i)!==i:!1):!0)}const pe=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:r,middlewareData:s,placement:l,platform:c,elements:a}=e,{crossAxis:p=!1,alignment:f,allowedPlacements:d=Et,autoAlignment:u=!0,...m}=J(t,e),h=f!==void 0||d===Et?ue(f||null,u,d):d,g=await it(e,m),w=((n=s.autoPlacement)==null?void 0:n.index)||0,y=h[w];if(y==null)return{};const x=Nt(y,r,await(c.isRTL==null?void 0:c.isRTL(a.floating)));if(l!==y)return{reset:{placement:h[0]}};const R=[g[_(y)],g[x[0]],g[x[1]]],b=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:y,overflows:R}],P=h[w+1];if(P)return{data:{index:w+1,overflows:b},reset:{placement:P}};const O=b.map(v=>{const A=M(v.placement);return[v.placement,A&&p?v.overflows.slice(0,2).reduce((L,D)=>L+D,0):v.overflows[0],v.overflows]}).sort((v,A)=>v[1]-A[1]),T=((i=O.filter(v=>v[2].slice(0,M(v[0])?2:3).every(A=>A<=0))[0])==null?void 0:i[0])||O[0][0];return T!==l?{data:{index:w+1,overflows:b},reset:{placement:T}}:{}}}},de=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:c,elements:a}=e,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=J(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=_(i),y=X(l),x=_(l)===l,R=await(c.isRTL==null?void 0:c.isRTL(a.floating)),b=d||(x||!h?[ft(l)]:oe(l)),P=m!=="none";!d&&P&&b.push(...le(l,h,m,R));const O=[l,...b],B=await it(e,g),T=[];let v=((o=r.flip)==null?void 0:o.overflows)||[];if(p&&T.push(B[w]),f){const E=Nt(i,s,R);T.push(B[E[0]],B[E[1]])}if(v=[...v,{placement:i,overflows:T}],!T.every(E=>E<=0)){var A,L;const E=(((A=r.flip)==null?void 0:A.index)||0)+1,H=O[E];if(H&&(!(f==="alignment"?y!==X(H):!1)||v.every($=>X($.placement)===y?$.overflows[0]>0:!0)))return{data:{index:E,overflows:v},reset:{placement:H}};let V=(L=v.filter(k=>k.overflows[0]<=0).sort((k,$)=>k.overflows[1]-$.overflows[1])[0])==null?void 0:L.placement;if(!V)switch(u){case"bestFit":{var D;const k=(D=v.filter($=>{if(P){const K=X($.placement);return K===y||K==="y"}return!0}).map($=>[$.placement,$.overflows.filter(K=>K>0).reduce((K,Gt)=>K+Gt,0)]).sort(($,K)=>$[1]-K[1])[0])==null?void 0:D[0];k&&(V=k);break}case"initialPlacement":V=l;break}if(i!==V)return{reset:{placement:V}}}return{}}}};function Lt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Dt(t){return Mt.some(e=>t[e]>=0)}const he=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=J(t,e);switch(o){case"referenceHidden":{const r=await it(e,{...i,elementContext:"reference"}),s=Lt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Dt(s)}}}case"escaped":{const r=await it(e,{...i,altBoundary:!0}),s=Lt(r,n.floating);return{data:{escapedOffsets:s,escaped:Dt(s)}}}default:return{}}}}};function _t(t){const e=N(...t.map(r=>r.left)),n=N(...t.map(r=>r.top)),o=C(...t.map(r=>r.right)),i=C(...t.map(r=>r.bottom));return{x:e,y:n,width:o-e,height:i-n}}function me(t){const e=t.slice().sort((i,r)=>i.y-r.y),n=[];let o=null;for(let i=0;i<e.length;i++){const r=e[i];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map(i=>tt(_t(i)))}const ge=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:i,platform:r,strategy:s}=e,{padding:l=2,x:c,y:a}=J(t,e),p=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(o.reference))||[]),f=me(p),d=tt(_t(p)),u=yt(l);function m(){if(f.length===2&&f[0].left>f[1].right&&c!=null&&a!=null)return f.find(g=>c>g.left-u.left&&c<g.right+u.right&&a>g.top-u.top&&a<g.bottom+u.bottom)||d;if(f.length>=2){if(X(n)==="y"){const v=f[0],A=f[f.length-1],L=_(n)==="top",D=v.top,E=A.bottom,H=L?v.left:A.left,V=L?v.right:A.right,k=V-H,$=E-D;return{top:D,bottom:E,left:H,right:V,width:k,height:$,x:H,y:D}}const g=_(n)==="left",w=C(...f.map(v=>v.right)),y=N(...f.map(v=>v.left)),x=f.filter(v=>g?v.left===y:v.right===w),R=x[0].top,b=x[x.length-1].bottom,P=y,O=w,B=O-P,T=b-R;return{top:R,bottom:b,left:P,right:O,width:B,height:T,x:P,y:R}}return d}const h=await r.getElementRects({reference:{getBoundingClientRect:m},floating:o.floating,strategy:s});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},we=new Set(["left","top"]);async function ve(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=_(n),l=M(n),c=X(n)==="y",a=we.has(s)?-1:1,p=r&&c?-1:1,f=J(e,t);let{mainAxis:d,crossAxis:u,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof m=="number"&&(u=l==="end"?m*-1:m),c?{x:u*p,y:d*a}:{x:d*a,y:u*p}}const ye=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:l}=e,c=await ve(e,t);return s===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},xe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:s,elements:l}=e,{apply:c=()=>{},...a}=J(t,e),p=await it(e,a),f=_(i),d=M(i),u=X(i)==="y",{width:m,height:h}=r.floating;let g,w;f==="top"||f==="bottom"?(g=f,w=d===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(w=f,g=d==="end"?"top":"bottom");const y=h-p.top-p.bottom,x=m-p.left-p.right,R=N(h-p[g],y),b=N(m-p[w],x),P=!e.middlewareData.shift;let O=R,B=b;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(B=x),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(O=y),P&&!d){const v=C(p.left,0),A=C(p.right,0),L=C(p.top,0),D=C(p.bottom,0);u?B=m-2*(v!==0||A!==0?v+A:C(p.left,p.right)):O=h-2*(L!==0||D!==0?L+D:C(p.top,p.bottom))}await c({...e,availableWidth:B,availableHeight:O});const T=await s.getDimensions(l.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function ut(){return typeof window<"u"}function nt(t){return Wt(t)?(t.nodeName||"").toLowerCase():"#document"}function F(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function I(t){var e;return(e=(Wt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Wt(t){return ut()?t instanceof Node||t instanceof F(t).Node:!1}function W(t){return ut()?t instanceof Element||t instanceof F(t).Element:!1}function q(t){return ut()?t instanceof HTMLElement||t instanceof F(t).HTMLElement:!1}function kt(t){return!ut()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof F(t).ShadowRoot}const be=new Set(["inline","contents"]);function st(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=z(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!be.has(i)}const Re=new Set(["table","td","th"]);function Oe(t){return Re.has(nt(t))}const Pe=[":popover-open",":modal"];function pt(t){return Pe.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ae=["transform","translate","scale","rotate","perspective"],Ee=["transform","translate","scale","rotate","perspective","filter"],Ce=["paint","layout","strict","content"];function xt(t){const e=bt(),n=W(t)?z(t):t;return Ae.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Ee.some(o=>(n.willChange||"").includes(o))||Ce.some(o=>(n.contain||"").includes(o))}function Se(t){let e=G(t);for(;q(e)&&!et(e);){if(xt(e))return e;if(pt(e))return null;e=G(e)}return null}function bt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Te=new Set(["html","body","#document"]);function et(t){return Te.has(nt(t))}function z(t){return F(t).getComputedStyle(t)}function dt(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function G(t){if(nt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||kt(t)&&t.host||I(t);return kt(e)?e.host:e}function zt(t){const e=G(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:q(e)&&st(e)?e:zt(e)}function rt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=zt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=F(i);if(r){const l=gt(s);return e.concat(s,s.visualViewport||[],st(i)?i:[],l&&n?rt(l):[])}return e.concat(i,rt(i,[],n))}function gt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function jt(t){const e=z(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=q(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,l=ct(n)!==r||ct(o)!==s;return l&&(n=r,o=s),{width:n,height:o,$:l}}function Rt(t){return W(t)?t:t.contextElement}function Z(t){const e=Rt(t);if(!q(e))return Y(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=jt(e);let s=(r?ct(n.width):n.width)/o,l=(r?ct(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Le=Y(0);function Yt(t){const e=F(t);return!bt()||!e.visualViewport?Le:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function De(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==F(t)?!1:e}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=Rt(t);let s=Y(1);e&&(o?W(o)&&(s=Z(o)):s=Z(t));const l=De(r,n,o)?Yt(r):Y(0);let c=(i.left+l.x)/s.x,a=(i.top+l.y)/s.y,p=i.width/s.x,f=i.height/s.y;if(r){const d=F(r),u=o&&W(o)?F(o):o;let m=d,h=gt(m);for(;h&&o&&u!==m;){const g=Z(h),w=h.getBoundingClientRect(),y=z(h),x=w.left+(h.clientLeft+parseFloat(y.paddingLeft))*g.x,R=w.top+(h.clientTop+parseFloat(y.paddingTop))*g.y;c*=g.x,a*=g.y,p*=g.x,f*=g.y,c+=x,a+=R,m=F(h),h=gt(m)}}return tt({width:p,height:f,x:c,y:a})}function Ot(t,e){const n=dt(t).scrollLeft;return e?e.left+n:Q(I(t)).left+n}function qt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:Ot(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function ke(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=I(o),l=e?pt(e.floating):!1;if(o===s||l&&r)return n;let c={scrollLeft:0,scrollTop:0},a=Y(1);const p=Y(0),f=q(o);if((f||!f&&!r)&&((nt(o)!=="body"||st(s))&&(c=dt(o)),q(o))){const u=Q(o);a=Z(o),p.x=u.x+o.clientLeft,p.y=u.y+o.clientTop}const d=s&&!f&&!r?qt(s,c,!0):Y(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+p.x+d.x,y:n.y*a.y-c.scrollTop*a.y+p.y+d.y}}function $e(t){return Array.from(t.getClientRects())}function Fe(t){const e=I(t),n=dt(t),o=t.ownerDocument.body,i=C(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=C(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Ot(t);const l=-n.scrollTop;return z(o).direction==="rtl"&&(s+=C(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:l}}function Be(t,e){const n=F(t),o=I(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,l=0,c=0;if(i){r=i.width,s=i.height;const a=bt();(!a||a&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:r,height:s,x:l,y:c}}const Ve=new Set(["absolute","fixed"]);function He(t,e){const n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=q(t)?Z(t):Y(1),s=t.clientWidth*r.x,l=t.clientHeight*r.y,c=i*r.x,a=o*r.y;return{width:s,height:l,x:c,y:a}}function $t(t,e,n){let o;if(e==="viewport")o=Be(t,n);else if(e==="document")o=Fe(I(t));else if(W(e))o=He(e,n);else{const i=Yt(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return tt(o)}function It(t,e){const n=G(t);return n===e||!W(n)||et(n)?!1:z(n).position==="fixed"||It(n,e)}function Me(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter(l=>W(l)&&nt(l)!=="body"),i=null;const r=z(t).position==="fixed";let s=r?G(t):t;for(;W(s)&&!et(s);){const l=z(s),c=xt(s);!c&&l.position==="fixed"&&(i=null),(r?!c&&!i:!c&&l.position==="static"&&!!i&&Ve.has(i.position)||st(s)&&!c&&It(t,s))?o=o.filter(p=>p!==s):i=l,s=G(s)}return e.set(t,o),o}function Ne(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?pt(e)?[]:Me(e,this._c):[].concat(n),o],l=s[0],c=s.reduce((a,p)=>{const f=$t(e,p,i);return a.top=C(f.top,a.top),a.right=N(f.right,a.right),a.bottom=N(f.bottom,a.bottom),a.left=C(f.left,a.left),a},$t(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function _e(t){const{width:e,height:n}=jt(t);return{width:e,height:n}}function We(t,e,n){const o=q(e),i=I(e),r=n==="fixed",s=Q(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const c=Y(0);function a(){c.x=Ot(i)}if(o||!o&&!r)if((nt(e)!=="body"||st(i))&&(l=dt(e)),o){const u=Q(e,!0,r,e);c.x=u.x+e.clientLeft,c.y=u.y+e.clientTop}else i&&a();r&&!o&&i&&a();const p=i&&!o&&!r?qt(i,l):Y(0),f=s.left+l.scrollLeft-c.x-p.x,d=s.top+l.scrollTop-c.y-p.y;return{x:f,y:d,width:s.width,height:s.height}}function mt(t){return z(t).position==="static"}function Ft(t,e){if(!q(t)||z(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function Xt(t,e){const n=F(t);if(pt(t))return n;if(!q(t)){let i=G(t);for(;i&&!et(i);){if(W(i)&&!mt(i))return i;i=G(i)}return n}let o=Ft(t,e);for(;o&&Oe(o)&&mt(o);)o=Ft(o,e);return o&&et(o)&&mt(o)&&!xt(o)?n:o||Se(t)||n}const ze=async function(t){const e=this.getOffsetParent||Xt,n=this.getDimensions,o=await n(t.floating);return{reference:We(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function je(t){return z(t).direction==="rtl"}const Ye={convertOffsetParentRelativeRectToViewportRelativeRect:ke,getDocumentElement:I,getClippingRect:Ne,getOffsetParent:Xt,getElementRects:ze,getClientRects:$e,getDimensions:_e,getScale:Z,isElement:W,isRTL:je};function Ut(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function qe(t,e){let n=null,o;const i=I(t);function r(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),r();const a=t.getBoundingClientRect(),{left:p,top:f,width:d,height:u}=a;if(l||e(),!d||!u)return;const m=lt(f),h=lt(i.clientWidth-(p+d)),g=lt(i.clientHeight-(f+u)),w=lt(p),x={rootMargin:-m+"px "+-h+"px "+-g+"px "+-w+"px",threshold:C(0,N(1,c))||1};let R=!0;function b(P){const O=P[0].intersectionRatio;if(O!==c){if(!R)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!Ut(a,t.getBoundingClientRect())&&s(),R=!1}try{n=new IntersectionObserver(b,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,x)}n.observe(t)}return s(!0),r}function Ie(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,a=Rt(t),p=i||r?[...a?rt(a):[],...rt(e)]:[];p.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const f=a&&l?qe(a,n):null;let d=-1,u=null;s&&(u=new ResizeObserver(w=>{let[y]=w;y&&y.target===a&&u&&(u.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=u)==null||x.observe(e)})),n()}),a&&!c&&u.observe(a),u.observe(e));let m,h=c?Q(t):null;c&&g();function g(){const w=Q(t);h&&!Ut(h,w)&&n(),h=w,m=requestAnimationFrame(g)}return n(),()=>{var w;p.forEach(y=>{i&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),f?.(),(w=u)==null||w.disconnect(),u=null,c&&cancelAnimationFrame(m)}}const Xe=ye,Bt=pe,Ue=de,Ke=xe,Ge=he,Je=fe,Qe=ge,Ze=(t,e,n)=>{const o=new Map,i={platform:Ye,...n},r={...i.platform,_c:o};return ae(t,e,{...i,platform:r})};var tn=Object.defineProperty,U=(t,e,n,o)=>{for(var i=void 0,r=t.length-1,s;r>=0;r--)(s=t[r])&&(i=s(e,n,i)||i);return i&&tn(e,n,i),i};const ot={Flip:"flip",AutoPlacementHorizontal:"auto-placement-horizontal",AutoPlacementVertical:"auto-placement-vertical"},en={[ot.Flip]:Ue(),[ot.AutoPlacementHorizontal]:Bt({allowedPlacements:["bottom","top","bottom-start","bottom-end","top-start","top-end"]}),[ot.AutoPlacementVertical]:Bt({allowedPlacements:["left","right","left-start","left-end","right-start","right-end"]})};class j extends S.VividElement{constructor(){super(...arguments),this.open=!1,this.dismissible=!1,this.arrow=!1,this.alternate=!1,this.placementStrategy=ot.Flip,this.animationFrame=!1,this.strategy="fixed",this.offset=null,this.#i=()=>(this.#n=this.updatePosition(),this.#n)}get#r(){let e=[Qe(),en[this.placementStrategy],Ge(),Ke({apply({availableWidth:o,availableHeight:i,elements:r}){Object.assign(r.floating.style,{maxWidth:`${o}px`,maxHeight:`${i}px`})}})],n=this.offset??0;return this.arrow&&(n+=12,e=[...e,Je({element:this.arrowEl,padding:10})]),n>0&&e.unshift(Xe(n)),e}#o;openChanged(e,n){this.#e(),this.#t(),this.$emit(n?"vwc-popup:open":"vwc-popup:close")}animationFrameChanged(){this.#t()}anchorChanged(){this.#t()}strategyChanged(){this.#e()}connectedCallback(){super.connectedCallback(),this.#e(),this.#t()}disconnectedCallback(){super.disconnectedCallback(),this.#t()}#t(){this.#o?.(),this.open&&this.controlEl&&this.controlEl.classList.add("open"),this.anchorEl&&this.open&&this.popupEl&&(this.#o=Ie(this.anchorEl,this.popupEl,this.#i,{animationFrame:this.animationFrame}))}#e(){this.popupEl&&this.strategy==="fixed"&&(this.open?this.popupEl.showPopover():this.popupEl.hidePopover())}#n;#i;async updatePosition(){if(!this.open||!this.anchorEl)return;const e=await Ze(this.anchorEl,this.popupEl,{placement:this.placement,strategy:this.strategy,middleware:this.#r});this.#s(e),this.arrow&&this.#l(e)}#s(e){const{x:n,y:o}=e,{referenceHidden:i}=e.middlewareData.hide;Object.assign(this.popupEl.style,{left:`${n}px`,top:`${o}px`,visibility:i?"hidden":"visible"})}#l(e){const{x:n,y:o}=e.middlewareData.arrow,i={left:"calc(100% - 4px)",right:"-4px",top:"calc(100% - 4px)",bottom:"-4px"},r=e.placement.split("-")[0];Object.assign(this.arrowEl.style,{left:n?`${n}px`:i[r],top:o?`${o}px`:i[r]})}get anchorEl(){return this.anchor??null}show(){return this.open=!0,this.#n??Promise.resolve()}hide(){this.open=!1}}U([S.attr({mode:"boolean"})],j.prototype,"open");U([S.attr({mode:"boolean"})],j.prototype,"dismissible");U([S.attr({mode:"boolean"})],j.prototype,"arrow");U([S.attr({mode:"boolean"})],j.prototype,"alternate");U([S.attr({mode:"fromView"})],j.prototype,"placement");U([S.attr({mode:"boolean",attribute:"animation-frame"})],j.prototype,"animationFrame");U([S.attr({mode:"fromView"})],j.prototype,"strategy");U([S.attr({attribute:"offset",converter:S.nullableNumberConverter})],j.prototype,"offset");U([S.observable],j.prototype,"anchor");const nn=":host{display:var(--_popup-display, inline)}.control{border-radius:inherit;background:var(--vvd-color-surface-4dp);contain:layout}.control:not(.open){display:none}.popup-wrapper{white-space:initial;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.popup-wrapper{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.popup-wrapper ::-webkit-scrollbar{width:4px}.popup-wrapper ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.popup-wrapper ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.popup-wrapper{z-index:var(--_popup-z-index, 10);overflow:visible;padding:0;border:none;border-radius:8px;margin:0;inline-size:max-content}.popup-wrapper:not(.absolute){position:fixed}.popup-wrapper.absolute{position:absolute;top:0;left:0}.popup-content{display:grid;color:var(--vvd-color-canvas-text)}.dismissible .popup-content{align-content:start;grid-template-columns:1fr auto}.arrow{position:absolute;z-index:-1;width:8px;height:8px;background:var(--vvd-color-surface-4dp);transform:rotate(45deg)}.dismissible-button{align-self:flex-start;margin-block-start:4px;margin-inline-end:4px}",on=({open:t,dismissible:e,alternate:n})=>Jt.classNames("control",["open",!!t],["dismissible",!!e],["alternate",!!n]);function rn(t){return t.strategy&&t.strategy==="fixed"?"manual":null}const sn=t=>{const e=t.tagFor(Ht.Elevation),n=t.tagFor(Vt.Button);return S.html`
|
|
1
|
+
"use strict";const Vt=require("./definition3.cjs"),Ht=require("./definition4.cjs"),S=require("./vivid-element.cjs"),ht=require("./ref.cjs"),Pt=require("./when.cjs"),Jt=require("./class-names.cjs"),Mt=["top","right","bottom","left"],At=["start","end"],Et=Mt.reduce((t,e)=>t.concat(e,e+"-"+At[0],e+"-"+At[1]),[]),N=Math.min,C=Math.max,ct=Math.round,lt=Math.floor,Y=t=>({x:t,y:t}),Qt={left:"right",right:"left",bottom:"top",top:"bottom"},Zt={start:"end",end:"start"};function te(t,e,n){return C(t,N(e,n))}function J(t,e){return typeof t=="function"?t(e):t}function _(t){return t.split("-")[0]}function M(t){return t.split("-")[1]}function ee(t){return t==="x"?"y":"x"}function wt(t){return t==="y"?"height":"width"}const ne=new Set(["top","bottom"]);function X(t){return ne.has(_(t))?"y":"x"}function vt(t){return ee(X(t))}function Nt(t,e,n){n===void 0&&(n=!1);const o=M(t),i=vt(t),r=wt(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ft(s)),[s,ft(s)]}function oe(t){const e=ft(t);return[at(t),e,at(e)]}function at(t){return t.replace(/start|end/g,e=>Zt[e])}const Ct=["left","right"],St=["right","left"],ie=["top","bottom"],re=["bottom","top"];function se(t,e,n){switch(t){case"top":case"bottom":return n?e?St:Ct:e?Ct:St;case"left":case"right":return e?ie:re;default:return[]}}function le(t,e,n,o){const i=M(t);let r=se(_(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(at)))),r}function ft(t){return t.replace(/left|right|bottom|top/g,e=>Qt[e])}function ce(t){return{top:0,right:0,bottom:0,left:0,...t}}function yt(t){return typeof t!="number"?ce(t):{top:t,right:t,bottom:t,left:t}}function tt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Tt(t,e,n){let{reference:o,floating:i}=t;const r=X(e),s=vt(e),l=wt(s),c=_(e),a=r==="y",p=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,d=o[l]/2-i[l]/2;let u;switch(c){case"top":u={x:p,y:o.y-i.height};break;case"bottom":u={x:p,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:f};break;case"left":u={x:o.x-i.width,y:f};break;default:u={x:o.x,y:o.y}}switch(M(e)){case"start":u[s]-=d*(n&&a?-1:1);break;case"end":u[s]+=d*(n&&a?-1:1);break}return u}const ae=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:p,y:f}=Tt(a,o,c),d=o,u={},m=0;for(let h=0;h<l.length;h++){const{name:g,fn:w}=l[h],{x:y,y:x,data:R,reset:b}=await w({x:p,y:f,initialPlacement:o,placement:d,strategy:i,middlewareData:u,rects:a,platform:s,elements:{reference:t,floating:e}});p=y??p,f=x??f,u={...u,[g]:{...u[g],...R}},b&&m<=50&&(m++,typeof b=="object"&&(b.placement&&(d=b.placement),b.rects&&(a=b.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):b.rects),{x:p,y:f}=Tt(a,d,c)),h=-1)}return{x:p,y:f,placement:d,strategy:i,middlewareData:u}};async function it(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:l,strategy:c}=t,{boundary:a="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:d=!1,padding:u=0}=J(e,t),m=yt(u),g=l[d?f==="floating"?"reference":"floating":f],w=tt(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:a,rootBoundary:p,strategy:c})),y=f==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),R=await(r.isElement==null?void 0:r.isElement(x))?await(r.getScale==null?void 0:r.getScale(x))||{x:1,y:1}:{x:1,y:1},b=tt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:x,strategy:c}):y);return{top:(w.top-b.top+m.top)/R.y,bottom:(b.bottom-w.bottom+m.bottom)/R.y,left:(w.left-b.left+m.left)/R.x,right:(b.right-w.right+m.right)/R.x}}const fe=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:l,middlewareData:c}=e,{element:a,padding:p=0}=J(t,e)||{};if(a==null)return{};const f=yt(p),d={x:n,y:o},u=vt(i),m=wt(u),h=await s.getDimensions(a),g=u==="y",w=g?"top":"left",y=g?"bottom":"right",x=g?"clientHeight":"clientWidth",R=r.reference[m]+r.reference[u]-d[u]-r.floating[m],b=d[u]-r.reference[u],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let O=P?P[x]:0;(!O||!await(s.isElement==null?void 0:s.isElement(P)))&&(O=l.floating[x]||r.floating[m]);const B=R/2-b/2,T=O/2-h[m]/2-1,v=N(f[w],T),A=N(f[y],T),L=v,D=O-h[m]-A,E=O/2-h[m]/2+B,H=te(L,E,D),V=!c.arrow&&M(i)!=null&&E!==H&&r.reference[m]/2-(E<L?v:A)-h[m]/2<0,k=V?E<L?E-L:E-D:0;return{[u]:d[u]+k,data:{[u]:H,centerOffset:E-H-k,...V&&{alignmentOffset:k}},reset:V}}});function ue(t,e,n){return(t?[...n.filter(i=>M(i)===t),...n.filter(i=>M(i)!==t)]:n.filter(i=>_(i)===i)).filter(i=>t?M(i)===t||(e?at(i)!==i:!1):!0)}const pe=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:r,middlewareData:s,placement:l,platform:c,elements:a}=e,{crossAxis:p=!1,alignment:f,allowedPlacements:d=Et,autoAlignment:u=!0,...m}=J(t,e),h=f!==void 0||d===Et?ue(f||null,u,d):d,g=await it(e,m),w=((n=s.autoPlacement)==null?void 0:n.index)||0,y=h[w];if(y==null)return{};const x=Nt(y,r,await(c.isRTL==null?void 0:c.isRTL(a.floating)));if(l!==y)return{reset:{placement:h[0]}};const R=[g[_(y)],g[x[0]],g[x[1]]],b=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:y,overflows:R}],P=h[w+1];if(P)return{data:{index:w+1,overflows:b},reset:{placement:P}};const O=b.map(v=>{const A=M(v.placement);return[v.placement,A&&p?v.overflows.slice(0,2).reduce((L,D)=>L+D,0):v.overflows[0],v.overflows]}).sort((v,A)=>v[1]-A[1]),T=((i=O.filter(v=>v[2].slice(0,M(v[0])?2:3).every(A=>A<=0))[0])==null?void 0:i[0])||O[0][0];return T!==l?{data:{index:w+1,overflows:b},reset:{placement:T}}:{}}}},de=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:c,elements:a}=e,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=J(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=_(i),y=X(l),x=_(l)===l,R=await(c.isRTL==null?void 0:c.isRTL(a.floating)),b=d||(x||!h?[ft(l)]:oe(l)),P=m!=="none";!d&&P&&b.push(...le(l,h,m,R));const O=[l,...b],B=await it(e,g),T=[];let v=((o=r.flip)==null?void 0:o.overflows)||[];if(p&&T.push(B[w]),f){const E=Nt(i,s,R);T.push(B[E[0]],B[E[1]])}if(v=[...v,{placement:i,overflows:T}],!T.every(E=>E<=0)){var A,L;const E=(((A=r.flip)==null?void 0:A.index)||0)+1,H=O[E];if(H&&(!(f==="alignment"?y!==X(H):!1)||v.every($=>X($.placement)===y?$.overflows[0]>0:!0)))return{data:{index:E,overflows:v},reset:{placement:H}};let V=(L=v.filter(k=>k.overflows[0]<=0).sort((k,$)=>k.overflows[1]-$.overflows[1])[0])==null?void 0:L.placement;if(!V)switch(u){case"bestFit":{var D;const k=(D=v.filter($=>{if(P){const K=X($.placement);return K===y||K==="y"}return!0}).map($=>[$.placement,$.overflows.filter(K=>K>0).reduce((K,Gt)=>K+Gt,0)]).sort(($,K)=>$[1]-K[1])[0])==null?void 0:D[0];k&&(V=k);break}case"initialPlacement":V=l;break}if(i!==V)return{reset:{placement:V}}}return{}}}};function Lt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Dt(t){return Mt.some(e=>t[e]>=0)}const he=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=J(t,e);switch(o){case"referenceHidden":{const r=await it(e,{...i,elementContext:"reference"}),s=Lt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Dt(s)}}}case"escaped":{const r=await it(e,{...i,altBoundary:!0}),s=Lt(r,n.floating);return{data:{escapedOffsets:s,escaped:Dt(s)}}}default:return{}}}}};function _t(t){const e=N(...t.map(r=>r.left)),n=N(...t.map(r=>r.top)),o=C(...t.map(r=>r.right)),i=C(...t.map(r=>r.bottom));return{x:e,y:n,width:o-e,height:i-n}}function me(t){const e=t.slice().sort((i,r)=>i.y-r.y),n=[];let o=null;for(let i=0;i<e.length;i++){const r=e[i];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map(i=>tt(_t(i)))}const ge=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:i,platform:r,strategy:s}=e,{padding:l=2,x:c,y:a}=J(t,e),p=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(o.reference))||[]),f=me(p),d=tt(_t(p)),u=yt(l);function m(){if(f.length===2&&f[0].left>f[1].right&&c!=null&&a!=null)return f.find(g=>c>g.left-u.left&&c<g.right+u.right&&a>g.top-u.top&&a<g.bottom+u.bottom)||d;if(f.length>=2){if(X(n)==="y"){const v=f[0],A=f[f.length-1],L=_(n)==="top",D=v.top,E=A.bottom,H=L?v.left:A.left,V=L?v.right:A.right,k=V-H,$=E-D;return{top:D,bottom:E,left:H,right:V,width:k,height:$,x:H,y:D}}const g=_(n)==="left",w=C(...f.map(v=>v.right)),y=N(...f.map(v=>v.left)),x=f.filter(v=>g?v.left===y:v.right===w),R=x[0].top,b=x[x.length-1].bottom,P=y,O=w,B=O-P,T=b-R;return{top:R,bottom:b,left:P,right:O,width:B,height:T,x:P,y:R}}return d}const h=await r.getElementRects({reference:{getBoundingClientRect:m},floating:o.floating,strategy:s});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},we=new Set(["left","top"]);async function ve(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=_(n),l=M(n),c=X(n)==="y",a=we.has(s)?-1:1,p=r&&c?-1:1,f=J(e,t);let{mainAxis:d,crossAxis:u,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof m=="number"&&(u=l==="end"?m*-1:m),c?{x:u*p,y:d*a}:{x:d*a,y:u*p}}const ye=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:l}=e,c=await ve(e,t);return s===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},xe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:s,elements:l}=e,{apply:c=()=>{},...a}=J(t,e),p=await it(e,a),f=_(i),d=M(i),u=X(i)==="y",{width:m,height:h}=r.floating;let g,w;f==="top"||f==="bottom"?(g=f,w=d===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(w=f,g=d==="end"?"top":"bottom");const y=h-p.top-p.bottom,x=m-p.left-p.right,R=N(h-p[g],y),b=N(m-p[w],x),P=!e.middlewareData.shift;let O=R,B=b;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(B=x),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(O=y),P&&!d){const v=C(p.left,0),A=C(p.right,0),L=C(p.top,0),D=C(p.bottom,0);u?B=m-2*(v!==0||A!==0?v+A:C(p.left,p.right)):O=h-2*(L!==0||D!==0?L+D:C(p.top,p.bottom))}await c({...e,availableWidth:B,availableHeight:O});const T=await s.getDimensions(l.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function ut(){return typeof window<"u"}function nt(t){return Wt(t)?(t.nodeName||"").toLowerCase():"#document"}function F(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function I(t){var e;return(e=(Wt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Wt(t){return ut()?t instanceof Node||t instanceof F(t).Node:!1}function W(t){return ut()?t instanceof Element||t instanceof F(t).Element:!1}function q(t){return ut()?t instanceof HTMLElement||t instanceof F(t).HTMLElement:!1}function kt(t){return!ut()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof F(t).ShadowRoot}const be=new Set(["inline","contents"]);function st(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=z(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!be.has(i)}const Re=new Set(["table","td","th"]);function Oe(t){return Re.has(nt(t))}const Pe=[":popover-open",":modal"];function pt(t){return Pe.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ae=["transform","translate","scale","rotate","perspective"],Ee=["transform","translate","scale","rotate","perspective","filter"],Ce=["paint","layout","strict","content"];function xt(t){const e=bt(),n=W(t)?z(t):t;return Ae.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Ee.some(o=>(n.willChange||"").includes(o))||Ce.some(o=>(n.contain||"").includes(o))}function Se(t){let e=G(t);for(;q(e)&&!et(e);){if(xt(e))return e;if(pt(e))return null;e=G(e)}return null}function bt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Te=new Set(["html","body","#document"]);function et(t){return Te.has(nt(t))}function z(t){return F(t).getComputedStyle(t)}function dt(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function G(t){if(nt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||kt(t)&&t.host||I(t);return kt(e)?e.host:e}function zt(t){const e=G(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:q(e)&&st(e)?e:zt(e)}function rt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=zt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=F(i);if(r){const l=gt(s);return e.concat(s,s.visualViewport||[],st(i)?i:[],l&&n?rt(l):[])}return e.concat(i,rt(i,[],n))}function gt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function jt(t){const e=z(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=q(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,l=ct(n)!==r||ct(o)!==s;return l&&(n=r,o=s),{width:n,height:o,$:l}}function Rt(t){return W(t)?t:t.contextElement}function Z(t){const e=Rt(t);if(!q(e))return Y(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=jt(e);let s=(r?ct(n.width):n.width)/o,l=(r?ct(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Le=Y(0);function Yt(t){const e=F(t);return!bt()||!e.visualViewport?Le:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function De(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==F(t)?!1:e}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=Rt(t);let s=Y(1);e&&(o?W(o)&&(s=Z(o)):s=Z(t));const l=De(r,n,o)?Yt(r):Y(0);let c=(i.left+l.x)/s.x,a=(i.top+l.y)/s.y,p=i.width/s.x,f=i.height/s.y;if(r){const d=F(r),u=o&&W(o)?F(o):o;let m=d,h=gt(m);for(;h&&o&&u!==m;){const g=Z(h),w=h.getBoundingClientRect(),y=z(h),x=w.left+(h.clientLeft+parseFloat(y.paddingLeft))*g.x,R=w.top+(h.clientTop+parseFloat(y.paddingTop))*g.y;c*=g.x,a*=g.y,p*=g.x,f*=g.y,c+=x,a+=R,m=F(h),h=gt(m)}}return tt({width:p,height:f,x:c,y:a})}function Ot(t,e){const n=dt(t).scrollLeft;return e?e.left+n:Q(I(t)).left+n}function qt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:Ot(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function ke(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=I(o),l=e?pt(e.floating):!1;if(o===s||l&&r)return n;let c={scrollLeft:0,scrollTop:0},a=Y(1);const p=Y(0),f=q(o);if((f||!f&&!r)&&((nt(o)!=="body"||st(s))&&(c=dt(o)),q(o))){const u=Q(o);a=Z(o),p.x=u.x+o.clientLeft,p.y=u.y+o.clientTop}const d=s&&!f&&!r?qt(s,c,!0):Y(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+p.x+d.x,y:n.y*a.y-c.scrollTop*a.y+p.y+d.y}}function $e(t){return Array.from(t.getClientRects())}function Fe(t){const e=I(t),n=dt(t),o=t.ownerDocument.body,i=C(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=C(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Ot(t);const l=-n.scrollTop;return z(o).direction==="rtl"&&(s+=C(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:l}}function Be(t,e){const n=F(t),o=I(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,l=0,c=0;if(i){r=i.width,s=i.height;const a=bt();(!a||a&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:r,height:s,x:l,y:c}}const Ve=new Set(["absolute","fixed"]);function He(t,e){const n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=q(t)?Z(t):Y(1),s=t.clientWidth*r.x,l=t.clientHeight*r.y,c=i*r.x,a=o*r.y;return{width:s,height:l,x:c,y:a}}function $t(t,e,n){let o;if(e==="viewport")o=Be(t,n);else if(e==="document")o=Fe(I(t));else if(W(e))o=He(e,n);else{const i=Yt(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return tt(o)}function It(t,e){const n=G(t);return n===e||!W(n)||et(n)?!1:z(n).position==="fixed"||It(n,e)}function Me(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter(l=>W(l)&&nt(l)!=="body"),i=null;const r=z(t).position==="fixed";let s=r?G(t):t;for(;W(s)&&!et(s);){const l=z(s),c=xt(s);!c&&l.position==="fixed"&&(i=null),(r?!c&&!i:!c&&l.position==="static"&&!!i&&Ve.has(i.position)||st(s)&&!c&&It(t,s))?o=o.filter(p=>p!==s):i=l,s=G(s)}return e.set(t,o),o}function Ne(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?pt(e)?[]:Me(e,this._c):[].concat(n),o],l=s[0],c=s.reduce((a,p)=>{const f=$t(e,p,i);return a.top=C(f.top,a.top),a.right=N(f.right,a.right),a.bottom=N(f.bottom,a.bottom),a.left=C(f.left,a.left),a},$t(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function _e(t){const{width:e,height:n}=jt(t);return{width:e,height:n}}function We(t,e,n){const o=q(e),i=I(e),r=n==="fixed",s=Q(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const c=Y(0);function a(){c.x=Ot(i)}if(o||!o&&!r)if((nt(e)!=="body"||st(i))&&(l=dt(e)),o){const u=Q(e,!0,r,e);c.x=u.x+e.clientLeft,c.y=u.y+e.clientTop}else i&&a();r&&!o&&i&&a();const p=i&&!o&&!r?qt(i,l):Y(0),f=s.left+l.scrollLeft-c.x-p.x,d=s.top+l.scrollTop-c.y-p.y;return{x:f,y:d,width:s.width,height:s.height}}function mt(t){return z(t).position==="static"}function Ft(t,e){if(!q(t)||z(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function Xt(t,e){const n=F(t);if(pt(t))return n;if(!q(t)){let i=G(t);for(;i&&!et(i);){if(W(i)&&!mt(i))return i;i=G(i)}return n}let o=Ft(t,e);for(;o&&Oe(o)&&mt(o);)o=Ft(o,e);return o&&et(o)&&mt(o)&&!xt(o)?n:o||Se(t)||n}const ze=async function(t){const e=this.getOffsetParent||Xt,n=this.getDimensions,o=await n(t.floating);return{reference:We(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function je(t){return z(t).direction==="rtl"}const Ye={convertOffsetParentRelativeRectToViewportRelativeRect:ke,getDocumentElement:I,getClippingRect:Ne,getOffsetParent:Xt,getElementRects:ze,getClientRects:$e,getDimensions:_e,getScale:Z,isElement:W,isRTL:je};function Ut(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function qe(t,e){let n=null,o;const i=I(t);function r(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),r();const a=t.getBoundingClientRect(),{left:p,top:f,width:d,height:u}=a;if(l||e(),!d||!u)return;const m=lt(f),h=lt(i.clientWidth-(p+d)),g=lt(i.clientHeight-(f+u)),w=lt(p),x={rootMargin:-m+"px "+-h+"px "+-g+"px "+-w+"px",threshold:C(0,N(1,c))||1};let R=!0;function b(P){const O=P[0].intersectionRatio;if(O!==c){if(!R)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!Ut(a,t.getBoundingClientRect())&&s(),R=!1}try{n=new IntersectionObserver(b,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,x)}n.observe(t)}return s(!0),r}function Ie(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,a=Rt(t),p=i||r?[...a?rt(a):[],...rt(e)]:[];p.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const f=a&&l?qe(a,n):null;let d=-1,u=null;s&&(u=new ResizeObserver(w=>{let[y]=w;y&&y.target===a&&u&&(u.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=u)==null||x.observe(e)})),n()}),a&&!c&&u.observe(a),u.observe(e));let m,h=c?Q(t):null;c&&g();function g(){const w=Q(t);h&&!Ut(h,w)&&n(),h=w,m=requestAnimationFrame(g)}return n(),()=>{var w;p.forEach(y=>{i&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),f?.(),(w=u)==null||w.disconnect(),u=null,c&&cancelAnimationFrame(m)}}const Xe=ye,Bt=pe,Ue=de,Ke=xe,Ge=he,Je=fe,Qe=ge,Ze=(t,e,n)=>{const o=new Map,i={platform:Ye,...n},r={...i.platform,_c:o};return ae(t,e,{...i,platform:r})};var tn=Object.defineProperty,U=(t,e,n,o)=>{for(var i=void 0,r=t.length-1,s;r>=0;r--)(s=t[r])&&(i=s(e,n,i)||i);return i&&tn(e,n,i),i};const ot={Flip:"flip",AutoPlacementHorizontal:"auto-placement-horizontal",AutoPlacementVertical:"auto-placement-vertical"},en={[ot.Flip]:Ue(),[ot.AutoPlacementHorizontal]:Bt({allowedPlacements:["bottom","top","bottom-start","bottom-end","top-start","top-end"]}),[ot.AutoPlacementVertical]:Bt({allowedPlacements:["left","right","left-start","left-end","right-start","right-end"]})};class j extends S.VividElement{constructor(){super(...arguments),this.open=!1,this.dismissible=!1,this.arrow=!1,this.alternate=!1,this.placementStrategy=ot.Flip,this.animationFrame=!1,this.strategy="fixed",this.offset=null,this.#i=()=>(this.#n=this.updatePosition(),this.#n)}get#r(){let e=[Qe(),en[this.placementStrategy],Ge(),Ke({apply({availableWidth:o,availableHeight:i,elements:r}){Object.assign(r.floating.style,{maxWidth:`${o}px`,maxHeight:`${i}px`})}})],n=this.offset??0;return this.arrow&&(n+=12,e=[...e,Je({element:this.arrowEl,padding:10})]),n>0&&e.unshift(Xe(n)),e}#o;openChanged(e,n){this.#e(),this.#t(),this.$emit(n?"vwc-popup:open":"vwc-popup:close")}animationFrameChanged(){this.#t()}anchorChanged(){this.#t()}strategyChanged(){this.#e()}connectedCallback(){super.connectedCallback(),this.#e(),this.#t()}disconnectedCallback(){super.disconnectedCallback(),this.#t()}#t(){this.#o?.(),this.open&&this.controlEl&&this.controlEl.classList.add("open"),this.anchorEl&&this.open&&this.popupEl&&(this.#o=Ie(this.anchorEl,this.popupEl,this.#i,{animationFrame:this.animationFrame}))}#e(){this.popupEl&&this.strategy==="fixed"&&(this.open?this.popupEl.showPopover():this.popupEl.hidePopover())}#n;#i;async updatePosition(){if(!this.open||!this.anchorEl)return;const e=await Ze(this.anchorEl,this.popupEl,{placement:this.placement,strategy:this.strategy,middleware:this.#r});this.#s(e),this.arrow&&this.#l(e)}#s(e){const{x:n,y:o}=e,{referenceHidden:i}=e.middlewareData.hide;Object.assign(this.popupEl.style,{left:`${n}px`,top:`${o}px`,visibility:i?"hidden":"visible"})}#l(e){const{x:n,y:o}=e.middlewareData.arrow,i={left:"calc(100% - 4px)",right:"-4px",top:"calc(100% - 4px)",bottom:"-4px"},r=e.placement.split("-")[0];Object.assign(this.arrowEl.style,{left:n?`${n}px`:i[r],top:o?`${o}px`:i[r]})}get anchorEl(){return this.anchor??null}show(){return this.open=!0,this.#n??Promise.resolve()}hide(){this.open=!1}}U([S.attr({mode:"boolean"})],j.prototype,"open");U([S.attr({mode:"boolean"})],j.prototype,"dismissible");U([S.attr({mode:"boolean"})],j.prototype,"arrow");U([S.attr({mode:"boolean"})],j.prototype,"alternate");U([S.attr({mode:"fromView"})],j.prototype,"placement");U([S.attr({mode:"boolean",attribute:"animation-frame"})],j.prototype,"animationFrame");U([S.attr({mode:"fromView"})],j.prototype,"strategy");U([S.attr({attribute:"offset",converter:S.nullableNumberConverter})],j.prototype,"offset");U([S.observable],j.prototype,"anchor");const nn=":host{display:var(--_popup-display, inline)}.control{border-radius:inherit;background:var(--vvd-color-surface-4dp);contain:layout}.control:not(.open){display:none}.popup-wrapper{white-space:initial;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.popup-wrapper{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.popup-wrapper ::-webkit-scrollbar{width:4px}.popup-wrapper ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.popup-wrapper ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.popup-wrapper{z-index:var(--_popup-z-index, 10);overflow:visible;padding:0;border:none;border-radius:8px;margin:0;inline-size:max-content}.popup-wrapper:not(.absolute){position:fixed}.popup-wrapper.absolute{position:absolute;top:0;left:0}.popup-content{display:grid;color:var(--vvd-color-canvas-text)}.dismissible .popup-content{align-content:start;grid-template-columns:1fr auto}.arrow{position:absolute;z-index:-1;width:8px;height:8px;background:var(--vvd-color-surface-4dp);transform:rotate(45deg)}.dismissible-button{align-self:flex-start;margin-block-start:4px;margin-inline-end:4px}",on=({open:t,dismissible:e,alternate:n})=>Jt.classNames("control",["open",!!t],["dismissible",!!e],["alternate",!!n]);function rn(t){return t.strategy&&t.strategy==="fixed"?"manual":null}const sn=t=>{const e=t.tagFor(Ht.Elevation),n=t.tagFor(Vt.Button);return S.html`
|
|
2
2
|
<${e}>
|
|
3
3
|
<div popover="${rn}" class="popup-wrapper ${o=>o.strategy}" ${ht.ref("popupEl")} part="popup-base">
|
|
4
4
|
<div ${ht.ref("controlEl")} class="${on}" aria-hidden="${o=>o.open?"false":"true"}"
|
package/bundled/definition9.js
CHANGED
|
@@ -2,8 +2,8 @@ import { B as Kt, b as Gt } from "./definition3.js";
|
|
|
2
2
|
import { E as Jt, e as Qt } from "./definition4.js";
|
|
3
3
|
import { V as Zt, a as G, n as te, o as ee, h as mt, c as ne, d as oe } from "./vivid-element.js";
|
|
4
4
|
import { r as ht } from "./ref.js";
|
|
5
|
-
import { c as ie } from "./class-names.js";
|
|
6
5
|
import { w as At } from "./when.js";
|
|
6
|
+
import { c as ie } from "./class-names.js";
|
|
7
7
|
const Ht = ["top", "right", "bottom", "left"], Et = ["start", "end"], Ct = /* @__PURE__ */ Ht.reduce((t, e) => t.concat(e, e + "-" + Et[0], e + "-" + Et[1]), []), M = Math.min, C = Math.max, ct = Math.round, st = Math.floor, z = (t) => ({
|
|
8
8
|
x: t,
|
|
9
9
|
y: t
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const h=require("./attribute-binding-behaviour.cjs"),o=require("./vivid-element.cjs");class g{constructor(e,t){this.target=null,this.bindingBehaviours=[],this.onSourceAriaPropertyChanged=(r,i)=>{!this.forwardedProperties.has(i)||i in this.boundProperties||this.forwardPropertyToTarget(this.target,i,r[i])},this.target=e,this.boundProperties=t.boundProperties,this.forwardedProperties=t.forwardedProperties}bind(e){const t=e.source;this.bindPropertiesToTarget(t,this.boundProperties,this.target),this.startForwardingPropertiesToTarget(t,this.forwardedProperties,this.target)}bindPropertiesToTarget(e,t,r){for(const[i,a]of Object.entries(t)){const n=a instanceof Function?a:()=>a;this.bindingBehaviours.push(new h.AttributeBindingBehavior(r,o.oneWay(n),o.Observable.isVolatileBinding(n),o.ariaAttributeName(i)))}for(const i of this.bindingBehaviours)i.bind({source:e,context:e.$fastController.context})}startForwardingPropertiesToTarget(e,t,r){for(const i of t)i in this.boundProperties||this.forwardPropertyToTarget(r,i,e[i]);o.subscribeToAriaPropertyChanges(e,this.onSourceAriaPropertyChanged)}forwardPropertyToTarget(e,t,r){r==null||r===!1?e.removeAttribute(o.ariaAttributeName(t)):e.setAttribute(o.ariaAttributeName(t),String(r))}}class d extends o.StatelessAttachedAttributeDirective{constructor(e,t){super("vvd-delegate-aria"),this.boundProperties=e,this.forwardedProperties=t,this.targetNodeId=""}bind(e){const t=e.targets[this.targetNodeId];new g(t,{boundProperties:this.boundProperties,forwardedProperties:this.forwardedProperties}).bind(e)}}o.HTMLDirective.define(d);function u(s={},e={}){const t=new Set((e.onlySpecified?[]:o.ariaMixinProperties).filter(r=>!(r in s)));return new d(s,t)}const b=s=>{class e extends s{constructor(){super(...arguments),this._vividAriaBehaviour="delegate"}}return e};exports.DelegatesAria=b;exports.delegateAria=u;
|
|
@@ -1,77 +1,90 @@
|
|
|
1
1
|
import { A as h } from "./attribute-binding-behaviour.js";
|
|
2
|
-
import { O as
|
|
2
|
+
import { g, O as b, j as a, s as c, k as u, S as f, H as p } from "./vivid-element.js";
|
|
3
3
|
class P {
|
|
4
|
-
constructor(
|
|
5
|
-
this.target =
|
|
6
|
-
this.forwardedProperties.has(i)
|
|
7
|
-
}, this.
|
|
4
|
+
constructor(e, r) {
|
|
5
|
+
this.target = null, this.bindingBehaviours = [], this.onSourceAriaPropertyChanged = (t, i) => {
|
|
6
|
+
!this.forwardedProperties.has(i) || i in this.boundProperties || this.forwardPropertyToTarget(this.target, i, t[i]);
|
|
7
|
+
}, this.target = e, this.boundProperties = r.boundProperties, this.forwardedProperties = r.forwardedProperties;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
// private source: DelegatesAriaElement | null = null;
|
|
10
|
+
bind(e) {
|
|
11
|
+
const r = e.source;
|
|
12
|
+
this.bindPropertiesToTarget(r, this.boundProperties, this.target), this.startForwardingPropertiesToTarget(
|
|
11
13
|
r,
|
|
12
14
|
this.forwardedProperties,
|
|
13
15
|
this.target
|
|
14
16
|
);
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
bindPropertiesToTarget(r, e, t) {
|
|
20
|
-
for (const [i, o] of Object.entries(e)) {
|
|
21
|
-
const a = o instanceof Function ? o : () => o;
|
|
18
|
+
bindPropertiesToTarget(e, r, t) {
|
|
19
|
+
for (const [i, o] of Object.entries(r)) {
|
|
20
|
+
const n = o instanceof Function ? o : () => o;
|
|
22
21
|
this.bindingBehaviours.push(
|
|
23
22
|
new h(
|
|
24
23
|
t,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
g(n),
|
|
25
|
+
b.isVolatileBinding(n),
|
|
26
|
+
a(i)
|
|
28
27
|
)
|
|
29
28
|
);
|
|
30
29
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
startForwardingPropertiesToTarget(r, e, t) {
|
|
37
|
-
for (const i of e)
|
|
38
|
-
this.forwardPropertyToTarget(t, i, r[i]);
|
|
39
|
-
g(r, this.onSourceAriaPropertyChanged);
|
|
30
|
+
for (const i of this.bindingBehaviours)
|
|
31
|
+
i.bind({
|
|
32
|
+
source: e,
|
|
33
|
+
context: e.$fastController.context
|
|
34
|
+
});
|
|
40
35
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
// private releasePropertyBindings(source: DelegatesAriaElement) {
|
|
37
|
+
// for (const behavior of this.bindingBehaviours) {
|
|
38
|
+
// (behavior as any).unbind(); // TODO: fix type
|
|
39
|
+
// }
|
|
40
|
+
// this.bindingBehaviours = [];
|
|
41
|
+
// }
|
|
42
|
+
startForwardingPropertiesToTarget(e, r, t) {
|
|
43
|
+
for (const i of r)
|
|
44
|
+
i in this.boundProperties || this.forwardPropertyToTarget(t, i, e[i]);
|
|
45
|
+
c(
|
|
46
|
+
e,
|
|
44
47
|
this.onSourceAriaPropertyChanged
|
|
45
48
|
);
|
|
46
49
|
}
|
|
47
|
-
forwardPropertyToTarget(
|
|
48
|
-
|
|
50
|
+
forwardPropertyToTarget(e, r, t) {
|
|
51
|
+
t == null || t === !1 ? e.removeAttribute(a(r)) : e.setAttribute(a(r), String(t));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
class d extends f {
|
|
55
|
+
constructor(e, r) {
|
|
56
|
+
super("vvd-delegate-aria"), this.boundProperties = e, this.forwardedProperties = r, this.targetNodeId = "";
|
|
57
|
+
}
|
|
58
|
+
bind(e) {
|
|
59
|
+
const r = e.targets[this.targetNodeId];
|
|
60
|
+
new P(
|
|
61
|
+
r,
|
|
62
|
+
// Pass the target element as target
|
|
63
|
+
{
|
|
64
|
+
boundProperties: this.boundProperties,
|
|
65
|
+
forwardedProperties: this.forwardedProperties
|
|
66
|
+
}
|
|
67
|
+
).bind(e);
|
|
49
68
|
}
|
|
50
69
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
70
|
+
p.define(d);
|
|
71
|
+
function v(s = {}, e = {}) {
|
|
72
|
+
const r = new Set(
|
|
73
|
+
(e.onlySpecified ? [] : u).filter(
|
|
54
74
|
(t) => !(t in s)
|
|
55
75
|
)
|
|
56
76
|
);
|
|
57
|
-
return new
|
|
58
|
-
"vvd-delegate-aria",
|
|
59
|
-
P,
|
|
60
|
-
{
|
|
61
|
-
boundProperties: s,
|
|
62
|
-
forwardedProperties: e
|
|
63
|
-
}
|
|
64
|
-
);
|
|
77
|
+
return new d(s, r);
|
|
65
78
|
}
|
|
66
|
-
const
|
|
67
|
-
class
|
|
79
|
+
const A = (s) => {
|
|
80
|
+
class e extends s {
|
|
68
81
|
constructor() {
|
|
69
82
|
super(...arguments), this._vividAriaBehaviour = "delegate";
|
|
70
83
|
}
|
|
71
84
|
}
|
|
72
|
-
return
|
|
85
|
+
return e;
|
|
73
86
|
};
|
|
74
87
|
export {
|
|
75
|
-
|
|
76
|
-
|
|
88
|
+
A as D,
|
|
89
|
+
v as d
|
|
77
90
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./vivid-element.cjs"),m=require("./key-codes.cjs");var f=Object.defineProperty,l=(r,i,o,e)=>{for(var t=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(t=n(i,o,t)||t);return t&&f(i,o,t),t};const h="form-associated-proxy",d="ElementInternals",c=d in window&&"setFormValue"in window[d].prototype,u=new WeakMap,p=r=>{class i extends r{constructor(...e){super(...e),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}static get formAssociated(){return c}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){const e=this.proxy.labels,t=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`));return Object.freeze(t.concat(Array.from(e)))}else return a.emptyArray}valueChanged(e,t){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.setFormValue(this.value),this.validate()}get currentValue(){return this.value}set currentValue(e){this.value=e}initialValueChanged(e,t){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),a.
|
|
1
|
+
"use strict";const a=require("./vivid-element.cjs"),m=require("./key-codes.cjs");var f=Object.defineProperty,l=(r,i,o,e)=>{for(var t=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(t=n(i,o,t)||t);return t&&f(i,o,t),t};const h="form-associated-proxy",d="ElementInternals",c=d in window&&"setFormValue"in window[d].prototype,u=new WeakMap,p=r=>{class i extends r{constructor(...e){super(...e),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}static get formAssociated(){return c}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){const e=this.proxy.labels,t=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`));return Object.freeze(t.concat(Array.from(e)))}else return a.emptyArray}valueChanged(e,t){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.setFormValue(this.value),this.validate()}get currentValue(){return this.value}set currentValue(e){this.value=e}initialValueChanged(e,t){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),a.Updates.enqueue(()=>this.classList.toggle("disabled",this.disabled))}nameChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),a.Updates.enqueue(()=>this.classList.toggle("required",this.required)),this.validate()}get elementInternals(){if(!c)return null;let e=u.get(this);return e||(e=this.attachInternals(),u.set(this,e)),e}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){super.disconnectedCallback(),this.proxyEventsToBlock.forEach(e=>this.proxy.removeEventListener(e,this.stopPropagation)),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(e,t,s){if("valid"in e&&this.disabled){const{valid:n,...y}=e;e=y}this.elementInternals?this.elementInternals.setValidity(e,t,s):typeof t=="string"&&this.proxy.setCustomValidity(t)}formDisabledCallback(e){this.disabled=e}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach(e=>this.proxy.addEventListener(e,this.stopPropagation)),this.proxy.disabled=this.disabled,this.proxy.required=this.required,typeof this.name=="string"&&(this.proxy.name=this.name),typeof this.value=="string"&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",h),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",h)),this.shadowRoot.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){this.removeChild(this.proxy),this.shadowRoot.removeChild(this.proxySlot)}validate(e){if(this.proxy instanceof HTMLElement&&this.elementInternals){const t=this.proxy.validity.valid,s=this.control,n=s&&s.validity&&!s.validity.valid&&(s.validity.tooShort||s.validity.tooLong);t&&n?this.setValidity(s.validity,s.validationMessage,e):this.setValidity(this.proxy.validity,this.proxy.validationMessage,e)}}setFormValue(e,t){this.elementInternals&&this.elementInternals.setFormValue(e,t||e)}_keypressHandler(e){switch(e.key){case m.keyEnter:this.form instanceof HTMLFormElement&&this.form.querySelector("[type=submit]")?.click();break}}stopPropagation(e){e.stopPropagation()}}return l([a.attr({attribute:"current-value"})],i.prototype,"value"),l([a.attr({mode:"fromView",attribute:"value"})],i.prototype,"initialValue"),l([a.attr({mode:"boolean"})],i.prototype,"disabled"),l([a.attr],i.prototype,"name"),l([a.attr({mode:"boolean"})],i.prototype,"required"),i},v={fromView(r){return typeof r=="string"?r.toLowerCase()==="true":!!r},toView(r){return r?"true":"false"}},k=r=>{class i extends p(r){constructor(){super(...arguments),this.dirtyChecked=!1,this.defaultChecked=!1}defaultCheckedChanged(){this.dirtyChecked||(this.checked=this.defaultChecked,this.dirtyChecked=!1)}checkedChanged(e,t){this.dirtyChecked||(this.dirtyChecked=!0),this.updateForm(),this.proxy instanceof HTMLInputElement&&(this.proxy.checked=this.checked),e!==void 0&&this.$emit("change"),this.validate()}get checkedAttribute(){return this.defaultChecked}set checkedAttribute(e){this.defaultChecked=e}get currentChecked(){return this.checked}set currentChecked(e){this.checked=e}updateForm(){const e=this.checked?this.value:null;this.setFormValue(e,e)}connectedCallback(){super.connectedCallback(),this.updateForm()}formResetCallback(){super.formResetCallback(),this.checked=!!this.defaultChecked,this.dirtyChecked=!1}}return l([a.attr({attribute:"checked",mode:"boolean"})],i.prototype,"defaultChecked"),l([a.attr({attribute:"current-checked",converter:v})],i.prototype,"checked"),i};exports.CheckableFormAssociated=k;exports.FormAssociated=p;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a, e as m,
|
|
1
|
+
import { a, e as m, U as h } from "./vivid-element.js";
|
|
2
2
|
import { f } from "./key-codes.js";
|
|
3
3
|
var v = Object.defineProperty, l = (r, i, o, e) => {
|
|
4
4
|
for (var t = void 0, s = r.length - 1, n; s >= 0; s--)
|
|
@@ -85,7 +85,7 @@ const d = "form-associated-proxy", c = "ElementInternals", u = c in window && "s
|
|
|
85
85
|
* @internal
|
|
86
86
|
*/
|
|
87
87
|
disabledChanged(e, t) {
|
|
88
|
-
this.proxy instanceof HTMLElement && (this.proxy.disabled = this.disabled), h.
|
|
88
|
+
this.proxy instanceof HTMLElement && (this.proxy.disabled = this.disabled), h.enqueue(() => this.classList.toggle("disabled", this.disabled));
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* @internal
|
|
@@ -97,7 +97,7 @@ const d = "form-associated-proxy", c = "ElementInternals", u = c in window && "s
|
|
|
97
97
|
* @internal
|
|
98
98
|
*/
|
|
99
99
|
requiredChanged(e, t) {
|
|
100
|
-
this.proxy instanceof HTMLElement && (this.proxy.required = this.required), h.
|
|
100
|
+
this.proxy instanceof HTMLElement && (this.proxy.required = this.required), h.enqueue(() => this.classList.toggle("required", this.required)), this.validate();
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* The element internals object. Will only exist
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./vivid-element.cjs"),
|
|
1
|
+
"use strict";const s=require("./vivid-element.cjs"),d=require("./attribute-binding-behaviour.cjs");class h{constructor(t,e){this.target=null,this.bindingBehaviours=[],this.target=t,this.boundProperties=e.boundProperties}bind(t){const e=t.source;if(this.target!==e)throw new Error("Target element must be the same as the source element");this.bindPropertiesToTarget(e,this.boundProperties,this.target)}bindPropertiesToTarget(t,e,o){for(const[i,n]of Object.entries(e)){const c=n instanceof Function?n:u=>u[i]??n;this.bindingBehaviours.push(new d.AttributeBindingBehavior(o,s.oneWay(c),!0,s.ariaAttributeName(i)))}for(const i of this.bindingBehaviours)i.bind({source:t,context:t.$fastController.context})}}class a extends s.StatelessAttachedAttributeDirective{constructor(t){super("vvd-host-semantics"),this.boundProperties=t,this.targetNodeId=""}bind(t){const e=t.targets[this.targetNodeId];new h(e,{boundProperties:this.boundProperties,forwardedProperties:new Set(s.ariaMixinProperties.filter(i=>!(i in this.boundProperties)))}).bind(t)}}s.HTMLDirective.define(a);function b(r={}){return new a(r)}const p=r=>{class t extends r{constructor(){super(...arguments),this._vividAriaBehaviour="host"}}return t};exports.HostSemantics=p;exports.applyHostSemantics=b;
|
|
@@ -1,50 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as
|
|
3
|
-
class
|
|
1
|
+
import { g as h, j as d, S as u, k as b, H as p } from "./vivid-element.js";
|
|
2
|
+
import { A as g } from "./attribute-binding-behaviour.js";
|
|
3
|
+
class m {
|
|
4
4
|
constructor(t, e) {
|
|
5
|
-
this.target =
|
|
5
|
+
this.target = null, this.bindingBehaviours = [], this.target = t, this.boundProperties = e.boundProperties;
|
|
6
6
|
}
|
|
7
7
|
bind(t) {
|
|
8
|
-
|
|
8
|
+
const e = t.source;
|
|
9
|
+
if (this.target !== e)
|
|
9
10
|
throw new Error("Target element must be the same as the source element");
|
|
10
|
-
this.bindPropertiesToTarget(
|
|
11
|
+
this.bindPropertiesToTarget(e, this.boundProperties, this.target);
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
bindPropertiesToTarget(t, e, n) {
|
|
16
|
-
for (const [s, r] of Object.entries(e)) {
|
|
17
|
-
const o = r instanceof Function ? r : (a) => a[s] ?? r;
|
|
13
|
+
bindPropertiesToTarget(t, e, o) {
|
|
14
|
+
for (const [i, r] of Object.entries(e)) {
|
|
15
|
+
const a = r instanceof Function ? r : (c) => c[i] ?? r;
|
|
18
16
|
this.bindingBehaviours.push(
|
|
19
|
-
new
|
|
20
|
-
n,
|
|
17
|
+
new g(
|
|
21
18
|
o,
|
|
19
|
+
h(a),
|
|
22
20
|
!0,
|
|
23
|
-
|
|
21
|
+
d(i)
|
|
24
22
|
)
|
|
25
23
|
);
|
|
26
24
|
}
|
|
27
|
-
|
|
25
|
+
for (const i of this.bindingBehaviours)
|
|
26
|
+
i.bind({
|
|
27
|
+
source: t,
|
|
28
|
+
context: t.$fastController.context
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
// private releasePropertyBindings(source: HostSemanticsElement) {
|
|
32
|
+
// for (const behavior of this.bindingBehaviours) {
|
|
33
|
+
// (behavior as any).unbind();
|
|
34
|
+
// }
|
|
35
|
+
// this.bindingBehaviours = [];
|
|
36
|
+
// }
|
|
37
|
+
}
|
|
38
|
+
class n extends u {
|
|
39
|
+
constructor(t) {
|
|
40
|
+
super("vvd-host-semantics"), this.boundProperties = t, this.targetNodeId = "";
|
|
28
41
|
}
|
|
29
|
-
|
|
30
|
-
|
|
42
|
+
bind(t) {
|
|
43
|
+
const e = t.targets[this.targetNodeId];
|
|
44
|
+
new m(
|
|
45
|
+
e,
|
|
46
|
+
// Pass the target element as target
|
|
47
|
+
{
|
|
48
|
+
boundProperties: this.boundProperties,
|
|
49
|
+
forwardedProperties: new Set(
|
|
50
|
+
b.filter((i) => !(i in this.boundProperties))
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
).bind(t);
|
|
31
54
|
}
|
|
32
55
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
);
|
|
37
|
-
return new u(
|
|
38
|
-
"vvd-host-semantics",
|
|
39
|
-
g,
|
|
40
|
-
{
|
|
41
|
-
boundProperties: i,
|
|
42
|
-
forwardedProperties: t
|
|
43
|
-
}
|
|
44
|
-
);
|
|
56
|
+
p.define(n);
|
|
57
|
+
function l(s = {}) {
|
|
58
|
+
return new n(s);
|
|
45
59
|
}
|
|
46
|
-
const
|
|
47
|
-
class t extends
|
|
60
|
+
const P = (s) => {
|
|
61
|
+
class t extends s {
|
|
48
62
|
constructor() {
|
|
49
63
|
super(...arguments), this._vividAriaBehaviour = "host";
|
|
50
64
|
}
|
|
@@ -52,6 +66,6 @@ const v = (i) => {
|
|
|
52
66
|
return t;
|
|
53
67
|
};
|
|
54
68
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
69
|
+
P as H,
|
|
70
|
+
l as a
|
|
57
71
|
};
|
package/bundled/localized.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const J=require("./vivid-element.cjs"),s="Play",l="Pause",c="Replay",d="Duration",u="LIVE",p="Loaded",b="Progress",g="Fullscreen",m="Mute",h="Unmute",y="Subtitles",f="Captions",L="Chapters",S="Descriptions",P="Close",T="Text",w="White",v="Black",k="Red",C="Green",M="Blue",D="Yellow",B="Magenta",E="Cyan",x="Background",F="Window",$="Transparent",A="Opaque",R="None",O="Raised",I="Depressed",Y="Uniform",N="Casual",W="Script",z="Reset",U="Done",V="Color",G="Opacity",q={"Audio Player":"Audio Player","Video Player":"Video Player",Play:s,Pause:l,Replay:c,"Current Time":"Current Time",Duration:d,"Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:u,"Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:p,Progress:b,"Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:g,"Exit Fullscreen":"Exit Fullscreen",Mute:m,Unmute:h,"Playback Rate":"Playback Rate",Subtitles:y,"subtitles off":"subtitles off",Captions:f,"captions off":"captions off",Chapters:L,Descriptions:S,"descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:P,"Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:T,White:w,Black:v,Red:k,Green:C,Blue:M,Yellow:D,Magenta:B,Cyan:E,Background:x,Window:F,Transparent:$,"Semi-Transparent":"Semi-Transparent",Opaque:A,"Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:R,Raised:O,Depressed:I,Uniform:Y,"Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:N,Script:W,"Small Caps":"Small Caps",Reset:z,"restore all settings to the default values":"restore all settings to the default values",Done:U,"Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:V,Opacity:G,"Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},H=Object.freeze(Object.defineProperty({__proto__:null,Background:x,Black:v,Blue:M,Captions:f,Casual:N,Chapters:L,Close:P,Color:V,Cyan:E,Depressed:I,Descriptions:S,Done:U,Duration:d,Fullscreen:g,Green:C,LIVE:u,Loaded:p,Magenta:B,Mute:m,None:R,Opacity:G,Opaque:A,Pause:l,Play:s,Progress:b,Raised:O,Red:k,Replay:c,Reset:z,Script:W,Subtitles:y,Text:T,Transparent:$,Uniform:Y,Unmute:h,White:w,Window:F,Yellow:D,default:q},Symbol.toStringTag,{value:"Module"})),j={lang:"en-US",common:{useCommaAsDecimalSeparator:!1},pickerField:{clearLabel:"Clear",okLabel:"OK"},calendarPicker:{months:{name:["January","February","March","April","May","June","July","August","September","October","November","December"],shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},weekdays:{name:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},firstDayOfWeek:0,dateFormat:"MM/dd/yyyy",dateFormatPlaceholder:"MM/DD/YYYY",chooseDateLabel:"Choose date",changeDateLabel:e=>`Change date, ${e}`,chooseDatesLabel:"Choose dates",changeDatesLabel:e=>`Change dates, ${e}`,prevYearLabel:"Previous year",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",nextYearLabel:"Next year",todayLabel:"today",selectedLabel:"selected",currentLabel:"current",changeMonthLabel:e=>`Change month, ${e} selected`,showCalendarForMonthLabel:e=>`Show calendar for ${e}`,invalidDateError:"Please enter a valid date.",invalidDateRangeError:"Please enter a valid date range.",startDateAfterMinDateError:e=>`The start date must be ${e} or later.`,endDateBeforeMaxDateError:e=>`The end date must be ${e} or earlier.`},timePicker:{defaultTo12HourClock:!0,chooseTimeLabel:"Choose time",changeTimeLabel:e=>`Change time, ${e}`,hoursLabel:"hours",minutesLabel:"minutes",secondsLabel:"seconds",meridiesLabel:"AM/PM",invalidTimeError:"Please enter a valid time."},dateTimePicker:{chooseDateTimeLabel:"Choose date and time",changeDateTimeLabel:e=>`Change date and time, ${e}`,invalidDateTimeError:"Please enter a valid date and time.",dateBeforeMinDateError:e=>`Date must be ${e} or later.`,dateAfterMaxDateError:e=>`Date must be ${e} or earlier.`,timeBeforeMinTimeError:e=>`Time must be ${e} or later.`,timeAfterMaxTimeError:e=>`Time must be ${e} or earlier.`},filePicker:{invalidFileTypeError:"You can't select files of this type.",maxFilesExceededError:"You can't select any more files.",fileTooBigError:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",removeFileLabel:"Remove file",invalidFilesError:"One or more selected files are invalid. Please, upload only valid file types under the size limit.",uploadFilesLabel:"Upload files"},audioPlayer:{playButtonLabel:"Play",pauseButtonLabel:"Pause",sliderLabel:"Audio progress bar",skipForwardButton:"Skip Forward",skipBackwardButton:"Skip Backward"},alert:{dismissButtonLabel:"Close"},dialog:{dismissButtonLabel:"Close"},banner:{dismissButtonLabel:"Close"},numberField:{incrementButtonLabel:e=>e===1?"Increase value":`Increase value by ${e}`,decrementButtonLabel:e=>e===1?"Decrease value":`Decrease value by ${e}`,updatedValueAnnouncement:e=>`Updated value: ${e}`},splitButton:{showMoreActionsLabel:"Show more actions"},videoPlayer:H,rangeSlider:{startThumbLabel:"min",endThumbLabel:"max"},dialPad:{inputLabel:"Phone number",deleteButtonLabel:"Delete last digit",callButtonLabel:"Call",endCallButtonLabel:"End call",digitOneLabel:"1",digitTwoLabel:"2 ABC",digitThreeLabel:"3 DEF",digitFourLabel:"4 GHI",digitFiveLabel:"5 JKL",digitSixLabel:"6 MNO",digitSevenLabel:"7 PQRS",digitEightLabel:"8 TUV",digitNineLabel:"9 WXYZ",digitAsteriskLabel:"*",digitZeroLabel:"0",digitHashtagLabel:"#",errorLabel:"Error:"},tab:{dismissButtonLabel:"Press the DELETE key to close this tab"},searchableSelect:{clearButtonLabel:"Clear selection",noOptionsMessage:"No options",noMatchesMessage:"No options found",loadingOptionsMessage:"Loading...",removeTagButtonLabel:e=>`Remove ${e}`,optionSelectedMessage:e=>`Option ${e} selected.`,optionDeselectedMessage:e=>`Option ${e} deselected.`,optionFocusedMessage:(e,t,a,n)=>`Option ${e} focused, ${n?"selected, ":""}${t} of ${a}.`,maxSelectedMessage:(e,t)=>`${e} of ${t} selected.`},richTextEditor:{textBlockType:"Text Block Type",textSize:"Text Size",bold:"Bold",italics:"Italics",underline:"Underline",strikethrough:"Strikethrough",monospace:"Monospace",dragAndDropFilesHere:"Drag&Drop files here"},button:{pendingLabel:"Loading..."},feedbackMessage:{errorIconText:"Error:",successIconText:"Success:"},connotationAnnoncement:{accentIcon:"Accent:",alertIcon:"Alert:",informationIcon:"Information:",successIcon:"Success:",warningIcon:"Warning:",announcementIcon:"Announcement:",ctaIcon:"Call to action:"},charCount:{charactersLimitMessage:e=>`You can enter up to ${e} characters`,charactersRemainingMessage:e=>`You have ${e} characters remaining`},dataGrid:{cell:{selected:"Selected",button:"(button)"}},pagination:{previousPageLabel:"Go to previous page",nextPageLabel:"Go to next page",goToPageLabel:e=>`Go to page ${e}`},tag:{remove:e=>`Remove ${e}`},toggletip:{anchorLabel:e=>e?`Show more information about ${e}`:"Show more information"},simpleColorPicker:{colorPaletteLabel:"Color palette",colorSwatchLabel:(e,t,a)=>{let n=t?`Select ${t}, hex: ${e}`:`Select ${e}`;return a&&(n+=", selected."),n}}};var K=Object.defineProperty,Z=(e,t,a,n)=>{for(var o=void 0,i=e.length-1,r;i>=0;i--)(r=e[i])&&(o=r(t,a,o)||o);return o&&K(t,a,o),o};class _{constructor(){this.locale=j}}Z([J.observable],_.prototype,"locale");const Q=new _,X=e=>{class t extends e{get locale(){return Q.locale}}return t};exports.Localized=X;
|
|
1
|
+
"use strict";const J=require("./vivid-element.cjs"),s="Play",l="Pause",c="Replay",d="Duration",u="LIVE",p="Loaded",b="Progress",g="Fullscreen",m="Mute",h="Unmute",y="Subtitles",L="Captions",f="Chapters",S="Descriptions",P="Close",T="Text",k="White",w="Black",v="Red",C="Green",M="Blue",D="Yellow",B="Magenta",E="Cyan",x="Background",F="Window",$="Transparent",A="Opaque",O="None",R="Raised",I="Depressed",Y="Uniform",N="Casual",W="Script",z="Reset",U="Done",V="Color",G="Opacity",q={"Audio Player":"Audio Player","Video Player":"Video Player",Play:s,Pause:l,Replay:c,"Current Time":"Current Time",Duration:d,"Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:u,"Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:p,Progress:b,"Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:g,"Exit Fullscreen":"Exit Fullscreen",Mute:m,Unmute:h,"Playback Rate":"Playback Rate",Subtitles:y,"subtitles off":"subtitles off",Captions:L,"captions off":"captions off",Chapters:f,Descriptions:S,"descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:P,"Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:T,White:k,Black:w,Red:v,Green:C,Blue:M,Yellow:D,Magenta:B,Cyan:E,Background:x,Window:F,Transparent:$,"Semi-Transparent":"Semi-Transparent",Opaque:A,"Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:O,Raised:R,Depressed:I,Uniform:Y,"Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:N,Script:W,"Small Caps":"Small Caps",Reset:z,"restore all settings to the default values":"restore all settings to the default values",Done:U,"Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:V,Opacity:G,"Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},H=Object.freeze(Object.defineProperty({__proto__:null,Background:x,Black:w,Blue:M,Captions:L,Casual:N,Chapters:f,Close:P,Color:V,Cyan:E,Depressed:I,Descriptions:S,Done:U,Duration:d,Fullscreen:g,Green:C,LIVE:u,Loaded:p,Magenta:B,Mute:m,None:O,Opacity:G,Opaque:A,Pause:l,Play:s,Progress:b,Raised:R,Red:v,Replay:c,Reset:z,Script:W,Subtitles:y,Text:T,Transparent:$,Uniform:Y,Unmute:h,White:k,Window:F,Yellow:D,default:q},Symbol.toStringTag,{value:"Module"})),j={lang:"en-US",common:{useCommaAsDecimalSeparator:!1},pickerField:{clearLabel:"Clear",okLabel:"OK"},calendarPicker:{months:{name:["January","February","March","April","May","June","July","August","September","October","November","December"],shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},weekdays:{name:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},firstDayOfWeek:0,dateFormat:"MM/dd/yyyy",dateFormatPlaceholder:"MM/DD/YYYY",chooseDateLabel:"Choose date",changeDateLabel:e=>`Change date, ${e}`,chooseDatesLabel:"Choose dates",changeDatesLabel:e=>`Change dates, ${e}`,prevYearLabel:"Previous year",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",nextYearLabel:"Next year",todayLabel:"today",selectedLabel:"selected",currentLabel:"current",changeMonthLabel:e=>`Change month, ${e} selected`,showCalendarForMonthLabel:e=>`Show calendar for ${e}`,invalidDateError:"Please enter a valid date.",invalidDateRangeError:"Please enter a valid date range.",startDateAfterMinDateError:e=>`The start date must be ${e} or later.`,endDateBeforeMaxDateError:e=>`The end date must be ${e} or earlier.`},timePicker:{defaultTo12HourClock:!0,chooseTimeLabel:"Choose time",changeTimeLabel:e=>`Change time, ${e}`,hoursLabel:"hours",minutesLabel:"minutes",secondsLabel:"seconds",meridiesLabel:"AM/PM",invalidTimeError:"Please enter a valid time."},dateTimePicker:{chooseDateTimeLabel:"Choose date and time",changeDateTimeLabel:e=>`Change date and time, ${e}`,invalidDateTimeError:"Please enter a valid date and time.",dateBeforeMinDateError:e=>`Date must be ${e} or later.`,dateAfterMaxDateError:e=>`Date must be ${e} or earlier.`,timeBeforeMinTimeError:e=>`Time must be ${e} or later.`,timeAfterMaxTimeError:e=>`Time must be ${e} or earlier.`},filePicker:{invalidFileTypeError:"You can't select files of this type.",maxFilesExceededError:"You can't select any more files.",fileTooBigError:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",removeFileLabel:"Remove file",invalidFilesError:"One or more selected files are invalid. Please, upload only valid file types under the size limit.",uploadFilesLabel:"Upload files"},audioPlayer:{playButtonLabel:"Play",pauseButtonLabel:"Pause",sliderLabel:"Audio progress bar",skipForwardButton:"Skip Forward",skipBackwardButton:"Skip Backward"},alert:{dismissButtonLabel:"Close"},dialog:{dismissButtonLabel:"Close"},banner:{dismissButtonLabel:"Close"},numberField:{incrementButtonLabel:e=>e===1?"Increase value":`Increase value by ${e}`,decrementButtonLabel:e=>e===1?"Decrease value":`Decrease value by ${e}`,updatedValueAnnouncement:e=>`Updated value: ${e}`},splitButton:{showMoreActionsLabel:"Show more actions"},videoPlayer:H,rangeSlider:{startThumbLabel:"min",endThumbLabel:"max"},dialPad:{inputLabel:"Phone number",deleteButtonLabel:"Delete last digit",callButtonLabel:"Call",endCallButtonLabel:"End call",digitOneLabel:"1",digitTwoLabel:"2 ABC",digitThreeLabel:"3 DEF",digitFourLabel:"4 GHI",digitFiveLabel:"5 JKL",digitSixLabel:"6 MNO",digitSevenLabel:"7 PQRS",digitEightLabel:"8 TUV",digitNineLabel:"9 WXYZ",digitAsteriskLabel:"*",digitZeroLabel:"0",digitHashtagLabel:"#",errorLabel:"Error:"},tab:{dismissButtonLabel:"Press the DELETE key to close this tab"},searchableSelect:{clearButtonLabel:"Clear selection",noOptionsMessage:"No options",noMatchesMessage:"No options found",loadingOptionsMessage:"Loading...",removeTagButtonLabel:e=>`Remove ${e}`,optionSelectedMessage:e=>`Option ${e} selected.`,optionDeselectedMessage:e=>`Option ${e} deselected.`,optionFocusedMessage:(e,o,a,r)=>`Option ${e} focused, ${r?"selected, ":""}${o} of ${a}.`,maxSelectedMessage:(e,o)=>`${e} of ${o} selected.`},richTextEditor:{textBlockType:"Text Block Type",textSize:"Text Size",bold:"Bold",italics:"Italics",underline:"Underline",strikethrough:"Strikethrough",monospace:"Monospace",dragAndDropFilesHere:"Drag&Drop files here"},button:{pendingLabel:"Loading..."},feedbackMessage:{errorIconText:"Error:",successIconText:"Success:"},connotationAnnoncement:{accentIcon:"Accent:",alertIcon:"Alert:",informationIcon:"Information:",successIcon:"Success:",warningIcon:"Warning:",announcementIcon:"Announcement:",ctaIcon:"Call to action:"},charCount:{charactersLimitMessage:e=>`You can enter up to ${e} characters`,charactersRemainingMessage:e=>`You have ${e} characters remaining`},dataGrid:{cell:{selected:"Selected",button:"(button)"}},pagination:{previousPageLabel:"Go to previous page",nextPageLabel:"Go to next page",goToPageLabel:e=>`Go to page ${e}`},tag:{remove:e=>`Remove ${e}`},toggletip:{anchorLabel:e=>e?`Show more information about ${e}`:"Show more information"},baseColorPicker:{colorSwatchLabel:(e,o,a)=>{let r=o?`Select ${o}, hex: ${e}`:`Select ${e}`;return a&&(r+=", selected."),r}},simpleColorPicker:{colorPaletteLabel:"Color palette"},colorPicker:{popupLabel:"Color Picker",swatchesLabel:"Saved colors:",pickerButtonLabel:"Open Color Picker",saveButtonLabel:"Save current color",closeButtonLabel:"Close Color Picker",copyButtonLabel:"Copy Color to Clipboard",copyErrorText:"Copy failed. Clipboard access was blocked. Try again."}};var K=Object.defineProperty,Z=(e,o,a,r)=>{for(var t=void 0,i=e.length-1,n;i>=0;i--)(n=e[i])&&(t=n(o,a,t)||t);return t&&K(o,a,t),t};class _{constructor(){this.locale=j}}Z([J.observable],_.prototype,"locale");const Q=new _,X=e=>{class o extends e{get locale(){return Q.locale}}return o};exports.Localized=X;
|