@nova-design-system/nova-webcomponents 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +3 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +6 -6
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +3 -3
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldslider.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtime.cjs.entry.js +9 -9
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +5 -5
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +18 -2
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +3 -3
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js +3 -0
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +2 -2
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-datagrid.js +2 -2
- package/dist/components/nv-dialog.js +4 -4
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-fielddate.js +4 -4
- package/dist/components/nv-fielddaterange.js +10 -10
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +8 -8
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +6 -6
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +6 -6
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +8 -8
- package/dist/components/nv-fieldslider.js +7 -7
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtime.js +13 -13
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +4 -4
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-131e5140.js → p-001c888b.js} +2 -2
- package/dist/components/{p-131e5140.js.map → p-001c888b.js.map} +1 -1
- package/dist/components/{p-953d8b4d.js → p-00ac701f.js} +2 -2
- package/dist/components/{p-953d8b4d.js.map → p-00ac701f.js.map} +1 -1
- package/dist/components/{p-a189d074.js → p-05c19c9a.js} +4 -4
- package/dist/components/{p-a189d074.js.map → p-05c19c9a.js.map} +1 -1
- package/dist/components/{p-c07c32d2.js → p-44f0039b.js} +2 -2
- package/dist/components/{p-c07c32d2.js.map → p-44f0039b.js.map} +1 -1
- package/dist/components/{p-a29a9396.js → p-4badc1d2.js} +7 -7
- package/dist/components/{p-a29a9396.js.map → p-4badc1d2.js.map} +1 -1
- package/dist/components/{p-f7c7a406.js → p-5bee0141.js} +3 -3
- package/dist/components/{p-f7c7a406.js.map → p-5bee0141.js.map} +1 -1
- package/dist/components/{p-dec6fc68.js → p-918bb719.js} +2 -2
- package/dist/components/{p-dec6fc68.js.map → p-918bb719.js.map} +1 -1
- package/dist/components/{p-3f58525b.js → p-919b5237.js} +5 -5
- package/dist/components/{p-3f58525b.js.map → p-919b5237.js.map} +1 -1
- package/dist/components/{p-3f567fde.js → p-970cd9b1.js} +4 -4
- package/dist/components/{p-3f567fde.js.map → p-970cd9b1.js.map} +1 -1
- package/dist/components/{p-dcaf9010.js → p-cebdbb40.js} +2 -2
- package/dist/components/{p-dcaf9010.js.map → p-cebdbb40.js.map} +1 -1
- package/dist/components/{p-df465ef2.js → p-d56b30ab.js} +3 -3
- package/dist/components/{p-df465ef2.js.map → p-d56b30ab.js.map} +1 -1
- package/dist/components/p-e072f051.js +88 -0
- package/dist/components/p-e072f051.js.map +1 -0
- package/dist/components/{p-a1438b39.js → p-e8c083e3.js} +3 -3
- package/dist/components/{p-a1438b39.js.map → p-e8c083e3.js.map} +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/nv-badge_2.entry.js +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +6 -6
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +3 -3
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldpassword.entry.js +3 -3
- package/dist/esm/nv-fieldradio.entry.js +3 -3
- package/dist/esm/nv-fieldselect.entry.js +5 -5
- package/dist/esm/nv-fieldslider.entry.js +3 -3
- package/dist/esm/nv-fieldtext.entry.js +3 -3
- package/dist/esm/nv-fieldtextarea.entry.js +3 -3
- package/dist/esm/nv-fieldtime.entry.js +9 -9
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/{p-0410facd.entry.js → p-003b6377.entry.js} +2 -2
- package/dist/native/{p-cbca9326.entry.js → p-0493c51a.entry.js} +2 -2
- package/dist/native/{p-2bc7d66a.entry.js → p-19f484a0.entry.js} +2 -2
- package/dist/native/{p-7ba03c5d.entry.js → p-1e0df2d3.entry.js} +2 -2
- package/dist/native/{p-ec87200a.entry.js → p-2d98d4f0.entry.js} +2 -2
- package/dist/native/{p-a30206c1.entry.js → p-54198779.entry.js} +2 -2
- package/dist/native/{p-14895e84.entry.js → p-58f4dc0e.entry.js} +2 -2
- package/dist/native/{p-f377b285.entry.js → p-5b06f4b5.entry.js} +2 -2
- package/dist/native/{p-01164e86.entry.js → p-6ea1c78b.entry.js} +2 -2
- package/dist/native/{p-2006f5d4.entry.js → p-82568ec7.entry.js} +2 -2
- package/dist/native/{p-24659a85.entry.js → p-a5c72bd3.entry.js} +2 -2
- package/dist/native/{p-9850c1d7.entry.js → p-a983e6a0.entry.js} +2 -2
- package/dist/native/{p-abbe5d69.entry.js → p-af1e6035.entry.js} +2 -2
- package/dist/native/{p-ff0f3794.entry.js → p-b9c7b644.entry.js} +2 -2
- package/dist/native/p-be9aeed4.entry.js +2 -0
- package/dist/native/p-be9aeed4.entry.js.map +1 -0
- package/dist/native/p-bee972c7.entry.js +2 -0
- package/dist/native/{p-0ec2d430.entry.js → p-d4bf2587.entry.js} +2 -2
- package/dist/native/p-dd256ea3.entry.js +2 -0
- package/dist/native/p-dd256ea3.entry.js.map +1 -0
- package/dist/native/{p-c7b8b7ba.entry.js → p-dd6b1d79.entry.js} +2 -2
- package/dist/native/{p-55df8bf9.entry.js → p-e293b3fe.entry.js} +2 -2
- package/dist/native/{p-1c1ecd38.entry.js → p-e9962dac.entry.js} +2 -2
- package/dist/native/{p-2b1e7675.entry.js → p-eaf51f2c.entry.js} +2 -2
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/vscode-data.json +9 -0
- package/hydrate/index.js +57 -57
- package/hydrate/index.mjs +57 -57
- package/package.json +7 -3
- package/dist/components/p-b207be02.js +0 -88
- package/dist/components/p-b207be02.js.map +0 -1
- package/dist/native/p-2c3fb8cc.entry.js +0 -2
- package/dist/native/p-2c3fb8cc.entry.js.map +0 -1
- package/dist/native/p-c92d55f9.entry.js +0 -2
- package/dist/native/p-c9d3de9c.entry.js +0 -2
- package/dist/native/p-c9d3de9c.entry.js.map +0 -1
- /package/dist/native/{p-0410facd.entry.js.map → p-003b6377.entry.js.map} +0 -0
- /package/dist/native/{p-cbca9326.entry.js.map → p-0493c51a.entry.js.map} +0 -0
- /package/dist/native/{p-2bc7d66a.entry.js.map → p-19f484a0.entry.js.map} +0 -0
- /package/dist/native/{p-7ba03c5d.entry.js.map → p-1e0df2d3.entry.js.map} +0 -0
- /package/dist/native/{p-ec87200a.entry.js.map → p-2d98d4f0.entry.js.map} +0 -0
- /package/dist/native/{p-a30206c1.entry.js.map → p-54198779.entry.js.map} +0 -0
- /package/dist/native/{p-14895e84.entry.js.map → p-58f4dc0e.entry.js.map} +0 -0
- /package/dist/native/{p-f377b285.entry.js.map → p-5b06f4b5.entry.js.map} +0 -0
- /package/dist/native/{p-01164e86.entry.js.map → p-6ea1c78b.entry.js.map} +0 -0
- /package/dist/native/{p-2006f5d4.entry.js.map → p-82568ec7.entry.js.map} +0 -0
- /package/dist/native/{p-24659a85.entry.js.map → p-a5c72bd3.entry.js.map} +0 -0
- /package/dist/native/{p-9850c1d7.entry.js.map → p-a983e6a0.entry.js.map} +0 -0
- /package/dist/native/{p-abbe5d69.entry.js.map → p-af1e6035.entry.js.map} +0 -0
- /package/dist/native/{p-ff0f3794.entry.js.map → p-b9c7b644.entry.js.map} +0 -0
- /package/dist/native/{p-c92d55f9.entry.js.map → p-bee972c7.entry.js.map} +0 -0
- /package/dist/native/{p-0ec2d430.entry.js.map → p-d4bf2587.entry.js.map} +0 -0
- /package/dist/native/{p-c7b8b7ba.entry.js.map → p-dd6b1d79.entry.js.map} +0 -0
- /package/dist/native/{p-55df8bf9.entry.js.map → p-e293b3fe.entry.js.map} +0 -0
- /package/dist/native/{p-1c1ecd38.entry.js.map → p-e9962dac.entry.js.map} +0 -0
- /package/dist/native/{p-2b1e7675.entry.js.map → p-eaf51f2c.entry.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["nvFielddaterangeCss","NvFielddaterangeStyle0","NvFielddaterange","constructor","hostRef","this","popoverId","uuidv4","startInputId","endInputId","disabled","readonly","required","error","success","autofocus","value","startValue","endValue","open","firstDayOfWeek","numberOfCalendars","min","max","locale","dateFormat","shortcutsPlacement","showActions","fluid","parseUnifiedValue","values","split","map","v","trim","filter","Boolean","length","console","warn","handleClickOutside","event","el","contains","target","handleStartInput","preventDefault","input","valueChanged","emit","dateRangeChange","start","end","calendarElement","removeAttribute","updateCalendarValue","setTimeout","setAttribute","handleEndInput","handleFocus","blur","toggleCalendar","convertToInputmaskFormat","format","formatMap","YYYYMMDD","connectedCallback","document","addEventListener","componentWillLoad","componentDidLoad","inputs","querySelectorAll","forEach","inputMask","Inputmask","alias","inputFormat","placeholder","clearIncomplete","showMaskOnHover","showMaskOnFocus","clearMaskOnLostFocus","insertMode","rightAlign","oncomplete","e","CustomEvent","bubbles","dispatchEvent","mask","name","startName","requestAnimationFrame","endName","componentDidRender","disconnectedCallback","removeEventListener","handleRangeDateChange","detail","handleCalendarValueChanged","newValue","handleClosePopover","handleApplyDateRange","handleDateReset","isResetSingle","type","isResetRange","handleKeyDown","key","popoverElement","handleValueChange","onOpenChanged","contentRef","style","transition","maxHeight","scrollHeight","render","h","Host","label","querySelector","htmlFor","ref","id","triggerMode","placement","slot","class","startPlaceholder","readOnly","onInput","onFocus","endPlaceholder","size","emphasis","toString","onClick","tabIndex","shortcuts","showWeekNumbers","disabledDates","selectionType","description","errorDescription","hidden"],"sources":["src/components/nv-fielddaterange/styles/nv-fielddaterange.scss?tag=nv-fielddaterange","src/components/nv-fielddaterange/nv-fielddaterange.tsx"],"sourcesContent":["@import '../../../styles/form-field';\n@import './mixins';\n\nnv-fielddaterange {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n width: 100%;\n display: block;\n\n [data-scope='popover'] {\n padding: 0;\n background-color: var(--components-list-dropdown-background);\n border: 1px solid var(--components-list-dropdown-border);\n width: auto;\n }\n\n [slot='content'] {\n display: block;\n width: 100%;\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n display: flex;\n align-items: center;\n gap: 8px;\n\n .input-container {\n @include form-field-input-container();\n\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n box-shadow: none;\n border-color: var(--nv-field-border-default);\n }\n\n input {\n @include form-field-input();\n width: 100%;\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n outline: var(--focus-outline-stroke) solid var(--nv-field-border-focus);\n outline-offset: 0px;\n & ~ .range-separator {\n background-color: transparent;\n }\n }\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n\n .range-inputs {\n display: flex;\n align-items: center;\n gap: 0;\n width: 100%;\n\n input {\n flex: 1;\n border: none;\n outline: none;\n padding: 0;\n font-size: var(--form-field-font-size);\n color: var(--components-form-field-content-text);\n background: transparent;\n min-width: 0; // to avoid overflow\n\n &::placeholder {\n color: var(--components-form-field-content-placeholder);\n }\n\n &:disabled {\n cursor: not-allowed;\n color: var(--components-form-field-content-text);\n background-color: var(--components-form-field-background-disabled);\n }\n }\n\n .range-separator {\n @include range-separator();\n }\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddaterange',\n styleUrl: 'styles/nv-fielddaterange.scss',\n shadow: false,\n})\nexport class NvFielddaterange {\n @Element() el!: HTMLNvFielddaterangeElement;\n private popoverElement!: HTMLNvPopoverElement;\n private calendarElement!: HTMLNvCalendarElement;\n private popoverId: string = uuidv4();\n private contentRef?: HTMLDivElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the start input field.\n */\n @Prop({ reflect: true })\n readonly startPlaceholder: string;\n\n /**\n * Placeholder for the end input field.\n */\n @Prop({ reflect: true })\n readonly endPlaceholder: string;\n\n /**\n * Name attribute for the start input.\n */\n @Prop({ reflect: true })\n readonly startName: string;\n\n /**\n * Name attribute for the end input.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Disables both input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets both input fields as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks both input fields as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the start input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the date range (in string format).\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the start date in string format.\n */\n @State()\n startValue: string = '';\n\n /**\n * The current value of the end date in string format.\n */\n @State()\n endValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 2\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 2;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Parses the unified value prop and synchronizes with internal state\n * @param {string} value - Value to parse\n */\n private parseUnifiedValue = (value: string): void => {\n if (!value) {\n // Reset all selections\n this.startValue = '';\n this.endValue = '';\n return;\n }\n\n const values = value\n .split(',')\n .map(v => v.trim())\n .filter(Boolean);\n\n if (values.length >= 2) {\n this.startValue = values[0];\n this.endValue = values[1];\n } else {\n // Handle malformed value gracefully\n console.warn(`Invalid date range format: ${value}`);\n this.startValue = '';\n this.endValue = '';\n }\n };\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format to convert\n * @returns {string} The converted format for Inputmask\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format YYYY-MM-DD\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The mouse event\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (this.open && this.el && !this.el.contains(event.target as Node)) {\n this.open = false;\n }\n };\n\n /**\n * Handles the input event on the start input element.\n * @param {Event} event - The input event\n */\n private handleStartInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n this.startValue = input.value;\n\n // Update unified value prop\n this.value = `${input.value},${this.endValue}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: input.value, end: this.endValue });\n\n // Temporarily enable navigation for keyboard input\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n this.updateCalendarValue();\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles the input event on the end input element.\n * @param {Event} event - The input event\n */\n private handleEndInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n this.endValue = input.value;\n\n // Update unified value prop\n this.value = `${this.startValue},${input.value}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: this.startValue, end: input.value });\n\n // Temporarily enable navigation for keyboard input\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n this.updateCalendarValue();\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Update the calendar's rangeValue property without forcing month change\n */\n private updateCalendarValue() {\n if (this.calendarElement && this.startValue && this.endValue) {\n // Store the current calendar state\n }\n }\n\n /**\n * Handles focus events on the input elements.\n * @param {FocusEvent} event - The focus event\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n // Enable navigation on focus\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n }\n\n this.open = true;\n\n // Restore navigation prevention after opening\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 300);\n };\n\n /**\n * Toggles the opening/closing of the popover.\n */\n private toggleCalendar = () => {\n if (this.readonly || this.disabled) {\n return;\n }\n this.open = !this.open;\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n componentWillLoad() {\n if (this.value) {\n // Use the unified parsing method\n this.parseUnifiedValue(this.value);\n }\n }\n\n componentDidLoad() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: false,\n clearMaskOnLostFocus: false,\n insertMode: true,\n rightAlign: false,\n oncomplete: function (e) {\n const input = e.target as HTMLInputElement;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n },\n });\n inputMask.mask(input);\n\n // Set the value after applying the mask\n if (input.name === this.startName && this.startValue) {\n requestAnimationFrame(() => {\n input.value = this.startValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n } else if (input.name === this.endName && this.endValue) {\n requestAnimationFrame(() => {\n input.value = this.endValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n }\n });\n }\n\n componentDidRender() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n const value =\n input.name === this.startName\n ? this.startValue\n : this.endName\n ? this.endValue\n : '';\n if (value) {\n // Make sure the value is defined both as a property and attribute\n requestAnimationFrame(() => {\n input.value = value;\n input.setAttribute('value', value);\n });\n }\n });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the date range changes.\n */\n @Event()\n dateRangeChange: EventEmitter<\n HTMLNvCalendarElementEventMap['rangeDateChange']\n >;\n\n /**\n * Emitted when the unified value changes\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Handles the range date selection event from nv-calendar.\n * @param {CustomEvent<DateRange>} event - The custom event\n */\n @Listen('rangeDateChange')\n handleRangeDateChange(\n event: CustomEvent<HTMLNvCalendarElementEventMap['rangeDateChange']>,\n ) {\n const { start, end } = event.detail || {};\n\n // Check that both dates are defined\n if (start && end) {\n this.startValue = start;\n this.endValue = end;\n\n // Update unified value prop (like nv-calendar)\n this.value = `${start},${end}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n\n if (!this.showActions) {\n this.open = false;\n }\n }\n }\n\n /**\n * Handles the unified value change event from nv-calendar\n * @param {CustomEvent<string>} event - The custom event\n */\n @Listen('valueChanged')\n handleCalendarValueChanged(event: CustomEvent<string>) {\n const newValue = event.detail || '';\n\n if (newValue !== this.value) {\n this.value = newValue;\n this.valueChanged.emit(newValue);\n\n // Parse and update internal state\n this.parseUnifiedValue(newValue);\n\n // Legacy support - emit dateRangeChange\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('applyDateRange')\n handleApplyDateRange() {\n this.open = false;\n }\n\n /**\n * Handles the reset event from the calendar's cancel button\n * @param {CustomEvent} event - The event emitted by the calendar\n */\n @Listen('singleDateChange')\n @Listen('rangeDateChange')\n handleDateReset(event: CustomEvent) {\n const isResetSingle =\n event.type === 'singleDateChange' && event.detail === '';\n const isResetRange =\n event.type === 'rangeDateChange' &&\n event.detail &&\n event.detail.start === '' &&\n event.detail.end === '';\n\n if (isResetSingle || isResetRange) {\n this.startValue = '';\n this.endValue = '';\n\n // Update unified value prop\n this.value = '';\n this.valueChanged.emit('');\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n });\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: '', end: '' });\n }\n }\n\n /**\n * Handles keyboard events.\n * @param {KeyboardEvent} event - The keyboard event\n */\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n event.preventDefault();\n return;\n }\n return;\n }\n\n if (!this.popoverElement) {\n console.warn('nv-fielddaterange -> Popover element is not defined');\n return;\n }\n }\n\n @Watch('value')\n handleValueChange(newValue: string) {\n // Use the unified parsing method instead of JSON.parse\n this.parseUnifiedValue(newValue);\n }\n\n @Watch('open')\n onOpenChanged(newValue: boolean) {\n if (this.contentRef) {\n if (newValue) {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = '0px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n });\n } else {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = '0px';\n });\n }\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\">\n <slot name=\"leading-input\"></slot>\n\n <div class=\"range-inputs\">\n <input\n id={this.startInputId}\n type=\"text\"\n placeholder={this.startPlaceholder}\n name={this.startName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n value={this.startValue}\n onInput={this.handleStartInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n\n <div class=\"range-separator\"></div>\n\n <input\n id={this.endInputId}\n type=\"text\"\n placeholder={this.endPlaceholder}\n name={this.endName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n value={this.endValue}\n onInput={this.handleEndInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n </div>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\"\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n aria-pressed={this.open.toString()}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n ref={el => (this.calendarElement = el as HTMLNvCalendarElement)}\n dateFormat={this.dateFormat}\n value={this.value}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n selectionType=\"range\"\n data-prevent-navigation=\"true\"\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n //#endregion RENDER\n}\n"],"mappings":"gKAAA,MAAMA,EAAsB,o0SAC5B,MAAAC,EAAeD,E,MC4BFE,EAAgB,MAL7B,WAAAC,CAAAC,G,sGASUC,KAAAC,UAAoBC,IAWnBF,KAAAG,aAAuBD,IAOvBF,KAAAI,WAAqBF,IA0CrBF,KAAAK,SAAoB,MAMpBL,KAAAM,SAAoB,MAMpBN,KAAAO,SAAoB,MAMpBP,KAAAQ,MAAiB,MAYjBR,KAAAS,QAAmB,MAOnBT,KAAAU,UAAqB,MAO9BV,KAAAW,MAAgB,GAMhBX,KAAAY,WAAqB,GAMrBZ,KAAAa,SAAmB,GAMnBb,KAAAc,KAAgB,MAOPd,KAAAe,eAAyB,EAOzBf,KAAAgB,kBAA4B,EAM5BhB,KAAAiB,IAAe,GAMfjB,KAAAkB,IAAe,GAMflB,KAAAmB,OAAiB,Q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I,KAAKuI,UAChBC,gBAAiBxI,KAAKwI,gBACtBC,cAAezI,KAAKyI,cACpBC,cAAc,QAAO,0BACG,YAK3B1I,KAAK2I,aAAe3I,KAAK2I,YAAY3G,OAAS,GAC/ChC,KAAKqC,GAAGgF,cAAc,0BACtBH,EAAA,OAAAV,IAAA,2CAAKoB,MAAM,eACTV,EAAA,QAAAV,IAAA,2CAAMlB,KAAK,eAAetF,KAAK2I,eAIjC3I,KAAK4I,kBACL5I,KAAKqC,GAAGgF,cAAc,gCACtBH,EAAA,OAAAV,IAAA,2CAAKqC,QAAS7I,KAAKQ,MAAOoH,MAAM,qBAC7B5H,KAAKqC,GAAGgF,cAAc,8BACrBH,EAAA,QAAM5B,KAAK,sBAEXtF,KAAqB,kBAK3BkH,EAAA,QAAAV,IAAA,6C","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as a,h as r,H as c}from"./p-d0a33e64.js";const s="nv-row{display:flex;flex-wrap:wrap;margin-right:calc(var(--spacing-4) * -1);margin-left:calc(var(--spacing-4) * -1);row-gap:var(--spacing-4)}";const e=s;const n=class{constructor(r){a(this,r)}render(){return r(c,{key:"7a41dce9acbfdc42b66a032f1d20437ebf3d79a1"},r("slot",{key:"570d2bc95ad3ab2502a1e87699cdcb5818743b7b"}))}};n.style=e;export{n as nv_row};
|
|
2
|
+
//# sourceMappingURL=p-bee972c7.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t,f as n,r as e,c as o,h as s,H as i,g as r}from"./p-d0a33e64.js";import{u as c}from"./p-1daca48a.js";import{u as a}from"./p-c1765831.js";import{a as l,r as f}from"./p-d429a343.js";const u=["top","right","bottom","left"];const d=["start","end"];const h=u.reduce(((t,n)=>t.concat(n,n+"-"+d[0],n+"-"+d[1])),[]);const p=Math.min;const m=Math.max;const y=Math.round;const v=t=>({x:t,y:t});const g={left:"right",right:"left",bottom:"top",top:"bottom"};const w={start:"end",end:"start"};function b(t,n,e){return m(t,p(n,e))}function x(t,n){return typeof t==="function"?t(n):t}function k(t){return t.split("-")[0]}function A(t){return t.split("-")[1]}function T(t){return t==="x"?"y":"x"}function O(t){return t==="y"?"height":"width"}function P(t){return["top","bottom"].includes(k(t))?"y":"x"}function C(t){return T(P(t))}function D(t,n,e){if(e===void 0){e=false}const o=A(t);const s=C(t);const i=O(s);let r=s==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";if(n.reference[i]>n.floating[i]){r=M(r)}return[r,M(r)]}function S(t){const n=M(t);return[R(t),n,R(n)]}function R(t){return t.replace(/start|end/g,(t=>w[t]))}function j(t,n,e){const o=["left","right"];const s=["right","left"];const i=["top","bottom"];const r=["bottom","top"];switch(t){case"top":case"bottom":if(e)return n?s:o;return n?o:s;case"left":case"right":return n?i:r;default:return[]}}function L(t,n,e,o){const s=A(t);let i=j(k(t),e==="start",o);if(s){i=i.map((t=>t+"-"+s));if(n){i=i.concat(i.map(R))}}return i}function M(t){return t.replace(/left|right|bottom|top/g,(t=>g[t]))}function B(t){return{top:0,right:0,bottom:0,left:0,...t}}function F(t){return typeof t!=="number"?B(t):{top:t,right:t,bottom:t,left:t}}function H(t){const{x:n,y:e,width:o,height:s}=t;return{width:o,height:s,top:e,left:n,right:n+o,bottom:e+s,x:n,y:e}}function E(t,n,e){let{reference:o,floating:s}=t;const i=P(n);const r=C(n);const c=O(r);const a=k(n);const l=i==="y";const f=o.x+o.width/2-s.width/2;const u=o.y+o.height/2-s.height/2;const d=o[c]/2-s[c]/2;let h;switch(a){case"top":h={x:f,y:o.y-s.height};break;case"bottom":h={x:f,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-s.width,y:u};break;default:h={x:o.x,y:o.y}}switch(A(n)){case"start":h[r]-=d*(e&&l?-1:1);break;case"end":h[r]+=d*(e&&l?-1:1);break}return h}const $=async(t,n,e)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:r}=e;const c=i.filter(Boolean);const a=await(r.isRTL==null?void 0:r.isRTL(n));let l=await r.getElementRects({reference:t,floating:n,strategy:s});let{x:f,y:u}=E(l,o,a);let d=o;let h={};let p=0;for(let e=0;e<c.length;e++){const{name:i,fn:m}=c[e];const{x:y,y:v,data:g,reset:w}=await m({x:f,y:u,initialPlacement:o,placement:d,strategy:s,middlewareData:h,rects:l,platform:r,elements:{reference:t,floating:n}});f=y!=null?y:f;u=v!=null?v:u;h={...h,[i]:{...h[i],...g}};if(w&&p<=50){p++;if(typeof w==="object"){if(w.placement){d=w.placement}if(w.rects){l=w.rects===true?await r.getElementRects({reference:t,floating:n,strategy:s}):w.rects}({x:f,y:u}=E(l,d,a))}e=-1}}return{x:f,y:u,placement:d,strategy:s,middlewareData:h}};async function W(t,n){var e;if(n===void 0){n={}}const{x:o,y:s,platform:i,rects:r,elements:c,strategy:a}=t;const{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=false,padding:h=0}=x(n,t);const p=F(h);const m=u==="floating"?"reference":"floating";const y=c[d?m:u];const v=H(await i.getClippingRect({element:((e=await(i.isElement==null?void 0:i.isElement(y)))!=null?e:true)?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:f,strategy:a}));const g=u==="floating"?{x:o,y:s,width:r.floating.width,height:r.floating.height}:r.reference;const w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating));const b=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1};const k=H(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:g,offsetParent:w,strategy:a}):g);return{top:(v.top-k.top+p.top)/b.y,bottom:(k.bottom-v.bottom+p.bottom)/b.y,left:(v.left-k.left+p.left)/b.x,right:(k.right-v.right+p.right)/b.x}}const z=t=>({name:"arrow",options:t,async fn(n){const{x:e,y:o,placement:s,rects:i,platform:r,elements:c,middlewareData:a}=n;const{element:l,padding:f=0}=x(t,n)||{};if(l==null){return{}}const u=F(f);const d={x:e,y:o};const h=C(s);const m=O(h);const y=await r.getDimensions(l);const v=h==="y";const g=v?"top":"left";const w=v?"bottom":"right";const k=v?"clientHeight":"clientWidth";const T=i.reference[m]+i.reference[h]-d[h]-i.floating[m];const P=d[h]-i.reference[h];const D=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l));let S=D?D[k]:0;if(!S||!await(r.isElement==null?void 0:r.isElement(D))){S=c.floating[k]||i.floating[m]}const R=T/2-P/2;const j=S/2-y[m]/2-1;const L=p(u[g],j);const M=p(u[w],j);const B=L;const H=S-y[m]-M;const E=S/2-y[m]/2+R;const $=b(B,E,H);const W=!a.arrow&&A(s)!=null&&E!==$&&i.reference[m]/2-(E<B?L:M)-y[m]/2<0;const z=W?E<B?E-B:E-H:0;return{[h]:d[h]+z,data:{[h]:$,centerOffset:E-$-z,...W&&{alignmentOffset:z}},reset:W}}});function N(t,n,e){const o=t?[...e.filter((n=>A(n)===t)),...e.filter((n=>A(n)!==t))]:e.filter((t=>k(t)===t));return o.filter((e=>{if(t){return A(e)===t||(n?R(e)!==e:false)}return true}))}const I=function(t){if(t===void 0){t={}}return{name:"autoPlacement",options:t,async fn(n){var e,o,s;const{rects:i,middlewareData:r,placement:c,platform:a,elements:l}=n;const{crossAxis:f=false,alignment:u,allowedPlacements:d=h,autoAlignment:p=true,...m}=x(t,n);const y=u!==undefined||d===h?N(u||null,p,d):d;const v=await W(n,m);const g=((e=r.autoPlacement)==null?void 0:e.index)||0;const w=y[g];if(w==null){return{}}const b=D(w,i,await(a.isRTL==null?void 0:a.isRTL(l.floating)));if(c!==w){return{reset:{placement:y[0]}}}const T=[v[k(w)],v[b[0]],v[b[1]]];const O=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:w,overflows:T}];const P=y[g+1];if(P){return{data:{index:g+1,overflows:O},reset:{placement:P}}}const C=O.map((t=>{const n=A(t.placement);return[t.placement,n&&f?t.overflows.slice(0,2).reduce(((t,n)=>t+n),0):t.overflows[0],t.overflows]})).sort(((t,n)=>t[1]-n[1]));const S=C.filter((t=>t[2].slice(0,A(t[0])?2:3).every((t=>t<=0))));const R=((s=S[0])==null?void 0:s[0])||C[0][0];if(R!==c){return{data:{index:g+1,overflows:O},reset:{placement:R}}}return{}}}};const U=function(t){if(t===void 0){t={}}return{name:"flip",options:t,async fn(n){var e,o;const{placement:s,middlewareData:i,rects:r,initialPlacement:c,platform:a,elements:l}=n;const{mainAxis:f=true,crossAxis:u=true,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=true,...y}=x(t,n);if((e=i.arrow)!=null&&e.alignmentOffset){return{}}const v=k(s);const g=k(c)===c;const w=await(a.isRTL==null?void 0:a.isRTL(l.floating));const b=d||(g||!m?[M(c)]:S(c));if(!d&&p!=="none"){b.push(...L(c,m,p,w))}const A=[c,...b];const T=await W(n,y);const O=[];let P=((o=i.flip)==null?void 0:o.overflows)||[];if(f){O.push(T[v])}if(u){const t=D(s,r,w);O.push(T[t[0]],T[t[1]])}P=[...P,{placement:s,overflows:O}];if(!O.every((t=>t<=0))){var C,R;const t=(((C=i.flip)==null?void 0:C.index)||0)+1;const n=A[t];if(n){return{data:{index:t,overflows:P},reset:{placement:n}}}let e=(R=P.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])==null?void 0:R.placement;if(!e){switch(h){case"bestFit":{var j;const t=(j=P.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])==null?void 0:j[0];if(t){e=t}break}case"initialPlacement":e=c;break}}if(s!==e){return{reset:{placement:e}}}}return{}}}};function _(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function G(t){return u.some((n=>t[n]>=0))}const K=function(t){if(t===void 0){t={}}return{name:"hide",options:t,async fn(n){const{rects:e}=n;const{strategy:o="referenceHidden",...s}=x(t,n);switch(o){case"referenceHidden":{const t=await W(n,{...s,elementContext:"reference"});const o=_(t,e.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:G(o)}}}case"escaped":{const t=await W(n,{...s,altBoundary:true});const o=_(t,e.floating);return{data:{escapedOffsets:o,escaped:G(o)}}}default:{return{}}}}}};function V(t){const n=p(...t.map((t=>t.left)));const e=p(...t.map((t=>t.top)));const o=m(...t.map((t=>t.right)));const s=m(...t.map((t=>t.bottom)));return{x:n,y:e,width:o-n,height:s-e}}function X(t){const n=t.slice().sort(((t,n)=>t.y-n.y));const e=[];let o=null;for(let t=0;t<n.length;t++){const s=n[t];if(!o||s.y-o.y>o.height/2){e.push([s])}else{e[e.length-1].push(s)}o=s}return e.map((t=>H(V(t))))}const Y=function(t){if(t===void 0){t={}}return{name:"inline",options:t,async fn(n){const{placement:e,elements:o,rects:s,platform:i,strategy:r}=n;const{padding:c=2,x:a,y:l}=x(t,n);const f=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(o.reference))||[]);const u=X(f);const d=H(V(f));const h=F(c);function y(){if(u.length===2&&u[0].left>u[1].right&&a!=null&&l!=null){return u.find((t=>a>t.left-h.left&&a<t.right+h.right&&l>t.top-h.top&&l<t.bottom+h.bottom))||d}if(u.length>=2){if(P(e)==="y"){const t=u[0];const n=u[u.length-1];const o=k(e)==="top";const s=t.top;const i=n.bottom;const r=o?t.left:n.left;const c=o?t.right:n.right;const a=c-r;const l=i-s;return{top:s,bottom:i,left:r,right:c,width:a,height:l,x:r,y:s}}const t=k(e)==="left";const n=m(...u.map((t=>t.right)));const o=p(...u.map((t=>t.left)));const s=u.filter((e=>t?e.left===o:e.right===n));const i=s[0].top;const r=s[s.length-1].bottom;const c=o;const a=n;const l=a-c;const f=r-i;return{top:i,bottom:r,left:c,right:a,width:l,height:f,x:c,y:i}}return d}const v=await i.getElementRects({reference:{getBoundingClientRect:y},floating:o.floating,strategy:r});if(s.reference.x!==v.reference.x||s.reference.y!==v.reference.y||s.reference.width!==v.reference.width||s.reference.height!==v.reference.height){return{reset:{rects:v}}}return{}}}};async function q(t,n){const{placement:e,platform:o,elements:s}=t;const i=await(o.isRTL==null?void 0:o.isRTL(s.floating));const r=k(e);const c=A(e);const a=P(e)==="y";const l=["left","top"].includes(r)?-1:1;const f=i&&a?-1:1;const u=x(n,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof u==="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};if(c&&typeof p==="number"){h=c==="end"?p*-1:p}return a?{x:h*f,y:d*l}:{x:d*l,y:h*f}}const J=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(n){var e,o;const{x:s,y:i,placement:r,middlewareData:c}=n;const a=await q(n,t);if(r===((e=c.offset)==null?void 0:e.placement)&&(o=c.arrow)!=null&&o.alignmentOffset){return{}}return{x:s+a.x,y:i+a.y,data:{...a,placement:r}}}}};const Q=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:s}=n;const{mainAxis:i=true,crossAxis:r=false,limiter:c={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...a}=x(t,n);const l={x:e,y:o};const f=await W(n,a);const u=P(k(s));const d=T(u);let h=l[d];let p=l[u];if(i){const t=d==="y"?"top":"left";const n=d==="y"?"bottom":"right";const e=h+f[t];const o=h-f[n];h=b(e,h,o)}if(r){const t=u==="y"?"top":"left";const n=u==="y"?"bottom":"right";const e=p+f[t];const o=p-f[n];p=b(e,p,o)}const m=c.fn({...n,[d]:h,[u]:p});return{...m,data:{x:m.x-e,y:m.y-o}}}}};const Z=function(t){if(t===void 0){t={}}return{options:t,fn(n){const{x:e,y:o,placement:s,rects:i,middlewareData:r}=n;const{offset:c=0,mainAxis:a=true,crossAxis:l=true}=x(t,n);const f={x:e,y:o};const u=P(s);const d=T(u);let h=f[d];let p=f[u];const m=x(c,n);const y=typeof m==="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(a){const t=d==="y"?"height":"width";const n=i.reference[d]-i.floating[t]+y.mainAxis;const e=i.reference[d]+i.reference[t]-y.mainAxis;if(h<n){h=n}else if(h>e){h=e}}if(l){var v,g;const t=d==="y"?"width":"height";const n=["top","left"].includes(k(s));const e=i.reference[u]-i.floating[t]+(n?((v=r.offset)==null?void 0:v[u])||0:0)+(n?0:y.crossAxis);const o=i.reference[u]+i.reference[t]+(n?0:((g=r.offset)==null?void 0:g[u])||0)-(n?y.crossAxis:0);if(p<e){p=e}else if(p>o){p=o}}return{[d]:h,[u]:p}}}};const tt=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(n){const{placement:e,rects:o,platform:s,elements:i}=n;const{apply:r=(()=>{}),...c}=x(t,n);const a=await W(n,c);const l=k(e);const f=A(e);const u=P(e)==="y";const{width:d,height:h}=o.floating;let y;let v;if(l==="top"||l==="bottom"){y=l;v=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"}else{v=l;y=f==="end"?"top":"bottom"}const g=h-a.top-a.bottom;const w=d-a.left-a.right;const b=p(h-a[y],g);const T=p(d-a[v],w);const O=!n.middlewareData.shift;let C=b;let D=T;if(u){D=f||O?p(T,w):w}else{C=f||O?p(b,g):g}if(O&&!f){const t=m(a.left,0);const n=m(a.right,0);const e=m(a.top,0);const o=m(a.bottom,0);if(u){D=d-2*(t!==0||n!==0?t+n:m(a.left,a.right))}else{C=h-2*(e!==0||o!==0?e+o:m(a.top,a.bottom))}}await r({...n,availableWidth:D,availableHeight:C});const S=await s.getDimensions(i.floating);if(d!==S.width||h!==S.height){return{reset:{rects:true}}}return{}}}};function nt(){return typeof window!=="undefined"}function et(t){if(it(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function ot(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function st(t){var n;return(n=(it(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function it(t){if(!nt()){return false}return t instanceof Node||t instanceof ot(t).Node}function rt(t){if(!nt()){return false}return t instanceof Element||t instanceof ot(t).Element}function ct(t){if(!nt()){return false}return t instanceof HTMLElement||t instanceof ot(t).HTMLElement}function at(t){if(!nt()||typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof ot(t).ShadowRoot}function lt(t){const{overflow:n,overflowX:e,overflowY:o,display:s}=yt(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(s)}function ft(t){return["table","td","th"].includes(et(t))}function ut(t){return[":popover-open",":modal"].some((n=>{try{return t.matches(n)}catch(t){return false}}))}function dt(t){const n=pt();const e=rt(t)?yt(t):t;return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":false)||!n&&(e.backdropFilter?e.backdropFilter!=="none":false)||!n&&(e.filter?e.filter!=="none":false)||["transform","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function ht(t){let n=gt(t);while(ct(n)&&!mt(n)){if(dt(n)){return n}else if(ut(n)){return null}n=gt(n)}return null}function pt(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function mt(t){return["html","body","#document"].includes(et(t))}function yt(t){return ot(t).getComputedStyle(t)}function vt(t){if(rt(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function gt(t){if(et(t)==="html"){return t}const n=t.assignedSlot||t.parentNode||at(t)&&t.host||st(t);return at(n)?n.host:n}function wt(t){const n=gt(t);if(mt(n)){return t.ownerDocument?t.ownerDocument.body:t.body}if(ct(n)&<(n)){return n}return wt(n)}function bt(t,n,e){var o;if(n===void 0){n=[]}if(e===void 0){e=true}const s=wt(t);const i=s===((o=t.ownerDocument)==null?void 0:o.body);const r=ot(s);if(i){const t=xt(r);return n.concat(r,r.visualViewport||[],lt(s)?s:[],t&&e?bt(t):[])}return n.concat(s,bt(s,[],e))}function xt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function kt(t){const n=yt(t);let e=parseFloat(n.width)||0;let o=parseFloat(n.height)||0;const s=ct(t);const i=s?t.offsetWidth:e;const r=s?t.offsetHeight:o;const c=y(e)!==i||y(o)!==r;if(c){e=i;o=r}return{width:e,height:o,$:c}}function At(t){return!rt(t)?t.contextElement:t}function Tt(t){const n=At(t);if(!ct(n)){return v(1)}const e=n.getBoundingClientRect();const{width:o,height:s,$:i}=kt(n);let r=(i?y(e.width):e.width)/o;let c=(i?y(e.height):e.height)/s;if(!r||!Number.isFinite(r)){r=1}if(!c||!Number.isFinite(c)){c=1}return{x:r,y:c}}const Ot=v(0);function Pt(t){const n=ot(t);if(!pt()||!n.visualViewport){return Ot}return{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Ct(t,n,e){if(n===void 0){n=false}if(!e||n&&e!==ot(t)){return false}return n}function Dt(t,n,e,o){if(n===void 0){n=false}if(e===void 0){e=false}const s=t.getBoundingClientRect();const i=At(t);let r=v(1);if(n){if(o){if(rt(o)){r=Tt(o)}}else{r=Tt(t)}}const c=Ct(i,e,o)?Pt(i):v(0);let a=(s.left+c.x)/r.x;let l=(s.top+c.y)/r.y;let f=s.width/r.x;let u=s.height/r.y;if(i){const t=ot(i);const n=o&&rt(o)?ot(o):o;let e=t;let s=xt(e);while(s&&o&&n!==e){const t=Tt(s);const n=s.getBoundingClientRect();const o=yt(s);const i=n.left+(s.clientLeft+parseFloat(o.paddingLeft))*t.x;const r=n.top+(s.clientTop+parseFloat(o.paddingTop))*t.y;a*=t.x;l*=t.y;f*=t.x;u*=t.y;a+=i;l+=r;e=ot(s);s=xt(e)}}return H({width:f,height:u,x:a,y:l})}function St(t){let{elements:n,rect:e,offsetParent:o,strategy:s}=t;const i=s==="fixed";const r=st(o);const c=n?ut(n.floating):false;if(o===r||c&&i){return e}let a={scrollLeft:0,scrollTop:0};let l=v(1);const f=v(0);const u=ct(o);if(u||!u&&!i){if(et(o)!=="body"||lt(r)){a=vt(o)}if(ct(o)){const t=Dt(o);l=Tt(o);f.x=t.x+o.clientLeft;f.y=t.y+o.clientTop}}return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-a.scrollLeft*l.x+f.x,y:e.y*l.y-a.scrollTop*l.y+f.y}}function Rt(t){return Array.from(t.getClientRects())}function jt(t,n){const e=vt(t).scrollLeft;if(!n){return Dt(st(t)).left+e}return n.left+e}function Lt(t){const n=st(t);const e=vt(t);const o=t.ownerDocument.body;const s=m(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth);const i=m(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let r=-e.scrollLeft+jt(t);const c=-e.scrollTop;if(yt(o).direction==="rtl"){r+=m(n.clientWidth,o.clientWidth)-s}return{width:s,height:i,x:r,y:c}}function Mt(t,n){const e=ot(t);const o=st(t);const s=e.visualViewport;let i=o.clientWidth;let r=o.clientHeight;let c=0;let a=0;if(s){i=s.width;r=s.height;const t=pt();if(!t||t&&n==="fixed"){c=s.offsetLeft;a=s.offsetTop}}return{width:i,height:r,x:c,y:a}}function Bt(t,n){const e=Dt(t,true,n==="fixed");const o=e.top+t.clientTop;const s=e.left+t.clientLeft;const i=ct(t)?Tt(t):v(1);const r=t.clientWidth*i.x;const c=t.clientHeight*i.y;const a=s*i.x;const l=o*i.y;return{width:r,height:c,x:a,y:l}}function Ft(t,n,e){let o;if(n==="viewport"){o=Mt(t,e)}else if(n==="document"){o=Lt(st(t))}else if(rt(n)){o=Bt(n,e)}else{const e=Pt(t);o={...n,x:n.x-e.x,y:n.y-e.y}}return H(o)}function Ht(t,n){const e=gt(t);if(e===n||!rt(e)||mt(e)){return false}return yt(e).position==="fixed"||Ht(e,n)}function Et(t,n){const e=n.get(t);if(e){return e}let o=bt(t,[],false).filter((t=>rt(t)&&et(t)!=="body"));let s=null;const i=yt(t).position==="fixed";let r=i?gt(t):t;while(rt(r)&&!mt(r)){const n=yt(r);const e=dt(r);if(!e&&n.position==="fixed"){s=null}const c=i?!e&&!s:!e&&n.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||lt(r)&&!e&&Ht(t,r);if(c){o=o.filter((t=>t!==r))}else{s=n}r=gt(r)}n.set(t,o);return o}function $t(t){let{element:n,boundary:e,rootBoundary:o,strategy:s}=t;const i=e==="clippingAncestors"?ut(n)?[]:Et(n,this._c):[].concat(e);const r=[...i,o];const c=r[0];const a=r.reduce(((t,e)=>{const o=Ft(n,e,s);t.top=m(o.top,t.top);t.right=p(o.right,t.right);t.bottom=p(o.bottom,t.bottom);t.left=m(o.left,t.left);return t}),Ft(n,c,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Wt(t){const{width:n,height:e}=kt(t);return{width:n,height:e}}function zt(t,n,e){const o=ct(n);const s=st(n);const i=e==="fixed";const r=Dt(t,true,i,n);let c={scrollLeft:0,scrollTop:0};const a=v(0);if(o||!o&&!i){if(et(n)!=="body"||lt(s)){c=vt(n)}if(o){const t=Dt(n,true,i,n);a.x=t.x+n.clientLeft;a.y=t.y+n.clientTop}else if(s){a.x=jt(s)}}let l=0;let f=0;if(s&&!o&&!i){const t=s.getBoundingClientRect();f=t.top+c.scrollTop;l=t.left+c.scrollLeft-jt(s,t)}const u=r.left+c.scrollLeft-a.x-l;const d=r.top+c.scrollTop-a.y-f;return{x:u,y:d,width:r.width,height:r.height}}function Nt(t){return yt(t).position==="static"}function It(t,n){if(!ct(t)||yt(t).position==="fixed"){return null}if(n){return n(t)}let e=t.offsetParent;if(st(t)===e){e=e.ownerDocument.body}return e}function Ut(t,n){const e=ot(t);if(ut(t)){return e}if(!ct(t)){let n=gt(t);while(n&&!mt(n)){if(rt(n)&&!Nt(n)){return n}n=gt(n)}return e}let o=It(t,n);while(o&&ft(o)&&Nt(o)){o=It(o,n)}if(o&&mt(o)&&Nt(o)&&!dt(o)){return e}return o||ht(t)||e}const _t=async function(t){const n=this.getOffsetParent||Ut;const e=this.getDimensions;const o=await e(t.floating);return{reference:zt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Gt(t){return yt(t).direction==="rtl"}const Kt={convertOffsetParentRelativeRectToViewportRelativeRect:St,getDocumentElement:st,getClippingRect:$t,getOffsetParent:Ut,getElementRects:_t,getClientRects:Rt,getDimensions:Wt,getScale:Tt,isElement:rt,isRTL:Gt};const Vt=J;I;const Xt=Q;const Yt=U;tt;K;const qt=z;Y;Z;const Jt=(t,n,e)=>{const o=new Map;const s={platform:Kt,...e};const i={...s.platform,_c:o};return $(t,n,{...s,platform:i})};const Qt=(t,n,e)=>{const o=t.get(n);if(!o){t.set(n,[e])}else if(!o.includes(e)){o.push(e)}};const Zt=(t,n)=>{let e;return(...o)=>{if(e){clearTimeout(e)}e=setTimeout((()=>{e=0;t(...o)}),n)}};const tn=t=>!("isConnected"in t)||t.isConnected;const nn=Zt((t=>{for(let n of t.keys()){t.set(n,t.get(n).filter(tn))}}),2e3);const en=()=>{if(typeof t!=="function"){return{}}const e=new Map;return{dispose:()=>e.clear(),get:n=>{const o=t();if(o){Qt(e,n,o)}},set:t=>{const o=e.get(t);if(o){e.set(t,o.filter(n))}nn(e)},reset:()=>{e.forEach((t=>t.forEach(n)));nn(e)}}};const on=t=>typeof t==="function"?t():t;const sn=(t,n=((t,n)=>t!==n))=>{const e=on(t);let o=new Map(Object.entries(e!==null&&e!==void 0?e:{}));const s={dispose:[],get:[],set:[],reset:[]};const i=()=>{var n;o=new Map(Object.entries((n=on(t))!==null&&n!==void 0?n:{}));s.reset.forEach((t=>t()))};const r=()=>{s.dispose.forEach((t=>t()));i()};const c=t=>{s.get.forEach((n=>n(t)));return o.get(t)};const a=(t,e)=>{const i=o.get(t);if(n(e,i,t)){o.set(t,e);s.set.forEach((n=>n(t,e,i)))}};const l=typeof Proxy==="undefined"?{}:new Proxy(e,{get(t,n){return c(n)},ownKeys(t){return Array.from(o.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,n){return o.has(n)},set(t,n,e){a(n,e);return true}});const f=(t,n)=>{s[t].push(n);return()=>{rn(s[t],n)}};const u=(n,e)=>{const o=f("set",((t,o)=>{if(t===n){e(o)}}));const s=f("reset",(()=>e(on(t)[n])));return()=>{o();s()}};const d=(...t)=>{const n=t.reduce(((t,n)=>{if(n.set){t.push(f("set",n.set))}if(n.get){t.push(f("get",n.get))}if(n.reset){t.push(f("reset",n.reset))}if(n.dispose){t.push(f("dispose",n.dispose))}return t}),[]);return()=>n.forEach((t=>t()))};const h=t=>{const n=o.get(t);s.set.forEach((e=>e(t,n,n)))};return{state:l,get:c,set:a,on:f,onChange:u,use:d,dispose:r,reset:i,forceUpdate:h}};const rn=(t,n)=>{const e=t.indexOf(n);if(e>=0){t[e]=t[t.length-1];t.length--}};const cn=(t,n)=>{const e=sn(t,n);e.use(en());return e};const an="nv-popover{display:inline-block;position:relative}nv-popover:has([fluid]:not([fluid=false])){display:block}nv-popover>[data-scope=popover]{width:max-content;background-color:var(--components-popover-background);border-color:var(--components-popover-border);font-weight:var(--font-weight-medium-emphasis);border-width:1px;border-style:solid;border-radius:var(--popover-radius);padding:var(--popover-padding-y) var(--popover-padding-x);position:absolute;top:0;left:0;z-index:1;box-shadow:var(--popover-shadow-1-x) var(--popover-shadow-1-y) var(--popover-shadow-1-blur) -2px var(--popover-shadow-1-opacity), var(--popover-shadow-2-x) var(--popover-shadow-2-y) var(--popover-shadow-2-blur) var(--shadow-spread-lg-2) var(--popover-shadow-2-opacity)}nv-popover>[data-scope=popover][hidden]:not([hidden=false]){display:none}nv-popover>[data-scope=popover]>[data-scope=arrow]{background-color:var(--components-popover-background);position:absolute;border-color:var(--components-popover-border);border-width:1px;border-style:solid;border-bottom-color:transparent;border-right-color:transparent;width:8px;height:8px;transform:rotate(45deg);border-radius:1px}nv-popover>[data-scope=popover]>[slot=content]{position:relative;z-index:1}nv-popover>slot-fb{display:none}";const ln=an;const{state:fn}=cn({groups:new Map});const un=class{constructor(t){e(this,t);this.openChanged=o(this,"openChanged",7);this.eventsAttached=false;this.open=false;this.triggerMode="click";this.placement="bottom";this.offset=6;this.hasArrow=false;this.disableFlip=false;this.shiftPadding=0;this.enterDelay=0;this.nested=false;this.handleClickOutside=t=>{var n;if(this.el.contains(t.target))return;if((n=this.triggerElement)===null||n===void 0?void 0:n.contains(t.target))return;this.open=false};this.clickEvents=[["click",()=>this.open=!this.open]];this.outsideClickEvents=[["click",this.handleClickOutside],["touchstart",this.handleClickOutside]];this.hoverEvents=[["focus",()=>{clearTimeout(this.hideTimeout);this.showTimeout=setTimeout((()=>this.open=true),this.enterDelay)}],["blur",()=>{clearTimeout(this.showTimeout);this.hideTimeout=setTimeout((()=>this.open=false),50)}],["mouseenter",()=>{clearTimeout(this.hideTimeout);this.showTimeout=setTimeout((()=>this.open=true),this.enterDelay)}],["mouseleave",()=>{clearTimeout(this.showTimeout);this.hideTimeout=setTimeout((()=>this.open=false),100)}]];this.closeEvents=[["keydown",t=>{if(t.key==="Escape"){this.open=false}}]];this.isAnimating=false}async show(){this.open=true}async hide(){this.open=false}async toggle(){this.open=!this.open}attachEventListeners(){if(this.triggerElement&&!this.eventsAttached){l(this.closeEvents,document,this);if(this.triggerMode==="click"){l(this.clickEvents,this.triggerElement,this);l(this.outsideClickEvents,document,this)}if(this.triggerMode==="hover"){l(this.hoverEvents,this.triggerElement,this)}this.eventsAttached=true}}positionPopover(){if(!this.triggerElement)return;Jt(this.triggerElement,this.popoverElement,{placement:this.placement,middleware:[Vt(this.offset),!this.disableFlip&&Yt({fallbackStrategy:"bestFit",crossAxis:true,fallbackPlacements:["bottom"]}),Xt({padding:this.shiftPadding}),this.hasArrow&&qt({element:this.arrowElement})]}).then((({x:t,y:n,placement:e,middlewareData:o})=>{Object.assign(this.popoverElement.style,{left:`${t}px`,top:`${n}px`});if(this.hasArrow){const t={top:"bottom",right:"left",bottom:"top",left:"right"}[e.split("-")[0]];const n={top:"rotate(225deg)",right:"rotate(315deg)",bottom:"rotate(45deg)",left:"rotate(135deg)"}[e.split("-")[0]];const{x:s,y:i}=o.arrow;Object.assign(this.arrowElement.style,{left:s!=null?`${s}px`:"",top:i!=null?`${i}px`:"",right:"",bottom:"",transform:n,[t]:"-4px"})}}))}handleOpenChanged(t){var n;if(this.triggerMode==="controlled")return;if(this.nested)return;if((n=t.target)===null||n===void 0?void 0:n.hasAttribute("nested"))return;if(t.target!==this.el&&t.detail===true)this.open=false}async handleOpenChange(t){while(this.isAnimating){await new Promise((t=>setTimeout(t,50)))}this.isAnimating=true;const n=fn.groups.get(this.groupName);const e=n&&n.openedBy!==this.el;const o=n&&n.openedBy===this.el;if(t)this.popoverElement.style.removeProperty("display");if(o&&!t)fn.groups.delete(this.groupName);if(this.groupName&&t)fn.groups.set(this.groupName,{openedBy:this.el});const{growIn:s}=a(this.popoverElement,{duration:e?0:100,amount:.85});const{fadeOut:i}=c(this.popoverElement,{duration:e?0:100});if(t===true){this.popoverElement.removeAttribute("hidden");this.positionPopover();await s()}if(t===false){await i();this.popoverElement.setAttribute("hidden","")}this.isAnimating=false;this.openChanged.emit(t)}componentWillLoad(){if(!this.triggerElement)this.triggerElement=Array.from(this.el.children).find((t=>t.getAttribute("slot")==="trigger"))}componentWillUpdate(){this.attachEventListeners()}componentDidLoad(){if(!this.open){const{setGrowOut:t}=a(this.popoverElement);t()}else{const{setFadeIn:t}=c(this.popoverElement);t();this.popoverElement.removeAttribute("hidden")}this.positionPopover();this.attachEventListeners()}disconnectedCallback(){f(this.closeEvents,document,this);if(this.triggerMode==="click"){f(this.clickEvents,this.triggerElement,this);f(this.outsideClickEvents,document,this)}if(this.triggerMode==="hover")f(this.hoverEvents,this.triggerElement,this);this.eventsAttached=false;if(this.hideTimeout)clearTimeout(this.hideTimeout);if(this.showTimeout)clearTimeout(this.showTimeout)}render(){return s(i,{key:"3ab4e0f245ab925d2336f09b0cfa1c5c81a7eb32"},s("slot",{key:"54d237432f4f69f517f0182e58a3e6d75c658382",name:"trigger"}),s("div",{key:"ea6d9cedbade36ca48f9e72ec139720caeae1e35","data-scope":"popover",hidden:true,ref:t=>this.popoverElement=t},this.hasArrow&&s("div",{key:"f7cc6db85501f067317f66cc500b21e6571feeb6","data-scope":"arrow",ref:t=>this.arrowElement=t}),s("slot",{key:"2330178c2adfd93eea13286ec3efee5c495b2680",name:"content"})))}get el(){return r(this)}static get watchers(){return{open:["handleOpenChange"]}}};un.style=ln;export{un as nv_popover};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{a as t,f as n,r as e,c as o,h as s,H as i,g as r}from"./p-d0a33e64.js";import{u as c}from"./p-1daca48a.js";import{u as a}from"./p-c1765831.js";import{a as l,r as f}from"./p-d429a343.js";const u=["top","right","bottom","left"];const d=["start","end"];const h=u.reduce(((t,n)=>t.concat(n,n+"-"+d[0],n+"-"+d[1])),[]);const p=Math.min;const m=Math.max;const y=Math.round;const v=t=>({x:t,y:t});const g={left:"right",right:"left",bottom:"top",top:"bottom"};const w={start:"end",end:"start"};function b(t,n,e){return m(t,p(n,e))}function x(t,n){return typeof t==="function"?t(n):t}function k(t){return t.split("-")[0]}function A(t){return t.split("-")[1]}function T(t){return t==="x"?"y":"x"}function O(t){return t==="y"?"height":"width"}function P(t){return["top","bottom"].includes(k(t))?"y":"x"}function C(t){return T(P(t))}function D(t,n,e){if(e===void 0){e=false}const o=A(t);const s=C(t);const i=O(s);let r=s==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";if(n.reference[i]>n.floating[i]){r=M(r)}return[r,M(r)]}function S(t){const n=M(t);return[R(t),n,R(n)]}function R(t){return t.replace(/start|end/g,(t=>w[t]))}function j(t,n,e){const o=["left","right"];const s=["right","left"];const i=["top","bottom"];const r=["bottom","top"];switch(t){case"top":case"bottom":if(e)return n?s:o;return n?o:s;case"left":case"right":return n?i:r;default:return[]}}function L(t,n,e,o){const s=A(t);let i=j(k(t),e==="start",o);if(s){i=i.map((t=>t+"-"+s));if(n){i=i.concat(i.map(R))}}return i}function M(t){return t.replace(/left|right|bottom|top/g,(t=>g[t]))}function B(t){return{top:0,right:0,bottom:0,left:0,...t}}function F(t){return typeof t!=="number"?B(t):{top:t,right:t,bottom:t,left:t}}function H(t){const{x:n,y:e,width:o,height:s}=t;return{width:o,height:s,top:e,left:n,right:n+o,bottom:e+s,x:n,y:e}}function E(t,n,e){let{reference:o,floating:s}=t;const i=P(n);const r=C(n);const c=O(r);const a=k(n);const l=i==="y";const f=o.x+o.width/2-s.width/2;const u=o.y+o.height/2-s.height/2;const d=o[c]/2-s[c]/2;let h;switch(a){case"top":h={x:f,y:o.y-s.height};break;case"bottom":h={x:f,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-s.width,y:u};break;default:h={x:o.x,y:o.y}}switch(A(n)){case"start":h[r]-=d*(e&&l?-1:1);break;case"end":h[r]+=d*(e&&l?-1:1);break}return h}const $=async(t,n,e)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:r}=e;const c=i.filter(Boolean);const a=await(r.isRTL==null?void 0:r.isRTL(n));let l=await r.getElementRects({reference:t,floating:n,strategy:s});let{x:f,y:u}=E(l,o,a);let d=o;let h={};let p=0;for(let e=0;e<c.length;e++){const{name:i,fn:m}=c[e];const{x:y,y:v,data:g,reset:w}=await m({x:f,y:u,initialPlacement:o,placement:d,strategy:s,middlewareData:h,rects:l,platform:r,elements:{reference:t,floating:n}});f=y!=null?y:f;u=v!=null?v:u;h={...h,[i]:{...h[i],...g}};if(w&&p<=50){p++;if(typeof w==="object"){if(w.placement){d=w.placement}if(w.rects){l=w.rects===true?await r.getElementRects({reference:t,floating:n,strategy:s}):w.rects}({x:f,y:u}=E(l,d,a))}e=-1}}return{x:f,y:u,placement:d,strategy:s,middlewareData:h}};async function W(t,n){var e;if(n===void 0){n={}}const{x:o,y:s,platform:i,rects:r,elements:c,strategy:a}=t;const{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=false,padding:h=0}=x(n,t);const p=F(h);const m=u==="floating"?"reference":"floating";const y=c[d?m:u];const v=H(await i.getClippingRect({element:((e=await(i.isElement==null?void 0:i.isElement(y)))!=null?e:true)?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:f,strategy:a}));const g=u==="floating"?{x:o,y:s,width:r.floating.width,height:r.floating.height}:r.reference;const w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating));const b=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1};const k=H(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:g,offsetParent:w,strategy:a}):g);return{top:(v.top-k.top+p.top)/b.y,bottom:(k.bottom-v.bottom+p.bottom)/b.y,left:(v.left-k.left+p.left)/b.x,right:(k.right-v.right+p.right)/b.x}}const z=t=>({name:"arrow",options:t,async fn(n){const{x:e,y:o,placement:s,rects:i,platform:r,elements:c,middlewareData:a}=n;const{element:l,padding:f=0}=x(t,n)||{};if(l==null){return{}}const u=F(f);const d={x:e,y:o};const h=C(s);const m=O(h);const y=await r.getDimensions(l);const v=h==="y";const g=v?"top":"left";const w=v?"bottom":"right";const k=v?"clientHeight":"clientWidth";const T=i.reference[m]+i.reference[h]-d[h]-i.floating[m];const P=d[h]-i.reference[h];const D=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l));let S=D?D[k]:0;if(!S||!await(r.isElement==null?void 0:r.isElement(D))){S=c.floating[k]||i.floating[m]}const R=T/2-P/2;const j=S/2-y[m]/2-1;const L=p(u[g],j);const M=p(u[w],j);const B=L;const H=S-y[m]-M;const E=S/2-y[m]/2+R;const $=b(B,E,H);const W=!a.arrow&&A(s)!=null&&E!==$&&i.reference[m]/2-(E<B?L:M)-y[m]/2<0;const z=W?E<B?E-B:E-H:0;return{[h]:d[h]+z,data:{[h]:$,centerOffset:E-$-z,...W&&{alignmentOffset:z}},reset:W}}});function N(t,n,e){const o=t?[...e.filter((n=>A(n)===t)),...e.filter((n=>A(n)!==t))]:e.filter((t=>k(t)===t));return o.filter((e=>{if(t){return A(e)===t||(n?R(e)!==e:false)}return true}))}const I=function(t){if(t===void 0){t={}}return{name:"autoPlacement",options:t,async fn(n){var e,o,s;const{rects:i,middlewareData:r,placement:c,platform:a,elements:l}=n;const{crossAxis:f=false,alignment:u,allowedPlacements:d=h,autoAlignment:p=true,...m}=x(t,n);const y=u!==undefined||d===h?N(u||null,p,d):d;const v=await W(n,m);const g=((e=r.autoPlacement)==null?void 0:e.index)||0;const w=y[g];if(w==null){return{}}const b=D(w,i,await(a.isRTL==null?void 0:a.isRTL(l.floating)));if(c!==w){return{reset:{placement:y[0]}}}const T=[v[k(w)],v[b[0]],v[b[1]]];const O=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:w,overflows:T}];const P=y[g+1];if(P){return{data:{index:g+1,overflows:O},reset:{placement:P}}}const C=O.map((t=>{const n=A(t.placement);return[t.placement,n&&f?t.overflows.slice(0,2).reduce(((t,n)=>t+n),0):t.overflows[0],t.overflows]})).sort(((t,n)=>t[1]-n[1]));const S=C.filter((t=>t[2].slice(0,A(t[0])?2:3).every((t=>t<=0))));const R=((s=S[0])==null?void 0:s[0])||C[0][0];if(R!==c){return{data:{index:g+1,overflows:O},reset:{placement:R}}}return{}}}};const U=function(t){if(t===void 0){t={}}return{name:"flip",options:t,async fn(n){var e,o;const{placement:s,middlewareData:i,rects:r,initialPlacement:c,platform:a,elements:l}=n;const{mainAxis:f=true,crossAxis:u=true,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=true,...y}=x(t,n);if((e=i.arrow)!=null&&e.alignmentOffset){return{}}const v=k(s);const g=k(c)===c;const w=await(a.isRTL==null?void 0:a.isRTL(l.floating));const b=d||(g||!m?[M(c)]:S(c));if(!d&&p!=="none"){b.push(...L(c,m,p,w))}const A=[c,...b];const T=await W(n,y);const O=[];let P=((o=i.flip)==null?void 0:o.overflows)||[];if(f){O.push(T[v])}if(u){const t=D(s,r,w);O.push(T[t[0]],T[t[1]])}P=[...P,{placement:s,overflows:O}];if(!O.every((t=>t<=0))){var C,R;const t=(((C=i.flip)==null?void 0:C.index)||0)+1;const n=A[t];if(n){return{data:{index:t,overflows:P},reset:{placement:n}}}let e=(R=P.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])==null?void 0:R.placement;if(!e){switch(h){case"bestFit":{var j;const t=(j=P.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])==null?void 0:j[0];if(t){e=t}break}case"initialPlacement":e=c;break}}if(s!==e){return{reset:{placement:e}}}}return{}}}};function _(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function G(t){return u.some((n=>t[n]>=0))}const K=function(t){if(t===void 0){t={}}return{name:"hide",options:t,async fn(n){const{rects:e}=n;const{strategy:o="referenceHidden",...s}=x(t,n);switch(o){case"referenceHidden":{const t=await W(n,{...s,elementContext:"reference"});const o=_(t,e.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:G(o)}}}case"escaped":{const t=await W(n,{...s,altBoundary:true});const o=_(t,e.floating);return{data:{escapedOffsets:o,escaped:G(o)}}}default:{return{}}}}}};function V(t){const n=p(...t.map((t=>t.left)));const e=p(...t.map((t=>t.top)));const o=m(...t.map((t=>t.right)));const s=m(...t.map((t=>t.bottom)));return{x:n,y:e,width:o-n,height:s-e}}function X(t){const n=t.slice().sort(((t,n)=>t.y-n.y));const e=[];let o=null;for(let t=0;t<n.length;t++){const s=n[t];if(!o||s.y-o.y>o.height/2){e.push([s])}else{e[e.length-1].push(s)}o=s}return e.map((t=>H(V(t))))}const Y=function(t){if(t===void 0){t={}}return{name:"inline",options:t,async fn(n){const{placement:e,elements:o,rects:s,platform:i,strategy:r}=n;const{padding:c=2,x:a,y:l}=x(t,n);const f=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(o.reference))||[]);const u=X(f);const d=H(V(f));const h=F(c);function y(){if(u.length===2&&u[0].left>u[1].right&&a!=null&&l!=null){return u.find((t=>a>t.left-h.left&&a<t.right+h.right&&l>t.top-h.top&&l<t.bottom+h.bottom))||d}if(u.length>=2){if(P(e)==="y"){const t=u[0];const n=u[u.length-1];const o=k(e)==="top";const s=t.top;const i=n.bottom;const r=o?t.left:n.left;const c=o?t.right:n.right;const a=c-r;const l=i-s;return{top:s,bottom:i,left:r,right:c,width:a,height:l,x:r,y:s}}const t=k(e)==="left";const n=m(...u.map((t=>t.right)));const o=p(...u.map((t=>t.left)));const s=u.filter((e=>t?e.left===o:e.right===n));const i=s[0].top;const r=s[s.length-1].bottom;const c=o;const a=n;const l=a-c;const f=r-i;return{top:i,bottom:r,left:c,right:a,width:l,height:f,x:c,y:i}}return d}const v=await i.getElementRects({reference:{getBoundingClientRect:y},floating:o.floating,strategy:r});if(s.reference.x!==v.reference.x||s.reference.y!==v.reference.y||s.reference.width!==v.reference.width||s.reference.height!==v.reference.height){return{reset:{rects:v}}}return{}}}};async function q(t,n){const{placement:e,platform:o,elements:s}=t;const i=await(o.isRTL==null?void 0:o.isRTL(s.floating));const r=k(e);const c=A(e);const a=P(e)==="y";const l=["left","top"].includes(r)?-1:1;const f=i&&a?-1:1;const u=x(n,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof u==="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};if(c&&typeof p==="number"){h=c==="end"?p*-1:p}return a?{x:h*f,y:d*l}:{x:d*l,y:h*f}}const J=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(n){var e,o;const{x:s,y:i,placement:r,middlewareData:c}=n;const a=await q(n,t);if(r===((e=c.offset)==null?void 0:e.placement)&&(o=c.arrow)!=null&&o.alignmentOffset){return{}}return{x:s+a.x,y:i+a.y,data:{...a,placement:r}}}}};const Q=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:s}=n;const{mainAxis:i=true,crossAxis:r=false,limiter:c={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...a}=x(t,n);const l={x:e,y:o};const f=await W(n,a);const u=P(k(s));const d=T(u);let h=l[d];let p=l[u];if(i){const t=d==="y"?"top":"left";const n=d==="y"?"bottom":"right";const e=h+f[t];const o=h-f[n];h=b(e,h,o)}if(r){const t=u==="y"?"top":"left";const n=u==="y"?"bottom":"right";const e=p+f[t];const o=p-f[n];p=b(e,p,o)}const m=c.fn({...n,[d]:h,[u]:p});return{...m,data:{x:m.x-e,y:m.y-o}}}}};const Z=function(t){if(t===void 0){t={}}return{options:t,fn(n){const{x:e,y:o,placement:s,rects:i,middlewareData:r}=n;const{offset:c=0,mainAxis:a=true,crossAxis:l=true}=x(t,n);const f={x:e,y:o};const u=P(s);const d=T(u);let h=f[d];let p=f[u];const m=x(c,n);const y=typeof m==="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(a){const t=d==="y"?"height":"width";const n=i.reference[d]-i.floating[t]+y.mainAxis;const e=i.reference[d]+i.reference[t]-y.mainAxis;if(h<n){h=n}else if(h>e){h=e}}if(l){var v,g;const t=d==="y"?"width":"height";const n=["top","left"].includes(k(s));const e=i.reference[u]-i.floating[t]+(n?((v=r.offset)==null?void 0:v[u])||0:0)+(n?0:y.crossAxis);const o=i.reference[u]+i.reference[t]+(n?0:((g=r.offset)==null?void 0:g[u])||0)-(n?y.crossAxis:0);if(p<e){p=e}else if(p>o){p=o}}return{[d]:h,[u]:p}}}};const tt=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(n){const{placement:e,rects:o,platform:s,elements:i}=n;const{apply:r=(()=>{}),...c}=x(t,n);const a=await W(n,c);const l=k(e);const f=A(e);const u=P(e)==="y";const{width:d,height:h}=o.floating;let y;let v;if(l==="top"||l==="bottom"){y=l;v=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"}else{v=l;y=f==="end"?"top":"bottom"}const g=h-a.top-a.bottom;const w=d-a.left-a.right;const b=p(h-a[y],g);const T=p(d-a[v],w);const O=!n.middlewareData.shift;let C=b;let D=T;if(u){D=f||O?p(T,w):w}else{C=f||O?p(b,g):g}if(O&&!f){const t=m(a.left,0);const n=m(a.right,0);const e=m(a.top,0);const o=m(a.bottom,0);if(u){D=d-2*(t!==0||n!==0?t+n:m(a.left,a.right))}else{C=h-2*(e!==0||o!==0?e+o:m(a.top,a.bottom))}}await r({...n,availableWidth:D,availableHeight:C});const S=await s.getDimensions(i.floating);if(d!==S.width||h!==S.height){return{reset:{rects:true}}}return{}}}};function nt(){return typeof window!=="undefined"}function et(t){if(it(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function ot(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function st(t){var n;return(n=(it(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function it(t){if(!nt()){return false}return t instanceof Node||t instanceof ot(t).Node}function rt(t){if(!nt()){return false}return t instanceof Element||t instanceof ot(t).Element}function ct(t){if(!nt()){return false}return t instanceof HTMLElement||t instanceof ot(t).HTMLElement}function at(t){if(!nt()||typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof ot(t).ShadowRoot}function lt(t){const{overflow:n,overflowX:e,overflowY:o,display:s}=yt(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(s)}function ft(t){return["table","td","th"].includes(et(t))}function ut(t){return[":popover-open",":modal"].some((n=>{try{return t.matches(n)}catch(t){return false}}))}function dt(t){const n=pt();const e=rt(t)?yt(t):t;return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":false)||!n&&(e.backdropFilter?e.backdropFilter!=="none":false)||!n&&(e.filter?e.filter!=="none":false)||["transform","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function ht(t){let n=gt(t);while(ct(n)&&!mt(n)){if(dt(n)){return n}else if(ut(n)){return null}n=gt(n)}return null}function pt(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function mt(t){return["html","body","#document"].includes(et(t))}function yt(t){return ot(t).getComputedStyle(t)}function vt(t){if(rt(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function gt(t){if(et(t)==="html"){return t}const n=t.assignedSlot||t.parentNode||at(t)&&t.host||st(t);return at(n)?n.host:n}function wt(t){const n=gt(t);if(mt(n)){return t.ownerDocument?t.ownerDocument.body:t.body}if(ct(n)&<(n)){return n}return wt(n)}function bt(t,n,e){var o;if(n===void 0){n=[]}if(e===void 0){e=true}const s=wt(t);const i=s===((o=t.ownerDocument)==null?void 0:o.body);const r=ot(s);if(i){const t=xt(r);return n.concat(r,r.visualViewport||[],lt(s)?s:[],t&&e?bt(t):[])}return n.concat(s,bt(s,[],e))}function xt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function kt(t){const n=yt(t);let e=parseFloat(n.width)||0;let o=parseFloat(n.height)||0;const s=ct(t);const i=s?t.offsetWidth:e;const r=s?t.offsetHeight:o;const c=y(e)!==i||y(o)!==r;if(c){e=i;o=r}return{width:e,height:o,$:c}}function At(t){return!rt(t)?t.contextElement:t}function Tt(t){const n=At(t);if(!ct(n)){return v(1)}const e=n.getBoundingClientRect();const{width:o,height:s,$:i}=kt(n);let r=(i?y(e.width):e.width)/o;let c=(i?y(e.height):e.height)/s;if(!r||!Number.isFinite(r)){r=1}if(!c||!Number.isFinite(c)){c=1}return{x:r,y:c}}const Ot=v(0);function Pt(t){const n=ot(t);if(!pt()||!n.visualViewport){return Ot}return{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Ct(t,n,e){if(n===void 0){n=false}if(!e||n&&e!==ot(t)){return false}return n}function Dt(t,n,e,o){if(n===void 0){n=false}if(e===void 0){e=false}const s=t.getBoundingClientRect();const i=At(t);let r=v(1);if(n){if(o){if(rt(o)){r=Tt(o)}}else{r=Tt(t)}}const c=Ct(i,e,o)?Pt(i):v(0);let a=(s.left+c.x)/r.x;let l=(s.top+c.y)/r.y;let f=s.width/r.x;let u=s.height/r.y;if(i){const t=ot(i);const n=o&&rt(o)?ot(o):o;let e=t;let s=xt(e);while(s&&o&&n!==e){const t=Tt(s);const n=s.getBoundingClientRect();const o=yt(s);const i=n.left+(s.clientLeft+parseFloat(o.paddingLeft))*t.x;const r=n.top+(s.clientTop+parseFloat(o.paddingTop))*t.y;a*=t.x;l*=t.y;f*=t.x;u*=t.y;a+=i;l+=r;e=ot(s);s=xt(e)}}return H({width:f,height:u,x:a,y:l})}function St(t){let{elements:n,rect:e,offsetParent:o,strategy:s}=t;const i=s==="fixed";const r=st(o);const c=n?ut(n.floating):false;if(o===r||c&&i){return e}let a={scrollLeft:0,scrollTop:0};let l=v(1);const f=v(0);const u=ct(o);if(u||!u&&!i){if(et(o)!=="body"||lt(r)){a=vt(o)}if(ct(o)){const t=Dt(o);l=Tt(o);f.x=t.x+o.clientLeft;f.y=t.y+o.clientTop}}return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-a.scrollLeft*l.x+f.x,y:e.y*l.y-a.scrollTop*l.y+f.y}}function Rt(t){return Array.from(t.getClientRects())}function jt(t,n){const e=vt(t).scrollLeft;if(!n){return Dt(st(t)).left+e}return n.left+e}function Lt(t){const n=st(t);const e=vt(t);const o=t.ownerDocument.body;const s=m(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth);const i=m(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let r=-e.scrollLeft+jt(t);const c=-e.scrollTop;if(yt(o).direction==="rtl"){r+=m(n.clientWidth,o.clientWidth)-s}return{width:s,height:i,x:r,y:c}}function Mt(t,n){const e=ot(t);const o=st(t);const s=e.visualViewport;let i=o.clientWidth;let r=o.clientHeight;let c=0;let a=0;if(s){i=s.width;r=s.height;const t=pt();if(!t||t&&n==="fixed"){c=s.offsetLeft;a=s.offsetTop}}return{width:i,height:r,x:c,y:a}}function Bt(t,n){const e=Dt(t,true,n==="fixed");const o=e.top+t.clientTop;const s=e.left+t.clientLeft;const i=ct(t)?Tt(t):v(1);const r=t.clientWidth*i.x;const c=t.clientHeight*i.y;const a=s*i.x;const l=o*i.y;return{width:r,height:c,x:a,y:l}}function Ft(t,n,e){let o;if(n==="viewport"){o=Mt(t,e)}else if(n==="document"){o=Lt(st(t))}else if(rt(n)){o=Bt(n,e)}else{const e=Pt(t);o={...n,x:n.x-e.x,y:n.y-e.y}}return H(o)}function Ht(t,n){const e=gt(t);if(e===n||!rt(e)||mt(e)){return false}return yt(e).position==="fixed"||Ht(e,n)}function Et(t,n){const e=n.get(t);if(e){return e}let o=bt(t,[],false).filter((t=>rt(t)&&et(t)!=="body"));let s=null;const i=yt(t).position==="fixed";let r=i?gt(t):t;while(rt(r)&&!mt(r)){const n=yt(r);const e=dt(r);if(!e&&n.position==="fixed"){s=null}const c=i?!e&&!s:!e&&n.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||lt(r)&&!e&&Ht(t,r);if(c){o=o.filter((t=>t!==r))}else{s=n}r=gt(r)}n.set(t,o);return o}function $t(t){let{element:n,boundary:e,rootBoundary:o,strategy:s}=t;const i=e==="clippingAncestors"?ut(n)?[]:Et(n,this._c):[].concat(e);const r=[...i,o];const c=r[0];const a=r.reduce(((t,e)=>{const o=Ft(n,e,s);t.top=m(o.top,t.top);t.right=p(o.right,t.right);t.bottom=p(o.bottom,t.bottom);t.left=m(o.left,t.left);return t}),Ft(n,c,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Wt(t){const{width:n,height:e}=kt(t);return{width:n,height:e}}function zt(t,n,e){const o=ct(n);const s=st(n);const i=e==="fixed";const r=Dt(t,true,i,n);let c={scrollLeft:0,scrollTop:0};const a=v(0);if(o||!o&&!i){if(et(n)!=="body"||lt(s)){c=vt(n)}if(o){const t=Dt(n,true,i,n);a.x=t.x+n.clientLeft;a.y=t.y+n.clientTop}else if(s){a.x=jt(s)}}let l=0;let f=0;if(s&&!o&&!i){const t=s.getBoundingClientRect();f=t.top+c.scrollTop;l=t.left+c.scrollLeft-jt(s,t)}const u=r.left+c.scrollLeft-a.x-l;const d=r.top+c.scrollTop-a.y-f;return{x:u,y:d,width:r.width,height:r.height}}function Nt(t){return yt(t).position==="static"}function It(t,n){if(!ct(t)||yt(t).position==="fixed"){return null}if(n){return n(t)}let e=t.offsetParent;if(st(t)===e){e=e.ownerDocument.body}return e}function Ut(t,n){const e=ot(t);if(ut(t)){return e}if(!ct(t)){let n=gt(t);while(n&&!mt(n)){if(rt(n)&&!Nt(n)){return n}n=gt(n)}return e}let o=It(t,n);while(o&&ft(o)&&Nt(o)){o=It(o,n)}if(o&&mt(o)&&Nt(o)&&!dt(o)){return e}return o||ht(t)||e}const _t=async function(t){const n=this.getOffsetParent||Ut;const e=this.getDimensions;const o=await e(t.floating);return{reference:zt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Gt(t){return yt(t).direction==="rtl"}const Kt={convertOffsetParentRelativeRectToViewportRelativeRect:St,getDocumentElement:st,getClippingRect:$t,getOffsetParent:Ut,getElementRects:_t,getClientRects:Rt,getDimensions:Wt,getScale:Tt,isElement:rt,isRTL:Gt};const Vt=J;I;const Xt=Q;const Yt=U;tt;K;const qt=z;Y;Z;const Jt=(t,n,e)=>{const o=new Map;const s={platform:Kt,...e};const i={...s.platform,_c:o};return $(t,n,{...s,platform:i})};const Qt=(t,n,e)=>{const o=t.get(n);if(!o){t.set(n,[e])}else if(!o.includes(e)){o.push(e)}};const Zt=(t,n)=>{let e;return(...o)=>{if(e){clearTimeout(e)}e=setTimeout((()=>{e=0;t(...o)}),n)}};const tn=t=>!("isConnected"in t)||t.isConnected;const nn=Zt((t=>{for(let n of t.keys()){t.set(n,t.get(n).filter(tn))}}),2e3);const en=()=>{if(typeof t!=="function"){return{}}const e=new Map;return{dispose:()=>e.clear(),get:n=>{const o=t();if(o){Qt(e,n,o)}},set:t=>{const o=e.get(t);if(o){e.set(t,o.filter(n))}nn(e)},reset:()=>{e.forEach((t=>t.forEach(n)));nn(e)}}};const on=t=>typeof t==="function"?t():t;const sn=(t,n=((t,n)=>t!==n))=>{const e=on(t);let o=new Map(Object.entries(e!==null&&e!==void 0?e:{}));const s={dispose:[],get:[],set:[],reset:[]};const i=()=>{var n;o=new Map(Object.entries((n=on(t))!==null&&n!==void 0?n:{}));s.reset.forEach((t=>t()))};const r=()=>{s.dispose.forEach((t=>t()));i()};const c=t=>{s.get.forEach((n=>n(t)));return o.get(t)};const a=(t,e)=>{const i=o.get(t);if(n(e,i,t)){o.set(t,e);s.set.forEach((n=>n(t,e,i)))}};const l=typeof Proxy==="undefined"?{}:new Proxy(e,{get(t,n){return c(n)},ownKeys(t){return Array.from(o.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,n){return o.has(n)},set(t,n,e){a(n,e);return true}});const f=(t,n)=>{s[t].push(n);return()=>{rn(s[t],n)}};const u=(n,e)=>{const o=f("set",((t,o)=>{if(t===n){e(o)}}));const s=f("reset",(()=>e(on(t)[n])));return()=>{o();s()}};const d=(...t)=>{const n=t.reduce(((t,n)=>{if(n.set){t.push(f("set",n.set))}if(n.get){t.push(f("get",n.get))}if(n.reset){t.push(f("reset",n.reset))}if(n.dispose){t.push(f("dispose",n.dispose))}return t}),[]);return()=>n.forEach((t=>t()))};const h=t=>{const n=o.get(t);s.set.forEach((e=>e(t,n,n)))};return{state:l,get:c,set:a,on:f,onChange:u,use:d,dispose:r,reset:i,forceUpdate:h}};const rn=(t,n)=>{const e=t.indexOf(n);if(e>=0){t[e]=t[t.length-1];t.length--}};const cn=(t,n)=>{const e=sn(t,n);e.use(en());return e};const an="nv-popover{display:inline-block;position:relative}nv-popover:has([fluid]:not([fluid=false])){display:block}nv-popover>[data-scope=popover]{width:max-content;background-color:var(--components-popover-background);border-color:var(--components-popover-border);font-weight:var(--font-weight-medium-emphasis);border-width:1px;border-style:solid;border-radius:var(--popover-radius);padding:var(--popover-padding-y) var(--popover-padding-x);position:absolute;top:0;left:0;z-index:1;box-shadow:var(--popover-shadow-1-x) var(--popover-shadow-1-y) var(--popover-shadow-1-blur) -2px var(--popover-shadow-1-opacity), var(--popover-shadow-2-x) var(--popover-shadow-2-y) var(--popover-shadow-2-blur) var(--shadow-spread-lg-2) var(--popover-shadow-2-opacity)}nv-popover>[data-scope=popover][hidden]:not([hidden=false]){display:none}nv-popover>[data-scope=popover]>[data-scope=arrow]{background-color:var(--components-popover-background);position:absolute;border-color:var(--components-popover-border);border-width:1px;border-style:solid;border-bottom-color:transparent;border-right-color:transparent;width:8px;height:8px;transform:rotate(45deg);border-radius:1px}nv-popover>[data-scope=popover]>[slot=content]{position:relative;z-index:1}nv-popover>slot-fb{display:none}";const ln=an;const{state:fn}=cn({groups:new Map});const un=class{constructor(t){e(this,t);this.openChanged=o(this,"openChanged",7);this.eventsAttached=false;this.open=false;this.triggerMode="click";this.placement="bottom";this.offset=6;this.hasArrow=false;this.disableFlip=false;this.shiftPadding=0;this.enterDelay=0;this.nested=false;this.handleClickOutside=t=>{var n;if(this.el.contains(t.target))return;if((n=this.triggerElement)===null||n===void 0?void 0:n.contains(t.target))return;this.open=false};this.clickEvents=[["click",()=>this.open=!this.open]];this.outsideClickEvents=[["click",this.handleClickOutside],["touchstart",this.handleClickOutside]];this.hoverEvents=[["focus",()=>{clearTimeout(this.hideTimeout);this.showTimeout=setTimeout((()=>this.open=true),this.enterDelay)}],["blur",()=>{clearTimeout(this.showTimeout);this.hideTimeout=setTimeout((()=>this.open=false),50)}],["mouseenter",()=>{clearTimeout(this.hideTimeout);this.showTimeout=setTimeout((()=>this.open=true),this.enterDelay)}],["mouseleave",()=>{clearTimeout(this.showTimeout);this.hideTimeout=setTimeout((()=>this.open=false),100)}]];this.closeEvents=[["keydown",t=>{if(t.key==="Escape"){this.open=false}}]];this.isAnimating=false}async show(){this.open=true}async hide(){this.open=false}async toggle(){this.open=!this.open}attachEventListeners(){if(this.triggerElement&&!this.eventsAttached){l(this.closeEvents,document,this);if(this.triggerMode==="click"){l(this.clickEvents,this.triggerElement,this);l(this.outsideClickEvents,document,this)}if(this.triggerMode==="hover"){l(this.hoverEvents,this.triggerElement,this)}this.eventsAttached=true}}positionPopover(){if(!this.triggerElement)return;Jt(this.triggerElement,this.popoverElement,{placement:this.placement,middleware:[Vt(this.offset),!this.disableFlip&&Yt({fallbackStrategy:"bestFit",crossAxis:true,fallbackPlacements:["bottom"]}),Xt({padding:this.shiftPadding}),this.hasArrow&&qt({element:this.arrowElement})]}).then((({x:t,y:n,placement:e,middlewareData:o})=>{Object.assign(this.popoverElement.style,{left:`${t}px`,top:`${n}px`});if(this.hasArrow){const t={top:"bottom",right:"left",bottom:"top",left:"right"}[e.split("-")[0]];const n={top:"rotate(225deg)",right:"rotate(315deg)",bottom:"rotate(45deg)",left:"rotate(135deg)"}[e.split("-")[0]];const{x:s,y:i}=o.arrow;Object.assign(this.arrowElement.style,{left:s!=null?`${s}px`:"",top:i!=null?`${i}px`:"",right:"",bottom:"",transform:n,[t]:"-4px"})}}))}handleOpenChanged(t){var n;if(this.triggerMode==="controlled")return;if(this.nested)return;if((n=t.target)===null||n===void 0?void 0:n.hasAttribute("nested"))return;if(t.target!==this.el&&t.detail===true)this.open=false}async handleOpenChange(t){while(this.isAnimating){await new Promise((t=>setTimeout(t,50)))}this.isAnimating=true;const n=fn.groups.get(this.groupName);const e=n&&n.openedBy!==this.el;const o=n&&n.openedBy===this.el;if(t)this.popoverElement.style.removeProperty("display");if(o&&!t)fn.groups.delete(this.groupName);if(this.groupName&&t)fn.groups.set(this.groupName,{openedBy:this.el});const{growIn:s}=a(this.popoverElement,{duration:e?0:100,amount:.85});const{fadeOut:i}=c(this.popoverElement,{duration:e?0:100});if(t===true){this.popoverElement.removeAttribute("hidden");this.positionPopover();await s()}if(t===false){await i();this.popoverElement.setAttribute("hidden","")}this.isAnimating=false;this.openChanged.emit(t)}componentWillLoad(){if(!this.triggerElement)this.triggerElement=Array.from(this.el.children).find((t=>t.getAttribute("slot")==="trigger"))}componentWillUpdate(){this.attachEventListeners()}componentDidLoad(){if(!this.open){const{setGrowOut:t}=a(this.popoverElement);t()}else{const{setFadeIn:t}=c(this.popoverElement);t();this.popoverElement.removeAttribute("hidden")}this.positionPopover();this.attachEventListeners()}disconnectedCallback(){f(this.closeEvents,document,this);if(this.triggerMode==="click"){f(this.clickEvents,this.triggerElement,this);f(this.outsideClickEvents,document,this)}if(this.triggerMode==="hover")f(this.hoverEvents,this.triggerElement,this);this.eventsAttached=false;if(this.hideTimeout)clearTimeout(this.hideTimeout);if(this.showTimeout)clearTimeout(this.showTimeout)}render(){return s(i,{key:"dd1a09e6df99069395fff7bb1a1b5d5e52331755"},s("slot",{key:"998460dcac1e6cae6e420413c2e9bef460ed7d76",name:"trigger"}),s("div",{key:"36a4bad082087b073e1f26b997f902611f6b7265","data-scope":"popover",hidden:true,ref:t=>this.popoverElement=t},this.hasArrow&&s("div",{key:"7734847121f62b2233c0d99baa05c9c71ba9d6e4","data-scope":"arrow",ref:t=>this.arrowElement=t}),s("slot",{key:"29d5e8860f9ccdf2382f61c4276019a36983b0ff",name:"content"})))}get el(){return r(this)}static get watchers(){return{open:["handleOpenChange"]}}};un.style=ln;export{un as nv_popover};
|
|
2
|
+
//# sourceMappingURL=p-d4bf2587.entry.js.map
|