@aquera/nile-elements 1.9.6 → 1.9.7
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/README.md +3 -0
- package/dist/index-178e1e57.cjs.js +2 -0
- package/dist/index-178e1e57.cjs.js.map +1 -0
- package/dist/index-1faa963c.esm.js +1 -0
- package/dist/index-249de90a.esm.js +1 -0
- package/dist/index-353172ed.esm.js +1 -0
- package/dist/index-6f3fa4ab.esm.js +1 -0
- package/dist/index-89c520e9.cjs.js +5 -0
- package/dist/index-89c520e9.cjs.js.map +1 -0
- package/dist/index-920675c4.esm.js +1 -0
- package/dist/index-b387a9f4.cjs.js +2 -0
- package/dist/index-b387a9f4.cjs.js.map +1 -0
- package/dist/index-cc1385e0.cjs.js +2 -0
- package/dist/index-cc1385e0.cjs.js.map +1 -0
- package/dist/index-dedc38a6.esm.js +1 -0
- package/dist/index-df196058.cjs.js +2 -0
- package/dist/index-df196058.cjs.js.map +1 -0
- package/dist/index-f956f56d.cjs.js +7 -0
- package/dist/index-f956f56d.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +3595 -629
- package/dist/internal/glyph.cjs.js +2 -0
- package/dist/internal/glyph.cjs.js.map +1 -0
- package/dist/internal/glyph.esm.js +5 -0
- package/dist/nile-auto-complete/index.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/portal-manager.cjs.js +1 -1
- package/dist/nile-auto-complete/portal-utils.cjs.js +1 -1
- package/dist/nile-code-editor/extensionSetup.cjs.js +7 -7
- package/dist/nile-code-editor/extensionSetup.cjs.js.map +1 -1
- package/dist/nile-code-editor/extensionSetup.esm.js +1 -1
- package/dist/nile-code-editor/index.cjs.js +1 -1
- package/dist/nile-code-editor/index.esm.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
- package/dist/nile-color-picker/index.cjs.js +1 -1
- package/dist/nile-color-picker/nile-color-picker.cjs.js +1 -1
- package/dist/nile-combobox/index.cjs.js +1 -1
- package/dist/nile-combobox/index.esm.js +1 -1
- package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.esm.js +1 -1
- package/dist/nile-combobox/portal-manager.cjs.js +1 -1
- package/dist/nile-context-menu/index.cjs.js +1 -1
- package/dist/nile-context-menu/nile-context-menu.cjs.js +1 -1
- package/dist/nile-context-submenu/index.cjs.js +1 -1
- package/dist/nile-context-submenu/nile-context-submenu.cjs.js +1 -1
- package/dist/nile-detail/index.cjs.js +1 -1
- package/dist/nile-detail/index.esm.js +1 -1
- package/dist/nile-detail/nile-detail.cjs.js +1 -1
- package/dist/nile-detail/nile-detail.esm.js +1 -1
- package/dist/nile-dropdown/index.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/portal-manager.cjs.js +1 -1
- package/dist/nile-file-upload/index.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js +1 -1
- package/dist/nile-floating-panel/index.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
- package/dist/nile-lite-tooltip/index.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
- package/dist/nile-markdown-editor/index.cjs.js +1 -1
- package/dist/nile-markdown-editor/nile-markdown-editor.cjs.js +1 -1
- package/dist/nile-popover/index.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +1 -1
- package/dist/nile-popover/portal-manager.cjs.js +1 -1
- package/dist/nile-popup/index.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.cjs.js +1 -1
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/portal-manager.cjs.js +1 -1
- package/dist/nile-side-bar-action/index.cjs.js +1 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js +1 -1
- package/dist/nile-side-bar-action/portal-manager.cjs.js +1 -1
- package/dist/nile-tooltip/index.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +1 -1
- package/dist/nile-virtual-select/portal-manager.cjs.js +1 -1
- package/dist/nile-virtual-select/renderer.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/emoji.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/emoji.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/emoji.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/commands.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/commands.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/commands.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/create-state.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/export.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/export.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/export.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/index.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/index.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/index.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/inputrules.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/keymap.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown-parse.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/markdown-parse.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown-parse.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/markdown.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/office-paste.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/office-paste.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/office-paste.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/link.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/math-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/math-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/math-view.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/task-list.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/task-list.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/task-list.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/sanitize.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/schema.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/schema.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/schema.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/selection-state.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/serializer.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/index.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/index.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/index.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +780 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +97 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.esm.js +244 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.esm.js +137 -0
- package/dist/nile-wysiwyg-editor/types.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/types.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/types.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.esm.js +97 -0
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.esm.js +67 -0
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.esm.js +65 -0
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/embed-menu.esm.js +64 -0
- package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/embed-panel.esm.js +68 -0
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.esm.js +96 -0
- package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/find-replace.esm.js +112 -0
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/image-menu.esm.js +64 -0
- package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/image-panel.esm.js +171 -0
- package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/insert-menu.esm.js +90 -0
- package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/link-editor.esm.js +114 -0
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.esm.js +80 -0
- package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/math-panel.esm.js +92 -0
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.esm.js +147 -0
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/source-view.esm.js +79 -0
- package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/special-chars.esm.js +96 -0
- package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/suggest-list.esm.js +67 -0
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.esm.js +100 -0
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/table-menu.esm.js +58 -0
- package/dist/src/index.d.ts +24 -0
- package/dist/src/index.js +19 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/glyph.d.ts +6 -0
- package/dist/src/internal/glyph.js +13 -0
- package/dist/src/internal/glyph.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/emoji.d.ts +5 -0
- package/dist/src/nile-wysiwyg-editor/emoji.js +138 -0
- package/dist/src/nile-wysiwyg-editor/emoji.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/commands.d.ts +69 -0
- package/dist/src/nile-wysiwyg-editor/engine/commands.js +863 -0
- package/dist/src/nile-wysiwyg-editor/engine/commands.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.d.ts +35 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.js +67 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.d.ts +38 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.js +208 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.test.js +96 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/index.d.ts +37 -0
- package/dist/src/nile-wysiwyg-editor/engine/index.js +29 -0
- package/dist/src/nile-wysiwyg-editor/engine/index.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.d.ts +12 -0
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.js +144 -0
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/keymap.d.ts +15 -0
- package/dist/src/nile-wysiwyg-editor/engine/keymap.js +94 -0
- package/dist/src/nile-wysiwyg-editor/engine/keymap.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.d.ts +22 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.js +287 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.js +106 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown.d.ts +10 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown.js +162 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/office-paste.d.ts +13 -0
- package/dist/src/nile-wysiwyg-editor/engine/office-paste.js +182 -0
- package/dist/src/nile-wysiwyg-editor/engine/office-paste.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.d.ts +10 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.js +165 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.d.ts +17 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.js +69 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.d.ts +17 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.js +96 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.d.ts +26 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.js +123 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.d.ts +28 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.js +72 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.d.ts +41 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js +176 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image.d.ts +15 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image.js +64 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.d.ts +11 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js +42 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.js +46 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.d.ts +7 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.js +26 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.d.ts +31 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js +55 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.d.ts +7 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.js +25 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.d.ts +10 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.js +48 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.d.ts +29 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.js +87 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.d.ts +8 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js +11 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.d.ts +16 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.js +49 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.js +883 -0
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/productivity.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/productivity.test.js +129 -0
- package/dist/src/nile-wysiwyg-editor/engine/productivity.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.d.ts +13 -0
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.js +155 -0
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/schema.d.ts +20 -0
- package/dist/src/nile-wysiwyg-editor/engine/schema.js +823 -0
- package/dist/src/nile-wysiwyg-editor/engine/schema.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.d.ts +70 -0
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.js +138 -0
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/serializer.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/engine/serializer.js +63 -0
- package/dist/src/nile-wysiwyg-editor/engine/serializer.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/index.d.ts +3 -0
- package/dist/src/nile-wysiwyg-editor/index.js +3 -0
- package/dist/src/nile-wysiwyg-editor/index.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +782 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.d.ts +364 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +2038 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js +636 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js +2 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.d.ts +6 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js +251 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.d.ts +41 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.js +700 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/types.d.ts +49 -0
- package/dist/src/nile-wysiwyg-editor/types.js +8 -0
- package/dist/src/nile-wysiwyg-editor/types.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.d.ts +20 -0
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js +159 -0
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.d.ts +21 -0
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js +125 -0
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.js +107 -0
- package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.d.ts +19 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js +123 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.d.ts +27 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js +146 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.d.ts +21 -0
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js +154 -0
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.d.ts +26 -0
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.js +178 -0
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.js +129 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.d.ts +56 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.js +349 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.d.ts +25 -0
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js +142 -0
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.d.ts +30 -0
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.js +189 -0
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.d.ts +24 -0
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js +144 -0
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.d.ts +31 -0
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.js +172 -0
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.d.ts +30 -0
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js +296 -0
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/source-view.d.ts +19 -0
- package/dist/src/nile-wysiwyg-editor/ui/source-view.js +120 -0
- package/dist/src/nile-wysiwyg-editor/ui/source-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.d.ts +20 -0
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.js +199 -0
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.d.ts +31 -0
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js +133 -0
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.d.ts +23 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js +177 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.d.ts +16 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.js +101 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.js.map +1 -0
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -2
- package/src/index.ts +57 -1
- package/src/internal/glyph.ts +13 -0
- package/src/nile-wysiwyg-editor/emoji.ts +137 -0
- package/src/nile-wysiwyg-editor/engine/commands.ts +1035 -0
- package/src/nile-wysiwyg-editor/engine/create-state.ts +117 -0
- package/src/nile-wysiwyg-editor/engine/export.test.ts +113 -0
- package/src/nile-wysiwyg-editor/engine/export.ts +242 -0
- package/src/nile-wysiwyg-editor/engine/index.ts +69 -0
- package/src/nile-wysiwyg-editor/engine/inputrules.ts +169 -0
- package/src/nile-wysiwyg-editor/engine/keymap.ts +146 -0
- package/src/nile-wysiwyg-editor/engine/markdown-parse.test.ts +148 -0
- package/src/nile-wysiwyg-editor/engine/markdown-parse.ts +337 -0
- package/src/nile-wysiwyg-editor/engine/markdown.ts +165 -0
- package/src/nile-wysiwyg-editor/engine/office-paste.ts +199 -0
- package/src/nile-wysiwyg-editor/engine/plugins/code-highlight.ts +173 -0
- package/src/nile-wysiwyg-editor/engine/plugins/embed-view.ts +85 -0
- package/src/nile-wysiwyg-editor/engine/plugins/embeds.ts +99 -0
- package/src/nile-wysiwyg-editor/engine/plugins/find-replace.ts +155 -0
- package/src/nile-wysiwyg-editor/engine/plugins/format-painter.ts +80 -0
- package/src/nile-wysiwyg-editor/engine/plugins/image-view.ts +220 -0
- package/src/nile-wysiwyg-editor/engine/plugins/image.ts +80 -0
- package/src/nile-wysiwyg-editor/engine/plugins/link.ts +42 -0
- package/src/nile-wysiwyg-editor/engine/plugins/math-view.ts +56 -0
- package/src/nile-wysiwyg-editor/engine/plugins/max-length.ts +24 -0
- package/src/nile-wysiwyg-editor/engine/plugins/paste.ts +74 -0
- package/src/nile-wysiwyg-editor/engine/plugins/placeholder.ts +24 -0
- package/src/nile-wysiwyg-editor/engine/plugins/single-line.ts +47 -0
- package/src/nile-wysiwyg-editor/engine/plugins/suggestions.ts +110 -0
- package/src/nile-wysiwyg-editor/engine/plugins/tables.ts +12 -0
- package/src/nile-wysiwyg-editor/engine/plugins/task-list.ts +65 -0
- package/src/nile-wysiwyg-editor/engine/pm.test.ts +1088 -0
- package/src/nile-wysiwyg-editor/engine/productivity.test.ts +163 -0
- package/src/nile-wysiwyg-editor/engine/sanitize.ts +156 -0
- package/src/nile-wysiwyg-editor/engine/schema.ts +859 -0
- package/src/nile-wysiwyg-editor/engine/selection-state.ts +210 -0
- package/src/nile-wysiwyg-editor/engine/serializer.ts +78 -0
- package/src/nile-wysiwyg-editor/index.ts +3 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +782 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.ts +750 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +2155 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.ts +1 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.ts +251 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.ts +772 -0
- package/src/nile-wysiwyg-editor/types.ts +83 -0
- package/src/nile-wysiwyg-editor/ui/bookmark-panel.ts +155 -0
- package/src/nile-wysiwyg-editor/ui/bubble-menu.ts +135 -0
- package/src/nile-wysiwyg-editor/ui/code-block-menu.ts +105 -0
- package/src/nile-wysiwyg-editor/ui/embed-menu.ts +133 -0
- package/src/nile-wysiwyg-editor/ui/embed-panel.ts +143 -0
- package/src/nile-wysiwyg-editor/ui/emoji-picker.ts +152 -0
- package/src/nile-wysiwyg-editor/ui/find-replace.ts +174 -0
- package/src/nile-wysiwyg-editor/ui/image-menu.ts +140 -0
- package/src/nile-wysiwyg-editor/ui/image-panel.ts +337 -0
- package/src/nile-wysiwyg-editor/ui/insert-menu.ts +142 -0
- package/src/nile-wysiwyg-editor/ui/link-editor.ts +180 -0
- package/src/nile-wysiwyg-editor/ui/markdown-panel.ts +143 -0
- package/src/nile-wysiwyg-editor/ui/math-panel.ts +169 -0
- package/src/nile-wysiwyg-editor/ui/shortcut-help.ts +311 -0
- package/src/nile-wysiwyg-editor/ui/source-view.ts +119 -0
- package/src/nile-wysiwyg-editor/ui/special-chars.ts +209 -0
- package/src/nile-wysiwyg-editor/ui/suggest-list.ts +138 -0
- package/src/nile-wysiwyg-editor/ui/table-grid-picker.ts +173 -0
- package/src/nile-wysiwyg-editor/ui/table-menu.ts +109 -0
- package/vscode-html-custom-data.json +450 -0
- package/web-dev-server.config.mjs +6 -2
- package/dist/index-5fef1a0d.esm.js +0 -1
- package/dist/index-8f38fae3.cjs.js +0 -2
- package/dist/index-8f38fae3.cjs.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["../floating-ui.dom-007bbe96.cjs.js","./portal-utils.cjs.js"],function(_export,_context){"use strict";var t,i,s,o,e,h,a,n,r,l;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[function(_floatingUiDom001CjsJs){t=_floatingUiDom001CjsJs.c;i=_floatingUiDom001CjsJs.o;s=_floatingUiDom001CjsJs.f;o=_floatingUiDom001CjsJs.a;e=_floatingUiDom001CjsJs.p;h=_floatingUiDom001CjsJs.b;},function(_portalUtilsCjsJs){a=_portalUtilsCjsJs.P;n=_portalUtilsCjsJs.a;r=_portalUtilsCjsJs.b;}],execute:function execute(){_export("P",l=/*#__PURE__*/function(){function l(t){_classCallCheck(this,l);this.portalContainer=null,this.measuredPopoverHeight=null,this.clonedPopover=null,this.cleanupAutoUpdate=null,this.currentPlacement="top",this.currentMiddlewareData=null,this.boundHandleWindowResize=null,this.component=t;}return _createClass(l,[{key:"createPortalAppendContainer",value:function createPortalAppendContainer(){var t=document.createElement("div");return t.style.position="absolute",t.style.zIndex="9999",t.style.pointerEvents="none",t.style.width="auto",t.style.maxWidth="none",t.style.minWidth="200px",t.className="nile-popover-portal-append",t;}},{key:"positionPortalAppend",value:function positionPortalAppend(){this.portalContainer&&this.component.isShow&&(this.measurePopoverHeight(),this.computeFloatingUIPosition());}},{key:"measurePopoverHeight",value:function measurePopoverHeight(){!this.measuredPopoverHeight&&this.portalContainer&&(this.portalContainer.style.position="absolute",this.portalContainer.style.visibility="hidden",this.portalContainer.style.top="0px",this.portalContainer.style.left="0px",this.portalContainer.offsetHeight,this.measuredPopoverHeight=this.portalContainer.offsetHeight,this.portalContainer.style.visibility="");}},{key:"computeFloatingUIPosition",value:function(){var _computeFloatingUIPosition=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var t,i,_yield$this$calculate,_s,_o,_e,_h;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(this.portalContainer){_context2.next=2;break;}return _context2.abrupt("return");case 2:t=this.component.querySelector('[slot="anchor"]')||this.component,i=this.portalContainer;_context2.prev=3;_context2.next=6;return this.calculateFloatingUIPosition(t,i);case 6:_yield$this$calculate=_context2.sent;_s=_yield$this$calculate.x;_o=_yield$this$calculate.y;_e=_yield$this$calculate.placement;_h=_yield$this$calculate.middlewareData;this.applyFloatingUIPosition(i,t,_s,_o,_e,_h);_context2.next=17;break;case 14:_context2.prev=14;_context2.t0=_context2["catch"](3);console.warn("Floating UI positioning failed, falling back to simple positioning:",_context2.t0),this.fallbackPositioning();case 17:case"end":return _context2.stop();}},_callee,this,[[3,14]]);}));function computeFloatingUIPosition(){return _computeFloatingUIPosition.apply(this,arguments);}return computeFloatingUIPosition;}()},{key:"calculateFloatingUIPosition",value:function(){var _calculateFloatingUIPosition=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(i,s){var o,e,h;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:o=a.findBoundaryElements(i),e=this.getInitialPlacement(),h=this.createFloatingUIMiddleware(o);_context3.next=3;return t(i,s,{placement:e,strategy:"fixed",middleware:h,platform:this.createCustomPlatform()});case 3:return _context3.abrupt("return",_context3.sent);case 4:case"end":return _context3.stop();}},_callee2,this);}));function calculateFloatingUIPosition(_x,_x2){return _calculateFloatingUIPosition.apply(this,arguments);}return calculateFloatingUIPosition;}()},{key:"getInitialPlacement",value:function getInitialPlacement(){return this.component.placement||"top";}},{key:"createFloatingUIMiddleware",value:function createFloatingUIMiddleware(t){return[i(this.component.distance||18),s({fallbackPlacements:this.getFallbackPlacements(),fallbackStrategy:"bestFit",padding:10,boundary:t}),o({padding:10,crossAxis:!0,boundary:t})];}},{key:"getFallbackPlacements",value:function getFallbackPlacements(){var t=this.component.placement||"top",i=[];return t.startsWith("top")?i.push("bottom","right","left","top-start","top-end","bottom-start","bottom-end"):t.startsWith("bottom")?i.push("top","right","left","bottom-start","bottom-end","top-start","top-end"):t.startsWith("left")?i.push("right","top","bottom","left-start","left-end","right-start","right-end"):t.startsWith("right")&&i.push("left","top","bottom","right-start","right-end","left-start","left-end"),i;}},{key:"createCustomPlatform",value:function createCustomPlatform(){return e;}},{key:"positionArrow",value:function positionArrow(t,i,s){if(!this.component.arrow)return;var o=t.querySelector(".popup__arrow");if(!o)return;var e=i.getBoundingClientRect(),h=t.getBoundingClientRect();var a="",n="",r="",_l="";switch(s.split("-")[0]){case"top":r="calc(var(--arrow-size-diagonal) * -1)",_l=this.calculateArrowXPosition(e,h,s,18);break;case"bottom":a="calc(var(--arrow-size-diagonal) * -1)",_l=this.calculateArrowXPosition(e,h,s,18);break;case"left":n="calc(var(--arrow-size-diagonal) * -1)",a=this.calculateArrowYPosition(e,h,s,18);break;case"right":_l="calc(var(--arrow-size-diagonal) * -1)",a=this.calculateArrowYPosition(e,h,s,18);}Object.assign(o.style,{top:a,right:n,bottom:r,left:_l});}},{key:"calculateArrowXPosition",value:function calculateArrowXPosition(t,i,s,o){var e=t.left+t.width/2-i.left-o;return s.includes("start")?"".concat(o,"px"):s.includes("end")?"calc(100% - ".concat(2*o,"px)"):"".concat(Math.max(o,Math.min(e,i.width-2*o)),"px");}},{key:"calculateArrowYPosition",value:function calculateArrowYPosition(t,i,s,o){var e=t.top+t.height/2-i.top-o;return s.includes("start")?"".concat(o,"px"):s.includes("end")?"calc(100% - ".concat(2*o,"px)"):"".concat(Math.max(o,Math.min(e,i.height-2*o)),"px");}},{key:"applyFloatingUIPosition",value:function applyFloatingUIPosition(t,i,s,o,e,h){Object.assign(t.style,{left:"".concat(s,"px"),top:"".concat(o,"px"),position:"fixed",pointerEvents:"auto",width:"auto",maxWidth:"none",minWidth:"200px"}),this.currentPlacement=e,this.currentMiddlewareData=h,a.applyCollisionData(t,h,e),t.className="nile-popover-portal-append";var n=i.getBoundingClientRect();t.style.minWidth="".concat(Math.max(n.width,200),"px"),this.positionArrow(t,i,e);}},{key:"fallbackPositioning",value:function fallbackPositioning(){if(!this.portalContainer)return;var t=this.component.querySelector('[slot="anchor"]')||this.component,i=t.getBoundingClientRect(),s=window.innerHeight,o=window.innerWidth,e=s-i.bottom,h=i.top,a=o-i.right,n=i.left;var r,_l2,p,c=i.left;e>h&&e>200?(p=Math.max(e-20,100),r=i.bottom+(this.component.distance||18),_l2="bottom"):h>e&&h>200?(p=Math.max(h-20,100),r=Math.max(i.top-p-(this.component.distance||18),10),_l2="top"):a>n&&a>200?(p=Math.max(Math.min(a,e,h)-20,100),r=i.top,c=i.right+(this.component.distance||18),_l2="right"):(p=Math.max(Math.min(n,e,h)-20,100),r=i.top,c=Math.max(i.left-200-(this.component.distance||18),10),_l2="left"),"left"===_l2||"right"===_l2?(this.portalContainer.style.left="".concat(c,"px"),this.portalContainer.style.top="".concat(r,"px")):(this.portalContainer.style.left="".concat(i.left,"px"),this.portalContainer.style.top="".concat(r,"px")),this.portalContainer.style.maxHeight="".concat(p,"px"),this.portalContainer.style.pointerEvents="auto",this.portalContainer.style.width="auto",this.portalContainer.style.maxWidth="none",this.portalContainer.style.minWidth="200px",this.portalContainer.className="nile-popover-portal-append popover__box popover__box--".concat(_l2),this.calculateAndSetAutoSizeProperties(i,r,_l2),this.positionArrow(this.portalContainer,t,_l2);}},{key:"calculateAndSetAutoSizeProperties",value:function calculateAndSetAutoSizeProperties(t,i,s){if(!this.portalContainer)return;var o=window.innerHeight,e=window.innerWidth;var h,a=e-t.left-10;"top"===s?h=t.top-10:"bottom"===s?h=o-t.bottom-10:"left"===s?(h=Math.min(o-t.top,t.bottom),a=t.left-10):(h=Math.min(o-t.top,t.bottom),a=e-t.right-10),this.portalContainer.style.setProperty("--auto-size-available-height","".concat(Math.max(h,100),"px")),this.portalContainer.style.setProperty("--auto-size-available-width","".concat(Math.max(a,200),"px"));}},{key:"updatePortalAppendPosition",value:function updatePortalAppendPosition(){this.component.portal&&this.portalContainer&&this.positionPortalAppend();}},{key:"handleWindowResize",value:function handleWindowResize(){this.component.portal&&this.portalContainer&&this.positionPortalAppend();}},{key:"setupAutoUpdatePositioning",value:function setupAutoUpdatePositioning(){var _this=this;this.portalContainer&&this.component&&(this.cleanupAutoUpdatePositioning(),this.cleanupAutoUpdate=h(this.component,this.portalContainer,function(){_this.computeFloatingUIPosition();},{ancestorScroll:!0,ancestorResize:!0,elementResize:!0,layoutShift:!0,animationFrame:!0}));}},{key:"cleanupAutoUpdatePositioning",value:function cleanupAutoUpdatePositioning(){this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);}},{key:"injectStylesToDocument",value:function injectStylesToDocument(){if(!this.portalContainer)return;var t=a.generateStyleId();if(document.getElementById(t))return;var i=this.component.constructor.styles;if(!i)return;var s=document.createElement("style");s.id=t,s.textContent=a.extractStylesAsCSS(i),document.head.appendChild(s),this.portalContainer.t=t;}},{key:"adoptStylesToPortalAppend",value:function adoptStylesToPortalAppend(){this.portalContainer&&this.injectStylesToDocument();}},{key:"setupPortalAppend",value:function setupPortalAppend(){var _this2=this;this.component.portal&&this.component.updateComplete.then(function(){setTimeout(function(){_this2.component.isShow&&(_this2.clonedPopover=_this2.createPortalPopover(),_this2.portalContainer=_this2.createPortalAppendContainer(),_this2.portalContainer.appendChild(_this2.clonedPopover),document.body.appendChild(_this2.portalContainer),_this2.adoptStylesToPortalAppend(),_this2.clonedPopover.style.display="",_this2.positionPortalAppend(),_this2.setupPortalEventListeners(),_this2.setupAutoUpdatePositioning(),_this2.boundHandleWindowResize=_this2.handleWindowResize.bind(_this2),window.addEventListener("resize",_this2.boundHandleWindowResize));},10);});}},{key:"createPortalPopover",value:function createPortalPopover(){return n.createPortalPopover(this.component);}},{key:"setupPortalEventListeners",value:function setupPortalEventListeners(){r.setupPortalEventListeners(this.clonedPopover,this.component);}},{key:"cleanupPortalAppend",value:function cleanupPortalAppend(){if(this.cleanupAutoUpdatePositioning(),this.portalContainer&&this.portalContainer.parentNode){var _t=this.portalContainer.t;if(_t){var _i=document.getElementById(_t);_i&&_i.remove();}this.portalContainer.parentNode.removeChild(this.portalContainer);}this.boundHandleWindowResize&&(window.removeEventListener("resize",this.boundHandleWindowResize),this.boundHandleWindowResize=null),this.portalContainer=null,this.clonedPopover=null,this.measuredPopoverHeight=null,this.currentPlacement="top",this.currentMiddlewareData=null;}},{key:"portalContainerElement",get:function get(){return this.portalContainer;}},{key:"resetMeasuredHeight",value:function resetMeasuredHeight(){this.measuredPopoverHeight=null;}},{key:"forceReposition",value:function forceReposition(){this.portalContainer&&this.computeFloatingUIPosition();}},{key:"getCurrentPlacement",value:function getCurrentPlacement(){return this.currentPlacement;}},{key:"getCurrentMiddlewareData",value:function getCurrentMiddlewareData(){return this.currentMiddlewareData;}},{key:"isUsingFloatingUI",value:function isUsingFloatingUI(){return null!==this.cleanupAutoUpdate;}},{key:"updatePositioningConfig",value:function updatePositioningConfig(t){this.forceReposition();}},{key:"handleViewportChange",value:function handleViewportChange(){this.portalContainer&&(this.resetMeasuredHeight(),this.forceReposition());}},{key:"isPositioningOptimal",value:function isPositioningOptimal(){if(!this.portalContainer||!this.currentMiddlewareData)return!0;var t=(this.component.querySelector('[slot="anchor"]')||this.component).getBoundingClientRect(),i=window.innerHeight-t.bottom,s=t.top,o=this.currentPlacement.startsWith("top"),e=this.currentPlacement.startsWith("bottom");return!(o&&i>s)&&!(e&&s>i);}}]);}());}};});
|
|
1
|
+
System.register(["../floating-ui.dom-007bbe96.cjs.js","./portal-utils.cjs.js"],function(_export,_context){"use strict";var t,i,s,o,e,h,a,n,r,l;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[function(_floatingUiDom002CjsJs){t=_floatingUiDom002CjsJs.c;i=_floatingUiDom002CjsJs.o;s=_floatingUiDom002CjsJs.f;o=_floatingUiDom002CjsJs.a;e=_floatingUiDom002CjsJs.p;h=_floatingUiDom002CjsJs.b;},function(_portalUtilsCjsJs){a=_portalUtilsCjsJs.P;n=_portalUtilsCjsJs.a;r=_portalUtilsCjsJs.b;}],execute:function execute(){_export("P",l=/*#__PURE__*/function(){function l(t){_classCallCheck(this,l);this.portalContainer=null,this.measuredPopoverHeight=null,this.clonedPopover=null,this.cleanupAutoUpdate=null,this.currentPlacement="top",this.currentMiddlewareData=null,this.boundHandleWindowResize=null,this.component=t;}return _createClass(l,[{key:"createPortalAppendContainer",value:function createPortalAppendContainer(){var t=document.createElement("div");return t.style.position="absolute",t.style.zIndex="9999",t.style.pointerEvents="none",t.style.width="auto",t.style.maxWidth="none",t.style.minWidth="200px",t.className="nile-popover-portal-append",t;}},{key:"positionPortalAppend",value:function positionPortalAppend(){this.portalContainer&&this.component.isShow&&(this.measurePopoverHeight(),this.computeFloatingUIPosition());}},{key:"measurePopoverHeight",value:function measurePopoverHeight(){!this.measuredPopoverHeight&&this.portalContainer&&(this.portalContainer.style.position="absolute",this.portalContainer.style.visibility="hidden",this.portalContainer.style.top="0px",this.portalContainer.style.left="0px",this.portalContainer.offsetHeight,this.measuredPopoverHeight=this.portalContainer.offsetHeight,this.portalContainer.style.visibility="");}},{key:"computeFloatingUIPosition",value:function(){var _computeFloatingUIPosition=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var t,i,_yield$this$calculate,_s,_o,_e,_h;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(this.portalContainer){_context2.next=2;break;}return _context2.abrupt("return");case 2:t=this.component.querySelector('[slot="anchor"]')||this.component,i=this.portalContainer;_context2.prev=3;_context2.next=6;return this.calculateFloatingUIPosition(t,i);case 6:_yield$this$calculate=_context2.sent;_s=_yield$this$calculate.x;_o=_yield$this$calculate.y;_e=_yield$this$calculate.placement;_h=_yield$this$calculate.middlewareData;this.applyFloatingUIPosition(i,t,_s,_o,_e,_h);_context2.next=17;break;case 14:_context2.prev=14;_context2.t0=_context2["catch"](3);console.warn("Floating UI positioning failed, falling back to simple positioning:",_context2.t0),this.fallbackPositioning();case 17:case"end":return _context2.stop();}},_callee,this,[[3,14]]);}));function computeFloatingUIPosition(){return _computeFloatingUIPosition.apply(this,arguments);}return computeFloatingUIPosition;}()},{key:"calculateFloatingUIPosition",value:function(){var _calculateFloatingUIPosition=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(i,s){var o,e,h;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:o=a.findBoundaryElements(i),e=this.getInitialPlacement(),h=this.createFloatingUIMiddleware(o);_context3.next=3;return t(i,s,{placement:e,strategy:"fixed",middleware:h,platform:this.createCustomPlatform()});case 3:return _context3.abrupt("return",_context3.sent);case 4:case"end":return _context3.stop();}},_callee2,this);}));function calculateFloatingUIPosition(_x,_x2){return _calculateFloatingUIPosition.apply(this,arguments);}return calculateFloatingUIPosition;}()},{key:"getInitialPlacement",value:function getInitialPlacement(){return this.component.placement||"top";}},{key:"createFloatingUIMiddleware",value:function createFloatingUIMiddleware(t){return[i(this.component.distance||18),s({fallbackPlacements:this.getFallbackPlacements(),fallbackStrategy:"bestFit",padding:10,boundary:t}),o({padding:10,crossAxis:!0,boundary:t})];}},{key:"getFallbackPlacements",value:function getFallbackPlacements(){var t=this.component.placement||"top",i=[];return t.startsWith("top")?i.push("bottom","right","left","top-start","top-end","bottom-start","bottom-end"):t.startsWith("bottom")?i.push("top","right","left","bottom-start","bottom-end","top-start","top-end"):t.startsWith("left")?i.push("right","top","bottom","left-start","left-end","right-start","right-end"):t.startsWith("right")&&i.push("left","top","bottom","right-start","right-end","left-start","left-end"),i;}},{key:"createCustomPlatform",value:function createCustomPlatform(){return e;}},{key:"positionArrow",value:function positionArrow(t,i,s){if(!this.component.arrow)return;var o=t.querySelector(".popup__arrow");if(!o)return;var e=i.getBoundingClientRect(),h=t.getBoundingClientRect();var a="",n="",r="",_l="";switch(s.split("-")[0]){case"top":r="calc(var(--arrow-size-diagonal) * -1)",_l=this.calculateArrowXPosition(e,h,s,18);break;case"bottom":a="calc(var(--arrow-size-diagonal) * -1)",_l=this.calculateArrowXPosition(e,h,s,18);break;case"left":n="calc(var(--arrow-size-diagonal) * -1)",a=this.calculateArrowYPosition(e,h,s,18);break;case"right":_l="calc(var(--arrow-size-diagonal) * -1)",a=this.calculateArrowYPosition(e,h,s,18);}Object.assign(o.style,{top:a,right:n,bottom:r,left:_l});}},{key:"calculateArrowXPosition",value:function calculateArrowXPosition(t,i,s,o){var e=t.left+t.width/2-i.left-o;return s.includes("start")?"".concat(o,"px"):s.includes("end")?"calc(100% - ".concat(2*o,"px)"):"".concat(Math.max(o,Math.min(e,i.width-2*o)),"px");}},{key:"calculateArrowYPosition",value:function calculateArrowYPosition(t,i,s,o){var e=t.top+t.height/2-i.top-o;return s.includes("start")?"".concat(o,"px"):s.includes("end")?"calc(100% - ".concat(2*o,"px)"):"".concat(Math.max(o,Math.min(e,i.height-2*o)),"px");}},{key:"applyFloatingUIPosition",value:function applyFloatingUIPosition(t,i,s,o,e,h){Object.assign(t.style,{left:"".concat(s,"px"),top:"".concat(o,"px"),position:"fixed",pointerEvents:"auto",width:"auto",maxWidth:"none",minWidth:"200px"}),this.currentPlacement=e,this.currentMiddlewareData=h,a.applyCollisionData(t,h,e),t.className="nile-popover-portal-append";var n=i.getBoundingClientRect();t.style.minWidth="".concat(Math.max(n.width,200),"px"),this.positionArrow(t,i,e);}},{key:"fallbackPositioning",value:function fallbackPositioning(){if(!this.portalContainer)return;var t=this.component.querySelector('[slot="anchor"]')||this.component,i=t.getBoundingClientRect(),s=window.innerHeight,o=window.innerWidth,e=s-i.bottom,h=i.top,a=o-i.right,n=i.left;var r,_l2,p,c=i.left;e>h&&e>200?(p=Math.max(e-20,100),r=i.bottom+(this.component.distance||18),_l2="bottom"):h>e&&h>200?(p=Math.max(h-20,100),r=Math.max(i.top-p-(this.component.distance||18),10),_l2="top"):a>n&&a>200?(p=Math.max(Math.min(a,e,h)-20,100),r=i.top,c=i.right+(this.component.distance||18),_l2="right"):(p=Math.max(Math.min(n,e,h)-20,100),r=i.top,c=Math.max(i.left-200-(this.component.distance||18),10),_l2="left"),"left"===_l2||"right"===_l2?(this.portalContainer.style.left="".concat(c,"px"),this.portalContainer.style.top="".concat(r,"px")):(this.portalContainer.style.left="".concat(i.left,"px"),this.portalContainer.style.top="".concat(r,"px")),this.portalContainer.style.maxHeight="".concat(p,"px"),this.portalContainer.style.pointerEvents="auto",this.portalContainer.style.width="auto",this.portalContainer.style.maxWidth="none",this.portalContainer.style.minWidth="200px",this.portalContainer.className="nile-popover-portal-append popover__box popover__box--".concat(_l2),this.calculateAndSetAutoSizeProperties(i,r,_l2),this.positionArrow(this.portalContainer,t,_l2);}},{key:"calculateAndSetAutoSizeProperties",value:function calculateAndSetAutoSizeProperties(t,i,s){if(!this.portalContainer)return;var o=window.innerHeight,e=window.innerWidth;var h,a=e-t.left-10;"top"===s?h=t.top-10:"bottom"===s?h=o-t.bottom-10:"left"===s?(h=Math.min(o-t.top,t.bottom),a=t.left-10):(h=Math.min(o-t.top,t.bottom),a=e-t.right-10),this.portalContainer.style.setProperty("--auto-size-available-height","".concat(Math.max(h,100),"px")),this.portalContainer.style.setProperty("--auto-size-available-width","".concat(Math.max(a,200),"px"));}},{key:"updatePortalAppendPosition",value:function updatePortalAppendPosition(){this.component.portal&&this.portalContainer&&this.positionPortalAppend();}},{key:"handleWindowResize",value:function handleWindowResize(){this.component.portal&&this.portalContainer&&this.positionPortalAppend();}},{key:"setupAutoUpdatePositioning",value:function setupAutoUpdatePositioning(){var _this=this;this.portalContainer&&this.component&&(this.cleanupAutoUpdatePositioning(),this.cleanupAutoUpdate=h(this.component,this.portalContainer,function(){_this.computeFloatingUIPosition();},{ancestorScroll:!0,ancestorResize:!0,elementResize:!0,layoutShift:!0,animationFrame:!0}));}},{key:"cleanupAutoUpdatePositioning",value:function cleanupAutoUpdatePositioning(){this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);}},{key:"injectStylesToDocument",value:function injectStylesToDocument(){if(!this.portalContainer)return;var t=a.generateStyleId();if(document.getElementById(t))return;var i=this.component.constructor.styles;if(!i)return;var s=document.createElement("style");s.id=t,s.textContent=a.extractStylesAsCSS(i),document.head.appendChild(s),this.portalContainer.t=t;}},{key:"adoptStylesToPortalAppend",value:function adoptStylesToPortalAppend(){this.portalContainer&&this.injectStylesToDocument();}},{key:"setupPortalAppend",value:function setupPortalAppend(){var _this2=this;this.component.portal&&this.component.updateComplete.then(function(){setTimeout(function(){_this2.component.isShow&&(_this2.clonedPopover=_this2.createPortalPopover(),_this2.portalContainer=_this2.createPortalAppendContainer(),_this2.portalContainer.appendChild(_this2.clonedPopover),document.body.appendChild(_this2.portalContainer),_this2.adoptStylesToPortalAppend(),_this2.clonedPopover.style.display="",_this2.positionPortalAppend(),_this2.setupPortalEventListeners(),_this2.setupAutoUpdatePositioning(),_this2.boundHandleWindowResize=_this2.handleWindowResize.bind(_this2),window.addEventListener("resize",_this2.boundHandleWindowResize));},10);});}},{key:"createPortalPopover",value:function createPortalPopover(){return n.createPortalPopover(this.component);}},{key:"setupPortalEventListeners",value:function setupPortalEventListeners(){r.setupPortalEventListeners(this.clonedPopover,this.component);}},{key:"cleanupPortalAppend",value:function cleanupPortalAppend(){if(this.cleanupAutoUpdatePositioning(),this.portalContainer&&this.portalContainer.parentNode){var _t=this.portalContainer.t;if(_t){var _i=document.getElementById(_t);_i&&_i.remove();}this.portalContainer.parentNode.removeChild(this.portalContainer);}this.boundHandleWindowResize&&(window.removeEventListener("resize",this.boundHandleWindowResize),this.boundHandleWindowResize=null),this.portalContainer=null,this.clonedPopover=null,this.measuredPopoverHeight=null,this.currentPlacement="top",this.currentMiddlewareData=null;}},{key:"portalContainerElement",get:function get(){return this.portalContainer;}},{key:"resetMeasuredHeight",value:function resetMeasuredHeight(){this.measuredPopoverHeight=null;}},{key:"forceReposition",value:function forceReposition(){this.portalContainer&&this.computeFloatingUIPosition();}},{key:"getCurrentPlacement",value:function getCurrentPlacement(){return this.currentPlacement;}},{key:"getCurrentMiddlewareData",value:function getCurrentMiddlewareData(){return this.currentMiddlewareData;}},{key:"isUsingFloatingUI",value:function isUsingFloatingUI(){return null!==this.cleanupAutoUpdate;}},{key:"updatePositioningConfig",value:function updatePositioningConfig(t){this.forceReposition();}},{key:"handleViewportChange",value:function handleViewportChange(){this.portalContainer&&(this.resetMeasuredHeight(),this.forceReposition());}},{key:"isPositioningOptimal",value:function isPositioningOptimal(){if(!this.portalContainer||!this.currentMiddlewareData)return!0;var t=(this.component.querySelector('[slot="anchor"]')||this.component).getBoundingClientRect(),i=window.innerHeight-t.bottom,s=t.top,o=this.currentPlacement.startsWith("top"),e=this.currentPlacement.startsWith("bottom");return!(o&&i>s)&&!(e&&s>i);}}]);}());}};});
|
|
2
2
|
//# sourceMappingURL=portal-manager.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./nile-popup.cjs.js","tslib","../floating-ui.dom-007bbe96.cjs.js","lit/directives/class-map.js","lit/decorators.js","lit","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js","./nile-popup.css.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nilePopupCjsJs){_export("NilePopup",_nilePopupCjsJs.N);},function(_tslib){},function(
|
|
1
|
+
System.register(["./nile-popup.cjs.js","tslib","../floating-ui.dom-007bbe96.cjs.js","lit/directives/class-map.js","lit/decorators.js","lit","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js","./nile-popup.css.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nilePopupCjsJs){_export("NilePopup",_nilePopupCjsJs.N);},function(_tslib){},function(_floatingUiDom002CjsJs){},function(_litDirectivesClassMapJs){},function(_litDecoratorsJs){},function(_lit){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){},function(_nilePopupCssCjsJs){}],execute:function execute(){}};});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../floating-ui.dom-007bbe96.cjs.js","lit/directives/class-map.js","lit/decorators.js","lit","../internal/nile-element.cjs.js","./nile-popup.css.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,a,o,r,n,h,l,p,c,d,u,f,m,_templateObject,_templateObject2,y;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function b(t){return function(t){for(var _i=t;_i;_i=v(_i))if(_i instanceof Element&&"none"===getComputedStyle(_i).display)return null;for(var _i2=v(t);_i2;_i2=v(_i2)){if(!(_i2 instanceof Element))continue;var _t=getComputedStyle(_i2);if("contents"!==_t.display){if("static"!==_t.position||"none"!==_t.filter)return _i2;if("BODY"===_i2.tagName)return _i2;}}return null;}(t);}function v(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode;}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_floatingUiDom001CjsJs){i=_floatingUiDom001CjsJs.b;e=_floatingUiDom001CjsJs.o;s=_floatingUiDom001CjsJs.f;a=_floatingUiDom001CjsJs.a;o=_floatingUiDom001CjsJs.s;r=_floatingUiDom001CjsJs.d;n=_floatingUiDom001CjsJs.p;h=_floatingUiDom001CjsJs.c;},function(_litDirectivesClassMapJs){l=_litDirectivesClassMapJs.classMap;},function(_litDecoratorsJs){p=_litDecoratorsJs.query;c=_litDecoratorsJs.property;d=_litDecoratorsJs.customElement;},function(_lit){u=_lit.html;},function(_internalNileElementCjsJs){f=_internalNileElementCjsJs.N;},function(_nilePopupCssCjsJs){m=_nilePopupCssCjsJs.s;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",y=/*#__PURE__*/function(_f){function y(){var _this;_classCallCheck(this,y);_this=_callSuper(this,y,arguments),_this.active=!1,_this.placement="top",_this.strategy="absolute",_this.distance=0,_this.skidding=0,_this.arrow=!1,_this.arrowPlacement="anchor",_this.arrowPadding=10,_this.flip=!1,_this.flipFallbackPlacements="",_this.flipFallbackStrategy="best-fit",_this.flipPadding=0,_this.shift=!1,_this.shiftPadding=0,_this.autoSizePadding=0;return _this;}_inherits(y,_f);return _createClass(y,[{key:"connectedCallback",value:function(){var _connectedCallback=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_superPropGet(y,"connectedCallback",this,3)([]);_context2.next=3;return this.updateComplete;case 3:this.start();case 4:case"end":return _context2.stop();}},_callee,this);}));function connectedCallback(){return _connectedCallback.apply(this,arguments);}return connectedCallback;}()},{key:"disconnectedCallback",value:function disconnectedCallback(){this.stop();}},{key:"updated",value:function(){var _updated=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(t){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_superPropGet(y,"updated",this,3)([t]);t.has("active")&&(this.active?this.start():this.stop());t.has("anchor")&&this.handleAnchorChange();_context3.t0=this.active;if(!_context3.t0){_context3.next=8;break;}_context3.next=7;return this.updateComplete;case 7:this.reposition();case 8:case"end":return _context3.stop();}},_callee2,this);}));function updated(_x){return _updated.apply(this,arguments);}return updated;}()},{key:"handleAnchorChange",value:function(){var _handleAnchorChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _t2;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return this.stop();case 2:if(!(this.anchor&&"string"==typeof this.anchor)){_context4.next=7;break;}_t2=this.getRootNode();this.anchorEl=_t2.getElementById(this.anchor);_context4.next=8;break;case 7:this.anchor instanceof Element?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');case 8:this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start();case 9:case"end":return _context4.stop();}},_callee3,this);}));function handleAnchorChange(){return _handleAnchorChange.apply(this,arguments);}return handleAnchorChange;}()},{key:"start",value:function start(){var _this2=this;this.anchorEl&&(this.cleanup=i(this.anchorEl,this.popup,function(){_this2.reposition();}));}},{key:"stop",value:function(){var _stop=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _this3=this;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:return _context5.abrupt("return",new Promise(function(t){_this3.cleanup?(_this3.cleanup(),_this3.cleanup=void 0,_this3.removeAttribute("data-current-placement"),_this3.style.removeProperty("--auto-size-available-width"),_this3.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(function(){return t();})):t();}));case 1:case"end":return _context5.stop();}},_callee4);}));function stop(){return _stop.apply(this,arguments);}return stop;}()},{key:"reposition",value:function reposition(){var _this4=this;if(!this.active||!this.anchorEl)return;var t=[e({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(o({apply:function apply(_ref){var t=_ref.rects;var i="width"===_this4.sync||"both"===_this4.sync,e="height"===_this4.sync||"both"===_this4.sync;_this4.popup.style.width=i?"".concat(t.reference.width,"px"):"",_this4.popup.style.height=e?"".concat(t.reference.height,"px"):"";}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(s({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(a({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(o({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:function apply(_ref2){var t=_ref2.availableWidth,i=_ref2.availableHeight;"vertical"===_this4.autoSize||"both"===_this4.autoSize?_this4.style.setProperty("--auto-size-available-height","".concat(i,"px")):_this4.style.removeProperty("--auto-size-available-height"),"horizontal"===_this4.autoSize||"both"===_this4.autoSize?_this4.style.setProperty("--auto-size-available-width","".concat(t,"px")):_this4.style.removeProperty("--auto-size-available-width");}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(r({element:this.arrowEl,padding:this.arrowPadding}));var i="absolute"===this.strategy?function(t){return n.getOffsetParent(t,b);}:n.getOffsetParent;h(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:_objectSpread(_objectSpread({},n),{},{getOffsetParent:i})}).then(function(_ref3){var t=_ref3.x,i=_ref3.y,e=_ref3.middlewareData,s=_ref3.placement;var a="rtl"===getComputedStyle(_this4).direction,o={top:"bottom",right:"left",bottom:"top",left:"right"}[s.split("-")[0]];if(_this4.setAttribute("data-current-placement",s),Object.assign(_this4.popup.style,{left:"".concat(t,"px"),top:"".concat(i,"px")}),_this4.arrow){var _t3=e.arrow.x,_i3=e.arrow.y;var _s="",_r="",_n="",_h="";if("start"===_this4.arrowPlacement){var _e="number"==typeof _t3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";_s="number"==typeof _i3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"",_r=a?_e:"",_h=a?"":_e;}else if("end"===_this4.arrowPlacement){var _e2="number"==typeof _t3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";_r=a?"":_e2,_h=a?_e2:"",_n="number"==typeof _i3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";}else"center"===_this4.arrowPlacement?(_h="number"==typeof _t3?"calc(50% - var(--arrow-size-diagonal))":"",_s="number"==typeof _i3?"calc(50% - var(--arrow-size-diagonal))":""):(_h="number"==typeof _t3?"".concat(_t3,"px"):"",_s="number"==typeof _i3?"".concat(_i3,"px"):"");Object.assign(_this4.arrowEl.style,_defineProperty({top:_s,right:_r,bottom:_n,left:_h},o,"calc(var(--arrow-size-diagonal) * -1)"));}}),this.emit("reposition");}},{key:"render",value:function render(){return u(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <slot name=\"anchor\" @slotchange=","></slot>\n\n <div\n part=\"popup\"\n class=","\n >\n <slot></slot>\n ","\n </div>\n "])),this.handleAnchorChange,l({popup:!0,"popup--active":this.active,"popup--fixed":"fixed"===this.strategy,"popup--has-arrow":this.arrow}),this.arrow?u(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>"]))):"");}}]);}(f));y.styles=m,t([p(".popup")],y.prototype,"popup",void 0),t([p(".popup__arrow")],y.prototype,"arrowEl",void 0),t([c()],y.prototype,"anchor",void 0),t([c({type:Boolean,reflect:!0})],y.prototype,"active",void 0),t([c({reflect:!0})],y.prototype,"placement",void 0),t([c({reflect:!0})],y.prototype,"strategy",void 0),t([c({type:Number})],y.prototype,"distance",void 0),t([c({type:Number})],y.prototype,"skidding",void 0),t([c({type:Boolean})],y.prototype,"arrow",void 0),t([c({attribute:"arrow-placement"})],y.prototype,"arrowPlacement",void 0),t([c({attribute:"arrow-padding",type:Number})],y.prototype,"arrowPadding",void 0),t([c({type:Boolean})],y.prototype,"flip",void 0),t([c({attribute:"flip-fallback-placements",converter:{fromAttribute:function fromAttribute(t){return t.split(" ").map(function(t){return t.trim();}).filter(function(t){return""!==t;});},toAttribute:function toAttribute(t){return t.join(" ");}}})],y.prototype,"flipFallbackPlacements",void 0),t([c({attribute:"flip-fallback-strategy"})],y.prototype,"flipFallbackStrategy",void 0),t([c({type:Object})],y.prototype,"flipBoundary",void 0),t([c({attribute:"flip-padding",type:Number})],y.prototype,"flipPadding",void 0),t([c({type:Boolean})],y.prototype,"shift",void 0),t([c({type:Object})],y.prototype,"shiftBoundary",void 0),t([c({attribute:"shift-padding",type:Number})],y.prototype,"shiftPadding",void 0),t([c({attribute:"auto-size"})],y.prototype,"autoSize",void 0),t([c()],y.prototype,"sync",void 0),t([c({type:Object})],y.prototype,"autoSizeBoundary",void 0),t([c({attribute:"auto-size-padding",type:Number})],y.prototype,"autoSizePadding",void 0),_export("N",y=t([d("nile-popup")],y));}};});
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../floating-ui.dom-007bbe96.cjs.js","lit/directives/class-map.js","lit/decorators.js","lit","../internal/nile-element.cjs.js","./nile-popup.css.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,a,o,r,n,h,l,p,c,d,u,f,m,_templateObject,_templateObject2,y;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function b(t){return function(t){for(var _i=t;_i;_i=v(_i))if(_i instanceof Element&&"none"===getComputedStyle(_i).display)return null;for(var _i2=v(t);_i2;_i2=v(_i2)){if(!(_i2 instanceof Element))continue;var _t=getComputedStyle(_i2);if("contents"!==_t.display){if("static"!==_t.position||"none"!==_t.filter)return _i2;if("BODY"===_i2.tagName)return _i2;}}return null;}(t);}function v(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode;}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_floatingUiDom002CjsJs){i=_floatingUiDom002CjsJs.b;e=_floatingUiDom002CjsJs.o;s=_floatingUiDom002CjsJs.f;a=_floatingUiDom002CjsJs.a;o=_floatingUiDom002CjsJs.s;r=_floatingUiDom002CjsJs.d;n=_floatingUiDom002CjsJs.p;h=_floatingUiDom002CjsJs.c;},function(_litDirectivesClassMapJs){l=_litDirectivesClassMapJs.classMap;},function(_litDecoratorsJs){p=_litDecoratorsJs.query;c=_litDecoratorsJs.property;d=_litDecoratorsJs.customElement;},function(_lit){u=_lit.html;},function(_internalNileElementCjsJs){f=_internalNileElementCjsJs.N;},function(_nilePopupCssCjsJs){m=_nilePopupCssCjsJs.s;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",y=/*#__PURE__*/function(_f){function y(){var _this;_classCallCheck(this,y);_this=_callSuper(this,y,arguments),_this.active=!1,_this.placement="top",_this.strategy="absolute",_this.distance=0,_this.skidding=0,_this.arrow=!1,_this.arrowPlacement="anchor",_this.arrowPadding=10,_this.flip=!1,_this.flipFallbackPlacements="",_this.flipFallbackStrategy="best-fit",_this.flipPadding=0,_this.shift=!1,_this.shiftPadding=0,_this.autoSizePadding=0;return _this;}_inherits(y,_f);return _createClass(y,[{key:"connectedCallback",value:function(){var _connectedCallback=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_superPropGet(y,"connectedCallback",this,3)([]);_context2.next=3;return this.updateComplete;case 3:this.start();case 4:case"end":return _context2.stop();}},_callee,this);}));function connectedCallback(){return _connectedCallback.apply(this,arguments);}return connectedCallback;}()},{key:"disconnectedCallback",value:function disconnectedCallback(){this.stop();}},{key:"updated",value:function(){var _updated=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(t){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_superPropGet(y,"updated",this,3)([t]);t.has("active")&&(this.active?this.start():this.stop());t.has("anchor")&&this.handleAnchorChange();_context3.t0=this.active;if(!_context3.t0){_context3.next=8;break;}_context3.next=7;return this.updateComplete;case 7:this.reposition();case 8:case"end":return _context3.stop();}},_callee2,this);}));function updated(_x){return _updated.apply(this,arguments);}return updated;}()},{key:"handleAnchorChange",value:function(){var _handleAnchorChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _t2;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return this.stop();case 2:if(!(this.anchor&&"string"==typeof this.anchor)){_context4.next=7;break;}_t2=this.getRootNode();this.anchorEl=_t2.getElementById(this.anchor);_context4.next=8;break;case 7:this.anchor instanceof Element?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');case 8:this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start();case 9:case"end":return _context4.stop();}},_callee3,this);}));function handleAnchorChange(){return _handleAnchorChange.apply(this,arguments);}return handleAnchorChange;}()},{key:"start",value:function start(){var _this2=this;this.anchorEl&&(this.cleanup=i(this.anchorEl,this.popup,function(){_this2.reposition();}));}},{key:"stop",value:function(){var _stop=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _this3=this;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:return _context5.abrupt("return",new Promise(function(t){_this3.cleanup?(_this3.cleanup(),_this3.cleanup=void 0,_this3.removeAttribute("data-current-placement"),_this3.style.removeProperty("--auto-size-available-width"),_this3.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(function(){return t();})):t();}));case 1:case"end":return _context5.stop();}},_callee4);}));function stop(){return _stop.apply(this,arguments);}return stop;}()},{key:"reposition",value:function reposition(){var _this4=this;if(!this.active||!this.anchorEl)return;var t=[e({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(o({apply:function apply(_ref){var t=_ref.rects;var i="width"===_this4.sync||"both"===_this4.sync,e="height"===_this4.sync||"both"===_this4.sync;_this4.popup.style.width=i?"".concat(t.reference.width,"px"):"",_this4.popup.style.height=e?"".concat(t.reference.height,"px"):"";}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(s({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(a({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(o({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:function apply(_ref2){var t=_ref2.availableWidth,i=_ref2.availableHeight;"vertical"===_this4.autoSize||"both"===_this4.autoSize?_this4.style.setProperty("--auto-size-available-height","".concat(i,"px")):_this4.style.removeProperty("--auto-size-available-height"),"horizontal"===_this4.autoSize||"both"===_this4.autoSize?_this4.style.setProperty("--auto-size-available-width","".concat(t,"px")):_this4.style.removeProperty("--auto-size-available-width");}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(r({element:this.arrowEl,padding:this.arrowPadding}));var i="absolute"===this.strategy?function(t){return n.getOffsetParent(t,b);}:n.getOffsetParent;h(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:_objectSpread(_objectSpread({},n),{},{getOffsetParent:i})}).then(function(_ref3){var t=_ref3.x,i=_ref3.y,e=_ref3.middlewareData,s=_ref3.placement;var a="rtl"===getComputedStyle(_this4).direction,o={top:"bottom",right:"left",bottom:"top",left:"right"}[s.split("-")[0]];if(_this4.setAttribute("data-current-placement",s),Object.assign(_this4.popup.style,{left:"".concat(t,"px"),top:"".concat(i,"px")}),_this4.arrow){var _t3=e.arrow.x,_i3=e.arrow.y;var _s="",_r="",_n="",_h="";if("start"===_this4.arrowPlacement){var _e="number"==typeof _t3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";_s="number"==typeof _i3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"",_r=a?_e:"",_h=a?"":_e;}else if("end"===_this4.arrowPlacement){var _e2="number"==typeof _t3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";_r=a?"":_e2,_h=a?_e2:"",_n="number"==typeof _i3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";}else"center"===_this4.arrowPlacement?(_h="number"==typeof _t3?"calc(50% - var(--arrow-size-diagonal))":"",_s="number"==typeof _i3?"calc(50% - var(--arrow-size-diagonal))":""):(_h="number"==typeof _t3?"".concat(_t3,"px"):"",_s="number"==typeof _i3?"".concat(_i3,"px"):"");Object.assign(_this4.arrowEl.style,_defineProperty({top:_s,right:_r,bottom:_n,left:_h},o,"calc(var(--arrow-size-diagonal) * -1)"));}}),this.emit("reposition");}},{key:"render",value:function render(){return u(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <slot name=\"anchor\" @slotchange=","></slot>\n\n <div\n part=\"popup\"\n class=","\n >\n <slot></slot>\n ","\n </div>\n "])),this.handleAnchorChange,l({popup:!0,"popup--active":this.active,"popup--fixed":"fixed"===this.strategy,"popup--has-arrow":this.arrow}),this.arrow?u(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>"]))):"");}}]);}(f));y.styles=m,t([p(".popup")],y.prototype,"popup",void 0),t([p(".popup__arrow")],y.prototype,"arrowEl",void 0),t([c()],y.prototype,"anchor",void 0),t([c({type:Boolean,reflect:!0})],y.prototype,"active",void 0),t([c({reflect:!0})],y.prototype,"placement",void 0),t([c({reflect:!0})],y.prototype,"strategy",void 0),t([c({type:Number})],y.prototype,"distance",void 0),t([c({type:Number})],y.prototype,"skidding",void 0),t([c({type:Boolean})],y.prototype,"arrow",void 0),t([c({attribute:"arrow-placement"})],y.prototype,"arrowPlacement",void 0),t([c({attribute:"arrow-padding",type:Number})],y.prototype,"arrowPadding",void 0),t([c({type:Boolean})],y.prototype,"flip",void 0),t([c({attribute:"flip-fallback-placements",converter:{fromAttribute:function fromAttribute(t){return t.split(" ").map(function(t){return t.trim();}).filter(function(t){return""!==t;});},toAttribute:function toAttribute(t){return t.join(" ");}}})],y.prototype,"flipFallbackPlacements",void 0),t([c({attribute:"flip-fallback-strategy"})],y.prototype,"flipFallbackStrategy",void 0),t([c({type:Object})],y.prototype,"flipBoundary",void 0),t([c({attribute:"flip-padding",type:Number})],y.prototype,"flipPadding",void 0),t([c({type:Boolean})],y.prototype,"shift",void 0),t([c({type:Object})],y.prototype,"shiftBoundary",void 0),t([c({attribute:"shift-padding",type:Number})],y.prototype,"shiftPadding",void 0),t([c({attribute:"auto-size"})],y.prototype,"autoSize",void 0),t([c()],y.prototype,"sync",void 0),t([c({type:Object})],y.prototype,"autoSizeBoundary",void 0),t([c({attribute:"auto-size-padding",type:Number})],y.prototype,"autoSizePadding",void 0),_export("N",y=t([d("nile-popup")],y));}};});
|
|
2
2
|
//# sourceMappingURL=nile-popup.cjs.js.map
|